/* central — App Layout */

/* ── Shell ───────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-1); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
  overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-img { height: 28px; }
.sidebar-logo-text { font-size: .9rem; font-weight: 700; color: var(--t1); letter-spacing: .02em; }
.sidebar-logo-sub  { font-size: .7rem; color: var(--t3); font-weight: 400; }

.sidebar-section { padding: 16px 10px 6px; }
.sidebar-section-label {
  font-size: .68rem; font-weight: 600; color: var(--t3);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 0 10px; margin-bottom: 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r);
  font-size: .875rem; color: var(--t2); cursor: pointer;
  transition: all .12s; text-decoration: none; position: relative;
}
.nav-item:hover { background: var(--bg-3); color: var(--t1); }
.nav-item.active { background: var(--brand-dim); color: var(--t1); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--brand); border-radius: 0 3px 3px 0;
}
.nav-item-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--brand); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 1px 6px;
  border-radius: 20px; min-width: 18px; text-align: center;
}

.sidebar-user {
  margin-top: auto; padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-dim); color: var(--brand-hi);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.sidebar-user-name  { font-size: .8125rem; font-weight: 600; color: var(--t1); line-height: 1.2; }
.sidebar-user-role  { font-size: .72rem; color: var(--t3); }
.sidebar-user-menu  { margin-left: auto; color: var(--t2); font-size: .875rem; cursor: pointer; padding: 4px; }
.sidebar-user-menu:hover { color: var(--t1); }

/* ── Main Content ────────────────────────── */
.main {
  margin-left: var(--sidebar-w); flex: 1;
  display: flex; flex-direction: column; min-height: 100vh;
}
.topbar {
  height: var(--header-h); background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 28px; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--t2); }
.topbar-breadcrumb a { color: var(--t2); }
.topbar-breadcrumb a:hover { color: var(--t1); }
.topbar-breadcrumb .sep { color: var(--t3); font-size: .75rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-icon-btn {
  width: 34px; height: 34px; border-radius: var(--r);
  background: transparent; border: none; color: var(--t2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all .12s; position: relative;
}
.topbar-icon-btn:hover { background: var(--bg-3); color: var(--t1); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; background: var(--brand); border-radius: 50%;
  border: 2px solid var(--bg-1);
}

.content { flex: 1; padding: 28px; width: 100%; }

/* ── Login ───────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: var(--bg-0); padding: 20px;
}
.login-box {
  width: 100%; max-width: 380px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 36px 32px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { height: 36px; margin: 0 auto 8px; }
.login-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--t1); }
.login-logo-sub  { font-size: .8rem; color: var(--t3); }
.login-title { font-size: 1rem; font-weight: 600; margin-bottom: 20px; }
.login-footer { text-align: center; margin-top: 18px; font-size: .8rem; color: var(--t3); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
