/* Empire Pay: deep space, a dark planet and starlight silver (after the logo).
   One mood layer over the shared skin, loaded last in every panel and on the
   standalone pages. Our own drawings only (images/brand/horizon*.svg, empire-mark.svg).
   Bump ?v= in BrandTheme::skin() and components/mn/head.blade.php when it changes. */

:root {
    /* starlight silver */
    --mn-primary: 225, 228, 232; --mn-primary-2: 239, 241, 245; --mn-accent: 198, 203, 212;
    --mi-brass: 225, 228, 232; --mi-champagne: 239, 241, 245; --mi-terracotta: 255, 106, 72;
    --mn-chrome: 239, 241, 245; --mn-chrome-hi: 239, 241, 245; --mn-chrome-mid: 225, 228, 232; --mn-chrome-lo: 198, 203, 212;
    --mn-ink-on-primary: 8, 10, 14;
    /* hull */
    --mi-hall: 6, 7, 10; --mi-velvet: 10, 12, 16; --mi-seat: 16, 19, 24; --mi-seat-hi: 24, 28, 35;
    --mn-concrete-950: 6, 7, 10; --mn-concrete-900: 12, 14, 18; --mn-concrete-800: 21, 25, 31; --mn-concrete-700: 34, 39, 47;
    --y: #e1e4e8; --y2: #eff1f5; --ink: #0a0c10;
    --s1: #0e1116; --s2: #141820; --s3: #1c222b;
    --t1: #eef1f5; --t2: #a3acb9; --t3: #7c8796;
    --ep-holo: 120, 200, 255;            /* hologram blue, used sparingly for info */
    --ep-glow: 0 0 18px rgba(225, 228, 232, .45);
    --ep-hud: rgba(160, 175, 195, .22);
}
::selection { background: #e1e4e8; color: #0a0c10; }

/* ---------- Space behind every page ---------- */
html, body, .fi-body { background-color: rgb(var(--mi-hall)) !important; }
.mn-room {
    background:
        radial-gradient(900px 520px at 88% -14%, rgba(225, 228, 232, .10), transparent 66%),
        radial-gradient(700px 480px at -10% 110%, rgba(var(--ep-holo), .05), transparent 70%),
        rgb(var(--mi-hall)) !important;
}
/* two star layers, drawn in CSS so they cost no requests and can twinkle */
.mn-room::before, .mn-room::after {
    content: '' !important; position: absolute; inset: 0; pointer-events: none; transform: none !important;
    width: auto !important; height: auto !important; top: 0 !important; right: 0 !important; clip-path: none !important; filter: none !important;
    background-repeat: repeat !important;
}
.mn-room::before {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(230, 236, 245, .85), transparent 60%),
        radial-gradient(1px 1px at 140px 90px, rgba(230, 236, 245, .6), transparent 60%),
        radial-gradient(1.4px 1.4px at 260px 160px, rgba(255, 255, 255, .9), transparent 60%),
        radial-gradient(1px 1px at 330px 40px, rgba(230, 236, 245, .5), transparent 60%),
        radial-gradient(1px 1px at 80px 210px, rgba(230, 236, 245, .55), transparent 60%),
        radial-gradient(1.2px 1.2px at 390px 250px, rgba(239, 241, 245, .7), transparent 60%) !important;
    background-size: 420px 300px !important; opacity: .55;
}
.mn-room::after {
    background-image:
        radial-gradient(1.6px 1.6px at 60px 120px, #fff, transparent 60%),
        radial-gradient(1px 1px at 300px 20px, rgba(200, 225, 255, .9), transparent 60%),
        radial-gradient(1.8px 1.8px at 520px 280px, rgba(255, 255, 255, .95), transparent 60%),
        radial-gradient(1px 1px at 640px 140px, rgba(255, 255, 255, .7), transparent 60%) !important;
    background-size: 700px 420px !important; opacity: .6;
    animation: ep-twinkle 7s ease-in-out infinite alternate;
}
@keyframes ep-twinkle { from { opacity: .25; } to { opacity: .75; } }
.bn-city { opacity: .7; }

/* ---------- Typography: wide, engraved headings ---------- */
.fi-header-heading, .fi-section-header-heading, .bp-head h3, .bp-hello h2, .mn-login-heading,
.fi-sidebar-group-label, .fi-modal-heading, .mx-eyebrow {
    font-family: 'Exo 2', 'Manrope', sans-serif !important; letter-spacing: .04em;
}
.fi-header-heading.fi-header-heading { text-transform: uppercase; letter-spacing: .08em; font-weight: 800 !important; }
.fi-sidebar-group-label { letter-spacing: .22em !important; color: #6f7a8a !important; }

/* ---------- Hull: sidebar and top bar ---------- */
@media (min-width: 1024px) {
    .fi-sidebar.fi-sidebar.fi-sidebar {
        background: linear-gradient(180deg, #0d1015, #07090c 70%) !important;
        border-inline-end: 1px solid rgba(160, 175, 195, .10) !important;
        box-shadow: inset -1px 0 0 rgba(225, 228, 232, .08) !important;
    }
}
.fi-sidebar-header.fi-sidebar-header { background: radial-gradient(closest-side, rgba(225, 228, 232, .16), transparent) !important; }
.fi-topbar, .fi-topbar > nav { background: rgba(8, 10, 13, .82) !important; backdrop-filter: blur(10px); border-bottom: 1px solid rgba(160, 175, 195, .08) !important; }

/* active nav item: a lit blade on the left edge */
.fi-sidebar-item-active > .fi-sidebar-item-button, .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background: linear-gradient(90deg, rgba(225, 228, 232, .16), rgba(225, 228, 232, .02)) !important; position: relative;
}
.fi-sidebar-item-active > .fi-sidebar-item-button::before, .fi-sidebar-item.fi-active > .fi-sidebar-item-button::before {
    content: '' !important; position: absolute; inset-block: 18%; inset-inline-start: 0; width: 3px; border-radius: 2px;
    background: linear-gradient(180deg, #eff1f5, #e1e4e8); box-shadow: var(--ep-glow);
}

/* ---------- Cards: HUD corner brackets ---------- */
.bp-card, .bp-tile, .fi-section, .fi-wi-stats-overview-stat, .mx-card, .pc-card {
    border-color: rgba(160, 175, 195, .10) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 40%) !important;
}
.bp-card, .fi-section, .mx-card, .pc-card { position: relative; }
.bp-card::after, .fi-section::after, .mx-card::after, .pc-card::after {
    content: ''; position: absolute; inset: 6px; pointer-events: none; border-radius: inherit;
    background:
        linear-gradient(var(--ep-hud), var(--ep-hud)) left top / 14px 1px no-repeat,
        linear-gradient(var(--ep-hud), var(--ep-hud)) left top / 1px 14px no-repeat,
        linear-gradient(var(--ep-hud), var(--ep-hud)) right bottom / 14px 1px no-repeat,
        linear-gradient(var(--ep-hud), var(--ep-hud)) right bottom / 1px 14px no-repeat;
}
@media (hover: hover) { .bp-tile:hover, .bp-card:hover { border-color: rgba(225, 228, 232, .30) !important; } }

/* the balance card: a dark planet with a lit horizon, like the logo */
.bp-hero, .op-hero, .mx-vault--main {
    color: #fff !important;
    background:
        radial-gradient(120% 70% at 50% 135%, rgba(235, 240, 255, .22), transparent 55%),
        radial-gradient(90% 120% at 70% -10%, #2a2f38, #0d1015 55%, #07080b) !important;
    border: 1px solid rgba(200, 210, 225, .18) !important;
    box-shadow: 0 18px 50px -20px rgba(200, 215, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(235, 242, 255, .55) !important;
}
.bp-hero *, .op-hero *, .mx-vault--main * { color: inherit; }
.bp-hero::after, .op-hero.op-hero::after, .mx-vault.mx-vault--main::after { background: #000 !important; opacity: .35 !important; }
.bp-hero a, .bp-hero button { color: #fff; }
.bp-hero-actions a, .bp-hero .bp-btn { background: linear-gradient(180deg, #fff, #cfd6e0) !important; color: #0a0c10 !important; border: 0 !important; }

/* ---------- Buttons: dark ink on starlight silver, a soft white glow ---------- */
.fi-btn.fi-color-primary:not(.fi-btn-outlined), .mn-btn, .fi-ac-btn-action.fi-color-primary:not(.fi-btn-outlined) {
    background: linear-gradient(180deg, #ffffff, #cdd4de) !important; color: #0a0c10 !important; text-shadow: none !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 6px 22px -8px rgba(210, 225, 255, .55) !important;
}
.fi-btn.fi-color-primary:not(.fi-btn-outlined):hover, .mn-btn:hover { filter: brightness(1.06); }
.fi-btn.fi-color-primary:not(.fi-btn-outlined) .fi-icon, .fi-btn.fi-color-primary:not(.fi-btn-outlined) svg, .mn-btn svg { color: #0a0c10 !important; }
.fi-btn.fi-color-primary.fi-btn-outlined { color: #eef1f5 !important; }

/* inputs: a red focus line, not a yellow halo */
.fi-input-wrp:focus-within, .mn-input:focus { border-color: rgba(225, 228, 232, .75) !important; box-shadow: 0 0 0 3px rgba(225, 228, 232, .14) !important; }
.fi-toggle.fi-toggle-on, .fi-checkbox-input:checked { background-color: #e1e4e8 !important; border-color: #e1e4e8 !important; color: #0a0c10 !important; }

/* ---------- Sign-in: planet horizon, a red glow and slow stars ---------- */
.bn-beam {
    animation: none !important; clip-path: none !important; -webkit-mask-image: none !important; mask-image: none !important;
    left: 50% !important; bottom: 18% !important; width: 52rem !important; height: 52rem !important; margin-left: -26rem !important;
    background: radial-gradient(closest-side, rgba(225, 228, 232, .20), rgba(225, 228, 232, .06) 55%, transparent) !important;
    filter: blur(6px) !important;
}
.bn-rain {
    opacity: .9 !important; -webkit-mask-image: none !important; mask-image: none !important;
    background:
        radial-gradient(1.4px 1.4px at 40px 60px, #fff, transparent 60%),
        radial-gradient(1px 1px at 190px 140px, rgba(220, 230, 245, .8), transparent 60%),
        radial-gradient(1px 1px at 310px 30px, rgba(220, 230, 245, .6), transparent 60%),
        radial-gradient(1.8px 1.8px at 420px 210px, rgba(255, 255, 255, .95), transparent 60%),
        radial-gradient(1px 1px at 120px 260px, rgba(239, 241, 245, .7), transparent 60%) !important;
    background-size: 480px 320px !important;
    animation: ep-drift 120s linear infinite;
}
@keyframes ep-drift { from { background-position: 0 0; } to { background-position: -480px 0; } }
.mi-hero-logo { filter: drop-shadow(0 0 40px rgba(225, 228, 232, .35)) !important; }
.mn-login-form-inner { border-color: rgba(160, 175, 195, .14) !important; }

@media (prefers-reduced-motion: reduce) { .mn-room::after, .bn-rain { animation: none !important; } }

/* ---------- Logo: the lockup is wide (about 4.4:1), never squeeze it ---------- */
.fi-sidebar-header .mn-logo { height: auto !important; width: min(14.5rem, 100%) !important; max-height: 5rem !important; object-fit: contain; }
.fi-topbar .mn-logo { height: auto !important; width: auto !important; max-height: 2.4rem !important; max-width: 11rem !important; object-fit: contain; }
.mn-lockup { overflow: visible !important; }

/* the sign-in hero: the logo is the picture, give it room */
.mi-hero-logo { width: min(36rem, 82%) !important; max-width: none !important; height: auto !important; }
