/* ==========================================================================
   Staff sign-in (/login): salon & spa look.
   Used by resources/views/layouts/auth.blade.php. Hero behaviour:
   public/js/auth.js. The scene SVG: auth/partials/spa-scene.blade.php
   Palette follows the brand logo: hot rose + champagne gold on deep plum.
   ========================================================================== */
:root {
    --ink: #2b1624;
    --ink-2: #4b3443;
    --muted: #7a6571;
    --muted-2: #a8939f;
    --line: #ecdfe4;
    --line-soft: #f5edf0;
    --cream: #fffaf7;

    --rose-50: #fdf2f7;
    --rose-100: #fce6f0;
    --rose-200: #f8c8dd;
    --rose-300: #f19cc2;
    --rose-400: #e8679f;
    --rose-500: #e0257f;
    --rose-600: #c3176b;
    --rose-700: #9d1457;
    --rose-800: #741243;

    --gold-50: #fdf8ec;
    --gold-100: #f8edd3;
    --gold-200: #f0dcab;
    --gold-300: #e3c27a;
    --gold-400: #d4a951;
    --gold-500: #b8893a;
    --gold-600: #96692a;
    --gold-700: #74501f;

    --plum-950: #170812;
    --plum-900: #1f0b19;
    --plum-800: #2d0f25;
    --plum-700: #45163a;

    --display: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --script: 'Great Vibes', 'Pinyon Script', 'Brush Script MT', cursive;
    --ease-out: cubic-bezier(.2, .7, .3, 1);
}

/* Own reset (don't rely on Bootstrap's): the full-height panel's padding must sit inside it */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ==================================================================
   Hero: the nail bar
   ================================================================== */
.spa-hero {
    --polish: #e0257f;
    --aroma: #a68bd0;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #f5e9ee;
    background:
        radial-gradient(120% 80% at 0% 0%, #6d1a4d 0%, transparent 55%),
        radial-gradient(90% 70% at 100% 100%, #5c3b14 0%, transparent 60%),
        linear-gradient(160deg, var(--plum-950) 0%, var(--plum-800) 50%, #1c0d1d 100%);
}

/* Fine gold frame inside the hero */
.spa-hero::before {
    content: '';
    position: absolute;
    inset: 0.75rem;
    z-index: 1;
    border: 1px solid rgb(227 194 122 / 0.16);
    border-radius: 1.25rem;
    pointer-events: none;
}

/* Gold dot texture, fading out toward the bottom */
.spa-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: radial-gradient(rgb(243 211 138 / 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.hero-glow {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}
.hero-glow.g1 { top: -8rem; left: -8rem; width: 26rem; height: 26rem; background: var(--rose-500); opacity: 0.32; animation: spFloat 16s ease-in-out infinite alternate; }
.hero-glow.g2 { right: -6rem; bottom: -6rem; width: 22rem; height: 22rem; background: var(--gold-400); opacity: 0.22; animation: spFloat 20s ease-in-out infinite alternate-reverse; }

/* Falling rose petals + twinkling gold dust (generated by JS) */
.petals { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; --fall: 110vh; }
.petal {
    position: absolute;
    top: -2rem;
    left: var(--x);
    width: var(--s);
    height: calc(var(--s) * 0.78);
    border-radius: 0 100% 0 100%;
    background: linear-gradient(135deg, #fde2ee 0%, #f08bb8 65%, #d9418a 100%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
    opacity: 0;
    animation: spPetal var(--t) linear var(--d) infinite;
}
.mote {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #f6dc9c;
    box-shadow: 0 0 6px 1px rgb(246 220 156 / 0.7);
    opacity: 0;
    animation: spMote var(--t) ease-in-out var(--d) infinite;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.4vh, 1.75rem);
    height: 100%;
    padding: clamp(1.75rem, 3.2vw, 2.75rem);
}

.hero-brand { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.hero-brand img {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgb(227 194 122 / 0.6), 0 10px 24px -10px rgb(224 37 127 / 0.8);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
/* Name + logo sit above the slogan's light rays */
.brand-name { position: relative; z-index: 1; font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.1; color: #fff; overflow-wrap: anywhere; }

/* ---- Slogan: gold script with light rays turning behind it ---- */
.brand-slogan { position: relative; isolation: isolate; display: inline-flex; align-items: center; align-self: flex-start; margin-top: 0.05rem; }
.slogan-text {
    margin-left: -0.1em;
    /* Extra room so the script swashes aren't clipped by the text-clipped background */
    padding: 0.06em 0.4em 0.14em 0.12em;
    font-family: var(--script);
    font-size: clamp(1.875rem, 2.5vw, 2.375rem);
    font-weight: 400;
    line-height: 1.05;
    white-space: nowrap;
    background: linear-gradient(100deg, #f3d38a 0%, #fff4d6 20%, #f6b5d2 38%, #f3d38a 56%, #fffaf0 74%, #e3a948 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgb(243 211 138 / 0.35)) drop-shadow(0 2px 6px rgb(224 37 127 / 0.4));
    animation: spSloganShine 6s linear infinite;
}
.slogan-rays {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 45%;
    width: 16rem;
    height: 16rem;
    margin: -8rem 0 0 -8rem;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgb(243 211 138 / 0.34) 0deg 3deg, transparent 3deg 15deg);
    -webkit-mask-image: radial-gradient(closest-side, #000 10%, rgb(0 0 0 / 0.45) 45%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 10%, rgb(0 0 0 / 0.45) 45%, transparent 100%);
    transform: scaleY(0.4);
    pointer-events: none;
    animation: spRays 40s linear infinite;
}
/* Soft rose glow at the heart of the rays */
.brand-slogan::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -0.4rem -1rem;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(224 37 127 / 0.3), rgb(243 211 138 / 0.08) 60%, transparent);
    pointer-events: none;
    animation: spGlowPulse 4s ease-in-out infinite;
}
.slogan-spark { position: absolute; color: #fff4d6; text-shadow: 0 0 8px rgb(243 211 138 / 0.9); pointer-events: none; animation: spTwinkle 2.4s ease-in-out infinite; }
.slogan-spark.sp1 { top: -0.3rem; right: -0.35rem; font-size: 0.85rem; }
.slogan-spark.sp2 { bottom: 0.2rem; left: -0.6rem; font-size: 0.45rem; animation-delay: 1.2s; }

.hero-copy { max-width: 34rem; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.06);
    border: 1px solid rgb(240 220 171 / 0.22);
    color: var(--gold-200);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.hero-eyebrow .bi { display: inline-block; color: var(--rose-300); animation: spBloom 6s ease-in-out infinite; }

.hero-title {
    margin: 0.875rem 0 0;
    font-family: var(--display);
    font-size: clamp(2.25rem, 4vw, 3.6rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: #fff;
}
.shine-text {
    font-style: italic;
    background: linear-gradient(100deg, #f3d38a 20%, #fff7e6 40%, #f9c9de 60%, #f3d38a 80%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: spTextShine 7s linear infinite;
}
.hero-sub { max-width: 29rem; margin: 0.75rem 0 0; font-size: clamp(0.9375rem, 1.15vw, 1.0625rem); line-height: 1.65; color: rgb(245 233 238 / 0.74); }

.scene-wrap { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; }
.scene {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}

/* Ritual stepper, synced to the 12s scene loop */
.ritual-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.ritual-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 0.25rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 0.875rem;
    background: rgb(255 255 255 / 0.04);
    color: rgb(232 214 224 / 0.6);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    animation: 12s linear infinite;
}
.ritual-step .rs-icon { display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%; background: rgb(255 255 255 / 0.07); font-size: 0.95rem; }
.ritual-step.s1 { animation-name: spStep1; }
.ritual-step.s2 { animation-name: spStep2; }
.ritual-step.s3 { animation-name: spStep3; }
.ritual-step.s4 { animation-name: spStep4; }

.ritual-progress { height: 2px; margin-top: -0.25rem; overflow: hidden; border-radius: 2px; background: rgb(255 255 255 / 0.08); }
.ritual-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-300), var(--rose-400)); transform-origin: left; animation: spProgress 12s linear infinite; }

/* "In the chair" tag under the scene */
.chair-tag { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.375rem 0.625rem; margin-top: -0.5rem; color: rgb(245 233 238 / 0.82); font-size: 0.75rem; font-weight: 500; }
.chair-label { color: rgb(232 214 224 / 0.55); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; }
.chair-service {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.125rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbecc4, #d9b46a);
    color: #3a1a2c;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.5;
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgb(255 236 190 / 0.35), 0 6px 14px -8px rgb(0 0 0 / 0.6);
}
.chair-shade { display: inline-flex; align-items: center; gap: 0.375rem; }
.shade-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--shade, var(--polish)); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.25); transition: background-color 0.6s ease; }
.chair-tag.swap .chair-service { animation: spTagIn 0.6s var(--ease-out) backwards; }
.chair-tag.swap .chair-shade { animation: spFadeUp 0.5s var(--ease-out) 0.1s backwards; }

/* ---- SVG scene parts ---- */
.scene .paint, .scene .polish-fill { fill: var(--polish); transition: fill 0.6s ease; }
.scene .paint { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(1); }
.scene .paint.n1 { animation: spPaint1 12s infinite; }
.scene .paint.n2 { animation: spPaint2 12s infinite; }
.scene .paint.n3 { animation: spPaint3 12s infinite; }
.scene .paint.n4 { animation: spPaint4 12s infinite; }
.scene .paint.n5 { animation: spPaint5 12s infinite; }
.scene .gloss { opacity: 0.75; animation: spGloss 12s infinite; }
.scene .halo { opacity: 0.9; animation: spHalo 12s infinite; }
.scene .brush { transform: translate(480px, 256px); animation: spBrush 12s infinite; }
.scene .spark { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: spSpark 12s infinite; }
.scene .spark.k2 { animation-delay: 0.15s; }
.scene .spark.k3 { animation-delay: 0.3s; }
.scene .spark.k4 { animation-delay: 0.45s; }
.scene .spark.k5 { animation-delay: 0.6s; }
.scene .spark.k6 { animation-delay: 0.75s; }
.scene .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: spFlicker 1.6s ease-in-out infinite; }
.scene .candle-glow { transform-box: fill-box; transform-origin: center; animation: spCandleGlow 2.4s ease-in-out infinite; }
.scene .sprig { transform-origin: 96px 262px; animation: spSway 5s ease-in-out infinite alternate; }
.scene .gem { animation: spPulse 2.4s ease-in-out infinite; }

/* ---- Spa ritual: alternates with the nail bar each loop (auth.js sets data-ritual on .spa-hero).
   Both run all the time on the same timeline; only the opacity crossfades. ---- */
.scene .ritual { transition: opacity 0.8s ease; }
.scene .ritual-spa { opacity: 0; }
.spa-hero[data-ritual="spa"] .scene .ritual-nails { opacity: 0; }
.spa-hero[data-ritual="spa"] .scene .ritual-spa { opacity: 1; }
.scene .aroma-fill { fill: var(--aroma); transition: fill 0.6s ease; }
.scene .aroma-tint { fill: var(--aroma); opacity: 0.22; transition: fill 0.6s ease; }
.scene .dropper { transform: translate(480px, 252px); animation: spDropper 12s infinite; }
.scene .oil-drop { fill: var(--aroma); opacity: 0; animation: spDrop 12s infinite; }
.scene .ripple { transform-box: fill-box; transform-origin: center; opacity: 0; animation: spRipple 12s infinite; }
/* Drops 2–5 run the same cycle, each one nail-slot (7% = 0.84s) later */
.scene .oil-drop.d2, .scene .ripple.d2 { animation-delay: 0.84s; }
.scene .oil-drop.d3, .scene .ripple.d3 { animation-delay: 1.68s; }
.scene .oil-drop.d4, .scene .ripple.d4 { animation-delay: 2.52s; }
.scene .oil-drop.d5, .scene .ripple.d5 { animation-delay: 3.36s; }
.scene .rose-petal { transform-box: fill-box; transform-origin: center; }
.scene .rose-petal.p1 { animation: spRosePetal1 12s infinite; }
.scene .rose-petal.p2 { animation: spRosePetal2 12s infinite; }
.scene .rose-petal.p4 { animation: spRosePetal4 12s infinite; }
.scene .rose-petal.p5 { animation: spRosePetal5 12s infinite; }
.scene .lotus-petal { transform-origin: 300px 232px; transform: rotate(var(--a)); animation: spLotus 12s infinite; }
.scene .lotus-heart { animation: spLotusHeart 12s infinite; }
.scene .steam { opacity: 0; animation: spSteam 12s infinite; }
.scene .steam.s2 { animation-delay: 0.35s; }
.scene .steam.s3 { animation-delay: 0.7s; }

/* ==================================================================
   Sign-in panel
   ================================================================== */
.auth-panel { position: relative; z-index: 3; background: var(--cream); }
.auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(40rem 20rem at 100% 0%, rgb(224 37 127 / 0.07), transparent 60%),
        radial-gradient(30rem 18rem at 0% 100%, rgb(212 169 81 / 0.09), transparent 60%);
}
.auth-inner {
    position: relative;
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    padding: clamp(1.75rem, 4vw, 3rem) 1.25rem;
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
}

.auth-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; margin-bottom: 1.25rem; }
.greet { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--display); font-size: 1.0625rem; font-style: italic; font-weight: 600; color: var(--rose-700); }
.greet .bi { display: inline-block; font-style: normal; font-size: 0.875rem; color: var(--gold-500); animation: spBob 3s ease-in-out infinite; }
.clock {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-2);
    font-size: 0.75rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.clock .bi { color: var(--gold-500); }
.clock .colon { animation: spBlink 1s steps(1) infinite; }
.clock .clk-date { padding-left: 0.375rem; border-left: 1px solid var(--line); color: var(--muted); }

.auth-title { margin: 0; font-family: var(--display); font-size: clamp(1.75rem, 3vw, 2.125rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.005em; color: var(--ink); }
.auth-subtitle { margin: 0.375rem 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
/* Flex columns (not grid) so on desktop the account list can shrink to fit the screen */
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
#userSelectionStep { display: flex; flex-direction: column; }
.auth-alerts .alert { margin-bottom: 1rem; }

/* Flash messages */
.kf-flash { display: flex; align-items: flex-start; gap: 0.625rem; padding: 0.75rem 0.875rem; border-radius: 0.875rem; font-size: 0.8125rem; line-height: 1.5; }
.kf-flash-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.3; }
.kf-flash.alert-danger { border-color: #fbcfd8; background: #fff1f4; color: #9f1239; }
.kf-flash.alert-success { border-color: #bfe8cf; background: #f0faf4; color: #166534; }
.kf-flash.alert-warning { border-color: var(--gold-200); background: var(--gold-50); color: var(--gold-700); }

.step-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.step-label .count { color: var(--muted-2); font-weight: 500; letter-spacing: 0; text-transform: none; }

.search-wrap { position: relative; margin-bottom: 0.625rem; }
.search-wrap .bi { position: absolute; top: 50%; left: 0.875rem; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search-wrap .form-control { min-height: 2.75rem; padding-left: 2.5rem; border-color: var(--line); border-radius: 0.75rem; font-size: 1rem; }
.search-wrap .form-control:focus { border-color: var(--rose-300); box-shadow: 0 0 0 4px rgb(224 37 127 / 0.12); }

/* Account picker */
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); align-content: start; gap: 0.5rem; max-height: 19.5rem; margin: -0.25rem; padding: 0.25rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rose-200) transparent; }
.user-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.875rem;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out), border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    animation: spFadeUp 0.45s var(--ease-out) backwards;
    animation-delay: calc(var(--base, 520ms) + min(var(--i, 0), 10) * 45ms);
}
.user-card[hidden] { display: none !important; }
.user-card:hover { border-color: var(--rose-300); background: linear-gradient(135deg, #fff, var(--rose-50)); box-shadow: 0 10px 22px -14px rgb(157 20 87 / 0.5); transform: translateY(-1px); }
.user-card:focus-visible { border-color: var(--rose-400); box-shadow: 0 0 0 4px rgb(224 37 127 / 0.16); outline: none; }
.user-card:active { transform: scale(0.985); }
.user-card .uc-go { color: var(--rose-600); opacity: 0; transform: translateX(-6px); transition: opacity 0.2s ease, transform 0.2s var(--ease-out); }
.user-card:hover .uc-go, .user-card:focus-visible .uc-go { opacity: 1; transform: none; }
.user-card .uc-bio { display: inline-grid; place-items: center; width: 1.625rem; height: 1.625rem; border-radius: 0.5rem; background: var(--gold-50); color: var(--gold-600); font-size: 0.9rem; box-shadow: inset 0 0 0 1px var(--gold-100); }

.user-avatar {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 9999px;
    color: #fff;
    font-family: var(--display);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
}
.user-avatar.av-1 { background: linear-gradient(135deg, var(--gold-500), var(--gold-700)); }
.user-avatar.av-2 { background: linear-gradient(135deg, #8b3a78, #4a1640); }
.user-avatar.av-3 { background: linear-gradient(135deg, #b56fa6, #73326a); }
.user-avatar.av-4 { background: linear-gradient(135deg, #e0685e, #a63d36); }
.user-avatar.av-5 { background: linear-gradient(135deg, #7f9e7d, #4f6e52); }

.user-info { flex: 1; min-width: 0; }
.user-name { overflow: hidden; color: var(--ink); font-size: 0.9375rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.user-empty { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.8125rem; text-align: center; }

.selected-user {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--rose-200);
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--rose-50), var(--gold-50));
}
.selected-user.show { display: flex; }
.selected-user .user-avatar { position: relative; width: 2.75rem; height: 2.75rem; font-size: 1.3rem; }
.selected-user .user-avatar::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 0.75rem; height: 0.75rem; border: 2px solid #fff; border-radius: 50%; background: var(--gold-400); }
.btn-change {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.625rem;
    background: #fff;
    color: var(--ink-2);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-change:hover, .btn-change:focus-visible { border-color: var(--rose-300); color: var(--rose-700); outline: none; }

/* Fingerprint / face */
.btn-bio {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.875rem 1rem;
    overflow: hidden;
    border: 1px solid var(--rose-200);
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--rose-50), var(--gold-50));
    color: var(--ink);
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}
.btn-bio:hover:not(:disabled) { border-color: var(--rose-400); box-shadow: 0 12px 26px -16px rgb(157 20 87 / 0.55); transform: translateY(-1px); }
.btn-bio:focus-visible { outline: none; box-shadow: 0 0 0 4px rgb(224 37 127 / 0.18); }
.btn-bio:disabled { cursor: progress; }
.bio-ring {
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-600), var(--plum-700));
    color: #fff;
    font-size: 1.6rem;
    box-shadow: inset 0 0 0 1px rgb(240 220 171 / 0.35);
}
.bio-ring::before, .bio-ring::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--rose-300); border-radius: 50%; animation: spPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
.bio-ring::after { animation-delay: 1.1s; }
.bio-scan { position: absolute; top: 24%; left: 22%; right: 22%; height: 2px; border-radius: 2px; background: var(--gold-100); box-shadow: 0 0 8px 1px var(--gold-300); animation: spScan 1.6s ease-in-out infinite alternate; }
.btn-bio:disabled .bio-scan { animation-duration: 0.6s; }
.bio-copy { flex: 1; min-width: 0; }
.bio-title { display: block; font-size: 0.9375rem; font-weight: 600; }
.bio-sub { display: block; margin-top: 0.125rem; color: var(--muted); font-size: 0.75rem; }

.btn-alt { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 0.5rem; padding: 0.375rem 0.5rem; border: 0; border-radius: 0.5rem; background: none; color: var(--muted); font-size: 0.8125rem; font-weight: 500; }
.btn-alt:hover, .btn-alt:focus-visible { background: var(--rose-50); color: var(--ink); outline: none; }

/* Password */
.form-label { margin-bottom: 0.4rem; color: var(--ink-2); font-size: 0.8125rem; font-weight: 500; }
.password-wrapper { position: relative; }
.password-wrapper .pw-icon { position: absolute; top: 50%; left: 0.95rem; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; transition: color 0.2s ease; }
.password-wrapper .form-control { min-height: 3.125rem; padding-left: 2.6rem; padding-right: 3rem; border-color: var(--line); border-radius: 0.875rem; background: #fff; color: var(--ink); font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.password-wrapper .form-control::placeholder { color: var(--muted-2); }
.password-wrapper .form-control:focus { border-color: var(--rose-400); box-shadow: 0 0 0 4px rgb(224 37 127 / 0.14); }
.password-wrapper:focus-within .pw-icon { color: var(--rose-600); }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.3rem;
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.625rem;
    background: transparent;
    color: var(--muted-2);
    font-size: 1.05rem;
    transform: translateY(-50%);
}
.password-toggle:hover, .password-toggle:focus-visible { background: var(--rose-50); color: var(--ink-2); outline: none; }
.caps-hint { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.5rem; color: var(--gold-700); font-size: 0.75rem; font-weight: 600; }
.caps-hint[hidden] { display: none; }

/* Primary sign-in button */
.btn-glow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.25rem;
    overflow: hidden;
    border: 0;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--rose-600) 0%, var(--rose-800) 55%, var(--plum-700) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: inset 0 0 0 1px rgb(240 220 171 / 0.22), 0 14px 28px -14px rgb(157 20 87 / 0.85);
    transition: transform 0.15s var(--ease-out), box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgb(255 236 190 / 0.4) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.75s var(--ease-out);
}
.btn-glow:hover:not(:disabled) { filter: brightness(1.08); box-shadow: inset 0 0 0 1px rgb(240 220 171 / 0.3), 0 18px 32px -14px rgb(157 20 87 / 0.9); transform: translateY(-1px); }
.btn-glow:hover::after { transform: translateX(120%); }
.btn-glow:active:not(:disabled) { transform: translateY(0) scale(0.99); }
.btn-glow:focus-visible { outline: none; box-shadow: 0 0 0 4px rgb(224 37 127 / 0.28); }
.btn-glow .btn-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-glow .bi-arrow-right { transition: transform 0.2s var(--ease-out); }
.btn-glow:hover .bi-arrow-right { transform: translateX(4px); }
.btn-glow.is-loading { cursor: progress; }
.btn-glow.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.1) 0 10px, transparent 10px 20px);
    background-size: 28px 28px;
    animation: spFlow 0.8s linear infinite;
}

/* ---- Customer portal card (top of the panel) ---- */
.portal-card {
    position: relative;
    isolation: isolate;
    display: block;
    padding: 1.5px;
    overflow: hidden;
    border-radius: 1.25rem;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 18px 40px -22px rgb(69 22 58 / 0.8);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
/* Spinning gold/rose border: a big square conic gradient turning behind the card */
.portal-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: 160%;
    aspect-ratio: 1;
    background: conic-gradient(from 0deg, #f3d38a, #e0257f, #6d1a4d, #f8c8dd, #d4a951, #f3d38a);
    transform: translate(-50%, -50%);
    animation: spBorderSpin 7s linear infinite;
}
.portal-card:hover, .portal-card:focus-visible { color: #fff; box-shadow: 0 24px 46px -22px rgb(69 22 58 / 0.95); transform: translateY(-2px); outline: none; }
.portal-card:focus-visible { box-shadow: 0 0 0 4px rgb(224 37 127 / 0.3), 0 24px 46px -22px rgb(69 22 58 / 0.95); }
.portal-inner {
    position: relative;
    display: grid;
    gap: 0.875rem;
    padding: 1rem 1.125rem 1.05rem;
    overflow: hidden;
    border-radius: calc(1.25rem - 1.5px);
    background:
        radial-gradient(18rem 9rem at 100% 0%, rgb(212 169 81 / 0.32), transparent 60%),
        radial-gradient(14rem 8rem at 0% 100%, rgb(224 37 127 / 0.34), transparent 60%),
        linear-gradient(135deg, var(--plum-800) 0%, #5a1745 50%, #3a1230 100%);
}
.portal-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgb(255 236 190 / 0.2) 50%, transparent 65%);
    transform: translateX(-120%);
    pointer-events: none;
    animation: spPortalShine 5.5s ease-in-out 1.2s infinite;
}
.portal-head { display: flex; align-items: center; gap: 0.875rem; }
.portal-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8e3ac, #c69a49);
    color: var(--plum-800);
    font-size: 1.35rem;
    box-shadow: 0 10px 20px -10px rgb(212 169 81 / 0.9), inset 0 0 0 1px rgb(255 255 255 / 0.4);
    animation: spFloatIcon 3.2s ease-in-out infinite;
}
.portal-copy { display: block; flex: 1; min-width: 0; }
.portal-eyebrow { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--gold-200); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.portal-title { display: block; margin-top: 0.05rem; color: #fff; font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.portal-sub { display: block; margin-top: 0.125rem; color: rgb(252 230 240 / 0.82); font-size: 0.8125rem; }
.portal-go {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #fff;
    color: var(--rose-700);
    font-size: 1.05rem;
    box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.5);
    transition: transform 0.25s var(--ease-out);
}
.portal-card:hover .portal-go, .portal-card:focus-visible .portal-go { transform: translateX(3px); }
.portal-perks { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.portal-perks span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.08);
    color: #fdeef5;
    font-size: 0.75rem;
    font-weight: 500;
}
.portal-perks .bi { color: var(--gold-200); }
.portal-twinkle { position: absolute; z-index: 1; color: var(--gold-200); pointer-events: none; animation: spTwinkle 2.6s ease-in-out infinite; }
.portal-twinkle.t1 { top: 0.5rem; right: 0.8rem; font-size: 0.7rem; }
.portal-twinkle.t2 { bottom: 0.6rem; right: 0.9rem; font-size: 0.55rem; animation-delay: 1.1s; }

/* ---- "Staff only" divider + staff panel ---- */
.panel-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0 1rem; }
.panel-divider::before, .panel-divider::after { content: ''; flex: 1; height: 1px; }
.panel-divider::before { background: linear-gradient(90deg, transparent, var(--gold-300)); }
.panel-divider::after { background: linear-gradient(90deg, var(--gold-300), transparent); }
.panel-divider span { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.75rem; border: 1px solid var(--gold-100); border-radius: 999px; background: #fff; color: var(--gold-700); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

.signin-panel {
    position: relative;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 18px 40px -28px rgb(69 22 58 / 0.45);
}
.signin-panel::before { content: ''; position: absolute; top: 0; left: 1.25rem; right: 1.25rem; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--gold-300), var(--rose-400), var(--gold-300)); }
.signin-panel .auth-title { display: flex; align-items: center; gap: 0.625rem; font-size: clamp(1.625rem, 2.6vw, 1.875rem); }
.title-badge { display: inline-grid; place-items: center; flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--rose-50); color: var(--rose-700); font-size: 1.05rem; box-shadow: inset 0 0 0 1px var(--rose-200); }
.signin-panel .auth-form { margin-top: 1.25rem; }

.auth-quote { position: relative; margin: 1.25rem 0 0; padding: 0.9rem 1rem 0.9rem 2.75rem; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(135deg, #fff, var(--rose-50)); }
.auth-quote > .bi-quote { position: absolute; top: 0.55rem; left: 0.75rem; color: var(--gold-400); font-size: 1.5rem; }
/* Fixed height (2 lines + author) so rotating quotes never shift the form; short ones sit centred */
.quote-body { display: flex; flex-direction: column; justify-content: center; min-height: 4.6rem; transition: opacity 0.4s ease, transform 0.4s var(--ease-out); }
.auth-quote.is-fading .quote-body { opacity: 0; transform: translateY(6px); }
.quote-text { margin: 0; color: var(--ink-2); font-family: var(--display); font-size: 1.0625rem; font-style: italic; font-weight: 500; line-height: 1.4; }
.quote-author { margin-top: 0.375rem; color: var(--rose-700); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; }

.auth-footer { margin-top: 1.75rem; color: var(--muted); font-size: 0.75rem; line-height: 1.6; text-align: center; }
.contact-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; margin-top: 0.625rem; }
.contact-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--muted); font-size: 0.9375rem; text-decoration: none; transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.2s var(--ease-out); }
.contact-btn:hover, .contact-btn:focus-visible { background: #fff; box-shadow: 0 0 0 1px var(--line); transform: translateY(-2px); outline: none; }
.contact-btn.whatsapp:hover { color: #25d366; }
.contact-btn.facebook:hover { color: #1877f2; }
.contact-btn.email:hover { color: #ea4335; }
.contact-btn.phone:hover { color: var(--rose-600); }
.contact-btn.website:hover { color: var(--gold-600); }
.contact-btn.instagram:hover { color: #dd2a7b; }
.contact-btn.maps:hover { color: #ea4335; }
.contact-btn.tiktok:hover { color: #111; }

/* ---- Customer portal sign-in ---- */
/* Phone-or-email field */
.field-wrapper { position: relative; }
.field-wrapper .field-icon { position: absolute; top: 50%; left: 0.95rem; color: var(--muted-2); transform: translateY(-50%); pointer-events: none; transition: color 0.2s ease; }
.field-wrapper .form-control { min-height: 3.25rem; padding-left: 2.7rem; border-color: var(--line); border-radius: 0.875rem; background: #fff; color: var(--ink); font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.field-wrapper .form-control::placeholder { color: var(--muted-2); }
.field-wrapper .form-control:focus { border-color: var(--rose-400); box-shadow: 0 0 0 4px rgb(224 37 127 / 0.14); }
.field-wrapper:focus-within .field-icon { color: var(--rose-600); }
.field-icon.swap { animation: spIconSwap 0.35s var(--ease-out); }
.field-hint { display: flex; align-items: center; gap: 0.375rem; margin: 0.5rem 0 0; color: var(--muted); font-size: 0.75rem; }
.field-hint .bi { color: var(--gold-500); }
.user-hello { display: block; color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---- Customer registration ---- */
.field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 576px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-error { display: flex; align-items: flex-start; gap: 0.35rem; margin: 0.4rem 0 0; color: #be123c; font-size: 0.75rem; line-height: 1.4; }
.field-error .bi { margin-top: 0.1rem; }
.pw-error { margin-top: -0.5rem; }
/* Our own invalid look (Bootstrap's background icon would collide with the field icons / eye button) */
.field-wrapper .form-control.is-invalid, .password-wrapper .form-control.is-invalid { border-color: #e11d48; background-image: none; }
.password-wrapper .form-control.is-invalid { padding-right: 3rem; }
.field-wrapper .form-control.is-invalid:focus, .password-wrapper .form-control.is-invalid:focus { border-color: #e11d48; box-shadow: 0 0 0 4px rgb(225 29 72 / 0.14); }
.field-wrapper:has(.is-invalid) .field-icon, .password-wrapper:has(.is-invalid) .pw-icon { color: #e11d48; }
.pw-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.875rem; margin-top: -0.375rem; }
.pw-check { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.75rem; transition: color 0.2s ease; }
.pw-check .bi { font-size: 0.8rem; }
.pw-check.ok { color: #15803d; }
.pw-check.bad { color: #be123c; }
.terms-check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.45; cursor: pointer; }
.terms-check .form-check-input { flex-shrink: 0; width: 1.05rem; height: 1.05rem; margin: 0.1rem 0 0; border-color: var(--rose-200); cursor: pointer; }
.terms-check .form-check-input:checked { border-color: var(--rose-600); background-color: var(--rose-600); }
.terms-check .form-check-input:focus { border-color: var(--rose-400); box-shadow: 0 0 0 4px rgb(224 37 127 / 0.16); }
.terms-check strong { color: var(--ink-2); font-weight: 500; }
.auth-switch { margin: 0; color: var(--muted); font-size: 0.875rem; text-align: center; }
.auth-switch a { color: var(--rose-700); font-weight: 600; text-decoration: none; }
.auth-switch a:hover, .auth-switch a:focus-visible { text-decoration: underline; }

/* Footer: business contacts + a quiet way back to staff sign-in */
.footer-contact { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; }
.footer-contact .contact-options { margin-top: 0.375rem; }
.footer-meta { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; margin-top: 0.75rem; }
.contact-title { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.staff-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    padding: 0.375rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-2);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out);
}
.staff-link:hover, .staff-link:focus-visible { border-color: var(--rose-300); color: var(--rose-700); transform: translateY(-1px); outline: none; }

/* ---- PWA install banner ---- */
.kf-install-banner {
    position: fixed;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 1rem;
    z-index: 1080;
    max-width: 24rem;
    margin-left: auto;
    overflow: hidden;
    border: 1px solid rgb(227 194 122 / 0.28);
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--plum-900), #3a1230);
    color: #f5e9ee;
    box-shadow: 0 24px 50px -20px rgb(23 8 18 / 0.8);
    animation: spFadeUp 0.5s var(--ease-out);
}
.kf-install-banner-body { position: relative; display: flex; align-items: flex-start; gap: 0.875rem; padding: 0.875rem 2.5rem 0.875rem 1rem; }
.kf-install-banner-body img { flex-shrink: 0; width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; object-fit: cover; box-shadow: 0 0 0 1px rgb(227 194 122 / 0.4); }
.kf-install-banner-copy { flex: 1; min-width: 0; }
.kf-install-banner-title { margin: 0; color: #fff; font-size: 0.875rem; font-weight: 600; }
.kf-install-banner-text { margin: 0.125rem 0 0; color: rgb(245 233 238 / 0.7); font-size: 0.75rem; line-height: 1.45; }
.kf-install-banner-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.625rem; }
.kf-install-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.85rem; border: 0; border-radius: 999px; background: linear-gradient(135deg, #f8e3ac, #c69a49); color: var(--plum-800); font-size: 0.75rem; font-weight: 600; }
.kf-install-later { padding: 0.35rem 0.5rem; border: 0; background: none; color: rgb(245 233 238 / 0.7); font-size: 0.75rem; }
.kf-install-later:hover { color: #fff; }
.kf-install-banner-close { position: absolute; top: 0.5rem; right: 0.5rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 0; border-radius: 50%; background: transparent; color: rgb(245 233 238 / 0.6); font-size: 0.75rem; }
.kf-install-banner-close:hover { background: rgb(255 255 255 / 0.08); color: #fff; }

/* Entrance + step transitions */
/* fill-mode "backwards" (not "both") so hover transforms still work once the entrance ends */
.reveal { animation: spFadeUp 0.6s var(--ease-out) backwards; animation-delay: calc(var(--d, 0) * 70ms + 120ms); }
.step-in { animation: spFadeUp 0.4s var(--ease-out) backwards; }
.auth-card.has-error { animation: spShake 0.45s ease-in-out 0.55s; }

/* ==================================================================
   Layout breakpoints
   ================================================================== */
/* Desktop: the page is exactly one screen tall and never scrolls. The wide right
   panel is a column whose account list takes the leftover height and scrolls inside
   itself; quote + footer sit at the bottom. If content still can't fit, the panel
   itself scrolls as a last resort (the page never does). */
@media (min-width: 992px) {
    html, body { height: 100%; overflow: hidden; }
    .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(32rem, 1.05fr); height: 100vh; height: 100dvh; min-height: 0; }
    .spa-hero {
        height: calc(100vh - 1.5rem);
        height: calc(100dvh - 1.5rem);
        margin: 0.75rem 0 0.75rem 0.75rem;
        border-radius: 1.75rem;
    }
    /* auto, never hidden: if something can't fit (e.g. validation errors on a short screen)
       the panel scrolls instead of clipping the form */
    .auth-panel { display: flex; height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
    .auth-inner {
        display: flex;
        flex-direction: column;
        max-width: 42rem;
        height: 100%;
        padding: clamp(1rem, 2.6vh, 2rem) clamp(1.5rem, 3vw, 2.75rem);
    }
    .auth-top, .portal-card, .panel-divider, .auth-quote, .auth-footer { flex-shrink: 0; }
    .auth-top { margin-bottom: clamp(0.75rem, 1.8vh, 1.25rem); }
    .panel-divider { margin: clamp(0.75rem, 1.8vh, 1.25rem) 0; }

    /* Shrink chain: card → form → account step → list (min-height:0 at every level) */
    .signin-panel { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; padding: clamp(1rem, 2.2vh, 1.5rem) 1.5rem; }
    .signin-panel .auth-form { flex: 0 1 auto; min-height: 0; margin-top: clamp(0.875rem, 2vh, 1.25rem); }
    #userSelectionStep { flex: 0 1 auto; min-height: 0; }
    .user-grid { flex: 0 1 auto; min-height: 7.5rem; max-height: none; }
    .signin-panel .auth-title { font-size: clamp(1.75rem, 2.4vw, 2.125rem); }

    .portal-inner { padding: 0.95rem 1.25rem 1rem; }
    .portal-title { font-size: 1.625rem; }

    .auth-quote { margin-top: auto; padding: 0.7rem 1rem 0.7rem 2.75rem; }
    /* Shorter panels (customer portal): this + the quote's auto margin centre the main group */
    .panel-center { margin-top: auto; }
    .signin-panel { margin-bottom: clamp(0.75rem, 1.8vh, 1.25rem); }
    .quote-body { min-height: 3.1rem; }

    /* Footer on one line: credit left, contact buttons right */
    .auth-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; margin-top: clamp(0.75rem, 1.6vh, 1rem); text-align: left; }
    .auth-footer .contact-options { flex-wrap: nowrap; margin-top: 0; }
    .contact-btn { width: 2.125rem; height: 2.125rem; }
    /* Customer footer: "Questions?" + contacts left, © + staff link right */
    .footer-contact { flex-direction: row; gap: 0.5rem; }
    .footer-contact .contact-options { margin-top: 0; }
    .footer-meta { flex-direction: row; gap: 0.75rem; margin-top: 0; }
    .staff-link { margin-top: 0; }
}

@media (min-width: 992px) and (max-height: 800px) {
    .hero-sub { display: none; }
    .hero-title { font-size: clamp(1.875rem, 3vw, 2.75rem); }
    .portal-perks { display: none; }
    /* Customer footer fits on one line without its label */
    .footer-contact .contact-title { display: none; }
}

@media (min-width: 992px) and (max-height: 700px) {
    .hero-eyebrow, .auth-quote { display: none; }
    .auth-footer { margin-top: auto; }
}

/* Register page: the longest form, so it sheds extras earlier and keeps headroom for
   validation messages (each adds a line under its field) */
.page-register .auth-switch { display: none; }
@media (min-width: 992px) {
    .page-register .signin-panel .auth-form { gap: 0.875rem; }
    .page-register .field-wrapper .form-control,
    .page-register .password-wrapper .form-control { min-height: 2.875rem; }
    .page-register .footer-contact .contact-title { display: none; }
}
@media (min-width: 992px) and (max-height: 1000px) {
    .page-register .auth-quote, .page-register .portal-perks { display: none; }
    .page-register .auth-footer { margin-top: auto; }
}
@media (min-width: 992px) and (max-height: 820px) {
    .page-register .auth-subtitle { display: none; }
    .page-register .signin-panel .auth-form { gap: 0.625rem; margin-top: 0.875rem; }
    .page-register .field-wrapper .form-control,
    .page-register .password-wrapper .form-control { min-height: 2.625rem; }
    .page-register .form-label { margin-bottom: 0.25rem; }
}
/* Narrow desktops (e.g. iPad landscape 1024×768): keep the register footer on one row */
@media (min-width: 992px) and (max-width: 1199.98px) and (max-height: 820px) {
    .page-register .footer-meta > span { display: none; }
}
@media (min-width: 992px) and (max-height: 760px) {
    /* Swap the sign-in card for the one-line link inside the form */
    .page-register .panel-divider, .page-register .portal-card { display: none; }
    .page-register .auth-switch { display: block; }
}

@media (max-width: 991.98px) {
    .spa-hero { padding-bottom: 1.5rem; }
    .spa-hero::before { inset: 0.5rem 0.5rem -1rem; border-radius: 1rem; }
    .petals { --fall: 65vh; }
    .hero-inner { padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 1.25rem; }
    .hero-copy { max-width: none; }
    .hero-sub { display: none; }
    .scene { max-width: 460px; max-height: 190px; }
    .auth-panel { margin-top: -1.5rem; border-radius: 1.5rem 1.5rem 0 0; box-shadow: 0 -14px 30px -20px rgb(23 8 18 / 0.6); }
}

/* All sign-in pages on phones/tablets: 2px page gutter so the cards run almost edge to edge
   (safe-area keeps content clear of notches in landscape) */
@media (max-width: 991.98px) {
    .auth-inner {
        padding-left: max(2px, env(safe-area-inset-left));
        padding-right: max(2px, env(safe-area-inset-right));
    }
}

@media (max-width: 575.98px) {
    .hero-inner { gap: 0.875rem; }
    .hero-eyebrow, .ritual-steps, .ritual-progress { display: none; }
    .hero-title { margin-top: 0; font-size: 1.75rem; }
    .hero-brand { gap: 0.7rem; }
    .hero-brand img { width: 2.875rem; height: 2.875rem; }
    .brand-name { font-size: 1.125rem; }
    /* Scales down on narrow phones so "We do Magic behind Rays !" stays on one line beside the logo */
    .slogan-text { font-size: clamp(1.25rem, 6.4vw, 1.625rem); }
    .slogan-rays { width: 12rem; height: 12rem; margin: -6rem 0 0 -6rem; }
    .scene { max-height: 140px; }
    .chair-tag { margin-top: -0.375rem; }
    .chair-label { display: none; }
    .auth-inner { padding-top: 1.5rem; }
    /* Phones: keep the portal card compact so staff accounts stay near the fold */
    .portal-inner { gap: 0.75rem; padding: 0.875rem 0.875rem 0.9rem; }
    .portal-head { gap: 0.75rem; }
    .portal-icon { width: 2.5rem; height: 2.5rem; font-size: 1.15rem; }
    .portal-title { font-size: 1.3125rem; }
    .portal-sub { font-size: 0.75rem; }
    .portal-go { position: absolute; top: 0.75rem; right: 0.75rem; width: 2rem; height: 2rem; font-size: 0.9rem; }
    .portal-twinkle.t1 { display: none; }
    .portal-perks { flex-wrap: nowrap; gap: 0.3rem; }
    .portal-perks span { padding: 0.2rem 0.5rem; font-size: 0.6875rem; white-space: nowrap; }
    .panel-divider { margin: 0.875rem 0 0.75rem; }
    .signin-panel { padding: 1.125rem 1rem 1rem; }
    .kf-install-banner { max-width: none; }
}

/* ==================================================================
   Keyframes. The scene runs on one shared 12s timeline:
   0–16% brush lifts · 18–56% paints the five nails · 58–72% gloss + sparkle
   72–90% glow · 90–98% polish fades for the next client
   ================================================================== */
/* Brush tip positions are P(angle, r) = (300 + r·sin a, 256 − r·cos a) for each nail
   (a = −36, −18, 0, 18, 36), stroking from r=44 to r=136 */
@keyframes spBrush {
    0%, 10% { transform: translate(480px, 256px) rotate(0deg); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    16%     { transform: translate(480px, 186px) rotate(0deg); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    20%     { transform: translate(274.1px, 220.4px) rotate(24deg); animation-timing-function: ease-in-out; }
    25%     { transform: translate(220.1px, 146px) rotate(24deg); animation-timing-function: ease-in-out; }
    27%     { transform: translate(286.4px, 214.2px) rotate(24deg); animation-timing-function: ease-in-out; }
    32%     { transform: translate(258px, 126.7px) rotate(24deg); animation-timing-function: ease-in-out; }
    34%     { transform: translate(300px, 212px) rotate(24deg); animation-timing-function: ease-in-out; }
    39%     { transform: translate(300px, 120px) rotate(24deg); animation-timing-function: ease-in-out; }
    41%     { transform: translate(313.6px, 214.2px) rotate(24deg); animation-timing-function: ease-in-out; }
    46%     { transform: translate(342px, 126.7px) rotate(24deg); animation-timing-function: ease-in-out; }
    48%     { transform: translate(325.9px, 220.4px) rotate(24deg); animation-timing-function: ease-in-out; }
    53%     { transform: translate(379.9px, 146px) rotate(24deg); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    57%     { transform: translate(480px, 186px) rotate(0deg); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    62%, 100% { transform: translate(480px, 256px) rotate(0deg); }
}
/* Each nail fills base → tip while the brush strokes it, holds through the glow, then fades */
@keyframes spPaint1 { 0%, 20% { transform: scaleY(0); opacity: 1; } 25%, 90% { transform: scaleY(1); opacity: 1; } 97%, 100% { transform: scaleY(1); opacity: 0; } }
@keyframes spPaint2 { 0%, 27% { transform: scaleY(0); opacity: 1; } 32%, 90% { transform: scaleY(1); opacity: 1; } 97%, 100% { transform: scaleY(1); opacity: 0; } }
@keyframes spPaint3 { 0%, 34% { transform: scaleY(0); opacity: 1; } 39%, 90% { transform: scaleY(1); opacity: 1; } 97%, 100% { transform: scaleY(1); opacity: 0; } }
@keyframes spPaint4 { 0%, 41% { transform: scaleY(0); opacity: 1; } 46%, 90% { transform: scaleY(1); opacity: 1; } 97%, 100% { transform: scaleY(1); opacity: 0; } }
@keyframes spPaint5 { 0%, 48% { transform: scaleY(0); opacity: 1; } 53%, 90% { transform: scaleY(1); opacity: 1; } 97%, 100% { transform: scaleY(1); opacity: 0; } }
/* Spa ritual. The dropper tip hovers 40px above the water at each drop point
   (x = 252, 272, 300, 328, 348 in the partial), holding 3% while a drop falls */
@keyframes spDropper {
    0%, 10% { transform: translate(480px, 252px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    16%     { transform: translate(480px, 186px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    20%, 23% { transform: translate(252px, 192px); animation-timing-function: ease-in-out; }
    27%, 30% { transform: translate(272px, 192px); animation-timing-function: ease-in-out; }
    34%, 37% { transform: translate(300px, 192px); animation-timing-function: ease-in-out; }
    41%, 44% { transform: translate(328px, 192px); animation-timing-function: ease-in-out; }
    48%, 51% { transform: translate(348px, 192px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    55%     { transform: translate(480px, 186px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
    60%, 100% { transform: translate(480px, 252px); }
}
/* Timed for drop 1; drops 2–5 reuse it via animation-delay */
@keyframes spDrop {
    0%, 21% { opacity: 0; transform: translateY(0); }
    21.6%   { opacity: 1; transform: translateY(0); animation-timing-function: cubic-bezier(.5, 0, 1, 1); }
    23.4%   { opacity: 1; transform: translateY(30px); }
    23.8%, 100% { opacity: 0; transform: translateY(31px); }
}
@keyframes spRipple {
    0%, 23.4% { opacity: 0; transform: scale(0.25); }
    24%       { opacity: 0.85; transform: scale(0.4); }
    31%, 100% { opacity: 0; transform: scale(1.9); }
}
/* A rose petal settles where each drop lands, holds through the glow, then fades */
@keyframes spRosePetal1 { 0%, 23.5% { opacity: 0; transform: scale(0) rotate(-50deg); } 26.5%, 90% { opacity: 1; transform: scale(1) rotate(0deg); } 97%, 100% { opacity: 0; transform: scale(1) rotate(0deg); } }
@keyframes spRosePetal2 { 0%, 30.5% { opacity: 0; transform: scale(0) rotate(-50deg); } 33.5%, 90% { opacity: 1; transform: scale(1) rotate(0deg); } 97%, 100% { opacity: 0; transform: scale(1) rotate(0deg); } }
@keyframes spRosePetal4 { 0%, 44.5% { opacity: 0; transform: scale(0) rotate(-50deg); } 47.5%, 90% { opacity: 1; transform: scale(1) rotate(0deg); } 97%, 100% { opacity: 0; transform: scale(1) rotate(0deg); } }
@keyframes spRosePetal5 { 0%, 51.5% { opacity: 0; transform: scale(0) rotate(-50deg); } 54.5%, 90% { opacity: 1; transform: scale(1) rotate(0deg); } 97%, 100% { opacity: 0; transform: scale(1) rotate(0deg); } }
/* Lotus: a closed bud (petals at 16% of their angle) that opens in "Finish" and closes again */
@keyframes spLotus {
    0%, 57% { transform: rotate(calc(var(--a) * 0.16)) scale(0.82); }
    67%, 90% { transform: rotate(var(--a)) scale(1); }
    98%, 100% { transform: rotate(calc(var(--a) * 0.16)) scale(0.82); }
}
@keyframes spLotusHeart { 0%, 60% { opacity: 0; } 68%, 90% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes spSteam {
    0%, 58% { opacity: 0; transform: translateY(6px); }
    66% { opacity: 0.55; }
    82% { opacity: 0.35; }
    94%, 100% { opacity: 0; transform: translateY(-18px); }
}
@keyframes spGloss { 0%, 57% { opacity: 0; } 63%, 90% { opacity: 0.75; } 97%, 100% { opacity: 0; } }
@keyframes spHalo { 0%, 60% { opacity: 0.35; } 70%, 88% { opacity: 1; } 97%, 100% { opacity: 0.35; } }
@keyframes spSpark {
    0%, 61% { transform: scale(0) rotate(0deg); opacity: 0; }
    65% { transform: scale(1.15) rotate(45deg); opacity: 1; }
    69% { transform: scale(0.45) rotate(90deg); opacity: 0.7; }
    72%, 100% { transform: scale(0) rotate(120deg); opacity: 0; }
}
@keyframes spFlicker {
    0%, 100% { transform: scale(1, 1) skewX(0deg); }
    25% { transform: scale(0.94, 1.07) skewX(2deg); }
    50% { transform: scale(1.03, 0.96) skewX(-1.5deg); }
    75% { transform: scale(0.97, 1.04) skewX(1deg); }
}
@keyframes spCandleGlow { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes spSway { from { transform: rotate(-2deg); } to { transform: rotate(2.5deg); } }
@keyframes spPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes spProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@keyframes spStep1 {
    0%, 16%, 100% { background-color: rgb(224 37 127 / 0.16); border-color: rgb(240 220 171 / 0.5); color: #fff6fa; }
    19%, 97% { background-color: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); color: rgb(232 214 224 / 0.6); }
}
@keyframes spStep2 {
    0%, 16%, 59%, 100% { background-color: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); color: rgb(232 214 224 / 0.6); }
    19%, 56% { background-color: rgb(224 37 127 / 0.16); border-color: rgb(240 220 171 / 0.5); color: #fff6fa; }
}
@keyframes spStep3 {
    0%, 56%, 73%, 100% { background-color: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); color: rgb(232 214 224 / 0.6); }
    59%, 70% { background-color: rgb(224 37 127 / 0.16); border-color: rgb(240 220 171 / 0.5); color: #fff6fa; }
}
@keyframes spStep4 {
    0%, 70%, 100% { background-color: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.08); color: rgb(232 214 224 / 0.6); }
    73%, 97% { background-color: rgb(224 37 127 / 0.16); border-color: rgb(240 220 171 / 0.5); color: #fff6fa; }
}

@keyframes spPetal {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    8% { opacity: 0.75; }
    50% { transform: translate(var(--drift, 0px), calc(var(--fall) * 0.5)) rotate(200deg); }
    90% { opacity: 0.5; }
    100% { transform: translate(calc(var(--drift, 0px) * -0.5), var(--fall)) rotate(420deg); opacity: 0; }
}
@keyframes spMote { 0%, 100% { opacity: 0; transform: translateY(0) scale(0.6); } 50% { opacity: 0.9; transform: translateY(-14px) scale(1); } }
@keyframes spFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(3rem, 2rem) scale(1.15); } }
@keyframes spTextShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes spBloom { 0%, 100% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(72deg) scale(1.12); } }
@keyframes spBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-2px) rotate(8deg); } }
@keyframes spBlink { 50% { opacity: 0.25; } }
@keyframes spFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spTagIn { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes spShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes spPing { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes spScan { from { top: 24%; } to { top: 74%; } }
@keyframes spFlow { from { background-position: 0 0; } to { background-position: 28px 0; } }
@keyframes spBorderSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spPortalShine { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }
@keyframes spFloatIcon { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-5deg); } }
@keyframes spIconSwap { from { opacity: 0; transform: translateY(-50%) scale(0.4) rotate(-30deg); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes spSloganShine { from { background-position: 100% 0; } to { background-position: -120% 0; } }
@keyframes spRays { from { transform: scaleY(0.4) rotate(0deg); } to { transform: scaleY(0.4) rotate(360deg); } }
@keyframes spGlowPulse { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes spTwinkle { 0%, 100% { opacity: 0.15; transform: scale(0.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }

/* Reduced motion: a still frame of a freshly painted, glossy fan */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .petals { display: none; }
    .scene .spark { transform: scale(1); }
    .ritual-step.s4 { background-color: rgb(224 37 127 / 0.16); border-color: rgb(240 220 171 / 0.5); color: #fff6fa; }
    .ritual-progress span { transform: scaleX(0.85); }
}
