@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ==========================================================================
   WGG - sign-in
   One stylesheet, shared by every portal's auth gate.

   The direction is a night console: a near-black canvas lit by a single
   engineered source rather than scattered colour, a technical lattice that
   fades toward the edges, film grain over the whole thing to kill banding,
   and panels that are hairline-ruled glass rather than floating white boxes.
   Display type is Instrument Sans; field labels are mono small-caps, which
   is what makes it read as an instrument instead of a form.

   The gate is deliberately dark on every portal, whatever theme the app
   behind it uses. A fixed front door is the point - it is the one screen
   every employee sees, and it should look the same in all of them.

   Nothing here applies until an element is given .glass-auth, so it cannot
   leak into an app shell: the gate opts in, the rest of the page is
   untouched.

   How a page opts in
   ------------------
   <link rel="stylesheet" href="/shared/glass-auth.css">   (in <head>)
   .glass-auth     the full-screen gate wrapper (paints the canvas)
   .glass-card     the panel - also applied to any .card / .gate-card inside
   .glass-pad      panel padding, for the layouts whose panel is a bare column
   .glass-aside    the tall column on the split layouts
   .glass-note     an inset note inside a panel (demo-mode boxes)
   .glass-option   a selectable row inside a panel (agent pickers)
   .glass-btn      the primary action, where a portal has no .btn-primary

   Selectors are two classes deep by design, so they win against the Tailwind
   utilities and @apply components already sitting on these elements, in
   whichever order the stylesheets land. Per-portal accents are variables:
   set --g-accent / --g-accent-rgb on the wrapper.
   ========================================================================== */

.glass-auth {
    /* ---- light source -------------------------------------------------- */
    --g-accent: #3d8bff;
    --g-accent-rgb: 61 139 255;
    --g-accent-deep: #00397D;

    /* ---- canvas -------------------------------------------------------- */
    --g-void: #04060b;
    --g-bloom: rgb(26 86 198 / .55);      /* the main source, behind the panel */
    --g-bloom-cool: rgb(12 110 150 / .34); /* cool fill, lower left           */
    --g-bloom-warm: rgb(180 83 9 / .16);   /* warm counterpoint, upper right  */

    /* ---- ink ----------------------------------------------------------- */
    --g-ink: #e9edf6;
    --g-dim: rgb(233 237 246 / .56);
    --g-faint: rgb(233 237 246 / .36);
    --g-line: rgb(233 237 246 / .09);
    --g-line-lit: rgb(233 237 246 / .17);

    /* ---- surfaces ------------------------------------------------------ */
    --g-pane: rgb(255 255 255 / .055);
    --g-well: rgb(255 255 255 / .04);
    --g-well-lit: rgb(255 255 255 / .07);

    position: relative;
    isolation: isolate;
    color: var(--g-ink);
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
}

/* ---- the canvas: base, bloom, vignette, grain ---------------------------
   Layer order is top-down, so grain sits over the light. The grain is an
   inline turbulence filter rather than an image request - it is what stops
   large soft gradients from banding on an 8-bit display. */
.glass-auth::before,
.glass-auth::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* --g-px / --g-py are nudged by the pointer (see glass-auth.js). The light and
   the lattice move against each other at different rates, which is what reads
   as depth rather than as a background that happens to slide about. */
.glass-auth::before {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E"),
        radial-gradient(130% 92% at 55% 38%, transparent 32%, rgb(0 0 0 / .72) 100%),
        radial-gradient(24rem 17rem at calc(58% + var(--g-px, 0px) * 1.6) calc(36% + var(--g-py, 0px) * 1.6), rgb(var(--g-accent-rgb) / .20), transparent 72%),
        radial-gradient(48rem 34rem at calc(58% + var(--g-px, 0px)) calc(30% + var(--g-py, 0px)), var(--g-bloom), transparent 70%),
        radial-gradient(40rem 32rem at calc(4% - var(--g-px, 0px) * .6) calc(92% - var(--g-py, 0px) * .6), var(--g-bloom-cool), transparent 68%),
        radial-gradient(32rem 24rem at calc(96% - var(--g-px, 0px) * .5) calc(4% - var(--g-py, 0px) * .5), var(--g-bloom-warm), transparent 66%),
        var(--g-void);
    background-size: 200px 200px, auto, auto, auto, auto, auto, auto;
    transition: filter .5s ease;
}

/* the field being worked in gets a little more light */
.glass-auth:focus-within::before { filter: brightness(1.14) saturate(1.06); }

/* the lattice - structure for the void, faded out so it never becomes wallpaper */
.glass-auth::after {
    background-image:
        linear-gradient(var(--g-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--g-line) 1px, transparent 1px);
    background-size: 68px 68px;
    background-position: calc(var(--g-px, 0px) * -.5) calc(var(--g-py, 0px) * -.5);
    opacity: .5;
    -webkit-mask-image: radial-gradient(42% 42% at calc(50% + var(--g-px, 0px) * 2.2) calc(45% + var(--g-py, 0px) * 2.2), #000 0%, rgb(0 0 0 / .35) 55%, transparent 100%);
    mask-image: radial-gradient(42% 42% at calc(50% + var(--g-px, 0px) * 2.2) calc(45% + var(--g-py, 0px) * 2.2), #000 0%, rgb(0 0 0 / .35) 55%, transparent 100%);
    animation: g-breathe 24s ease-in-out infinite alternate;
}

@keyframes g-breathe {
    from { transform: translate3d(0, 0, 0) scale(1); opacity: .5; }
    to   { transform: translate3d(0, -14px, 0) scale(1.03); opacity: .34; }
}

/* ======================= type ============================================ */
.glass-auth h1,
.glass-auth h2,
.glass-auth h3,
.glass-auth .font-display {
    font-family: 'Instrument Sans', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -.028em;
    color: var(--g-ink);
}

/* Size stays with each portal - the gates set their own display scale and
   this layer only changes the face, the weight and the tracking. */

/* Every portal's text utilities were pitched against a light page. Inside the
   gate they are remapped rather than edited out of the markup, so the gates
   stay readable without fourteen files diverging. */
.glass-auth .text-slate-900,
.glass-auth .text-slate-800,
.glass-auth .text-slate-700,
.glass-auth .text-brand-900,
.glass-auth .text-brand-800,
.glass-auth .text-indigo-950,
.glass-auth .text-white { color: var(--g-ink); }

.glass-auth .text-slate-600,
.glass-auth .text-slate-500,
.glass-auth .text-slate-400,
.glass-auth .text-slate-300 { color: var(--g-dim); }

.glass-auth .text-brand-700,
.glass-auth .text-brand-600,
.glass-auth .text-brand-300,
.glass-auth .text-indigo-600,
.glass-auth .text-blue-600,
.glass-auth .text-blue-400 { color: var(--g-accent); }

.glass-auth .placeholder-slate-500::placeholder { color: var(--g-faint); }

/* ======================= the panel ======================================= */
.glass-auth .glass-card,
.glass-auth .card,
.glass-auth .gate-card {
    position: relative;
    background: var(--g-pane);
    border: 0;
    border-radius: 20px;
    box-shadow:
        0 1px 0 0 rgb(255 255 255 / .06) inset,
        0 40px 90px -30px rgb(0 0 0 / .80),
        0 8px 24px -12px rgb(0 0 0 / .60);
    -webkit-backdrop-filter: blur(34px) saturate(150%);
    backdrop-filter: blur(34px) saturate(150%);
    overflow: hidden;
    animation: g-rise .62s cubic-bezier(.16, 1, .3, 1) backwards;
}

/* Finance's .card carries a dark: variant (`.dark .card`), which ties with
   `.glass-auth .card` and wins on source order because the Tailwind CDN
   injects its sheet at runtime. Qualifying by element settles it. */
.glass-auth div.card,
.glass-auth form.card,
.glass-auth div.gate-card,
.glass-auth div.glass-card {
    background: var(--g-pane);
    border: 0;
}

/* The bare-column layouts (asset tracker, HR, Connect) put their forms
   straight on the page, so there the panel carries no padding utility.
   Opt-in, so panels that already have a p-* keep their own spacing. */
.glass-auth .glass-pad { padding: 2rem; }

/* A 1px ring that catches the light at the top-left and picks up the accent
   at the bottom-right. Masked rather than bordered, so it can be a gradient. */
.glass-auth .glass-card::before,
.glass-auth .card::before,
.glass-auth .gate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    /* the first layer is the travelling highlight: a bright segment of the
       ring that follows the pointer around the edge of the panel */
    background:
        radial-gradient(16rem 16rem at var(--g-cx, 50%) var(--g-cy, -20%),
            rgb(var(--g-accent-rgb) / .85), transparent 68%),
        linear-gradient(145deg,
            rgb(255 255 255 / .34),
            rgb(255 255 255 / .06) 34%,
            transparent 58%,
            rgb(var(--g-accent-rgb) / .28));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

@keyframes g-rise {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* the one orchestrated moment: rows arrive after the panel has landed */
.glass-auth form > *,
.glass-auth .gate-card > form > * {
    animation: g-row .55s cubic-bezier(.16, 1, .3, 1) backwards;
}

.glass-auth form > *:nth-child(1) { animation-delay: .20s; }
.glass-auth form > *:nth-child(2) { animation-delay: .26s; }
.glass-auth form > *:nth-child(3) { animation-delay: .32s; }
.glass-auth form > *:nth-child(4) { animation-delay: .38s; }
.glass-auth form > *:nth-child(5) { animation-delay: .44s; }
.glass-auth form > *:nth-child(6) { animation-delay: .50s; }
.glass-auth form > *:nth-child(n+7) { animation-delay: .56s; }

@keyframes g-row {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: none; }
}

/* ======================= labels ========================================== */
.glass-auth .label,
.glass-auth .lbl,
.glass-auth .gate-card label,
.glass-auth form label {
    display: block;
    margin-bottom: .5rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--g-faint);
}

/* ======================= fields ========================================== */
.glass-auth .input,
.glass-auth .inp,
.glass-auth .card .input,
.glass-auth .card .inp,
.glass-auth .glass-card .input,
.glass-auth .glass-card .inp,
.glass-auth .glass-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.glass-auth .gate-card input[type="email"],
.glass-auth .gate-card input[type="password"],
.glass-auth .gate-card input[type="text"] {
    width: 100%;
    height: 2.875rem;
    padding: 0 .9375rem;
    background: var(--g-well);
    color: var(--g-ink);
    border: 1px solid var(--g-line-lit);
    border-radius: 11px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: .875rem;
    box-shadow: 0 1px 0 0 rgb(255 255 255 / .05) inset, 0 1px 2px rgb(0 0 0 / .30);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.glass-auth .input::placeholder,
.glass-auth .inp::placeholder,
.glass-auth .glass-card input::placeholder,
.glass-auth .gate-card input::placeholder { color: var(--g-faint); }

.glass-auth .input:focus,
.glass-auth .inp:focus,
.glass-auth .card .inp:focus,
.glass-auth .glass-card .input:focus,
.glass-auth .glass-card .inp:focus,
.glass-auth .glass-card input:focus,
.glass-auth .gate-card input:focus {
    outline: none;
    background: var(--g-well-lit);
    border-color: rgb(var(--g-accent-rgb) / .70);
    box-shadow:
        0 0 0 3px rgb(var(--g-accent-rgb) / .18),
        0 1px 0 0 rgb(255 255 255 / .06) inset;
}

/* Chrome repaints an autofilled field in its own pale fill, which would put a
   light slab in the middle of a dark panel. The background cannot be set
   directly - an inset shadow 1000px deep is the only thing that covers it.
 *
 * !important is load-bearing here, not laziness. The field rules above run to
 * (0,5,1) because of the :not() chain, so a plain autofill rule loses the
 * box-shadow while still winning -webkit-text-fill-color, which nothing else
 * sets. That combination is the worst of both: pale UA fill with near-white
 * text on it, i.e. an invisible email address. Either both declarations win or
 * neither may. */
.glass-auth input:-webkit-autofill,
.glass-auth input:-webkit-autofill:hover,
.glass-auth input:-webkit-autofill:focus,
.glass-auth input:-webkit-autofill:active,
.glass-auth select:-webkit-autofill,
.glass-auth textarea:-webkit-autofill,
.glass-auth input:autofill,
.glass-auth input:autofill:hover,
.glass-auth input:autofill:focus {
    -webkit-text-fill-color: var(--g-ink) !important;
    caret-color: var(--g-ink) !important;
    -webkit-box-shadow:
        0 0 0 1000px #121a2b inset,
        0 0 0 1px var(--g-line-lit) inset !important;
    box-shadow:
        0 0 0 1000px #121a2b inset,
        0 0 0 1px var(--g-line-lit) inset !important;
    /* Chrome animates its fill in; parking the transition stops a flash of
       pale as the page loads a remembered value. */
    transition: background-color 9999s ease-out 0s !important;
}

.glass-auth input:-webkit-autofill:focus,
.glass-auth input:autofill:focus {
    -webkit-box-shadow:
        0 0 0 1000px #141d31 inset,
        0 0 0 1px rgb(var(--g-accent-rgb) / .70) inset,
        0 0 0 3px rgb(var(--g-accent-rgb) / .18) !important;
    box-shadow:
        0 0 0 1000px #141d31 inset,
        0 0 0 1px rgb(var(--g-accent-rgb) / .70) inset,
        0 0 0 3px rgb(var(--g-accent-rgb) / .18) !important;
}

/* ======================= primary action ================================== */
.glass-auth .btn-primary,
.glass-auth .glass-btn,
.glass-auth .gate-card .btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.875rem;
    border: 0;
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgb(255 255 255 / .18), transparent 46%),
        linear-gradient(135deg, var(--g-accent), var(--g-accent-deep));
    color: #fff;
    font-family: 'Instrument Sans', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    box-shadow:
        0 1px 0 0 rgb(255 255 255 / .26) inset,
        0 10px 26px -10px rgb(var(--g-accent-rgb) / .62),
        0 2px 6px -2px rgb(0 0 0 / .50);
    transition: transform .16s cubic-bezier(.16, 1, .3, 1), box-shadow .16s ease, filter .16s ease;
}

.glass-auth .btn-primary:hover:not(:disabled),
.glass-auth .glass-btn:hover:not(:disabled) {
    filter: brightness(1.10);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 0 rgb(255 255 255 / .32) inset,
        0 16px 34px -12px rgb(var(--g-accent-rgb) / .72),
        0 2px 6px -2px rgb(0 0 0 / .50);
}

.glass-auth .btn-primary:active:not(:disabled),
.glass-auth .glass-btn:active:not(:disabled) { transform: translateY(0) scale(.994); }

/* specular sweep */
.glass-auth .btn-primary::after,
.glass-auth .glass-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 55%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgb(255 255 255 / .30), transparent);
    transition: left .6s cubic-bezier(.16, 1, .3, 1);
    pointer-events: none;
}

.glass-auth .btn-primary:hover:not(:disabled)::after,
.glass-auth .glass-btn:hover:not(:disabled)::after { left: 140%; }

.glass-auth .btn-primary:disabled,
.glass-auth .glass-btn:disabled { opacity: .45; box-shadow: none; filter: none; }

/* ======================= quieter actions ================================= */
.glass-auth .btn-secondary,
.glass-auth .btn-ghost,
.glass-auth .glass-option,
.glass-auth .gate-card .btn:not(.btn-primary) {
    background: var(--g-well);
    border: 1px solid var(--g-line-lit);
    border-radius: 11px;
    color: var(--g-ink);
    box-shadow: 0 1px 0 0 rgb(255 255 255 / .05) inset;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.glass-auth .btn-secondary:hover:not(:disabled),
.glass-auth .btn-ghost:hover:not(:disabled),
.glass-auth .glass-option:hover:not(:disabled),
.glass-auth .gate-card .btn:not(.btn-primary):hover {
    background: var(--g-well-lit);
    border-color: rgb(var(--g-accent-rgb) / .45);
    transform: translateY(-1px);
}

/* text links */
.glass-auth a,
.glass-auth button.text-xs,
.glass-auth button.text-sm { transition: color .14s ease; }

.glass-auth a:hover { color: var(--g-accent); }

.glass-auth :focus-visible {
    outline: 2px solid rgb(var(--g-accent-rgb) / .85);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ======================= opaque light surfaces =========================== */
/* Panels, notes and chips that were white or near-white in the original
   markup. Element-qualified so an <img class="bg-white"> keeps its plate. */
.glass-auth div.bg-white,
.glass-auth form.bg-white,
.glass-auth section.bg-white,
.glass-auth div.bg-slate-50,
.glass-auth div.bg-slate-100,
.glass-auth div.bg-indigo-100,
.glass-auth div.bg-blue-100,
.glass-auth div.bg-rose-100 {
    background: var(--g-well);
    border-color: var(--g-line-lit);
}

.glass-auth .border-slate-100,
.glass-auth .border-slate-200,
.glass-auth .border-slate-300,
.glass-auth .border-slate-700,
.glass-auth .border-rose-100,
.glass-auth .border-amber-300,
.glass-auth .border-brand-300 { border-color: var(--g-line-lit); }

/* ======================= semantic messages =============================== */
.glass-auth .bg-rose-50,
.glass-auth .bg-red-500\/10,
.glass-auth .field-error,
.glass-auth .gate-msg.error {
    background: rgb(244 63 94 / .12);
    border: 1px solid rgb(244 63 94 / .26);
    border-radius: 11px;
    color: #fda4af;
}

.glass-auth .text-rose-700,
.glass-auth .text-rose-600,
.glass-auth .text-red-500,
.glass-auth .text-red-400,
.glass-auth .text-rose-400 { color: #fda4af; }

.glass-auth .bg-emerald-50,
.glass-auth .gate-msg.info {
    background: rgb(16 185 129 / .12);
    border: 1px solid rgb(16 185 129 / .26);
    border-radius: 11px;
    color: #6ee7b7;
}

.glass-auth .text-emerald-700,
.glass-auth .text-emerald-600 { color: #6ee7b7; }

.glass-auth .bg-amber-50,
.glass-auth .bg-amber-100 {
    background: rgb(245 158 11 / .11);
    border-color: rgb(245 158 11 / .26);
}

.glass-auth .text-amber-800,
.glass-auth .text-amber-700 { color: #fcd34d; }

.glass-auth .bg-emerald-100 { background: rgb(16 185 129 / .16); }
.glass-auth .text-emerald-800 { color: #6ee7b7; }

/* ======================= inset notes and rows ============================ */
.glass-auth .glass-note {
    background: rgb(255 255 255 / .035);
    border: 1px solid var(--g-line);
    border-radius: 14px;
    box-shadow: 0 1px 0 0 rgb(255 255 255 / .04) inset;
}

/* ======================= the split-layout column ========================= */
/* No block of brand colour: the column is part of the canvas, separated by a
   hairline. The copy carries the weight instead of the background. */
/* The canvas runs straight through the split rather than stopping at a block
   of brand colour, so the only thing marking the division is a hairline. */
.glass-auth .glass-aside {
    position: relative;
    background: linear-gradient(118deg, rgb(255 255 255 / .04), transparent 52%);
    border-right: 1px solid var(--g-line);
    overflow: hidden;
}

/* the soft circles these columns were decorated with belong to the old flat
   treatment - against the lit canvas they read as smudges */
.glass-auth .glass-aside .rounded-full { display: none; }

/* A navy paper stock behind the column. It is a real photograph rather than
   another gradient, which is what stops the canvas reading as pure CSS, but
   it is material rather than subject matter so it never competes with the
   copy. Portals that want their own picture set --g-aside-img. */
.glass-auth .glass-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--g-aside-img, url('/wp-content/uploads/2025/10/background-navy-blue.jpg'));
    background-size: cover;
    background-position: center;
    opacity: var(--g-aside-img-opacity, .30);
    -webkit-mask-image: linear-gradient(105deg, #000 10%, rgb(0 0 0 / .45) 65%, transparent 100%);
    mask-image: linear-gradient(105deg, #000 10%, rgb(0 0 0 / .45) 65%, transparent 100%);
    pointer-events: none;
}

.glass-auth .glass-aside > * { position: relative; z-index: 1; }

/* ======================= aside content ==================================
   The small vocabulary the columns are written in, so the markup in each
   portal stays a few terse classes rather than a wall of utilities. */

.glass-auth .glass-eyebrow {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--g-faint);
}

.glass-auth .glass-headline {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: clamp(2rem, 3.1vw, 2.9rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -.04em;
    color: var(--g-ink);
}

.glass-auth .glass-lede {
    margin-top: 1.1rem;
    max-width: 30rem;
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--g-dim);
}

/* the icon tiles */
.glass-auth .glass-tile {
    position: relative;
    padding: 1rem 1.05rem 1.1rem;
    background: rgb(255 255 255 / .035);
    border: 1px solid var(--g-line);
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background-color .22s ease, border-color .22s ease, transform .22s cubic-bezier(.16, 1, .3, 1);
}

.glass-auth .glass-tile:hover {
    background: rgb(255 255 255 / .06);
    border-color: rgb(var(--g-accent-rgb) / .38);
    transform: translateY(-2px);
}

/* a pool of light under the cursor, inside the tile it is over */
.glass-auth .glass-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(9rem 9rem at var(--g-cx, 50%) var(--g-cy, 50%),
        rgb(var(--g-accent-rgb) / .16), transparent 62%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.glass-auth .glass-tile:hover::after { opacity: 1; }

/* keep the tile's own content above that pool */
.glass-auth .glass-tile > * { position: relative; z-index: 1; }

.glass-auth .glass-tile > i,
.glass-auth .glass-tile .glass-tile-i {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: .7rem;
    border-radius: 9px;
    background: linear-gradient(145deg, rgb(var(--g-accent-rgb) / .30), rgb(var(--g-accent-rgb) / .10));
    border: 1px solid rgb(var(--g-accent-rgb) / .28);
    color: var(--g-accent);
    font-size: .8125rem;
}

.glass-auth .glass-tile-t {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: -.012em;
    color: var(--g-ink);
}

.glass-auth .glass-tile-d {
    margin-top: .2rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--g-dim);
}

/* the thin rule of meta at the foot of a column */
.glass-auth .glass-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--g-line);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: .6875rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--g-faint);
}

/* a checked list, where a column reads better as points than as tiles */
.glass-auth .glass-list { display: grid; gap: .7rem; margin-top: 1.6rem; }

.glass-auth .glass-list li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--g-dim);
    list-style: none;
}

.glass-auth .glass-list li > i {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: .1rem;
    border-radius: 6px;
    background: rgb(var(--g-accent-rgb) / .16);
    border: 1px solid rgb(var(--g-accent-rgb) / .26);
    color: var(--g-accent);
    font-size: .625rem;
}

/* ---- layout helpers for the portals that are not on Tailwind ------------
   QA writes its own CSS, so the two-column split it now needs is expressed
   here rather than as a stack of utilities. */
.glass-auth .gate-aside {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    padding: 3rem;
}

.glass-auth .gate-pane {
    display: grid;
    place-items: center;
    flex: 1;
    padding: 1.5rem;
}

.glass-auth .gate-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 2.25rem;
}

.glass-auth .gate-mark-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--g-accent), var(--g-accent-deep));
    color: #fff;
    font-size: .9375rem;
}

@media (min-width: 1024px) {
    .glass-auth.gate { display: flex; place-items: stretch; padding: 0; }
    .glass-auth .gate-aside { display: flex; }
}

@media (min-width: 1280px) {
    .glass-auth .gate-aside { padding: 4rem; }
}

/* The column composes itself: lockup, then headline, then the tiles, each a
   beat behind the one before, so the page assembles rather than appears. */
.glass-auth .glass-aside > * {
    animation: g-row .7s cubic-bezier(.16, 1, .3, 1) backwards;
}

.glass-auth .glass-aside > *:nth-child(1) { animation-delay: .06s; }
.glass-auth .glass-aside > *:nth-child(2) { animation-delay: .14s; }
.glass-auth .glass-aside > *:nth-child(3) { animation-delay: .22s; }

.glass-auth .glass-headline { animation: g-row .75s cubic-bezier(.16, 1, .3, 1) .18s backwards; }
.glass-auth .glass-lede     { animation: g-row .75s cubic-bezier(.16, 1, .3, 1) .26s backwards; }

/* `backwards`, not `both`: a filled animation outranks normal declarations,
   so holding the final frame would stop :hover ever moving these again. */
.glass-auth .glass-tile    { animation: g-tile .7s cubic-bezier(.16, 1, .3, 1) backwards; }
.glass-auth .glass-tile:nth-child(1) { animation-delay: .34s; }
.glass-auth .glass-tile:nth-child(2) { animation-delay: .41s; }
.glass-auth .glass-tile:nth-child(3) { animation-delay: .48s; }
.glass-auth .glass-tile:nth-child(4) { animation-delay: .55s; }

@keyframes g-tile {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}




/* the brand lockup at the head of a column */
.glass-auth .glass-mark {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.glass-auth .glass-mark img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 11px;
    object-fit: cover;
    background: #fff;
}

.glass-auth .glass-mark-t {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.2;
    color: var(--g-ink);
}

.glass-auth .glass-aside h2,
.glass-auth .glass-aside p.font-display {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.06;
    color: var(--g-ink);
}

.glass-auth .glass-aside li,
.glass-auth .glass-aside p { color: var(--g-dim); }

/* the feature chips some columns carry */
.glass-auth .glass-aside .rounded-xl {
    background: rgb(255 255 255 / .04);
    border: 1px solid var(--g-line);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.glass-auth .glass-aside .bg-white\/10,
.glass-auth .glass-aside .bg-white\/5 { background: rgb(255 255 255 / .04); }

/* a logo plate stays a plate - the marks are dark-on-light */
.glass-auth img.bg-white { background: #fff; }

/* ======================= reduced motion ================================== */
@media (prefers-reduced-motion: reduce) {
    .glass-auth::after,
    .glass-auth .glass-card,
    .glass-auth .card,
    .glass-auth .gate-card,
    .glass-auth form > * { animation: none; }

    .glass-auth .btn-primary,
    .glass-auth .btn-primary::after,
    .glass-auth .glass-btn,
    .glass-auth .glass-btn::after,
    .glass-auth .btn-secondary,
    .glass-auth .btn-ghost,
    .glass-auth .glass-option,
    .glass-auth .input,
    .glass-auth .inp { transition: none; }

    .glass-auth .btn-primary:hover:not(:disabled),
    .glass-auth .glass-btn:hover:not(:disabled) { transform: none; }
}

/* ======================= graceful degradation ============================ */
/* Without backdrop-filter the panels would be flat 4%-white rectangles on the
   canvas, so they take a solid surface instead. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass-auth .glass-card,
    .glass-auth .card,
    .glass-auth .gate-card { background: #0d1320; }
}

@media (prefers-contrast: more) {
    .glass-auth {
        --g-dim: rgb(233 237 246 / .82);
        --g-faint: rgb(233 237 246 / .70);
        --g-line-lit: rgb(233 237 246 / .42);
    }

    .glass-auth .glass-card,
    .glass-auth .card,
    .glass-auth .gate-card { background: #0b1120; }
}
