/* ============================================================
   SCDPCT Admin Panel — admin.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --sb-width:        260px;
  --sb-bg:           #0f172a;
  --sb-text:         rgba(255,255,255,.58);
  --sb-text-active:  #fff;
  --sb-hover-bg:     rgba(255,255,255,.06);
  --sb-active-bg:    rgba(155,28,28,.28);
  --sb-active-bd:    #9B1C1C;
  --tb-height:       64px;
  --admin-red:       #9B1C1C;
  --admin-red-light: #BE2626;
  --admin-red-dark:  #7B1414;
  --body-bg:         #f1f5f9;
  --card-bg:         #ffffff;
  --border:          #e2e8f0;
  --text-dark:       #0f172a;
  --text-muted:      #64748b;
  --text-body:       #334155;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body.admin-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--body-bg);
  color: var(--text-body);
  font-size: .9rem;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout Wrapper ─────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────── */
.admin-sidebar {
  width: var(--sb-width);
  background: var(--sb-bg);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.4,0,.2,1), width .3s;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* Brand */
.sb-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.sb-brand img { height: 34px; width: auto; }
.sb-brand-text { line-height: 1.25; }
.sb-brand-title {
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: -.01em;
  display: block;
}
.sb-brand-sub {
  font-size: .6rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Nav Groups */
.sb-group-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.28);
  padding: 1.25rem 1.5rem .4rem;
  flex-shrink: 0;
}
.sb-nav-wrap { flex: 1; display: flex; flex-direction: column; }
.sb-nav {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: .5rem 0 1rem;
}
.sb-nav li { position: relative; }
.sb-spacer { margin-top: auto; }

.sb-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.5rem;
  color: var(--sb-text);
  text-decoration: none;
  font-size: .8375rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .18s;
  white-space: nowrap;
  cursor: pointer;
}
.sb-link:hover {
  background: var(--sb-hover-bg);
  color: #fff;
  text-decoration: none;
}
.sb-link.active {
  background: var(--sb-active-bg);
  color: var(--sb-text-active);
  border-left-color: var(--sb-active-bd);
}
.sb-link i {
  width: 1.1rem;
  text-align: center;
  font-size: .8rem;
  flex-shrink: 0;
  opacity: .8;
}
.sb-link.active i { opacity: 1; }
.sb-badge {
  margin-left: auto;
  background: var(--admin-red);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .02em;
}

/* Sidebar footer */
.sb-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sb-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--sb-text);
  font-size: .8rem;
}
.sb-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--admin-red);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.sb-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-user-info { min-width: 0; }
.sb-user-name { font-weight: 600; color: rgba(255,255,255,.82); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: .65rem; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .05em; }

/* ── Main Content Area ──────────────────────────────────────── */
.admin-main {
  margin-left: var(--sb-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Top Bar ────────────────────────────────────────────────── */
.admin-topbar {
  height: var(--tb-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.topbar-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  flex: 1;
}
.topbar-title small {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.2;
}
.topbar-actions { display: flex; align-items: center; gap: .625rem; }
.topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  font-size: .875rem;
}
.topbar-icon-btn:hover { background: var(--body-bg); color: var(--text-dark); border-color: #cbd5e1; }
.btn-sidebar-toggle { display: none; }

/* ── Page Content ───────────────────────────────────────────── */
.admin-content { padding: 1.75rem; flex: 1; }

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.page-header-title { font-size: 1.35rem; font-weight: 800; color: var(--text-dark); line-height: 1.2; }
.page-header-sub { font-size: .8125rem; color: var(--text-muted); margin-top: .2rem; }
.page-header-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s;
  height: 100%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 24px rgba(0,0,0,.09); }
.stat-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.stat-body { min-width: 0; }
.stat-number {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -.03em;
}
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.stat-sub { font-size: .72rem; margin-top: .375rem; }

/* Icon colour helpers */
.ic-red    { background: rgba(155,28,28,.1);  color: var(--admin-red); }
.ic-blue   { background: rgba(59,130,246,.1); color: #3B82F6; }
.ic-green  { background: rgba(34,197,94,.1);  color: #22C55E; }
.ic-orange { background: rgba(245,158,11,.1); color: #F59E0B; }
.ic-purple { background: rgba(139,92,246,.1); color: #8B5CF6; }
.ic-teal   { background: rgba(20,184,166,.1); color: #14B8A6; }
.ic-pink   { background: rgba(236,72,153,.1); color: #EC4899; }
.ic-grey   { background: #f1f5f9;              color: #64748b; }
.ic-indigo { background: rgba(99,102,241,.1); color: #6366F1; }

/* ── Cards ──────────────────────────────────────────────────── */
.admin-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  height: auto;
}
.admin-card-header {
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.admin-card-title {
  font-weight: 700;
  font-size: .9375rem;
  color: var(--text-dark);
  flex: 1;
}
.admin-card-body { padding: 1.5rem; }
.admin-card-footer {
  padding: .875rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #fafafa;
  border-radius: 0 0 14px 14px;
}

/* ── Tables ─────────────────────────────────────────────────── */
.admin-table-wrap {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-table-wrap .table-toolbar {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.admin-table-wrap .table-title {
  font-weight: 700;
  font-size: .9375rem;
  color: var(--text-dark);
  flex: 1;
  min-width: 120px;
}
.admin-table-wrap .table-count {
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: .4rem;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead th {
  background: #f8fafc;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 700;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: .85rem 1.1rem;
  vertical-align: middle;
  font-size: .855rem;
  color: var(--text-body);
  border-bottom: 1px solid #f1f5f9;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fafbfc; }

/* ── Search Form ────────────────────────────────────────────── */
.search-form { display: flex; align-items: center; gap: .5rem; }
.search-input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 1rem 0 2.25rem;
  font-size: .8375rem;
  width: 220px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zm-5.242 1.656a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E") no-repeat 10px center;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  color: var(--text-dark);
}
.search-input:focus { border-color: var(--admin-red); box-shadow: 0 0 0 3px rgba(155,28,28,.1); background-color: #fff; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-admin {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.125rem;
  border-radius: 8px;
  font-size: .8375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
  white-space: nowrap;
}
.btn-admin-primary { background: var(--admin-red); color: #fff; }
.btn-admin-primary:hover { background: var(--admin-red-dark); color: #fff; }
.btn-admin-outline { background: transparent; color: var(--text-body); border: 1px solid var(--border); }
.btn-admin-outline:hover { background: var(--body-bg); border-color: #cbd5e1; color: var(--text-dark); }
.btn-admin-danger { background: #fee2e2; color: #991b1b; }
.btn-admin-danger:hover { background: #fecaca; }
.btn-admin-sm { padding: .3rem .75rem; font-size: .775rem; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge-admin {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-active   { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-new      { background: #dbeafe; color: #1e40af; }
.badge-read     { background: #f0fdf4; color: #166534; }
.badge-replied  { background: #f5f3ff; color: #5b21b6; }
.badge-spam     { background: #fef3c7; color: #92400e; }
.badge-archived { background: #f1f5f9; color: #64748b; }
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-failed    { background: #fee2e2; color: #991b1b; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-draft     { background: #f1f5f9; color: #64748b; }
.badge-admin-role  { background: rgba(155,28,28,.12); color: var(--admin-red); }
.badge-patient   { background: rgba(59,130,246,.1); color: #1d4ed8; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-answered  { background: #dcfce7; color: #166534; }
.badge-rejected  { background: #fee2e2; color: #991b1b; }
.badge-approved  { background: #dcfce7; color: #166534; }
.badge-featured  { background: #f5f3ff; color: #6d28d9; }
.badge-closed    { background: #f1f5f9; color: #64748b; }
.badge-info      { background: #dbeafe; color: #1e40af; }

/* ── Pagination ─────────────────────────────────────────────── */
.admin-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--text-muted);
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-pager .pages { display: flex; gap: .25rem; }
.admin-pager .page-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-body);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
}
.admin-pager .page-btn:hover { background: var(--body-bg); border-color: #cbd5e1; }
.admin-pager .page-btn.active { background: var(--admin-red); border-color: var(--admin-red); color: #fff; }
.admin-pager .page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Avatar ─────────────────────────────────────────────────── */
.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--admin-red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  vertical-align: middle;
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

/* ── Section Title (dashboard) ──────────────────────────────── */
.section-heading {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; opacity: .25; margin-bottom: 1rem; }
.empty-state p { font-size: .875rem; }

/* ── Alert helpers ──────────────────────────────────────────── */
.admin-alert {
  padding: .875rem 1.25rem;
  border-radius: 10px;
  font-size: .855rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.admin-alert i { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.admin-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.admin-alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.admin-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.admin-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Scrollable table wrapper ───────────────────────────────── */
.table-responsive-admin { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Login Page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
}
.login-panel-brand {
  width: 42%;
  background: linear-gradient(145deg, #7B1414 0%, #9B1C1C 45%, #BE2626 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.login-panel-brand::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.login-panel-brand::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(0,0,0,.1);
}
.login-brand-content { position: relative; z-index: 1; }
.login-brand-logo { height: 52px; width: auto; margin-bottom: 2rem; filter: brightness(0) invert(1); }
.login-brand-title { font-size: 1.75rem; font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: .75rem; letter-spacing: -.02em; }
.login-brand-desc { font-size: .95rem; color: rgba(255,255,255,.72); line-height: 1.7; max-width: 340px; }
.login-brand-features { margin-top: 2.5rem; list-style: none; }
.login-brand-features li {
  color: rgba(255,255,255,.82);
  font-size: .85rem;
  padding: .35rem 0;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.login-brand-features li i { font-size: .75rem; opacity: .8; }
.login-panel-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  background: #fff;
}
.login-form-box { width: 100%; max-width: 420px; }
.login-form-title { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: .4rem; }
.login-form-sub { font-size: .875rem; color: var(--text-muted); margin-bottom: 2rem; }
.login-label { font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: .4rem; display: block; }
.login-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 1rem;
  font-size: .9rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  color: var(--text-dark);
  background: #fafafa;
}
.login-input:focus { border-color: var(--admin-red); box-shadow: 0 0 0 3px rgba(155,28,28,.1); background: #fff; }
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  height: 48px;
  background: var(--admin-red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .12s;
  letter-spacing: .01em;
  margin-top: 1.5rem;
}
.login-btn:hover { background: var(--admin-red-dark); transform: translateY(-1px); }
.login-back { text-align: center; margin-top: 2rem; font-size: .8125rem; color: var(--text-muted); }
.login-back a { color: var(--admin-red); text-decoration: none; font-weight: 600; }
.login-back a:hover { text-decoration: underline; }

/* ── Input Groups ───────────────────────────────────────────── */
.input-group-login { position: relative; margin-bottom: 1.25rem; }
.input-prefix-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: .875rem;
  pointer-events: none;
  z-index: 1;
}
.input-group-login .login-input { padding-left: 2.75rem; }
.toggle-password {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: .875rem;
  padding: 0;
}
.toggle-password:hover { color: var(--text-muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .btn-sidebar-toggle { display: flex; }
  .login-panel-brand { display: none; }
  .login-panel-form { padding: 2rem 1.5rem; }
}
@media (max-width: 575.98px) {
  .admin-content { padding: 1rem; }
  .page-header { gap: .75rem; }
  .page-header-actions { margin-left: 0; width: 100%; }
  .stat-card { padding: 1.125rem; }
  .stat-number { font-size: 1.5rem; }
}

/* ── Sidebar overlay (mobile) ───────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1039;
}
.sidebar-overlay.show { display: block; }

/* ── Dashboard chart container ──────────────────────────────── */
.chart-container { position: relative; height: 220px; }

/* ── Collapsable Sidebar Groups ─────────────────────────────── */
.sb-group-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  padding: .6rem 1.5rem;
  cursor: pointer;
  color: var(--sb-text);
  font-family: inherit;
  font-size: .8375rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.sb-group-btn:hover {
  background: var(--sb-hover-bg);
  color: #fff;
}
.sb-group-btn > i:first-child {
  width: 1.1rem;
  text-align: center;
  font-size: .8rem;
  flex-shrink: 0;
  opacity: .8;
}
.sb-group-name { flex: 1; }
.sb-group.open > .sb-group-btn { color: var(--sb-text-active); }
.sb-group.open > .sb-group-btn > i:first-child { opacity: 1; }
.sb-group.has-active > .sb-group-btn > i:first-child {
  color: var(--admin-red-light);
  opacity: 1;
}
.sb-chevron {
  margin-left: auto;
  font-size: .55rem;
  opacity: .45;
  flex-shrink: 0;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .18s;
}
.sb-group.open > .sb-group-btn .sb-chevron {
  transform: rotate(90deg);
  opacity: .85;
}
.sb-group-items {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.sb-group.open > .sb-group-items {
  max-height: 600px;
  padding-bottom: .35rem;
}

/* Sub-links: indented, smaller, with a vertical guide line */
.sb-group-items .sb-link {
  position: relative;
  padding: .5rem 1.5rem .5rem 2.7rem;
  font-size: .8125rem;
}
.sb-group-items .sb-link::before {
  content: '';
  position: absolute;
  left: 2.1rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.12);
}
.sb-group-items .sb-link:hover::before { background: rgba(255,255,255,.3); }
.sb-group-items .sb-link.active::before { background: var(--admin-red-light); width: 2px; }
.sb-group-items .sb-link i {
  font-size: .7rem;
  width: 1rem;
}

/* ── Status select ──────────────────────────────────────────── */
.status-select {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 .625rem;
  font-size: .775rem;
  color: var(--text-body);
  outline: none;
  background: #f8fafc;
  cursor: pointer;
}
.status-select:focus { border-color: var(--admin-red); }

/* ── Divider ────────────────────────────────────────────────── */
.admin-divider { border: none; border-top: 1px solid var(--border); margin: .25rem 0; }
