/* Administrative shell, aligned with the WL panel. Scoped to reseller and global admin. */
.admin-shell { --admin-bg:#f1f5f9; --admin-border:#e2e8f0; --admin-muted:#64748b; --admin-text:#0f172a; background:var(--admin-bg); color:var(--admin-text); font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.admin-container { width:100%; max-width:79.2rem; min-width:0; margin-inline:auto; padding-inline:1.5rem; box-sizing:border-box; }
.admin-header { background:#0f172a; color:#fff; position:sticky; top:0; z-index:40; box-shadow:0 1px 3px #0f172a18; flex-shrink:0; }
.admin-brand-row { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:12px; padding-bottom:12px; }
.admin-brand { display:flex; align-items:center; gap:12px; min-width:0; color:#fff; text-decoration:none; }
.admin-brand-mark { width:36px; height:36px; border:1px solid #334155; border-radius:10px; background:#1e293b; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-weight:700; }
.admin-brand-name { font-size:15px; font-weight:700; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-brand-caption { font-size:12px; color:#94a3b8; margin-top:2px; }
.admin-brand img { max-width:210px; max-height:36px; object-fit:contain; }
.admin-actions { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.admin-action { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 10px; border-radius:8px; color:#cbd5e1; font-size:13px; text-decoration:none; min-height:40px; background:transparent; border:0; cursor:pointer; }
.admin-action:hover { color:white; background:#1e293b; }
.admin-action svg,.admin-brand-mark svg { width:18px; height:18px; }
.admin-user { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-nav-row { display:flex; gap:4px; align-items:stretch; }
.admin-nav { display:flex; align-items:stretch; gap:4px; overflow-x:auto; min-width:0; flex:1; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.admin-nav::-webkit-scrollbar { display:none; }
.admin-nav a { display:flex; align-items:center; gap:8px; flex-shrink:0; padding:11px 15px; border-radius:8px 8px 0 0; font-size:14px; font-weight:500; white-space:nowrap; color:#cbd5e1; text-decoration:none; transition:background .15s,color .15s; }
.admin-nav a:hover { color:#fff; background:#1e293b; }
.admin-nav a.is-active { color:#0f172a; background:#f1f5f9; font-weight:600; }
.admin-nav svg { width:16px; height:16px; flex-shrink:0; }
.admin-nav-arrow { color:#cbd5e1; width:30px; border:0; background:#0f172a; cursor:pointer; flex-shrink:0; }
.admin-nav-arrow[hidden] { display:none; }
.admin-nav-arrow:disabled { opacity:.25; cursor:default; }
.admin-nav-arrow svg { width:16px; height:16px; margin:auto; }
.admin-shell :is(a,button,input,select,textarea,summary):focus-visible { outline:2px solid #818cf8; outline-offset:3px; }
.admin-content { padding-top:28px; padding-bottom:36px; }
.admin-page-heading { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:24px; }
.admin-page-heading h1 { font-size:20px; font-weight:700; line-height:1.4; letter-spacing:-.02em; margin:0; }
.admin-page-heading p { color:var(--admin-muted); font-size:14px; margin:5px 0 0; }
.admin-shell .rv-card { border-radius:12px; border:1px solid var(--admin-border); box-shadow:0 1px 2px #0f172a05; }
.admin-shell .rv-table th { padding:12px 16px; font-weight:600; letter-spacing:.04em; }
.admin-shell .rv-table td { padding:15px 16px; }
.admin-shell .rv-table tbody tr:hover { background:#f8fafc; }
.admin-shell .rv-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; font-weight:600; transition:filter .15s; }
.admin-shell .rv-btn svg { width:16px; height:16px; }
.admin-shell .rv-input { min-height:42px; }
.admin-shell .rv-input[type=color] { padding:4px; }
.admin-shell details { scroll-margin-top:145px; }
.admin-stat { padding:20px; min-width:0; }
.admin-stat-label { display:flex; align-items:center; gap:8px; font-size:12px; color:#64748b; }
.admin-stat-label svg { width:16px; height:16px; color:#94a3b8; flex-shrink:0; }
.admin-stat-value { font-size:clamp(20px,2.2vw,28px); font-weight:700; letter-spacing:-.025em; margin-top:12px; overflow-wrap:anywhere; }
.admin-super-layout { display:flex; flex-direction:column; height:100dvh; min-height:0; overflow:hidden; }
.admin-shell #superadmin-main { background:var(--admin-bg); width:100%; min-height:0; }
.admin-shell #superadmin-content { --sa-page-max:76.2rem; padding:28px max(1.5rem,calc((100vw - 76.2rem)/2)); }
.admin-shell #superadmin-content > .admin-page-heading { margin-bottom:24px; }
.admin-shell #superadmin-content > .sa-page-wide { max-width:100%; }
html.superadmin-embedded .admin-header,html.superadmin-embedded .admin-page-heading { display:none; }
html.superadmin-embedded .admin-shell #superadmin-content { padding:1rem; }
.dark .admin-shell { --admin-bg:#0f172a; --admin-border:#334155; --admin-muted:#94a3b8; --admin-text:#e2e8f0; }
.dark .admin-shell .admin-nav a.is-active { background:#1e293b; color:#fff; }
.dark .admin-shell .admin-page-heading h1 { color:#f8fafc; }
@media(max-width:640px) {
 .admin-container { padding-inline:12px; }
 .admin-brand-row { min-height:68px; gap:8px; }
 .admin-brand-caption { font-size:11px; }
 .admin-brand img { max-width:145px; }
 .admin-user { display:none; }
 .admin-action { padding:9px; }
 .admin-nav a { padding:11px 12px; font-size:13px; }
 .admin-nav-arrow { width:24px; }
 .admin-content { padding-top:20px; }
 .admin-page-heading { margin-bottom:20px; }
 .admin-page-heading h1 { font-size:18px; }
 .admin-stat { padding:16px; }
 .admin-shell #superadmin-content { padding:20px 12px; }
 .admin-shell .rv-card .text-2xl { font-size:20px; overflow-wrap:anywhere; }
}
@media(prefers-reduced-motion:reduce) { .admin-shell * { scroll-behavior:auto!important; transition:none!important; } }

/* Match WL gutters even when legacy superadmin mobile rules are present. */
.admin-shell #superadmin-topbar { padding:0; }
.admin-shell .admin-nav-arrow { padding:0; }
.admin-shell .admin-brand-caption { white-space:nowrap; }
@media(max-width:420px) { .admin-shell #superadmin-topbar .admin-actions a[href="/logout"] span { display:none; } }

/* Views that already provide a page heading keep their own title and subtitle. */
.admin-shell #superadmin-content:has(> :not(.admin-page-heading):not(.fixed) h1) > .admin-page-heading { display:none; }
.dark .admin-shell #superadmin-content :is(.pt-card,.pt-panel) { background:#1e293b; border-color:#334155; }
.dark .admin-shell #superadmin-content :is(.pt-muted,.pt-head p) { color:#94a3b8; }
