/* =============================================================================
   admin-theme.css  —  Claude Design token foundation for HACC.Administration
   Phase 1 (foundation): design tokens + helpers only. Loaded LAST in <head>
   so its CSS variables win. Variable values copied EXACTLY from the redesign
   mock <head> (Hacc Admin.dc.html). Base body styling is SCOPED so it does not
   fight existing Bootstrap / MudBlazor / Radzen / Tailwind pages.
   ========================================================================== */

/* ---- Light (default) design tokens ------------------------------------- */
:root {
    --bg:#eaeef2; --surface:#ffffff; --surface-2:#f5f8fa; --surface-3:#eef2f6;
    --border:#e4e9ee; --border-strong:#d2dae1;
    --text:#11181f; --text-2:#576470; --text-3:#8d99a4;
    --primary:#0e7e92; --primary-strong:#0b687a; --primary-soft:#e1f1f4;
    --coral:#d9603f; --coral-soft:#fae9e2;
    --success:#1f9d6b; --success-soft:#e3f5ec;
    --amber:#b07d12; --amber-soft:#f7eed5;
    --shadow:0 1px 2px rgba(17,24,31,.05), 0 8px 24px -12px rgba(17,24,31,.12);
    --shadow-lg:0 24px 60px -20px rgba(17,24,31,.30);
}

/* ---- Dark theme overrides ---------------------------------------------- */
[data-theme="dark"] {
    --bg:#0a0f14; --surface:#121a21; --surface-2:#19232b; --surface-3:#1f2b34;
    --border:#243039; --border-strong:#324250;
    --text:#e9eff4; --text-2:#9aa8b4; --text-3:#697682;
    --primary:#2bb6cf; --primary-strong:#46c4da; --primary-soft:#0f343d;
    --coral:#ef8164; --coral-soft:#3a221b;
    --success:#3fc088; --success-soft:#11332a;
    --amber:#d8a83a; --amber-soft:#352b14;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-lg:0 30px 70px -20px rgba(0,0,0,.7);
}

/* ---- Animations (copied from mock) ------------------------------------- */
@keyframes pop  { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:none; } }
@keyframes fade { from { opacity:0; } to { opacity:1; } }
@keyframes menu { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

/* ---- Material Symbols Rounded helper class (copied from mock) ---------- */
.mi {
    font-family:'Material Symbols Rounded';
    font-weight:normal;
    font-style:normal;
    line-height:1;
    letter-spacing:normal;
    text-transform:none;
    display:inline-block;
    white-space:nowrap;
    word-wrap:normal;
    direction:ltr;
    -webkit-font-feature-settings:'liga';
    -webkit-font-smoothing:antialiased;
}

/* ---- Custom scrollbar (copied from mock) ------------------------------- */
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-thumb {
    background:var(--border-strong);
    border-radius:8px;
    border:2px solid transparent;
    background-clip:padding-box;
}
::-webkit-scrollbar-track { background:transparent; }

/* ---- Scoped base styling ----------------------------------------------
   NOTE: deliberately NOT a blanket `body { ... }` override — existing pages
   still depend on Bootstrap / MudBlazor / Radzen / Tailwind typography. The
   new look (Hanken Grotesk @ 13px, antialiased, themed bg/text) is applied to
   opt-in shell containers. Add `class="admin-shell"` to a redesigned shell
   wrapper in later phases to activate it; nothing changes until then.
   ----------------------------------------------------------------------- */
.admin-shell {
    font-family:'Hanken Grotesk', system-ui, sans-serif;
    font-size:13px;
    -webkit-font-smoothing:antialiased;
    background:var(--bg);
    color:var(--text);
}

/* Form controls inside the redesigned shell inherit the UI font. */
.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell button {
    font-family:inherit;
}

/* =============================================================================
   PHASE 2  —  Admin component styling (Claude Design mock)
   -----------------------------------------------------------------------------
   EVERYTHING below is scoped under .admin-shell so it can never leak into the
   shared HACC.User app, even where components (ServerDataTable /
   GroupWiseServerSideDataTable) are reused there.

   The data-table components are rendered with Tailwind/Bootstrap utility
   markup. The card-wrapped-table rules therefore target the *structural*
   markup those components emit:
     - ServerDataTable           : <div class="overflow-x-auto rounded-[0.9rem] border"> > <table>
     - GroupWiseServerSideDataTable: <div class="card ..."> with .card-header / .card-body,
                                      then the same bordered wrapper > <table>
   plus reusable opt-in helper classes (.pill, .admin-avatar, .admin-toolbar*,
   .admin-card-grid, .admin-form-*, .admin-modal-*) that redesigned pages apply
   directly to match the mock 1:1.
   ============================================================================= */

/* ---- Card-wrapped data tables -----------------------------------------------
   The components wrap their <table> in `div.overflow-x-auto.rounded-[0.9rem].border`.
   We restyle that wrapper into the mock's surface card (14px radius, --shadow)
   and theme the table itself. Tailwind escaped class names need the leading
   backslash on the period inside the bracket value. */
.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border {
    background:var(--surface);
    border:1px solid var(--border) !important;
    border-radius:14px;
    box-shadow:var(--shadow);
    /* overflow:hidden clipped wide grids on tablets with NO way to reach the Actions column.
       Horizontal scroll instead; rounded corners still clip because overflow is non-visible. */
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
}

.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table {
    width:100%;
    border-collapse:collapse;
    background:transparent;
}

/* thead — tinted bar, 11px uppercase muted headings */
.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > thead {
    background:var(--surface-2);
}

.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > thead > tr > th {
    text-align:left;
    padding:10px 16px;
    font-size:11px;
    line-height:1.4;
    letter-spacing:.05em;
    text-transform:uppercase;
    color:var(--text-3);
    font-weight:700;
    border:none;
    white-space:nowrap;
}

/* tbody rows — 1px separators, 12.5–13px cells, hover tint */
.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > tbody > tr {
    border-top:1px solid var(--border);
    transition:background .12s ease;
}

.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > tbody > tr:hover {
    background:var(--surface-2);
}

.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > tbody > td,
.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > tbody > tr > td {
    padding:11px 16px;
    font-size:13px;
    color:var(--text-2);
    vertical-align:middle;
}

/* the loading / empty-state row should not show a hover highlight or odd padding */
.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table > tbody > tr:hover:has(> td[colspan]) {
    background:transparent;
}

/* group sub-headers (ServerDataTable GroupBy rows) */
.admin-shell .overflow-x-auto.rounded-\[0\.9rem\].border > table .sdt-group-header > td {
    background:var(--surface-3);
    color:var(--text);
    font-weight:700;
    font-size:12px;
    letter-spacing:.02em;
    padding:8px 16px;
}

/* ---- GroupWise card shell (Bootstrap .card / .card-header / .card-body) -----
   Restyle the per-organisation Bootstrap cards into the mock's surface cards. */
.admin-shell .card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:14px;
    box-shadow:var(--shadow);
    overflow:hidden;
}

.admin-shell .card > .card-header {
    background:var(--surface-2);
    border-bottom:1px solid var(--border);
    padding:13px 18px;
    color:var(--text);
}

.admin-shell .card > .card-header label {
    font-size:14px;
    font-weight:700;
    color:var(--text);
    letter-spacing:-.01em;
}

.admin-shell .card > .card-header .bi {
    color:var(--text-2);
    cursor:pointer;
}

.admin-shell .card > .card-body {
    padding:16px 18px 18px;
    background:var(--surface);
}

/* nested table inside a GroupWise card body sits flush — drop the extra shadow */
.admin-shell .card > .card-body .overflow-x-auto.rounded-\[0\.9rem\].border {
    box-shadow:none;
}

/* ---- Status pills -----------------------------------------------------------
   .pill = base; colour modifiers use the *-soft background + solid colour.
   Add .pill-dot for the little leading status dot (mock's Active/Frozen). */
.admin-shell .pill {
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    font-weight:600;
    line-height:1;
    padding:4px 10px;
    border-radius:20px;
    white-space:nowrap;
    background:var(--surface-3);
    color:var(--text-2);
}

.admin-shell .pill-success { background:var(--success-soft); color:var(--success); }
.admin-shell .pill-amber   { background:var(--amber-soft);   color:var(--amber);   }
.admin-shell .pill-coral   { background:var(--coral-soft);   color:var(--coral);   }
.admin-shell .pill-primary { background:var(--primary-soft); color:var(--primary); }

/* leading dot — inherits the pill's text colour */
.admin-shell .pill.pill-dot::before {
    content:"";
    width:6px;
    height:6px;
    border-radius:50%;
    background:currentColor;
    flex:none;
}

/* squared "tag" variant (mock's Role chip / email-type chip): 6px radius, no dot */
.admin-shell .pill-tag {
    border-radius:6px;
    padding:3px 10px;
}

/* ---- Avatars / initials -----------------------------------------------------
   .admin-avatar = rounded-square (orgs / emails / releases),
   add .admin-avatar-circle for the circular user avatar,
   size modifiers .admin-avatar-sm (28px) / default 28px / .admin-avatar-lg (60px). */
.admin-shell .admin-avatar {
    width:28px;
    height:28px;
    border-radius:8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:11.5px;
    font-weight:700;
    flex:none;
    background:var(--primary-soft);
    color:var(--primary);
    line-height:1;
}

.admin-shell .admin-avatar-circle { border-radius:50%; }

.admin-shell .admin-avatar-lg {
    width:60px;
    height:60px;
    border-radius:14px;
    font-size:21px;
    background:var(--primary);
    color:#fff;
}

/* coloured icon-tile variants used for the leading cell glyphs */
.admin-shell .admin-avatar-coral   { background:var(--coral-soft);   color:var(--coral);   }
.admin-shell .admin-avatar-success { background:var(--success-soft); color:var(--success); }
.admin-shell .admin-avatar-amber   { background:var(--amber-soft);   color:var(--amber);   }

/* ---- Toolbar: search input, filter selects, Show-Frozen toggle -------------
   Opt-in via .admin-toolbar on a page's filter row; the children pick up the
   mock styling. Also restyles the ServerDataTable built-in search box / status
   select markup (the Tailwind border boxes) when inside .admin-shell. */
.admin-shell .admin-toolbar {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* search box (mock: 38px, 10px radius, leading search icon handled by markup) */
.admin-shell .admin-search {
    position:relative;
    display:inline-flex;
    align-items:center;
}

.admin-shell .admin-search > .mi {
    position:absolute;
    left:13px;
    top:50%;
    transform:translateY(-50%);
    font-size:19px;
    color:var(--text-3);
    pointer-events:none;
}

.admin-shell .admin-search > input {
    height:38px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--surface);
    color:var(--text);
    font-size:12.5px;
    padding:0 14px 0 40px;
    outline:none;
    width:300px;
    max-width:100%;
}

.admin-shell .admin-search > input::placeholder { color:var(--text-3); font-size:12.5px; }

.admin-shell .admin-search > input:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 3px var(--primary-soft);
}

/* filter <select> (mock: 38px, 10px radius, stronger border, 600 weight) */
.admin-shell .admin-select {
    height:38px;
    border:1px solid var(--border-strong);
    border-radius:10px;
    background:var(--surface);
    color:var(--text);
    padding:0 12px;
    font-size:12.5px;
    font-weight:600;
    outline:none;
    cursor:pointer;
}

.admin-shell .admin-select:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 3px var(--primary-soft);
}

/* Re-skin the ServerDataTable's BUILT-IN toolbar markup (Tailwind classes) so
   existing pages get the look without markup edits. The search wrapper is a
   flex box with a border; the status <select> is an InputSelect. */
.admin-shell .focus-within\:ring-2.rounded-lg {
    border:1px solid var(--border) !important;
    border-radius:10px;
    background:var(--surface) !important;
    padding:0 14px;
    height:38px;
}

.admin-shell .focus-within\:ring-2.rounded-lg:focus-within {
    border-color:var(--primary) !important;
    box-shadow:0 0 0 3px var(--primary-soft);
}

.admin-shell .focus-within\:ring-2.rounded-lg input { color:var(--text); font-size:12.5px; }

/* Show-Frozen / Show-inactive pill toggle (mock's track + knob switch).
   Apply .admin-toggle to the <label>, with a checkbox inside. */
.admin-shell .admin-toggle {
    display:inline-flex;
    align-items:center;
    gap:9px;
    font-size:13px;
    font-weight:600;
    color:var(--text-2);
    cursor:pointer;
    padding-right:4px;
    user-select:none;
}

.admin-shell .admin-toggle input[type="checkbox"] {
    appearance:none;
    -webkit-appearance:none;
    width:38px;
    height:22px;
    /* site.css's global input[type=checkbox]:not(.form-check-input) sets a squared
       black-bordered 18px box with `border-radius:2px !important` + a hover fill; those
       win over the switch and make it look like a broken checkbox. Override with the
       same weight so the track always renders as a clean rounded pill. */
    border-radius:20px !important;
    border:none !important;
    background:var(--border-strong);
    position:relative;
    cursor:pointer;
    transition:background .18s ease;
    flex:none;
    margin:0;
}

/* Neutralise the global checkbox hover fill so the pill keeps its track colour. */
.admin-shell .admin-toggle input[type="checkbox"]:hover {
    background:var(--border-strong);
}

.admin-shell .admin-toggle input[type="checkbox"]:checked:hover {
    background:var(--primary);
}

.admin-shell .admin-toggle input[type="checkbox"]::after {
    content:"";
    position:absolute;
    top:2px;
    left:2px;
    width:18px;
    height:18px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 1px 2px rgba(0,0,0,.3);
    transition:left .18s ease;
}

.admin-shell .admin-toggle input[type="checkbox"]:checked {
    background:var(--primary);
}

.admin-shell .admin-toggle input[type="checkbox"]:checked::after {
    left:18px;
}

/* square icon-button used in the header (export / add) */
.admin-shell .admin-iconbtn {
    width:38px;
    height:38px;
    border:1px solid var(--border-strong);
    border-radius:10px;
    background:var(--surface);
    color:var(--text-2);
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.admin-shell .admin-iconbtn:hover { background:var(--surface-2); color:var(--text); }

.admin-shell .admin-iconbtn-primary {
    border:none;
    background:var(--primary);
    color:#fff;
}

.admin-shell .admin-iconbtn-primary:hover { background:var(--primary-strong); color:#fff; }

/* in-row "more" / kebab button */
.admin-shell .admin-rowbtn {
    width:28px;
    height:28px;
    border:none;
    border-radius:8px;
    background:transparent;
    color:var(--text-3);
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.admin-shell .admin-rowbtn:hover { background:var(--surface-3); color:var(--text); }

/* ---- Pagination -------------------------------------------------------------
   Restyle the components' built-in pager (Tailwind buttons) AND offer opt-in
   classes. The components render prev/next as <button><img></button> and page
   numbers as <button class="px-3 py-1 border rounded-md ...">N</button> with the
   active page carrying `bg-gray-100 font-bold`. */
.admin-shell .px-3.py-1.border.rounded-md {
    min-width:34px;
    height:34px;
    border:1px solid var(--border) !important;
    border-radius:8px !important;
    background:var(--surface) !important;
    color:var(--text-2);
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 8px;
    transition:background .12s ease;
}

.admin-shell .px-3.py-1.border.rounded-md:hover {
    background:var(--surface-2) !important;
}

/* active page = primary fill */
.admin-shell .px-3.py-1.border.rounded-md.bg-gray-100.font-bold {
    background:var(--primary) !important;
    border-color:var(--primary) !important;
    color:#fff !important;
}

/* prev / next arrow buttons */
.admin-shell .px-2.py-\[0\.7rem\].border.rounded-md {
    width:34px;
    height:34px;
    border:1px solid var(--border) !important;
    border-radius:8px !important;
    background:var(--surface) !important;
    color:var(--text-3);
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
}

.admin-shell .px-2.py-\[0\.7rem\].border.rounded-md:hover { background:var(--surface-2) !important; }
.admin-shell .px-2.py-\[0\.7rem\].border.rounded-md:disabled { opacity:.45; cursor:default; }

/* "Show N entries" page-size select (Tailwind form-select) */
.admin-shell .form-select.rounded-lg,
.admin-shell select.form-select {
    height:34px;
    border:1px solid var(--border-strong) !important;
    border-radius:8px !important;
    background:var(--surface) !important;
    color:var(--text) !important;
    font-size:13px;
    padding:0 8px;
    cursor:pointer;
}

/* opt-in pager classes for redesigned pages */
.admin-shell .admin-pager { display:flex; align-items:center; gap:6px; }

.admin-shell .admin-pager-btn {
    min-width:34px;
    height:34px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--surface);
    color:var(--text-3);
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 8px;
}

.admin-shell .admin-pager-btn:hover { background:var(--surface-2); }
.admin-shell .admin-pager-btn.is-active {
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
}

/* ---- Card grids (label / email template tiles) ------------------------------ */
.admin-shell .admin-card-grid {
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:16px;
}

@media (max-width:1100px) { .admin-shell .admin-card-grid { grid-template-columns:repeat(2, 1fr); } }
@media (max-width:680px)  { .admin-shell .admin-card-grid { grid-template-columns:1fr; } }

.admin-shell .admin-tile {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:14px;
    box-shadow:var(--shadow);
    overflow:hidden;
    transition:border-color .12s ease;
}

.admin-shell .admin-tile:hover { border-color:var(--border-strong); }

.admin-shell .admin-tile-preview {
    height:140px;
    background:var(--surface-2);
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
    position:relative;
}

.admin-shell .admin-tile-body {
    padding:14px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.admin-shell .admin-tile-title { font-size:14px; font-weight:700; color:var(--text); }
.admin-shell .admin-tile-sub   { font-size:12px; color:var(--text-3); margin-top:2px; }

/* ---- Forms: labels, inputs, selects, textarea ------------------------------- */
.admin-shell .admin-field { margin-bottom:16px; }

.admin-shell .admin-field-row {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    margin-bottom:16px;
}

@media (max-width:560px) { .admin-shell .admin-field-row { grid-template-columns:1fr; } }

.admin-shell .admin-label {
    display:block;
    font-size:12.5px;
    font-weight:600;
    color:var(--text-2);
    margin-bottom:7px;
}

.admin-shell .admin-input,
.admin-shell .admin-form-select,
.admin-shell .admin-textarea {
    width:100%;
    border:1px solid var(--border-strong);
    border-radius:9px;
    background:var(--surface);
    color:var(--text);
    font-size:14px;
    outline:none;
}

.admin-shell .admin-input,
.admin-shell .admin-form-select {
    height:41px;
}

.admin-shell .admin-input { padding:0 13px; }
.admin-shell .admin-form-select { padding:0 11px; cursor:pointer; }

.admin-shell .admin-textarea {
    padding:11px 13px;
    resize:vertical;
    font-family:inherit;
    line-height:1.5;
}

.admin-shell .admin-input:focus,
.admin-shell .admin-form-select:focus,
.admin-shell .admin-textarea:focus {
    border-color:var(--primary);
    box-shadow:0 0 0 3px var(--primary-soft);
}

.admin-shell .admin-input::placeholder,
.admin-shell .admin-textarea::placeholder { color:var(--text-3); }

/* primary / secondary form buttons (mock: 39px, 10px radius) */
.admin-shell .admin-btn {
    height:39px;
    padding:0 18px;
    border:1px solid var(--border-strong);
    border-radius:10px;
    background:var(--surface);
    color:var(--text);
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.admin-shell .admin-btn:hover { background:var(--surface-2); }

.admin-shell .admin-btn-primary {
    border:none;
    background:var(--primary);
    color:#fff;
    font-weight:700;
    padding:0 22px;
}

.admin-shell .admin-btn-primary:hover { background:var(--primary-strong); }

/* ---- Modal: overlay + dialog + header/footer -------------------------------- */
.admin-shell .admin-modal-overlay,
.admin-modal-overlay {
    position:fixed;
    inset:0;
    background:rgba(8,12,16,.5);
    backdrop-filter:blur(3px);
    z-index:1200;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    animation:fade .15s ease;
}

.admin-shell .admin-modal,
.admin-modal-overlay .admin-modal {
    width:560px;
    max-width:100%;
    max-height:90vh;
    overflow-y:auto;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-lg);
    animation:pop .18s ease;
    color:var(--text);
}

.admin-shell .admin-modal-sm,  .admin-modal-overlay .admin-modal-sm  { width:460px; }
.admin-shell .admin-modal-md,  .admin-modal-overlay .admin-modal-md  { width:540px; }
.admin-shell .admin-modal-lg,  .admin-modal-overlay .admin-modal-lg  { width:680px; }
.admin-shell .admin-modal-xl,  .admin-modal-overlay .admin-modal-xl  { width:820px; }

.admin-shell .admin-modal-header,
.admin-modal-overlay .admin-modal-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:20px 24px;
    border-bottom:1px solid var(--border);
}

.admin-shell .admin-modal-title,
.admin-modal-overlay .admin-modal-title {
    font-size:18px;
    font-weight:800;
    color:var(--text);
    letter-spacing:-.01em;
}

.admin-shell .admin-modal-close,
.admin-modal-overlay .admin-modal-close {
    width:34px;
    height:34px;
    border:none;
    border-radius:9px;
    background:var(--surface-2);
    color:var(--text-2);
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:none;
}

.admin-shell .admin-modal-close:hover,
.admin-modal-overlay .admin-modal-close:hover { background:var(--surface-3); color:var(--text); }

.admin-shell .admin-modal-body,
.admin-modal-overlay .admin-modal-body { padding:24px; }

.admin-shell .admin-modal-footer,
.admin-modal-overlay .admin-modal-footer {
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:18px 24px;
    border-top:1px solid var(--border);
}

/* ---- Page header (mock's title bar: icon tile + title + subtitle) ----------- */
.admin-shell .admin-page-header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
    margin-bottom:24px;
}

.admin-shell .admin-page-title-wrap { display:flex; align-items:center; gap:14px; }

.admin-shell .admin-page-icon {
    width:38px;
    height:38px;
    border-radius:11px;
    background:var(--primary-soft);
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    flex:none;
}

.admin-shell .admin-page-title {
    margin:0;
    font-size:21px;
    font-weight:800;
    letter-spacing:-.025em;
    color:var(--text);
}

.admin-shell .admin-page-sub {
    font-size:12.5px;
    color:var(--text-2);
    margin-top:2px;
}

/* ---- Profile tabs ----------------------------------------------------------- */
.admin-shell .admin-tabs {
    display:flex;
    gap:4px;
    border-bottom:1px solid var(--border);
    margin-bottom:24px;
}

.admin-shell .admin-tab {
    padding:10px 16px;
    border:none;
    background:transparent;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    color:var(--text-2);
    border-bottom:2px solid transparent;
    margin-bottom:-1px;
}

.admin-shell .admin-tab:hover { color:var(--text); }

.admin-shell .admin-tab.is-active {
    color:var(--primary);
    border-bottom-color:var(--primary);
}

/* generic surface "panel" card (e.g. profile form container) */
.admin-shell .admin-panel {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:14px;
    box-shadow:var(--shadow);
    padding:26px;
}

/* ============================================================
   TOUCH / TABLET GLOBAL RULES (iPad review, 2026-07-05)
   ============================================================ */

/* iOS Safari auto-zooms on focus when a control's font-size is under 16px.
   Touch devices only; the desktop admin design keeps its 12.5-14px controls. */
@media (pointer: coarse) {
    .admin-shell input, .admin-shell select, .admin-shell textarea,
    input.admin-input, select.admin-form-select {
        font-size: max(16px, 1em) !important;
    }

    /* Pager buttons restyled by the theme are ~34px — bring to touch size. */
    .admin-shell .pagination button,
    .admin-shell nav[aria-label] button {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}
