/* Phase 55: final admin readability, dashboard styling, dropdown layering and mobile stability */
html.admin-ui-active { --admin-bg:#07111f; --admin-panel:#ffffff; --admin-ink:#0f172a; --admin-muted:#475569; --admin-line:#dbe4ef; --admin-purple:#6d28d9; --admin-soft:#f8fafc; }
html.admin-ui-active body, body.admin-shell-body { background:var(--admin-bg)!important; color:#e5edf8!important; }
html.admin-ui-active .main-container, html.admin-ui-active .content-wrapper, html.admin-ui-active main, html.admin-ui-active .page-content { background:linear-gradient(180deg,#08111f 0%,#0b1220 100%)!important; color:#e5edf8!important; min-width:0; }
html.admin-ui-active .shell-nav { background:#0b1220!important; border-bottom:1px solid rgba(148,163,184,.18)!important; }
html.admin-ui-active .sidebar, html.admin-ui-active .admin-sidebar { background:#08111f!important; border-right:1px solid rgba(148,163,184,.18)!important; }
html.admin-ui-active .workspace-hero { color:var(--admin-ink)!important; background:radial-gradient(circle at 10% 0%,#efe7ff 0,#fff 38%,#eef5ff 100%)!important; border:1px solid rgba(109,40,217,.16)!important; box-shadow:0 24px 60px rgba(2,6,23,.18)!important; overflow:hidden; }
html.admin-ui-active .workspace-hero::after{content:"";position:absolute;inset:auto -60px -90px auto;width:240px;height:240px;border-radius:999px;background:rgba(109,40,217,.10);pointer-events:none;}
html.admin-ui-active .surface, html.admin-ui-active .surface-card, html.admin-ui-active .metric-tile, html.admin-ui-active .admin-stat-card, html.admin-ui-active .accordion-item, html.admin-ui-active .card, html.admin-ui-active .modal-content { background:#fff!important; color:var(--admin-ink)!important; border:1px solid var(--admin-line)!important; box-shadow:0 18px 45px rgba(2,6,23,.10)!important; }
html.admin-ui-active .surface-muted { background:#f8fafc!important; }
html.admin-ui-active .surface *, html.admin-ui-active .surface-card *, html.admin-ui-active .metric-tile *, html.admin-ui-active .accordion-item *, html.admin-ui-active .card *, html.admin-ui-active .modal-content * { color:inherit; }
html.admin-ui-active .surface h1, html.admin-ui-active .surface h2, html.admin-ui-active .surface h3, html.admin-ui-active .surface h4, html.admin-ui-active .workspace-hero__title, html.admin-ui-active .section-title, html.admin-ui-active .metric-value, html.admin-ui-active .dashboard-card__value { color:var(--admin-ink)!important; }
html.admin-ui-active .surface p, html.admin-ui-active .surface small, html.admin-ui-active .workspace-hero__copy, html.admin-ui-active .section-copy, html.admin-ui-active .text-muted, html.admin-ui-active .metric-tile small { color:var(--admin-muted)!important; opacity:1!important; }
html.admin-ui-active .section-kicker, html.admin-ui-active .workspace-hero__eyebrow, html.admin-ui-active .metric-kicker { color:#5b21b6!important; font-weight:900!important; letter-spacing:.09em!important; text-transform:uppercase!important; }
html.admin-ui-active a:not(.btn):not(.nav-link):not(.shell-link) { color:#5b21b6!important; }
html.admin-ui-active .dashboard-command-grid, html.admin-ui-active .metric-grid { display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:1rem!important; align-items:stretch!important; }
html.admin-ui-active .dashboard-card, html.admin-ui-active .metric-tile { min-height:162px!important; border-radius:24px!important; padding:1.15rem!important; display:flex!important; flex-direction:column!important; justify-content:space-between!important; overflow:hidden!important; }
html.admin-ui-active .dashboard-card__label, html.admin-ui-active .metric-kicker { overflow-wrap:anywhere!important; }
html.admin-ui-active .dashboard-card__trend, html.admin-ui-active .status-pill { display:inline-flex!important; align-items:center!important; justify-content:center!important; gap:.25rem!important; border-radius:999px!important; padding:.25rem .6rem!important; font-weight:800!important; font-size:.78rem!important; line-height:1.2!important; white-space:normal!important; max-width:100%!important; }
html.admin-ui-active .status-pill--paid, html.admin-ui-active .status-pill--success { background:#dcfce7!important; color:#166534!important; }
html.admin-ui-active .status-pill--unpaid, html.admin-ui-active .status-pill--warning { background:#fef3c7!important; color:#92400e!important; }
html.admin-ui-active .status-pill--danger { background:#fee2e2!important; color:#991b1b!important; }
html.admin-ui-active .status-pill--neutral { background:#e5e7eb!important; color:#374151!important; }
html.admin-ui-active .table-shell, html.admin-ui-active .table-responsive { border-radius:18px!important; border:1px solid #e2e8f0!important; background:#fff!important; overflow-x:auto!important; overflow-y:visible!important; }
html.admin-ui-active table.table { margin:0!important; color:var(--admin-ink)!important; background:#fff!important; min-width:780px; }
html.admin-ui-active table.table thead th { background:#f1f5f9!important; color:#172033!important; border-color:#dbe4ef!important; font-size:.78rem!important; letter-spacing:.05em!important; text-transform:uppercase!important; white-space:nowrap!important; }
html.admin-ui-active table.table tbody td { background:#fff!important; color:#0f172a!important; border-color:#e5e7eb!important; vertical-align:middle!important; }
html.admin-ui-active table.table tbody tr:hover td { background:#faf5ff!important; }
html.admin-ui-active code { background:#f1f5f9!important; color:#581c87!important; border-radius:8px!important; padding:.15rem .35rem!important; white-space:normal!important; }
html.admin-ui-active .form-control, html.admin-ui-active .form-select, html.admin-ui-active textarea, html.admin-ui-active input[type="text"], html.admin-ui-active input[type="email"], html.admin-ui-active input[type="number"], html.admin-ui-active input[type="search"], html.admin-ui-active input[type="password"] { background:#fff!important; color:#0f172a!important; border:1px solid #cbd5e1!important; box-shadow:none!important; }
html.admin-ui-active .form-control:focus, html.admin-ui-active .form-select:focus { border-color:#7c3aed!important; box-shadow:0 0 0 .2rem rgba(124,58,237,.16)!important; }
html.admin-ui-active .select2-container .select2-selection { background:#fff!important; color:#0f172a!important; border:1px solid #cbd5e1!important; min-height:42px!important; }
html.admin-ui-active .select2-container .select2-selection__rendered { color:#0f172a!important; line-height:40px!important; }
html.admin-ui-active .select2-dropdown { z-index:99999!important; background:#fff!important; color:#0f172a!important; border-color:#cbd5e1!important; }
html.admin-ui-active .dropdown-menu { z-index:12000!important; background:#fff!important; color:#0f172a!important; border:1px solid #dbe4ef!important; box-shadow:0 20px 55px rgba(2,6,23,.22)!important; }
html.admin-ui-active .dropdown-item { color:#0f172a!important; white-space:normal!important; }
html.admin-ui-active .dropdown-item:hover, html.admin-ui-active .dropdown-item:focus { background:#f3e8ff!important; color:#581c87!important; }
html.admin-ui-active .manage-action-cell, html.admin-ui-active td:last-child { overflow:visible!important; position:relative!important; }
html.admin-ui-active .table .btn-group, html.admin-ui-active .table .dropdown { position:static!important; }
html.admin-ui-active .table .dropdown-menu { min-width:220px!important; }
html.admin-ui-active .admin-inline-form { display:grid!important; grid-template-columns:minmax(135px,180px) minmax(210px,1fr) auto!important; gap:.5rem!important; align-items:center!important; min-width:520px!important; }
html.admin-ui-active .tox-tinymce { border:1px solid #cbd5e1!important; border-radius:14px!important; overflow:hidden!important; background:#fff!important; }
html.admin-ui-active .tox .tox-edit-area__iframe { background:#fff!important; }
html.admin-ui-active .support-pin-admin-card, html.admin-ui-active .pin-verify-panel { background:#fff7ed!important; color:#7c2d12!important; border:1px solid #fed7aa!important; border-radius:16px!important; padding:.85rem 1rem!important; }
html.admin-ui-active .admin-nav-tabs, html.admin-ui-active .admin-module-nav { display:flex!important; gap:.5rem!important; overflow-x:auto!important; padding-bottom:.4rem!important; scrollbar-width:thin; }
html.admin-ui-active .admin-nav-tabs a, html.admin-ui-active .admin-module-nav a { flex:0 0 auto!important; }
@media(max-width:1200px){ html.admin-ui-active .dashboard-command-grid, html.admin-ui-active .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;} }
@media(max-width:768px){ html.admin-ui-active .dashboard-command-grid, html.admin-ui-active .metric-grid{grid-template-columns:1fr!important;} html.admin-ui-active .workspace-hero{border-radius:20px!important;padding:1.1rem!important;} html.admin-ui-active .workspace-hero__actions{width:100%!important;display:grid!important;grid-template-columns:1fr!important;} html.admin-ui-active .surface-head{gap:1rem!important;align-items:flex-start!important;flex-direction:column!important;} html.admin-ui-active table.table{min-width:680px;} html.admin-ui-active .admin-inline-form{grid-template-columns:1fr!important;min-width:0!important;} }
