/* ==========================================================================
   HM Attendance - premium 3D look (loaded last, after app.css and dark.css).
   Only how things look: light, depth and gentle motion. Nothing is moved,
   hidden or removed; every page keeps its layout, buttons and data. Remove
   the <link> to premium.css in fragments/layout.html to go back to the old look.

   Ideas: one light source from the top (a thin highlight on every raised
   surface, a soft layered shadow under it), surfaces that rise when they can
   be tapped, coloured glows that match each tile, and a quiet ambient
   background in the company colours (navy, teal, orange). Light and dark
   themes get the same treatment. Motion is skipped for people who ask their
   phone / computer for less motion.
   ========================================================================== */
@media screen {

/* ---------- tokens ---------- */
:root {
    --p-glow-1: rgba(14, 143, 163, .13);
    --p-glow-2: rgba(241, 90, 34, .08);
    --p-glow-3: rgba(29, 79, 145, .12);
    --p-hl: rgba(255, 255, 255, .95);
    --p-edge: rgba(15, 40, 80, .08);
    --p-sh-1: 0 1px 1px rgba(15, 35, 70, .04), 0 3px 8px -2px rgba(15, 35, 70, .06), 0 14px 30px -12px rgba(15, 35, 70, .16);
    --p-sh-2: 0 2px 4px rgba(15, 35, 70, .06), 0 12px 24px -8px rgba(15, 35, 70, .18), 0 30px 60px -24px rgba(15, 35, 70, .26);
    --p-ring: 0 0 0 4px rgba(14, 143, 163, .16);
    --p-row: rgba(14, 143, 163, .045);
    --p-ease: cubic-bezier(.2, .8, .2, 1);
}
html[data-theme="dark"] {
    --p-glow-1: rgba(14, 143, 163, .16);
    --p-glow-2: rgba(241, 90, 34, .07);
    --p-glow-3: rgba(70, 120, 210, .16);
    --p-hl: rgba(255, 255, 255, .06);
    --p-edge: rgba(255, 255, 255, .06);
    --p-sh-1: 0 1px 1px rgba(0, 0, 0, .3), 0 12px 28px -12px rgba(0, 0, 0, .6);
    --p-sh-2: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 44px -16px rgba(0, 0, 0, .7);
    --p-ring: 0 0 0 4px rgba(56, 182, 201, .22);
    --p-row: rgba(120, 170, 255, .055);
}

/* ---------- ambient background: soft light in the company colours ---------- */
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 520px at 6% -8%, var(--p-glow-1), transparent 62%),
        radial-gradient(760px 460px at 104% 2%, var(--p-glow-2), transparent 60%),
        radial-gradient(1000px 640px at 50% 112%, var(--p-glow-3), transparent 62%);
}
::selection { background: rgba(14, 143, 163, .22); }

/* thin, rounded scrollbars */
.table-wrap, .sidebar, .page { scrollbar-width: thin; scrollbar-color: rgba(15, 40, 80, .25) transparent; }
html[data-theme="dark"] .table-wrap, html[data-theme="dark"] .page { scrollbar-color: rgba(160, 190, 240, .25) transparent; }
.table-wrap::-webkit-scrollbar { height: 9px; width: 9px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(15, 40, 80, .22); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
html[data-theme="dark"] .table-wrap::-webkit-scrollbar-thumb { background-color: rgba(160, 190, 240, .22); }

/* keyboard focus: a clear ring */
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(14, 143, 163, .5); outline-offset: 2px; }

/* ---------- side menu: deep navy glass, the open page raised like a key ---------- */
html:not([data-theme="dark"]) .sidebar {
    background:
        radial-gradient(420px 260px at -10% -6%, rgba(14, 143, 163, .32), transparent 62%),
        radial-gradient(380px 320px at 110% 104%, rgba(241, 90, 34, .18), transparent 62%),
        linear-gradient(180deg, #06182f 0%, #0c2850 50%, #173c74 100%);
}
html[data-theme="dark"] .sidebar {
    background:
        radial-gradient(420px 260px at -10% -6%, rgba(14, 143, 163, .2), transparent 62%),
        linear-gradient(180deg, #08101f 0%, #0d1830 100%);
}
.sidebar { box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06), 10px 0 34px -16px rgba(5, 20, 45, .5); }
.brand img { box-shadow: 0 8px 18px -4px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .14); }
.side-label { color: #8ea6cf; }
.side-nav a, .side-foot a, .side-foot button { transition: background .18s, color .18s, transform .22s var(--p-ease), box-shadow .22s; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { transform: translateX(3px); background: linear-gradient(90deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .02)); }
html:not([data-theme="dark"]) .side-nav a.on, html:not([data-theme="dark"]) .side-foot a.on {
    background: linear-gradient(180deg, #ffffff 0%, #e8effb 100%); color: #06182f; transform: none;
    box-shadow: inset 0 1px 0 #fff, inset 3px 0 0 #f15a22, 0 2px 4px rgba(0, 0, 0, .2), 0 12px 24px -10px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .side-nav a.on, html[data-theme="dark"] .side-foot a.on {
    background: linear-gradient(180deg, #2a4170 0%, #1f3359 100%); transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 3px 0 0 #5ea8ff, 0 12px 24px -12px rgba(0, 0, 0, .7);
}
.side-nav a.on svg { color: #f15a22; }
html[data-theme="dark"] .side-nav a.on svg { color: #7fb8ff; }
.side-nav .badge { box-shadow: 0 4px 10px -2px rgba(255, 91, 91, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }

/* ---------- top bar: frosted glass with a soft edge ---------- */
.topbar { box-shadow: 0 1px 0 var(--p-edge), 0 12px 30px -22px rgba(15, 35, 70, .45); }
html:not([data-theme="dark"]) .company { background: linear-gradient(180deg, #f6f9fe, #e6eefb); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 35, 70, .08); }
.me .avatar, .avatar.lg { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 6px 14px -4px rgba(15, 35, 70, .35); }
html[data-theme="dark"] .me .avatar, html[data-theme="dark"] .avatar.lg { box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 6px 14px -4px rgba(0, 0, 0, .6); }
.avatar.sm { box-shadow: 0 3px 8px -3px rgba(15, 35, 70, .35); }

/* ---------- cards: raised surfaces lit from the top ---------- */
.card, .home-panel, .hr-glance, .cx-card {
    box-shadow: inset 0 1px 0 var(--p-hl), var(--p-sh-1);
    transition: box-shadow .25s var(--p-ease), transform .25s var(--p-ease);
}
.card { border-radius: 16px; }
html:not([data-theme="dark"]) .card, html:not([data-theme="dark"]) .home-panel,
html:not([data-theme="dark"]) .hr-glance, html:not([data-theme="dark"]) .cx-card { border-color: rgba(15, 40, 80, .075); }
a.card:hover, a.cx-card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 var(--p-hl), var(--p-sh-2); }
.card-title, .cx-card-head h2 { letter-spacing: -.01em; }
.page-title { letter-spacing: -.02em; }

/* ---------- number tiles: glossy, with a glow in their own colour; they rise when they can be tapped ---------- */
.tile {
    border-radius: 16px; position: relative;
    box-shadow: inset 0 1px 0 var(--p-hl), var(--p-sh-1);
    transition: transform .25s var(--p-ease), box-shadow .25s var(--p-ease);
}
.tile b { letter-spacing: -.02em; }
.tile-click, a.tile { cursor: pointer; }
.tile-click:hover, a.tile:hover { transform: perspective(700px) translateY(-4px) rotateX(5deg); box-shadow: inset 0 1px 0 var(--p-hl), var(--p-sh-2); }

.hg-stat {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 1px 2px rgba(15, 35, 70, .06), 0 12px 22px -14px rgba(15, 35, 70, .35);
    transition: transform .25s var(--p-ease), box-shadow .25s var(--p-ease);
}
html[data-theme="dark"] .hg-stat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 24px -14px rgba(0, 0, 0, .7); }
.hg-stat:hover { transform: perspective(700px) translateY(-4px) rotateX(6deg); }
.hg-stat b { letter-spacing: -.02em; }

.cx-kpi { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 26px -16px rgba(0, 0, 0, .55); transition: transform .25s var(--p-ease); }
a.cx-kpi:hover, .cx-kpi.tile-click:hover { transform: translateY(-3px); }

/* ---------- hero cards (greeting, earnings, CMD / GM, salary so far): deep 3D panels with light orbs ---------- */
.home-hero, .er-hero, .cx-hero, .hg-pay { position: relative; isolation: isolate; }
.home-hero, .er-hero, .cx-hero {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 4px 10px rgba(8, 31, 64, .16), 0 24px 48px -20px rgba(8, 31, 64, .6);
}
.home-hero::after, .er-hero::after, .cx-hero::after, .hg-pay::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
    background:
        radial-gradient(220px 220px at 92% 8%, rgba(255, 255, 255, .17), transparent 62%),
        radial-gradient(300px 200px at 4% 112%, rgba(14, 143, 163, .38), transparent 66%),
        linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .07) 50%, transparent 62%);
}
.hg-pay { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 16px 30px -16px rgba(8, 31, 64, .7); transition: transform .25s var(--p-ease), box-shadow .25s var(--p-ease); }
.hg-pay:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 22px 38px -18px rgba(8, 31, 64, .8); }
.home-notice { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 14px 28px -12px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .home-notice { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 28px -12px rgba(0, 0, 0, .6); }

/* ---------- Home app tiles: 3D icons that lift towards you ---------- */
.app-tile { transition: transform .28s var(--p-ease), box-shadow .28s var(--p-ease), border-color .2s, background .2s; }
.app-tile:hover { transform: perspective(700px) translateY(-5px) rotateX(6deg); box-shadow: var(--p-sh-2); }
.app-tile .app-ico {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 62%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -3px 6px rgba(0, 0, 0, .05), 0 10px 18px -10px currentColor;
    transition: transform .28s var(--p-ease), box-shadow .28s var(--p-ease);
}
.app-tile:hover .app-ico { transform: translateY(-2px) scale(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 14px 22px -10px currentColor; }
html[data-theme="dark"] .app-tile .app-ico {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, 0) 62%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 20px -10px currentColor;
}

/* ---------- buttons: a little bevel, they rise on hover and press in when tapped ---------- */
.btn { transition: transform .15s var(--p-ease), box-shadow .2s, filter .2s, background-color .2s; }
html .btn:not(.ghost):not(.light):not(.login-btn) {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .06) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 1px 2px rgba(10, 25, 50, .18), 0 8px 18px -8px rgba(10, 25, 50, .45);
}
html:not([data-theme="dark"]) .btn.ghost, html:not([data-theme="dark"]) .btn.light {
    background-image: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(15, 40, 80, .07), 0 2px 6px -2px rgba(15, 35, 70, .15);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); filter: brightness(.97); }
.btn:disabled { transform: none; }

/* the big camera button on the Attendance page: a glowing 3D key */
.big-cam {
    background-image: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 52%), linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .12));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .14), 0 16px 30px -10px rgba(241, 90, 34, .65);
    transition: transform .2s var(--p-ease), box-shadow .2s;
}
.big-cam.out { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .14), 0 16px 30px -10px rgba(230, 74, 74, .65); }
.big-cam:hover { transform: translateY(-2px) scale(1.03); }

/* ---------- forms: soft inset fields with a glowing focus ring ---------- */
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea {
    transition: box-shadow .18s, border-color .18s, background-color .18s;
}
html:not([data-theme="dark"]) .form input:not([type=checkbox]):not([type=radio]):not([type=file]),
html:not([data-theme="dark"]) .form select, html:not([data-theme="dark"]) .form textarea { box-shadow: inset 0 1px 2px rgba(15, 35, 70, .06); }
.form input:not([type=checkbox]):not([type=radio]):focus, .form select:focus, .form textarea:focus { outline-color: transparent; box-shadow: var(--p-ring); }

/* ---------- tables: a lit header and a gentle row highlight (not on frozen name columns) ---------- */
html:not([data-theme="dark"]) .tbl th { background-image: linear-gradient(180deg, #fbfcfe, #f3f6fb); }
.tbl tbody tr > td { transition: background-color .12s; }
.tbl tbody tr:hover > td:not(:first-child) { background-color: var(--p-row); }
.table-wrap:not(.sticky-first) .tbl:not(.month-tbl):not(.io-tbl) tbody tr:hover > td:first-child { background-color: var(--p-row); }

/* ---------- small labels ---------- */
.pill, .tag { box-shadow: inset 0 0 0 1px rgba(15, 35, 70, .05), 0 1px 1px rgba(15, 35, 70, .05); }
html[data-theme="dark"] .pill, html[data-theme="dark"] .tag { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.tabs { box-shadow: inset 0 1px 2px rgba(15, 35, 70, .07); }
.tabs button.on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 10px -3px rgba(11, 42, 85, .45); }
.flash { border-radius: 12px; box-shadow: 0 8px 20px -14px rgba(15, 35, 70, .45); }

/* ---------- sign-in page: glass card and a phone turned in 3D ---------- */
html:not([data-theme="dark"]) .auth-box { box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(16, 32, 64, .05), 0 30px 70px -24px rgba(16, 32, 64, .3); }
html[data-theme="dark"] .auth-box { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 70px -24px rgba(0, 0, 0, .7); }
.auth-hero .feature { transition: transform .28s var(--p-ease), background .2s, box-shadow .28s; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.auth-hero .feature:hover { transform: perspective(700px) translateY(-4px) rotateX(6deg); background: rgba(255, 255, 255, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 18px 30px -18px rgba(0, 0, 0, .6); }
.f-ico { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .06), 0 8px 16px -8px rgba(0, 0, 0, .5); }
.auth-hero .phone { animation-name: p-phone3d; transform: perspective(1000px) rotateY(-16deg) rotateX(6deg) rotate(3deg);
    box-shadow: 30px 40px 70px -20px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .25); }
@keyframes p-phone3d {
    0%, 100% { transform: perspective(1000px) rotateY(-16deg) rotateX(6deg) rotate(3deg) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-10deg) rotateX(4deg) rotate(3deg) translateY(-12px); }
}

/* ---------- round 2: brand accents ---------- */
/* a slightly cooler page so the white cards stand out, with a faint dot grid fading out to the edges */
:root { --bg: #edf1f8; }
body::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(15, 40, 80, .07) 1px, transparent 1.3px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 75%);
}
html[data-theme="dark"] body::after { background-image: radial-gradient(rgba(160, 190, 240, .07) 1px, transparent 1.3px); }

/* the company colours as a thin line under the top bar */
.topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
    background: linear-gradient(90deg, #0b2a55 0%, #0e8fa3 48%, #f15a22 100%); opacity: .6;
}

/* page titles: a small lit bar in the brand colours */
.page-title::before {
    content: ""; display: inline-block; width: 6px; height: .9em; margin-right: 10px; border-radius: 4px; vertical-align: -.06em;
    background: linear-gradient(180deg, #f15a22 0%, #f9b233 45%, #0e8fa3 100%);
    box-shadow: 0 4px 10px -2px rgba(241, 90, 34, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.ev-who .page-title::before { display: none; }

/* number tiles: a soft sheen across the face */
html:not([data-theme="dark"]) .tile { background-image: linear-gradient(160deg, #ffffff 0%, #ffffff 55%, #f5f8fd 100%); }
html[data-theme="dark"] .tile { background-image: linear-gradient(160deg, rgba(255, 255, 255, .03) 0%, rgba(255, 255, 255, 0) 60%); }
.tile b { text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
html[data-theme="dark"] .tile b { text-shadow: none; }

/* cards in the light theme: a touch more lift */
html:not([data-theme="dark"]) .card, html:not([data-theme="dark"]) .home-panel, html:not([data-theme="dark"]) .cx-card {
    box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(15, 35, 70, .05), 0 4px 10px -4px rgba(15, 35, 70, .08), 0 18px 36px -16px rgba(15, 35, 70, .2);
}

/* ---------- round 3: bold 3D ---------- */
/* tiles following the mouse (js/premium.js): quick to follow, deeper shadow while held */
.p-tilt { transition: transform .1s linear, box-shadow .25s var(--p-ease) !important; will-change: transform; }
.p-tilt.tile, .p-tilt.app-tile, .p-tilt.auth-note, .p-tilt.get-app { box-shadow: inset 0 1px 0 var(--p-hl), var(--p-sh-2); }
.p-tilt.hg-stat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 22px 30px -16px rgba(15, 35, 70, .45); }
html[data-theme="dark"] .p-tilt.hg-stat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 30px -16px rgba(0, 0, 0, .8); }

/* buttons: a band of light sweeps across on hover */
html .btn:not(.ghost):not(.light):not(.login-btn) {
    background-image: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .34) 50%, transparent 62%),
                      linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .06) 100%);
    background-size: 260% 100%, 100% 100%; background-position: 140% 0, 0 0; background-repeat: no-repeat;
    transition: transform .15s var(--p-ease), box-shadow .2s, filter .2s, background-position .75s var(--p-ease);
}
html .btn:not(.ghost):not(.light):not(.login-btn):hover { background-position: -40% 0, 0 0; }

/* hero cards: their light orbs drift slowly, big numbers stand out */
.home-hero::after, .er-hero::after, .cx-hero::after, .hg-pay::after { background-size: 125% 125%; animation: p-aurora 14s ease-in-out infinite alternate; }
@keyframes p-aurora { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.er-hero > b, .cx-kpi b, .hg-pay b { text-shadow: 0 6px 18px rgba(0, 0, 0, .3); }

/* side menu: the logo glows softly; the person in the top bar wears a brand ring */
.brand img { animation: p-glow 6s ease-in-out infinite; }
@keyframes p-glow { 50% { box-shadow: 0 8px 18px -4px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .2), 0 0 22px 2px rgba(14, 143, 163, .55); } }
html:not([data-theme="dark"]) .me .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(14, 143, 163, .5), 0 8px 18px -6px rgba(15, 35, 70, .45); }
html[data-theme="dark"] .me .avatar { box-shadow: 0 0 0 2px #0c1322, 0 0 0 4px rgba(94, 200, 220, .45), 0 8px 18px -6px rgba(0, 0, 0, .6); }

/* tables: the row under the mouse gets a teal edge */
.tbl tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 #0e8fa3; }

/* phone app pages: a brand line under the bar, the open tab glows */
.clock-page .app-bar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
    background: linear-gradient(90deg, #0e8fa3, #f9b233 55%, #f15a22); opacity: .75;
}
.clock-page .tabbar a.on svg { filter: drop-shadow(0 4px 6px rgba(229, 83, 27, .45)); }

/* ===== sign-in page: a lit 3D scene on the left, a glass card with a glowing edge on the right ===== */
.auth-hero .orb.o1 { animation: p-drift-a 16s ease-in-out infinite alternate; }
.auth-hero .orb.o2 { animation: p-drift-b 19s ease-in-out infinite alternate; opacity: .35; }
@keyframes p-drift-a { to { transform: translate(-140px, 90px) scale(1.18); } }
@keyframes p-drift-b { to { transform: translate(160px, -70px) scale(1.22); } }
/* the grid becomes a floor going into the distance, slowly moving towards you */
.auth-hero .grid-bg {
    top: auto; left: -30%; right: -30%; bottom: -2%; height: 72%; opacity: 1;
    transform: perspective(560px) rotateX(58deg); transform-origin: 50% 100%;
    background-image: linear-gradient(rgba(110, 215, 232, .42) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 215, 232, .42) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .7) 50%, transparent 96%);
    mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .7) 50%, transparent 96%);
    animation: p-floor 4.5s linear infinite;
}
/* a teal glow where the floor meets the horizon */
.auth-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48%; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse 70% 62% at 50% 100%, rgba(14, 143, 163, .34), transparent 70%);
}
@keyframes p-floor { to { background-position: 0 56px, 0 0; } }
.auth-hero h2 em { background-image: linear-gradient(90deg, #ffb08c, #f15a22, #ffd166, #ffb08c); background-size: 300% 100%; animation: p-shimmer 7s linear infinite; }
@keyframes p-shimmer { to { background-position: 300% 0; } }
.hero-kicker { animation: p-pulse 2.8s ease-out infinite; }
@keyframes p-pulse { 0% { box-shadow: 0 0 0 0 rgba(159, 227, 196, .4); } 70%, 100% { box-shadow: 0 0 0 12px rgba(159, 227, 196, 0); } }
.hero-brand img { box-shadow: 0 0 0 4px rgba(255, 255, 255, .12), 0 12px 26px -6px rgba(0, 0, 0, .55); }
/* feature cards: glass with a lit edge */
.auth-hero .feature {
    border: 1px solid transparent; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(6, 26, 56, .22)) padding-box,
                linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .05) 45%, rgba(110, 215, 232, .45)) border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 20px 36px -22px rgba(0, 0, 0, .8);
}
.auth-hero .feature:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .07)) padding-box,
                linear-gradient(135deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .1) 45%, rgba(241, 90, 34, .6)) border-box;
}
.auth-hero .f-ico { background-image: linear-gradient(180deg, #ffffff, #e9f0fa); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .07), 0 10px 18px -8px rgba(0, 0, 0, .55); }
/* the phone: floating chips at different depths, a glow under it */
.auth-hero .chip-float.c-a { animation: p-chip-a 5s ease-in-out infinite; }
.auth-hero .chip-float.c-b { animation: p-chip-b 6s ease-in-out infinite 1s; }
@keyframes p-chip-a { 50% { transform: rotate(-4deg) translate(-6px, -10px); } }
@keyframes p-chip-b { 50% { transform: rotate(-4deg) translate(6px, -8px); } }
.auth-hero .chip-float { box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .55), inset 0 -2px 0 rgba(0, 0, 0, .05); }

/* right side: soft light and a dot grid behind the card */
.auth-panel {
    background: radial-gradient(520px 380px at 88% 6%, rgba(14, 143, 163, .17), transparent 62%),
                radial-gradient(480px 360px at 8% 96%, rgba(241, 90, 34, .11), transparent 62%),
                radial-gradient(rgba(15, 40, 80, .075) 1px, transparent 1.3px) 0 0 / 22px 22px,
                #f1f5fb;
}
html[data-theme="dark"] .auth-panel {
    background: radial-gradient(520px 380px at 88% 6%, rgba(14, 143, 163, .16), transparent 62%),
                radial-gradient(480px 360px at 8% 96%, rgba(241, 90, 34, .08), transparent 62%),
                radial-gradient(rgba(160, 190, 240, .07) 1px, transparent 1.3px) 0 0 / 22px 22px,
                var(--bg);
}
/* the card: frosted glass, lifted, with a light running around its edge */
.auth-box { position: relative; isolation: isolate; }
html:not([data-theme="dark"]) .auth-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .88));
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-color: rgba(255, 255, 255, .8);
    box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(16, 32, 64, .05), 0 40px 80px -30px rgba(16, 32, 64, .38);
}
.auth-box::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 1;
    background: conic-gradient(from var(--p-angle, 0deg), rgba(14, 143, 163, 0) 0deg, rgba(14, 143, 163, 0) 210deg,
                #0e8fa3 280deg, #f9b233 320deg, #f15a22 345deg, rgba(241, 90, 34, 0) 360deg);
    -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 exclude, linear-gradient(#000 0 0);
    animation: p-spin 6s linear infinite;
}
@keyframes p-spin { to { --p-angle: 360deg; } }
/* the logo floats, with a ring of light */
.auth-logo { animation: p-bob 5s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(255, 255, 255, .95), 0 0 0 7px rgba(14, 143, 163, .25), 0 24px 40px -16px rgba(16, 32, 64, .55); }
html[data-theme="dark"] .auth-logo { box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 0 0 7px rgba(94, 200, 220, .3), 0 24px 40px -16px rgba(0, 0, 0, .7); }
@keyframes p-bob { 50% { transform: translateY(-7px); } }
/* "Welcome back!" in the brand colours */
html:not([data-theme="dark"]) .auth-box h1 { background: linear-gradient(90deg, #081f40 0%, #0b4a7a 45%, #0e8fa3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="dark"] .auth-box h1 { background: linear-gradient(90deg, #e6ecf5 0%, #8fd6e3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* fields pressed into the card */
html:not([data-theme="dark"]) .field.ico-left input { box-shadow: inset 0 2px 4px rgba(15, 35, 70, .07), 0 1px 0 rgba(255, 255, 255, .9); }
html:not([data-theme="dark"]) .field.ico-left input:focus { box-shadow: 0 0 0 4px rgba(14, 143, 163, .16), inset 0 1px 2px rgba(15, 35, 70, .04); }
/* Sign in: a 3D key with light passing over it now and then */
.login-btn { position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .18), 0 16px 30px -12px rgba(11, 42, 85, .55) !important; }
.login-btn::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
    transform: translateX(-120%); animation: p-sweep 5s ease-in-out infinite 1.2s;
}
@keyframes p-sweep { 0%, 72% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.auth-note, .get-app { transition: transform .25s var(--p-ease), box-shadow .25s var(--p-ease); }
html:not([data-theme="dark"]) .auth-note { background: linear-gradient(180deg, #f6f9fd, #eef3fa); box-shadow: inset 0 1px 0 #fff; }
html:not([data-theme="dark"]) .get-app { box-shadow: inset 0 1px 0 #fff, 0 6px 14px -8px rgba(15, 35, 70, .25); }
.get-app:hover { transform: translateY(-2px); }

/* phone opening screen: the same 3D floor and a floating logo */
.splash { overflow: hidden; }
.splash::before {
    content: ""; position: absolute; left: -40%; right: -40%; bottom: -2%; height: 62%; pointer-events: none;
    transform: perspective(460px) rotateX(58deg); transform-origin: 50% 100%;
    background-image: linear-gradient(rgba(110, 215, 232, .42) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 215, 232, .42) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 95%); mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 95%);
    animation: p-floor-s 4.5s linear infinite;
}
@keyframes p-floor-s { to { background-position: 0 44px, 0 0; } }
.splash::after {
    content: ""; position: absolute; width: 420px; height: 420px; left: 50%; top: 30%; margin: -210px 0 0 -210px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(14, 143, 163, .45), transparent 65%); animation: p-breathe 6s ease-in-out infinite;
}
@keyframes p-breathe { 50% { transform: scale(1.15); opacity: .7; } }
.splash-in { position: relative; z-index: 1; }
.splash-logo { animation: p-bob 5s ease-in-out infinite; box-shadow: 0 0 0 8px rgba(255, 255, 255, .08), 0 0 0 18px rgba(255, 255, 255, .04), 0 34px 60px -20px rgba(0, 0, 0, .65); }
.splash-go { position: relative; overflow: hidden; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08), 0 18px 34px -14px rgba(0, 0, 0, .6) !important; }
.splash-go::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(14, 143, 163, .25) 50%, transparent 65%);
    transform: translateX(-120%); animation: p-sweep 4s ease-in-out infinite .8s;
}

/* less motion asked for: everything from round 3 stands still */
@media (prefers-reduced-motion: reduce) {
    .home-hero::after, .er-hero::after, .cx-hero::after, .hg-pay::after, .brand img, .auth-hero .orb.o1, .auth-hero .orb.o2,
    .auth-hero .grid-bg, .auth-hero h2 em, .hero-kicker, .auth-hero .chip-float, .auth-box::before, .auth-logo, .login-btn::after,
    .splash::before, .splash::after, .splash-logo, .splash-go::after { animation: none !important; }
    .get-app:hover { transform: none; }
}

/* ---------- round 4: colour sets instead of the blue (html[data-palette]) ---------- */
html[data-palette="purple"] {
    --pal-0: #160a33; --pal-1: #2e1065; --pal-2: #5b21b6; --pal-3: #7c3aed; --pal-ink: #2a0f5c;
    --pal-glow: rgba(167, 139, 250, .45); --pal-soft: rgba(124, 58, 237, .13); --pal-line: rgba(196, 181, 253, .4);
}
html[data-palette="emerald"] {
    --pal-0: #022c22; --pal-1: #064e3b; --pal-2: #047857; --pal-3: #0d9488; --pal-ink: #053b30;
    --pal-glow: rgba(52, 211, 153, .4); --pal-soft: rgba(13, 148, 136, .13); --pal-line: rgba(110, 231, 183, .4);
}
html[data-palette="midnight"] {
    --pal-0: #070709; --pal-1: #18181b; --pal-2: #2a2a30; --pal-3: #ea580c; --pal-ink: #111827;
    --pal-glow: rgba(249, 115, 22, .36); --pal-soft: rgba(234, 88, 12, .11); --pal-line: rgba(253, 186, 116, .34);
}
html[data-palette="maroon"] {
    --pal-0: #24060f; --pal-1: #4c0519; --pal-2: #881337; --pal-3: #be123c; --pal-ink: #3b0a18;
    --pal-glow: rgba(251, 113, 133, .38); --pal-soft: rgba(190, 18, 60, .11); --pal-line: rgba(253, 164, 175, .36);
}
html[data-palette] { --navy: var(--pal-1); --navy-2: var(--pal-2); --blue: var(--pal-3); --teal: var(--pal-3); --p-glow-1: var(--pal-soft); --p-glow-3: var(--pal-soft); --p-ring: 0 0 0 4px var(--pal-soft); }
/* side menu */
html[data-palette]:not([data-theme="dark"]) .sidebar {
    background: radial-gradient(420px 260px at -10% -6%, var(--pal-glow), transparent 62%),
                radial-gradient(380px 320px at 110% 104%, rgba(241, 90, 34, .18), transparent 62%),
                linear-gradient(180deg, var(--pal-0) 0%, var(--pal-1) 52%, var(--pal-2) 100%);
}
html[data-palette][data-theme="dark"] .sidebar { background: radial-gradient(420px 260px at -10% -6%, var(--pal-soft), transparent 62%), linear-gradient(180deg, #08080c 0%, var(--pal-0) 100%); }
html[data-palette]:not([data-theme="dark"]) .side-nav a.on, html[data-palette]:not([data-theme="dark"]) .side-foot a.on { color: var(--pal-0); }
html[data-palette][data-theme="dark"] .side-nav a.on, html[data-palette][data-theme="dark"] .side-foot a.on {
    background: linear-gradient(180deg, var(--pal-2) 0%, var(--pal-1) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 3px 0 0 #f15a22, 0 12px 24px -12px rgba(0, 0, 0, .7);
}
html[data-palette][data-theme="dark"] .side-nav a.on svg { color: #f15a22; }
/* top bar, titles, small accents */
html[data-palette] .topbar::after { background: linear-gradient(90deg, var(--pal-1) 0%, var(--pal-3) 50%, #f15a22 100%); }
html[data-palette] .page-title::before { background: linear-gradient(180deg, #f15a22 0%, #f9b233 45%, var(--pal-3) 100%); }
html[data-palette]:not([data-theme="dark"]) .page-title { color: var(--pal-ink); }
html[data-palette]:not([data-theme="dark"]) .company { color: var(--pal-1); }
html[data-palette]:not([data-theme="dark"]) .me .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pal-3), 0 8px 18px -6px rgba(15, 35, 70, .45); }
html[data-palette] .tbl tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 var(--pal-3); }
html[data-palette] .hr-glance::before { background: linear-gradient(90deg, var(--pal-1), var(--pal-3) 45%, #f15a22); }
html[data-palette][data-theme="dark"] .btn.primary { background-color: var(--pal-2); }
/* hero panels */
html[data-palette] .home-hero { background: radial-gradient(circle at 90% 0%, var(--pal-glow), transparent 45%), linear-gradient(150deg, var(--pal-0), var(--pal-2)); }
html[data-palette] .er-hero { background: linear-gradient(130deg, var(--pal-1), var(--pal-2)); }
html[data-palette] .cx-hero { background: radial-gradient(640px 240px at 100% 0%, rgba(241, 90, 34, .25), transparent 62%), linear-gradient(120deg, var(--pal-0), var(--pal-1) 58%, var(--pal-2)); }
html[data-palette] .hg-pay { background: linear-gradient(120deg, var(--pal-1), var(--pal-2) 60%, var(--pal-3)); }
html[data-palette] .home-hero::after, html[data-palette] .er-hero::after, html[data-palette] .cx-hero::after, html[data-palette] .hg-pay::after {
    background: radial-gradient(220px 220px at 92% 8%, rgba(255, 255, 255, .17), transparent 62%),
                radial-gradient(300px 200px at 4% 112%, var(--pal-glow), transparent 66%),
                linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .07) 50%, transparent 62%);
    background-size: 125% 125%;
}
/* phone app bar */
html[data-palette] .clock-page .app-bar { background: linear-gradient(120deg, var(--pal-1), var(--pal-2)); }
/* sign-in page */
html[data-palette] .auth-hero {
    background: radial-gradient(1200px 600px at 110% -10%, var(--pal-glow), transparent 60%),
                radial-gradient(800px 500px at -10% 110%, rgba(241, 90, 34, .22), transparent 60%),
                linear-gradient(145deg, var(--pal-0) 0%, var(--pal-1) 50%, var(--pal-2) 100%);
}
html[data-palette] .auth-hero .orb.o1 { background: var(--pal-3); }
html[data-palette] .auth-hero .grid-bg { background-image: linear-gradient(var(--pal-line) 1px, transparent 1px), linear-gradient(90deg, var(--pal-line) 1px, transparent 1px); }
html[data-palette] .auth-hero::after { background: radial-gradient(ellipse 70% 62% at 50% 100%, var(--pal-glow), transparent 70%); }
html[data-palette] .auth-hero .feature:not(:hover) {
    background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(0, 0, 0, .2)) padding-box,
                linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .05) 45%, var(--pal-line)) border-box;
}
html[data-palette] .splash { background: radial-gradient(circle at 80% 0%, var(--pal-glow), transparent 45%), linear-gradient(160deg, var(--pal-0), var(--pal-2)); }
html[data-palette] .splash::before { background-image: linear-gradient(var(--pal-line) 1px, transparent 1px), linear-gradient(90deg, var(--pal-line) 1px, transparent 1px); }
html[data-palette] .splash::after { background: radial-gradient(circle, var(--pal-glow), transparent 65%); }
html[data-palette]:not([data-theme="dark"]) .auth-panel {
    background: radial-gradient(520px 380px at 88% 6%, var(--pal-soft), transparent 62%),
                radial-gradient(480px 360px at 8% 96%, rgba(241, 90, 34, .1), transparent 62%),
                radial-gradient(rgba(15, 40, 80, .075) 1px, transparent 1.3px) 0 0 / 22px 22px, #f4f3f8;
}
html[data-palette] .auth-box::before {
    background: conic-gradient(from var(--p-angle, 0deg), transparent 0deg, transparent 210deg, var(--pal-3) 280deg, #f9b233 320deg, #f15a22 345deg, transparent 360deg);
}
html[data-palette]:not([data-theme="dark"]) .auth-box h1 { background: linear-gradient(90deg, var(--pal-ink) 0%, var(--pal-2) 50%, var(--pal-3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-palette] .login-btn { background: linear-gradient(135deg, var(--pal-1), var(--pal-3)) !important; }
html[data-palette] .auth-logo { box-shadow: 0 0 0 6px rgba(255, 255, 255, .95), 0 0 0 7px var(--pal-soft), 0 24px 40px -16px rgba(16, 32, 64, .55); }
html[data-palette]:not([data-theme="dark"]) .field.ico-left input:focus { border-color: var(--pal-3) !important; box-shadow: 0 0 0 4px var(--pal-soft); }
html[data-palette] .field.ico-left:focus-within .lead { stroke: var(--pal-3); }
html[data-palette] .auth-note svg { stroke: var(--pal-3); }
html[data-palette="purple"] { --pal-link: #6d28d9; }
html[data-palette="emerald"] { --pal-link: #047857; }
html[data-palette="midnight"] { --pal-link: #c2410c; }
html[data-palette="maroon"] { --pal-link: #9f1239; }
html[data-palette] .forgot { color: var(--pal-link); }
html[data-palette]:not([data-theme="dark"]) .lang-sw button[aria-pressed="true"] { background: var(--pal-1); box-shadow: 0 2px 6px var(--pal-soft); }
html[data-palette] .phone-top { background: var(--pal-1); }
html[data-palette]:not([data-theme="dark"]) .hg-link { color: var(--pal-link); background: var(--pal-soft); }
/* the colour set on every other navy panel, total row and chip */
html[data-palette] .today, html[data-palette] .ss-main, html[data-palette] .stat-strip {
    background: radial-gradient(circle at 92% 0%, var(--pal-glow), transparent 42%), linear-gradient(120deg, var(--pal-0) 0%, var(--pal-1) 60%, var(--pal-2) 100%);
}
html[data-palette] .start-page { background: radial-gradient(circle at 80% 0%, var(--pal-glow), transparent 45%), radial-gradient(circle at 0% 100%, rgba(241, 90, 34, .25), transparent 40%), linear-gradient(160deg, var(--pal-0), var(--pal-2)); }
html[data-palette] .leave-top, html[data-palette] .lv-hero { background: linear-gradient(150deg, var(--pal-0), var(--pal-2)); }
html[data-palette] .cx-pay, html[data-palette] .sp-main, html[data-palette] .ea-main {
    background: radial-gradient(420px 200px at 100% 100%, rgba(241, 90, 34, .22), transparent 60%), linear-gradient(140deg, var(--pal-1), var(--pal-2) 60%, var(--pal-3));
}
html[data-palette] .acc-dlg-head, html[data-palette] .hol-pop-head { background: linear-gradient(135deg, var(--pal-1), var(--pal-2)); }
html[data-palette] .bday-top { background: linear-gradient(135deg, var(--pal-1) 0%, var(--pal-3) 55%, #f15a22 100%); }
html[data-palette] .install-page { background: linear-gradient(180deg, var(--pal-1) 0, var(--pal-1) 230px, var(--bg) 230px); }
html[data-palette] .cam-head, html[data-palette] .cam-room, html[data-palette] .app-update, html[data-palette] .pf-cam,
html[data-palette] .ins-steps li::before, html[data-palette] .phone-face span { background: var(--pal-1); }
html[data-palette] .ins-btn2 .btn { background-color: var(--pal-1); }
html[data-palette] .seg a.on, html[data-palette] .dchip.on, html[data-palette] .mday.sel, html[data-palette] .lv-day.sel { background: var(--pal-1); border-color: var(--pal-1); }
html[data-palette] .lb-day.lb-today { background: var(--pal-1) !important; }
html[data-palette] .ea-tbl tr.ea-total td, html[data-palette] .sp-tbl tr.sp-total td, html[data-palette] .sp-tbl tr.sp-total { background: var(--pal-1); }
html[data-palette] .mock-bars span { background: linear-gradient(180deg, var(--pal-3), var(--pal-1)); }


/* ---------- the colours button (top bar, sign-in) and the note naming the colours ---------- */
.pal-btn svg { width: 21px; height: 21px; }
.pal-btn:hover { transform: rotate(18deg) scale(1.06); }
.pal-btn:active { transform: scale(.94); }
@media (max-width: 960px) { .topbar .theme-btn + .pal-btn { margin-left: 0; } }
/* phone: the top bar keeps room for the name and date next to the language, dark / light and colours buttons */
@media (max-width: 480px) {
    .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
    .topbar .theme-btn { width: 34px; height: 34px; }
    .topbar .theme-btn svg { width: 17px; height: 17px; }
    .topbar .lang-sw { height: 34px; padding: 2px; }
    .topbar .lang-sw button { min-width: 28px; height: 28px; padding: 0 6px; }
    .topbar .me .avatar { width: 36px; height: 36px; }
}
.auth-panel .pal-btn.float { right: 66px; }
.auth-panel .lang-sw.float:not(.solo) { right: 116px; }
.pal-note {
    position: fixed; left: 50%; top: 14px; z-index: 3000; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
    padding: 9px 16px; border-radius: 99px; font-weight: 800; font-size: .88rem; color: #fff; white-space: nowrap;
    background: linear-gradient(135deg, var(--pal-1, #0b2a55), var(--pal-3, #0e8fa3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 30px -10px rgba(0, 0, 0, .55);
    transition: opacity .25s, transform .25s var(--p-ease);
}
.pal-note.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- round 5: professional typography (the words are not changed) ---------- */
:root {
    --f-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --f-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* text: Inter with its clearer letters (l with a tail, so User IDs read right), comfortable lines */
body, .clock-page, .app-body, .install-page, button, input, select, textarea { font-feature-settings: "cv05", "cv08", "calt"; }
body { text-rendering: optimizeLegibility; }
p, li, .muted, .page-sub, .lead, .note { text-wrap: pretty; }
p { line-height: 1.55; }

/* headings: the display face, tight and balanced */
h1, h2, h3, .page-title, .card-title, .cx-card-head h2, .er-h2, .home-q, .lv-title, .auth-box h1, .auth-hero h2,
.home-hello h1, .cx-hello h1, .brand b, .hero-brand b, .greet b {
    font-family: var(--f-display); text-wrap: balance; word-spacing: .06em;
}
.page-title { font-weight: 800; letter-spacing: -.012em; line-height: 1.15; }
.card-title, .cx-card-head h2, .er-h2 { font-weight: 700; letter-spacing: -.006em; }
.auth-box h1 { font-weight: 800; letter-spacing: -.014em; }
.auth-hero h2 { font-weight: 800; letter-spacing: -.016em; line-height: 1.12; }
.home-hello h1, .cx-hello h1 { font-weight: 800; letter-spacing: -.01em; }
.brand b { font-weight: 800; letter-spacing: 0; }
.greet b { font-weight: 700; letter-spacing: 0; }
.page-sub { font-size: .95rem; line-height: 1.5; letter-spacing: -.003em; }

/* big numbers and money: the display face with even-width figures, so columns of numbers line up */
.tile b, .hg-stat b, .cx-kpi b, .er-hero > b, .hg-pay b, .cx-pay-big, .ht-grid b, .today-times b, .stat b, .bar b,
.er-line b, .er-slip b, .sp-main b, .ea-main b, .cx-money, .cx-mini b {
    font-family: var(--f-display); font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum", "lnum";
}
.tile b, .hg-stat b, .cx-kpi b { font-weight: 800; letter-spacing: -.02em; }
.er-hero > b { font-weight: 800; letter-spacing: -.025em; }
.tbl td, .tbl .num, .sheet td, .month-tbl td, .lb-sheet td, time { font-variant-numeric: tabular-nums; }

/* small labels: quiet capitals with even spacing */
.tbl th, .side-label, .cx-kpi span, .cx-eyebrow, .er-hero > small, .hero-kicker, .tool-lbl, .pal-lbl, .section-label {
    font-family: var(--f-text); font-weight: 700; letter-spacing: .075em; text-transform: uppercase;
}
.tbl th { font-size: .72rem; }
.tile small, .hg-stat small { font-weight: 600; letter-spacing: .005em; }
.form label, .lbl { font-weight: 600; letter-spacing: -.003em; }

/* side menu and buttons: crisp, medium weight */
.side-nav a, .side-foot a, .side-foot button { font-weight: 600; letter-spacing: -.008em; }
.side-nav a.on { font-weight: 700; }
.btn { font-weight: 700; letter-spacing: .005em; }
.pill, .tag { font-weight: 700; letter-spacing: .03em; }

/* Hindi: the Devanagari face for headings and numbers too, never letter-spaced */
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] .page-title, html[lang="hi"] .card-title,
html[lang="hi"] .cx-card-head h2, html[lang="hi"] .auth-box h1, html[lang="hi"] .auth-hero h2, html[lang="hi"] .home-hello h1,
html[lang="hi"] .cx-hello h1, html[lang="hi"] .greet b, html[lang="hi"] .home-q {
    font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
}
html[lang="hi"] .tbl th, html[lang="hi"] .side-label, html[lang="hi"] .cx-kpi span, html[lang="hi"] .cx-eyebrow { text-transform: none; }

/* ---------- round 6: Poppins for headings, figures, menu and buttons (the words are not changed) ---------- */
:root { --f-display: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, h3, .page-title, .card-title, .cx-card-head h2, .er-h2, .home-q, .lv-title, .auth-box h1, .auth-hero h2,
.home-hello h1, .cx-hello h1, .brand b, .hero-brand b, .greet b { word-spacing: normal; }
.page-title { font-weight: 700; letter-spacing: -.012em; }
.card-title, .cx-card-head h2, .er-h2 { font-weight: 600; letter-spacing: -.005em; }
.auth-box h1, .auth-hero h2, .home-hello h1, .cx-hello h1 { font-weight: 700; letter-spacing: -.015em; }
.brand b { font-weight: 700; letter-spacing: -.005em; }
.greet b { font-weight: 600; letter-spacing: 0; }
.home-q { font-weight: 600; letter-spacing: -.005em; }
/* figures: Poppins, a touch lighter so they look crisp, not heavy */
.tile b, .hg-stat b, .cx-kpi b, .er-hero > b, .hg-pay b, .cx-pay-big, .ht-grid b, .today-times b, .er-line b, .er-slip b,
.sp-main b, .ea-main b, .cx-money, .cx-mini b { font-weight: 700; letter-spacing: -.01em; }
/* side menu, top-bar company name, buttons, home tiles: Poppins */
.side-nav a, .side-foot a, .side-foot button, .company, .btn, .app-tile, .hg-link, .cx-card-head a, .cx-btn, .login-btn {
    font-family: var(--f-display);
}
.side-nav a, .side-foot a, .side-foot button { font-weight: 500; letter-spacing: 0; }
.side-nav a.on { font-weight: 600; }
.btn { font-weight: 600; letter-spacing: .005em; }
.app-tile { font-weight: 500; }
.company { font-weight: 600; letter-spacing: .06em; }
/* hero titles: a soft lift off the panel */
.home-hello h1, .cx-hello h1, .er-hero > b, .auth-hero h2 { text-shadow: 0 2px 14px rgba(0, 0, 0, .22); }
/* card titles in the light theme take the colour set's deep ink */
html:not([data-theme="dark"]) .card-title, html:not([data-theme="dark"]) .cx-card:not(.cx-pay) .cx-card-head h2 { color: var(--pal-ink, #10213f); }
/* titles on the dark payroll / salary panels stay white */
.cx-pay .cx-card-head h2 { color: #fff; }
/* quieter grey text reads a little darker */
html:not([data-theme="dark"]) .muted, html:not([data-theme="dark"]) .page-sub { color: #5f6b7d; }
/* Hindi: Poppins has Devanagari too, so headings, menu and buttons stay in the same style */
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] .page-title, html[lang="hi"] .card-title,
html[lang="hi"] .cx-card-head h2, html[lang="hi"] .auth-box h1, html[lang="hi"] .auth-hero h2, html[lang="hi"] .home-hello h1,
html[lang="hi"] .cx-hello h1, html[lang="hi"] .greet b, html[lang="hi"] .home-q, html[lang="hi"] .side-nav a,
html[lang="hi"] .side-foot a, html[lang="hi"] .side-foot button, html[lang="hi"] .btn, html[lang="hi"] .app-tile {
    font-family: "Poppins", "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
}

/* ---------- round 7: a design you can see ---------- */
/* the colour set's tones, also for the default navy (each colour set below overrides them) */
:root {
    --pal-0: #061a38; --pal-1: #0b2a55; --pal-2: #163d78; --pal-3: #0e8fa3; --pal-ink: #0b2a55;
    --pal-glow: rgba(14, 143, 163, .45); --pal-soft: rgba(14, 143, 163, .12); --pal-line: rgba(110, 215, 232, .42);
    --pal-hi: #8fd6e3; --pal-tint: #e9f3fa; --pal-link: #1d5c96;
}
html[data-palette="purple"] { --pal-hi: #c4b5fd; --pal-tint: #f1ecfe; }
html[data-palette="emerald"] { --pal-hi: #6ee7b7; --pal-tint: #e3f5ef; }
html[data-palette="midnight"] { --pal-hi: #fdba74; --pal-tint: #fbefe5; }
html[data-palette="maroon"] { --pal-hi: #fda4af; --pal-tint: #fcebef; }

/* page titles: bigger, in a colour gradient */
.page-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); }
.page-title { background-image: linear-gradient(90deg, var(--pal-ink) 0%, var(--pal-2) 45%, var(--pal-3) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--pal-ink); }
html[data-theme="dark"] .page-title { background-image: linear-gradient(90deg, #f1f5ff 0%, var(--pal-hi) 100%); }
.page-title::before { -webkit-text-fill-color: initial; }
.ev-who .page-title { background-image: none; -webkit-text-fill-color: currentColor; }

/* card titles: a little bigger, with a glowing colour mark */
.card-title { font-size: 1.08rem; }
.card-title:not(:has(> i))::before, .cx-card:not(.cx-pay) .cx-card-head h2::before {
    content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 3px; vertical-align: .1em;
    background: linear-gradient(135deg, var(--pal-3), #f15a22); box-shadow: 0 0 0 3px var(--pal-soft), 0 3px 8px -2px rgba(241, 90, 34, .5);
}
/* every card: a colour accent along its top edge */
.card, .cx-card:not(.cx-pay) { box-shadow: inset 0 3px 0 var(--pal-3), inset 0 4px 0 var(--p-hl), var(--p-sh-1); }
html:not([data-theme="dark"]) .card, html:not([data-theme="dark"]) .cx-card:not(.cx-pay) {
    box-shadow: inset 0 3px 0 var(--pal-3), 0 1px 1px rgba(15, 35, 70, .05), 0 4px 10px -4px rgba(15, 35, 70, .08), 0 18px 36px -16px rgba(15, 35, 70, .2);
}
.sp-main.card, .ea-main.card, .card.sp-main { box-shadow: 0 18px 36px -16px rgba(15, 35, 70, .35); }

/* Home: the question in a colour gradient, section headings with a line */
.home-q:not(.small-q) { font-size: 1.3rem; background-image: linear-gradient(90deg, var(--pal-ink), var(--pal-3));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="dark"] .home-q:not(.small-q) { background-image: linear-gradient(90deg, #f1f5ff, var(--pal-hi)); }
.home-q.small-q { display: flex; align-items: center; gap: 12px; color: var(--pal-2); letter-spacing: .12em; }
html[data-theme="dark"] .home-q.small-q { color: var(--pal-hi); }
.home-q.small-q::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--pal-3), transparent); opacity: .5; }

/* greetings on the hero panels: white to warm gold */
.home-hello h1, .cx-hello h1 { font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem); background-image: linear-gradient(90deg, #ffffff 0%, #ffffff 50%, #ffd29a 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .28)); }

/* side menu: each icon in its own glass chip; the open page's chip glows orange; section labels with a line */
.side-nav a, .side-foot a, .side-foot button { padding-top: 6px; padding-bottom: 6px; }
.side-nav svg, .side-foot svg { box-sizing: content-box; padding: 6px; border-radius: 9px; background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); transition: background .2s, transform .2s var(--p-ease); }
.side-nav a:hover svg, .side-foot a:hover svg, .side-foot button:hover svg { background: rgba(255, 255, 255, .16); transform: scale(1.06); }
.side-nav a.on svg, .side-foot a.on svg { color: #fff !important; background: linear-gradient(135deg, #f15a22, #f9b233);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -4px rgba(241, 90, 34, .7); }
.side-label { display: flex; align-items: center; gap: 10px; color: #a9bbdc; }
.side-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .22), transparent); }

/* tables: a tinted header row in the colour set */
html:not([data-theme="dark"]) .tbl th, html:not([data-theme="dark"]) .cx-dept th {
    background: var(--pal-tint); background-image: none; color: var(--pal-ink); border-bottom: 2px solid var(--pal-soft);
}
html:not([data-theme="dark"]) .tbl thead tr > th:first-child, html:not([data-theme="dark"]) .cx-dept tr > th:first-child { border-top-left-radius: 10px; }
html:not([data-theme="dark"]) .tbl thead tr > th:last-child, html:not([data-theme="dark"]) .cx-dept tr > th:last-child { border-top-right-radius: 10px; }

/* primary buttons: a colour gradient under the shine */
html .btn.primary:not(.ghost):not(.light):not(.login-btn) {
    background-image: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .34) 50%, transparent 62%),
                      linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .06) 100%),
                      linear-gradient(135deg, var(--pal-1) 0%, var(--pal-2) 55%, var(--pal-3) 100%);
    background-size: 260% 100%, 100% 100%, 100% 100%;
}

/* big numbers on light tiles: deep colour gradient */
html:not([data-theme="dark"]) .tile b { background-image: linear-gradient(135deg, var(--pal-ink), var(--pal-3));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; }

/* phones: headings a little smaller so titles and their links stay on one line, as before */
@media (max-width: 600px) {
    .page-title { font-size: 1.25rem; }
    .cx-card-head h2 { font-size: .95rem; }
    .cx-card:not(.cx-pay) .cx-card-head h2::before, .card-title:not(:has(> i))::before { width: 7px; height: 7px; margin-right: 7px; }
}
/* the top bar greeting: the name stands out */
.greet b { color: var(--pal-ink); }
html[data-theme="dark"] .greet b { color: #f1f5ff; }

/* ---------- round 8: the sign-in card, latest look ---------- */
/* the card: glass, an aurora of the colour set at the top, a coloured glow under it */
.auth-box { border-radius: 28px; padding: 30px 30px 22px; }
html:not([data-theme="dark"]) .auth-box {
    background: radial-gradient(120% 55% at 50% -12%, var(--pal-soft), transparent 62%),
                radial-gradient(60% 40% at 100% 0%, rgba(241, 90, 34, .08), transparent 70%),
                linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .9));
    box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(16, 32, 64, .05), 0 34px 70px -26px var(--pal-glow), 0 50px 90px -40px rgba(16, 32, 64, .35);
}
html[data-theme="dark"] .auth-box {
    background: radial-gradient(120% 55% at 50% -12%, var(--pal-soft), transparent 62%), linear-gradient(180deg, #172238, #131c2e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 34px 70px -26px var(--pal-glow), 0 50px 90px -40px rgba(0, 0, 0, .8);
}
.auth-box::before { padding: 2px; }

/* the logo: in a ring of the brand colours that turns slowly, floating, with a glow */
.auth-logo {
    padding: 5px; border-radius: 50%;
    background: linear-gradient(#fff, #fff) content-box,
                conic-gradient(from var(--p-angle, 0deg), var(--pal-3), #f9b233, #f15a22, var(--pal-2), var(--pal-3)) border-box;
    animation: p-bob 5s ease-in-out infinite, p-spin 7s linear infinite;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .9), 0 0 34px 4px var(--pal-soft), 0 22px 40px -16px var(--pal-glow) !important;
}
html[data-theme="dark"] .auth-logo { box-shadow: 0 0 0 6px rgba(255, 255, 255, .05), 0 0 34px 4px var(--pal-soft), 0 22px 40px -16px rgba(0, 0, 0, .7) !important; }

/* heading and line under it */
.auth-box h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.15rem); margin-top: 4px; }
.auth-box > .muted { font-size: .95rem; }

/* labels: small, in the colour set's ink */
.auth-box .lbl { color: var(--pal-ink) !important; font-size: .78rem !important; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
html[data-theme="dark"] .auth-box .lbl { color: #c9d4e8 !important; }

/* fields: taller and rounder; the icon sits in a tinted chip; a gradient ring and glow when typing */
.auth-box .field.ico-left input {
    height: 56px; border-radius: 16px !important; padding-left: 58px !important; font-size: 1rem !important;
    transition: border-color .2s, box-shadow .25s, background-color .2s !important;
}
html:not([data-theme="dark"]) .auth-box .field.ico-left input { background: #f6f8fc !important; border: 1.5px solid #e2e8f1 !important; }
html:not([data-theme="dark"]) .auth-box .field.ico-left input:hover { border-color: #cfd8e6 !important; background: #fbfcfe !important; }
.auth-box .field.ico-left input:focus {
    border: 2px solid transparent !important;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--pal-3), #f9b233 55%, #f15a22) border-box !important;
    box-shadow: 0 0 0 5px var(--pal-soft), 0 14px 26px -16px var(--pal-glow) !important;
}
html[data-theme="dark"] .auth-box .field.ico-left input:focus {
    background: linear-gradient(#18233a, #18233a) padding-box, linear-gradient(135deg, var(--pal-3), #f9b233 55%, #f15a22) border-box !important;
}
.auth-box .field .lead {
    left: 10px; width: 22px; height: 22px; padding: 7px; box-sizing: content-box; border-radius: 11px;
    background: var(--pal-soft); stroke: var(--pal-3) !important; transition: background .25s, stroke .25s, transform .25s var(--p-ease);
}
.auth-box .field.ico-left:focus-within .lead { background: linear-gradient(135deg, var(--pal-2), var(--pal-3)); stroke: #fff !important; transform: translateY(-50%) scale(1.04); }
.auth-box .field .eye { right: 10px; border-radius: 10px; transition: background .2s; }
.auth-box .field .eye:hover { background: var(--pal-soft); }

/* remember-me and forgot */
.auth-box .auth-row .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.auth-box .auth-row .check input { width: 18px; height: 18px; accent-color: var(--pal-2); cursor: pointer; }
.auth-box .forgot { position: relative; color: var(--pal-link) !important; text-decoration: none !important; }
.auth-box .forgot::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: currentColor;
    transform: scaleX(0); transform-origin: right; transition: transform .3s var(--p-ease); }
.auth-box .forgot:hover::after { transform: scaleX(1); transform-origin: left; }

/* Sign in: a big 3D key in the colour set, with a coloured glow */
.auth-box .login-btn {
    min-height: 58px; border-radius: 16px !important; font-size: 1.08rem; letter-spacing: .01em; margin-top: 6px;
    background: linear-gradient(135deg, var(--pal-1) 0%, var(--pal-2) 50%, var(--pal-3) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 18px 34px -14px var(--pal-glow), 0 8px 16px -10px rgba(0, 0, 0, .4) !important;
    transition: transform .2s var(--p-ease), box-shadow .25s, filter .2s !important;
}
.auth-box .login-btn:hover { transform: translateY(-2px); filter: saturate(1.1) brightness(1.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 24px 40px -14px var(--pal-glow), 0 10px 20px -10px rgba(0, 0, 0, .45) !important; }
.auth-box .login-btn:active { transform: translateY(1px); }
.auth-box .login-btn svg { width: 22px; height: 22px; padding: 4px; box-sizing: content-box; border-radius: 50%; background: rgba(255, 255, 255, .18); }

/* the two notes: tiles with icon chips */
.auth-box .auth-note, .auth-box .get-app { border-radius: 16px; padding: 12px 14px; align-items: center; }
html:not([data-theme="dark"]) .auth-box .auth-note { background: linear-gradient(180deg, #f8fafd, #f1f5fa); border: 1px solid #e6ecf4; }
.auth-box .auth-note svg, .auth-box .get-app > svg:first-child {
    width: 20px; height: 20px; padding: 8px; box-sizing: content-box; border-radius: 12px; margin-top: 0;
}
.auth-box .auth-note svg { background: var(--pal-soft); stroke: var(--pal-3) !important; }
.auth-box .get-app > svg:first-child { background: rgba(241, 90, 34, .1); }
.auth-box .get-app .chev { transition: transform .25s var(--p-ease); }
.auth-box .get-app:hover .chev { transform: translateX(4px); }
html:not([data-theme="dark"]) .auth-box .get-app { border: 1px solid #e6ecf4; }
.auth-box .get-app:hover { border-color: var(--pal-3); }

/* the line at the bottom: a small lock */
.auth-box .auth-foot::before { content: "\1F512"; margin-right: 6px; font-size: .8em; }

/* the card's parts rise in one after another */
@media (prefers-reduced-motion: no-preference) {
    .auth-box > * { animation: p-rise .6s var(--p-ease) backwards; }
    .auth-box > :nth-child(2) { animation-delay: .06s; } .auth-box > :nth-child(3) { animation-delay: .1s; }
    .auth-box > :nth-child(4) { animation-delay: .14s; } .auth-box > :nth-child(5) { animation-delay: .18s; }
    .auth-box > :nth-child(6) { animation-delay: .22s; } .auth-box > :nth-child(n+7) { animation-delay: .26s; }
    .auth-box > .auth-logo { animation: p-rise .6s var(--p-ease) backwards, p-bob 5s ease-in-out .6s infinite, p-spin 7s linear infinite; }
}
@media (prefers-reduced-motion: reduce) { .auth-box .auth-logo { animation: none; } .auth-box .login-btn:hover { transform: none; } }

/* phones and tablets: the language, colours and dark / light buttons get their own row above the card */
@media (max-width: 900px) {
    .auth-panel { padding-top: 72px !important; }
}
/* the sign-in fields: no extra outline from the dark theme, the gradient ring shows the focus */
.auth-box .field.ico-left input:focus { outline: none !important; }
/* phones: the card a little tighter */
@media (max-width: 480px) {
    .auth-box { padding: 24px 18px 18px; border-radius: 24px; }
    .auth-box .field.ico-left input { height: 52px; }
    .auth-box .login-btn { min-height: 54px; }
}

/* ---------- round 9: sign-in header band ---------- */
.auth-box { width: min(450px, 100%); }
.auth-head {
    position: relative; isolation: isolate; overflow: hidden; text-align: center; color: #fff;
    margin: -30px -30px 22px; padding: 28px 24px 34px;
    border-radius: 27px 27px 50% 50% / 27px 27px 30px 30px;
    background: radial-gradient(140% 90% at 85% -10%, rgba(241, 90, 34, .38), transparent 55%),
                radial-gradient(120% 90% at 0% 0%, var(--pal-glow), transparent 60%),
                linear-gradient(150deg, var(--pal-0) 0%, var(--pal-1) 45%, var(--pal-2) 80%, var(--pal-3) 125%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 16px 30px -18px var(--pal-glow);
}
/* a grid floor going into the distance, moving towards you */
.auth-head::before {
    content: ""; position: absolute; left: -30%; right: -30%; bottom: -6px; height: 70%; z-index: -1; pointer-events: none;
    transform: perspective(300px) rotateX(58deg); transform-origin: 50% 100%;
    background-image: linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 92%); mask-image: linear-gradient(to top, #000 0%, transparent 92%);
    animation: p-head-floor 4s linear infinite;
}
@keyframes p-head-floor { to { background-position: 0 34px, 0 0; } }
/* two light orbs drifting */
.auth-head::after {
    content: ""; position: absolute; width: 220px; height: 220px; top: -90px; left: -70px; z-index: -1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%);
    animation: p-head-orb 12s ease-in-out infinite alternate;
}
@keyframes p-head-orb { to { transform: translate(60px, 30px) scale(1.15); } }
.auth-head .auth-logo { margin: 0 auto 12px; display: block; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25), 0 0 40px 6px rgba(255, 255, 255, .25), 0 22px 40px -14px rgba(0, 0, 0, .55) !important; }
.auth-box .auth-head h1, html:not([data-theme="dark"]) .auth-box .auth-head h1, html[data-theme="dark"] .auth-box .auth-head h1 {
    margin: 0; font-size: clamp(1.8rem, 1.45rem + 1.2vw, 2.2rem);
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 45%, #ffd29a 100%); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: #fff; filter: drop-shadow(0 3px 12px rgba(0, 0, 0, .3));
}
.auth-box .auth-head .muted { color: rgba(255, 255, 255, .85) !important; margin: 6px 0 0; font-size: .95rem; }
/* the card's aurora now comes from the band: the rest of the card stays clean */
html:not([data-theme="dark"]) .auth-box { background: linear-gradient(180deg, #fff, #fbfcfe); }
html[data-theme="dark"] .auth-box { background: linear-gradient(180deg, #172238, #131c2e); }
@media (prefers-reduced-motion: no-preference) {
    .auth-box > .auth-head { animation: p-rise .6s var(--p-ease) backwards; }
    .auth-head > * { animation: p-rise .6s var(--p-ease) backwards; }
    .auth-head > :nth-child(2) { animation-delay: .1s; } .auth-head > :nth-child(3) { animation-delay: .16s; }
    .auth-head > .auth-logo { animation: p-rise .6s var(--p-ease) backwards, p-bob 5s ease-in-out .6s infinite, p-spin 7s linear infinite; }
}
@media (prefers-reduced-motion: reduce) { .auth-head::before, .auth-head::after, .auth-head .auth-logo { animation: none; } }
@media (max-width: 480px) {
    .auth-head { margin: -24px -18px 18px; padding: 24px 18px 30px; border-radius: 23px 23px 50% 50% / 23px 23px 26px 26px; }
}

/* ---------- entrance: the page's cards rise into place (once, quickly) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .page > .card, .page > .page-head, .grid2 > .card, .dash > .card, .stack > .card,
    .tiles > .tile, .hg-stats > .hg-stat, .app-grid > .app-tile, .cx-grid > .cx-card, .cx-kpis > .cx-kpi,
    .home-hero, .home-panel, .er-hero, .cx-hero {
        animation: p-rise .5s var(--p-ease) backwards;
    }
    .tiles > .tile:nth-child(2), .hg-stats > :nth-child(2), .app-grid > :nth-child(2), .cx-kpis > :nth-child(2), .cx-grid > :nth-child(2) { animation-delay: .04s; }
    .tiles > .tile:nth-child(3), .hg-stats > :nth-child(3), .app-grid > :nth-child(3), .cx-kpis > :nth-child(3), .cx-grid > :nth-child(3) { animation-delay: .08s; }
    .tiles > .tile:nth-child(4), .hg-stats > :nth-child(4), .app-grid > :nth-child(4), .cx-kpis > :nth-child(4), .cx-grid > :nth-child(4) { animation-delay: .12s; }
    .tiles > .tile:nth-child(n+5), .hg-stats > :nth-child(n+5), .app-grid > :nth-child(n+5), .cx-kpis > :nth-child(n+5), .cx-grid > :nth-child(n+5) { animation-delay: .16s; }
}
@keyframes p-rise { from { opacity: 0; transform: translateY(12px); } }

/* less motion asked for: no lifting, tilting or floating from this file */
@media (prefers-reduced-motion: reduce) {
    .side-nav a:hover, .side-foot a:hover, .side-foot button:hover, a.card:hover, a.cx-card:hover, .tile-click:hover, a.tile:hover,
    .hg-stat:hover, .hg-pay:hover, .app-tile:hover, .app-tile:hover .app-ico, .btn:hover:not(:disabled), .big-cam:hover,
    .auth-hero .feature:hover { transform: none; }
    .auth-hero .phone { animation: none; }
}
}

/* the angle of the light running round the sign-in card (premium.css round 3) */
@property --p-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
