/* AdminPortal css 01: Base element styles, typography metrics, scrollbars, layout primitives.

   Colour lives in 02-tokens.css. This file deliberately declares NO colour value:
   if a rule here needs one it reads a role token. That is what makes both themes
   fall out of one set of rules instead of two.

   The font is requested by Components/App.razor via <link>. The @import that used
   to sit here duplicated that request for no visual difference. */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    --container-max: 1280px;
    --section-px: 20px;
}

@media (min-width: 768px) {
    :root { --section-px: 32px; }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Scrollbars
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-pill);
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
    background-clip: padding-box;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* Retired background effects (aurora wash, star field, noise overlay): the markup
   that emitted them was removed from all five auth pages, so the display:none kill
   switch that used to live here has been deleted with it. The reference language is
   flat - surfaces are separated by a hairline, not by light. Do not reintroduce. */

/* ============================================
   Layout
   ============================================ */

.public-layout {
    min-height: 100vh;
    background: var(--background);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--section-px);
}

/* ============================================
   Focus

   One visible focus treatment for everything that is not styled by hand. Never
   remove the outline without replacing it: keyboard users lose the caret.
   ============================================ */

:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
