
/* ──────────── LAYOUT ──────────── */
.admin-layout {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ──────────── MOBILE TOP BAR ──────────── */
.admin-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--admin-topbar);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 80;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.admin-topbar-menu {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.admin-topbar-menu:active { background: var(--bg-input); }
.admin-topbar-menu .lucide { width: 22px; height: 22px; }
.admin-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-topbar-logo {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.admin-topbar-logo .bolt-sm {
  width: 26px; height: 26px;
  background: var(--brand);
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-topbar-logo .bolt-sm .lucide { width: 14px; height: 14px; color: var(--brand-ink); }

/* ──────────── SIDEBAR ──────────── */
.admin-sidebar {
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--admin-sidebar);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-sidebar);
}
.admin-sidebar::-webkit-scrollbar { width: 3px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

/* Logo */
.admin-logo {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border-sidebar);
  flex-shrink: 0;
}
.admin-logo a {
  color: var(--text-inverse);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.admin-logo .bolt {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(240, 180, 41, 0.2);
}
.admin-logo .bolt .lucide { width: 17px; height: 17px; color: var(--brand-ink); }
.admin-logo-sub {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.38);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}

/* Nav */
.admin-nav {
  list-style: none;
  padding: 8px 10px 16px;
  flex: 1;
}

/* Nav group labels */
.nav-group-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  padding: 16px 14px 6px;
  user-select: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--r-xs);
  transition: color 0.15s;
}
.nav-group-label:hover { color: rgba(255,255,255,0.7); }
.nav-group:first-child .nav-group-label {
  padding-top: 8px;
}

.admin-nav li { margin-bottom: 1px; }
.nav-group-items a { margin-bottom: 1px; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: all 0.15s var(--ease);
  position: relative;
  border-left: 3px solid transparent;
  margin-left: -3px;
  -webkit-tap-highlight-color: transparent;
}
.admin-nav a .lucide { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.admin-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-sidebar-hover);
}
.admin-nav a:hover .lucide { opacity: 0.9; }
.admin-nav a.active {
  background: rgba(240, 180, 41, 0.1);
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 700;
}
.admin-nav a.active .lucide { opacity: 1; color: var(--brand); }

/* Nav badge */
.nav-badge {
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--danger);
  color: white;
  padding: 1px 6px;
  border-radius: var(--r-full);
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
}
.nav-badge:empty { display: none; }
.admin-nav a.active .nav-badge {
  background: var(--brand);
  color: var(--brand-ink);
}

/* User info */
.admin-user-info {
  padding: 16px 20px;
  border-top: 1px solid var(--border-sidebar);
  margin-top: auto;
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.admin-user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}
.admin-user-role {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.admin-logout { margin-top: 10px; }
.admin-logout a {
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: color 0.2s;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}
.admin-logout a .lucide { width: 15px; height: 15px; }
.admin-logout a:hover { color: var(--danger); }

/* ──────────── MAIN CONTENT ──────────── */
.admin-main {
  margin-left: var(--admin-sidebar);
  padding: 36px 40px 60px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-main);
}

/* ──────────── HEADER ──────────── */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 32px;
}
.admin-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
  flex: 1 1 auto;
}
.admin-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: -2px;
  font-weight: 400;
  flex-basis: 100%;
  order: 1;
}
