/* =====================================================================
   StarProClub — design system
   Blue canvas, orange-gradient accent. Prefix: spc-
   Sections: tokens · base · brand · shell (top bar, launcher, dock) ·
   page · surfaces · data · forms · buttons · tables · feedback ·
   popups · legacy bridges · auth · dashboard · utilities
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --spc-blue-950: #030b24;
    --spc-blue-900: #06153d;
    --spc-blue-800: #0a2163;
    --spc-blue-700: #0f2f8a;
    --spc-blue-600: #1746c4;
    --spc-blue-500: #2f6bff;
    --spc-sky: #7db4ff;

    --spc-orange-200: #ffd98a;
    --spc-orange-300: #ffc857;
    --spc-orange-500: #ff8a1f;
    --spc-orange-600: #ff5a1f;
    --spc-grad: linear-gradient(135deg, #ffc857 0%, #ff8a1f 48%, #ff5a1f 100%);
    --spc-grad-soft: linear-gradient(135deg, rgba(255, 200, 87, .20), rgba(255, 90, 31, .12));
    --spc-grad-blue: linear-gradient(135deg, #3b82f6, #1d4ed8);

    --spc-ink: #f3f7ff;
    --spc-ink-2: #d6e1fb;
    --spc-mute: #a9bdec;
    --spc-on-orange: #1d1004;

    --spc-panel: rgba(255, 255, 255, .065);
    --spc-panel-2: rgba(255, 255, 255, .10);
    --spc-well: rgba(3, 13, 48, .40);
    --spc-line: rgba(140, 175, 255, .20);
    --spc-line-strong: rgba(140, 175, 255, .38);

    --spc-ok: #3ddcb0;
    --spc-bad: #ff6b7a;
    --spc-warn: #ffc857;

    /* signature shape: 'leaf' corners (big top-left / bottom-right, tight on the other two) */
    --spc-leaf-xs: 9px 3px 9px 3px;
    --spc-leaf-sm: 13px 4px 13px 4px;
    --spc-leaf: 20px 6px 20px 6px;
    --spc-leaf-lg: 28px 8px 28px 8px;
    --spc-r-sm: var(--spc-leaf-sm);
    --spc-r: var(--spc-leaf);
    --spc-r-lg: var(--spc-leaf-lg);
    --spc-shadow: 0 18px 40px rgba(2, 8, 30, .42);
    --spc-glow: 0 12px 28px rgba(255, 106, 24, .34);
    --spc-font: 'Outfit', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    --spc-top-h: 64px;
    --spc-dock-h: 68px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

html, body { max-width: 100%; overflow-x: hidden; margin: 0; }

body,
body.spc-body {
    min-height: 100vh;
    font-family: var(--spc-font) !important;
    font-size: 15px;
    line-height: 1.5;
    color: var(--spc-ink);
    background:
        radial-gradient(1100px 620px at 88% -12%, rgba(96, 158, 255, .60), transparent 62%),
        radial-gradient(900px 620px at -12% 28%, rgba(52, 116, 245, .50), transparent 60%),
        radial-gradient(700px 500px at 60% 110%, rgba(255, 138, 31, .13), transparent 60%),
        linear-gradient(170deg, #1a4fd0 0%, #123dae 34%, #0d2f90 66%, #0a2676 100%) !important;
    background-attachment: fixed !important;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--spc-font); color: var(--spc-ink); font-weight: 600; letter-spacing: -.01em; margin-top: 0; }
p { color: var(--spc-ink-2); }
b, strong { font-weight: 600; }
small { color: var(--spc-mute); }
hr { border: 0; border-top: 1px solid var(--spc-line); opacity: 1; margin: 16px 0; }
a { color: var(--spc-orange-300); text-decoration: none; }
a:hover { color: var(--spc-orange-200); }
label { color: var(--spc-ink-2); }
img { max-width: 100%; }
::selection { background: rgba(255, 138, 31, .35); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: rgba(140, 175, 255, .35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(140, 175, 255, .32); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--spc-orange-300); outline-offset: 2px; }

/* ---------- 3. Brand ---------- */
.spc-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--spc-ink); }
.spc-brand:hover { color: var(--spc-ink); }
.spc-mark { width: 36px; height: 36px; flex: none; display: block; filter: drop-shadow(0 6px 14px rgba(255, 122, 24, .28)); }
.spc-word { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: #fff; }
.spc-word b { font-weight: 700; background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--spc-orange-500); }
.spc-brand.lg .spc-mark { width: 54px; height: 54px; }
.spc-brand.lg .spc-word { font-size: 30px; }

.spc-text-grad { background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--spc-orange-500); }

/* ---------- 4. Shell ---------- */
/* 4a. top bar */
.spc-top {
    position: fixed; inset: 0 0 auto 0; height: var(--spc-top-h); z-index: 900;
    background: rgba(11, 38, 118, .80);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--spc-line);
}
.spc-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--spc-orange-500) 30%, var(--spc-orange-300) 50%, var(--spc-orange-500) 70%, transparent); opacity: .55; }
.spc-top-in { height: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.spc-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.spc-nav { display: none; align-items: center; gap: 4px; margin-left: 18px; }
.spc-nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--spc-ink-2); transition: background .2s, color .2s; }
.spc-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.spc-nav a.active { color: var(--spc-on-orange); background: var(--spc-grad); font-weight: 600; }

.spc-user { display: none; align-items: center; gap: 8px; max-width: 190px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--spc-panel); border: 1px solid var(--spc-line); font-size: 13.5px; font-weight: 500; color: var(--spc-ink); white-space: nowrap; }
.spc-user > i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--spc-grad); color: var(--spc-on-orange); font-size: 13px; flex: none; }
.spc-user > span { overflow: hidden; text-overflow: ellipsis; }

/* launcher button: 2x2 dots that fold into a cross */
.spc-launch-btn {
    width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: var(--spc-leaf-sm); cursor: pointer; position: relative;
    background: var(--spc-grad); box-shadow: var(--spc-glow); transition: transform .2s, box-shadow .2s;
}
.spc-launch-btn:hover { transform: translateY(-1px); }
.spc-launch-btn span { position: absolute; width: 7px; height: 7px; border-radius: 2.5px; background: var(--spc-on-orange); transition: all .3s cubic-bezier(.2, .8, .2, 1); }
.spc-launch-btn span:nth-child(1) { left: 13px; top: 13px; }
.spc-launch-btn span:nth-child(2) { right: 13px; top: 13px; }
.spc-launch-btn span:nth-child(3) { left: 13px; bottom: 13px; }
.spc-launch-btn span:nth-child(4) { right: 13px; bottom: 13px; }
.spc-launch-btn[aria-expanded="true"] span:nth-child(1),
.spc-launch-btn[aria-expanded="true"] span:nth-child(4) { left: 11px; top: 20.5px; right: auto; bottom: auto; width: 22px; height: 3px; transform: rotate(45deg); }
.spc-launch-btn[aria-expanded="true"] span:nth-child(2),
.spc-launch-btn[aria-expanded="true"] span:nth-child(3) { left: 11px; top: 20.5px; right: auto; bottom: auto; width: 22px; height: 3px; transform: rotate(-45deg); }

/* 4b. launcher (menu): bottom sheet on phones, drop panel on wide screens */
.spc-launcher { position: fixed; inset: 0; z-index: 950; visibility: hidden; pointer-events: none; }
.spc-launcher.open { visibility: visible; pointer-events: auto; }
.spc-scrim { position: absolute; inset: 0; background: rgba(2, 8, 30, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.spc-launcher.open .spc-scrim { opacity: 1; }

.spc-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
    padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #123a9e 0%, #0a2468 46%, #071a4f 100%);
    border: 1px solid var(--spc-line-strong); border-bottom: 0; border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 60px rgba(2, 8, 30, .6);
    transform: translateY(104%); transition: transform .42s cubic-bezier(.2, .85, .2, 1);
}
.spc-launcher.open .spc-sheet { transform: none; }
.spc-sheet-grip { width: 46px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .28); margin: 4px auto 12px; }
.spc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.spc-sheet-head small { display: block; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--spc-orange-300); font-weight: 600; }
.spc-sheet-head b { display: block; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.spc-sheet-close { width: 38px; height: 38px; border-radius: var(--spc-leaf-sm); border: 1px solid var(--spc-line-strong); background: rgba(255, 255, 255, .06); color: #fff; font-size: 15px; cursor: pointer; flex: none; }
.spc-sheet-close:hover { border-color: var(--spc-orange-500); color: var(--spc-orange-300); }
.spc-sheet-who { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 10px 0 4px; border-radius: var(--spc-leaf-sm); background: rgba(3, 11, 36, .38); border: 1px solid var(--spc-line); font-size: 13.5px; color: var(--spc-ink-2); }
.spc-sheet-who i { color: var(--spc-orange-300); }
.spc-sheet-who b { color: #fff; font-weight: 600; }
.spc-sheet-group { margin-top: 16px; }
.spc-sheet-group h6 { margin: 0 2px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--spc-mute); display: flex; align-items: center; gap: 10px; }
.spc-sheet-group h6::after { content: ""; flex: 1; height: 1px; background: var(--spc-line); }
.spc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spc-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 9px; text-align: center;
    padding: 14px 6px 12px; border-radius: var(--spc-leaf); min-height: 96px;
    background: rgba(255, 255, 255, .055); border: 1px solid var(--spc-line);
    color: var(--spc-ink); font-size: 12.5px; font-weight: 500; line-height: 1.25;
    transition: transform .2s, border-color .2s, background .2s;
    opacity: 0; transform: translateY(14px);
}
.spc-launcher.open .spc-tile { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s cubic-bezier(.2, .85, .2, 1), border-color .2s, background .2s; }
.spc-launcher.open .spc-tile:nth-child(1) { transition-delay: .06s, .06s, 0s, 0s; }
.spc-launcher.open .spc-tile:nth-child(2) { transition-delay: .10s, .10s, 0s, 0s; }
.spc-launcher.open .spc-tile:nth-child(3) { transition-delay: .14s, .14s, 0s, 0s; }
.spc-launcher.open .spc-tile:nth-child(4) { transition-delay: .18s, .18s, 0s, 0s; }
.spc-launcher.open .spc-tile:nth-child(5) { transition-delay: .22s, .22s, 0s, 0s; }
.spc-launcher.open .spc-tile:nth-child(6) { transition-delay: .26s, .26s, 0s, 0s; }
.spc-tile i { width: 42px; height: 42px; border-radius: var(--spc-leaf-sm); display: grid; place-items: center; font-size: 17px; background: var(--spc-grad-soft); color: var(--spc-orange-300); border: 1px solid rgba(255, 170, 70, .28); }
.spc-tile:hover { color: #fff; border-color: var(--spc-orange-500); background: rgba(255, 138, 31, .10); }
.spc-tile:hover i { background: var(--spc-grad); color: var(--spc-on-orange); border-color: transparent; }
.spc-tile.current { border-color: var(--spc-orange-500); background: rgba(255, 138, 31, .12); }
.spc-tile.current i { background: var(--spc-grad); color: var(--spc-on-orange); border-color: transparent; }
.spc-tile.exit i { background: rgba(255, 107, 122, .14); color: var(--spc-bad); border-color: rgba(255, 107, 122, .3); }
.spc-tile.exit:hover { border-color: var(--spc-bad); background: rgba(255, 107, 122, .10); }
.spc-tile.exit:hover i { background: var(--spc-bad); color: #fff; }

body.spc-lock { overflow: hidden; }

/* 4c. dock (phones / tablets) */
.spc-dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 880;
    height: var(--spc-dock-h); max-width: 560px; margin: 0 auto;
    display: flex; align-items: stretch; padding: 0 6px;
    background: rgba(9, 32, 104, .90); border: 1px solid var(--spc-line-strong); border-radius: var(--spc-leaf-lg);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(2, 8, 30, .55);
}
.spc-dock a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding-bottom: 9px; color: var(--spc-mute); font-size: 10.5px; font-weight: 500; letter-spacing: .2px; position: relative; }
.spc-dock a i { width: 38px; height: 38px; display: grid; place-items: center; font-size: 17px; border-radius: var(--spc-leaf-sm); transition: transform .3s cubic-bezier(.2, .85, .2, 1), background .25s, color .25s, box-shadow .25s; }
.spc-dock a:hover { color: var(--spc-ink); }
.spc-dock a.active { color: var(--spc-orange-300); font-weight: 600; }
.spc-dock a.active i { background: var(--spc-grad); color: var(--spc-on-orange); transform: translateY(-15px) rotate(-6deg); box-shadow: 0 10px 22px rgba(255, 106, 24, .5), 0 0 0 5px #0c2c88; border-radius: var(--spc-leaf); }
.spc-dock a.active span { transform: translateY(-9px); }
.spc-dock a span { transition: transform .3s; white-space: nowrap; }

/* 4d. content area */
.spc-main { padding: calc(var(--spc-top-h) + 18px) 0 calc(var(--spc-dock-h) + 44px + env(safe-area-inset-bottom)); min-height: 100vh; }

@media (min-width: 768px) {
    .spc-user { display: inline-flex; }
    .spc-sheet {
        left: auto; bottom: auto; top: calc(var(--spc-top-h) + 10px); right: max(16px, calc((100vw - 1160px) / 2 + 16px));
        width: 440px; max-height: calc(100vh - var(--spc-top-h) - 30px);
        border: 1px solid var(--spc-line-strong); border-radius: var(--spc-leaf-lg); padding: 18px 18px 20px;
        transform: translateY(-14px) scale(.92); transform-origin: top right; opacity: 0;
        transition: transform .3s cubic-bezier(.2, .85, .2, 1), opacity .25s;
        box-shadow: 0 30px 70px rgba(2, 8, 30, .65);
    }
    .spc-launcher.open .spc-sheet { transform: none; opacity: 1; }
    .spc-sheet-grip { display: none; }
}
@media (min-width: 992px) {
    .spc-nav { display: flex; }
    .spc-dock { display: none; }
    .spc-main { padding-bottom: 56px; }
}

/* ---------- 5. Page scaffolding ---------- */
.spc-page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.spc-page.narrow { max-width: 620px; }
.spc-page.mid { max-width: 860px; }
.spc-page > * { min-width: 0; }

.spc-head { display: flex; align-items: center; gap: 14px; padding: 4px 2px 2px; }
.spc-head-ic { width: 50px; height: 50px; flex: none; border-radius: var(--spc-leaf); display: grid; place-items: center; font-size: 21px; background: var(--spc-grad); color: var(--spc-on-orange); box-shadow: var(--spc-glow); transform: rotate(-4deg); }
.spc-head-body { min-width: 0; flex: 1; }
.spc-eyebrow { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; color: var(--spc-orange-300); }
.spc-title { font-size: clamp(21px, 4.4vw, 28px); font-weight: 700; line-height: 1.15; margin: 2px 0 0; color: #fff; letter-spacing: -.02em; }
.spc-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--spc-mute); }
.spc-head-aside { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.spc-section { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 2px -4px; }
.spc-section h2 { font-size: 16px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
.spc-section h2::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--spc-grad); }
.spc-more { font-size: 13px; font-weight: 500; color: var(--spc-orange-300); display: inline-flex; align-items: center; gap: 6px; }

.spc-grid { display: grid; gap: 12px; }
.spc-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spc-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spc-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spc-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .spc-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .spc-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } .spc-split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .spc-grid.c3.stack { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 6. Surfaces ---------- */
/* The StarProClub box: leaf corners + orange spine on the left edge + dot-matrix texture in the top-right corner */
.spc-card {
    position: relative; isolation: isolate; border-radius: var(--spc-leaf); color: var(--spc-ink);
    background: linear-gradient(155deg, rgba(255, 255, 255, .115), rgba(255, 255, 255, .04) 62%);
    border: 1px solid var(--spc-line); box-shadow: var(--spc-shadow);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.spc-card::before {
    content: ""; position: absolute; left: -1px; top: 22px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0;
    background: var(--spc-grad); pointer-events: none; z-index: 1;
}
.spc-card::after {
    content: ""; position: absolute; right: 0; top: 0; width: min(46%, 190px); height: 86px; pointer-events: none; z-index: -1;
    background: radial-gradient(rgba(255, 255, 255, .24) 1.1px, transparent 1.6px) 0 0 / 11px 11px;
    -webkit-mask-image: linear-gradient(215deg, #000, transparent 70%); mask-image: linear-gradient(215deg, #000, transparent 70%);
}
.spc-card.plain::before, .spc-card.plain::after, .spc-card .spc-card::before, .spc-card .spc-card::after { display: none; }
.spc-card .spc-card { box-shadow: none; background: var(--spc-well); }
.spc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--spc-line); }
.spc-card-title { margin: 0; font-size: 15px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 10px; }
.spc-card-title i { color: var(--spc-orange-300); }
.spc-card-body { padding: 18px; }
.spc-card.pad { padding: 18px; }

.spc-hero {
    position: relative; overflow: hidden; border-radius: var(--spc-r-lg); padding: 22px;
    background: var(--spc-grad); color: var(--spc-on-orange);
    box-shadow: 0 24px 54px rgba(255, 96, 24, .34), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.spc-hero::before { content: ""; position: absolute; right: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%; border: 42px solid rgba(255, 255, 255, .16); pointer-events: none; }
.spc-hero::after {
    content: ""; position: absolute; right: 18px; bottom: -26px; width: 150px; height: 150px; opacity: .16; pointer-events: none;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d1004' d='M12 1.6l3.1 6.5 7.1.9-5.2 4.9 1.3 7-6.3-3.4-6.3 3.4 1.3-7L1.8 9l7.1-.9z'/%3E%3C/svg%3E");
    transform: rotate(14deg);
}
.spc-hero > * { position: relative; z-index: 1; }
.spc-hero a { color: inherit; }

.spc-well { background: var(--spc-well); border: 1px solid var(--spc-line); border-radius: var(--spc-leaf-sm); padding: 14px; }

/* ---------- 7. Data display ---------- */
/* stat tile: leaf corners + folded orange corner + faint diagonal hatch */
.spc-stat {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--spc-leaf);
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 11px), var(--spc-panel);
    border: 1px solid var(--spc-line); min-width: 0; color: var(--spc-ink); transition: transform .2s, border-color .2s;
}
.spc-stat::after { content: ""; position: absolute; right: 0; top: 0; width: 26px; height: 26px; background: var(--spc-grad); clip-path: polygon(0 0, 100% 0, 100% 100%); pointer-events: none; }
a.spc-stat:hover { transform: translateY(-2px); border-color: var(--spc-orange-500); color: var(--spc-ink); }
.spc-stat-ic { width: 36px; height: 36px; border-radius: var(--spc-leaf-sm); display: grid; place-items: center; font-size: 15px; margin-bottom: 6px; background: var(--spc-grad-soft); color: var(--spc-orange-300); border: 1px solid rgba(255, 170, 70, .26); }
.spc-stat-ic.blue { background: rgba(125, 180, 255, .14); color: var(--spc-sky); border-color: rgba(125, 180, 255, .3); }
.spc-stat-k { font-size: 11.5px; font-weight: 500; letter-spacing: .7px; text-transform: uppercase; color: var(--spc-mute); }
.spc-stat-v { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.spc-stat-v a { color: inherit; }
.spc-stat-v.hot { background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.spc-stat-note { font-size: 12px; color: var(--spc-mute); }

.spc-list { list-style: none; margin: 0; padding: 0; }
.spc-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; color: var(--spc-ink); border-top: 1px solid rgba(140, 175, 255, .13); transition: background .2s; }
.spc-list > li:first-child .spc-row, .spc-row:first-child { border-top: 0; }
a.spc-row:hover { background: rgba(255, 255, 255, .05); color: var(--spc-ink); box-shadow: inset 3px 0 0 var(--spc-orange-500); }
.spc-row-ic { width: 40px; height: 40px; flex: none; border-radius: var(--spc-leaf-sm); display: grid; place-items: center; font-size: 16px; background: var(--spc-grad-soft); color: var(--spc-orange-300); }
.spc-row-ic.blue { background: rgba(125, 180, 255, .14); color: var(--spc-sky); }
.spc-row-body { flex: 1; min-width: 0; }
.spc-row-t { font-size: 14px; font-weight: 500; color: #fff; }
.spc-row-s { font-size: 12px; color: var(--spc-mute); }
.spc-row-v { font-size: 15px; font-weight: 700; color: #fff; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spc-row-go { color: var(--spc-mute); font-size: 12px; }

.spc-kv { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px dashed rgba(140, 175, 255, .22); font-size: 14px; }
.spc-kv:first-child { border-top: 0; }
.spc-kv > :first-child { color: var(--spc-mute); flex: none; }
.spc-kv > :last-child { color: #fff; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }

.spc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.3; background: var(--spc-panel-2); border: 1px solid var(--spc-line); color: var(--spc-ink-2); white-space: nowrap; }
.spc-chip i { color: var(--spc-orange-300); font-size: 11px; }
.spc-chip.hot { background: var(--spc-grad); color: var(--spc-on-orange); border-color: transparent; font-weight: 600; }
.spc-chip.hot i { color: inherit; }
.spc-chip:empty { display: none; }

.spc-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--spc-leaf-xs); font-size: 11.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; background: rgba(125, 180, 255, .15); color: var(--spc-sky); border: 1px solid rgba(125, 180, 255, .3); }
.spc-badge.ok { background: rgba(61, 220, 176, .14); color: var(--spc-ok); border-color: rgba(61, 220, 176, .32); }
.spc-badge.bad { background: rgba(255, 107, 122, .14); color: var(--spc-bad); border-color: rgba(255, 107, 122, .32); }
.spc-badge.warn { background: rgba(255, 200, 87, .14); color: var(--spc-warn); border-color: rgba(255, 200, 87, .34); }
.spc-badge.hot { background: var(--spc-grad); color: var(--spc-on-orange); border-color: transparent; }
.spc-badge:empty { display: none; }

.spc-progress { height: 8px; border-radius: var(--spc-leaf-xs); background: rgba(3, 11, 36, .5); overflow: hidden; border: 1px solid rgba(140, 175, 255, .16); }
.spc-progress > span, .spc-progress > div { display: block; height: 100%; border-radius: var(--spc-leaf-xs); background: var(--spc-grad); min-width: 0; transition: width .6s ease; }

.spc-copy { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--spc-leaf-sm); background: var(--spc-well); border: 1px dashed var(--spc-line-strong); }
.spc-copy p, .spc-copy span.txt { flex: 1; min-width: 0; margin: 0; font-size: 12.5px; color: var(--spc-ink-2); word-break: break-all; }
.spc-icon-btn { width: 36px; height: 36px; flex: none; border-radius: var(--spc-leaf-sm); display: grid; place-items: center; background: var(--spc-grad-soft); color: var(--spc-orange-300); border: 1px solid rgba(255, 170, 70, .28); cursor: pointer; }
.spc-icon-btn:hover { background: var(--spc-grad); color: var(--spc-on-orange); }

.spc-money.spc-veil { filter: blur(7px); opacity: .45; user-select: none; pointer-events: none; }

/* ---------- 8. Forms ---------- */
.spc-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; min-width: 0; }
.spc-label, .spc-field > label { font-size: 12.5px; font-weight: 500; letter-spacing: .4px; color: var(--spc-ink-2); margin: 0; }
.spc-label .req, .spc-req { color: var(--spc-orange-500); }
.spc-help { font-size: 12px; color: var(--spc-mute); }
.spc-error { font-size: 12.5px; font-weight: 500; color: var(--spc-bad); }

.spc-input,
.form-control, .form-select,
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="tel"],
input[type="search"], input[type="date"], input[type="url"], textarea, select {
    width: 100%; min-height: 48px; padding: 10px 14px; font-family: var(--spc-font); font-size: 15px;
    color: var(--spc-ink) !important; background: var(--spc-well) !important;
    border: 1px solid var(--spc-line-strong) !important; border-radius: var(--spc-leaf-sm) !important;
    box-shadow: none; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; }
select, .form-select {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffc857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 13px center !important; background-size: 14px !important;
}
select option { background: #0a2163; color: #fff; }
.spc-input:focus, .form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus {
    outline: none !important; border-color: var(--spc-orange-500) !important;
    box-shadow: inset 3px 0 0 var(--spc-orange-500), 0 0 0 4px rgba(255, 138, 31, .18) !important; background-color: rgba(3, 11, 36, .62) !important;
}
::placeholder { color: #8399cf !important; opacity: 1; }
input[readonly], input:disabled, select:disabled, textarea:disabled, .form-control[readonly], .form-control:disabled { opacity: .78; cursor: not-allowed; background: rgba(3, 11, 36, .28) !important; }
input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #0a2163 inset !important; caret-color: #fff; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) sepia(1) saturate(4) hue-rotate(350deg); cursor: pointer; }

.spc-inwrap { position: relative; }
.spc-inwrap > i:first-child { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--spc-orange-300); font-size: 14px; pointer-events: none; z-index: 1; }
.spc-inwrap > i:first-child ~ input, .spc-inwrap > i:first-child ~ select { padding-left: 40px; }
.spc-inwrap .spc-eye, .spc-inwrap .spc-unit { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 1; }
.spc-eye { width: 34px; height: 34px; border: 0; border-radius: var(--spc-leaf-xs); background: transparent; color: var(--spc-mute); cursor: pointer; }
.spc-eye:hover { color: var(--spc-orange-300); background: rgba(255, 255, 255, .06); }
.spc-unit { padding: 5px 10px; border-radius: var(--spc-leaf-xs); font-size: 12px; font-weight: 600; background: var(--spc-grad-soft); color: var(--spc-orange-300); }

input[type="checkbox"], input[type="radio"], .form-check-input {
    width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; vertical-align: middle; cursor: pointer;
    -webkit-appearance: none; appearance: none; background: var(--spc-well) !important; border: 1.5px solid var(--spc-line-strong) !important;
    border-radius: 6px !important; display: inline-grid; place-content: center; margin: 0 6px 0 0;
}
input[type="radio"] { border-radius: 50% !important; }
input[type="checkbox"]:checked, input[type="radio"]:checked, .form-check-input:checked { background: var(--spc-grad) !important; border-color: transparent !important; }
input[type="checkbox"]:checked::after { content: ""; width: 5px; height: 10px; border: solid var(--spc-on-orange); border-width: 0 2.4px 2.4px 0; transform: translateY(-1px) rotate(45deg); }
input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--spc-on-orange); }

.spc-form-grid { display: grid; gap: 0 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .spc-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spc-form-grid .full { grid-column: 1 / -1; } }
.spc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* segmented choice (radio lists / period pickers) */
.spc-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.spc-seg label, .spc-seg a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--spc-leaf-sm); background: var(--spc-well); border: 1px solid var(--spc-line-strong); font-size: 13.5px; color: var(--spc-ink-2); cursor: pointer; }
.spc-seg input:checked + label, .spc-seg label.on, .spc-seg a.on { background: var(--spc-grad); color: var(--spc-on-orange); border-color: transparent; font-weight: 600; }

/* ---------- 9. Buttons ---------- */
.spc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
    border: 0 !important; border-radius: var(--spc-leaf-sm) !important; cursor: pointer; text-decoration: none !important; white-space: nowrap;
    font-family: var(--spc-font); font-size: 14.5px; font-weight: 600 !important; line-height: 1; letter-spacing: .2px;
    color: var(--spc-on-orange) !important; background: var(--spc-grad) !important; box-shadow: var(--spc-glow) !important;
    transition: transform .18s, filter .18s, box-shadow .18s;
}
.spc-btn:hover { transform: translateY(-1px); filter: brightness(1.06); color: var(--spc-on-orange) !important; }
.spc-btn:active { transform: translateY(0) scale(.985); }
.spc-btn:disabled, .spc-btn.aspNetDisabled, .spc-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; filter: grayscale(.3); }
.spc-btn.block { display: flex; width: 100%; }
.spc-btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--spc-leaf-sm) !important; }
.spc-btn.lg { min-height: 54px; font-size: 16px; border-radius: var(--spc-leaf) !important; }
.spc-btn.ghost { background: rgba(255, 255, 255, .05) !important; color: var(--spc-ink) !important; border: 1px solid var(--spc-line-strong) !important; box-shadow: none !important; }
.spc-btn.ghost:hover { border-color: var(--spc-orange-500) !important; color: var(--spc-orange-300) !important; }
.spc-btn.blue { background: var(--spc-grad-blue) !important; color: #fff !important; box-shadow: 0 12px 26px rgba(29, 78, 216, .4) !important; }
.spc-btn.danger { background: linear-gradient(135deg, #ff7d8a, #e11d48) !important; color: #fff !important; box-shadow: 0 12px 26px rgba(225, 29, 72, .32) !important; }
.spc-btn.dark { background: var(--spc-on-orange) !important; color: #ffe2b5 !important; box-shadow: none !important; }
input.spc-btn { -webkit-appearance: none; appearance: none; }

/* ---------- 10. Tables & pager ---------- */
.spc-table-wrap, .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--spc-leaf-sm); border: 1px solid var(--spc-line); background: rgba(3, 11, 36, .26); }
.spc-table, .table, table.gvTheGrid {
    width: 100%; margin: 0 !important; border-collapse: separate; border-spacing: 0; border: 0 !important;
    color: var(--spc-ink) !important; font-size: 13.5px; --bs-table-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-hover-bg: transparent; --bs-table-accent-bg: transparent;
}
.spc-table th, .table th, table.gvTheGrid th, .table > thead > tr > *, .spc-table > thead > tr > * {
    background: rgba(3, 11, 36, .62) !important; color: var(--spc-orange-300) !important; font-weight: 600; font-size: 11.5px; letter-spacing: .7px; text-transform: uppercase;
    padding: 12px 14px !important; white-space: nowrap; text-align: left; border: 0 !important; border-bottom: 2px solid var(--spc-orange-500) !important; box-shadow: none !important;
}
.spc-table td, .table td, table.gvTheGrid td {
    padding: 12px 14px !important; border: 0 !important; border-top: 1px solid rgba(140, 175, 255, .13) !important; color: var(--spc-ink) !important;
    background: transparent !important; box-shadow: none !important; vertical-align: middle; font-variant-numeric: tabular-nums;
}
.spc-table tr:nth-child(even) > td, .table tr:nth-child(even) > td { background: rgba(255, 255, 255, .028) !important; }
.spc-table tr:hover > td, .table tr:hover > td { background: rgba(255, 138, 31, .06) !important; }
.spc-table a, .table a { color: var(--spc-orange-300); }

/* GridView pager row */
.gridpagerstyle, .gridpagerstyle > td { background: transparent !important; color: var(--spc-ink) !important; text-align: center; padding: 12px 8px !important; }
.gridpagerstyle table { margin: 0 auto; border-collapse: separate; border-spacing: 6px 0; width: auto; }
.gridpagerstyle td { padding: 0 !important; border: 0 !important; background: transparent !important; }
.gridpagerstyle span, .gridpagerstyle a {
    display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--spc-leaf-sm); font-size: 13px; font-weight: 600; line-height: 1;
    border: 1px solid var(--spc-line-strong); background: var(--spc-well); color: var(--spc-ink-2) !important; max-width: none; margin: 0;
}
.gridpagerstyle span { background: var(--spc-grad); color: var(--spc-on-orange) !important; border-color: transparent; }
.gridpagerstyle a:hover, .gridpagerstyle a:focus { border-color: var(--spc-orange-500); color: var(--spc-orange-300) !important; background: var(--spc-well); }

.spc-pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 11. Tabs · alerts · empty ---------- */
.spc-tabs { display: flex; gap: 6px; padding: 5px; overflow-x: auto; border-radius: var(--spc-leaf); background: var(--spc-well); border: 1px solid var(--spc-line); scrollbar-width: none; }
.spc-tabs::-webkit-scrollbar { display: none; }
.spc-tab { flex: none; padding: 10px 16px; border-radius: var(--spc-leaf-sm); font-size: 13.5px; font-weight: 500; color: var(--spc-ink-2); white-space: nowrap; border: 0; background: transparent; cursor: pointer; transition: background .2s, color .2s; }
.spc-tab:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.spc-tab.active, .spc-tab.on { background: var(--spc-grad); color: var(--spc-on-orange); font-weight: 600; box-shadow: 0 8px 18px rgba(255, 106, 24, .3); }

.spc-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--spc-leaf-sm); font-size: 13.5px; background: rgba(125, 180, 255, .12); border: 1px solid rgba(125, 180, 255, .3); color: var(--spc-ink); }
.spc-alert > i { margin-top: 2px; color: var(--spc-sky); }
.spc-alert.ok { background: rgba(61, 220, 176, .11); border-color: rgba(61, 220, 176, .32); }
.spc-alert.ok > i { color: var(--spc-ok); }
.spc-alert.bad { background: rgba(255, 107, 122, .11); border-color: rgba(255, 107, 122, .34); }
.spc-alert.bad > i { color: var(--spc-bad); }
.spc-alert.warn { background: rgba(255, 200, 87, .11); border-color: rgba(255, 200, 87, .36); }
.spc-alert.warn > i { color: var(--spc-warn); }
.spc-alert:empty { display: none; }

.spc-msg { display: block; font-size: 13px; font-weight: 500; color: var(--spc-bad); }
.spc-msg:empty { display: none; }

.spc-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 18px; text-align: center; color: var(--spc-mute); font-size: 14px; }
.spc-empty i { width: 60px; height: 60px; border-radius: var(--spc-leaf); display: grid; place-items: center; font-size: 24px; background: var(--spc-grad-soft); color: var(--spc-orange-300); }

.spc-toast { display: none; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--spc-leaf-sm); font-size: 13px; background: rgba(61, 220, 176, .13); color: var(--spc-ok); border: 1px solid rgba(61, 220, 176, .3); }

.spc-ticker { display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 9px; border-radius: var(--spc-leaf-sm); background: var(--spc-panel); border: 1px solid var(--spc-line); font-size: 13px; color: var(--spc-ink-2); overflow: hidden; }
.spc-ticker > i { width: 32px; height: 32px; flex: none; border-radius: var(--spc-leaf-sm); display: grid; place-items: center; background: var(--spc-grad); color: var(--spc-on-orange); font-size: 13px; }
.spc-ticker marquee { flex: 1; min-width: 0; }

/* ---------- 12. Popups (popUp(), Bootstrap modal, Ajax ModalPopup) ---------- */
.modal.PopupBG, .PopupBG {
    background: rgba(2, 8, 30, .72) !important; opacity: 1 !important; filter: none !important;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal.PopupBG { position: fixed; inset: 0; z-index: 2000; overflow-y: auto; padding: 18px; display: flex !important; align-items: center; justify-content: center; }
.modal.PopupBG .modal-dialog, .PopupBG .modal-dialog { width: 100%; max-width: 440px; margin: auto; transform: none !important; pointer-events: auto; }
.modal-content {
    position: relative; overflow: hidden; color: var(--spc-ink) !important; border-radius: var(--spc-leaf-lg) !important;
    background: linear-gradient(180deg, #123a9e, #0a2468 55%, #071a4f) !important; border: 1px solid var(--spc-line-strong) !important;
    box-shadow: 0 30px 70px rgba(2, 8, 30, .7) !important; animation: spcPop .32s cubic-bezier(.2, .85, .2, 1);
}
.modal-content::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--spc-grad); }
.modal-header { border: 0 !important; padding: 20px 22px 4px !important; background: transparent !important; }
.modal-title { font-size: 17px !important; font-weight: 600 !important; color: #fff !important; text-transform: none !important; }
.modal-body { padding: 12px 22px !important; color: var(--spc-ink-2) !important; font-size: 14.5px; font-family: var(--spc-font) !important; max-height: 60vh; overflow-y: auto; }
.modal-footer { border: 0 !important; padding: 8px 22px 20px !important; background: transparent !important; justify-content: flex-end; display: flex; gap: 8px; }
@keyframes spcPop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 13. Legacy bridges (older pages keep working, in the new look) ---------- */
.card, .tf-container, .bg-menuDark, .panel, .panel-body {
    position: relative;
    background: linear-gradient(155deg, rgba(255, 255, 255, .115), rgba(255, 255, 255, .04) 62%) !important;
    border: 1px solid var(--spc-line) !important; border-radius: var(--spc-r) !important; color: var(--spc-ink) !important;
    box-shadow: var(--spc-shadow) !important;
}
.tf-container { max-width: 1080px; margin: 0 auto 16px; padding: 18px; }
.card::before, .tf-container::before, .bg-menuDark::before, .panel::before {
    content: ""; position: absolute; left: -1px; top: 22px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--spc-grad); pointer-events: none; z-index: 1;
}
.card .card, .tf-container .card, .card .tf-container, .panel .panel-body, .spc-card .card { box-shadow: none !important; }
.card .card::before, .tf-container .card::before, .card .tf-container::before, .spc-card .card::before, .modal-content .card::before { display: none; }
.card-body { padding: 18px; color: var(--spc-ink); }
.card-header, .card-footer, .panel-heading { background: transparent !important; border-color: var(--spc-line) !important; color: #fff; }
.bg-light, .bg-white, .bg-surface { background: transparent !important; }
.text-dark, .text-body, .text-secondary, .text-muted { color: var(--spc-mute) !important; }
.text-white { color: #fff !important; }
.text-primary, .text-info, .text-success, a.text-info, a.text-primary { color: var(--spc-orange-300) !important; }
.text-danger { color: var(--spc-bad) !important; }
.text-gradient { background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.breadcrumb-main, .bread-crumb, .inner-banner { background: transparent !important; }

.btn { border-radius: var(--spc-leaf-sm); font-family: var(--spc-font); font-weight: 600; min-height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1; border: 0; }
input.btn { -webkit-appearance: none; appearance: none; }
.btn-primary, .btn-success, .btn-info, .btn-warning, .btn_theme, .btnPopup-primary, .bg-gradient-primary, .bg-gradient-info {
    background: var(--spc-grad) !important; color: var(--spc-on-orange) !important; border: 0 !important; box-shadow: var(--spc-glow) !important;
}
.btn-primary:hover, .btn-success:hover, .btn-info:hover, .btn_theme:hover { filter: brightness(1.06); color: var(--spc-on-orange) !important; }
.btn-default, .btn-secondary, .btn-dark, .btn-light, .btn-outline-primary, .btn-outline-secondary {
    background: rgba(255, 255, 255, .05) !important; color: var(--spc-ink) !important; border: 1px solid var(--spc-line-strong) !important; box-shadow: none !important;
}
.btn-default:hover, .btn-secondary:hover, .btn-dark:hover, .btn-light:hover { border-color: var(--spc-orange-500) !important; color: var(--spc-orange-300) !important; }
.btn-danger { background: linear-gradient(135deg, #ff7d8a, #e11d48) !important; color: #fff !important; border: 0 !important; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: var(--spc-leaf-sm); }

.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--spc-leaf-xs); font-size: 11.5px; font-weight: 600; }
.bg-gradient-success, .badge-success, .bg-success { background: rgba(61, 220, 176, .16) !important; color: var(--spc-ok) !important; border: 1px solid rgba(61, 220, 176, .32); }
.bg-gradient-danger, .badge-danger, .bg-danger { background: rgba(255, 107, 122, .16) !important; color: var(--spc-bad) !important; border: 1px solid rgba(255, 107, 122, .32); }
.input-group-btn .btn, .input-group-addon { min-height: 48px; }
.marginauto { margin: auto; }
.hidden { display: none !important; }
.textwrap { overflow-wrap: anywhere; }

/* ---------- 14. Auth (sign in / sign up) ---------- */
body.spc-auth { display: block; padding: 0; }
.spc-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); position: relative; z-index: 1; }
.spc-auth-side {
    position: relative; overflow: hidden; padding: 30px 24px 26px; display: flex; flex-direction: column; gap: 18px;
    background:
        radial-gradient(520px 320px at 100% 0%, rgba(255, 138, 31, .26), transparent 62%),
        linear-gradient(160deg, #1a52d6 0%, #0e2f8f 55%, #091f66 100%);
    border-bottom: 1px solid var(--spc-line-strong);
}
.spc-auth-side::after {
    content: ""; position: absolute; right: -60px; bottom: -70px; width: 300px; height: 300px; opacity: .10; pointer-events: none; transform: rotate(18deg);
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M12 1.6l3.1 6.5 7.1.9-5.2 4.9 1.3 7-6.3-3.4-6.3 3.4 1.3-7L1.8 9l7.1-.9z'/%3E%3C/svg%3E");
}
.spc-auth-side > * { position: relative; z-index: 1; }
.spc-auth-pitch h1 { font-size: clamp(26px, 6vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -.03em; margin: 0 0 10px; color: #fff; }
.spc-auth-pitch p { margin: 0; font-size: 15px; color: var(--spc-ink-2); max-width: 420px; }
.spc-auth-points { list-style: none; margin: 0; padding: 0; display: none; gap: 12px; flex-direction: column; }
.spc-auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--spc-ink); }
.spc-auth-points i { width: 38px; height: 38px; border-radius: var(--spc-leaf-sm); display: grid; place-items: center; background: rgba(255, 255, 255, .10); color: var(--spc-orange-300); border: 1px solid rgba(255, 255, 255, .16); flex: none; }
.spc-auth-foot { display: none; margin-top: auto; font-size: 12.5px; color: var(--spc-mute); }
.spc-auth-main { display: flex; align-items: flex-start; justify-content: center; padding: 26px 16px 40px; }
.spc-auth-card { width: 100%; max-width: 440px; }
.spc-auth-card.wide { max-width: 560px; }
.spc-auth-card h2 { font-size: 24px; font-weight: 700; margin: 0 0 4px; color: #fff; letter-spacing: -.02em; }
.spc-auth-card .lead { font-size: 14px; color: var(--spc-mute); margin: 0 0 20px; }
.spc-auth-alt { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--spc-mute); }
.spc-auth-alt a { font-weight: 600; }
.spc-steps { display: flex; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.spc-steps li { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--spc-mute); }
.spc-steps li::before { content: ""; height: 4px; border-radius: 4px; background: rgba(140, 175, 255, .22); }
.spc-steps li.on { color: var(--spc-orange-300); }
.spc-steps li.on::before { background: var(--spc-grad); }
@media (min-width: 900px) {
    .spc-auth-wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
    .spc-auth-side { padding: 44px 52px; border-bottom: 0; border-right: 1px solid var(--spc-line-strong); min-height: 100vh; justify-content: center; gap: 30px; position: sticky; top: 0; height: 100vh; }
    .spc-auth-points, .spc-auth-foot { display: flex; }
    .spc-auth-foot { position: absolute; left: 52px; bottom: 30px; }
    .spc-auth-main { align-items: center; padding: 44px 32px; }
}

/* ---------- 15. Dashboard ---------- */
.spc-hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spc-hello-name { font-size: clamp(20px, 4.6vw, 26px); font-weight: 700; color: #fff; line-height: 1.15; letter-spacing: -.02em; }
.spc-hello-name small { display: block; font-size: 12.5px; font-weight: 500; color: var(--spc-mute); letter-spacing: .3px; margin-bottom: 2px; }
.spc-hello-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.spc-bal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; opacity: .82; }
.spc-bal-eye { width: 36px; height: 36px; border-radius: var(--spc-leaf-sm); border: 0; background: rgba(29, 16, 4, .14); color: var(--spc-on-orange); cursor: pointer; }
.spc-bal-eye:hover { background: rgba(29, 16, 4, .24); }
.spc-bal-amt { font-size: clamp(36px, 9vw, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin: 8px 0 16px; font-variant-numeric: tabular-nums; }
.spc-bal-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.spc-bal-acts a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--spc-leaf-sm); font-size: 13.5px; font-weight: 600; background: var(--spc-on-orange); color: #ffe2b5; }
.spc-bal-acts a.soft { background: rgba(29, 16, 4, .13); color: var(--spc-on-orange); }
.spc-bal-acts a:hover { filter: brightness(1.15); color: #fff; }
.spc-bal-acts a.soft:hover { background: rgba(29, 16, 4, .22); color: var(--spc-on-orange); }

.spc-ring { --spc-pct: 0; width: 96px; height: 96px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--spc-orange-500) calc(var(--spc-pct) * 1%), rgba(140, 175, 255, .2) 0); position: relative; }
.spc-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0d2f8c; }
.spc-ring > * { position: relative; z-index: 1; font-size: 26px; color: var(--spc-orange-300); }
.spc-team { display: flex; align-items: center; gap: 16px; }
.spc-team-n { font-size: 34px; font-weight: 800; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.spc-team-n a { color: inherit; }

.spc-coins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .spc-coins { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .spc-coins { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.spc-coin { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: var(--spc-leaf-sm); background: var(--spc-well); border: 1px solid var(--spc-line); min-width: 0; }
.spc-coin img { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.spc-coin > div { min-width: 0; }
.spc-coin-s { font-size: 12px; font-weight: 600; color: var(--spc-ink-2); }
.spc-coin-p { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spc-coin-c { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 700; }
.spc-coin-c.up { color: var(--spc-ok); }
.spc-coin-c.down { color: var(--spc-bad); }
.spc-live { width: 9px; height: 9px; border-radius: 50%; background: var(--spc-orange-500); animation: spcPulse 1.7s infinite; display: inline-block; }
@keyframes spcPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 138, 31, .65); } 70% { box-shadow: 0 0 0 9px rgba(255, 138, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 138, 31, 0); } }

/* ---------- 16. Utilities & motion ---------- */
.spc-rise { animation: spcRise .5s cubic-bezier(.2, .85, .2, 1) both; }
.spc-page > *:nth-child(2) { animation-delay: .05s; }
.spc-page > *:nth-child(3) { animation-delay: .10s; }
.spc-page > *:nth-child(4) { animation-delay: .15s; }
/* starts partly visible on purpose: content must stay readable even if the animation is paused (background tab, embedded view) */
@keyframes spcRise { from { opacity: .5; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.spc-hide { display: none !important; }
.spc-center { text-align: center; }
.spc-mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .93em; }
.spc-nowrap { white-space: nowrap; }
.spc-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- 17. Gaming skin (pages opt in with <html class="spc-gaming">) ---------- */
/* arena background: hex mesh + orange/blue glows over the blue canvas, with a moving neon grid floor */
html.spc-gaming body,
html.spc-gaming body.spc-body {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-opacity='.075' stroke-width='1.2'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23ffb45e' stroke-opacity='.05' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 56px 100px,
        radial-gradient(820px 480px at 92% -8%, rgba(255, 138, 31, .30), transparent 62%),
        radial-gradient(1000px 640px at -12% 22%, rgba(96, 158, 255, .58), transparent 60%),
        radial-gradient(700px 460px at 50% 112%, rgba(255, 106, 24, .22), transparent 62%),
        linear-gradient(170deg, #1a4fd0 0%, #123dae 34%, #0d2f90 66%, #081f66 100%) !important;
    background-attachment: fixed !important;
}
html.spc-gaming body::before {
    content: ""; position: fixed; left: -30%; right: -30%; bottom: 0; height: 44vh; z-index: -1; pointer-events: none; opacity: .55;
    background:
        linear-gradient(rgba(255, 150, 50, .75) 1.5px, transparent 1.5px) 0 0 / 100% 46px,
        linear-gradient(90deg, rgba(140, 190, 255, .65) 1.5px, transparent 1.5px) 0 0 / 64px 100%;
    transform: perspective(460px) rotateX(64deg); transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 88%); mask-image: linear-gradient(to top, #000 8%, transparent 88%);
    animation: spcGridRun 2.6s linear infinite;
}
html.spc-gaming body::after {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 34vh; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 100% at 50% 100%, rgba(255, 138, 31, .20), transparent 70%);
}
@keyframes spcGridRun { to { background-position: 0 46px, 0 0; } }

.spc-game-font { font-family: 'Chakra Petch', var(--spc-font); }

/* banner */
.spc-game-banner {
    position: relative; overflow: hidden; isolation: isolate; border-radius: var(--spc-leaf-lg); padding: 24px 24px 22px; min-height: 196px;
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 14px;
    background: linear-gradient(118deg, #05123a 0%, #0a2163 42%, #1746c4 100%);
    border: 1px solid rgba(255, 170, 70, .55);
    box-shadow: 0 0 0 1px rgba(255, 138, 31, .18), 0 0 34px rgba(255, 122, 24, .22), 0 26px 56px rgba(2, 8, 30, .5), inset 0 0 70px rgba(47, 107, 255, .28);
}
.spc-game-banner::before {
    content: ""; position: absolute; inset: 40% -20% -10% -20%; z-index: -1; opacity: .5;
    background:
        linear-gradient(rgba(255, 150, 50, .6) 1px, transparent 1px) 0 0 / 100% 26px,
        linear-gradient(90deg, rgba(140, 190, 255, .55) 1px, transparent 1px) 0 0 / 40px 100%;
    transform: perspective(300px) rotateX(60deg); transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(to top, #000, transparent 90%); mask-image: linear-gradient(to top, #000, transparent 90%);
    animation: spcGridRun 2.6s linear infinite;
}
.spc-game-banner::after {
    content: ""; position: absolute; right: -6%; top: -30%; width: 48%; height: 170%; z-index: -1; transform: skewX(-18deg);
    background: linear-gradient(135deg, rgba(255, 200, 87, .26), rgba(255, 90, 31, .08) 70%);
    border-left: 2px solid rgba(255, 200, 87, .55);
}
.spc-game-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--spc-leaf-xs); background: var(--spc-grad); color: var(--spc-on-orange); font-family: 'Chakra Petch', var(--spc-font); font-size: 11.5px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; }
.spc-game-title { font-family: 'Chakra Petch', var(--spc-font); font-size: clamp(23px, 4.8vw, 36px); font-weight: 700; line-height: 1.06; letter-spacing: -.01em; text-transform: uppercase; color: #fff; margin: 12px 0 8px; text-shadow: 0 0 22px rgba(96, 158, 255, .55); }
.spc-game-sub { margin: 0 0 16px; font-size: 14px; color: var(--spc-ink-2); max-width: 430px; }
.spc-game-art { width: 100%; max-width: 330px; justify-self: end; filter: drop-shadow(0 18px 30px rgba(255, 106, 24, .38)); animation: spcHover 4.2s ease-in-out infinite; }
@keyframes spcHover { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@media (max-width: 620px) {
    .spc-game-banner { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; min-height: 0; }
    .spc-game-art { position: absolute; right: -34px; bottom: -22px; width: 190px; opacity: .42; z-index: -1; }
    .spc-game-sub { max-width: 78%; }
}

/* player card (profile hero + stat strip) */
.spc-player { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--spc-leaf-lg); border: 1px solid var(--spc-line-strong); background: linear-gradient(150deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04) 60%); box-shadow: var(--spc-shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.spc-player-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 20px 22px; background: linear-gradient(120deg, rgba(255, 138, 31, .16), rgba(47, 107, 255, .10)); border-bottom: 1px solid var(--spc-line); }
.spc-player-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.spc-avatar { width: 62px; height: 62px; flex: none; display: grid; place-items: center; border-radius: var(--spc-leaf); background: var(--spc-grad); color: var(--spc-on-orange); font-family: 'Chakra Petch', var(--spc-font); font-size: 23px; font-weight: 700; letter-spacing: .5px; box-shadow: var(--spc-glow), 0 0 0 4px rgba(255, 138, 31, .16); }
.spc-player-name { margin: 0; font-size: 20px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.spc-player-meta { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13px; color: var(--spc-mute); }
.spc-player-meta b { color: var(--spc-orange-300); font-family: 'Chakra Petch', var(--spc-font); font-weight: 600; letter-spacing: .5px; }
.spc-online { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(61, 220, 176, .13); border: 1px solid rgba(61, 220, 176, .34); color: var(--spc-ok); font-size: 13px; font-weight: 600; }
.spc-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(61, 220, 176, .18); }
.spc-online.off { background: rgba(255, 107, 122, .13); border-color: rgba(255, 107, 122, .34); color: var(--spc-bad); }
.spc-online.off::before { box-shadow: 0 0 0 4px rgba(255, 107, 122, .18); }
.spc-online:empty { display: none; }
.spc-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spc-strip-item { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-right: 1px solid var(--spc-line); min-width: 0; }
.spc-strip-item:last-child { border-right: 0; }
.spc-strip-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--spc-leaf-sm); font-size: 18px; background: var(--spc-grad); color: var(--spc-on-orange); }
.spc-strip-ic.sky { background: var(--spc-grad-blue); color: #fff; }
.spc-strip-k { font-size: 11.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--spc-mute); }
.spc-strip-v { font-family: 'Chakra Petch', var(--spc-font); font-size: 17px; font-weight: 700; color: #fff; margin-top: 2px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.spc-strip-v a { color: inherit; }
@media (max-width: 860px) {
    .spc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spc-strip-item:nth-child(2n) { border-right: 0; }
    .spc-strip-item:nth-child(-n+2) { border-bottom: 1px solid var(--spc-line); }
    .spc-strip-item { padding: 14px 14px; }
}

/* metric cards */
.spc-metrics { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spc-metrics.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 991px) { .spc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 430px) { .spc-metrics, .spc-metrics.two { grid-template-columns: minmax(0, 1fr); } }
.spc-metric {
    --spc-m: var(--spc-grad); --spc-m-glow: rgba(255, 106, 24, .38);
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px 18px 18px 20px; min-width: 0; color: var(--spc-ink);
    border-radius: var(--spc-leaf); border: 1px solid var(--spc-line);
    background: linear-gradient(150deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04) 62%);
    box-shadow: 0 12px 28px rgba(2, 8, 30, .34); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.spc-metric::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--spc-m); }
.spc-metric::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 34px; height: 34px; background: var(--spc-m); clip-path: polygon(100% 0, 100% 100%, 0 100%); opacity: .85; }
.spc-metric:hover { transform: translateY(-4px); border-color: rgba(255, 170, 70, .6); box-shadow: 0 18px 38px rgba(2, 8, 30, .44), 0 0 26px var(--spc-m-glow); color: var(--spc-ink); }
.spc-metric-ic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: var(--spc-leaf-sm); font-size: 22px; background: var(--spc-m); color: var(--spc-on-orange); box-shadow: 0 8px 18px var(--spc-m-glow); }
.spc-metric-body { min-width: 0; }
.spc-metric-k { display: block; font-size: 12.5px; font-weight: 600; color: var(--spc-mute); margin-bottom: 4px; }
.spc-metric-v { display: block; font-family: 'Chakra Petch', var(--spc-font); font-size: 25px; font-weight: 700; line-height: 1.05; color: #fff; letter-spacing: -.3px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.spc-metric.sky { --spc-m: linear-gradient(135deg, #7db4ff, #2f6bff); --spc-m-glow: rgba(47, 107, 255, .45); }
.spc-metric.sky .spc-metric-ic { color: #fff; }
.spc-metric.gold { --spc-m: linear-gradient(135deg, #ffe08a, #ffb02e); --spc-m-glow: rgba(255, 176, 46, .4); }
.spc-metric.ember { --spc-m: linear-gradient(135deg, #ff8a1f, #ff3d1f); --spc-m-glow: rgba(255, 61, 31, .4); }

.spc-game-head { display: flex; align-items: center; gap: 12px; margin: 8px 2px -2px; }
.spc-game-head::before { content: ""; width: 5px; height: 24px; border-radius: 4px; background: var(--spc-grad); box-shadow: 0 0 14px rgba(255, 138, 31, .6); }
.spc-game-head h2 { margin: 0; font-family: 'Chakra Petch', var(--spc-font); font-size: 19px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #fff; }
.spc-game-head .spc-more { margin-left: auto; }

/* ---------- 18. Game lobby (Dashboard_Game) ---------- */
/* a) promo / daily check-in banner */
.spc-promo {
    position: relative; overflow: hidden; isolation: isolate; border-radius: var(--spc-leaf-lg); padding: 22px 24px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
    background: linear-gradient(115deg, #0a2163 0%, #10399f 46%, #1f54d8 100%);
    border: 1px solid rgba(255, 170, 70, .5);
    box-shadow: 0 0 30px rgba(255, 122, 24, .2), 0 22px 50px rgba(2, 8, 30, .48), inset 0 0 60px rgba(47, 107, 255, .22);
}
.spc-promo::after { content: ""; position: absolute; right: -8%; top: -40%; width: 46%; height: 180%; z-index: -1; transform: skewX(-16deg); background: linear-gradient(135deg, rgba(255, 200, 87, .28), rgba(255, 90, 31, .05) 72%); border-left: 2px solid rgba(255, 200, 87, .5); }
.spc-promo-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: var(--spc-leaf-xs); background: var(--spc-grad); color: var(--spc-on-orange); font-family: 'Chakra Petch', var(--spc-font); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.spc-promo-title { font-family: 'Chakra Petch', var(--spc-font); font-size: clamp(21px, 4.4vw, 31px); font-weight: 700; line-height: 1.08; text-transform: uppercase; color: #fff; margin: 11px 0 6px; text-shadow: 0 0 20px rgba(96, 158, 255, .5); }
.spc-promo-sub { margin: 0 0 14px; font-size: 13.5px; color: var(--spc-mute); max-width: 380px; }
.spc-reward { position: relative; width: 118px; height: 118px; flex: none; display: grid; place-items: center; justify-self: end; }
.spc-reward-disc { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 44px; color: var(--spc-on-orange); background: radial-gradient(circle at 34% 28%, #ffe6a8, #ffb02e 42%, #ff7a18 100%); box-shadow: 0 0 0 6px rgba(255, 138, 31, .16), 0 14px 30px rgba(255, 106, 24, .5); animation: spcHover 4.6s ease-in-out infinite; }
.spc-reward::before, .spc-reward::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff1cf, #ffba3a 60%, #ff8a1f); box-shadow: 0 4px 10px rgba(255, 106, 24, .5); }
.spc-reward::before { top: 2px; right: 6px; animation: spcCoin 3.2s ease-in-out infinite; }
.spc-reward::after { bottom: 6px; left: 0; width: 12px; height: 12px; animation: spcCoin 3.8s ease-in-out infinite .4s; }
@keyframes spcCoin { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 560px) { .spc-reward { width: 92px; height: 92px; } .spc-reward-disc { width: 84px; height: 84px; font-size: 34px; } .spc-promo { padding: 20px 18px; } .spc-promo-sub { max-width: none; } }

/* b) wallet balance bar */
.spc-wallet { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--spc-leaf); background: linear-gradient(150deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .035) 62%); border: 1px solid var(--spc-line-strong); box-shadow: var(--spc-shadow); }
.spc-wallet::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--spc-grad); }
.spc-wallet-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.spc-wallet-ava { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--spc-leaf-sm); background: var(--spc-grad); color: var(--spc-on-orange); font-size: 17px; }
.spc-wallet-code { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--spc-mute); min-width: 0; }
.spc-wallet-code b { display: block; margin-top: 2px; font-family: 'Chakra Petch', var(--spc-font); font-size: 14px; font-weight: 600; letter-spacing: .4px; color: #fff; text-transform: none; overflow-wrap: anywhere; }
.spc-wallet-bal { margin-left: auto; text-align: right; }
.spc-wallet-bal .k { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--spc-mute); }
.spc-wallet-bal .v { display: block; font-family: 'Chakra Petch', var(--spc-font); font-size: 23px; font-weight: 700; line-height: 1.1; background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.spc-wallet-acts { display: flex; gap: 8px; }
.spc-wallet-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--spc-leaf-sm); border: 1px solid var(--spc-line); background: var(--spc-well); color: var(--spc-ink); font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .15s ease, border-color .15s ease, color .15s ease; }
.spc-wallet-btn:hover { transform: translateY(-2px); border-color: rgba(255, 170, 70, .6); color: #fff; }
.spc-wallet-btn.spin:hover i { animation: spcWheel .7s linear; }
@media (max-width: 560px) { .spc-wallet-acts { order: 2; margin-left: auto; } .spc-wallet-bal { order: 3; width: 100%; margin-left: 0; text-align: left; display: flex; align-items: baseline; gap: 8px; } }

/* c) game category tiles */
.spc-cats { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .spc-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .spc-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.spc-cat { --c: var(--spc-grad); --cg: rgba(255, 106, 24, .4); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px 16px; text-align: center; text-decoration: none; color: var(--spc-ink); border-radius: var(--spc-leaf); border: 1px solid var(--spc-line); background: linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .035) 64%); box-shadow: 0 12px 26px rgba(2, 8, 30, .32); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.spc-cat::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; opacity: .55; background-image: radial-gradient(rgba(255, 170, 70, .5) 1px, transparent 1.4px); background-size: 7px 7px; pointer-events: none; }
.spc-cat:hover { transform: translateY(-4px); border-color: rgba(255, 170, 70, .6); box-shadow: 0 18px 36px rgba(2, 8, 30, .44), 0 0 24px var(--cg); color: #fff; }
.spc-cat-ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--spc-leaf-sm); font-size: 24px; color: var(--spc-on-orange); background: var(--c); box-shadow: 0 10px 20px var(--cg); }
.spc-cat-k { font-family: 'Chakra Petch', var(--spc-font); font-size: 14px; font-weight: 600; letter-spacing: .3px; color: #fff; }
.spc-cat.sky { --c: var(--spc-grad-blue); --cg: rgba(47, 107, 255, .45); } .spc-cat.sky .spc-cat-ic { color: #fff; }
.spc-cat.gold { --c: linear-gradient(135deg, #ffe08a, #ffb02e); --cg: rgba(255, 176, 46, .4); }
.spc-cat.ember { --c: linear-gradient(135deg, #ff8a1f, #ff3d1f); --cg: rgba(255, 61, 31, .4); }

/* d) lobby filter tabs */
.spc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0; }
.spc-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--spc-line); background: var(--spc-well); color: var(--spc-mute); font-family: 'Chakra Petch', var(--spc-font); font-size: 13px; font-weight: 600; letter-spacing: .4px; cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.spc-tab:hover { color: #fff; border-color: var(--spc-line-strong); }
.spc-tab.on { background: var(--spc-grad); color: var(--spc-on-orange); border-color: transparent; box-shadow: var(--spc-glow); }

/* e) game cards */
.spc-games { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (max-width: 620px) { .spc-games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; } }
@media (max-width: 360px) { .spc-games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spc-game-c { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 10px 13px; text-align: center; text-decoration: none; color: var(--spc-ink); border-radius: var(--spc-leaf); border: 1px solid var(--spc-line); background: linear-gradient(160deg, rgba(10, 33, 99, .6), rgba(5, 18, 58, .5)); box-shadow: 0 10px 22px rgba(2, 8, 30, .36); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.spc-game-c::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--spc-grad); opacity: .85; }
.spc-game-c:hover { transform: translateY(-4px); border-color: rgba(255, 170, 70, .6); box-shadow: 0 16px 32px rgba(2, 8, 30, .46), 0 0 22px rgba(255, 106, 24, .3); color: #fff; }
.spc-game-c[hidden] { display: none; }
.spc-ball { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-family: 'Chakra Petch', var(--spc-font); font-size: 18px; font-weight: 700; color: #fff; background: radial-gradient(circle at 34% 30%, #ffd98a, #ff8a1f 48%, #ff3d1f 100%); box-shadow: 0 8px 18px rgba(255, 90, 31, .5), inset 0 -6px 12px rgba(0, 0, 0, .2); }
.spc-ball.sky { background: radial-gradient(circle at 34% 30%, #bfe0ff, #4f8dff 46%, #1d4ed8 100%); box-shadow: 0 8px 18px rgba(47, 107, 255, .5), inset 0 -6px 12px rgba(0, 0, 0, .2); }
.spc-ball.gold { background: radial-gradient(circle at 34% 30%, #fff0c0, #ffc23e 48%, #f59e0b 100%); box-shadow: 0 8px 18px rgba(255, 176, 46, .5), inset 0 -6px 12px rgba(0, 0, 0, .2); }
.spc-game-n { font-family: 'Chakra Petch', var(--spc-font); font-size: 13px; font-weight: 600; color: #fff; line-height: 1.15; }
.spc-game-t { font-size: 11px; color: var(--spc-mute); display: inline-flex; align-items: center; gap: 5px; }
.spc-game-t i { color: var(--spc-sky); }

/* f) winners podium */
.spc-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; }
.spc-pod { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 18px 10px 14px; border-radius: var(--spc-leaf); border: 1px solid var(--spc-line); background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); }
.spc-pod::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 30px; height: 30px; background: var(--spc-grad-blue); clip-path: polygon(100% 0, 100% 100%, 0 100%); opacity: .7; }
.spc-pod-rank { position: absolute; top: 9px; left: 11px; font-family: 'Chakra Petch', var(--spc-font); font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--spc-mute); }
.spc-pod-ava { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--spc-grad-blue); box-shadow: 0 0 0 3px rgba(140, 175, 255, .2); }
.spc-pod-n { font-family: 'Chakra Petch', var(--spc-font); font-size: 12.5px; font-weight: 600; letter-spacing: .5px; color: #fff; }
.spc-pod-amt { font-family: 'Chakra Petch', var(--spc-font); font-size: 15px; font-weight: 700; background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.spc-pod.first { padding-top: 28px; background: linear-gradient(160deg, rgba(255, 138, 31, .2), rgba(255, 90, 31, .06)); border-color: rgba(255, 170, 70, .55); box-shadow: 0 0 26px rgba(255, 122, 24, .28); }
.spc-pod.first::after { background: var(--spc-grad); }
.spc-pod.first .spc-pod-rank { color: var(--spc-warn); }
.spc-pod.first .spc-pod-ava { width: 64px; height: 64px; font-size: 24px; background: var(--spc-grad); color: var(--spc-on-orange); box-shadow: 0 0 0 3px rgba(255, 170, 70, .3), 0 10px 22px rgba(255, 106, 24, .45); }
.spc-pod-crown { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); color: #ffc857; font-size: 16px; text-shadow: 0 0 10px rgba(255, 200, 87, .7); }

/* g) live wins feed */
.spc-winfeed { display: grid; gap: 9px; }
.spc-win { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 16px; border-radius: var(--spc-leaf-sm); border: 1px solid var(--spc-line); background: linear-gradient(150deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); }
.spc-win::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--spc-grad); }
.spc-win-ava { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--spc-grad-blue); color: #fff; font-size: 15px; box-shadow: 0 0 0 2px rgba(255, 170, 70, .2); }
.spc-win-who { min-width: 0; }
.spc-win-who b { display: block; font-family: 'Chakra Petch', var(--spc-font); font-size: 13px; font-weight: 600; letter-spacing: .5px; color: #fff; }
.spc-win-who span { font-size: 11px; color: var(--spc-mute); }
.spc-win-amt { margin-left: auto; text-align: right; padding-left: 10px; }
.spc-win-amt b { display: block; font-family: 'Chakra Petch', var(--spc-font); font-size: 16px; font-weight: 700; background: var(--spc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.spc-win-amt span { font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--spc-mute); }

/* h) floating spin wheel */
.spc-spin { position: fixed; right: 16px; bottom: calc(var(--spc-dock-h) + 20px); z-index: 60; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: #fff; isolation: isolate; box-shadow: 0 10px 26px rgba(255, 106, 24, .5), 0 0 0 4px rgba(255, 170, 70, .18); transition: transform .15s ease; }
.spc-spin::before { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1; background: conic-gradient(from 0deg, #ffc857, #ff8a1f, #ff5a1f, #1f54d8, #ffc857); animation: spcWheel 7s linear infinite; }
.spc-spin i { font-size: 21px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.spc-spin:hover { transform: scale(1.07); }
@keyframes spcWheel { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
