 /* ============================================================
   UBCG Admin — admin.css
   Self-contained admin design system. Reuses public design
   tokens (slate + burgundy + yellow) so admin feels on-brand.
   ============================================================ */

        :root {
            /* Brand */
            --ink: #233e50;
            --ink-2: #2d4a60;
            --ink-3: #8499a7;
            --ink-4: #b5c0cb;
            --bg: #ffffff;
            --bg-soft: #f6f4ee;
            --bg-darker: #233e50;
            --bg-sidebar: #1a2e3c;
            --bg-sidebar-2: #152432;
            --line: #e3ddd2;
            --line-soft: #efeae0;
            --line-sb: rgba(255, 255, 255, 0.07);
            --cta: #9b0047;
            --cta-dark: #7a0038;
            --cta-50: #fbeef3;
            --cta-100: #f6dde8;
            --yellow: #ffc83d;
            --yellow-soft: #fff4d1;
            --green: #0d9d6b;
            --green-soft: #e3f6ee;
            --red: #d93b41;
            --red-soft: #fde7e7;

            --shadow-sm: 0 1px 2px rgba(35, 62, 80, 0.05);
            --shadow-md: 0 4px 18px rgba(35, 62, 80, 0.10);
            --shadow-lg: 0 10px 40px rgba(35, 62, 80, 0.14);

            --font: "IBM Plex Sans", "IBM Plex Sans Arabic", -apple-system, "Segoe UI", system-ui, sans-serif;
            --serif: "Instrument Serif", Georgia, serif;
            --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

            --r-sm: 8px;
            --r-md: 10px;
            --r-lg: 14px;
            --r-pill: 999px;
            --sb-w: 240px;
            --topbar-h: 64px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: var(--font);
            background: var(--bg-soft);
            color: var(--ink);
            font-size: 14px;
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
        }

        a {
            color: var(--cta);
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        button {
            font-family: inherit;
        }

        /* ============================================================
   LAYOUT (sidebar + main)
   ============================================================ */
        .admin-layout {
            display: grid;
            grid-template-columns: var(--sb-w) 1fr;
            min-height: 100vh;
        }

        .admin-main {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .admin-content {
            padding: 32px 40px;
            flex: 1;
            max-width: 1280px;
            width: 100%;
        }

        /* ============================================================
   SIDEBAR
   ============================================================ */
        .admin-sidebar {
            background: var(--bg-sidebar);
            color: #fff;
            display: flex;
            flex-direction: column;
            position: sticky;
            top: 0;
            height: 100vh;
            overflow-y: auto;
        }

        .sb-brand {
            padding: 22px 22px 28px;
            border-bottom: 1px solid var(--line-sb);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sb-brand .brand-wordmark {
            display: inline-flex;
            align-items: baseline;
            font-family: var(--font);
            white-space: nowrap;
        }

        .sb-brand .brand-ubc {
            font-weight: 700;
            font-size: 18px;
            letter-spacing: -0.01em;
            color: #fff;
        }

        .sb-brand .brand-pipe {
            display: inline-block;
            width: 2px;
            height: 16px;
            background: var(--yellow);
            margin: 0 4px;
            transform: translateY(1px);
        }

        .sb-brand .brand-g {
            font-family: var(--serif);
            font-style: italic;
            color: var(--yellow);
            font-size: 22px;
        }

        .sb-brand .brand-research {
            font-weight: 500;
            font-size: 14px;
            color: #fff;
            margin-inline-start: 6px;
        }

        .sb-brand .badge-admin {
            display: inline-block;
            margin-inline-start: auto;
            padding: 3px 8px;
            font-size: 9.5px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--yellow);
            background: rgba(255, 200, 61, 0.12);
            border-radius: var(--r-pill);
        }

        .sb-nav {
            padding: 16px 12px;
            flex: 1;
        }

        .sb-section {
            padding: 14px 12px 8px;
            font-size: 10.5px;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.4);
        }

        .sb-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            margin: 2px 0;
            border-radius: var(--r-sm);
            color: rgba(255, 255, 255, 0.72);
            text-decoration: none;
            font-size: 13.5px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            position: relative;
        }

        .sb-item svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 1.8;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
            flex-shrink: 0;
        }

        .sb-item:hover {
            background: var(--bg-sidebar-2);
            color: #fff;
            text-decoration: none;
        }

        .sb-item.active {
            background: var(--bg-sidebar-2);
            color: #fff;
            font-weight: 600;
        }

        .sb-item.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 8px;
            bottom: 8px;
            width: 3px;
            background: var(--yellow);
            border-radius: 0 3px 3px 0;
        }

        .sb-item .badge {
            margin-inline-start: auto;
            background: var(--cta);
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: var(--r-pill);
            min-width: 18px;
            text-align: center;
        }

        .sb-foot {
            padding: 16px 16px 22px;
            border-top: 1px solid var(--line-sb);
        }

        .sb-user {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 8px;
            border-radius: var(--r-sm);
            cursor: pointer;
            transition: background 0.15s;
        }

        .sb-user:hover {
            background: var(--bg-sidebar-2);
        }

        .sb-user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--yellow);
            color: var(--ink);
            display: grid;
            place-items: center;
            font-size: 12px;
            font-weight: 700;
        }

        .sb-user-name {
            font-size: 13px;
            font-weight: 600;
            color: #fff;
            line-height: 1.2;
        }

        .sb-user-role {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.5);
        }

        .sb-logout {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 10px;
            padding: 8px 10px;
            border-radius: var(--r-sm);
            color: rgba(255, 255, 255, 0.55);
            text-decoration: none;
            font-size: 12.5px;
            font-weight: 500;
            transition: color 0.15s, background 0.15s;
        }

        .sb-logout:hover {
            color: #fff;
            background: var(--bg-sidebar-2);
            text-decoration: none;
        }

        .sb-logout svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            stroke-width: 1.8;
            fill: none;
        }

        /* ============================================================
   TOP BAR
   ============================================================ */
        .admin-topbar {
            position: sticky;
            top: 0;
            z-index: 50;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--line);
            height: var(--topbar-h);
            display: flex;
            align-items: center;
            padding: 0 32px;
            gap: 20px;
        }

        .tb-hamburger {
            display: none;
            width: 36px;
            height: 36px;
            border: 0;
            background: transparent;
            border-radius: var(--r-sm);
            cursor: pointer;
            align-items: center;
            justify-content: center;
            color: var(--ink);
        }

        .tb-hamburger:hover {
            background: var(--bg-soft);
        }

        .tb-hamburger svg {
            width: 22px;
            height: 22px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
        }

        .tb-search {
            flex: 1;
            max-width: 480px;
            position: relative;
        }

        .tb-search input {
            width: 100%;
            padding: 10px 14px 10px 38px;
            border: 1px solid var(--line);
            border-radius: var(--r-md);
            background: var(--bg);
            font-family: inherit;
            font-size: 13.5px;
            color: var(--ink);
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        .tb-search input:focus {
            outline: none;
            border-color: var(--cta);
            box-shadow: 0 0 0 3px var(--cta-50);
        }

        .tb-search svg {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            stroke: var(--ink-3);
            stroke-width: 2;
            fill: none;
        }

        html[dir="rtl"] .tb-search input {
            padding: 10px 38px 10px 14px;
        }

        html[dir="rtl"] .tb-search svg {
            left: auto;
            right: 12px;
        }

        .tb-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-inline-start: auto;
        }

        .tb-btn {
            position: relative;
            width: 38px;
            height: 38px;
            border: 1px solid var(--line);
            background: var(--bg);
            border-radius: var(--r-sm);
            cursor: pointer;
            display: grid;
            place-items: center;
            color: var(--ink-2);
            transition: all 0.15s;
        }

        .tb-btn:hover {
            border-color: var(--ink);
            color: var(--ink);
        }

        .tb-btn svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 1.8;
            fill: none;
        }

        .tb-btn .dot {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--cta);
            border: 2px solid var(--bg);
        }

        /* ============================================================
   PAGE HEADER
   ============================================================ */
        .page-head {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            margin-bottom: 28px;
            gap: 20px;
            flex-wrap: wrap;
        }

        .page-head h1 {
            font-size: 28px;
            font-weight: 700;
            letter-spacing: -0.01em;
            color: var(--ink);
            line-height: 1.15;
        }

        .page-head .page-lede {
            font-size: 14px;
            color: var(--ink-3);
            margin-top: 6px;
            max-width: 56ch;
        }

        .page-head-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* ============================================================
   STAT CARDS (dashboard)
   ============================================================ */
        .stat-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: var(--r-lg);
            padding: 22px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: border-color 0.15s;
        }

        .stat-card:hover {
            border-color: var(--ink-3);
        }

        .stat-card-l {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--ink-3);
        }

        .stat-card-v {
            font-size: 32px;
            font-weight: 800;
            color: var(--ink);
            letter-spacing: -0.02em;
            font-variant-numeric: tabular-nums;
        }

        .stat-card-d {
            font-size: 12.5px;
            color: var(--ink-3);
        }

        .stat-card-d .up {
            color: var(--green);
            font-weight: 600;
        }

        .stat-card-d .down {
            color: var(--red);
            font-weight: 600;
        }

        /* ============================================================
   PANEL (containers for tables, forms, lists)
   ============================================================ */
        .panel {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: var(--r-lg);
            overflow: hidden;
        }

        .panel-head {
            padding: 18px 22px;
            border-bottom: 1px solid var(--line);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
        }

        .panel-head h2 {
            font-size: 16px;
            font-weight: 700;
            color: var(--ink);
        }

        .panel-head-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .panel-body {
            padding: 22px;
        }

        .panel-body.flush {
            padding: 0;
        }

        /* ============================================================
   TABLE
   ============================================================ */
        .admin-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13.5px;
        }

        .admin-table thead th {
            text-align: start;
            padding: 12px 22px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.10em;
            text-transform: uppercase;
            color: var(--ink-3);
            background: var(--bg-soft);
            border-bottom: 1px solid var(--line);
            white-space: nowrap;
        }

        .admin-table tbody td {
            padding: 14px 22px;
            border-bottom: 1px solid var(--line-soft);
            vertical-align: middle;
            color: var(--ink-2);
        }

        .admin-table tbody tr:last-child td {
            border-bottom: 0;
        }

        .admin-table tbody tr:hover {
            background: var(--bg-soft);
            cursor: default;
        }

        .admin-table .col-title {
            font-weight: 600;
            color: var(--ink);
            max-width: 32ch;
        }

        .admin-table .col-title-sub {
            font-size: 12px;
            color: var(--ink-3);
            font-weight: 400;
            margin-top: 2px;
        }

        .admin-table .col-actions {
            text-align: end;
            white-space: nowrap;
        }

        .admin-table .col-num {
            font-variant-numeric: tabular-nums;
        }

        /* ============================================================
   BADGES & STATUS PILLS
   ============================================================ */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 3px 9px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.02em;
            border-radius: var(--r-pill);
            background: var(--bg-soft);
            color: var(--ink-2);
            white-space: nowrap;
        }

        .badge-published {
            background: var(--green-soft);
            color: var(--green);
        }

        .badge-draft {
            background: var(--bg-soft);
            color: var(--ink-3);
        }

        .badge-paid {
            background: var(--cta-50);
            color: var(--cta);
        }

        .badge-free {
            background: var(--green-soft);
            color: var(--green);
        }

        .badge-new {
            background: var(--yellow-soft);
            color: #966100;
        }

        .badge-ubcg {
            background: var(--ink);
            color: #fff;
        }

        .badge-dot::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            flex-shrink: 0;
        }

        /* ============================================================
   FORM
   ============================================================ */
        .admin-form {
            display: flex;
            flex-direction: column;
            gap: 22px;
        }

        .form-section {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: var(--r-lg);
            padding: 26px 28px;
        }

        .form-section+.form-section {
            margin-top: 0;
        }

        .form-section h3 {
            font-size: 16px;
            font-weight: 700;
            color: var(--ink);
            margin-bottom: 6px;
        }

        .form-section-lede {
            font-size: 13px;
            color: var(--ink-3);
            margin-bottom: 20px;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 18px;
            margin-bottom: 18px;
        }

        .form-row:last-child {
            margin-bottom: 0;
        }

        .form-row.full {
            grid-template-columns: 1fr;
        }

        .form-field {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-field label {
            font-size: 12.5px;
            font-weight: 600;
            color: var(--ink);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .form-field label .req {
            color: var(--cta);
        }

        .form-field .help {
            font-size: 11.5px;
            color: var(--ink-3);
            font-weight: 400;
            margin-top: -2px;
        }

        .form-field input,
        .form-field textarea,
        .form-field select {
            font-family: inherit;
            font-size: 14px;
            padding: 10px 12px;
            border: 1px solid var(--line);
            border-radius: var(--r-sm);
            background: var(--bg);
            color: var(--ink);
            width: 100%;
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        .form-field textarea {
            min-height: 96px;
            resize: vertical;
            line-height: 1.55;
        }

        .form-field input:focus,
        .form-field textarea:focus,
        .form-field select:focus {
            outline: none;
            border-color: var(--cta);
            box-shadow: 0 0 0 3px var(--cta-50);
        }

        .form-field input[type="number"] {
            font-variant-numeric: tabular-nums;
        }

        .form-field input::placeholder,
        .form-field textarea::placeholder {
            color: var(--ink-4);
        }

        .form-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 14px;
            background: var(--bg-soft);
            border-radius: var(--r-sm);
            cursor: pointer;
        }

        .form-toggle:has(input:checked) {
            background: var(--cta-50);
            border: 1px solid var(--cta-100);
        }

        .form-toggle input {
            width: 16px;
            height: 16px;
            accent-color: var(--cta);
            cursor: pointer;
        }

        .form-toggle-text strong {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink);
        }

        .form-toggle-text small {
            display: block;
            font-size: 11.5px;
            color: var(--ink-3);
            margin-top: 2px;
        }

        .form-tabs {
            display: flex;
            gap: 4px;
            border-bottom: 1px solid var(--line);
            margin-bottom: 24px;
            overflow-x: auto;
        }

        .form-tab {
            padding: 10px 16px;
            background: transparent;
            border: 0;
            font-size: 13px;
            font-weight: 600;
            color: var(--ink-3);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: color 0.15s, border-color 0.15s;
            white-space: nowrap;
        }

        .form-tab:hover {
            color: var(--ink);
        }

        .form-tab.active {
            color: var(--cta);
            border-bottom-color: var(--cta);
        }

        .form-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            padding: 18px 0 0;
        }

        .form-actions .danger-side {
            margin-inline-end: auto;
        }

        /* ============================================================
   BUTTONS
   ============================================================ */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            border: 0;
            padding: 9px 18px;
            font-size: 13.5px;
            font-weight: 600;
            font-family: inherit;
            letter-spacing: 0.01em;
            border-radius: var(--r-sm);
            cursor: pointer;
            transition: all 0.15s;
            text-decoration: none;
            line-height: 1.2;
            white-space: nowrap;
        }

        .btn:hover {
            text-decoration: none;
        }

        .btn-primary {
            background: var(--cta);
            color: #fff;
        }

        .btn-primary:hover {
            background: var(--cta-dark);
            transform: translateY(-1px);
        }

        .btn-ink {
            background: var(--ink);
            color: #fff;
        }

        .btn-ink:hover {
            background: var(--ink-2);
            transform: translateY(-1px);
        }

        .btn-ghost {
            background: var(--bg);
            color: var(--ink);
            border: 1px solid var(--line);
        }

        .btn-ghost:hover {
            border-color: var(--ink);
        }

        .btn-danger {
            background: var(--bg);
            color: var(--red);
            border: 1px solid var(--red);
        }

        .btn-danger:hover {
            background: var(--red);
            color: #fff;
        }

        .btn-yellow {
            background: var(--yellow);
            color: var(--ink);
        }

        .btn-yellow:hover {
            background: #e8b524;
            transform: translateY(-1px);
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 12.5px;
        }

        .btn-icon {
            width: 32px;
            height: 32px;
            padding: 0;
            display: grid;
            place-items: center;
        }

        .btn-icon svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            stroke-width: 1.8;
            fill: none;
        }

        /* ============================================================
   FILTER ROW (chips, like public site)
   ============================================================ */
        .admin-filters {
            display: flex;
            gap: 8px;
            padding: 0 0 18px;
            flex-wrap: wrap;
        }

        .admin-chip {
            padding: 6px 12px;
            border: 1px solid var(--line);
            border-radius: var(--r-pill);
            font-size: 12.5px;
            font-weight: 600;
            cursor: pointer;
            background: var(--bg);
            color: var(--ink-2);
            font-family: inherit;
            transition: all 0.15s;
        }

        .admin-chip:hover {
            border-color: var(--ink);
            color: var(--ink);
        }

        .admin-chip.active {
            background: var(--ink);
            color: #fff;
            border-color: var(--ink);
        }

        /* ============================================================
   LOGIN PAGE (no chrome)
   ============================================================ */
        .login-shell {
            min-height: 100vh;
            display: grid;
            place-items: center;
            padding: 24px;
            background:
                radial-gradient(ellipse 700px 380px at 20% 0%, rgba(27, 79, 230, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse 600px 320px at 90% 100%, rgba(255, 200, 61, 0.10) 0%, transparent 65%),
                var(--bg-darker);
        }

        .login-card {
            background: var(--bg);
            border-radius: 18px;
            width: 100%;
            max-width: 420px;
            padding: 40px 36px 32px;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
        }

        .login-brand {
            display: flex;
            justify-content: center;
            margin-bottom: 28px;
        }

        .login-brand .brand-wordmark {
            display: inline-flex;
            align-items: baseline;
        }

        .login-brand .brand-ubc {
            font-weight: 700;
            font-size: 24px;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .login-brand .brand-pipe {
            display: inline-block;
            width: 2px;
            height: 20px;
            background: var(--cta);
            margin: 0 5px;
            transform: translateY(2px);
        }

        .login-brand .brand-g {
            font-family: var(--serif);
            font-style: italic;
            color: var(--cta);
            font-size: 28px;
            margin-inline-end: 6px;
        }

        .login-brand .brand-research {
            font-weight: 500;
            font-size: 18px;
            color: var(--ink);
        }

        .login-card h1 {
            font-size: 22px;
            font-weight: 700;
            text-align: center;
            margin-bottom: 6px;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .login-card .lede {
            text-align: center;
            color: var(--ink-3);
            font-size: 13.5px;
            margin-bottom: 28px;
        }

        .login-form {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .login-form .form-field input {
            padding: 12px 14px;
            font-size: 14.5px;
        }

        .login-form button {
            padding: 13px;
            font-size: 14px;
            margin-top: 8px;
        }

        .login-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12.5px;
            color: var(--ink-3);
            margin-top: 18px;
        }

        .login-meta a {
            color: var(--cta);
            font-weight: 600;
        }

        .login-back {
            display: block;
            text-align: center;
            margin-top: 22px;
            font-size: 12.5px;
            color: rgba(255, 255, 255, 0.6);
        }

        .login-back a {
            color: var(--yellow);
        }

        /* ============================================================
   EMPTY STATES
   ============================================================ */
        .empty {
            text-align: center;
            padding: 60px 20px;
            color: var(--ink-3);
        }

        .empty h3 {
            color: var(--ink);
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        /* ============================================================
   RECENT ACTIVITY LIST (dashboard)
   ============================================================ */
        .activity {
            display: flex;
            flex-direction: column;
        }

        .activity-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 22px;
            border-bottom: 1px solid var(--line-soft);
        }

        .activity-item:last-child {
            border-bottom: 0;
        }

        .activity-icon {
            width: 36px;
            height: 36px;
            border-radius: var(--r-sm);
            background: var(--bg-soft);
            display: grid;
            place-items: center;
            color: var(--ink-2);
            flex-shrink: 0;
        }

        .activity-icon svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 1.8;
            fill: none;
        }

        .activity-body {
            flex: 1;
            min-width: 0;
        }

        .activity-text {
            font-size: 13.5px;
            color: var(--ink);
            line-height: 1.4;
        }

        .activity-text strong {
            font-weight: 600;
        }

        .activity-time {
            font-size: 12px;
            color: var(--ink-3);
            margin-top: 2px;
        }

        .activity-action {
            font-size: 12px;
            font-weight: 600;
            color: var(--cta);
        }

        /* ============================================================
   CONSULT DETAIL DRAWER / MODAL
   ============================================================ */
        .drawer-overlay {
            position: fixed;
            inset: 0;
            background: rgba(35, 62, 80, 0.55);
            backdrop-filter: blur(6px);
            z-index: 200;
            display: none;
            align-items: stretch;
            justify-content: flex-end;
        }

        .drawer-overlay.open {
            display: flex;
        }

        .drawer {
            background: var(--bg);
            width: 100%;
            max-width: 560px;
            height: 100vh;
            overflow-y: auto;
            padding: 32px 36px;
            animation: drawerSlide 0.25s cubic-bezier(.2, .8, .2, 1);
        }

        @keyframes drawerSlide {
            from {
                transform: translateX(40px);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        html[dir="rtl"] .drawer-overlay {
            justify-content: flex-start;
        }

        html[dir="rtl"] @keyframes drawerSlide {
            from {
                transform: translateX(-40px);
            }

            to {
                transform: translateX(0);
            }
        }

        .drawer-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 22px;
        }

        .drawer-head h2 {
            font-size: 20px;
            font-weight: 700;
            color: var(--ink);
            letter-spacing: -0.01em;
        }

        .drawer-close {
            width: 32px;
            height: 32px;
            border-radius: var(--r-sm);
            border: 1px solid var(--line);
            background: var(--bg);
            cursor: pointer;
            display: grid;
            place-items: center;
            color: var(--ink-2);
        }

        .drawer-close:hover {
            background: var(--bg-soft);
        }

        .drawer-field {
            margin-bottom: 18px;
        }

        .drawer-field .l {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.10em;
            text-transform: uppercase;
            color: var(--ink-3);
            margin-bottom: 4px;
        }

        .drawer-field .v {
            font-size: 14px;
            color: var(--ink);
            line-height: 1.55;
        }

        .drawer-field .v a {
            color: var(--cta);
            font-weight: 600;
        }

        .drawer-actions {
            display: flex;
            gap: 10px;
            margin-top: 22px;
            padding-top: 22px;
            border-top: 1px solid var(--line);
        }

        /* ============================================================
   SIDEBAR BACKDROP (mobile drawer overlay)
   IMPORTANT: must be display:none by default, otherwise it
   becomes a grid item inside .admin-layout and breaks the layout.
   ============================================================ */
        .sb-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(35, 62, 80, 0.5);
            z-index: 250;
        }

        /* ============================================================
   RESPONSIVE
   ============================================================ */
        @media (max-width: 1024px) {
            .stat-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .admin-content {
                padding: 24px 28px;
            }
        }

        @media (max-width: 900px) {
            .admin-layout {
                grid-template-columns: 1fr;
            }

            .admin-sidebar {
                position: fixed;
                top: 0;
                left: 0;
                width: 80vw;
                max-width: 280px;
                height: 100vh;
                transform: translateX(-100%);
                transition: transform 0.25s ease;
                z-index: 300;
                box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
            }

            html[dir="rtl"] .admin-sidebar {
                left: auto;
                right: 0;
                transform: translateX(100%);
            }

            .admin-sidebar.open {
                transform: translateX(0);
            }

            .tb-hamburger {
                display: grid;
            }

            .admin-content {
                padding: 20px 18px;
            }

            .sb-backdrop.show {
                display: block;
            }

            .form-row {
                grid-template-columns: 1fr;
                gap: 14px;
            }

            .admin-table thead {
                display: none;
            }

            .admin-table,
            .admin-table tbody,
            .admin-table tr,
            .admin-table td {
                display: block;
            }

            .admin-table tr {
                background: var(--bg);
                border: 1px solid var(--line);
                border-radius: var(--r-md);
                padding: 14px 16px;
                margin-bottom: 12px;
            }

            .admin-table tbody td {
                padding: 4px 0;
                border: 0;
            }

            .admin-table tbody td::before {
                content: attr(data-label);
                display: inline-block;
                min-width: 110px;
                font-size: 10.5px;
                font-weight: 700;
                letter-spacing: 0.10em;
                text-transform: uppercase;
                color: var(--ink-3);
            }

            .admin-table tbody td.col-title {
                padding: 0 0 8px;
            }

            .admin-table tbody td.col-title::before {
                display: none;
            }

            .admin-table tbody td.col-actions {
                padding-top: 12px;
                text-align: start;
                border-top: 1px solid var(--line-soft);
                margin-top: 6px;
            }

            .admin-table tbody td.col-actions::before {
                display: none;
            }

            .drawer {
                max-width: 100%;
                padding: 22px 22px;
            }
        }

        @media (max-width: 560px) {
            .stat-grid {
                grid-template-columns: 1fr;
            }

            .page-head h1 {
                font-size: 24px;
            }

            .admin-topbar {
                padding: 0 14px;
                gap: 12px;
            }

            .tb-search {
                max-width: 100%;
            }
        }

        /* ============================================================
   TOAST (in-page feedback after CRUD actions)
   ============================================================ */
        .admin-toast {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translate(-50%, 12px);
            background: var(--ink);
            color: #fff;
            padding: 13px 22px;
            border-radius: var(--r-md);
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.005em;
            box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
            opacity: 0;
            z-index: 999;
            transition: opacity 0.2s, transform 0.25s cubic-bezier(.2, .8, .2, 1);
            max-width: 90vw;
            text-align: center;
        }

        .admin-toast.show {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        .admin-toast-success {
            background: var(--green);
        }

        .admin-toast-error {
            background: var(--red);
        }
