/* =====================================================================
   OzSites Admin — single hand-written stylesheet
   ---------------------------------------------------------------------
   Loaded only on /admin/* routes. Independent of site.css (the public-
   site stylesheet) so admin can ship its own tokens, typography, and
   chrome without bleeding into tenant pages.

   Section index:
     1.  Reset + base (admin-specific)
     2.  Theme tokens (light + .dark)
     3.  Typography
     4.  Layout — shell, sidebar, topbar, main
     5.  Auth layout — centered card
     6.  Buttons + interactive primitives
     7.  Forms — inputs, labels, fields, selects, checkboxes, switches
     8.  Tables
     9.  Cards
    10.  KPI tiles + sparklines
    11.  Tags / badges / chips
    12.  Status pills + filter chips
    13.  Pagination
    14.  Empty state
    15.  Dropdown menu
    16.  Dialog / modal
    17.  Drawer
    18.  Tabs
    19.  Toasts
    20.  Breadcrumbs + page header
    21.  Sidebar — site switcher, nav, bottom row
    22.  Topbar — search, notifications, user menu
    23.  Utility helpers (stack, cluster, grid, icon)
    24.  Accessibility + reduced motion
   ===================================================================== */


/* ---- 0. Self-hosted Inter (woff2, latin subset) ----------------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('/assets/fonts/inter/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('/assets/fonts/inter/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
    src: url('/assets/fonts/inter/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('/assets/fonts/inter/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
    src: url('/assets/fonts/inter/inter-800.woff2') format('woff2'); }


/* ---- 1. Reset + base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html.admin {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    line-height: 1.5;
    color-scheme: light;
}
html.admin.dark { color-scheme: dark; }

body.admin {
    margin: 0;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--admin-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    min-height: 100vh;
}

/* Element resets are wrapped in :where() so they carry ZERO specificity — any
   .admin-* component class always wins. (Same principle as Tailwind Preflight.)
   Without this, a body.admin <el> reset (0,1,2) silently out-ranks a single-class
   BEM rule (0,1,0) and strips the component's background / size / colour. */
:where(body.admin img, body.admin svg, body.admin video, body.admin picture) {
    max-width: 100%; height: auto; display: block;
}
:where(body.admin button, body.admin input, body.admin select, body.admin textarea) {
    font: inherit; color: inherit;
}
:where(body.admin button) { background: none; border: 0; padding: 0; cursor: pointer; }
:where(body.admin ul) { list-style: none; padding: 0; margin: 0; }
:where(body.admin a) { color: hsl(var(--primary)); text-decoration: none; }
:where(body.admin a:hover) { text-decoration: underline; text-underline-offset: 2px; }
body.admin :focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
    border-radius: var(--admin-radius-sm);
}


/* ---- 2. Theme tokens (lifted verbatim from Lovable src/index.css) - */
html.admin {
    /* Surfaces */
    --background: 210 40% 98%;
    --foreground: 222 47% 11%;
    --card: 0 0% 100%;
    --card-foreground: 222 47% 11%;
    --popover: 0 0% 100%;
    --popover-foreground: 222 47% 11%;

    /* Brand */
    --oz-blue: 210 67% 39%;
    --oz-blue-deep: 213 73% 27%;
    --oz-admin-blue: 215 60% 24%;
    --oz-green: 145 63% 42%;
    --oz-amber: 38 92% 50%;
    --oz-red: 0 72% 51%;

    /* Semantic */
    --primary: 210 67% 39%;
    --primary-foreground: 0 0% 100%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 215 60% 24%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;
    --accent: 210 60% 95%;
    --accent-foreground: 215 60% 24%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 210 67% 39%;

    /* Sidebar */
    --sidebar-background: 0 0% 100%;
    --sidebar-foreground: 215 35% 30%;
    --sidebar-primary: 210 75% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 210 70% 96%;
    --sidebar-accent-foreground: 210 75% 42%;
    --sidebar-border: 214 32% 92%;
    --sidebar-ring: 210 75% 48%;

    /* Geometry */
    --admin-radius: 0.625rem;
    --admin-radius-lg: 0.625rem;
    --admin-radius-md: calc(var(--admin-radius) - 0.125rem);
    --admin-radius-sm: calc(var(--admin-radius) - 0.25rem);

    /* Fonts */
    --admin-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout metrics */
    --admin-sidebar-w: 16rem;
    --admin-sidebar-w-collapsed: 4rem;
    --admin-topbar-h: 3.5rem;
    --admin-content-px: 1.5rem;

    /* Motion */
    --admin-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --admin-shadow-sm: 0 1px 2px hsl(var(--foreground) / 0.05);
    --admin-shadow-md: 0 4px 12px -2px hsl(var(--foreground) / 0.08);
    --admin-shadow-lg: 0 12px 24px -8px hsl(var(--foreground) / 0.16);
}

html.admin.dark {
    --background: 222 47% 6%;
    --foreground: 210 40% 98%;
    --card: 222 47% 9%;
    --card-foreground: 210 40% 98%;
    --popover: 222 47% 9%;
    --popover-foreground: 210 40% 98%;
    --primary: 210 67% 49%;
    --primary-foreground: 0 0% 100%;
    --secondary: 217 33% 17%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217 33% 17%;
    --muted-foreground: 215 20% 65%;
    --accent: 217 33% 17%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62% 45%;
    --destructive-foreground: 210 40% 98%;
    --border: 217 33% 17%;
    --input: 217 33% 17%;
    --ring: 210 67% 49%;
    --sidebar-background: 215 60% 14%;
    --sidebar-foreground: 210 40% 96%;
    --sidebar-primary: 210 67% 49%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 213 73% 12%;
    --sidebar-accent-foreground: 0 0% 100%;
    --sidebar-border: 213 50% 12%;
    --sidebar-ring: 210 67% 49%;
}


/* ---- 3. Typography ---------------------------------------------- */
:where(body.admin h1, body.admin h2, body.admin h3,
       body.admin h4, body.admin h5, body.admin h6) {
    color: hsl(var(--foreground));
    font-family: inherit;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
}
:where(body.admin h1) { font-size: 1.5rem;   line-height: 1.25; font-weight: 700; }
:where(body.admin h2) { font-size: 1.25rem;  line-height: 1.3; }
:where(body.admin h3) { font-size: 1.0625rem; line-height: 1.35; }
:where(body.admin h4) { font-size: 0.9375rem; line-height: 1.4; }
:where(body.admin p)  { margin: 0 0 0.75rem; }
:where(body.admin small) { font-size: 0.8125rem; }
body.admin .admin-text-sm { font-size: 0.8125rem; }
body.admin .admin-text-xs { font-size: 0.75rem; }
body.admin .admin-text-muted { color: hsl(var(--muted-foreground)); }
body.admin .admin-text-mono {
    font-family: ui-monospace, SFMono-Regular, "Menlo", "Monaco", "Consolas", monospace;
    font-size: 0.875em;
}


/* ---- 4. Layout — shell, sidebar, topbar, main ------------------- */
.admin-shell {
    display: grid;
    grid-template-columns: var(--admin-sidebar-w) 1fr;
    grid-template-rows: var(--admin-topbar-h) 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar main";
    min-height: 100vh;
}
.admin-shell__sidebar { grid-area: sidebar; }
.admin-shell__topbar  { grid-area: topbar; }
.admin-shell__main    { grid-area: main; }

.admin-main {
    padding: 1.5rem var(--admin-content-px) 4rem;
    min-width: 0;
}
.admin-main__inner { max-width: 80rem; margin: 0 auto; }

@media (max-width: 768px) {
    .admin-shell {
        grid-template-columns: 1fr;
        grid-template-rows: var(--admin-topbar-h) 1fr;
        grid-template-areas:
            "topbar"
            "main";
    }
    .admin-shell__sidebar {
        position: fixed;
        inset: 0;
        z-index: 50;
        width: 80vw;
        max-width: 20rem;
        transform: translateX(-100%);
        transition: transform var(--admin-transition);
    }
    .admin-shell--sidebar-open .admin-shell__sidebar {
        transform: translateX(0);
    }
    .admin-shell--sidebar-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: hsl(var(--foreground) / 0.3);
        z-index: 40;
    }
}


/* ---- 5. Auth layout — split-screen (Lovable parity) ------------- */
/* Two-column shell at >=1024px: left = form card, right = marketing
 * hero (gradient + 3 feature tiles). Below 1024px the hero is hidden
 * and the form pane fills the viewport. */
.admin-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: hsl(var(--background));
}
@media (min-width: 64rem) {
    .admin-auth { grid-template-columns: 1fr 1fr; }
}

.admin-auth__pane {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    min-height: 100vh;
}
@media (min-width: 64rem) {
    .admin-auth__pane { padding: 3rem; }
}

.admin-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    font-weight: 700;
    font-size: 1rem;
    color: hsl(var(--primary));
    text-decoration: none;
}
.admin-auth__brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: var(--admin-radius-sm);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.admin-auth__center {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.admin-auth__card {
    width: 100%;
    max-width: 24rem;
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 0;
    border-radius: var(--admin-radius);
    padding: 2rem;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 64rem) {
    .admin-auth__card { box-shadow: var(--admin-shadow-sm); }
}

.admin-auth__title {
    text-align: left;
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.admin-auth__subtitle {
    text-align: left;
    margin: 0.25rem 0 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}
.admin-auth__footer {
    text-align: center;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
}
.admin-auth__copyright {
    margin: 0;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Right pane — marketing hero. Hidden below 1024px. */
.admin-auth__hero {
    display: none;
    position: relative;
    padding: 3rem;
    color: #fff;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: linear-gradient(135deg,
        hsl(var(--oz-admin-blue)) 0%,
        hsl(var(--oz-blue-deep)) 50%,
        hsl(var(--oz-blue)) 100%);
}
@media (min-width: 64rem) {
    .admin-auth__hero { display: flex; }
}
.admin-auth__hero-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, #fff 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.admin-auth__hero-inner { position: relative; }
.admin-auth__hero .admin-auth__hero-headline {
    margin: 0;
    font-size: 1.875rem;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    max-width: 28rem;
}
.admin-auth__hero .admin-auth__hero-blurb {
    margin: 1rem 0 0;
    max-width: 28rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}
.admin-auth__features {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 32rem;
}
.admin-auth__feature {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--admin-radius);
    padding: 1rem;
}
.admin-auth__feature-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-bottom: 0.5rem;
}
.admin-auth__feature-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* SSO stack + "or with email" divider used by the login card */
.admin-auth__sso {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.admin-auth__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-auth__divider::before,
.admin-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: hsl(var(--border));
}

/* Lovable login form details: forgot link inline with password label,
 * remember-me + magic-link row beneath the password input */
.admin-auth__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-auth__label-link {
    font-size: 0.75rem;
    color: hsl(var(--primary));
    text-decoration: none;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.admin-auth__label-link:hover { text-decoration: underline; }
.admin-auth__form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Signup wizard — stepper, password strength, template radios, summary */
.admin-auth__stepper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.admin-auth__step-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}
.admin-auth__step-item {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}
.admin-auth__step-item:last-child { flex: 0 0 auto; }
.admin-auth__step-dot {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    transition: background var(--admin-transition), color var(--admin-transition);
}
.admin-auth__step-dot--active {
    background: hsl(var(--oz-blue));
    color: #fff;
}
.admin-auth__step-dot--done {
    background: hsl(var(--oz-green));
    color: #fff;
}
.admin-auth__step-check { width: 0.875rem; height: 0.875rem; }
.admin-auth__step-line {
    flex: 1;
    height: 2px;
    margin: 0 0.5rem;
    background: hsl(var(--muted));
    transition: background var(--admin-transition);
}
.admin-auth__step-line--done { background: hsl(var(--oz-green)); }
.admin-auth__step-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    gap: 0.5rem;
    min-width: 0;
}
.admin-auth__step-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}
.admin-auth__step-label strong { font-weight: 600; }
.admin-auth__step-count {
    color: hsl(var(--muted-foreground));
    flex: 0 0 auto;
}
.admin-auth__progress {
    height: 0.25rem;
    background: hsl(var(--muted));
    border-radius: 9999px;
    overflow: hidden;
}
.admin-auth__progress-bar {
    height: 100%;
    background: hsl(var(--oz-blue));
    transition: width var(--admin-transition);
}

/* Step content wrapper — each step is a flex column. */
.admin-auth__step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Password strength meter */
.admin-auth__pw-meter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.admin-auth__pw-bar {
    flex: 1;
    height: 0.375rem;
    border-radius: 9999px;
    background: hsl(var(--muted));
    overflow: hidden;
}
.admin-auth__pw-fill {
    height: 100%;
    transition: width var(--admin-transition), background var(--admin-transition);
}
.admin-auth__pw-fill--weak   { background: hsl(var(--destructive)); }
.admin-auth__pw-fill--fair   { background: hsl(var(--oz-amber)); }
.admin-auth__pw-fill--good   { background: hsl(var(--oz-blue)); }
.admin-auth__pw-fill--strong { background: hsl(var(--oz-green)); }
.admin-auth__pw-label {
    width: 3rem;
    text-align: right;
    font-size: 0.6875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}
.admin-auth__pw-rules {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
}
.admin-auth__pw-rules li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.admin-auth__pw-rule-icon { width: 0.75rem; height: 0.75rem; opacity: 0.4; }
.admin-auth__pw-rule--ok { color: hsl(var(--oz-green)); }
.admin-auth__pw-rule--ok .admin-auth__pw-rule-icon { opacity: 1; }

/* Template radio cards */
.admin-auth__templates {
    display: grid;
    gap: 0.75rem;
}
.admin-auth__template {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    cursor: pointer;
    transition: border-color var(--admin-transition), background var(--admin-transition);
}
.admin-auth__template:hover { border-color: hsl(var(--muted-foreground) / 0.4); }
.admin-auth__template--selected {
    border-color: hsl(var(--oz-blue));
    background: hsl(var(--oz-blue) / 0.05);
}
.admin-auth__template-thumb {
    flex: 0 0 auto;
    width: 5rem;
    height: 3.5rem;
    border-radius: var(--admin-radius-sm);
    background: linear-gradient(135deg, hsl(var(--oz-admin-blue)), hsl(var(--oz-blue)));
}
.admin-auth__template-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.admin-auth__template-name { font-size: 0.875rem; font-weight: 600; }
.admin-auth__template-desc { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.admin-auth__template-radio { margin-top: 0.25rem; flex: 0 0 auto; }

/* Confirm step — summary card + terms rows */
.admin-auth__summary {
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    background: hsl(var(--muted) / 0.3);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.admin-auth__summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}
.admin-auth__summary-row > span:last-child {
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}
.admin-auth__terms-row {
    align-items: flex-start;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
}
.admin-auth__terms-row .admin-checkbox { margin-top: 0.125rem; }

/* Wizard nav row (Back + Continue) */
.admin-auth__wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
}

/* Two-column input grid utility used by step 0 + step 1. */
.admin-grid {
    display: grid;
    gap: 0.75rem;
}
.admin-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Sent / confirmation cards — forgot-password, magic-link, verify-email */
.admin-auth__sent {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.875rem;
    padding: 0.5rem 0 0.25rem;
}
.admin-auth__sent-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
}
.admin-auth__sent-icon--success { background: hsl(var(--oz-green) / 0.12); color: hsl(var(--oz-green)); }
.admin-auth__sent-icon--info    { background: hsl(var(--oz-blue) / 0.12);  color: hsl(var(--oz-blue)); }
.admin-auth__sent-blurb {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
    max-width: 22rem;
}
.admin-auth__sent-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
}
.admin-auth__sent-actions > * { flex: 1; justify-content: center; }

.admin-auth__hint {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
    margin: 0.5rem 0 0;
}

/* OTP — six segmented digit slots for the 2FA challenge */
.admin-auth__otp {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.admin-auth__otp-slot {
    width: 2.75rem;
    height: 3.25rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-sm);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: border-color var(--admin-transition), box-shadow var(--admin-transition);
}
.admin-auth__otp-slot:focus {
    outline: none;
    border-color: hsl(var(--oz-blue));
    box-shadow: 0 0 0 3px hsl(var(--oz-blue) / 0.18);
}

/* Invite metadata card — name + role + token chip */
.admin-auth__invite-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    background: hsl(var(--muted) / 0.3);
    margin: 1rem 0;
}
.admin-auth__invite-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: hsl(var(--oz-blue) / 0.1);
    color: hsl(var(--oz-blue));
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.admin-auth__invite-body { font-size: 0.875rem; }
.admin-auth__invite-email { font-weight: 600; }
.admin-auth__invite-token {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}
.admin-auth__invite-token code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: hsl(var(--background));
    padding: 0.0625rem 0.25rem;
    border-radius: var(--admin-radius-sm);
}

/* Onboarding wizard — horizontal step pills above the form */
.admin-auth__onboard-steps {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.375rem;
}
.admin-auth__onboard-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--admin-radius-sm);
    border: 1px solid transparent;
    transition: background var(--admin-transition), border-color var(--admin-transition);
}
.admin-auth__onboard-step--active {
    background: hsl(var(--background));
    border-color: hsl(var(--border));
}
.admin-auth__onboard-step-mark {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    font-size: 0.6875rem;
    font-weight: 700;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    flex: 0 0 auto;
}
.admin-auth__onboard-step--active .admin-auth__onboard-step-mark {
    background: hsl(var(--oz-blue));
    color: white;
}
.admin-auth__onboard-step--done .admin-auth__onboard-step-mark {
    background: hsl(var(--oz-green));
    color: white;
}
.admin-auth__onboard-step-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    line-height: 1.2;
}
.admin-auth__onboard-step--active .admin-auth__onboard-step-title,
.admin-auth__onboard-step--done .admin-auth__onboard-step-title {
    color: hsl(var(--foreground));
}
.admin-auth__onboard-step-desc {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.3;
    margin-top: 0.125rem;
}
.admin-auth__onboard-h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}
.admin-auth__invite-row {
    display: grid;
    grid-template-columns: 1fr 8.75rem;
    gap: 0.5rem;
}
.admin-auth__launch {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem 0;
    gap: 0.75rem;
}
.admin-auth__launch-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    background: hsl(var(--oz-green) / 0.12);
    color: hsl(var(--oz-green));
    display: grid;
    place-items: center;
}

/* x-cloak — Alpine attribute to hide elements until init paints. */
[x-cloak] { display: none !important; }


/* ---- Operator dashboard (Lovable OperatorDashboard parity) ------ */
.admin-dash-kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 40rem) {
    .admin-dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
    .admin-dash-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.admin-dash-kpi {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.admin-dash-kpi__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}
.admin-dash-kpi__label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-dash-kpi__icon {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--muted-foreground));
    flex: 0 0 auto;
}
.admin-dash-kpi__value {
    font-size: 1.5rem;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.admin-card__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-dash-alert-icon {
    width: 1rem;
    height: 1rem;
    color: hsl(var(--muted-foreground));
}

.admin-dash-alert-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 40rem) {
    .admin-dash-alert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-dash-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
    padding: 0.75rem;
    background: hsl(var(--card));
    min-width: 0;
}
.admin-dash-alert__label {
    font-size: 0.875rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-dash-alert__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    flex: 0 0 auto;
}
.admin-dash-alert__badge--ok      { background: hsl(var(--oz-green)); }
.admin-dash-alert__badge--warning { background: hsl(var(--oz-amber)); }
.admin-dash-alert__badge--danger  { background: hsl(var(--destructive)); }
.admin-dash-alert__badge--pending {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.admin-dash-surfaces {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin: 0;
}



/* ---- Shared data primitives (stat / list / feed / meter / toolbar / detail) -
   Cross-cutting building blocks used across dashboards, account, operator and
   site surfaces. Page-family-specific cards (branch/listing/plan/payment) are
   defined alongside their own pages. Reuse these before inventing new ones. */

/* Stat tile — leading tinted icon chip + label + value + optional delta.
   (Distinct from .admin-kpi which is icon-less, and .admin-dash-kpi whose icon
   sits top-right.) Used by Business Overview, Account/Operator dashboards,
   Analytics, Reports. */
.admin-stat {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.admin-stat__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--admin-radius-md);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}
.admin-stat__icon--blue   { background: hsl(var(--oz-blue) / 0.12);  color: hsl(var(--oz-blue)); }
.admin-stat__icon--green  { background: hsl(var(--oz-green) / 0.12); color: hsl(var(--oz-green)); }
.admin-stat__icon--amber  { background: hsl(var(--oz-amber) / 0.16); color: hsl(38 90% 38%); }
.admin-stat__icon--red    { background: hsl(var(--oz-red) / 0.12);   color: hsl(var(--oz-red)); }
.admin-stat__body { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.admin-stat__label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}
.admin-stat__value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.1;
    color: hsl(var(--foreground));
    font-variant-numeric: tabular-nums;
}
.admin-stat__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.admin-stat__delta--up   { color: hsl(var(--oz-green)); }
.admin-stat__delta--down { color: hsl(var(--oz-red)); }
.admin-stat__delta--flat { color: hsl(var(--muted-foreground)); }

/* List — divided rows for "Recent sites / Latest leads / Top pages" panels.
   title+subtitle on the left, badge or meta on the right. Sits inside an
   .admin-card with a flush body. */
.admin-list { display: flex; flex-direction: column; }
.admin-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid hsl(var(--border));
    transition: background var(--admin-transition);
    text-decoration: none;
    color: inherit;
}
.admin-list-row:last-child { border-bottom: 0; }
.admin-list-row:hover { background: hsl(var(--muted) / 0.4); text-decoration: none; }
.admin-list-row__main { min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.admin-list-row__title {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-list-row__sub { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.admin-list-row__meta {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: right;
}
@media (max-width: 640px) { .admin-list-row__meta { display: none; } }

/* Feed — activity / audit timeline. Round tinted icon + actor/action line +
   meta (time · IP · resource). Tones map to event categories. */
.admin-feed { display: flex; flex-direction: column; }
.admin-feed__item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid hsl(var(--border));
    transition: background var(--admin-transition);
}
.admin-feed__item:last-child { border-bottom: 0; }
.admin-feed__item:hover { background: hsl(var(--muted) / 0.3); }
.admin-feed__item--unread { background: hsl(var(--primary) / 0.04); }
.admin-feed__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}
.admin-feed__icon--auth     { background: hsl(var(--oz-blue) / 0.12);  color: hsl(var(--oz-blue)); }
.admin-feed__icon--content  { background: hsl(var(--oz-green) / 0.12); color: hsl(var(--oz-green)); }
.admin-feed__icon--publish  { background: hsl(var(--oz-green) / 0.12); color: hsl(var(--oz-green)); }
.admin-feed__icon--settings { background: hsl(var(--muted));           color: hsl(var(--muted-foreground)); }
.admin-feed__icon--billing  { background: hsl(var(--oz-amber) / 0.16); color: hsl(38 90% 38%); }
.admin-feed__icon--security { background: hsl(var(--oz-red) / 0.12);   color: hsl(var(--oz-red)); }
.admin-feed__icon--lead     { background: hsl(var(--oz-blue) / 0.12);  color: hsl(var(--oz-blue)); }
.admin-feed__icon--dns      { background: hsl(var(--oz-amber) / 0.16); color: hsl(38 90% 38%); }
.admin-feed__icon--comment  { background: hsl(262 60% 95%);            color: hsl(262 52% 47%); }
.admin-feed__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.admin-feed__line { font-size: 0.875rem; color: hsl(var(--foreground)); }
.admin-feed__line strong { font-weight: 600; }
.admin-feed__line .admin-feed__muted { color: hsl(var(--muted-foreground)); font-weight: 400; }
.admin-feed__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
}

/* Detail header — back arrow + title block + status badge + action cluster.
   Used by every detail/editor page (site, branch, team member, review, lead). */
.admin-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.admin-detail-header__back {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--admin-radius-md);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    flex: 0 0 auto;
    transition: background var(--admin-transition), color var(--admin-transition);
}
.admin-detail-header__back:hover { background: hsl(var(--accent)); color: hsl(var(--foreground)); }
.admin-detail-header__titles { min-width: 0; flex: 1; }
.admin-detail-header__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-detail-header__sub { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }
.admin-detail-header__actions { display: flex; gap: 0.5rem; flex: 0 0 auto; }

/* Toolbar / filter bar — search + selects + right-aligned controls above a
   table or card grid. */
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.admin-toolbar__spacer { flex: 1; }
.admin-search { position: relative; flex: 1 1 16rem; max-width: 24rem; }
.admin-search__icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
    pointer-events: none;
}
.admin-search .admin-input { padding-left: 2rem; }

/* Segmented control — grid/list toggle and small tab-like button groups. */
.admin-segmented {
    display: inline-flex;
    padding: 0.1875rem;
    gap: 0.1875rem;
    background: hsl(var(--muted));
    border-radius: var(--admin-radius-md);
}
.admin-segmented__btn {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 1.75rem;
    padding: 0 0.625rem;
    border: 0;
    background: transparent;
    color: hsl(var(--muted-foreground));
    border-radius: var(--admin-radius-sm);
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background var(--admin-transition), color var(--admin-transition);
}
.admin-segmented__btn--active {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: var(--admin-shadow-sm);
}

/* Meter / progress — generic horizontal bar for usage, capacity, Core Web
   Vitals and share-of-traffic. Generalised from the auth progress bar. */
.admin-meter { display: flex; flex-direction: column; gap: 0.375rem; }
.admin-meter__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
}
.admin-meter__label { color: hsl(var(--muted-foreground)); }
.admin-meter__value { font-weight: 500; font-variant-numeric: tabular-nums; }
.admin-progress {
    height: 0.5rem;
    border-radius: 9999px;
    background: hsl(var(--muted));
    overflow: hidden;
}
.admin-progress__bar {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 9999px;
    transition: width var(--admin-transition);
}
.admin-progress__bar--green  { background: hsl(var(--oz-green)); }
.admin-progress__bar--amber  { background: hsl(var(--oz-amber)); }
.admin-progress__bar--red    { background: hsl(var(--oz-red)); }
.admin-progress--segmented { display: flex; background: transparent; gap: 2px; }
.admin-progress--segmented .admin-meter__seg { height: 100%; }
.admin-meter__seg--good  { background: hsl(var(--oz-green)); }
.admin-meter__seg--warn  { background: hsl(var(--oz-amber)); }
.admin-meter__seg--poor  { background: hsl(var(--oz-red)); }

/* Icon tile — small square icon container (connected accounts, sessions,
   service rows, payment methods). */
.admin-icon-tile {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--admin-radius-md);
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

/* Bordered list row — icon tile + title/meta on the left, control on the right.
   (2FA sub-items, connected accounts, service/integration rows.) */
.admin-bordered-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
}
.admin-bordered-row__main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.125rem; }
.admin-bordered-row__title { font-size: 0.875rem; font-weight: 500; }
.admin-bordered-row__meta { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }


/* ---- 6. Buttons + interactive primitives ------------------------ */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--admin-radius-md);
    color: inherit;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background-color var(--admin-transition),
                color var(--admin-transition),
                border-color var(--admin-transition);
    white-space: nowrap;
}
.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.admin-btn--primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.admin-btn--primary:hover:not(:disabled) {
    background: hsl(var(--primary) / 0.9);
}
.admin-btn--secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border-color: hsl(var(--border));
}
.admin-btn--secondary:hover:not(:disabled) {
    background: hsl(var(--accent));
}
.admin-btn--ghost {
    background: transparent;
    color: hsl(var(--foreground));
}
.admin-btn--ghost:hover:not(:disabled) {
    background: hsl(var(--accent));
}
.admin-btn--outline {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}
.admin-btn--outline:hover:not(:disabled) {
    background: hsl(var(--accent));
}
.admin-btn--destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}
.admin-btn--destructive:hover:not(:disabled) {
    background: hsl(var(--destructive) / 0.9);
}
.admin-btn--sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    line-height: 1rem;
}
.admin-btn--lg {
    padding: 0.625rem 1.125rem;
    font-size: 0.9375rem;
}
.admin-btn--icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}
.admin-btn--block { width: 100%; }


/* ---- 7. Forms — inputs, labels, fields, selects, checkboxes ----- */
.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}
.admin-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    line-height: 1.25;
}
.admin-label__required { color: hsl(var(--destructive)); margin-left: 0.125rem; }
.admin-input,
.admin-textarea,
.admin-select {
    width: 100%;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--input));
    border-radius: var(--admin-radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: border-color var(--admin-transition), box-shadow var(--admin-transition);
}
.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}
.admin-input::placeholder,
.admin-textarea::placeholder {
    color: hsl(var(--muted-foreground));
}
.admin-textarea { min-height: 5rem; resize: vertical; }
.admin-select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
.admin-help {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.admin-error {
    font-size: 0.75rem;
    color: hsl(var(--destructive));
}
.admin-field--has-error .admin-input,
.admin-field--has-error .admin-textarea,
.admin-field--has-error .admin-select {
    border-color: hsl(var(--destructive));
}

.admin-checkbox,
.admin-radio {
    width: 1rem;
    height: 1rem;
    accent-color: hsl(var(--primary));
    margin: 0;
    flex: 0 0 auto;
}
.admin-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Honeypot — visually hidden, off-screen, accessible-name removed. */
.admin-honeypot {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

/* Switch — visually styled checkbox. */
.admin-switch {
    position: relative;
    display: inline-block;
    width: 2.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}
.admin-switch input {
    opacity: 0; width: 0; height: 0;
}
.admin-switch__track {
    position: absolute;
    inset: 0;
    background: hsl(var(--input));
    border-radius: 9999px;
    transition: background var(--admin-transition);
}
.admin-switch__thumb {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1rem; height: 1rem;
    background: hsl(var(--card));
    border-radius: 9999px;
    box-shadow: var(--admin-shadow-sm);
    transition: transform var(--admin-transition);
}
.admin-switch input:checked + .admin-switch__track { background: hsl(var(--primary)); }
.admin-switch input:checked ~ .admin-switch__thumb {
    transform: translateX(1rem);
}
.admin-switch input:focus-visible + .admin-switch__track {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}


/* ---- 8. Tables -------------------------------------------------- */
.admin-table-wrap {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid hsl(var(--border));
    vertical-align: middle;
}
.admin-table thead th {
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: hsl(var(--muted) / 0.4);
    border-bottom: 1px solid hsl(var(--border));
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: hsl(var(--muted) / 0.4); }
.admin-table__sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}
.admin-table__sort-btn:hover { color: hsl(var(--foreground)); }
.admin-table__row--selected { background: hsl(var(--accent) / 0.6); }
.admin-table__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.375rem;
}
.admin-table__name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.admin-table__name-meta {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}


/* ---- 9. Cards --------------------------------------------------- */
.admin-card {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    overflow: hidden;
}
.admin-card__header,
.admin-card__footer {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.admin-card__footer { border-top: 1px solid hsl(var(--border)); border-bottom: 0; }
.admin-card__title { margin: 0; font-size: 0.9375rem; font-weight: 600; }
.admin-card__body { padding: 1.25rem; }
.admin-card__body--flush { padding: 0; }


/* ---- 10. KPI tiles + sparklines --------------------------------- */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-kpi {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.admin-kpi__label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-kpi__value {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1;
    color: hsl(var(--foreground));
}
.admin-kpi__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.admin-kpi__delta--up   { color: hsl(var(--oz-green)); }
.admin-kpi__delta--down { color: hsl(var(--oz-red)); }
.admin-kpi__delta--flat { color: hsl(var(--muted-foreground)); }
.admin-kpi__spark {
    display: block;
    margin-top: 0.25rem;
    width: 100%;
    height: 2rem;
}
.admin-kpi__spark path {
    fill: none;
    stroke: hsl(var(--primary));
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.admin-kpi__spark--area path { fill: hsl(var(--primary) / 0.1); }


/* ---- 11. Tags / badges ------------------------------------------ */
.admin-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid transparent;
}
.admin-tag--neutral { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.admin-tag--info    { background: hsl(210 100% 95%); color: hsl(var(--oz-blue-deep)); }
.admin-tag--success { background: hsl(145 60% 92%); color: hsl(145 60% 22%); }
.admin-tag--warning { background: hsl(38 100% 93%);  color: hsl(38 90% 30%); }
.admin-tag--danger  { background: hsl(0 80% 95%);    color: hsl(0 72% 38%); }
.admin-tag--outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.admin-tag__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: currentColor;
    opacity: 0.6;
}
html.admin.dark .admin-tag--info    { background: hsl(210 60% 18%); color: hsl(210 80% 80%); }
html.admin.dark .admin-tag--success { background: hsl(145 40% 16%); color: hsl(145 60% 75%); }
html.admin.dark .admin-tag--warning { background: hsl(38 40% 18%);  color: hsl(38 80% 75%); }
html.admin.dark .admin-tag--danger  { background: hsl(0 40% 22%);   color: hsl(0 80% 80%); }


/* ---- 12. Status pills + filter chips ---------------------------- */
.admin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}
.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: background var(--admin-transition), border-color var(--admin-transition);
    text-decoration: none;
}
.admin-chip:hover { background: hsl(var(--accent)); text-decoration: none; }
.admin-chip--active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}
.admin-chip__count {
    font-size: 0.6875rem;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    padding: 0 0.375rem;
    border-radius: 9999px;
    line-height: 1.125rem;
}
.admin-chip--active .admin-chip__count {
    background: hsl(var(--primary-foreground) / 0.15);
    color: hsl(var(--primary-foreground));
}


/* ---- 13. Pagination --------------------------------------------- */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid hsl(var(--border));
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--card));
    border-radius: 0 0 var(--admin-radius) var(--admin-radius);
}
.admin-pagination__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.admin-pagination__link {
    min-width: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--admin-radius-sm);
    border: 1px solid transparent;
    text-align: center;
    color: hsl(var(--foreground));
    cursor: pointer;
    text-decoration: none;
}
.admin-pagination__link:hover { background: hsl(var(--accent)); text-decoration: none; }
.admin-pagination__link--current {
    border-color: hsl(var(--border));
    background: hsl(var(--card));
    font-weight: 600;
}
.admin-pagination__link--disabled { color: hsl(var(--muted-foreground)); cursor: not-allowed; }
.admin-pagination__link--disabled:hover { background: transparent; }


/* ---- 14. Empty state -------------------------------------------- */
.admin-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: hsl(var(--muted-foreground));
}
.admin-empty__icon {
    width: 3rem; height: 3rem;
    margin: 0 auto 1rem;
    color: hsl(var(--muted-foreground));
    opacity: 0.6;
}
.admin-empty__title {
    color: hsl(var(--foreground));
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.admin-empty__body {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}


/* ---- 15. Dropdown menu ------------------------------------------ */
.admin-dropdown {
    position: relative;
    display: inline-block;
}
.admin-dropdown__menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 30;
    min-width: 12rem;
    background: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
    box-shadow: var(--admin-shadow-md);
    padding: 0.25rem;
    display: none;
}
.admin-dropdown[data-open="true"] .admin-dropdown__menu { display: block; }
.admin-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border-radius: var(--admin-radius-sm);
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    border: 0;
    background: none;
}
.admin-dropdown__item:hover { background: hsl(var(--accent)); text-decoration: none; }
.admin-dropdown__item--danger { color: hsl(var(--destructive)); }
.admin-dropdown__separator {
    height: 1px;
    background: hsl(var(--border));
    margin: 0.25rem 0;
}


/* ---- 16. Dialog / modal ----------------------------------------- */
.admin-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: hsl(var(--foreground) / 0.4);
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.admin-dialog-backdrop[hidden] { display: none; }
.admin-dialog {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-lg);
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}
.admin-dialog__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.admin-dialog__title { margin: 0; font-size: 1rem; font-weight: 600; }
.admin-dialog__body { padding: 1.25rem; overflow-y: auto; }
.admin-dialog__footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}


/* ---- 17. Drawer ------------------------------------------------- */
.admin-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: hsl(var(--foreground) / 0.4);
    z-index: 55;
}
.admin-drawer-backdrop[hidden] { display: none; }
.admin-drawer {
    position: fixed;
    top: 0; bottom: 0; right: 0;
    width: 90vw;
    max-width: 32rem;
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border-left: 1px solid hsl(var(--border));
    box-shadow: var(--admin-shadow-lg);
    z-index: 56;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--admin-transition);
}
.admin-drawer[data-open="true"] { transform: translateX(0); }
.admin-drawer__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.admin-drawer__body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.admin-drawer__footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}


/* ---- 18. Tabs --------------------------------------------------- */
.admin-tabs__list {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 1rem;
    overflow-x: auto;
}
.admin-tabs__tab {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    border: 0;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}
.admin-tabs__tab:hover { color: hsl(var(--foreground)); }
.admin-tabs__tab[aria-selected="true"] {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
    font-weight: 500;
}
.admin-tabs__panel { outline: none; }
.admin-tabs__panel[hidden] { display: none; }


/* ---- 19. Toasts ------------------------------------------------- */
.admin-toasts {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: grid;
    gap: 0.5rem;
    z-index: 100;
    max-width: calc(100vw - 2rem);
}
.admin-toast {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-left: 4px solid hsl(var(--primary));
    border-radius: var(--admin-radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    box-shadow: var(--admin-shadow-md);
    min-width: 16rem;
    max-width: 24rem;
}
.admin-toast--success { border-left-color: hsl(var(--oz-green)); }
.admin-toast--error   { border-left-color: hsl(var(--destructive)); }
.admin-toast--warning { border-left-color: hsl(var(--oz-amber)); }


/* ---- 20. Breadcrumbs + page header ------------------------------ */
.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}
.admin-breadcrumb a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
}
.admin-breadcrumb a:hover { color: hsl(var(--foreground)); text-decoration: underline; }
.admin-breadcrumb__separator { color: hsl(var(--muted-foreground)); opacity: 0.6; }
.admin-breadcrumb__current { color: hsl(var(--foreground)); font-weight: 500; }

.admin-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.admin-page-header__title { margin: 0; }
.admin-page-header__subtitle {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}
.admin-page-header__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* ---- 21. Sidebar — site switcher, nav, bottom row --------------- */
.admin-sidebar {
    background: hsl(var(--sidebar-background));
    color: hsl(var(--sidebar-foreground));
    border-right: 1px solid hsl(var(--sidebar-border));
    display: flex;
    flex-direction: column;
    height: 100%;
}
.admin-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid hsl(var(--sidebar-border));
    font-weight: 700;
    font-size: 0.9375rem;
    color: hsl(var(--sidebar-foreground));
    text-decoration: none;
    flex-shrink: 0;
}
.admin-sidebar__brand-mark {
    width: 1.75rem; height: 1.75rem;
    border-radius: var(--admin-radius-sm);
    background: hsl(var(--sidebar-primary));
    color: hsl(var(--sidebar-primary-foreground));
    display: grid; place-items: center;
    font-size: 0.75rem; font-weight: 700;
}
body.admin img.admin-brand-logo {
    height: 1.75rem;
    width: auto;
    max-width: none;
    display: block;
}
.admin-sidebar__switcher {
    padding: 0.75rem 0.75rem 0;
}
.admin-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.admin-sidebar__group-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: hsl(var(--sidebar-foreground) / 0.6);
    padding: 0 0.5rem;
    margin-bottom: 0.375rem;
}
.admin-sidebar__group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--admin-radius-md);
    color: hsl(var(--sidebar-foreground));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--admin-transition), color var(--admin-transition);
}
.admin-sidebar__link:hover {
    background: hsl(var(--sidebar-accent));
    color: hsl(var(--sidebar-accent-foreground));
    text-decoration: none;
}
.admin-sidebar__link[aria-current="page"] {
    background: hsl(var(--sidebar-primary) / 0.12);
    color: hsl(var(--sidebar-primary));
}
.admin-sidebar__link-icon {
    width: 1.125rem; height: 1.125rem;
    flex: 0 0 auto;
    color: currentColor;
    opacity: 0.85;
}
.admin-sidebar__link-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    background: hsl(var(--sidebar-primary) / 0.15);
    color: hsl(var(--sidebar-primary));
    padding: 0.0625rem 0.4375rem;
    border-radius: 9999px;
}
.admin-sidebar__bottom {
    padding: 0.75rem;
    border-top: 1px solid hsl(var(--sidebar-border));
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}
.admin-sidebar__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: hsl(var(--sidebar-foreground) / 0.7);
    padding: 0.25rem 0.5rem;
}
.admin-sidebar__status-dot {
    width: 0.5rem; height: 0.5rem;
    border-radius: 9999px;
    background: hsl(var(--oz-green));
}

/* Site switcher button mounted in the sidebar header zone. */
.admin-switcher {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--admin-radius-md);
    border: 1px solid hsl(var(--sidebar-border));
    background: hsl(var(--sidebar-background));
    color: hsl(var(--sidebar-foreground));
    cursor: pointer;
    text-align: left;
}
.admin-switcher:hover { background: hsl(var(--sidebar-accent)); }
.admin-switcher__avatar {
    width: 1.75rem; height: 1.75rem;
    border-radius: var(--admin-radius-sm);
    background: hsl(var(--sidebar-primary));
    color: hsl(var(--sidebar-primary-foreground));
    display: grid; place-items: center;
    font-size: 0.6875rem; font-weight: 700;
    flex: 0 0 auto;
}
.admin-switcher__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
    flex: 1;
}
.admin-switcher__name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-switcher__meta {
    font-size: 0.6875rem;
    color: hsl(var(--sidebar-foreground) / 0.6);
}


/* ---- 22. Topbar — search, notifications, user menu -------------- */
.admin-topbar {
    background: hsl(var(--card));
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 var(--admin-content-px);
    height: var(--admin-topbar-h);
}
.admin-topbar__menu-btn {
    display: none;
}
@media (max-width: 768px) {
    .admin-topbar__menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: var(--admin-radius-md);
        color: hsl(var(--foreground));
    }
    .admin-topbar__menu-btn:hover { background: hsl(var(--accent)); }
}
.admin-topbar__breadcrumb { flex: 1; min-width: 0; }
.admin-topbar__search {
    position: relative;
    width: 18rem;
    max-width: 35vw;
}
.admin-topbar__search-input {
    width: 100%;
    background: hsl(var(--muted) / 0.4);
    border: 1px solid hsl(var(--input));
    border-radius: var(--admin-radius-md);
    padding: 0.4375rem 0.75rem 0.4375rem 2rem;
    font-size: 0.8125rem;
    color: hsl(var(--foreground));
}
.admin-topbar__search-input:focus {
    background: hsl(var(--card));
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}
.admin-topbar__search-icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.875rem; height: 0.875rem;
    color: hsl(var(--muted-foreground));
    pointer-events: none;
}
.admin-topbar__search-kbd {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6875rem;
    padding: 0.0625rem 0.375rem;
    border-radius: var(--admin-radius-sm);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    font-family: ui-monospace, monospace;
}
.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-topbar__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--admin-radius-md);
    color: hsl(var(--foreground));
    position: relative;
}
.admin-topbar__icon-btn:hover { background: hsl(var(--accent)); }
.admin-topbar__badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1rem;
    text-align: center;
}
.admin-topbar__avatar {
    width: 2rem; height: 2rem;
    border-radius: 9999px;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}


/* ---- 23. Utility helpers (stack, cluster, grid, icon) ----------- */
.admin-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -0.125em;
}
.admin-icon--xs { width: 0.75rem; height: 0.75rem; }
.admin-icon--lg { width: 1.5rem; height: 1.5rem; }
.admin-icon--xl { width: 2rem; height: 2rem; }

.admin-stack > * + * { margin-top: var(--stack-gap, 1rem); }
.admin-stack--xs > * + * { --stack-gap: 0.25rem; }
.admin-stack--sm > * + * { --stack-gap: 0.5rem; }
.admin-stack--lg > * + * { --stack-gap: 1.5rem; }

.admin-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cluster-gap, 0.5rem);
    align-items: center;
}
.admin-cluster--start { justify-content: flex-start; }
.admin-cluster--end   { justify-content: flex-end; }
.admin-cluster--between { justify-content: space-between; }

.admin-grid {
    display: grid;
    gap: 1rem;
}
.admin-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 768px) {
    .admin-grid--2,
    .admin-grid--3,
    .admin-grid--4 { grid-template-columns: 1fr; }
}

.admin-divider {
    height: 1px;
    background: hsl(var(--border));
    border: 0;
    margin: 1rem 0;
}

.admin-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
    margin: 1.5rem 0 0.5rem;
}

.admin-avatar {
    display: inline-grid;
    place-items: center;
    width: 2rem; height: 2rem;
    border-radius: 9999px;
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    font-size: 0.75rem;
    font-weight: 600;
    flex: 0 0 auto;
}
.admin-avatar--sm { width: 1.5rem; height: 1.5rem; font-size: 0.625rem; }
.admin-avatar--lg { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }

.admin-meta-row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem 1rem;
    align-items: start;
}
.admin-meta-row dt {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.125rem;
}
.admin-meta-row dd {
    margin: 0;
    font-size: 0.875rem;
}

.admin-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--admin-radius-md);
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border-left: 3px solid hsl(var(--primary));
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.admin-alert--error    { border-left-color: hsl(var(--destructive)); background: hsl(0 80% 96%); color: hsl(var(--destructive)); }
.admin-alert--success  { border-left-color: hsl(var(--oz-green));   background: hsl(145 60% 95%); color: hsl(145 60% 22%); }
.admin-alert--warning  { border-left-color: hsl(var(--oz-amber));   background: hsl(38 100% 95%); color: hsl(38 80% 28%); }
html.admin.dark .admin-alert--error    { background: hsl(0 50% 20%);  color: hsl(0 80% 85%); }
html.admin.dark .admin-alert--success  { background: hsl(145 40% 16%); color: hsl(145 60% 80%); }
html.admin.dark .admin-alert--warning  { background: hsl(38 40% 18%);  color: hsl(38 80% 80%); }


/* ---- 24. Accessibility + reduced motion ------------------------- */
@media (prefers-reduced-motion: reduce) {
    body.admin *, body.admin *::before, body.admin *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.admin-sr-only {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

[x-cloak] { display: none !important; }

/* ===== Batch 2/4/5 page-specific deltas (merged centrally) ===== */
/* -- Batch 2: Business Overview + Account Dashboard -- */
/* ---- Account: Business Overview ---- */
.admin-overview-actions {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-left: 4px solid hsl(var(--oz-amber));
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
}
.admin-overview-actions__head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.875rem; }
.admin-overview-actions__icon { width: 1.1rem; height: 1.1rem; color: hsl(var(--oz-amber)); flex: 0 0 auto; }
.admin-overview-actions__title { font-weight: 600; font-size: 0.9rem; color: hsl(var(--foreground)); }
.admin-overview-actions__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; }
@media (max-width: 640px) { .admin-overview-actions__grid { grid-template-columns: 1fr; } }

.admin-count-tile {
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
    padding: 0.75rem;
    text-align: center;
    background: hsl(var(--muted) / 0.4);
}
.admin-count-tile__value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.admin-count-tile__label { font-size: 0.7rem; font-weight: 500; margin-top: 0.25rem; }
.admin-count-tile--danger  { background: hsl(var(--oz-red) / 0.08);    border-color: hsl(var(--oz-red) / 0.3);    color: hsl(var(--oz-red)); }
.admin-count-tile--warning { background: hsl(var(--oz-amber) / 0.1);   border-color: hsl(var(--oz-amber) / 0.3);  color: hsl(38 90% 38%); }
.admin-count-tile--info    { background: hsl(var(--oz-blue) / 0.08);   border-color: hsl(var(--oz-blue) / 0.3);   color: hsl(var(--oz-blue)); }
.admin-count-tile--success { background: hsl(var(--oz-green) / 0.08);  border-color: hsl(var(--oz-green) / 0.3);  color: hsl(var(--oz-green)); }

.admin-quick-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Account: KPI head card (label + top-right icon, Lovable AccountDashboard) ---- */
.admin-kpi-head-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
}
.admin-kpi__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.admin-kpi__head-label { font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: hsl(var(--muted-foreground)); }
.admin-kpi__head-icon { width: 1rem; height: 1rem; color: hsl(var(--muted-foreground)); flex: 0 0 auto; }

/* -- Batch 4: Me/self-service -- */

/* Square avatar tile showing user initials (Profile photo row). */
.admin-avatar-tile {
    background: hsl(var(--oz-blue));
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Locale/format live-preview box (Profile > Region & locale). */
.admin-preview-box {
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--admin-radius-md);
    padding: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.admin-preview-box__label {
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: hsl(var(--muted-foreground));
}

/* Day-group heading in the Notifications activity feed. */
.admin-group-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin: 0 0 0.5rem;
    padding-left: 0.25rem;
}

/* -- Batch 5: Operator -- */
/* Operator index — clickable surface-nav cards (operator/index.php). Card chrome + foreground colour come from .admin-card; this only resets link styling and adds a hover lift. */
.admin-card--link { display: block; text-decoration: none; color: inherit; transition: border-color var(--admin-transition), box-shadow var(--admin-transition); }
.admin-card--link:hover { border-color: hsl(var(--ring)); box-shadow: var(--admin-shadow-sm); text-decoration: none; }
.admin-card--link strong { display: block; margin-bottom: 0.25rem; }

/* Right-aligned numeric table cells (operator/accounts.php Sites/MRR columns). tabular-nums keeps figures column-aligned. */
.admin-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Operator health — Services grid: bordered rows (icon tile + name/detail on the left, status badge on the right). Mirrors Lovable's 'flex items-center justify-between border rounded-md p-3' service rows; reuses .admin-icon-tile + .admin-tag for the tile and badge. (health.php) */
.admin-service-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 40rem) { .admin-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-service-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem; border: 1px solid hsl(var(--border)); border-radius: var(--admin-radius-md); background: hsl(var(--card)); min-width: 0; }
.admin-service-row__main { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.admin-service-row__text { min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.admin-service-row__name { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-service-row__meta { font-size: 0.75rem; color: hsl(var(--muted-foreground)); overflow: hidden; text-overflow: ellipsis; }

/* ===== Batch 3/6/7/8/9/10 page-specific deltas (merged centrally) ===== */

/* -- batch3 -- */
/* ============================================================================
 * batch3.css — Account-scope rebuild (sites, site_detail, users, billing,
 * branding, reports, audit). I did NOT edit the shared public/assets/admin.css —
 * please merge these centrally.
 *
 * Everything else reuses existing admin-* classes (admin-card, admin-table,
 * admin-tabs__*, admin-tag, admin-feed__*, admin-progress, admin-grid--2/3,
 * admin-meta-row, admin-stat, admin-toolbar, admin-avatar, admin-btn).
 * ==========================================================================*/

/* Inline icon sized to sit beside text (status rows, feed lines, buttons,
   payment-method tile, permission ticks). Lucide-style 1em square. */
.admin-icon--inline {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

/* Generic stacked "row with trailing tags/actions" list — used by the site
   detail Domains tab, account Users pending-invites, and Reports per-site rows.
   A flush list (parent admin-card--flush) with hairline separators. */
.admin-domain-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.admin-domain-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid hsl(var(--border));
}
.admin-domain-list__row:last-child {
    border-bottom: 0;
}
.admin-domain-list__tags {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

/* Small muted note paragraph used by the honest "coming soon" branding panels. */
.admin-note {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* Dashed upload placeholder (Branding > Logo, coming-soon). */
.admin-dropzone {
    aspect-ratio: 3 / 1;
    background: hsl(var(--muted) / 0.3);
    border: 2px dashed hsl(var(--border));
    border-radius: var(--admin-radius-md);
    display: grid;
    place-items: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    text-align: center;
}

/* Billing card meta block (Payment method > billing email / VAT footer). */
.admin-billing-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Colour-palette preview grid (Branding > Colour palette). Read-only swatches —
   per-site colours live in theme tokens, this is the brand reference set. */
.admin-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}
.admin-palette__chip {
    display: block;
    height: 4rem;
    border-radius: var(--admin-radius-md);
    border: 1px solid hsl(var(--border));
}
.admin-palette__name {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.admin-palette__hex {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* -- batch6 -- */
/* =====================================================================
   Batch 6 — site content authoring (Pages, Composer, News, Media)
   Appended to public/assets/admin.css. New BEM blocks only — no overrides
   of shared admin-* classes.
   ===================================================================== */

/* ---- Informational alert variant (admin.css ships only error/success/warning) */
.admin-alert--info {
    background: hsl(var(--primary) / 0.08);
    border: 1px solid hsl(var(--primary) / 0.25);
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-alert--info .admin-icon { color: hsl(var(--primary)); flex: 0 0 auto; }

/* ---- Tab count pill (Pages / News status tabs) ---------------------- */
.pages__count { margin-left: 0.4rem; font-size: 0.6875rem; }

/* ---- News editor ---------------------------------------------------- */
.news__tabs { margin: 1rem 0 0.75rem; }
.news__excerpt {
    max-width: 36rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news__editor {
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
    overflow: hidden;
}
.news__editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    background: hsl(var(--muted) / 0.5);
    border-bottom: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
}
.news__editor-toolbar .admin-icon { width: 1rem; height: 1rem; }
.news__editor-sep {
    width: 1px;
    height: 1.1rem;
    background: hsl(var(--border));
    margin: 0 0.25rem;
}
.news__editor-area {
    border: 0;
    border-radius: 0;
    resize: vertical;
    font-family: var(--admin-font-serif, Georgia, "Times New Roman", serif);
    line-height: 1.7;
}
.news__editor-area:focus { outline: none; box-shadow: none; }

/* ---- Media library -------------------------------------------------- */
.media {
    display: grid;
    grid-template-columns: 14rem 1fr;
    gap: 1.5rem;
    align-items: start;
}
.media__rail { display: flex; flex-direction: column; gap: 0.75rem; }
.media__rail-heading {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: hsl(var(--muted-foreground));
    padding: 0.375rem 0.5rem 0.25rem;
    font-weight: 600;
}
.media__folder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--admin-radius-sm);
    font-size: 0.8125rem;
    color: hsl(var(--foreground));
    text-decoration: none;
}
.media__folder:hover { background: hsl(var(--accent)); }
.media__folder--active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.media__folder--active:hover { background: hsl(var(--primary)); }
.media__folder--active .media__folder-count { color: hsl(var(--primary-foreground) / 0.85); }
.media__folder-name { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.media__folder-name .admin-icon { width: 0.9rem; height: 0.9rem; flex: 0 0 auto; }
.media__folder-count { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.media__storage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.media__main { min-width: 0; }
.media__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.75rem;
}
.media__tile {
    display: flex;
    flex-direction: column;
    text-align: left;
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
    background: hsl(var(--card));
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow var(--admin-transition), border-color var(--admin-transition);
}
.media__tile:hover { box-shadow: var(--admin-shadow); border-color: hsl(var(--primary) / 0.4); }
.media__tile-thumb {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--muted));
}
.media__tile-thumb--image { background: linear-gradient(135deg, hsl(var(--primary) / 0.35), hsl(var(--primary) / 0.15)); color: hsl(var(--primary)); }
.media__tile-name {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.media__tile-meta {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    padding: 0 0.5rem 0.5rem;
}

/* List view — collapse the grid into single-column rows. */
.media__grid--list { grid-template-columns: 1fr; gap: 0; }
.media__grid--list .media__tile {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    padding: 0.4rem 0.5rem;
}
.media__grid--list .media__tile-thumb {
    width: 2.25rem;
    height: 2.25rem;
    aspect-ratio: auto;
    border-radius: var(--admin-radius-sm);
    flex: 0 0 auto;
}
.media__grid--list .media__tile-thumb .admin-icon { width: 1rem; height: 1rem; }
.media__grid--list .media__tile-name { padding: 0; flex: 1; }
.media__grid--list .media__tile-meta { padding: 0; white-space: nowrap; }

/* Detail drawer contents. */
.media__preview {
    aspect-ratio: 16 / 9;
    border-radius: var(--admin-radius-md);
    display: grid;
    place-items: center;
    background: hsl(var(--muted));
    margin-bottom: 1rem;
}
.media__preview--image { background: linear-gradient(135deg, hsl(var(--primary) / 0.4), hsl(var(--primary) / 0.15)); }
.media__props {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.4rem 0.75rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
}
.media__props dt { color: hsl(var(--muted-foreground)); }
.media__props dd { margin: 0; word-break: break-word; }
.media__used-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: hsl(var(--muted-foreground));
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.media__used-row {
    font-size: 0.8125rem;
    padding: 0.35rem 0.5rem;
    background: hsl(var(--muted) / 0.5);
    border-radius: var(--admin-radius-sm);
    margin-bottom: 0.25rem;
}

@media (max-width: 900px) {
    .media { grid-template-columns: 1fr; }
    .media__rail { flex-direction: row; flex-wrap: wrap; }
    .media__rail > .admin-card { flex: 1 1 12rem; }
}

/* -- batch7 -- */
/* ============================================================================
 * Batch 7 — Listings (RealMove read-only) + Leads parity.
 * New classes only; SHARED public/assets/admin.css was NOT edited.
 * Merge centrally. Conventions: BEM, .admin- prefix, HSL var() tokens.
 * ========================================================================== */

/* ---- Callout / info banner -------------------------------------------------
 * Inline notice used to flag the read-only nature of the RealMove listings
 * surface (listings/index.php + listings/show.php). Icon on the left, text on
 * the right. The --info modifier tints it with the brand blue. */
.admin-callout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.875rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius-md);
    background: hsl(var(--muted) / 0.4);
    font-size: 0.875rem;
    line-height: 1.5;
    color: hsl(var(--foreground));
}
.admin-callout svg {
    flex: 0 0 auto;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.0625rem;
    color: hsl(var(--muted-foreground));
}
.admin-callout strong { font-weight: 600; }
.admin-callout--info {
    background: hsl(var(--oz-blue) / 0.08);
    border-color: hsl(var(--oz-blue) / 0.25);
}
.admin-callout--info svg { color: hsl(var(--oz-blue)); }

/* ---- Listing card grid -----------------------------------------------------
 * Responsive auto-fill grid of property cards rendered live from RealMove
 * (listings/index.php). Cards are whole-card links to the read-only detail. */
.admin-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.admin-listing-card {
    display: flex;
    flex-direction: column;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--admin-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color var(--admin-transition), box-shadow var(--admin-transition);
}
.admin-listing-card:hover {
    border-color: hsl(var(--ring));
    box-shadow: var(--admin-shadow-md);
    text-decoration: none;
}

.admin-listing-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: hsl(var(--muted));
    overflow: hidden;
}
.admin-listing-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.admin-listing-card__media-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: hsl(var(--muted-foreground));
}
.admin-listing-card__media-fallback svg { width: 2.25rem; height: 2.25rem; }

.admin-listing-card__badge {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--admin-radius-sm);
    background: hsl(var(--oz-blue));
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
}

.admin-listing-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.875rem 1rem 1rem;
}
.admin-listing-card__price {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    color: hsl(var(--foreground));
    font-variant-numeric: tabular-nums;
}
.admin-listing-card__address {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-listing-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin: 0.125rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}
.admin-listing-card__specs li {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
}
.admin-listing-card__specs svg { width: 0.875rem; height: 0.875rem; }
.admin-listing-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.375rem;
    padding-top: 0.625rem;
    border-top: 1px solid hsl(var(--border));
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* -- batch8 -- */
/* ===========================================================================
   Batch 8 — Team (staff) + Branches admin sections
   Appends to public/assets/admin.css. BEM, .admin- prefix.
   =========================================================================== */

/* ---- Team cards (centered, gradient-initial avatar) -------------------- */
.admin-team-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}
.admin-team-card__avatar {
    display: inline-grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
}
.admin-team-card__photo {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 9999px;
    object-fit: cover;
}
.admin-team-card__name {
    font-weight: 600;
    font-size: 0.9375rem;
}
.admin-team-card__title {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}
.admin-team-card__branch {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.admin-team-card__status {
    margin-top: 0.125rem;
}
.admin-team-card .admin-btn--block {
    margin-top: 0.5rem;
}

/* ---- Team member detail aside ----------------------------------------- */
.admin-team-detail__aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}
.admin-team-detail__avatar {
    display: inline-grid;
    place-items: center;
    width: 7rem;
    height: 7rem;
    border-radius: 9999px;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
}
.admin-team-detail__photo {
    width: 7rem;
    height: 7rem;
    border-radius: 9999px;
    object-fit: cover;
}
.admin-team-detail__name {
    font-weight: 600;
    font-size: 1rem;
}
.admin-team-detail__branch {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}
.admin-team-detail__branch svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ---- Branch card grid (responsive: 1 / sm 2 / lg 3) ------------------- */
.admin-branch-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .admin-branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .admin-branch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.admin-branch-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.admin-branch-card__banner {
    height: 7rem;
    flex: 0 0 auto;
}
.admin-branch-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.admin-branch-card__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.admin-branch-card__heading {
    min-width: 0;
}
.admin-branch-card__name {
    font-weight: 600;
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-branch-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.375rem;
}
.admin-branch-card__meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}
.admin-branch-card__meta-row svg {
    width: 0.875rem;
    height: 0.875rem;
    flex: 0 0 auto;
}
.admin-branch-card__meta-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-branch-card .admin-btn--block {
    margin-top: 0.25rem;
}

/* ---- Branch detail: hours + services ---------------------------------- */
.admin-branch-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.admin-branch-services .admin-tag svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* -- batch9 -- */
/* ============================================================================
 * Batch 9 — per-site Reviews / Analytics / SEO / Activity admin pages.
 * Append to public/assets/admin.css (a shared file — do not edit directly here).
 * Everything else these pages need (.admin-stat, .admin-meter, .admin-progress,
 * .admin-feed, .admin-chips, .admin-table, .admin-card, .admin-grid--*) already
 * exists in admin.css; the only net-new primitive is the star-rating glyph row.
 * ========================================================================== */

/* Star rating row — amber filled/hollow glyphs, used in the reviews table and
   the review detail header. Tabular spacing keeps columns aligned. */
.admin-stars {
    color: hsl(var(--oz-amber));
    letter-spacing: 0.08em;
    font-size: 0.9375rem;
    line-height: 1;
    white-space: nowrap;
}

/* -- batch10 -- */
/* ===========================================================================
   Batch 10 — Per-site Settings hub + sections
   Appends to public/assets/admin.css (shared file is not edited directly).
   =========================================================================== */

/* Danger-zone row: a bordered row tinted with the destructive colour, used in
   the General settings "Delete site" panel. Mirrors Lovable's
   `border-destructive/30` card row. */
.admin-bordered-row--danger {
    border-color: hsl(var(--destructive) / 0.3);
    background: hsl(var(--destructive) / 0.04);
}
html.admin.dark .admin-bordered-row--danger {
    background: hsl(var(--destructive) / 0.12);
}

/* Read-only switch: shows a category's default opt-in state without allowing a
   toggle (e.g. the Cookie categories defaults, "Strictly necessary" always on).
   Mirrors Lovable's `<Switch disabled />`. */
.admin-switch--readonly {
    cursor: not-allowed;
    opacity: 0.7;
}
.admin-switch--readonly input { cursor: not-allowed; }

/* Settings hub card icon tile — the rounded accent square that fronts each
   section card on the settings landing grid (settings/hub.php). */
.admin-settings-hub__icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--admin-radius-md);
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

/* ---- Whole-panel verification fixes (referenced-but-undefined classes) ---- */
.admin-tabs { display: block; }
.admin-branch-hours { font-size: 0.8125rem; }
.admin-branch-hours dt { font-weight: 500; color: hsl(var(--muted-foreground)); }
.admin-palette__swatch {
    display: block;
    height: 4rem;
    border-radius: var(--admin-radius-md);
    border: 1px solid hsl(var(--border));
}
