        :root {
            --bg-1: #dfe9f3;
            --bg-2: #f5e6d3;
            --bg-3: #cfe7d8;
            --bg-4: #bfd9e6;
            --ink: #0f1720;
            --ink-2: #3a4452;
            --muted: #6b7480;
            --line: rgba(15, 23, 32, 0.08);
            --glass: rgba(255, 255, 255, 0.55);
            --glass-2: rgba(255, 255, 255, 0.35);
            --accent: #1f2a37;
            --shadow: 0 20px 60px rgba(20, 30, 50, 0.12), 0 2px 8px rgba(20, 30, 50, 0.06);
        }
        * {
            box-sizing: border-box;
        }
        /* Scoped for index.html — do not style global body */
        .dsa-portal-page {
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
            color: var(--ink);
            background:
                radial-gradient(1100px 700px at 85% 10%, #f3e3cf 0%, transparent 60%),
                radial-gradient(900px 700px at 10% 90%, #cfe1f0 0%, transparent 55%),
                radial-gradient(900px 600px at 90% 90%, #bfe1d4 0%, transparent 60%),
                linear-gradient(135deg, #e9eef3, #dde6ee);
            min-height: calc(100vh - 56px);
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 28px 16px 48px;
            -webkit-font-smoothing: antialiased;
            box-sizing: border-box;
        }
        /* Standalone admin.html — use nearly full viewport width */
        .dsa-portal-page--admin {
            align-items: stretch;
            justify-content: flex-start;
            padding: 12px 14px 40px;
        }
        .shell {
            width: 100%;
            max-width:460px;
            display: flex;
            flex-direction: column;
            gap:18px;
        }
        .head{
            padding:4px 4px 0;
        }
        .eyebrow {
            font-size: 11px;
            letter-spacing: 0.18em;
            font-weight: 600;
            color: var(--muted);
            text-transform: uppercase;
            margin-bottom: 10px;
        }
        h1 {
            font-size: 40px;
            margin: 0 0 10px;
            letter-spacing: -0.02em;
            line-height: 1;
        }
        .lede {
            color: var(--ink-2);
            font-size: 14px;
            line-height: 1.5;
            margin: 0;
        }
        .seg {
            display: grid;
            grid-template-columns: 1fr 1fr;
            background: var(--glass-2);
            backdrop-filter: blur(20px) saturate(140%);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 4px;
        }
        .seg button {
            border: 0;
            background: transparent;
            padding: 10px 14px;
            font-size: 13.5px;
            font-weight: 600;
            color: var(--ink-2);
            border-radius: 10px;
            cursor: pointer;
        }
        .seg button.active {
            background: #fff;
            color: var(--ink);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
        }
        .card {
            background: var(--glass);
            backdrop-filter: blur(28px) saturate(160%);
            -webkit-backdrop-filter: blur(28px) saturate(160%);
            border: 1px solid rgba(255, 255, 255, 0.7);
            border-radius: 22px;
            padding: 22px;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }
        .card::before{
            content:"";
            position:absolute; inset:0;
            background:linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0) 40%);
            pointer-events:none;
        }
        .card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
        }
        .card-title {
            font-size: 18px;
            font-weight: 700;
        }
        .toggle-link {
            font-size: 12.5px;
            color: var(--muted);
            cursor: pointer;
            user-select: none;
        }
        .helper {
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
            margin: 0 0 16px;
        }
        .field {
            position: relative;
            margin-bottom: 10px;
        }
        .field input, .cms-form input, .cms-toolbar select, .cms-editor {
            width: 100%;
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid rgba(15, 23, 32, 0.08);
            border-radius: 14px;
            font-family: inherit;
            color: var(--ink);
        }
        .field input {
            height: 54px;
            padding: 18px 50px 6px 16px;
            font-size: 15px;
            outline: none;
        }
        .field label {
            position: absolute;
            left: 16px;
            top: 17px;
            font-size: 14px;
            color: var(--muted);
            pointer-events: none;
            transition: 0.18s ease;
        }
        .field input:focus + label,
        .field input:not(:placeholder-shown) + label {
            top: 8px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .icon {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 0;
            background: var(--accent);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        .row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 6px 2px 14px;
            font-size: 12.5px;
            color: var(--muted);
        }
        .row a{
            color:var(--ink-2);
            text-decoration:none;
            font-weight:600;
        }
        .cta, .btn {
            width: 100%;
            height: 50px;
            border: 0;
            border-radius: 14px;
            background: linear-gradient(180deg, #2a3442, #0f1720);
            color: #fff;
            font-size: 14.5px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
        }
        .cta{
            display:flex;
            align-items:center;
            justify-content:center;
            gap:8px;
            box-shadow:0 8px 22px rgba(15,23,32,.25), inset 0 1px 0 rgba(255,255,255,.12);
        }
        .btn.ghost {
            background: #fff;
            color: var(--ink-2);
            border: 1px solid var(--line);
            height: 42px;
        }
        .steps {
            display: flex;
            gap: 6px;
            margin-bottom: 14px;
        }
        .steps span {
            height: 3px;
            flex: 1;
            background: rgba(15, 23, 32, 0.08);
            border-radius: 2px;
        }
        .steps span.on {
            background: var(--ink);
        }
        .or{
            display:flex; align-items:center; gap:10px;
            color:var(--muted); font-size:11.5px; font-weight:600;
            letter-spacing:.16em;
            margin:18px 0;
            text-transform:uppercase;
        }
        .or::before, .or::after{
            content:""; flex:1; height:1px;
            background:linear-gradient(90deg, transparent, rgba(15,23,32,.14), transparent);
        }
        .alt{
            display:grid;
            grid-template-columns:1fr 1fr;
            gap:8px;
        }
        .alt button{
            height:44px;
            border-radius:12px;
            border:1px solid var(--line);
            background:rgba(255,255,255,.6);
            font-size:13px;
            font-weight:600;
            color:var(--ink-2);
            cursor:pointer;
            font-family:inherit;
            display:flex;align-items:center;justify-content:center;gap:8px;
            transition:.2s;
        }
        .alt svg{width:15px;height:15px}
        .foot{
            text-align:center;
            color:var(--muted);
            font-size:11.5px;
            margin-top:6px;
            line-height:1.5;
        }
        .foot a{color:var(--ink-2); text-decoration:none; font-weight:600}
        .account-site-admin-foot {
            text-align: center;
            margin: 14px 0 0;
            padding-top: 12px;
            border-top: 1px solid var(--line);
            font-size: 12px;
        }
        .account-site-admin-link {
            color: var(--ink-2);
            font-weight: 600;
            text-decoration: none;
        }
        .account-site-admin-link:hover {
            color: var(--ink);
            text-decoration: underline;
        }
        .sparkle{
            position:absolute;
            right:16px; bottom:16px;
            color:rgba(15,23,32,.4);
        }
        .status {
            margin: 10px 2px 0;
            font-size: 13px;
        }
        .status.ok { color: #057a55; }
        .status.err { color: #b42318; }
        .meta-line {
            margin: 0 0 8px;
            font-size: 13px;
            color: var(--ink-2);
        }
        /* #portal-panel-cms: visible on standalone admin.html (do not hide globally). */
        .cms-form { display: grid; gap: 10px; margin-top: 12px; }
        .cms-form input { padding: 14px; }
        .cms-tabs { display: flex; gap: 8px; margin-top: 8px; }
        .cms-tabs button {
            border: 1px solid var(--line);
            background: #fff;
            border-radius: 10px;
            padding: 8px 12px;
            font-weight: 600;
            cursor: pointer;
        }
        .cms-tabs button.active { background: #101820; color: #fff; }
        .cms-toolbar { display: grid; gap: 8px; margin-bottom: 10px; }
        .cms-toolbar select { padding: 10px; height: 44px; }
        .cms-editor { min-height: 260px; padding: 12px; resize: vertical; }
        .shell.shell--admin {
            width: 100%;
            max-width: min(1760px, calc(100vw - 28px));
            align-self: flex-start;
            margin-top: 4px;
            font-size: 15px;
        }
        .shell.shell--admin .adm-dashboard {
            font-size: inherit;
        }
        .shell.shell--admin .adm-topbar h2 {
            font-size: 1.55rem;
        }
        .adm-hidden {
            display: none !important;
        }
        .adm-content-editor-wrap {
            margin-bottom: 16px;
        }
        .adm-content-editor-wrap .cms-editor {
            width: 100%;
            min-height: 280px;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 12px;
            line-height: 1.45;
        }
        [data-adm-panel="content-json"] .cms-editor {
            width: 100%;
            min-height: 320px;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 12px;
            line-height: 1.45;
        }
        .adm-graph-preview.graph-card .graph-stage {
            min-height: min(72vh, 820px);
        }
        .adm-content-graph-wrap {
            margin: 16px 0 20px;
        }
        .adm-content-graph-wrap .dsa-graph-shell.dsa-index-ref {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .adm-content-graph-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px 18px;
            margin: 0 !important;
            padding: 12px 16px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 246, 0.96) 100%);
            box-shadow: 0 10px 28px rgba(15, 23, 32, 0.07);
        }
        .adm-graph-toolbar-extras {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            flex: 0 1 auto;
            max-width: 100%;
        }
        .adm-graph-toolbar-map-host {
            flex: 1 1 280px;
            min-width: 0;
        }
        /* Admin preview: no inline hint — expand/collapse left, zoom right, single row */
        .adm-graph-toolbar-map-host .dsa-graph-map-toolbar {
            flex-wrap: nowrap;
            align-items: center;
            justify-content: flex-start;
            gap: 10px 14px;
        }
        .adm-graph-toolbar-map-host .dsa-graph-map-toolbar-cluster {
            flex-shrink: 0;
            display: inline-flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: center;
        }
        .adm-graph-toolbar-map-host .dsa-graph-map-toolbar-cluster--zoom {
            margin-left: auto;
        }
        .adm-graph-toolbar-map-host .dsa-graph-expand-btn {
            flex: 0 0 auto;
            white-space: nowrap;
        }
        @media (max-width: 520px) {
            .adm-graph-toolbar-map-host .dsa-graph-map-toolbar {
                flex-wrap: wrap;
            }
            .adm-graph-toolbar-map-host .dsa-graph-map-toolbar-cluster--zoom {
                margin-left: 0;
            }
        }
        .adm-graph-tbar-btn {
            flex: 0 0 auto;
        }
        .adm-inline-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--ink-2, #334155);
            margin-right: 8px;
        }
        .adm-select-sm {
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid var(--line);
            font-size: 13px;
            background: #fff;
        }
        .adm-users-toolbar {
            gap: 8px;
            align-items: center;
        }
        .adm-details {
            margin: 12px 0;
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.5);
        }
        .adm-details summary {
            cursor: pointer;
            font-weight: 600;
            font-size: 13px;
        }
        .adm-json-snippet {
            margin: 0;
            padding: 8px;
            font-size: 11px;
            overflow: auto;
            max-height: 140px;
            background: rgba(15, 23, 32, 0.04);
            border-radius: 8px;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .adm-dashboard {
            position: relative;
            z-index: 1;
        }
        .adm-topbar {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 16px;
        }
        .adm-topbar-copy {
            flex: 1 1 240px;
            min-width: 0;
        }
        .adm-topbar h2 {
            margin: 0;
            font-size: 22px;
            font-weight: 700;
            letter-spacing: -0.02em;
        }
        .adm-topbar p,
        .adm-topbar-blurb {
            margin: 4px 0 0;
            font-size: 13px;
            color: var(--muted);
            max-width: min(640px, 100%);
            line-height: 1.45;
        }
        .adm-topbar-blurb:empty {
            display: none;
        }
        .adm-topbar-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }
        .adm-badge {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(5, 122, 85, 0.12);
            color: #046c4e;
            border: 1px solid rgba(5, 122, 85, 0.25);
        }
        .adm-nav-main {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 4px;
            background: rgba(255, 255, 255, 0.45);
            border: 1px solid var(--line);
            border-radius: 14px;
            margin-bottom: 18px;
        }
        .adm-nav-main button {
            border: 0;
            background: transparent;
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-2);
            border-radius: 10px;
            cursor: pointer;
            font-family: inherit;
        }
        .adm-nav-main button:hover {
            background: rgba(255, 255, 255, 0.7);
            color: var(--ink);
        }
        .adm-nav-main button.active {
            background: #101820;
            color: #fff;
            box-shadow: 0 2px 8px rgba(15, 23, 32, 0.12);
        }
        .adm-pane {
            min-height: 120px;
        }
        .adm-pane-head {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 12px;
        }
        .adm-pane-head h3 {
            margin: 0;
            font-size: 15px;
            font-weight: 700;
        }
        .adm-seg {
            display: inline-flex;
            padding: 3px;
            background: rgba(255, 255, 255, 0.55);
            border: 1px solid var(--line);
            border-radius: 10px;
            gap: 2px;
        }
        .adm-seg button {
            border: 0;
            background: transparent;
            padding: 7px 12px;
            font-size: 12px;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            color: var(--ink-2);
            font-family: inherit;
        }
        .adm-seg button.active {
            background: #fff;
            color: var(--ink);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }
        .adm-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 10px;
            margin-bottom: 16px;
        }
        .adm-stat-card {
            background: rgba(255, 255, 255, 0.55);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 12px 14px;
        }
        .adm-stat-card .lbl {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            color: var(--muted);
            margin-bottom: 6px;
        }
        .adm-stat-card .val {
            font-size: 22px;
            font-weight: 700;
            letter-spacing: -0.02em;
            line-height: 1.1;
        }
        .adm-stat-card .sub {
            font-size: 11px;
            color: var(--muted);
            margin-top: 4px;
        }
        .adm-dash-viz {
            margin: 0 0 20px;
        }
        .adm-viz-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
        }
        .adm-viz-card {
            background: rgba(255, 255, 255, 0.5);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 14px 16px;
        }
        .adm-viz-title {
            margin: 0 0 12px;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--muted);
        }
        .adm-viz-bar-row {
            display: grid;
            grid-template-columns: minmax(72px, 0.35fr) 1fr minmax(28px, auto);
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }
        .adm-viz-bar-row:last-child {
            margin-bottom: 0;
        }
        .adm-viz-bar-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--ink-2);
        }
        .adm-viz-bar-track {
            height: 10px;
            border-radius: 999px;
            background: rgba(15, 23, 32, 0.06);
            overflow: hidden;
        }
        .adm-viz-bar-fill {
            height: 100%;
            border-radius: 999px;
            min-width: 0;
            transition: width 0.35s ease;
        }
        .adm-viz-bar-fill--emerald {
            background: linear-gradient(90deg, #34d399, #059669) !important;
        }
        .adm-viz-bar-val {
            font-size: 12px;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            color: var(--ink);
            text-align: right;
        }
        .adm-viz-muted {
            margin: 0;
            font-size: 12px;
            color: var(--muted);
            line-height: 1.45;
        }
        .adm-viz-foot {
            margin: 12px 0 0;
            font-size: 11px;
            color: var(--muted);
        }
        .adm-viz-fallback {
            margin: 0;
            font-size: 13px;
            color: var(--muted);
        }
        .adm-two-col {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
        }
        @media (min-width: 900px) {
            .adm-two-col {
                grid-template-columns: 1fr 1fr;
            }
        }
        .adm-subcard {
            background: rgba(255, 255, 255, 0.45);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 12px 14px;
        }
        .adm-subcard h4 {
            margin: 0 0 10px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--muted);
        }
        .adm-mini-table-wrap {
            overflow: auto;
            max-height: 220px;
            border-radius: 10px;
            border: 1px solid rgba(15, 23, 32, 0.06);
        }
        .adm-mini-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }
        .adm-mini-table th,
        .adm-mini-table td {
            padding: 6px 8px;
            text-align: left;
            border-bottom: 1px solid rgba(15, 23, 32, 0.06);
        }
        .adm-mini-table th {
            position: sticky;
            top: 0;
            background: rgba(255, 255, 255, 0.95);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--muted);
        }
        .adm-json-input {
            width: 100%;
            min-height: 280px;
            padding: 12px 14px;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 12px;
            line-height: 1.45;
            border-radius: 14px;
            border: 1px solid rgba(15, 23, 32, 0.1);
            background: rgba(255, 255, 255, 0.65);
            color: var(--ink);
            resize: vertical;
            box-sizing: border-box;
        }
        .adm-form-grid {
            display: grid;
            gap: 12px;
        }
        .adm-form-grid.cols-2 {
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        }
        .adm-form-grid.cols-2 .adm-field--span-2 {
            grid-column: 1 / -1;
        }
        .dsa-portal-page--admin .adm-form-grid.cols-2 {
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        }
        .adm-field label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--muted);
            margin-bottom: 5px;
        }
        .adm-field input,
        .adm-field select,
        .adm-field textarea {
            width: 100%;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(15, 23, 32, 0.1);
            background: rgba(255, 255, 255, 0.75);
            font-family: inherit;
            font-size: 14px;
            color: var(--ink);
            box-sizing: border-box;
        }
        .adm-field textarea {
            min-height: 88px;
            resize: vertical;
            font-family: ui-monospace, monospace;
            font-size: 12px;
        }
        .adm-field input:read-only {
            opacity: 0.85;
            background: rgba(15, 23, 32, 0.04);
        }
        .adm-field code {
            font-size: 0.92em;
        }
        .adm-field-hint {
            margin: 6px 0 0;
            font-size: 12px;
            color: var(--muted);
            line-height: 1.45;
        }
        .adm-user-editor-title {
            margin: 0 0 14px;
            font-size: 1.05rem;
            font-weight: 700;
        }
        .adm-user-form-section {
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid var(--line);
        }
        .adm-user-form-section:first-of-type {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }
        .adm-user-form-heading {
            margin: 0 0 12px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            color: var(--muted);
        }
        .adm-textarea-code {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 13px;
            line-height: 1.45;
        }
        .adm-textarea-prose {
            font-family: inherit;
            font-size: 15px;
            line-height: 1.5;
            min-height: 96px;
        }
        .adm-textarea-tall {
            min-height: 132px;
        }
        .dsa-portal-page--admin .adm-field input,
        .dsa-portal-page--admin .adm-field select,
        .dsa-portal-page--admin .adm-field textarea {
            padding: 12px 14px;
            font-size: 15px;
        }
        .dsa-portal-page--admin .adm-field textarea.adm-textarea-code {
            font-size: 13px;
        }
        .adm-user-save-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            margin-top: 18px;
        }
        .adm-toolbar-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            margin-bottom: 12px;
        }
        .adm-toolbar-row input[type="search"] {
            flex: 1;
            min-width: 180px;
            padding: 10px 14px;
            border-radius: 12px;
            border: 1px solid rgba(15, 23, 32, 0.1);
            background: rgba(255, 255, 255, 0.75);
            font-family: inherit;
        }
        .adm-users-layout {
            display: grid;
            grid-template-columns: 1fr;
            gap: 14px;
        }
        @media (min-width: 860px) {
            .adm-users-layout {
                grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
                align-items: start;
            }
        }
        .admin-table-wrap {
            overflow: auto;
            max-height: min(56vh, 480px);
            border: 1px solid var(--line);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.35);
        }
        .dsa-portal-page--admin .admin-table-wrap {
            max-height: min(62vh, 640px);
        }
        table.admin-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .admin-table th,
        .admin-table td {
            padding: 8px 10px;
            text-align: left;
            border-bottom: 1px solid var(--line);
            vertical-align: middle;
        }
        .admin-table th {
            position: sticky;
            top: 0;
            background: rgba(255, 255, 255, 0.94);
            z-index: 1;
            font-weight: 700;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--muted);
        }
        .admin-table tbody tr {
            cursor: pointer;
        }
        .admin-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.5);
        }
        .admin-table tbody tr.adm-row-selected {
            background: rgba(31, 42, 55, 0.08);
        }
        .btn-inline {
            width: auto;
            min-width: 0;
            height: 40px;
            padding: 0 16px;
        }
        .btn-sm {
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 10px;
            height: auto;
            width: auto;
            min-width: 0;
        }
        .adm-kv-row {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            padding: 12px;
            margin-bottom: 10px;
            background: rgba(255, 255, 255, 0.45);
            border: 1px solid var(--line);
            border-radius: 14px;
        }
        @media (min-width: 640px) {
            .adm-kv-row {
                grid-template-columns: minmax(120px, 0.35fr) 1fr auto;
                align-items: start;
            }
        }
        .adm-kv-row-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .adm-content-summary {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 10px;
            margin-bottom: 14px;
        }
        .cms-editor {
            min-height: 280px;
        }
        .cms-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .cms-actions .btn,
        .cms-actions .btn.ghost {
            flex: 1;
            min-width: 120px;
            height: 44px;
        }
        /* Admin session bar: brand, RSA, feature rail (live + coming soon), sign out */
        .admin-session-bar {
            width: 100%;
            margin-bottom: 14px;
        }
        .admin-session-bar-inner {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 12px 14px 14px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.55);
            backdrop-filter: blur(20px) saturate(140%);
            -webkit-backdrop-filter: blur(20px) saturate(140%);
        }
        .admin-session-row--primary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px 16px;
            flex-wrap: wrap;
        }
        .admin-session-brand-row {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }
        .admin-session-brand {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            text-decoration: none;
            border-radius: 10px;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }
        .admin-session-brand:hover {
            opacity: 0.92;
            transform: scale(1.02);
        }
        .admin-session-brand-mark {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 10px;
            background: linear-gradient(135deg, #1e293b, #0f172a);
            color: #fff;
            font-size: 14px;
            font-weight: 700;
        }
        .admin-session-titles {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }
        .admin-session-product {
            font-size: 15px;
            font-weight: 700;
            letter-spacing: -0.02em;
            color: var(--ink);
            line-height: 1.2;
        }
        .admin-session-sub {
            font-size: 12px;
            font-weight: 600;
            color: var(--muted, #64748b);
            line-height: 1.3;
        }
        .admin-session-end {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-left: auto;
        }
        .admin-session-rsa {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }
        .admin-session-rsa--live {
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.01em;
            text-transform: none;
            color: #065f46;
            padding: 8px 14px 8px 10px;
            border-radius: 999px;
            border: 1px solid rgba(16, 185, 129, 0.5);
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 55%, #a7f3d0 160%);
            box-shadow:
                0 1px 2px rgba(16, 185, 129, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.7);
        }
        .admin-session-rsa-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #059669;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
            flex-shrink: 0;
            animation: adm-rsa-pulse 2.2s ease-in-out infinite;
        }
        @keyframes adm-rsa-pulse {
            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.75;
                transform: scale(0.92);
            }
        }
        @media (prefers-reduced-motion: reduce) {
            .admin-session-rsa-dot {
                animation: none;
            }
        }
        .admin-session-icon-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            padding: 0;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.75);
            color: var(--ink-2);
            cursor: pointer;
            font-family: inherit;
            flex-shrink: 0;
            transition:
                background 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease,
                transform 0.15s ease;
        }
        .admin-session-icon-btn:hover:not(:disabled) {
            background: #fff;
            color: var(--ink);
            border-color: rgba(15, 23, 32, 0.14);
        }
        .admin-session-icon-btn:active:not(:disabled) {
            transform: scale(0.96);
        }
        .admin-session-icon-btn:disabled {
            opacity: 0.42;
            cursor: not-allowed;
        }
        .admin-session-icon-btn--reload:hover:not(:disabled) {
            color: #059669;
            border-color: rgba(16, 185, 129, 0.45);
            background: rgba(236, 253, 245, 0.9);
        }
        .admin-session-icon-svg {
            display: block;
        }
        .adm-dash-inline-reload {
            width: 42px;
            height: 42px;
        }
        .admin-session-features {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-top: 12px;
            border-top: 1px solid var(--line);
        }
        .admin-session-pill-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }
        .admin-session-pill {
            appearance: none;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.65);
            color: var(--ink-2);
            font-size: 12px;
            font-weight: 600;
            font-family: inherit;
            padding: 7px 12px;
            border-radius: 999px;
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        }
        .admin-session-pill:hover {
            background: #fff;
            color: var(--ink);
        }
        .admin-session-pill.active {
            background: var(--ink);
            color: #fff;
            border-color: var(--ink);
        }
        .admin-session-pill--soon:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            background: rgba(255, 255, 255, 0.35);
            color: var(--muted, #64748b);
            border-style: dashed;
        }
        .admin-session-pill-gap {
            width: 1px;
            height: 22px;
            margin: 0 4px;
            background: var(--line);
            flex-shrink: 0;
        }
        .admin-session-bar .nav-auth {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .admin-session-bar .nav-signout-btn {
            padding: 8px 14px;
            font-size: 13px;
            font-weight: 600;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.65);
            color: var(--ink-2);
            cursor: pointer;
            font-family: inherit;
        }
        .admin-session-bar .nav-signout-btn:hover {
            background: #fff;
            color: var(--ink);
        }
        .account-nav-back {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            align-self: flex-start;
            margin-bottom: 4px;
            padding: 8px 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-2);
            text-decoration: none;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.55);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            transition: background 0.2s ease, color 0.2s ease;
        }
        .account-nav-back:hover {
            background: #fff;
            color: var(--ink);
        }

        /* Theme toggle (admin header) */
        .admin-theme-toggle {
            display: inline-flex;
            padding: 3px;
            border-radius: 11px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.5);
            gap: 2px;
        }
        .admin-theme-btn {
            appearance: none;
            border: 0;
            margin: 0;
            padding: 7px 12px;
            font-size: 12px;
            font-weight: 700;
            font-family: inherit;
            border-radius: 8px;
            cursor: pointer;
            color: var(--ink-2);
            background: transparent;
            transition: background 0.18s ease, color 0.18s ease;
        }
        .admin-theme-btn:hover {
            color: var(--ink);
            background: rgba(255, 255, 255, 0.65);
        }
        .admin-theme-btn.active {
            background: var(--ink);
            color: #fff;
        }

        /* Role / plan / status — taller, clearer selects */
        .adm-field select.adm-select-enhanced,
        select.adm-select-enhanced {
            min-height: 48px;
            padding: 12px 40px 12px 14px;
            font-size: 15px;
            font-weight: 600;
            line-height: 1.25;
            appearance: none;
            background-color: rgba(255, 255, 255, 0.92);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233a4452' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            cursor: pointer;
        }
        .adm-field select.adm-select-enhanced:focus,
        select.adm-select-enhanced:focus {
            outline: 2px solid rgba(15, 23, 32, 0.2);
            outline-offset: 1px;
        }

        .adm-user-danger-zone {
            border-radius: 12px;
            padding: 14px 16px;
            border: 1px solid rgba(185, 28, 28, 0.35);
            background: rgba(254, 242, 242, 0.55);
        }
        .adm-btn-danger {
            background: #b91c1c !important;
            color: #fff !important;
            border: 1px solid #991b1b !important;
            font-weight: 700;
        }
        .adm-btn-danger:hover {
            background: #991b1b !important;
            filter: brightness(1.05);
        }

        /* ——— Dark theme (admin only; toggled via html[data-admin-theme="dark"]) ——— */
        html[data-admin-theme="dark"] {
            --ink: #e8eaef;
            --ink-2: #b4bcc6;
            --muted: #8b95a3;
            --line: rgba(255, 255, 255, 0.12);
            --glass: rgba(28, 32, 40, 0.78);
            --glass-2: rgba(18, 22, 28, 0.55);
            --accent: #d1d5db;
            --shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);
        }
        html[data-admin-theme="dark"] .dsa-portal-page--admin {
            background:
                radial-gradient(1000px 640px at 88% 8%, #2c2418 0%, transparent 58%),
                radial-gradient(820px 600px at 8% 92%, #152028 0%, transparent 55%),
                radial-gradient(900px 560px at 92% 88%, #14261c 0%, transparent 58%),
                linear-gradient(145deg, #14181e, #0c0f14);
        }
        html[data-admin-theme="dark"] .card {
            background: var(--glass);
            border-color: rgba(255, 255, 255, 0.1);
        }
        html[data-admin-theme="dark"] .card::before {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%);
        }
        html[data-admin-theme="dark"] .head .lede,
        html[data-admin-theme="dark"] .helper {
            color: var(--muted);
        }
        html[data-admin-theme="dark"] .admin-session-bar-inner {
            background: rgba(22, 26, 32, 0.92);
            border-color: var(--line);
        }
        html[data-admin-theme="dark"] .admin-session-pill {
            background: rgba(255, 255, 255, 0.06);
            color: var(--ink-2);
            border-color: var(--line);
        }
        html[data-admin-theme="dark"] .admin-session-pill:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--ink);
        }
        html[data-admin-theme="dark"] .admin-session-pill.active {
            background: #e8eaef;
            color: #0f1218;
            border-color: #e8eaef;
        }
        html[data-admin-theme="dark"] .admin-theme-toggle {
            background: rgba(255, 255, 255, 0.06);
            border-color: var(--line);
        }
        html[data-admin-theme="dark"] .admin-theme-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        html[data-admin-theme="dark"] .admin-theme-btn.active {
            background: #e8eaef;
            color: #0f1218;
        }
        html[data-admin-theme="dark"] .admin-session-icon-btn {
            background: rgba(255, 255, 255, 0.08);
            color: var(--ink-2);
            border-color: var(--line);
        }
        html[data-admin-theme="dark"] .admin-session-icon-btn:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.14);
            color: var(--ink);
        }
        html[data-admin-theme="dark"] .admin-session-bar .nav-signout-btn {
            background: rgba(255, 255, 255, 0.08);
            color: var(--ink-2);
            border-color: var(--line);
        }
        html[data-admin-theme="dark"] .admin-session-bar .nav-signout-btn:hover {
            background: rgba(255, 255, 255, 0.14);
            color: var(--ink);
        }
        html[data-admin-theme="dark"] .adm-subcard,
        html[data-admin-theme="dark"] .adm-kv-row,
        html[data-admin-theme="dark"] .admin-table-wrap,
        html[data-admin-theme="dark"] .adm-content-graph-toolbar {
            background: rgba(255, 255, 255, 0.04);
            border-color: var(--line);
        }
        html[data-admin-theme="dark"] .admin-table th {
            background: rgba(20, 24, 30, 0.96);
            color: var(--muted);
        }
        html[data-admin-theme="dark"] .admin-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.06);
        }
        html[data-admin-theme="dark"] .admin-table tbody tr.adm-row-selected {
            background: rgba(96, 165, 250, 0.12);
        }
        html[data-admin-theme="dark"] .adm-field input,
        html[data-admin-theme="dark"] .adm-field select,
        html[data-admin-theme="dark"] .adm-field textarea {
            background: rgba(12, 14, 18, 0.65);
            border-color: rgba(255, 255, 255, 0.12);
            color: var(--ink);
        }
        html[data-admin-theme="dark"] .adm-field input:read-only {
            background: rgba(255, 255, 255, 0.05);
        }
        html[data-admin-theme="dark"] select.adm-select-enhanced {
            background-color: rgba(12, 14, 18, 0.75);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b4bcc6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        }
        html[data-admin-theme="dark"] .adm-json-input {
            background: rgba(12, 14, 18, 0.65);
            border-color: rgba(255, 255, 255, 0.12);
            color: var(--ink);
        }
        html[data-admin-theme="dark"] .adm-user-danger-zone {
            background: rgba(127, 29, 29, 0.2);
            border-color: rgba(248, 113, 113, 0.35);
        }
        html[data-admin-theme="dark"] .adm-content-graph-toolbar {
            background: linear-gradient(180deg, rgba(32, 36, 44, 0.95) 0%, rgba(22, 26, 32, 0.92) 100%);
        }
