:root{
  --bg:#f3f6fb;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#2563eb;
  --sidebar:#0f172a;
}
html,body{height:100%;}
body.app-bg{background:var(--bg);color:var(--text);}
.topbar{background:linear-gradient(90deg,#0f172a,#1e293b);box-shadow:0 8px 24px rgba(15,23,42,.18);}
.app-shell{padding:1rem 1rem 2rem;}
.sidebar{background:var(--sidebar);min-height:100vh;color:#fff;}
.sidebar .menu-title{font-weight:700;opacity:.8}
.sidebar .menu-item{display:block;color:#e2e8f0;text-decoration:none;padding:.85rem 0;border-bottom:1px solid rgba(255,255,255,.08);font-weight:500}
.sidebar .menu-item:hover{color:#fff}
.card-shadow,.panel,.tile,.hero,.stat-card,.mini-card{background:var(--panel);border-radius:20px;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.tile-link{display:block;text-decoration:none;color:inherit}
.tile{padding:1rem;min-height:128px}
.tile-icon{width:42px;height:42px;border-radius:14px;background:#eff6ff;display:flex;align-items:center;justify-content:center;font-size:1.2rem;color:var(--primary);margin-bottom:.75rem}
.tile-title{font-weight:700}
.tile-sub{font-size:.92rem;color:var(--muted)}
.stat-card,.mini-card{padding:1rem}
.stat-card span,.mini-card .small{color:var(--muted)}
.stat-card strong{display:block;font-size:1.8rem;line-height:1.1;margin-top:.25rem}
.auth-wrap{max-width:440px;margin:0 auto;padding:1rem 0 2rem}
.login-badge{width:60px;height:60px;border-radius:20px;background:#eff6ff;color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:1.5rem}
.form-shell{max-width:720px}
.grid-form .form-control,.grid-form .form-select{border-radius:14px;min-height:48px}
.grid-form textarea.form-control{min-height:130px}
.messages-wrap{max-width:1200px;margin:0 auto 1rem}
.mobile-table table{min-width:720px}
.snapshot-box{white-space:pre-wrap;word-break:break-word;background:#f8fafc;border-radius:16px;padding:1rem;font-size:.85rem;max-height:360px;overflow:auto}
@media (max-width:991px){
  .sidebar{min-height:auto}
  .offcanvas-lg.offcanvas-start{width:300px;}
  .app-shell{padding:.75rem}
}
