:root{
  --bg:#f5f7fa;
  --panel:#ffffff;
  --text:#1f2a37;
  --muted:#6b7280;
  --border:rgba(0,0,0,.08);
  --primary:#0f4c81;
  --primary2:#0b3a63;
  --shadow:0 10px 30px rgba(0,0,0,.06);
  --radius:14px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
body{ margin:0; font-family:var(--font); background:var(--bg); color:var(--text); }

.topbar{
  height:56px; display:flex; align-items:center; justify-content:space-between;
  padding:0 16px; background:var(--panel); border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:10;
}
.brand{ font-weight:700; }
.topbar-right{ display:flex; gap:12px; align-items:center; }
.user{ color:var(--muted); font-size:14px; }

.shell{ display:grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 56px); }
.sidebar{
  background:var(--panel); border-right:1px solid var(--border); padding:14px;
}
.nav-item{
  display:block; padding:10px 12px; border-radius:12px; text-decoration:none;
  color:var(--text); border:1px solid transparent;
}
.nav-item:hover{ background:#f1f5f9; border-color:var(--border); }
.nav-section{ margin:14px 8px 6px; font-size:12px; color:var(--muted); text-transform:uppercase; }

.content{ padding:18px; }

.card{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow: var(--shadow); padding:16px;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px; border-radius:12px; border:1px solid var(--border);
  background:var(--panel); cursor:pointer; text-decoration:none; color:var(--text);
}
.btn-primary{
  background:var(--primary); border-color:transparent; color:#fff;
}
.btn-primary:hover{ background:var(--primary2); }
.btn-ghost{ background:transparent; }

.auth-wrap{
  min-height:100vh; display:grid; place-items:center; padding:18px;
}
.auth-card{
  width:min(420px, 100%);
  background:var(--panel); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow); padding:18px;
}
.label{ display:block; margin:10px 0 6px; font-size:13px; color:var(--muted); }
.input{
  width:100%; padding:11px 12px; border-radius:12px;
  border:1px solid var(--border); outline:none; background:#fff;
}
.input:focus{ border-color: rgba(15,76,129,.35); box-shadow: 0 0 0 4px rgba(15,76,129,.08); }

.alert{
  padding:10px 12px; border-radius:12px; border:1px solid var(--border);
  margin-bottom:10px;
}
.alert-error{ background:#fff5f5; border-color: rgba(220,38,38,.25); color:#991b1b; }

@media (max-width: 900px){
  .shell{ grid-template-columns: 1fr; }
  .sidebar{ position:sticky; top:56px; z-index:5; }
}
