/* =========================================================================
   LPLLS — Design System v2
   ========================================================================= */

:root {
    --bg: #d7e9f5;
    --bg-grad-1: #cfe3f1;
    --panel: #ffffff;
    --border: #e3e8f0;
    --border-soft: #edf1f7;
    --text: #0f1b33;
    --muted: #64748b;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-deep: #173d9e;
    --accent: #7c3aed;
    --primary: #2563eb;
    --success: #059669;
    --success-soft: #e7f6ef;
    --danger: #e11d48;
    --danger-soft: #fdecef;
    --warning: #d97706;
    --warning-soft: #fdf3e7;
    --info: #7c3aed;
    --info-soft: #f1ecfb;
    --radius: 16px;
    --radius-sm: 11px;
    --surface: #ffffff;
    --shadow-xs: 0 1px 2px rgba(16, 38, 71, .04);
    --shadow: 0 1px 2px rgba(16, 38, 71, .05), 0 4px 14px -4px rgba(16, 38, 71, .08), 0 12px 30px -14px rgba(16, 38, 71, .12);
    --shadow-lg: 0 8px 22px -8px rgba(16, 38, 71, .12), 0 24px 54px -18px rgba(16, 38, 71, .24);
    --ring: 0 0 0 3px rgba(37, 99, 235, .16);
    --ring-soft: 0 0 0 6px rgba(37, 99, 235, .08);
    --grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
    --hero-edge: #7ba6d0;
    --sidebar-w: 252px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .4rem; line-height: 1.25; color: #0f1b33; font-family: var(--font); letter-spacing: -0.03em; }
h1 { font-size: 1.35rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
th.right, td.right { text-align: right; }
.num-display {
    font-family: "JetBrains Mono", "Cascadia Code", "SF Mono", "Fira Code", ui-monospace, monospace;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: .02em;
}

.ico { width: 18px; height: 18px; flex-shrink: 0; display: block; }

/* ------------------------------------------------------------------ layout */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    color: #b8c4d8;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    background: linear-gradient(180deg, #0b1224 0%, #0e1a36 48%, #123056 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
    transition: transform .2s ease;
}
.sidebar::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(520px 240px at 0% -8%, rgba(37, 99, 235, .28), transparent 62%),
        radial-gradient(380px 200px at 110% 108%, rgba(124, 58, 237, .16), transparent 65%);
    pointer-events: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.15rem 1.15rem 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--grad);
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, .55);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.15rem;
    letter-spacing: -.02em;
}

.brand strong { display: block; color: #fff; font-size: .96rem; line-height: 1.2; letter-spacing: .01em; }
.brand small { color: #7d8fb0; font-size: .72rem; }

/* LPLLS brand — globe chip + gradient wordmark (mirrors legacy logo). */
.brand-mark-globe {
    background: linear-gradient(180deg, #1074c6 0%, #0a5e85 100%);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 8px -2px rgba(10, 94, 133, .55);
}
.brand-mark-globe .ico { width: 17px; height: 17px; color: #fff; }
.brand-mark-globe svg { display: block; }
.brand-mark-lg { width: 44px; height: 44px; }
.brand-mark-lg .ico { width: 22px; height: 22px; }
.brand-name {
    background: linear-gradient(90deg, #4fc3f7 0%, #90caf9 55%, #a5d6a7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: .06em;
}
.auth-brand-logo { display: flex; align-items: center; gap: .55rem; }
.auth-brand-logo .brand-name {
    background: linear-gradient(90deg, #0a5e85 0%, #1074c6 60%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-cta {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    margin: .85rem .75rem .35rem;
    padding: .62rem .8rem;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    font-weight: 800; font-size: .85rem;
    text-decoration: none !important;
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, .85);
    transition: transform .08s, box-shadow .14s, filter .14s;
}
.nav-cta .ico { width: 16px; height: 16px; }
.nav-cta:hover { filter: brightness(1.06); box-shadow: 0 14px 28px -12px rgba(37, 99, 235, .95); }
.nav-cta:active { transform: scale(.98); }

.nav { flex: 1; padding: .45rem .7rem .8rem; overflow-y: auto; position: relative; z-index: 1; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 8px; }

.nav-group { margin: .15rem 0 .55rem; }
.nav-label {
    display: block;
    padding: .45rem .7rem .22rem;
    font-size: .62rem; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase;
    color: #6d7d99;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .42rem .5rem;
    margin: 2px 0;
    border-radius: 11px;
    color: #aab8d0;
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: background .14s, color .14s, border-color .14s, transform .08s, box-shadow .14s;
}
.nav-ico {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .05);
    color: #93a4c3;
    transition: background .14s, color .14s;
}
.nav-ico .ico { width: 15px; height: 15px; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item:hover .nav-ico { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, .95), rgba(79, 70, 229, .82));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .7);
}
.nav-item.active .nav-ico { background: rgba(255, 255, 255, .18); color: #fff; }
.nav-item.active .ico { color: #fff; }
.nav-item:active { transform: scale(.98); }

.sidebar-foot {
    padding: .75rem .7rem .85rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
    position: relative; z-index: 1;
}
.side-user {
    display: flex; align-items: center; gap: .65rem;
    padding: .5rem .55rem;
    margin-bottom: .35rem;
    border-radius: 12px;
    text-decoration: none !important;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .04);
    transition: background .14s, border-color .14s;
}
.side-user:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .12); }
.side-user .avatar { width: 32px; height: 32px; font-size: .78rem; flex-shrink: 0; }
.side-user-meta { min-width: 0; line-height: 1.2; }
.side-user-meta strong {
    display: block; font-size: .8rem; color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-user-meta small { color: #8ba0c0; text-transform: uppercase; font-size: .62rem; letter-spacing: .06em; }
.nav-signout { color: #8b9bb5; }
.nav-signout:hover { color: #fecdd3; background: rgba(225, 29, 72, .14); }
.nav-signout:hover .nav-ico { background: rgba(225, 29, 72, .22); color: #fecdd3; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .8rem 1.5rem;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title h1 { margin: 0; font-size: 1.12rem; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: .65rem; }

.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 6px 14px -5px rgba(37, 99, 235, .55);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: .9rem;
}

.user-meta { line-height: 1.15; }
.user-meta strong { display: block; font-size: .85rem; color: #1e293b; }
.user-meta small { color: var(--muted); text-transform: uppercase; font-size: .64rem; letter-spacing: .05em; }

.content { padding: 1.5rem; max-width: 1320px; width: 100%; margin: 0 auto; }

.icon-btn {
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: .3rem .55rem; font-size: 1rem; cursor: pointer; color: var(--text);
    transition: background .12s, border-color .12s;
}
.icon-btn:hover { background: #f8fafc; border-color: #d3dcec; }
.menu-btn { display: none; }

/* ------------------------------------------------------------------ cards */
.card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: .5px solid #93b4e0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .85);
    padding: 1.15rem 1.3rem;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 1); border-color: #a9c9ec; transform: translateY(-1px); }

.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.card-head h3::before {
    content: ""; width: 3px; height: .95em; border-radius: 99px;
    background: var(--grad);
}

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }

.stat {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid #d9e6f5;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .9);
    padding: 1.05rem 1.2rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.stat:hover { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 1); transform: translateY(-2px); border-color: #a9c9ec; }
.stat::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), transparent 80%);
}
.stat::after {
    content: ""; position: absolute; right: -48px; top: -48px; width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(37, 99, 235, .10), transparent 70%);
    pointer-events: none;
}
.stat .label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .value { font-size: 1.6rem; font-weight: 800; margin-top: .25rem; letter-spacing: -.02em; }
.stat .hint { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.stat.brand .value { color: var(--brand); }
.stat.success .value { color: var(--success); }
.stat.danger .value { color: var(--danger); }
.stat.warning .value { color: var(--warning); }
.stat.info .value { color: var(--info); }
.stat.success::before { background: linear-gradient(90deg, var(--success), transparent 80%); }
.stat.warning::before { background: linear-gradient(90deg, var(--warning), transparent 80%); }
.stat.danger::before { background: linear-gradient(90deg, var(--danger), transparent 80%); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border: 1px solid #d4e3f3; border-radius: var(--radius); background: #fff; box-shadow: 0 1px 4px rgba(16, 38, 71, .04); }

table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 620px; }
thead th {
    text-align: left;
    padding: .65rem .85rem;
    background: linear-gradient(180deg, #f0f5fb 0%, #e8f0f8 100%);
    border-bottom: 2px solid #d4e3f3;
    color: #3b4c6b;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}
tbody td { padding: .6rem .85rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f0f5fb; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .12rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.badge-green { background: var(--success-soft); color: #047a58; }
.badge-red { background: var(--danger-soft); color: #c0193d; }
.badge-grey { background: #f1f5f9; color: var(--muted); }
.badge-blue { background: #e9f0fe; color: var(--brand); }
.badge-purple { background: var(--info-soft); color: var(--info); }
.badge-orange { background: var(--warning-soft); color: var(--warning); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; vertical-align: 1px; }
.dot.on { background: var(--success); box-shadow: 0 0 0 3px rgba(5, 150, 105, .15); }
.dot.off { background: #cbd5e1; }

/* ------------------------------------------------------------------ forms */
.stack { display: flex; flex-direction: column; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .32rem; }
.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.profile-admin { display: flex; align-items: center; gap: .55rem; padding: .35rem .1rem; }
.profile-admin .usr-avatar { width: 30px; height: 30px; font-size: .72rem; flex-shrink: 0; }
.profile-admin span span { display: inline; }
label { font-size: .74rem; font-weight: 700; color: #3b4c6b; letter-spacing: .04em; text-transform: uppercase; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
    width: 100%;
    padding: .42rem .7rem;
    border: 1.5px solid #d5e2f2;
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s, box-shadow .2s;
    box-shadow: inset 0 1px 2px rgba(16, 38, 71, .03);
}
input[type="text"]:hover, input[type="password"]:hover, input[type="email"]:hover,
input[type="number"]:hover, input[type="date"]:hover, input[type="datetime-local"]:hover,
input[type="time"]:hover, select:hover, textarea:hover {
    border-color: #a9c9ec;
    box-shadow: inset 0 1px 2px rgba(16, 38, 71, .03), 0 2px 8px -3px rgba(37, 99, 235, .18);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13), 0 3px 10px -3px rgba(37, 99, 235, .25);
    background: #fbfcff;
}
input:not(:placeholder-shown):not(:focus):not([type="hidden"]), select:not(:focus) {
    border-color: #c6dde9;
    background: #fcfdfe;
}
input:disabled { background: #f1f5f9; color: var(--muted); cursor: not-allowed; box-shadow: none; }
select { appearance: auto; background-image: none; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }
input::placeholder, textarea::placeholder { color: #9fb0c6; font-weight: 500; }

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: .6; cursor: pointer; transition: opacity .15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.field-invalid, .field-invalid:focus {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .13), 0 2px 8px -2px rgba(220, 38, 38, .18) !important;
}

input, select, textarea, button, .btn { font-family: var(--font); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .44rem .85rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all .15s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring-soft), 0 0 0 2px var(--brand); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #fff; border-color: rgba(37, 99, 235, .15); box-shadow: 0 4px 14px -4px rgba(37, 99, 235, .50), 0 1px 2px rgba(37, 99, 235, .20); }
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #4338ca 55%, #6d28d9 100%); box-shadow: 0 8px 22px -6px rgba(37, 99, 235, .55); transform: translateY(-1px); }
.btn-primary::after {
    content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .45s ease;
}
.btn-primary:hover::after { left: 125%; }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; border-color: rgba(5, 150, 105, .15); box-shadow: 0 4px 14px -4px rgba(5, 150, 105, .45), 0 1px 2px rgba(5, 150, 105, .20); }
.btn-success:hover { background: linear-gradient(135deg, #047857, #059669); box-shadow: 0 8px 22px -6px rgba(5, 150, 105, .50); transform: translateY(-1px); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #f6c2cc; }
.btn-danger:hover { background: #fbe0e5; border-color: #ef9aa8; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: #334155; border-color: var(--border); box-shadow: 0 1px 3px rgba(23, 33, 66, .05); }
.btn-ghost:hover { background: #f2f6fc; border-color: #b3cdea; box-shadow: 0 3px 8px rgba(23, 33, 66, .08); transform: translateY(-1px); }
.btn-muted { background: #f1f5f9; color: var(--muted); border-color: var(--border); }
.btn-muted:hover { background: #e7edf5; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { padding: .28rem .6rem; font-size: .75rem; border-radius: 8px; gap: .28rem; }
.btn-xl { padding: .6rem 1.2rem; font-size: .9rem; border-radius: 12px; gap: .5rem; }

/* ------------------------------------------------------------------ flash */
.flash-stack { max-width: 1320px; margin: 0 auto; padding: .9rem 1.5rem 0; }
.flash {
    padding: .7rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: .55rem;
    font-size: .87rem;
    border: 1px solid;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.flash::before { font-weight: 900; }
.flash-success { background: var(--success-soft); border-color: #bce6d3; color: #0b5c3f; }
.flash-error { background: var(--danger-soft); border-color: #f6c2cc; color: #8f1a2f; }
.flash-warning { background: var(--warning-soft); border-color: #f6d0a6; color: #7a3d00; }
.flash-info { background: #e9f0fe; border-color: #c7dcfb; color: #123f8f; }

/* centered floating message stack (toasts + relocated server flashes).
   Centered over the CONTENT area (right of the sidebar), not the whole viewport. */
.toast-stack {
    position: fixed;
    top: 4.2rem;
    left: calc((100vw + var(--sidebar-w)) / 2);
    transform: translateX(-50%);
    z-index: 99;
    display: flex; flex-direction: column; align-items: center; gap: .45rem;
    width: min(94vw, 560px);
    pointer-events: none;
}
@media (max-width: 760px) {
    .toast-stack { left: 50%; }
}
#toasts .flash {
    margin: 0; width: 100%; pointer-events: auto; cursor: pointer;
    justify-content: center; text-align: center; animation: toastIn .25s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 12px 36px -8px rgba(16, 38, 71, .18);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ station layout */
.station-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(370px, .95fr); gap: 1.1rem; align-items: start; }

.station-col .card + .card { margin-top: 1.1rem; }
.station-col-right { position: sticky; top: 66px; z-index: 1; }
.station-tools-card { z-index: 2; }
/* keep the open tirage dropdown above every sibling card */
.station-entry-card:has(.tirage-dropdown.open) { z-index: 40; }

.station-entry-card { position: relative; overflow: visible; padding: .7rem .9rem .65rem; z-index: 3; }
.station-entry-card > .card-head {
    margin-bottom: .55rem;
    padding: .55rem .7rem;
    border: 1px solid #d8e5f4;
    border-radius: 12px;
    background:
        radial-gradient(140px 56px at 100% 0%, rgba(124, 58, 237, .10), transparent 70%),
        linear-gradient(135deg, #eef4ff 0%, #f8fafe 100%);
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.station-entry-card > .card-head h3 { color: #1e3a8a; }
.stn-head-right { display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.stn-head-links { display: inline-flex; align-items: center; gap: .35rem; }
.stn-head-links a {
    display: inline-flex; align-items: center; gap: .28rem;
    font-size: .72rem; font-weight: 700; line-height: 1;
    color: #2f6bf2; text-decoration: none;
    border: 1px solid #d8e5f4; border-radius: 999px;
    background: rgba(255, 255, 255, .85); padding: .3rem .6rem;
    transition: border-color .15s, background .15s, color .15s;
}
.stn-head-links a:hover { border-color: #2f6bf2; background: #eef4ff; }
.stn-head-links .ico { width: 12px; height: 12px; }
.station-entry-card .stn-section {
    padding: .4rem .55rem;
    margin: 0 0 .4rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #f7f9fd;
}
.station-entry-card .stn-section:last-of-type { margin-bottom: 0; }
.station-entry-card .mod-line { margin-top: 0; }
.station-entry-card .field { gap: .15rem; }
.station-entry-card .field > label { font-size: .72rem; margin: 0; }
.station-entry-card .num-hint { margin: .2rem 0 0; min-height: 0; font-size: .7rem; }
.station-entry-card .bet-kbd { margin-top: .4rem; }
.station-entry-card .mod-help { margin-top: .25rem; }
.station-entry-card .tirage-dropdown-trigger { min-height: 38px; padding: .28rem .65rem; }
.station-entry-card .bet-row { gap: .45rem; }
.station-entry-card .mod-pill { padding: .18rem .5rem; font-size: .74rem; }

.station-ticket-card {
    position: relative;
    overflow: visible;
    padding: .7rem .9rem .65rem;
    background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}
.station-ticket-card > .card-head {
    margin-bottom: .55rem;
    padding: .55rem .7rem;
    border: 1px solid #d8e5f4;
    border-radius: 12px;
    background:
        radial-gradient(140px 56px at 100% 0%, rgba(37, 99, 235, .10), transparent 72%),
        linear-gradient(135deg, #eef4ff 0%, #f8fafe 100%);
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.station-ticket-card > .card-head h3 { color: #1e3a8a; }
.station-ticket-card .pending-list { max-height: 360px; }
.station-ticket-card .empty { margin-bottom: .2rem; }

.save-box { border-top: 1px solid #d4e3f3; margin-top: .9rem; padding-top: .9rem; }
.save-box details {
    border: 1px solid #d4e3f3; border-radius: 12px;
    background: linear-gradient(135deg, #f8faff 0%, #f4f7fb 100%);
    padding: .55rem .8rem; margin-bottom: .85rem;
    transition: border-color .15s, box-shadow .15s;
}
.save-box details:hover { border-color: #c0d4ec; }
.save-box summary {
    cursor: pointer; font-weight: 700; font-size: .82rem; color: #334155;
    list-style: none; display: flex; align-items: center; gap: .4rem;
}
.save-box summary::-webkit-details-marker { display: none; }
.save-box summary::after { content: "▾"; margin-left: auto; opacity: .7; font-size: .7rem; transition: transform .2s; }
.save-box details[open] summary::after { transform: rotate(180deg); }
.save-box details .stack { margin-top: .7rem; }
.save-collapsible {
    border: 1px solid #d4e3f3; border-radius: 12px;
    background: linear-gradient(135deg, #f8faff 0%, #f4f7fb 100%);
    margin-bottom: .85rem; overflow: hidden;
    transition: border-color .15s;
}
.save-collapsible:hover { border-color: #c0d4ec; }
.save-collapsible-toggle {
    display: flex; align-items: center; gap: .4rem; width: 100%;
    padding: .55rem .8rem; border: none; background: transparent;
    cursor: pointer; font-weight: 700; font-size: .82rem; color: #334155;
}
.save-collapsible-toggle .chevron { margin-left: auto; transition: transform .25s ease; }
.save-collapsible.is-open .save-collapsible-toggle .chevron { transform: rotate(180deg); }
.save-collapsible-body {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
}
.save-collapsible.is-open .save-collapsible-body { grid-template-rows: 1fr; }
.save-collapsible-inner { overflow: hidden; padding: 0; display: flex; flex-direction: column; gap: .4rem; transition: padding .3s ease; }
.save-collapsible.is-open .save-collapsible-inner { padding: 0 .8rem .6rem; }
.save-collapsible-inner .field label { font-size: .7rem; margin-bottom: .15rem; }
.save-collapsible-inner .field input,
.save-collapsible-inner .field select { height: 26px; padding: 0 .4rem; font-size: .78rem; border-radius: 7px; }
.save-collapsible-inner .save-divider { margin: 0; }
.stn-cust-new-fold { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: #f8fafc; padding: .45rem .6rem; }
.stn-cust-new-toggle {
    display: block; width: 100%; border: none; background: transparent;
    cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--brand);
    text-align: left; padding: 0;
}
.stn-cust-new-grid {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease; overflow: hidden;
}
.stn-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px);
    display: flex !important; align-items: center; justify-content: center;
    padding: 1rem;
}
.stn-modal-overlay[hidden] { display: none !important; }
.stn-modal {
    background: #fff; border-radius: 14px; box-shadow: 0 20px 60px -12px rgba(0,0,0,.25);
    max-width: 340px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.stn-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem .8rem; border-bottom: 1px solid #e5eaf3;
    font-weight: 700; font-size: .85rem; color: #334155;
}
.stn-modal-body { padding: .8rem; display: flex; justify-content: center; }
.stn-cust-new-fold.is-open .stn-cust-new-grid { grid-template-rows: 1fr; }
.stn-cust-new-grid > * { overflow: hidden; }
.save-divider { border-top: 1px solid #d4e3f3; margin: .6rem 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---- ticket cleanup admin ---- */
.tc-hero {
    background: linear-gradient(135deg, #2f6bf2 0%, #4f46e5 52%, #7a3ced 100%);
    color: #fff; border-radius: 20px; padding: 1.5rem 1.8rem 1.2rem;
    margin-bottom: 1.2rem; position: relative; overflow: hidden;
    box-shadow: 0 22px 48px -16px rgba(37, 99, 235, .55);
}
.tc-hero::before {
    content: ""; position: absolute; right: -40px; top: -50px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,.15), transparent 70%);
    pointer-events: none;
}
.tc-hero-main { position: relative; z-index: 1; }
.tc-hero h2 { margin: 0 0 .5rem; font-size: 1.5rem; font-weight: 800; }
.tc-hero-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tc-hero .hstat {
    display: flex; flex-direction: column; gap: .04rem;
    min-width: 5.5rem; padding: .22rem .55rem;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px; backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.tc-hero .h-label { font-size: .55rem; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; color: rgba(255,255,255,.68); }
.tc-hero .h-val { font-size: .95rem; font-weight: 800; color: #fff; line-height: 1.1; }
.tc-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tc-filter-card { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.tc-filter-card .tc-filters { flex: 1 1 auto; }
.tc-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.tc-filters .field { min-width: 120px; }
.tc-filters .field label { font-size: .7rem; margin-bottom: .15rem; }
.tc-section-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .88rem; color: #1e3a8a; }
.tc-ticket { border: 1px solid #e5eaf3; border-radius: 10px; margin-bottom: .5rem; overflow: hidden; }
.tc-ticket-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; background: #f8fafc; cursor: pointer; transition: background .12s; }
.tc-ticket-head:hover { background: #f0f4fa; }
.tc-ticket-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .82rem; }
.tc-arrow { display: inline-block; width: 14px; font-size: .7rem; color: #64748b; transition: transform .15s; }
.tc-ticket-info { display: flex; flex-wrap: wrap; gap: .35rem .6rem; font-size: .72rem; color: #64748b; }
.tc-ticket-info b { color: #334155; }
.tc-entries { padding: 0; }
.tc-entries .table { margin: 0; font-size: .78rem; }
.tc-pager { display: flex; justify-content: center; gap: .3rem; margin-top: .7rem; }
.tc-page { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 .5rem; border: 1px solid #d4e3f3; border-radius: 6px; font-size: .78rem; font-weight: 600; color: #334155; text-decoration: none; background: #fff; transition: background .12s; }
.tc-page:hover { background: #f0f4fa; }
.tc-page.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tc-page.disabled { color: #94a3b8; border-color: transparent; cursor: default; }
.btn-danger { background: #dc2626; color: #fff; border: none; border-radius: 7px; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #f59e0b; color: #fff; border: none; border-radius: 7px; }
.btn-warning:hover { background: #d97706; }
.tirage-dropdown { position: relative; }

.tirage-dropdown-trigger {
    display: flex; align-items: center; gap: .55rem;
    min-height: 46px; padding: .45rem .8rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #fff; box-shadow: var(--shadow);
    cursor: pointer; user-select: none;
    transition: border-color .12s, box-shadow .12s;
}
.tirage-dropdown-trigger:hover { border-color: #c7d8f5; }
.tirage-dropdown.open .tirage-dropdown-trigger { border-color: var(--brand); box-shadow: var(--ring); }
.tirage-dropdown-trigger .chevron { margin-left: auto; color: var(--muted); transition: transform .18s; }
.tirage-dropdown.open .tirage-dropdown-trigger .chevron { transform: rotate(180deg); }

.tirage-dd-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.tirage-dd-chip {
    padding: .16rem .55rem; border-radius: 999px; color: #fff;
    font-size: .64rem; font-weight: 700; letter-spacing: .03em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.tirage-dd-label { color: var(--muted); font-size: .9rem; }
.tirage-dd-count {
    font-size: .72rem; font-weight: 700; color: var(--brand);
    background: #e9f0fe; border-radius: 999px; padding: .14rem .55rem;
    white-space: nowrap;
}

.tirage-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; padding: .3rem;
}
.tirage-dropdown.open .tirage-dropdown-menu { display: block; }
.tirage-dropdown-menu::-webkit-scrollbar { width: 8px; }
.tirage-dropdown-menu::-webkit-scrollbar-thumb { background: #dbe4f2; border-radius: 8px; }

.tirage-dd-opt {
    position: relative;
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .65rem; margin-bottom: 2px;
    border-radius: 9px; cursor: pointer;
    color: var(--fg); background: var(--bg);
    font-weight: 600; font-size: .8rem;
    transition: filter .1s, transform .06s;
}
.tirage-dd-opt:last-child { margin-bottom: 0; }
.tirage-dd-opt:hover { filter: brightness(1.09); }
.tirage-dd-opt:active { transform: scale(.995); }

.tirage-dd-opt .tirage-dd-input { display: none; }
.tirage-dd-check {
    width: 19px; height: 19px; flex-shrink: 0;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7);
    display: grid; place-items: center;
    font-size: .62rem; font-weight: 900; color: #fff;
    opacity: .55; transition: opacity .12s;
}
.tirage-dd-input:checked ~ .tirage-dd-check {
    opacity: 1; background: var(--grad); border-color: #fff;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35);
}
.tirage-dd-opt:has(.tirage-dd-input:checked) {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
}

.tirage-dd-name { color: inherit; }
.tirage-dd-name small { font-weight: 600; opacity: .72; margin-left: .28rem; font-size: .78em; }
.tirage-dd-meta { margin-left: auto; display: flex; align-items: center; gap: .45rem; font-size: .74rem; opacity: .85; white-space: nowrap; }
.tirage-dd-winner { font-weight: 700; font-variant-numeric: tabular-nums; }
.tirage-dd-opt .dot.on { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.tirage-dd-opt .dot.off { background: rgba(255, 255, 255, .55); box-shadow: none; }

.entry-row {
    display: grid;
    grid-template-columns: 1fr 1fr .9fr auto;
    gap: .7rem;
    align-items: end;
}
.entry-row select { min-width: 120px; }

.mod-line { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.mod-line .m-label { font-size: .82rem; font-weight: 700; color: #334155; margin-right: .15rem; }
.mod-pill {
    position: relative; display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; color: #475569; font-size: .8rem; font-weight: 700;
    cursor: pointer; user-select: none;
    transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.mod-pill input { display: none; }
.mod-pill .m-kbd { opacity: .5; font-size: .66rem; font-weight: 800; }
.mod-pill:hover { border-color: #b9cef2; background: #f8fafc; }
.mod-pill:active { transform: scale(.97); }
.mod-pill.active {
    background: var(--grad); border-color: transparent; color: #fff;
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .55);
}
.mod-pill.active .m-kbd { opacity: .85; color: #e2e8ff; }

.pending-list { max-height: 470px; overflow-y: auto; padding-right: 2px; }
.pending-list::-webkit-scrollbar { width: 8px; }
.pending-list::-webkit-scrollbar-thumb { background: #dbe4f2; border-radius: 8px; }

.pending-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: .6rem;
    align-items: center;
    padding: .5rem .6rem .5rem .7rem;
    border: 1px solid #e4ecf6;
    border-left: 3px solid transparent;
    border-radius: 11px;
    margin-bottom: .35rem;
    background: #fff;
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.95);
    transition: border-color .12s, box-shadow .12s, transform .06s;
}
.pending-item:hover { border-color: #d3dcec; border-left-color: var(--brand); box-shadow: var(--shadow); }
.pending-item .p-num { font-weight: 800; color: #0f1b33; font-size: .92rem; font-variant-numeric: tabular-nums; }
.pending-item .p-box {
    font-size: .64rem; font-weight: 800; letter-spacing: .05em;
    color: var(--brand); background: #e9f0fe;
    border-radius: 5px; padding: .08rem .4rem;
}
.pending-item .p-amt { font-weight: 700; text-align: right; }
.pending-item .icon-btn { padding: .15rem .45rem; font-size: .82rem; border-radius: 8px; color: var(--muted); }
.pending-item .icon-btn:hover { background: var(--danger-soft); color: var(--danger); border-color: #f6c2cc; }

.pending-item.flash-new { animation: slipFlash 1.8s ease; }
@keyframes slipFlash {
    0% { background: #e3edfd; box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); border-color: #b7cdf5; }
    100% { background: #fff; box-shadow: none; }
}

.limit-line { font-size: .8rem; color: var(--muted); margin-top: .3rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.limit-line .rl-num { color: #0f1b33; font-weight: 800; font-variant-numeric: tabular-nums; }
.limit-line .rl-box { font-size: .62rem; font-weight: 800; letter-spacing: .05em; color: var(--brand); background: #e9f0fe; border-radius: 5px; padding: .05rem .35rem; }
.limit-line .rl-cap { color: #475569; font-weight: 600; }
.limit-line .rl-left { font-weight: 800; }
.limit-line .rl-sep { opacity: .45; }
.limit-line .tirage-chip { padding: .12rem .45rem; border-radius: 999px; color: #fff; font-size: .66rem; font-weight: 700; }
.limit-ok { color: #047a58; }
.limit-near { color: var(--warning); }
.limit-over { color: var(--danger); font-weight: 700; }

.total-bar {
    display: flex; justify-content: space-between; align-items: center; gap: .6rem;
    border-top: 1px solid var(--border-soft); margin-top: .7rem; padding-top: .8rem;
}
.total-bar-left { display: flex; align-items: center; gap: .6rem; }
.total-bar-left .print-after-save { display: inline-flex; align-items: center; gap: .28rem; font-size: .74rem; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.total-bar-left .print-after-save input { accent-color: var(--brand); width: .9rem; height: .9rem; cursor: pointer; }
.total-bar-total { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; line-height: 1.1; }
.total-bar .amt { font-size: 1.4rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- dashboard hero */
.hero {
    position: relative; overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main time" "actions time";
    align-items: start; gap: .55rem 1.6rem;
    background: linear-gradient(135deg, #2f6bf2 0%, #4f46e5 52%, #7a3ced 100%);
    color: #fff;
    border-radius: 20px; padding: 1.5rem 1.8rem 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 22px 48px -16px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255,255,255,.18);
}
.hero::before {
    content: ""; position: absolute; right: -60px; top: -70px; width: 280px; height: 280px;
    background: radial-gradient(circle at center, rgba(255,255,255,.22), transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: ""; position: absolute; left: 20%; bottom: -110px; width: 300px; height: 300px;
    background: radial-gradient(circle at center, rgba(255,255,255,.09), transparent 68%);
    pointer-events: none;
    filter: blur(2px);
}
.hero-main { grid-area: main; position: relative; z-index: 1; }
.hero-kicker {
    display: inline-block; margin: 0 0 .3rem; font-size: .66rem; font-weight: 800; letter-spacing: .16em;
    text-transform: uppercase; color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    padding: .16rem .6rem; border-radius: 999px; backdrop-filter: blur(6px);
}
.hero-main h2 { margin: 0 0 .45rem; color: #fff; font-size: 1.68rem; letter-spacing: -.025em; font-weight: 800; text-shadow: 0 2px 14px rgba(15, 23, 42, .22); }
.hero-main p { margin: 0; color: rgba(255,255,255,.88); font-size: .9rem; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.hero-open {
    display: inline-flex; align-items: center; gap: .3rem;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px; padding: .16rem .7rem;
    font-weight: 700; font-size: .8rem; color: #fff;
    backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.hero-open.is-off { background: rgba(15, 23, 42, .25); }
.hero-open .dot.on { animation: livePulse 1.8s ease-out infinite; }
.hero-next {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.92);
}
.hero-next b { font-weight: 800; letter-spacing: .04em; }
.hero-next .t-countdown { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.hero-timeblock { grid-area: time; text-align: right; position: relative; z-index: 1; min-width: 10rem; }
.hero-clock {
    display: inline-block;
    font-variant-numeric: tabular-nums; font-size: 1.9rem; font-weight: 800;
    letter-spacing: -.02em; line-height: 1.1; color: #fff;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px; padding: .28rem .7rem;
    text-shadow: 0 2px 12px rgba(15, 23, 42, .3);
    backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.hero-date { margin-top: .3rem; font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.75); }
.hero-actions { grid-area: actions; display: flex; gap: .55rem; flex-wrap: wrap; position: relative; z-index: 1; }

/* station hero — tighter padding */
.hero-station { padding: .8rem 1rem .75rem; gap: .35rem 1rem; margin-bottom: .8rem; border-radius: 16px; }
.hero-station .hero-kicker { margin: 0 0 .15rem; padding: .1rem .5rem; font-size: .6rem; }
.hero-station .hero-main p { gap: .35rem; font-size: .82rem; }
.hero-station .hero-open { padding: .1rem .5rem; font-size: .75rem; }
.hero-station .hero-next { gap: .25rem; font-size: .75rem; }
.hero-station .hero-timeblock { min-width: 7rem; }
.hero-station .hero-clock { font-size: 1.5rem; padding: .18rem .5rem; border-radius: 10px; }
.hero-station .hero-date { margin-top: .15rem; font-size: .7rem; }

.stn-hero-stats { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; position: relative; z-index: 1; }
.hstat {
    display: flex; flex-direction: column; gap: .04rem;
    min-width: 5.5rem; padding: .22rem .55rem;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.hstat .h-label { font-size: .55rem; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; color: rgba(255,255,255,.68); }
.hstat .h-val { font-size: .95rem; font-weight: 800; letter-spacing: -.01em; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hstat .h-val.accent { color: #ffe08a; }
.hstat .hs-track { margin-top: .12rem; }

.hero-shift { margin-top: 1.1rem; max-width: 34rem; }
.hs-head { display: flex; align-items: baseline; gap: .55rem; margin-bottom: .5rem; flex-wrap: wrap; }
.hs-k { font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.hs-hours { font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.88); }
.hs-pct { margin-left: auto; font-size: .9rem; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(15,23,42,.35); }
.hs-track { position: relative; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: visible; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }
.hs-fill {
    position: absolute; inset: 0 auto 0 0; display: block;
    min-width: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,.55), #fff);
    box-shadow: 0 0 14px rgba(255,255,255,.55);
}
.hs-now {
    position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px;
    background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); z-index: 2; pointer-events: none;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .5); }
    70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
}

.btn-light { background: #fff; color: var(--brand-deep); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.9); }
.btn-light:hover { background: #f2f7ff; color: var(--brand-deep); box-shadow: 0 10px 24px -8px rgba(0,0,0,.42); transform: translateY(-1px); }
.btn-ghost-light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn-ghost-light:hover { background: rgba(255,255,255,.26); color: #fff; border-color: rgba(255,255,255,.45); transform: translateY(-1px); }

/* ------------------------------------------------- stat with icon */
.stat-row { display: flex; align-items: center; gap: .95rem; padding-right: 1.2rem; }
.stat-row .s-body { min-width: 0; flex: 1; }
.stat-row .value { white-space: nowrap; }
.s-ico {
    flex-shrink: 0;
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, #eef4ff, #e2ebfd); color: var(--brand);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px -3px rgba(37, 99, 235, .35);
}
.s-ico .ico { width: 20px; height: 20px; }
.stat.info .s-ico { background: linear-gradient(135deg, #f5f1fd, #ece4fb); color: var(--info); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px -3px rgba(124, 58, 237, .32); }
.stat.success .s-ico { background: linear-gradient(135deg, #eafaf3, #ddf6ea); color: var(--success); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px -3px rgba(5, 150, 105, .32); }
.stat.danger .s-ico { background: linear-gradient(135deg, #fdeff2, #fbe3e8); color: var(--danger); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px -3px rgba(225, 29, 72, .3); }
.stat.warning .s-ico { background: linear-gradient(135deg, #fdf5ea, #fbedd9); color: var(--warning); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 8px -3px rgba(217, 119, 6, .3); }

/* ------------------------------------------------- dashboard tirage status grid */
.tirage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .7rem; }
.tirage-card {
    position: relative; overflow: hidden;
    border: 1px solid #e2ebf6; border-radius: var(--radius); background: #fff;
    padding: .78rem .9rem .78rem 1.05rem; box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.95);
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tirage-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent-bg, #2563eb); }
.tirage-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tirage-card.is-open { border-color: #bfe6d4; background: linear-gradient(180deg, #f0faf5, #fff 58%); }
.tirage-card.is-soon { background: linear-gradient(180deg, #f7f4ff, #fff 62%); }
.tirage-card.is-closed { opacity: .78; }
.tirage-card .t-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; }
.tirage-card .t-name { font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: .35rem; min-width: 0; }
.tirage-card .t-code { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; margin: 0; white-space: nowrap; }
.tirage-card .t-hrs { color: #94a3b8; font-size: .68rem; font-weight: 600; margin-top: .18rem; }
.tirage-card .t-status { margin-top: .4rem; font-size: .74rem; font-weight: 700; color: var(--muted); }
.tirage-card .t-status.open { color: var(--success); }
.tirage-card .t-status.closed { color: #94a3b8; font-weight: 600; }
.t-countdown { display: inline-block; margin-left: .4rem; padding: .05rem .4rem; border-radius: 999px; background: #eef4ff; color: var(--brand); font-size: .68rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.t-countdown.soon { background: var(--warning-soft); color: var(--warning); }
.t-countdown.closing { background: var(--danger-soft); color: var(--danger); animation: cdPulse 1.1s ease-in-out infinite; }
@keyframes cdPulse { 50% { opacity: .55; } }
.t-track { height: 4px; background: #e2e8f0; border-radius: 999px; margin-top: .55rem; overflow: hidden; }
.t-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #34d399, var(--success)); border-radius: 999px; transition: width .6s linear; }
.t-fill.soon { background: linear-gradient(90deg, #fbbf24, var(--warning)); }
.t-fill.closing { background: var(--danger); }
.t-drawn { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; padding-top: .45rem; border-top: 1px dashed var(--border-soft); }

/* ------------------------------------------------- sparkline (7-day) */
.spark { display: flex; align-items: stretch; gap: .45rem; height: 158px; padding-top: .15rem; }
.spark .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .28rem; min-width: 0; }
.spark-track {
    flex: 1; width: 100%; max-width: 42px; min-height: 0;
    background: #eef2f9; border-radius: 9px 9px 5px 5px;
    display: flex; align-items: flex-end; overflow: hidden;
}
.spark .bar i {
    width: 100%; background: linear-gradient(180deg, #93c5fd, var(--brand));
    border-radius: 7px 7px 3px 3px; transition: height .35s ease;
    box-shadow: 0 8px 14px -8px rgba(37, 99, 235, .45);
}
.spark .bar.today i { background: var(--grad); }
.spark .bar b { font-size: .62rem; color: var(--muted); font-weight: 700; white-space: nowrap; min-height: .85em; }
.spark .bar small { font-size: .68rem; color: var(--muted); font-weight: 700; }
.spark .bar.today small { color: var(--brand); }

/* ------------------------------------------------- hourly area chart (today) */
.hour-chart { position: relative; }
.week-chart { position: relative; }
.hour-chart svg, .week-chart svg { display: block; width: 100%; height: auto; }
.hc-grid, .wk-grid { fill: none; stroke: #edf1f7; stroke-width: 1; stroke-dasharray: 3 4; }
.hc-area, .wk-area { fill: url(#hcGrad); stroke: none; }
.wk-area { fill: url(#wkGrad); }
.hc-line, .wk-line { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wk-line { stroke: var(--success); }
.hc-dot, .wk-dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.hc-dot.is-peak, .wk-dot.is-peak { fill: var(--brand); stroke: #dbe6fb; stroke-width: 3; }
.hc-dot.is-now { fill: var(--accent); stroke: #ede9fe; stroke-width: 3; }
.wk-dot.is-today { fill: var(--success); stroke: #d1fae5; stroke-width: 3; }
.hc-label, .wk-label { font-size: 11px; font-weight: 600; fill: #94a3b8; text-anchor: middle; }
.hc-label.is-now { fill: var(--accent); font-weight: 800; }
.wk-label.is-today { fill: var(--success); font-weight: 800; }
.hc-now {
    position: absolute; top: 0; bottom: 24px; width: 2px;
    background: linear-gradient(180deg, rgba(124, 58, 237, .0), rgba(124, 58, 237, .35), rgba(124, 58, 237, .0));
    pointer-events: none;
}
.hour-stats, .week-stats { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .5rem; }
.hour-stat {
    flex: 1 1 auto; min-width: 0;
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    background: #f8faff; padding: .45rem .6rem;
}
.hour-stat .hs-k { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; }
.hour-stat .hs-v { font-size: .92rem; font-weight: 800; color: var(--brand-deep); }
.hour-stat .hs-sub { font-size: .66rem; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------- rank list (top sellers) */
.rank-row { display: grid; grid-template-columns: auto auto minmax(0,1fr) minmax(0,.85fr) auto; gap: .55rem; align-items: center; }
.rank-pos { width: 22px; height: 22px; border-radius: 7px; background: #eef4ff; color: var(--brand); font-weight: 800; font-size: .74rem; display: grid; place-items: center; }
.rank-row:first-child .rank-pos { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.rank-row:nth-child(2) .rank-pos { background: #e2e8f0; color: #475569; }
.rank-row:nth-child(3) .rank-pos { background: #fde68a; color: #92400e; }
.rank-name { font-weight: 700; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name small { font-weight: 600; }
.rank-bar { height: 7px; border-radius: 999px; background: #eef2f9; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.rank-amt { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .85rem; }
.seller-ava {
    width: 28px; height: 28px; border-radius: 50%;
    background: #eef4ff; color: var(--brand);
    display: grid; place-items: center;
    font-size: .62rem; font-weight: 800; letter-spacing: .02em;
}
.rank-row:first-child .seller-ava { background: var(--grad); color: #fff; }

/* ------------------------------------------------- dashboard extras */
.dash .grid > .card + .card { margin-top: 0; }
.dash-board { margin-bottom: 1rem; }
.dash-mid { margin-bottom: 1rem; }
.dash-mid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-mid .card { min-width: 0; display: flex; flex-direction: column; }
.dash-mid .card .card-head { flex-shrink: 0; }
.dash-mid .card > .spark, .dash-mid .card > .hour-chart, .dash-mid .card > .week-chart { flex: 1; align-items: stretch; }
.dash-mid .card > .spark { align-items: flex-end; }
.dash-mid .hour-stats, .dash-mid .week-stats { margin-top: auto; }
.dash-kpis { align-items: stretch; }
.dash-kpi { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .85rem .95rem; align-items: center; padding-right: 1.15rem; }
.dash-kpi .s-body { min-width: 0; }
.dash-kpi .kpi-spark {
    grid-column: 1 / -1; height: 28px; display: flex; align-items: flex-end; gap: 3px; margin-top: .1rem;
    border-top: 1px dashed #e9eef6; padding-top: .35rem;
}
.dash-kpi .kpi-spark i { flex: 1; background: #dbeafe; border-radius: 4px 4px 1px 1px; min-height: 4px; }
.dash-kpi .kpi-spark i.on { background: var(--grad); box-shadow: 0 0 8px rgba(37, 99, 235, .28); }
.kpi-delta { margin-top: .28rem; font-size: .72rem; font-weight: 800; letter-spacing: .01em; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

.ball {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff 0%, #e8eef8 40%, #c7d2fe 100%);
    color: #0f1b33; font-weight: 800; font-size: .78rem;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 -2px 3px rgba(15, 27, 51, .12), 0 2px 4px rgba(15, 27, 51, .08);
}
.ball.sm { width: 20px; height: 20px; font-size: .62rem; }
.ball-empty { background: #f1f5f9; color: #94a3b8; box-shadow: none; font-weight: 600; }
.balls { display: inline-flex; gap: .2rem; }
.balls-p2 .ball { background: radial-gradient(circle at 32% 28%, #fff, #dbeafe 42%, #93c5fd 100%); }
.balls-p3 .ball { background: radial-gradient(circle at 32% 28%, #fff, #e0e7ff 42%, #a5b4fc 100%); }
.balls-p4 .ball { background: radial-gradient(circle at 32% 28%, #fff, #ede9fe 42%, #c4b5fd 100%); }
.balls-p5 .ball { background: radial-gradient(circle at 32% 28%, #fff, #ccfbf1 42%, #5eead4 100%); }

.draw-card {
    border: 1px solid #e2ebf6; border-radius: var(--radius); padding: .9rem 1rem;
    background: linear-gradient(180deg, #fbfcff, #fff);
    border-left: 4px solid var(--accent-bg, #2563eb);
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.95);
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.draw-card:hover { box-shadow: var(--shadow); border-color: #c3d6ef; transform: translateY(-1px); }
.draw-card .r-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; gap: .5rem; }
.draw-card .r-code { font-weight: 800; letter-spacing: .04em; color: #1e293b; display: inline-flex; align-items: center; gap: .45rem; }
.draw-card .r-code-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-bg, #2563eb); display: inline-block; box-shadow: 0 0 0 3px rgba(15, 30, 70, .08); }
.draw-card .r-entered { font-size: .72rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.draw-card .r-sub { margin-bottom: .5rem; }
.draw-rows { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .9rem; }
.draw-row { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.draw-lab { font-size: .62rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); width: 1.5rem; flex-shrink: 0; }
.head-tools { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.chip-count {
    font-size: .68rem; font-weight: 800; letter-spacing: .03em; font-variant-numeric: tabular-nums;
    background: #eef4ff; color: var(--brand-deep); border: 1px solid #dbe7fb;
    border-radius: 999px; padding: .18rem .6rem; white-space: nowrap;
}
.chip-count.chip-await { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.dash-pending { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding-top: .35rem; }
.punk { text-transform: uppercase; letter-spacing: .08em; font-size: .6rem; font-weight: 800; color: var(--muted); margin-right: .15rem; }
.pd-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #fff; border: 1px dashed #d8e0ea; border-radius: 999px;
    padding: .14rem .65rem; font-size: .72rem; font-weight: 700; color: #475569;
}
.pd-chip em { font-style: normal; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.tix-feed { display: flex; flex-direction: column; }
.tix-feed-row {
    display: flex; justify-content: space-between; align-items: center; gap: .6rem;
    padding: .6rem .5rem; border-bottom: 1px solid var(--border-soft);
    text-decoration: none !important; color: inherit; border-radius: 10px;
    transition: background .12s;
}
.tix-feed-row:last-child { border-bottom: none; }
.tix-feed-row:hover { background: #e7eef7; }
.tix-zebra { background: #f7fafe; }
.tix-zebra:hover { background: #eef3fa; }
.tix-feed-main { display: flex; flex-direction: column; gap: .22rem; min-width: 0; }
.tix-feed-top { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.tix-feed-id { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand); font-size: .95rem; }
.tix-plays {
    font-size: .66rem; font-weight: 800; letter-spacing: .02em; color: var(--accent-deep, #6d28d9);
    background: #f5f3ff; border: 1px solid #e9e5ff; border-radius: 999px; padding: .06rem .5rem;
}
.tix-codes { display: flex; gap: .3rem; flex-wrap: wrap; min-width: 0; }
.tix-code {
    font-style: normal; font-size: .66rem; font-weight: 800; letter-spacing: .06em;
    color: var(--brand-deep); background: #eef4ff; border-radius: 6px; padding: .08rem .4rem;
}
.tix-cust {
    font-size: .74rem; font-weight: 700; color: #334155;
    border: 1px solid var(--border-soft); border-radius: 8px; padding: .05rem .45rem;
    display: inline-flex; align-items: center; gap: .25rem;
}
.tix-cust::before { content: "\1F464"; font-size: .72rem; }
.tix-feed-meta { font-size: .78rem; color: #6b839e; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tix-feed-side { display: flex; flex-direction: column; align-items: flex-end; gap: .28rem; flex-shrink: 0; }
.tix-feed-amt { font-variant-numeric: tabular-nums; font-weight: 800; font-size: .95rem; }

.draw-split-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center; gap: .7rem;
    padding: .3rem 0;
}
.draw-split-row + .draw-split-row { border-top: 1px dashed #edf1f7; }
.dsr-code { font-weight: 800; letter-spacing: .05em; font-size: .86rem; color: #1e293b; min-width: 3.2rem; }
.dsr-track { height: 8px; background: #eef3f9; border-radius: 999px; overflow: hidden; }
.dsr-track i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.dsr-tix { font-size: .76rem; font-weight: 800; color: #475569; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------- ticket management page */
.tcr-sub-pills { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.tcr-pill {
    display: inline-flex; align-items: center;
    background: #eef4ff; color: var(--brand-deep); border-radius: 999px;
    padding: .14rem .65rem; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
}
.tix-head { align-items: flex-start; }
.tix-head h2 { font-size: 1.55rem; }
.tix-scope { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.tix-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    background: #fff; border: 1px solid var(--border-soft);
    border-radius: 999px; padding: .22rem .75rem .22rem .65rem;
    box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; color: #0f1b33;
}
.tix-chip-k {
    font-size: .62rem; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted);
}
.tix-chip.is-owner { background: var(--grad); color: #fff; border-color: transparent; }
.tix-chip.is-owner .tix-chip-k { color: rgba(255,255,255,.72); }
.tix-chip.is-admin { background: #e9f0fe; color: var(--brand-deep); border-color: #d5e3fb; }
.tix-chip.is-admin .tix-chip-k { color: var(--brand); }
.tix-chip.is-member { background: #f1f5f9; color: #334155; }
.tix-chip.is-live { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.tix-chip.is-live .tix-chip-k { color: #059669; }
.tix-chip.is-live .dot.on { animation: livePulse 1.8s ease-out infinite; }
.tix-chip .dot { margin-right: 0; }
.tcr-filters .field { min-width: 120px; }
.tix-num {
    font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
    text-decoration: none !important; color: var(--brand);
    min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block;
}
.tix-num:hover { color: var(--brand-dark); }
.tix-go { display: none; margin-left: .2rem; font-weight: 700; color: #94a3b8; }
.tix-code-pill {
    display: inline-block; margin: 0 .22rem 0 0; padding: .1rem .45rem;
    border-radius: 999px; background: #eef2f9; color: #475569;
    font-size: .68rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
}
.tix-count {
    display: inline-grid; place-items: center; min-width: 26px; height: 22px;
    border-radius: 999px; background: var(--brand); color: #fff;
    font-size: .72rem; font-weight: 800; padding: 0 .35rem;
}
.tix-amt { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.tix-date-short { display: none; }
.center { text-align: center; }
th.center { text-align: center; }

.tix-list {
    background: #fff; border: 1px solid #d4e3f3;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px -2px rgba(16, 38, 71, .06); overflow: hidden;
}
.tix-list-head, .tix-list-row {
    display: grid;
    grid-template-columns: minmax(10.5rem, 13.5rem) minmax(5.5rem, 8.5rem) minmax(0, 1.2fr) 2.4rem 5.2rem 5rem 7.2rem auto;
    gap: .65rem; align-items: center;
    padding: 0 .9rem; min-height: 52px;
}
.tix-list-head {
    background: linear-gradient(180deg, #f5f9fd 0%, #eef4fb 100%);
    border-bottom: 2px solid #d4e3f3;
    color: #3b4c6b; font-size: .66rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .09em; min-height: 40px;
    position: relative;
}
.tix-list-head::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--grad);
}
.tix-list-row {
    border-bottom: 1px solid #edf1f7; font-size: .88rem;
    border-left: 3px solid transparent;
    transition: background .15s, border-left-color .15s, box-shadow .15s;
}
.tix-list-row:last-child { border-bottom: none; }
.tix-list-row:hover { background: #f2f7fd; border-left-color: var(--brand); box-shadow: inset 0 0 0 9999px rgba(37,99,235,.02); }
.tix-row-paid { background: #fbfefc; border-left-color: #86d9ad; }
.tix-row-paid:nth-child(even) { background: #f4fbf6; }
.tix-row-paid:hover { background: #eaf8ef; border-left-color: var(--success); }
.tix-row-unpaid { background: #fffdfa; border-left-color: #f5c56b; }
.tix-row-unpaid:nth-child(even) { background: #fdf8ee; }
.tix-row-unpaid:hover { background: #fff4e0; border-left-color: #e0952a; }
.tix-num {
    font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
    text-decoration: none !important; color: var(--brand);
    min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block;
    padding: .2rem .55rem; border-radius: 7px; background: #eef4ff;
    transition: background .15s, color .15s;
}
.tix-num:hover { background: #dbe8fc; color: var(--brand-dark); }
.tix-go { display: none; margin-left: .2rem; font-weight: 700; color: #94a3b8; }
.tix-seller { font-weight: 600; color: #3b4c6b; }
.tix-code-pill {
    display: inline-block; margin: 0 .22rem 0 0; padding: .12rem .5rem;
    border-radius: 999px; background: #eef2f9; color: #475569;
    font-size: .68rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
    border: 1px solid #d8e3f0;
}
.tix-count {
    display: inline-grid; place-items: center; min-width: 26px; height: 22px;
    border-radius: 999px; background: var(--grad); color: #fff;
    font-size: .72rem; font-weight: 800; padding: 0 .4rem;
    box-shadow: 0 2px 6px -2px rgba(37, 99, 235, .35);
}
.tix-amt { font-weight: 800; white-space: nowrap; color: var(--brand-deep); font-variant-numeric: tabular-nums; font-size: .95rem; }
.tix-status-cell { white-space: nowrap; }
.tix-date-short { display: none; }
.tix-c-user, .tix-c-tirage, .tix-c-date {
    overflow: hidden; text-overflow: ellipsis; min-width: 0; white-space: nowrap;
}
.tix-c-act { justify-self: end; }
.tix-actions { display: inline-flex; flex-wrap: nowrap; gap: .28rem; align-items: center; }
.tix-actions form { display: inline; margin: 0; }
.tix-actions .btn { padding: .22rem .48rem; font-size: .72rem; }

.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .9rem 1rem; border-top: 1px solid var(--border-soft); }
.pag { display: inline-flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.pag .btn.disabled { opacity: .5; pointer-events: none; }
.pag-gap { color: var(--muted); padding: 0 .2rem; user-select: none; }
.segmented { display: inline-flex; gap: .15rem; padding: .15rem; background: var(--surface); border: 1px solid var(--border-soft); border-radius: .5rem; }
.segmented .btn { border-radius: .35rem; }
.danger-zone {
    padding: .8rem 1rem; border: 1.5px dashed #f5a0b0; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #fef2f2 0%, #fdf0f0 100%);
}
truncate, .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }

/* ---- customer add / edit forms ---- */
.cus-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .8rem; align-items: end; margin-top: .2rem; }
.cus-form .field { min-width: 0; }
.cus-form .cus-span { grid-column: auto; }
.cus-form .cus-actions { grid-column: auto; display: flex; justify-content: flex-end; gap: .5rem; }
.cus-form label {
    display: block; font-size: .7rem; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: #64748b; margin-bottom: .3rem;
}
.cus-form input, .cus-form-inline input, .cus-form select {
    width: 100%; min-height: 40px; padding: .4rem .7rem; border-radius: 9px;
    background: #fbfdff;
}
.cus-form input:focus, .cus-form-inline input:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); background: #fff;
}
.cus-form-inline { display: flex; gap: .7rem; align-items: flex-end; flex-wrap: wrap; margin-top: .2rem; }
.cus-form-inline .field { flex: 1 1 220px; min-width: 0; }
.cus-form-inline label {
    display: block; font-size: .7rem; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: #64748b; margin-bottom: .3rem;
}
.cus-form-inline .cus-actions-inline { flex: 0 0 auto; }
@media (max-width: 640px) { .cus-form { grid-template-columns: 1fr; } }

.cus-add-card { padding: 0; overflow: hidden; }
.cus-add-summary {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .9rem 1.1rem; cursor: pointer; user-select: none;
    background: linear-gradient(135deg, #f8faff 0%, #f0f5fb 100%);
}
.cus-add-summary:hover { background: #eef5fd; }
.cus-add-title {
    display: inline-flex; align-items: center; gap: .5rem;
    font-weight: 800; font-size: .95rem; color: #0f1b33; letter-spacing: -.01em;
}
.cus-add-title .ico { width: 16px; height: 16px; color: var(--brand); }
.cus-chev { width: 18px; height: 18px; color: #64748b; transition: transform .2s ease; }
.cus-add-card[open] .cus-chev { transform: rotate(180deg); }
.cus-add-card > form.cus-form,
.cus-add-card > .cus-form { padding: .2rem 1.1rem 1.1rem; }
.cus-danger { display: flex; justify-content: flex-start; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed #f0c8d0; }

/* customer list — matches the tickets list styling */
.cus-list-wrap {
    background: #fff; border: 1px solid #d4e3f3; border-radius: var(--radius);
    box-shadow: 0 2px 10px -2px rgba(16, 38, 71, .06); overflow-x: auto;
}
.cus-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 720px; }
.cus-table thead th {
    position: relative; text-align: left; white-space: nowrap;
    padding: .6rem .85rem; min-height: 40px;
    background: linear-gradient(180deg, #f5f9fd 0%, #eef4fb 100%);
    border-bottom: 2px solid #d4e3f3;
    color: #3b4c6b; font-size: .66rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .09em;
}
.cus-table thead th:first-child::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--grad);
}
.cus-table thead th.right { text-align: right; }
.cus-table tbody td { padding: .62rem .85rem; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
.cus-table tbody td.right { text-align: right; font-variant-numeric: tabular-nums; }
.cus-table tbody tr { border-left: 3px solid transparent; transition: background .15s, border-left-color .15s; }
.cus-table tbody tr:nth-child(even) { background: #fafcff; }
.cus-table tbody tr:last-child td { border-bottom: none; }
.cus-table tbody tr:hover { background: #f2f7fd; border-left-color: var(--brand); }
.cus-table tbody td:first-child { font-weight: 800; }
.cus-table tbody td:first-child a { color: var(--brand); text-decoration: none; }
.cus-table tbody td:first-child a:hover { color: var(--brand-dark); }
.cus-table .tix-count { margin-left: .15rem; }

/* ---- financial report ---- */
.fin-filters { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; }
.fin-filters .field { min-width: 150px; flex: 1 1 150px; }
.fin-filters label { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #64748b; margin-bottom: .28rem; }
.fin-filters input[type=date], .fin-filters select { min-height: 38px; border-radius: 9px; }
.fin-filters .fin-filters-go { display: flex; gap: .5rem; align-items: flex-end; }
.fin-kpis { margin-bottom: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: .85rem; }
.fin-kpis .stat { padding: .85rem .95rem; }
/* keep large money amounts inside the cards */
.fin-kpis .stat-row { gap: .6rem; padding-right: 0; }
.fin-kpis .s-ico { width: 34px; height: 34px; border-radius: 10px; }
.fin-kpis .s-ico .ico { width: 17px; height: 17px; }
.fin-kpis .stat .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-kpis .stat .value {
    font-size: clamp(.9rem, .35vw + .78rem, 1.2rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.fin-table-wrap { border: 1px solid #e2ebf6; border-radius: 12px; overflow-x: auto; }
.fin-table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 380px; }
.fin-table thead th { text-align: left; padding: .55rem .75rem; background: linear-gradient(180deg, #f5f9fd, #eef4fb); border-bottom: 2px solid #d4e3f3; color: #3b4c6b; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.fin-table thead th.right { text-align: right; }
.fin-table tbody td { padding: .55rem .75rem; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
.fin-table tbody td.right { text-align: right; font-variant-numeric: tabular-nums; }
.fin-table tbody tr:last-child td { border-bottom: none; }
.fin-table tbody tr:nth-child(even) { background: #fafcff; }
.fin-table tbody tr:hover { background: #f2f7fd; }
.fin-table tfoot td { padding: .6rem .75rem; font-weight: 800; border-top: 2px solid #d4e3f3; background: #f8fafc; }
.fin-table tfoot td.right { text-align: right; font-variant-numeric: tabular-nums; }
.fin-name { font-weight: 700; color: #0f1b33; }
.fin-net { font-variant-numeric: tabular-nums; }
.fin-net.pos { color: #0b7a4b; }
.fin-net.neg { color: #b91c1c; }
.fin-grid { align-items: stretch; }
.fin-grid > .card { display: flex; flex-direction: column; }
.fin-grid > .card > .fin-table-wrap { flex: 1 1 auto; }

/* ---- daily closeout ---- */
.co-head-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.co-picker { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.co-picker select, .co-picker input[type=date] { min-height: 36px; border-radius: 9px; }
.co-kpis { margin-bottom: 1.1rem; }
.co-brief { margin-top: .9rem; }
.co-legend { display: flex; gap: 1rem; margin: .2rem 0 .35rem; flex-wrap: wrap; }
.co-key { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: #475569; }
.co-sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-exp { background: var(--brand); }
.sw-dec { background: var(--success); }
.co-chart { width: 100%; overflow-x: auto; }
.co-chart svg { width: 100%; height: auto; min-width: 460px; display: block; }
.co-bar { opacity: .92; transition: opacity .15s; }
.co-bar:hover { opacity: 1; }
.co-exp { fill: var(--brand); }
.co-dec { fill: var(--success); }
.co-grid { stroke: #eef2f7; stroke-width: 1; }
.co-base { stroke: #cbd5e1; stroke-width: 1; }
.co-axis { fill: #94a3b8; font-size: 10px; font-family: var(--font, system-ui); }
.co-roster-card .fin-table { min-width: 760px; }
.co-row-active { background: #eef4ff !important; }
.co-row-active:hover { background: #e6eefc !important; }

/* ---- balance cash-flow chart ---- */
.bc-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: .5rem; }
.bc-key { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: #475569; }
.bc-key i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.bc-chart { width: 100%; overflow-x: auto; }
.bc-chart svg { width: 100%; height: auto; min-width: 520px; display: block; }
.bc-grid { stroke: #eef2f7; stroke-width: 1; }
.bc-zero { stroke: #cbd5e1; stroke-width: 1; stroke-dasharray: 3 3; }
.bc-axis { fill: #94a3b8; font-size: 10px; font-family: var(--font, system-ui); }
.bc-line { stroke-linejoin: round; stroke-linecap: round; }
.bc-pt { opacity: 0; }
.bc-chart:hover .bc-pt { opacity: 1; }

.bal-action { display: inline-flex; align-items: center; gap: .25rem; flex-wrap: nowrap; }
.bal-action input { width: 72px; flex-shrink: 0; padding: .28rem .4rem; font-size: .78rem; }
.bal-action .btn { padding: .28rem .45rem; font-size: .72rem; }
.bal-table { min-width: 820px; font-size: .8rem; }
.bal-table th, .bal-table td { white-space: nowrap; padding: .45rem .55rem; }
.bal-table th:first-child, .bal-table td:first-child { padding-left: .75rem; }
.bal-table th:last-child, .bal-table td:last-child { position: sticky; right: 0; background: var(--panel); z-index: 2; box-shadow: -2px 0 6px rgba(0,0,0,.04); padding-right: .75rem; }
.bal-table tbody tr:hover td:last-child { background: #f6f8fd; }
table td .pos { color: var(--success); }
table td .neg { color: var(--danger); }

.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 23, 42, .55);
    display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); width: 100%; max-width: 460px; padding: 1.2rem;
}
.modal-box h3 { margin: 0 0 .8rem; font-size: 1.1rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }

.tix-pager { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; }
.tix-pager .page-btn {
    display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 .5rem;
    background: #fff; border: 1.5px solid #d4e3f3; border-radius: 8px;
    font-size: .78rem; font-weight: 700; color: #334155; text-decoration: none !important;
    transition: all .15s;
}
.tix-pager .page-btn:hover { border-color: var(--brand); color: var(--brand); background: #f0f5fb; }
.tix-pager .page-btn.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px -3px rgba(37, 99, 235, .40); }
.tix-pager .ellipsis { color: #94a3b8; padding: 0 .2rem; }

@media (max-width: 1080px) {
    .tix-list-head, .tix-list-row {
        grid-template-columns: minmax(10.5rem, 13.5rem) minmax(0, 1.3fr) 5.2rem 5rem 7rem auto;
    }
    .tix-c-user, .tix-c-count { display: none; }
}
@media (max-width: 760px) {
    .tix-list-head { display: none; }
    .tix-list-row {
        grid-template-columns: minmax(0, 1fr) auto auto auto;
        min-height: 48px; padding: 0 .75rem; gap: .4rem;
    }
    .tix-c-user, .tix-c-tirage, .tix-c-count, .tix-c-act { display: none; }
    .tix-date-full { display: none; }
    .tix-date-short { display: inline; }
    .tix-go { display: inline; }
    .tix-list { border-radius: 12px; }
}

/* ------------------------------------------------- station step header */
.steps-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .85rem; }
.steps-line .step {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #f1f5f9; border-radius: 999px; padding: .2rem .65rem .2rem .25rem;
    font-size: .78rem; font-weight: 700; color: #475569;
}
.steps-line .step b {
    width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    background: var(--grad); color: #fff; font-size: .7rem; font-weight: 800;
}
.steps-line .step-arrow { color: #cbd5e1; font-size: .8rem; }
.steps-line .shortcuts { margin-left: auto; display: inline-flex; align-items: center; gap: .28rem; white-space: nowrap; }
.steps-line .shortcuts .kbd { margin-left: .1rem; }

/* ------------------------------------------------- dashboard split */
.dash-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }

/* ------------------------------------------------- ticket-card as a receipt */
.ticket-card { position: relative; }
.ticket-card .save-box { border-top: 1.5px dashed var(--border); }
#entry-number {
    font-size: 1.25rem; font-weight: 800; letter-spacing: .14em;
    font-variant-numeric: tabular-nums; text-transform: uppercase;
    height: 46px; padding: 0 .9rem; text-align: center;
}
#entry-number::placeholder { font-size: .95rem; letter-spacing: .04em; font-weight: 600; }
.bet-num-field { margin-bottom: 0; }
.bet-num-field > label { display: flex; align-items: center; gap: .45rem; }
.bet-row { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(110px, 150px) auto; gap: .7rem; align-items: end; }
.bet-row .field { min-width: 0; }
.bet-row #entry-amount { height: 38px; padding: 0 .75rem; font-size: 16px; font-weight: 800; }
.bet-row #add-entry { height: 38px; padding-inline: 1rem; }
.station-entry-card #entry-number,
.station-entry-card .bet-row #entry-amount,
.station-entry-card .bet-row #add-entry { height: 34px; }
.num-hint { margin: .5rem 0 0; font-size: .76rem; color: var(--muted); min-height: 1.1em; transition: color .12s; }
.num-hint code { background: #f1f5f9; border-radius: 5px; padding: 0 .3rem; font-size: .95em; }
.num-hint.ok { color: var(--success); font-weight: 600; }
.num-hint.err { color: var(--danger); font-weight: 700; }
.cat-badge {
    display: inline-block; padding: .06rem .5rem; border-radius: 999px;
    background: var(--info-soft); color: var(--info);
    font-size: .64rem; font-weight: 800; letter-spacing: .06em; vertical-align: 1px;
}
#entry-amount { font-weight: 700; }
.sales-pill { margin: 0; min-width: 150px; }

.bet-kbd { display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; margin-top: .45rem; font-size: .68rem; color: var(--muted); }
.bet-kbd .kbd { margin: 0 .05rem; }
.bet-kbd-step { display: inline-flex; align-items: center; gap: .15rem; white-space: nowrap; }
.mod-help { display: flex; flex-wrap: wrap; gap: .15rem .8rem; margin-top: .3rem; font-size: .66rem; color: var(--muted); }
.mod-help .kbd { margin: 0 .1rem; }
.mh-t { display: inline-flex; align-items: center; white-space: nowrap; }
.entry-help-toggle {
    display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
    margin-top: .35rem; padding: .12rem .5rem; border: 0; border-radius: 6px;
    background: transparent; color: var(--info); font-size: .68rem; font-weight: 700;
}
.entry-help-toggle:hover { background: var(--info-soft); }
.entry-help-toggle .ico { width: .72rem; height: .72rem; transition: transform .15s; }
.entry-help-toggle.is-open .ico { transform: rotate(-180deg); }
.entry-help-panel {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease, padding .3s ease, border-color .3s ease;
    margin-top: .3rem; padding: 0 .55rem; border: 1px solid transparent;
    border-radius: 8px; background: #f8fafc;
    overflow: hidden;
}
.entry-help-panel.is-open { grid-template-rows: 1fr; padding: .4rem .55rem; border-color: #e5eaf3; }
.entry-help-panel .help-inner { overflow: hidden; }
.entry-help-panel .mod-help { margin-top: 0; }
.help-format { margin: .3rem 0 0; font-size: .68rem; color: var(--muted); }
.help-format code { background: #eef2f8; border-radius: 4px; padding: 0 .28rem; font-size: .95em; }

/* ---- station: grouped pending slip ---- */
.pending-group { margin-bottom: .5rem; }
.pending-group:last-child { margin-bottom: 0; }
.pending-group-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .28rem .4rem .3rem;
}
.pending-group-head .tirage-chip {
    padding: .18rem .55rem; border-radius: 999px; color: #fff;
    font-size: .7rem; font-weight: 700; letter-spacing: .03em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.pending-group-head .pg-count { font-size: .66rem; font-weight: 700; color: var(--muted); }
.pending-group-head .pg-sub { font-size: .72rem; font-weight: 800; color: #475569; margin-left: auto; }
.pending-group .pending-item { margin-bottom: .35rem; border-left: 3px solid transparent; }
.pending-group .pending-item:hover { border-left-color: var(--brand); }

.stn-head { align-items: flex-start; }
.stn-head h2 { font-size: 1.55rem; }
.stn-head-side { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.stn-sales {
    display: flex; flex-direction: column; align-items: flex-end; gap: .1rem;
    background: #fff; border: 1px solid var(--border-soft);
    border-radius: 14px; padding: .5rem 1rem; box-shadow: var(--shadow);
    min-width: 140px;
}
.stn-sales .label { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stn-clock { font-weight: 800; }
.station-tools-card {
    padding: .5rem .65rem .55rem;
    background: linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
}
.station-tools-card > .card-head { margin-bottom: .3rem; }
.station-tools-card > .card-head h3 { font-size: .86rem; }
.stn-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.stn-tool {
    display: flex; flex-direction: column; gap: .25rem;
    padding: .4rem .5rem;
    border: 1px solid #d4e3f3;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8faff 0%, #f0f5fb 100%);
}
.stn-tool > label { display: flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; color: #334155; }
.stn-tool > label .ico { width: 12px; height: 12px; color: var(--brand); }
.stn-tool-row { display: flex; gap: .35rem; align-items: stretch; }
.stn-tool-row input { flex: 1; min-width: 0; height: 26px; padding: 0 .4rem; font-size: .78rem; border-radius: 7px; }
.stn-tool-row .btn { height: 26px; padding: 0 .45rem; font-size: .72rem; flex-shrink: 0; border-radius: 7px; }
#check-result:not(:empty) { margin-top: .45rem; }
.stn-reload-line { display: flex; align-items: center; gap: .4rem; flex: 0 1 auto; margin: 0; }
.stn-reload-line input { flex: 0 0 140px; width: 140px; min-width: 64px; height: 26px; padding: 0 .45rem; font-size: .78rem; border-radius: 7px; }
.stn-reload-line .btn { height: 26px; padding: 0 .55rem; font-size: .72rem; flex-shrink: 0; border-radius: 7px; }
.stn-last-label { display: flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; color: #334155; }
.stn-last-label .ico { width: 12px; height: 12px; color: var(--brand); }
.stn-last-label .badge { margin-left: auto; }
.stn-tool-last .stn-last { background: #fff; }
.stn-tool-last.is-win { border-color: #bfe6d4; background: linear-gradient(135deg, #f3fbf7 0%, #eefaf3 100%); }
.stn-tool-last.is-win .stn-last { background: #e8f6ef; border-color: #bfe6d4; }
.stn-slip-empty {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    padding: 2.1rem 1rem;
    background: linear-gradient(135deg, #f8faff 0%, #f4f7fb 100%);
    border: 1.5px dashed #d4e3f3; border-radius: var(--radius);
}
.stn-slip-empty .ico { width: 28px; height: 28px; color: var(--brand); opacity: .7; }
.stn-slip-empty b { color: #334155; }
.stn-slip-empty small { color: var(--muted); font-size: .78rem; }
.stn-preview { margin: .5rem 0 0; border: 1px solid #d4e3f3; border-radius: var(--radius-sm); background: #fff; }
.stn-preview-inner { padding: .5rem .6rem; font-family: "JetBrains Mono", monospace; font-size: .72rem; }
.stn-preview-header { text-align: center; font-weight: 700; margin-bottom: .25rem; }
.stn-preview-divider { border-top: 1px dashed #999; margin: .25rem 0; }
.stn-preview-tirage { font-weight: 700; margin-bottom: .1rem; }
.stn-preview-row { display: flex; justify-content: space-between; padding: .05rem 0; }
.stn-preview-flag { font-size: .6rem; color: #666; }
.stn-preview-total { display: flex; justify-content: space-between; font-weight: 800; font-size: .78rem; }
.stn-preview-footer { text-align: center; margin-top: .3rem; font-size: .6rem; color: #555; }
.tk-head-actions { display: flex; align-items: center; gap: .4rem; }
.stn-sales b { font-size: 1.2rem; color: var(--brand); font-weight: 800; line-height: 1.15; }
.stn-last {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    padding: .4rem .5rem;
    background: linear-gradient(135deg, #f8faff 0%, #f0f5fb 100%);
    border: 1px solid #d4e3f3; border-radius: 10px;
}
.stn-last-num { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .95rem; color: var(--brand); }
.stn-last p { margin: 0; }

.tix-filters { margin-bottom: 1rem; }
.tix-filters-main, .tix-filters-adv {
    display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end;
}
.tix-filters-main .field, .tix-filters-adv .field { min-width: 140px; flex: 1 1 150px; }
.tix-filters .field label {
    display: block; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: #64748b; margin-bottom: .28rem;
}
.tix-filters .field input, .tix-filters .field select {
    min-height: 38px; border-radius: 9px; font-size: .84rem;
}
.tix-filters .field input:focus, .tix-filters .field select:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); background: #fff;
}
.tix-filters-go { display: flex; gap: .5rem; align-items: flex-end; }
.tix-filters-go .btn { min-height: 38px; border-radius: 9px; padding: 0 .95rem; }
.tix-filters-adv {
    margin-top: .75rem; padding: .9rem;
    background: linear-gradient(135deg, #f8faff 0%, #f1f6fd 100%);
    border: 1px solid #e2ebf6; border-radius: 12px;
}
.tix-filters-more { margin-top: .85rem; border-top: 1px dashed #dbe6f2; padding-top: .75rem; }
.tix-filters-more summary {
    cursor: pointer; font-weight: 800; font-size: .78rem; color: var(--brand-deep);
    list-style: none; display: inline-flex; align-items: center; gap: .35rem;
    padding: .32rem .8rem; border: 1px solid #d7e6fb; border-radius: 999px;
    background: #eef4ff; transition: background .15s, border-color .15s;
}
.tix-filters-more summary:hover { background: #e2eefc; border-color: #bcd6f6; }
.tix-filters-more summary::-webkit-details-marker { display: none; }
.tix-filters-more summary::after { content: "▾"; font-size: .7rem; margin-left: .2rem; transition: transform .2s ease; }
.tix-filters-more[open] summary::after { transform: rotate(180deg); }
.tix-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1rem; }

.tk-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ tirage management */
.stn-auto-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 1rem; padding: .4rem 0;
}
.stn-auto-label {
    display: inline-flex; align-items: center; gap: .4rem;
    font-weight: 700; color: var(--brand-dark);
}
.stn-auto-btn {
    border: none; border-radius: 999px; padding: .3rem 1rem;
    font-weight: 700; font-size: .82rem; letter-spacing: .06em;
    cursor: pointer; min-width: 60px; color: #fff;
    transition: all .18s ease;
}
.stn-auto-btn.is-off {
    background: #6b7e8f;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
}
.stn-auto-btn.is-on {
    background: linear-gradient(180deg, #1074c6, #0a5e85);
    box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 0 0 3px rgba(16,116,198,.18);
}
.stn-auto-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.stn-auto-btn:active { transform: translateY(1px); }
.stn-auto-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.tirage-color-dot {
    display: inline-block; width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid #e2e8f0; vertical-align: middle;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.tirage-time { font-weight: 600; white-space: nowrap; }

.tirage-modal {
    display: none; position: fixed; inset: 0; z-index: 99;
    background: rgba(12, 26, 51, .55); align-items: center; justify-content: center;
    animation: fadeIn .15s ease;
}
.tirage-modal.is-open { display: flex; }
.tirage-modal-card {
    width: min(480px, 95vw); max-height: 90vh; overflow-y: auto;
    position: relative; animation: slideUp .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.tk-head-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.tk-show { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); align-items: start; }
.tk-lines { display: flex; flex-direction: column; gap: .45rem; }
.tk-line {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: .55rem; align-items: center;
    padding: .55rem .65rem; border: 1px solid var(--border-soft);
    border-radius: 12px; background: #fff;
}
.tk-line.is-win { border-color: #bfe6d4; background: #f3fbf7; }
.tk-line-num { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; min-width: 0; }
.tk-line .p-num { font-weight: 800; font-variant-numeric: tabular-nums; color: #0f1b33; font-size: .95rem; }
.tk-line .p-box {
    font-size: .64rem; font-weight: 800; letter-spacing: .05em;
    color: var(--brand); background: #e9f0fe; border-radius: 5px; padding: .08rem .4rem;
}
.tk-line .p-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-line .tirage-chip {
    padding: .18rem .55rem; border-radius: 999px; color: #fff;
    font-size: .7rem; font-weight: 700; letter-spacing: .03em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.tk-meta { margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.tk-meta > div { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: .4rem; font-size: .88rem; }
.tk-meta dt { margin: 0; color: var(--muted); font-weight: 600; }
.tk-meta dd { margin: 0; }
.tk-link { margin-top: 1rem; display: flex; flex-direction: column; gap: .32rem; }
.tk-link-unpaid { margin-top: .55rem; }
.tk-edit { max-width: 920px; }

/* ------------------------------------------------------------------ misc */
.page-head {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    margin-bottom: 1.2rem; flex-wrap: wrap;
    padding: .85rem 1.15rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f1fc 40%, #f7f9fd 100%);
    border: 1px solid #d4e3f3;
    border-radius: var(--radius);
    box-shadow:
        0 1px 3px rgba(16, 116, 198, .06),
        0 8px 24px -8px rgba(16, 116, 198, .10);
    position: relative;
    overflow: hidden;
}
.page-head::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--grad);
    border-radius: 4px 0 0 4px;
}
.page-head::after {
    content: "";
    position: absolute; right: -40px; top: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(37, 99, 235, .06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.page-head h2 {
    margin: 0; font-size: 1.35rem; font-weight: 800;
    letter-spacing: -.02em; color: #0c1e3a;
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.page-head .muted { margin: .2rem 0 0; color: #5a7a9a; font-size: .8rem; font-weight: 500; }
.page-kicker {
    display: inline-flex; align-items: center;
    font-size: .6rem; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase;
    color: #fff; background: var(--grad);
    padding: .2rem .6rem; border-radius: 999px;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(37, 99, 235, .25);
}
.page-head .btn { position: relative; z-index: 1; }
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .field { min-width: 130px; }

.result-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: .75rem .95rem;
    background: #fff;
    box-shadow: var(--shadow);
    transition: box-shadow .13s;
}
.result-card:hover { box-shadow: var(--shadow-lg); }
.result-card .r-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.result-card .r-code { font-weight: 800; color: #1e293b; }
.result-card .r-nums { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.result-card .r-nums span b { display: block; font-size: 1.2rem; color: #0f1b33; }
.result-card .r-nums span small { color: var(--muted); }

.rd-filters {
    display: flex; gap: .65rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem;
    padding: .9rem 1.1rem;
    background: linear-gradient(135deg, #f8faff 0%, #f0f5fb 100%);
    border: 1px solid #d4e3f3; border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(16, 38, 71, .03);
}
.rd-filters .field { min-width: 140px; flex: 1 1 140px; }
.rd-filters label { font-size: .7rem; }
.rd-filters-go { display: flex; gap: .45rem; align-items: flex-end; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .85rem; }
.rd-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
    border: 1px solid #d4e3f3; border-radius: 16px;
    box-shadow: 0 2px 8px rgba(16, 38, 71, .04); overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.rd-card::after {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,.5), transparent);
    pointer-events: none;
}
.rd-card:hover { box-shadow: 0 12px 30px -6px rgba(16, 38, 71, .16); transform: translateY(-3px); border-color: #a8c8e8; }
.rd-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: .4rem;
    padding: .65rem .9rem; font-weight: 800; font-size: .84rem;
    position: relative; z-index: 1;
}
.rd-card-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.18); }
.rd-card-head small { font-weight: 600; opacity: .85; }
.rd-badge {
    display: inline-flex; align-items: center; gap: .25rem; flex-shrink: 0;
    padding: .1rem .55rem; border-radius: 999px; font-size: .62rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .04em;
    background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35);
}
.rd-badge .dot { margin: 0; background: #fff; }
.rd-badge .dot.on { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }
.rd-badge .dot.off { background: #fca5a5; box-shadow: none; }
.rd-card-body { padding: .85rem .8rem .6rem; position: relative; z-index: 1; }
.rd-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.rd-number-box {
    text-align: center; padding: .5rem .2rem .45rem; border-radius: 12px;
    background: linear-gradient(180deg, #f8faff 0%, #eef4fb 100%);
    border: 1px solid #e0eaf5;
    transition: background .15s, border-color .15s;
    overflow: hidden;
}
.rd-number-box:hover { background: #eef4ff; border-color: #c0d8f0; }
.rd-label { display: block; font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b839e; margin-bottom: .28rem; }
.rd-value { display: flex; justify-content: center; min-height: 1.6rem; }
.rd-balls { display: flex; gap: .12rem; justify-content: center; flex-wrap: nowrap; }
.rd-ball {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border-radius: 50%;
    font-weight: 800; font-size: .68rem; font-variant-numeric: tabular-nums;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.65), rgba(255,255,255,0) 55%), var(--ball, var(--brand));
    color: var(--ball-fg, #fff);
    box-shadow: 0 2px 5px -1px rgba(16, 38, 71, .35), inset 0 -3px 5px -2px rgba(0,0,0,.28);
}
.rd-ball.ghost { background: #eef2f7; color: #b6c4d6; box-shadow: inset 0 1px 2px rgba(16,38,71,.08); }
.rd-when { margin-top: .55rem; text-align: center; font-size: .72rem; color: #6b839e; font-weight: 600; }
.rd-today { color: #fff; font-weight: 800; margin-left: .3rem; background: var(--success); padding: .05rem .4rem; border-radius: 999px; font-size: .64rem; }
.rd-card-foot { padding: .5rem .8rem .7rem; display: flex; justify-content: flex-end; gap: .35rem; border-top: 1px solid #e8f0f8; position: relative; z-index: 1; }
.rd-hist-day { margin-bottom: 1.25rem; }
.rd-hist-day-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
    margin-bottom: .65rem;
}
.rd-hist-day-head h3 { margin: 0; font-size: 1.05rem; }
.rd-history { margin-top: 1.25rem; }
.rd-history > summary { cursor: pointer; }
.rd-history-body { padding: 0 1rem 1rem; }
.rd-hist-table {
    width: 100%; border-collapse: collapse; font-size: .82rem;
    margin-top: .8rem;
}
.rd-hist-table th {
    text-align: left; padding: .55rem .6rem;
    font-weight: 800; color: #3b4c6b;
    border-bottom: 2px solid #d4e3f3;
    font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
    background: #f8fafc;
}
.rd-hist-table td { padding: .5rem .6rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.rd-hist-table tbody tr:nth-child(even) td { background: #f7fafe; }
.rd-hist-table tbody tr:hover td { background: #eef4fb; }
.rd-hist-table .rd-ball { width: 1.4rem; height: 1.4rem; font-size: .78rem; }
.rd-hist-table .rd-balls { justify-content: flex-start; }
.rd-chip {
    display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 999px;
    font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    background: #e9f0fe; color: #123f8f; border: 1px solid #cfe0fb;
}
.rd-chip.alt { background: #f1f5f9; color: #475569; border-color: #e2e8f0; text-transform: none; letter-spacing: 0; }
.rd-head-actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.rd-fetch-one.is-busy, #rd-fetch-all.is-busy { opacity: .65; }
.rd-fetch-one.is-busy::after, #rd-fetch-all.is-busy::after {
    content: ""; display: inline-block; width: 10px; height: 10px; margin-left: .35rem;
    border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
    animation: rdSpin .6s linear infinite; vertical-align: -1px;
}
@keyframes rdSpin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ results entry */
.re-stack { display: flex; flex-direction: column; gap: 1rem; }
.re-card { overflow: visible; }
.re-card .table-wrap { margin-top: .2rem; }
.re-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.re-table th {
    padding: .6rem .7rem; font-size: .68rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
    border-bottom: 2px solid var(--border); text-align: left;
    background: #f8fafc;
}
.re-th-num { text-align: center; width: 110px; }
.re-table td {
    padding: .5rem .7rem; border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
.re-table tr:last-child td { border-bottom: none; }
.re-table tr:hover td { background: #f8fafc; }
.re-row-filled td { background: #f0f7ff; }
.re-row-filled:hover td { background: #e8f1fc; }
.re-td-tirage {
    display: flex; align-items: center; gap: .5rem; white-space: nowrap;
}
.re-tirage-chip {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .2rem .55rem; border-radius: 999px;
    font-size: .72rem; font-weight: 800; letter-spacing: .04em;
    min-width: 42px; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.re-tirage-loc { font-weight: 600; color: var(--text); font-size: .88rem; }
.re-badge-off {
    font-size: .58rem; font-weight: 800; letter-spacing: .06em;
    color: var(--danger); background: var(--danger-soft);
    padding: .1rem .4rem; border-radius: 999px;
}
.re-td-num { text-align: center; }
.re-num-input {
    width: 80px; padding: .38rem .45rem; text-align: center;
    font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums;
    letter-spacing: .12em; color: var(--brand-deep);
    border: 1.5px solid #d4e3f3; border-radius: var(--radius-sm);
    background: #fff; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.re-num-input:focus {
    border-color: var(--brand); box-shadow: var(--ring);
    background: #f8faff;
}
.re-num-input:not(:placeholder-shown) {
    border-color: var(--success); background: #f0fdf8;
}
.re-num-input::placeholder { color: #cbd5e1; font-weight: 500; letter-spacing: .08em; }
.re-actions {
    display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
    padding-top: .3rem;
}

@media (max-width: 700px) {
    .re-th-num { width: auto; }
    .re-num-input { width: 64px; font-size: .88rem; padding: .32rem .3rem; }
    .re-tirage-loc { font-size: .78rem; }
}
.missing { color: #c0d0e0; }

.empty {
    text-align: center;
    padding: 2.6rem 1rem;
    color: var(--muted);
    border: 1.5px dashed #d4e3f3;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f8faff 0%, #f4f7fb 100%);
}

.kbd {
    border: 1px solid var(--border); border-bottom-width: 2px;
    border-radius: 6px; padding: .06rem .45rem; font-size: .74rem;
    background: #fff; color: #475569; font-weight: 600;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* ------------------------------------------------------------------ station: customer fold */
.stn-cust-fold {
    margin-bottom: .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}
.stn-cust-fold > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: flex; align-items: center; gap: .45rem;
    padding: .45rem .7rem;
    font-size: .82rem; font-weight: 600; color: #334155;
}
.stn-cust-fold > summary::-webkit-details-marker { display: none; }
.stn-cust-fold > summary::after { content: "▾"; margin-left: auto; opacity: .55; transition: transform .15s; }
.stn-cust-fold[open] > summary::after { transform: rotate(180deg); }
.stn-cust-label {
    font-weight: 400; color: var(--muted); font-size: .78rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 180px;
}
.stn-cust-body { padding: 0 .7rem .65rem; }
.stn-cust-body .field { margin-bottom: .45rem; }
.stn-cust-body .field:last-child { margin-bottom: 0; }

.stn-cust-link {
    display: inline-flex; align-items: center; gap: .3rem;
    margin-top: .25rem; font-size: .72rem; font-weight: 600;
    color: var(--brand); text-decoration: none;
}
.stn-cust-link:hover { text-decoration: underline; }

.stn-cust-new-fold {
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    background: #f8fafc; padding: .45rem .6rem; margin-top: .35rem;
}
.stn-cust-new-fold > summary {
    list-style: none; cursor: pointer; user-select: none;
    font-size: .78rem; font-weight: 600; color: var(--brand);
}
.stn-cust-new-fold > summary::-webkit-details-marker { display: none; }
.stn-cust-new-grid { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; overflow: hidden; }
.stn-cust-new-fold[open] .stn-cust-new-grid { grid-template-rows: 1fr; }
.stn-cust-new-grid > * { overflow: hidden; }

.customer-ac {
    display: none; flex-direction: column; gap: .2rem;
    position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 3px; z-index: 600;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 18px rgba(10, 94, 133, .18);
    max-height: 240px; overflow-y: auto;
}
.customer-ac.is-open { display: flex; }
.customer-ac-item {
    text-align: left; width: 100%; padding: .5rem .65rem;
    border: none; border-bottom: 1px solid #f1f7fb;
    background: #fff; cursor: pointer; font: inherit; font-size: .82rem;
    color: #0a5e85; border-radius: 0;
}
.customer-ac-item:last-child { border-bottom: none; }
.customer-ac-item:hover, .customer-ac-item.is-active {
    background: #eef6fc;
}
.customer-ac-item.is-active { outline: 2px solid var(--brand); outline-offset: -2px; }
.customer-ac-empty {
    padding: .5rem .65rem; font-size: .78rem; color: var(--muted);
    text-align: center;
}
.customer-ac-new {
    color: var(--brand) !important;
    border-top: 1px solid var(--border-soft) !important;
    font-weight: 600 !important;
}

/* ------------------------------------------------------------------ auth */
.auth-body {
    min-height: 100vh; display: grid; place-items: center;
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(37, 99, 235, .28), transparent 55%),
        radial-gradient(700px 380px at 110% 110%, rgba(16, 163, 74, .12), transparent 50%),
        linear-gradient(165deg, #0b1224 0%, #102444 48%, #0d1830 100%);
    padding: 1.2rem;
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(340px, 440px);
    width: min(900px, 100%);
    min-height: 540px;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 40px 90px -24px rgba(2, 8, 25, .7), 0 0 0 1px rgba(255,255,255,.06);
}
.auth-panel {
    position: relative;
    background: linear-gradient(165deg, #0b1224 0%, #102444 55%, #123056 100%);
    color: #fff;
    padding: 2.2rem 2rem 1.5rem;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth-panel::before {
    content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%);
    pointer-events: none;
}
.auth-panel::after {
    content: ""; position: absolute; left: -40px; bottom: -70px; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 70%);
    pointer-events: none;
}
.auth-panel-brand {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: .7rem;
}
.auth-panel-brand .brand-name {
    font-size: 1.15rem; letter-spacing: .08em;
}
.auth-panel-copy { position: relative; z-index: 1; }
.auth-panel-copy h1 {
    margin: 0 0 .45rem; color: #fff; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em;
}
.auth-panel-copy p { margin: 0; color: rgba(255,255,255,.72); font-size: .92rem; line-height: 1.55; max-width: 28ch; }
.auth-panel-foot {
    position: relative; z-index: 1;
    margin: 1.4rem 0 0; font-size: .72rem; color: rgba(255,255,255,.45);
}
.auth-main { display: flex; align-items: center; padding: 2.2rem 2rem; background: #fff; }
.auth-card { width: 100%; background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
.auth-card h2 { font-size: 1.42rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .25rem; }
.auth-sub { color: var(--muted); font-size: .88rem; margin: 0 0 1.25rem; }
.auth-card .stack { gap: .85rem; }
.auth-card .field input { height: 38px; padding: 0 .7rem; }
.auth-card .btn-xl { margin-top: .15rem; }
.auth-card .flash { margin-bottom: .7rem; }
.auth-links {
    margin-top: 1.15rem; text-align: center; font-size: .85rem;
    display: flex; justify-content: center; gap: .5rem; align-items: center; flex-wrap: wrap;
}
.auth-links-sep { color: var(--border); }
.auth-brand { font-size: 1.06rem; font-weight: 800; color: var(--brand); margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.auth-brand .brand-mark { width: 30px; height: 30px; font-size: .96rem; }
@media (max-width: 720px) {
    .auth-shell { grid-template-columns: 1fr; min-height: 0; }
    .auth-panel { min-height: 0; padding: 1.35rem 1.4rem 1.15rem; }
    .auth-panel-copy { display: none; }
    .auth-panel-foot { display: none; }
    .auth-main { padding: 1.5rem 1.35rem 1.7rem; }
}

/* print ticket — mirrors legacy v1.lplls print_ticket.php */
.print-sheet {
    width: 280px; max-width: 280px; margin: 0 auto; background: #fff; color: #000;
    font-family: monospace; font-size: 13px; line-height: 1.1;
    padding: 8px; border: 1px solid #e2e8f0; border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    box-sizing: content-box; /* keep the printable area exactly 280px wide, like legacy */
}
.print-reprint-banner {
    text-align: center; font-weight: 800; letter-spacing: .18em; font-size: 12px; color: #b91c1c;
    border: 2px dashed #b91c1c; border-radius: 8px; padding: 4px; margin-bottom: 8px;
}
.print-header-block { text-align: center; margin-bottom: 10px; }
.print-header {
    text-align: center; font-size: 30px; font-weight: 600; letter-spacing: 1.2px;
    margin-bottom: 0; white-space: pre-line;
}
.print-hours {
    text-align: center; font-size: 15.21px; font-weight: 700; margin: 15.21px 0;
    font-family: monospace; color: #000; line-height: 1.1; letter-spacing: normal;
} /* legacy h3 defaults */
.print-barcode { margin: 0 auto 6px; }
.print-barcode img { display: block; width: 100%; height: auto; margin: 0 auto; }
.print-barcode-text { font-size: 14px; }
.print-divider { border-top: 1px dashed #000; margin: 6px 0; }
.print-divider-thick { border-top-width: 2px; }
.print-meta-label { display: block; font-size: 16px; }
.print-tirage-header {
    font-size: 24px; font-weight: 600; letter-spacing: 1.2px; margin: 3px; text-align: center;
    font-family: monospace; color: #000; line-height: 1.1;
}
table.print-entries-table { width: 100%; border-collapse: collapse; min-width: 0; max-width: 100%; }
.print-entries-table td { padding: 2px 0; font-size: 18px; font-weight: 400; border: 0; background: transparent; }
.print-sheet tbody tr:hover { background: none; }
.print-entry-amt { text-align: right; white-space: nowrap; }
.print-entry-num { white-space: nowrap; }
.print-flag { font-size: 18px; font-weight: 400; } /* legacy .box sizing */
.print-total {
    display: block; font-size: 24px; padding: 5px 7px; border-radius: 5px; text-align: center;
}
.print-wins-header { font-size: 14px; font-weight: 800; letter-spacing: .08em; margin: 4px 0; text-align: center; }
.print-wins-table td { font-size: 13px; }
.print-payout { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; margin-top: 4px; }
.print-footer {
    text-align: center; margin-top: 5px; font-size: 14px; font-weight: 600;
    white-space: pre-line; line-height: 10px;
}

/* ------------------------------------------------------------------ print */
@media print {
    body { background: #fff !important; padding: 0 !important; }
    .sidebar, .topbar, .flash-stack, .no-print { display: none !important; }
    .content { padding: 0; max-width: none; }
    .card { box-shadow: none; border: none; }
    .print-sheet { box-shadow: none; border: none; margin: 0; width: 280px; max-width: 280px; padding: 0; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-mid { grid-template-columns: 1fr 1fr; }
    .dash-mid > .card:last-child { grid-column: 1 / -1; }
    .dash-split { grid-template-columns: 1fr; }
    .tk-show { grid-template-columns: 1fr; }
    .station-layout { display: flex; flex-direction: column; gap: 1.1rem; }
    .station-col-left, .station-col-right { display: contents; }
    .station-layout .card, .station-layout .card + .card { margin-top: 0; }
    .station-layout > .station-col > .card, .station-layout > .card { width: 100%; max-width: 100%; }
    .station-entry-card { order: 1; }
    .station-ticket-card { order: 2; }
    .station-tools-card { order: 3; }
    .station-col-right { position: static; }
    .entry-row { grid-template-columns: 1fr 1fr; }
    .entry-row .span-btn { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: translateX(0); }
    .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .content { padding: 1rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .dash-mid { grid-template-columns: 1fr; }
    .dash-mid > .card:last-child { grid-column: auto; }
    .topbar-user .user-meta { display: none; }
    .field-group { grid-template-columns: 1fr; }
    .entry-row { grid-template-columns: 1fr; }
    .entry-row select { min-width: 0; }
    .bet-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
    .bet-num-field { grid-column: 1 / -1; }
    .bet-row #add-entry { width: 100%; }
    .stn-tools { grid-template-columns: 1fr; }
    .entry-row .span-btn .btn { width: 100%; }
    #entry_datetime { min-width: 0; flex: 1; }
    .total-bar { flex-wrap: wrap; gap: .4rem; }
    .mod-pill { padding: .42rem .8rem; }
    .steps-line .shortcuts { margin-left: 0; width: 100%; white-space: normal; flex-wrap: wrap; justify-content: flex-start; }
    input, select, textarea { font-size: 16px; }
    .stn-head-side { width: 100%; }
    .stn-sales { align-items: flex-start; flex: 1; }
    .tix-filters-go { width: 100%; }
    .tix-filters-go .btn { flex: 1; }
    .tk-head-actions { width: 100%; }
    .tk-head-actions .btn { flex: 1 1 auto; }

    /* dashboard hero: stack and give buttons full width */
    .hero {
        padding: 1.2rem 1.2rem 1.15rem;
        grid-template-columns: 1fr;
        grid-template-areas: "main" "time" "actions";
        gap: .7rem;
    }
    .hero-main h2 { font-size: 1.28rem; }
    .hero-station { padding: .6rem .8rem .55rem; gap: .3rem; }
    .hero-station .hero-clock { font-size: 1.3rem; }
    .hero-timeblock { text-align: left; min-width: 0; }
    .hero-clock { font-size: 1.45rem; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { flex: 1 1 auto; }
    .dash-kpis { grid-template-columns: 1fr 1fr; }
    .draw-rows { grid-template-columns: 1fr; }
    .tix-feed-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .tix-feed-meta { grid-column: 1 / -1; grid-row: 2; }
    .dash .rank-row { grid-template-columns: auto auto minmax(0,1fr) auto; }
    .dash .rank-bar { display: none; }
    .dash-kpis { gap: .7rem; }
    .dash-kpi { padding-right: .9rem; gap: .65rem .7rem; }
    .dash .stat .value { font-size: 1.22rem; }
    .dash-kpi .s-ico { width: 34px; height: 34px; }

    /* pending slip rows: chip | number+type | amount | remove */
    .pending-item {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        row-gap: .15rem;
        padding: .6rem .65rem;
    }
    .pending-item > .tirage-chip { grid-row: 1 / span 2; align-self: center; }
    .pending-item > .muted.small { grid-column: 2; grid-row: 2; }
    .pending-item > .p-amt { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
    .pending-item > .icon-btn { grid-row: 1 / span 2; align-self: center; padding: .35rem .55rem; }

    /* station: bigger touch targets on phones */
    .station-entry-card .stn-section { padding: .35rem .45rem; }
    .station-entry-card .tirage-dropdown-trigger { min-height: 36px; padding: .25rem .55rem; }
    .station-entry-card #entry-number,
    .station-entry-card .bet-row #entry-amount,
    .station-entry-card .bet-row #add-entry { height: 38px; }
    .station-entry-card .mod-pill { padding: .45rem .7rem; }
    .stn-tool-row input,
    .stn-tool-row .btn { height: 30px; }
    .save-box .btn-success { min-height: 38px; }

    /* filter bars: stack and full-width buttons */
    .rd-filters, .sal-filter-row, .tix-filters-main, .tix-filters-adv {
        flex-direction: column;
        align-items: stretch;
    }
    .rd-filters .field, .sal-filter-row .field, .tix-filters-main .field, .tix-filters-adv .field { min-width: 0; width: 100%; }
    .rd-filters-go, .sal-filter-go { width: 100%; }
    .rd-filters-go .btn, .sal-filter-go .btn { flex: 1; }
    .pagination-bar { flex-direction: column; align-items: stretch; gap: .6rem; }
    .pag { justify-content: center; }

    /* cards slightly less padding on phones */
    .card { padding: .9rem 1rem; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .stat { padding: .8rem .9rem; }
    .stat .value { font-size: 1.25rem; }

    /* tables scroll, but smaller text */
    table { font-size: .82rem; }
    thead th, tbody td { padding: .5rem .65rem; }

    /* salary header: stack */
    .salary-head-inner { flex-wrap: wrap; gap: .6rem; }
    .salary-pills { width: 100%; }

    /* page-head: stack */
    .page-head { flex-direction: column; align-items: flex-start; gap: .6rem; }
    .page-head .btn { width: 100%; }
}

@media (max-width: 640px) {
    .hide-sm { display: none !important; }
    table.table-fluid { min-width: 0; }
    table.table-fluid th, table.table-fluid td { padding-left: .55rem; padding-right: .55rem; }
    .page-head .stat { min-width: 0; }
    .page-head { align-items: flex-start; }
    .stn-head-side { width: 100%; }
    .stn-sales { align-items: flex-start; flex: 1; }
    .stn-tool .btn { white-space: nowrap; }
    .tix-filters-go { width: 100%; }
    .tix-filters-go .btn { flex: 1; }
    .tk-line { grid-template-columns: auto minmax(0, 1fr) auto; }
    .tk-head-actions { width: 100%; }
    .tk-head-actions .btn { flex: 1 1 auto; }
}

.inline-form { display: inline-flex; align-items: center; gap: .35rem; }
.inline-form input[type="number"] { min-width: 0; }
@media (max-width: 760px) {
    .inline-form { width: 100%; }
    .inline-form input[type="number"] { flex: 1; min-width: 0; }
}

/* ------------------------------------------------------------------ footer */
.app-foot {
    margin-top: auto;
    padding: 1rem 1.5rem 1.3rem;
    border-top: 1px solid var(--border-soft);
    display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
    color: var(--muted); font-size: .8rem;
}
.app-foot b { color: #475569; }
.app-foot .foot-right { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 760px) {
    .app-foot { padding: .9rem 1rem 1.2rem; font-size: .75rem; justify-content: center; text-align: center; }
}
@media print { .app-foot { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
    .hero-open .dot.on, .t-countdown.closing { animation: none; }
    .tirage-card:hover, .stat:hover { transform: none; }
}

/* ----------------------------------------------------- tirage picker: empty */
.tirage-dd-empty {
    padding: .9rem .8rem; text-align: center; color: var(--muted); font-size: .85rem;
}

/* ------------------------------------------------------------------ salary report */
.salary-head {
    background: linear-gradient(100deg, #eef6fc 0%, #f7f9fd 55%, #ffffff 100%);
    border: 1px solid #cfe0ee;
    border-left: 4px solid #1074c6;
    border-radius: 10px;
    padding: .6rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(16, 116, 198, .08);
    color: #0a5e85;
}
.salary-head-inner {
    display: flex; align-items: center; gap: 14px;
}
.salary-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #cfe0ee;
    box-shadow: 0 2px 6px rgba(16, 116, 198, .1);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.salary-icon .ico { stroke: #1074c6; width: 22px; height: 22px; }
.salary-title { flex: 1; min-width: 0; }
.salary-title h2 { margin: 0; font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; color: #0a5e85; }
.salary-title .page-kicker { display: none; }
.salary-pills { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.salary-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px;
    background: #fff;
    border: 1px solid #cfe0ee;
    border-radius: 999px;
    color: #0a5e85; font-weight: 700;
    text-transform: uppercase; letter-spacing: .3px;
    font-size: .72rem;
    box-shadow: 0 1px 2px rgba(16, 116, 198, .05);
}
.salary-pill .ico { width: 12px; height: 12px; stroke: #1074c6; }
.salary-pill .dot.brand { background: #1074c6; }

.sal-collapsible { overflow: hidden; margin-bottom: 1rem; }
.sal-collapsible-toggle {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem .9rem;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    font: inherit; font-size: .9rem; font-weight: 700; color: var(--brand-deep);
    cursor: pointer;
}
.sal-collapsible-toggle:hover { background: #eef6fc; }
.sal-collapsible-toggle .ico { width: 16px; height: 16px; stroke: var(--brand); transition: transform .2s; }
.sal-collapsible.open .sal-collapsible-toggle .ico-chevron-down { transform: rotate(-180deg); }
.sal-collapsible-body {
    display: none;
    padding: .85rem .9rem 1rem;
    border: 1px solid var(--border-soft);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fff;
}
.sal-collapsible.open .sal-collapsible-toggle { border-radius: var(--radius) var(--radius) 0 0; }
.sal-collapsible.open .sal-collapsible-body { display: block; }

.sal-form-grid { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; }
.sal-form-grid .field { min-width: 130px; flex: 1 1 150px; }
.sal-form-actions { margin-top: .75rem; display: flex; gap: .45rem; }

.sal-filter-row { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; padding: .5rem .2rem; }
.sal-filter-row .field { min-width: 140px; flex: 1 1 160px; }
.sal-filter-go { display: flex; gap: .45rem; align-items: flex-end; }

.sal-table { min-width: 640px; font-size: .84rem; }
.sal-table th, .sal-table td { white-space: nowrap; padding: .5rem .65rem; }
.sal-type-badge {
    display: inline-block; padding: .1rem .45rem;
    background: #e9f0fe; color: var(--brand); border-radius: 999px;
    font-size: .72rem; font-weight: 700; text-transform: capitalize;
}

.sal-edit-form {
    margin-top: 1rem;
    padding: .9rem;
    background: #f6f8fd;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
}
.sal-edit-form h4 { margin: 0 0 .65rem; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }

.sal-results { display: flex; flex-direction: column; gap: .55rem; }
.sal-result {
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    background: #fff; overflow: hidden;
}
.sal-result-header {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    padding: .65rem .8rem; background: var(--panel);
    cursor: pointer;
}
.sal-result-header:hover { background: #eef6fc; }
.sal-result-title { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.sal-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800;
}
.sal-date-chip {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .12rem .5rem; background: #fff;
    border: 1px solid var(--border-soft); border-radius: 999px;
    font-size: .74rem; color: var(--muted);
}
.sal-result-right { display: flex; align-items: center; gap: .5rem; }
.sal-pay-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem;
    background: linear-gradient(90deg, #0a5e85 0%, #1074c6 100%);
    color: #fff; border-radius: 999px;
    font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.sal-result .ico-chevron-down { stroke: var(--brand); transition: transform .2s; }
.sal-result.open .sal-result-header .ico-chevron-down { transform: rotate(-180deg); }
.sal-result-body { display: none; padding: .75rem .8rem; }
.sal-result.open .sal-result-body { display: block; }
.sal-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .55rem; }
.sal-detail {
    display: flex; flex-direction: column; gap: .15rem;
    padding: .45rem .55rem; background: #f6f8fd;
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.sal-detail-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sal-detail-value { font-size: .88rem; font-weight: 700; color: var(--brand-deep); }
.sal-highlight .sal-detail-value { color: var(--success); }

@media (max-width: 520px) {
    .salary-head-inner { flex-wrap: wrap; }
    .salary-icon { width: 44px; height: 44px; }
    .sal-result-header { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ manage users page */
.usr-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .8rem; align-items: end; padding: .2rem 1.1rem 1.1rem; }
.usr-form .field { min-width: 0; }
.usr-form .cus-actions { display: flex; justify-content: flex-end; gap: .5rem; }

.usr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.usr-tile { position: relative; overflow: hidden; padding: .65rem .8rem; background: linear-gradient(180deg, #f7faff, #fff 70%); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.usr-tile::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--grad); opacity: .75; }
.usr-tile .t-label { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.usr-tile .t-value { font-size: 1.25rem; font-weight: 800; color: var(--brand-deep); letter-spacing: -.01em; margin-top: .15rem; }
.usr-tile .t-hint { font-size: .7rem; color: var(--muted); margin-top: .1rem; }

.usr-user { display: flex; align-items: center; gap: .6rem; }
.usr-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .78rem; color: #fff; background: linear-gradient(135deg, #64748b, #94a3b8); box-shadow: 0 4px 10px -4px rgba(16, 38, 71, .45); flex-shrink: 0; }
.usr-avatar.r-admin { background: linear-gradient(135deg, #0ea5e9, #2563eb); box-shadow: 0 4px 10px -4px rgba(37, 99, 235, .55); }
.usr-avatar.r-owner { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 4px 10px -4px rgba(124, 58, 237, .55); }
.usr-meta { min-width: 0; line-height: 1.2; }
.usr-meta b { display: block; font-size: .88rem; }
.usr-meta small { color: var(--muted); font-size: .73rem; }
.usr-you { display: inline-block; vertical-align: 1px; margin-left: .3rem; padding: .05rem .4rem; border-radius: 999px; background: #eef4fd; border: 1px solid #d7e6f7; color: var(--brand); font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

.usr-mail { color: var(--brand); text-decoration: none; }
.usr-mail:hover { text-decoration: underline; }
.usr-parent { display: inline-flex; align-items: center; gap: .3rem; color: #334155; font-weight: 600; }
.usr-parent .ico { width: 14px; height: 14px; color: var(--muted); }

.usr-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; background: #eef4fd; border: 1px solid #d7e6f7; color: var(--brand-deep); font-weight: 800; font-size: .75rem; font-variant-numeric: tabular-nums; }
.usr-seat-edit { display: flex; align-items: center; gap: .35rem; margin-top: .3rem; }
.usr-seat-edit input[type="number"] { width: 60px; padding: .22rem .45rem; }
.usr-table td.right .btn .ico { width: 14px; height: 14px; }

.usr-modal .modal-box { max-height: 92vh; overflow-y: auto; }
.usr-modal-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .95rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border-soft); }
.usr-modal-head h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .55rem; }
@media (max-width: 520px) { .usr-form { grid-template-columns: 1fr; } }

/* manage users — compact roster so the table fits without clipping */
.usr-table { min-width: 0; }
.usr-table .usr-email { max-width: 260px; }
.usr-email a { overflow-wrap: anywhere; }
.usr-table td.truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.usr-seat-cell { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }

/* manage users — collapsible members under admins */
.usr-twist { width: 26px; height: 26px; border-radius: 8px; border: 1px solid #d7e6f7; background: #f4f9ff; color: var(--brand); display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: background .2s, border-color .2s; }
.usr-twist:hover { background: #e7f1fd; border-color: #bcd6f0; }
.usr-twist .ico { width: 14px; height: 14px; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.usr-twist.is-open .ico { transform: rotate(90deg); }
.usr-twist-spacer { width: 26px; flex-shrink: 0; }
.usr-twist-pill { cursor: pointer; border: 1px solid #d7e6f7; font-family: inherit; }
.usr-twist-pill:hover { background: #e7f1fd; border-color: #bcd6f0; }

tr.usr-kids-row { background: #f7fafe; }
tr.usr-kids-row:hover { background: #f7fafe; }
tr.usr-kids-row > td { padding: 0; border-bottom: 1px solid var(--border-soft); }
tr.usr-kids-row:last-child > td { border-bottom: none; }
.usr-children { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.4, 0, .2, 1); }
.usr-children.is-open { grid-template-rows: 1fr; }
.usr-children-inner { overflow: hidden; min-height: 0; }
.usr-child-list { position: relative; display: flex; flex-direction: column; gap: .1rem; padding: .4rem 1rem .65rem 2.5rem; }
.usr-child-list::before { content: ''; position: absolute; left: 1.55rem; top: .55rem; bottom: .9rem; width: 2px; background: #dbe7f5; border-radius: 2px; }
.usr-child { display: flex; align-items: center; gap: .8rem; padding: .42rem .6rem; border-radius: 10px; opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease, background .15s; }
.usr-children.is-open .usr-child { opacity: 1; transform: none; }
.usr-children.is-open .usr-child:nth-child(1) { transition-delay: .04s, .04s, 0s; }
.usr-children.is-open .usr-child:nth-child(2) { transition-delay: .09s, .09s, 0s; }
.usr-children.is-open .usr-child:nth-child(3) { transition-delay: .14s, .14s, 0s; }
.usr-children.is-open .usr-child:nth-child(4) { transition-delay: .19s, .19s, 0s; }
.usr-children.is-open .usr-child:nth-child(5) { transition-delay: .24s, .24s, 0s; }
.usr-children.is-open .usr-child:nth-child(n+6) { transition-delay: .28s, .28s, 0s; }
.usr-child:hover { background: #eef5fd; }
.usr-child > .usr-user { flex: 1 1 190px; min-width: 0; }
.usr-child .usr-avatar { width: 28px; height: 28px; font-size: .68rem; }
.usr-child .usr-meta b { font-size: .82rem; }
.usr-child-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.usr-child-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
@media (max-width: 900px) {
    .usr-child-mail { display: none; }
    .usr-child-list { padding-left: 2rem; }
    .usr-child-list::before { left: 1.05rem; }
}

/* winning page — tickets grouped under sellers */
.wt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.wt-group { margin-bottom: 1rem; }
.wt-seller-head {
    display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left;
    padding: .65rem .95rem; cursor: pointer; font: inherit; color: inherit;
    background: linear-gradient(180deg, #f7faff, #fff 85%);
    border: 1px solid #d4e3f3; border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.wt-seller-head:hover { border-color: #a9c9ec; box-shadow: var(--shadow); background: linear-gradient(180deg, #f2f8ff, #fff 85%); }
.wt-seller-head .usr-twist { border: none; background: transparent; }
.wt-seller-head.is-open { border-radius: var(--radius) var(--radius) 12px 12px; }
.wt-seller-meta { line-height: 1.25; min-width: 0; }
.wt-seller-meta b { display: block; font-size: .95rem; color: #0c1e3a; }
.wt-seller-meta small { color: var(--muted); font-size: .74rem; }
.wt-seller-right { margin-left: auto; display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.wt-amt { font-size: 1.02rem; font-weight: 800; color: var(--brand-deep); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wt-children { margin-top: 0; }
.wt-ticket-list { padding: .65rem .15rem .15rem; }
.wt-ticket { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease; }
.wt-children.is-open > .usr-children-inner .wt-ticket { opacity: 1; transform: none; }
.wt-children.is-open > .usr-children-inner .wt-ticket:nth-child(1) { transition-delay: .05s, .05s; }
.wt-children.is-open > .usr-children-inner .wt-ticket:nth-child(2) { transition-delay: .1s, .1s; }
.wt-children.is-open > .usr-children-inner .wt-ticket:nth-child(3) { transition-delay: .15s, .15s; }
.wt-children.is-open > .usr-children-inner .wt-ticket:nth-child(4) { transition-delay: .2s, .2s; }
.wt-children.is-open > .usr-children-inner .wt-ticket:nth-child(5) { transition-delay: .25s, .25s; }
.wt-children.is-open > .usr-children-inner .wt-ticket:nth-child(n+6) { transition-delay: .3s, .3s; }

/* winning page — owner: sellers nested under admin */
.wt-admin-group { margin-bottom: 1rem; }
.wt-admin-head {
    display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left;
    padding: .72rem 1rem; cursor: pointer; font: inherit; color: inherit;
    background: linear-gradient(135deg, #eef4ff 0%, #f7faff 60%, #fff 100%);
    border: 1.5px solid #bcd6f5; border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.wt-admin-head:hover { border-color: #93bdec; box-shadow: var(--shadow); }
.wt-admin-head .usr-twist { border: none; background: transparent; }
.wt-admin-head.is-open { border-radius: var(--radius) var(--radius) 12px 12px; }
.wt-admin-head .wt-seller-meta b { font-size: 1.02rem; display: flex; align-items: center; gap: .45rem; }
.wt-seller-list { display: flex; flex-direction: column; gap: 1rem; padding: .7rem .7rem .7rem 1.4rem; position: relative; }
.wt-seller-list::before { content: ''; position: absolute; left: .5rem; top: .9rem; bottom: .9rem; width: 2px; background: #dbe7f5; border-radius: 2px; }
.wt-seller-group { margin-bottom: 0; }
.wt-admin-group .wt-seller-group { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group { opacity: 1; transform: none; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group:nth-child(1) { transition-delay: .05s, .05s; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group:nth-child(2) { transition-delay: .1s, .1s; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group:nth-child(3) { transition-delay: .15s, .15s; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group:nth-child(4) { transition-delay: .2s, .2s; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group:nth-child(5) { transition-delay: .25s, .25s; }
.wt-admin-group .usr-children.is-open > .usr-children-inner .wt-seller-group:nth-child(n+6) { transition-delay: .3s, .3s; }
@media (max-width: 640px) {
    .wt-seller-list { padding-left: .8rem; }
    .wt-seller-meta small { white-space: normal; }
}
/* ticket formats page — number prefix settings */
.tf-prefix-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem; }
.tf-prefix-form .field { min-width: 0; }
.tf-prefix-rename { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: #334155; text-transform: none; letter-spacing: 0; padding-bottom: .55rem; cursor: pointer; }
.tf-prefix-rename input { width: auto; }

/* dashboard — owner tirage board grouped by admin */
.dash-tirage-group { margin-bottom: 1.15rem; }
.dash-tirage-group:last-child { margin-bottom: 0; }
.dash-tirage-head { display: flex; align-items: center; gap: .5rem; padding-bottom: .5rem; margin-bottom: .65rem; border-bottom: 1px solid var(--border-soft); }
.dash-tirage-head .usr-avatar { width: 28px; height: 28px; font-size: .7rem; }
.dash-tirage-head b { font-size: .92rem; color: #0c1e3a; }
.dash-tirage-head .muted.small { margin-left: auto; }

/* dashboard — admin tirage group card reveal */
.dash-tirage-group .tirage-card { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card { opacity: 1; transform: none; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card:nth-child(1) { transition-delay: .05s, .05s; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card:nth-child(2) { transition-delay: .1s, .1s; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card:nth-child(3) { transition-delay: .15s, .15s; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card:nth-child(4) { transition-delay: .2s, .2s; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card:nth-child(5) { transition-delay: .25s, .25s; }
.dash-tirage-group .usr-children.is-open > .usr-children-inner .tirage-card:nth-child(n+6) { transition-delay: .3s, .3s; }

/* station picker — owner grouped sections (own draws + collapsible admins) */
.stn-dd-own { margin-bottom: .35rem; }
.stn-dd-sec-label { display: flex; align-items: center; gap: .4rem; padding: .35rem .45rem .25rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stn-dd-sec-label .ico { width: 13px; height: 13px; }
.stn-dd-n { margin-left: auto; font-size: .66rem; font-weight: 800; color: var(--brand); background: #e9f0fe; border-radius: 999px; padding: .1rem .5rem; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.stn-dd-sec { border-top: 1px solid var(--border-soft); margin-top: .4rem; padding-top: .4rem; }
.stn-dd-sec-head { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .42rem .45rem; background: #f7faff; border: 1px solid #e2ebf7; border-radius: 10px; cursor: pointer; font: inherit; text-align: left; transition: background .15s, border-color .15s; }
.stn-dd-sec-head:hover { background: #eef5fd; border-color: #cfe0f5; }
.stn-dd-sec-head .usr-twist { border: none; background: transparent; width: 20px; height: 20px; }
.stn-dd-sec-head .usr-avatar { width: 24px; height: 24px; font-size: .62rem; }
.stn-dd-sec-meta { line-height: 1.15; min-width: 0; }
.stn-dd-sec-meta b { display: block; font-size: .82rem; color: #0c1e3a; }
.stn-dd-sec-meta small { color: var(--muted); font-size: .68rem; }
.stn-dd-body > .usr-children-inner { padding: .35rem 0 .1rem; }

/* tirages admin page — owner collapsible admin groups */
.tir-groups { display: flex; flex-direction: column; gap: .7rem; }
.tir-group-head { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .55rem .8rem; cursor: pointer; font: inherit; color: inherit; background: linear-gradient(180deg, #f7faff, #fff 85%); border: 1px solid #d4e3f3; border-radius: 12px; box-shadow: var(--shadow-xs); transition: border-color .2s, box-shadow .2s, background .2s; }
.tir-group-head:hover { border-color: #a9c9ec; box-shadow: var(--shadow); background: linear-gradient(180deg, #f2f8ff, #fff 85%); }
.tir-group-head .usr-twist { border: none; background: transparent; }
.tir-group-head.is-open { border-radius: 12px 12px 10px 10px; }
.tir-group-meta { line-height: 1.2; min-width: 0; }
.tir-group-meta b { display: block; font-size: .9rem; color: #0c1e3a; }
.tir-group-meta small { color: var(--muted); font-size: .72rem; }
.tir-group .tirage-auto-toggle { pointer-events: auto; }

/* limits matrix — members nested under admins (tree) */
.lim-admin-group .lim-node-matrix { padding: .55rem .55rem .1rem .55rem; }
.lim-members {
    position: relative;
    display: flex; flex-direction: column; gap: .55rem;
    margin: .35rem .45rem .45rem 1.15rem; padding-left: 1rem;
}
.lim-members::before {
    content: ''; position: absolute; left: 0; top: .35rem; bottom: .35rem;
    width: 2px; background: #dbe7f5; border-radius: 2px;
}
.lim-member-head {
    display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
    padding: .5rem .7rem; cursor: pointer; font: inherit; color: inherit;
    background: linear-gradient(180deg, #fbfdff, #fff 85%);
    border: 1px solid #e0e9f3; border-radius: 11px;
    box-shadow: var(--shadow-xs);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lim-member-head:hover { border-color: #bcd6f0; box-shadow: var(--shadow); background: linear-gradient(180deg, #f5f9ff, #fff 85%); }
.lim-member-head .usr-twist { border: none; background: transparent; }
.lim-member-head.is-open { border-radius: 11px 11px 9px 9px; }
.lim-member-head .usr-avatar { width: 26px; height: 26px; font-size: .66rem; }
.lim-member-head .lim-caps-btn { margin-left: auto; }
.lim-member-group .lim-node-matrix { padding: .4rem .4rem 0 .4rem; }
.lim-member-group .lim-node-matrix .lim-inherit-note { margin-left: .15rem; }
.lim-member-group { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .3s ease; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group { opacity: 1; transform: none; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group:nth-child(1) { transition-delay: .05s; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group:nth-child(2) { transition-delay: .1s; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group:nth-child(3) { transition-delay: .15s; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group:nth-child(4) { transition-delay: .2s; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group:nth-child(5) { transition-delay: .25s; }
.lim-admin-group > .usr-children.is-open > .usr-children-inner > .lim-members > .lim-member-group:nth-child(n+6) { transition-delay: .3s; }
.lim-member-head.is-open .usr-twist .ico { transform: rotate(90deg); }


/* chevron rotation when the toggle lives on the group head button */
.wt-seller-head.is-open .usr-twist .ico,
.tir-group-head.is-open .usr-twist .ico,
.stn-dd-sec-head.is-open .usr-twist .ico { transform: rotate(90deg); }

/* ------------------------------------------------------------------ tirage modals v2 */
.tvm-card {
    width: min(560px, 95vw); max-height: 92vh; overflow-y: auto;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #f4f9ff 0%, #ffffff 130px);
    border: 1px solid #bcd6f5; border-radius: 20px;
    box-shadow: 0 30px 70px -20px rgba(12, 30, 58, .45), inset 0 1px 0 rgba(255,255,255,.9);
    position: relative; animation: popIn .28s cubic-bezier(.32, 1.35, .55, 1);
}
.tvm-accent { position: sticky; top: 0; z-index: 2; height: 4px; background: var(--grad); border-radius: 20px 20px 0 0; }
.tvm-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.25rem .95rem; border-bottom: 1px solid #e3edf9; }
.tvm-badge {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    display: grid; place-items: center; color: #fff; background: var(--grad);
    box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255,255,255,.35);
}
.tvm-badge .ico { width: 20px; height: 20px; }
.tvm-badge-new { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 8px 18px -6px rgba(5, 150, 105, .55), inset 0 1px 0 rgba(255,255,255,.35); }
.tvm-title { line-height: 1.25; min-width: 0; }
.tvm-title h3 { margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; color: #0c1e3a; }
.tvm-title small { color: var(--muted); font-size: .74rem; font-weight: 600; }
.tvm-x {
    margin-left: auto; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center; cursor: pointer;
    background: #fff; border: 1px solid #d9e6f5; color: #64748b;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.tvm-x:hover { background: #fdecef; border-color: #f3c1cd; color: var(--danger); transform: rotate(90deg); }
.tvm-x .ico { width: 15px; height: 15px; }
.tvm-card form { display: flex; flex-direction: column; min-height: 0; }
.tvm-body { padding: 1.05rem 1.25rem 1.15rem; display: flex; flex-direction: column; gap: 1.05rem; overflow-y: auto; }
.tvm-sec { display: flex; flex-direction: column; gap: .55rem; }
.tvm-sec-head {
    display: flex; align-items: center; gap: .45rem;
    font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: #7d93b2;
}
.tvm-sec-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, #dde9f6, transparent); }
.tvm-sec-ico { display: inline-grid; place-items: center; color: var(--brand); }
.tvm-sec-ico .ico { width: 14px; height: 14px; }
.tvm-card .field-group { gap: .65rem; }
.tvm-card .field { gap: .28rem; }
.tvm-card .field label { font-size: .66rem; }
.tvm-card .field input, .tvm-card .field select { height: 40px; }
.tvm-times { display: flex; align-items: flex-end; gap: .55rem; }
.tvm-time-field { flex: 1; }
.tvm-time-field input { font-size: .95rem; font-weight: 700; letter-spacing: .02em; }
.tvm-time-arrow { display: grid; place-items: center; width: 36px; height: 40px; color: #9db4d0; }
.tvm-time-arrow .ico { width: 16px; height: 16px; }
.tvm-swatches { display: flex; gap: .8rem; flex-wrap: wrap; }
.tvm-swatch {
    display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem .45rem .45rem;
    background: #fff; border: 1px solid #dde8f5; border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
    transition: border-color .15s, box-shadow .15s;
}
.tvm-swatch:hover { border-color: #bcd2ee; box-shadow: 0 4px 12px -6px rgba(16, 38, 71, .18); }
.tvm-swatch input[type=color] {
    width: 42px; height: 42px; padding: 0; border: none; border-radius: 11px; cursor: pointer; background: transparent;
    box-shadow: inset 0 0 0 1px rgba(16, 38, 71, .12), 0 2px 6px -2px rgba(16, 38, 71, .25);
}
.tvm-swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.tvm-swatch input[type=color]::-webkit-color-swatch { border: none; border-radius: 9px; }
.tvm-swatch-ro input[type=color] { cursor: default; opacity: .85; }
.tvm-swatch-meta { line-height: 1.25; }
.tvm-swatch-meta b { display: block; font-size: .72rem; color: #3b4c6b; text-transform: uppercase; letter-spacing: .06em; }
.tvm-hex { font-size: .78rem; font-weight: 700; color: var(--muted); }
.tvm-note {
    display: flex; align-items: center; gap: .4rem; margin: .15rem 0 0;
    font-size: .74rem; font-weight: 600; color: #7d93b2;
    background: #f4f8fd; border: 1px dashed #d3e2f4; border-radius: 10px; padding: .45rem .65rem;
}
.tvm-note .ico { width: 13px; height: 13px; flex-shrink: 0; color: var(--brand); }
.tvm-status {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .7rem .9rem; background: linear-gradient(180deg, #f8fbff, #f2f7fd);
    border: 1px solid #dde8f5; border-radius: 14px;
}
.tvm-status-text { line-height: 1.25; }
.tvm-status-text b { font-size: .84rem; color: #0c1e3a; }
.tvm-status-text small { display: block; color: var(--muted); font-size: .7rem; font-weight: 500; }
.tvm-switch { position: relative; display: inline-block; flex-shrink: 0; cursor: pointer; }
.tvm-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tvm-track {
    display: block; width: 48px; height: 27px; border-radius: 999px;
    background: #d5dfeb; box-shadow: inset 0 1px 3px rgba(16, 38, 71, .18);
    transition: background .22s ease, box-shadow .22s ease; position: relative;
}
.tvm-track::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(16, 38, 71, .3);
    transition: transform .22s cubic-bezier(.34, 1.4, .64, 1);
}
.tvm-switch input:checked + .tvm-track { background: linear-gradient(90deg, #059669, #10b981); box-shadow: inset 0 1px 3px rgba(4, 108, 78, .35); }
.tvm-switch input:checked + .tvm-track::after { transform: translateX(21px); }
.tvm-switch input:focus-visible + .tvm-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.tvm-foot {
    display: flex; justify-content: flex-end; gap: .55rem;
    padding: .9rem 1.25rem; border-top: 1px solid #e3edf9;
    background: rgba(255, 255, 255, .85); position: sticky; bottom: 0;
}
@media (max-width: 520px) {
    .tvm-times { flex-wrap: wrap; }
    .tvm-time-arrow { display: none; }
    .tvm-body { padding: .9rem 1rem 1rem; }
}

/* ------------------------------------------------------------------ ticket formats studio */
.tfs-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); gap: 1rem; align-items: start; }
.tfs-form-card { margin-bottom: 0; }
.tfs-scope { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: .45rem; }
.tfs-scope .field { min-width: 0; }
.tfs-scope-hint { display: flex; align-items: center; gap: .4rem; margin: .55rem 0 1rem; color: #7d93b2; font-weight: 600; }
.tfs-scope-hint .ico { width: 13px; height: 13px; color: var(--brand); flex-shrink: 0; }
.tfs-locked {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .6rem .8rem; margin-bottom: 1rem;
    background: linear-gradient(180deg, #f4f9ff, #eef5fd); border: 1px solid #d3e2f4; border-radius: 12px;
}
.tfs-fields { display: flex; flex-direction: column; gap: .9rem; }
.tfs-preview-col { position: sticky; top: 76px; }
.tfs-preview-label { display: flex; align-items: center; gap: .4rem; margin: 0 0 .45rem .2rem; font-weight: 700; }
.tfs-preview-label .ico { width: 14px; height: 14px; color: var(--brand); }
.tfs-slip {
    background: #fffdf7; border: 1px dashed #c8b98a; border-radius: 6px;
    box-shadow: 0 10px 26px -14px rgba(76, 59, 18, .35);
    font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
    padding: .85rem .8rem; display: flex; flex-direction: column; gap: .5rem; min-height: 240px;
}
.tfs-slip-head {
    white-space: pre-wrap; text-align: center; font-weight: 800; font-size: .78rem;
    color: #3d2f0b; border-bottom: 1px dashed #d8c998; padding-bottom: .5rem; line-height: 1.4;
    overflow-wrap: anywhere;
}
.tfs-slip-rows { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.tfs-slip-line { display: flex; justify-content: space-between; gap: .6rem; font-size: .72rem; color: #5c4a17; }
.tfs-slip-id span:first-child { font-weight: 700; }
.tfs-slip-total { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 800; color: #3d2f0b; border-top: 1px dashed #d8c998; padding-top: .4rem; margin-top: .15rem; }
.tfs-slip-foot { white-space: pre-wrap; text-align: center; font-size: .72rem; font-weight: 700; color: #6b5714; border-top: 1px dashed #d8c998; padding-top: .5rem; overflow-wrap: anywhere; }
.tfs-cell-text { max-width: 260px; white-space: nowrap; }
@media (max-width: 900px) {
    .tfs-layout { grid-template-columns: 1fr; }
    .tfs-preview-col { position: static; }
    .tfs-scope { grid-template-columns: 1fr; }
}

/* station — new-customer fold: one wrapper so name/phone/email collapse together */
.stn-cust-new-inner { display: flex; flex-direction: column; gap: .5rem; overflow: hidden; min-height: 0; padding-top: .35rem; }

/* ticket view — tirage group row with sibling print button */
.tir-group-row { display: flex; align-items: stretch; gap: .45rem; }
.tir-group-row .tir-group-head { flex: 1; min-width: 0; }
.tir-group-row .tix-print-tirage { align-self: center; flex-shrink: 0; }
.tix-print-tirage .ico { width: 14px; height: 14px; }

/* print sheet — single-draw banner */
.print-single-banner { text-align: center; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #92400e; background: #fdf3e7; border: 1px dashed #e7c9a0; border-radius: 6px; padding: .25rem .4rem; margin-bottom: .4rem; }
@media print { .print-single-banner { border-style: solid; } }

/* station picker — owner: all admins grouped under one parent */
.stn-dd-admins { border-top: 1px solid var(--border-soft); margin-top: .5rem; padding-top: .15rem; }
.stn-dd-group-label { display: flex; align-items: center; gap: .4rem; padding: .4rem .45rem .1rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #7d93b2; }
.stn-dd-group-label .ico { width: 13px; height: 13px; color: var(--brand); }
.stn-dd-admins .stn-dd-sec:first-child { border-top: none; margin-top: 0; padding-top: .15rem; }

/* dashboard board — owner: all admin groups nested under one parent */
.dash-admins { border-top: 1px solid var(--border-soft); margin-top: .2rem; padding-top: .7rem; }
.dash-group-label { display: flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #7d93b2; margin-bottom: .7rem; }
.dash-group-label .ico { width: 14px; height: 14px; color: var(--brand); }
.dash-group-label .muted.small { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* dashboard — collapsible admins parent head */
.dash-admins-head { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .55rem .8rem; cursor: pointer; font: inherit; text-align: left; color: inherit; background: linear-gradient(135deg, #eef4ff 0%, #f7faff 60%, #fff 100%); border: 1.5px solid #bcd6f5; border-radius: 12px; box-shadow: var(--shadow-xs); transition: border-color .2s, box-shadow .2s; }
.dash-admins-head:hover { border-color: #93bdec; box-shadow: var(--shadow); }
.dash-admins-head .usr-twist { border: none; background: transparent; width: 20px; height: 20px; }
.dash-admins-head .usr-twist .ico { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.dash-admins-head.is-open .usr-twist .ico { transform: rotate(90deg); }
.dash-admins-head > .ico { width: 15px; height: 15px; color: var(--brand); }
.dash-admins-head b { font-size: .82rem; color: #0c1e3a; text-transform: uppercase; letter-spacing: .06em; }
.dash-admins-head .muted.small { margin-left: auto; }
.dash-admins-body { display: flex; flex-direction: column; padding-top: .7rem; }

/* station picker — collapsible admins parent head */
.stn-dd-group-head { margin-top: .1rem; }
.stn-dd-group-ico { display: inline-grid; place-items: center; color: var(--brand); }
.stn-dd-group-ico .ico { width: 15px; height: 15px; }
.stn-dd-group-head .usr-twist .ico { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.stn-dd-group-head.is-open .usr-twist .ico { transform: rotate(90deg); }
.stn-dd-admins-body { padding: .1rem .2rem .3rem; }

/* station picker — admin owner tag (option row + selected chip) */
.dd-admin-tag { margin-left: .4rem; font-size: .66rem; font-weight: 700; color: var(--fg, #fff); opacity: .72; letter-spacing: .02em; }
.chip-admin { font-weight: 600; font-size: .92em; opacity: .82; }

/* limits page — bulk editor + inheritance hints */
.lim-bulk-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; padding: .2rem 1.1rem .4rem; }
.lim-bulk-form .field { min-width: 0; }
.lim-bulk-cat label { white-space: nowrap; }

/* Specific number limits: collapsible per-number groups */
tr.nl-group-head > td { background: #eef4fd; }
tr.nl-group-head:hover > td { background: #e3eefb; }
.nl-gh { display: flex; align-items: center; gap: .5rem; }
.nl-group-head .nl-chev {
    display: inline-grid; place-items: center;
    width: 20px; height: 20px; padding: 0;
    border: 0; background: none; color: var(--muted); cursor: pointer;
}
.nl-group-head .nl-chev .ico { width: 14px; height: 14px; transition: transform .16s ease; }
tr.nl-group-head[data-open="0"] .nl-chev .ico { transform: rotate(-90deg); }
tr.nl-group-head .nr-num { font-weight: 800; }
.lim-cell.lim-inherits { border-style: dashed; background: #f6faff; }
.lim-cell.lim-inherits::placeholder { color: #6b8bb0; font-style: italic; opacity: 1; }

/* limits page review fixes */
.lim-bulk-form .lim-bulk-actions { display: flex; align-items: flex-end; margin-left: auto; }
.lim-hint { display: flex; align-items: flex-start; gap: .45rem; }
.lim-hint > .ico { width: 14px; height: 14px; margin-top: .12rem; color: var(--brand); }

/* payouts page — compact multiplier matrices */
.pay-table { font-size: .8rem; min-width: 980px; }
.pay-table .pay-th { text-align: center; white-space: nowrap; font-size: .6rem; padding: .5rem .3rem; }
.pay-table td { padding: .35rem .3rem; }
.pay-table .pay-tirage { white-space: nowrap; min-width: 190px; }
.pay-cell { text-align: center; font-variant-numeric: tabular-nums; }

.tf-prefix-card { margin-bottom: 1rem; }

.payout-note, .lim-inherit-note { padding: .5rem .2rem .15rem; color: #7d93b2; }

/* payout copy bar */
.pay-copy-card { margin-bottom: 1rem; }
.pay-copy-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; }
.pay-copy-form .field { min-width: 0; }
.pay-copy-form select { min-width: 210px; }
.pay-copy-arrow { display: grid; place-items: center; width: 30px; height: 40px; color: #9db4d0; }
.pay-copy-arrow .ico { width: 16px; height: 16px; }
@media (max-width: 640px) { .pay-copy-arrow { display: none; } .pay-copy-form select { min-width: 0; width: 100%; } }

/* ------------------------------------------------- dashboard hero v2 (hero-home) */
.hero-home {
    padding: 1.7rem 1.9rem 1.55rem;
    border-radius: 24px;
    background:
        radial-gradient(90% 130% at 0% 0%, rgba(255, 255, 255, .14), transparent 45%),
        linear-gradient(128deg, #2449c4 0%, #4338ca 45%, #6d28d9 78%, #8b5cf6 100%);
}
.hero-home .hero-aurora { position: absolute; inset: -40% -20%; pointer-events: none; filter: blur(46px); opacity: .8; }
.hero-home .hero-aurora i { position: absolute; display: block; width: 46%; padding-bottom: 46%; border-radius: 50%; mix-blend-mode: screen; animation: auroraDrift 16s ease-in-out infinite alternate; }
.hero-home .hero-aurora i:nth-child(1) { left: 4%; top: 6%; background: radial-gradient(circle, rgba(56, 189, 248, .55), transparent 65%); }
.hero-home .hero-aurora i:nth-child(2) { left: 38%; top: 30%; background: radial-gradient(circle, rgba(167, 139, 250, .5), transparent 65%); animation-delay: -5s; animation-duration: 19s; }
.hero-home .hero-aurora i:nth-child(3) { left: 66%; top: 2%; background: radial-gradient(circle, rgba(236, 72, 153, .34), transparent 62%); animation-delay: -9s; animation-duration: 23s; }
@keyframes auroraDrift {
    from { transform: translate3d(-4%, -6%, 0) scale(1); }
    to   { transform: translate3d(9%, 10%, 0) scale(1.22); }
}
.hero-glint {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit;
}
.hero-glint::before {
    content: ''; position: absolute; top: -60%; bottom: -60%; width: 22%; left: -35%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .14), transparent);
    transform: skewX(-18deg);
    animation: heroGlint 9s ease-in-out infinite; animation-delay: 2.5s;
}
@keyframes heroGlint { 0%, 70% { left: -35%; } 100% { left: 120%; } }
.hero-home .hero-balls { position: absolute; inset: 0; pointer-events: none; }
.hero-home .hb {
    position: absolute; display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 50%;
    font-weight: 800; font-size: .82rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
    color: #fff; opacity: .5; text-shadow: 0 1px 4px rgba(15, 23, 42, .35);
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .28) 42%, rgba(255, 255, 255, .08) 70%);
    box-shadow: inset 0 -6px 12px rgba(15, 23, 42, .12), 0 8px 22px -8px rgba(15, 23, 42, .4);
    animation: hbFloat 7s ease-in-out infinite;
}
.hero-home .hb-1 { right: 33%; top: -14px; transform: scale(.8); opacity: .35; animation-delay: -.5s; }
.hero-home .hb-2 { right: 19%; bottom: -18px; animation-delay: -2.2s; }
.hero-home .hb-3 { left: -20px; bottom: 22%; width: 38px; height: 38px; opacity: .28; animation-delay: -4s; }
.hero-home .hb-4 { right: -14px; top: 30%; width: 56px; height: 56px; font-size: .9rem; opacity: .3; animation-delay: -1.2s; }
.hero-home .hb-5 { left: 30%; top: -22px; width: 30px; height: 30px; font-size: .68rem; opacity: .26; animation-delay: -3.1s; }
@keyframes hbFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.hero-home .hero-main, .hero-home .hero-timeblock, .hero-home .hero-actions { z-index: 2; }
.hero-hi { display: flex; align-items: center; gap: .95rem; }
.hero-avatar { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.hero-avatar > span {
    position: absolute; inset: 4px; z-index: 1; display: grid; place-items: center;
    border-radius: 50%; font-weight: 800; font-size: 1.25rem; color: #fff;
    background: linear-gradient(140deg, #38bdf8, #6366f1 55%, #a855f7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 18px -6px rgba(15, 23, 42, .55);
}
.hero-avatar .hero-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 210deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .06) 30%, rgba(255, 255, 255, .55) 62%, rgba(255, 255, 255, .06) 85%, rgba(255, 255, 255, .9));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
    animation: ringSpin 14s linear infinite;
}
@keyframes ringSpin { to { rotate: 360deg; } }
.hero-hi-txt { min-width: 0; }
.hero-home .hero-hi-txt h2 { margin: 0 0 .25rem; }
.hero-role {
    display: inline-block; vertical-align: .14em; margin-left: .35rem;
    font-size: .58rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
    padding: .2rem .6rem; border-radius: 999px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); backdrop-filter: blur(6px);
}
.hero-role-owner { background: linear-gradient(90deg, rgba(251, 191, 36, .9), rgba(245, 158, 11, .85)); border-color: rgba(253, 224, 71, .7); color: #432a04; text-shadow: none; }
.hero-role-admin { background: rgba(56, 189, 248, .5); border-color: rgba(125, 211, 252, .7); }
.hero-role-member { background: rgba(52, 211, 153, .4); border-color: rgba(110, 231, 183, .65); }
.hero-sub { margin: .1rem 0 0 !important; }
.hero-home .hero-timeblock {
    display: flex; flex-direction: column; align-items: flex-end; gap: .15rem;
    padding: .7rem .9rem; border-radius: 16px;
    background: rgba(15, 23, 42, .18); border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); backdrop-filter: blur(10px);
}
.htb-k { display: inline-flex; align-items: center; gap: .3rem; font-size: .56rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.htb-k .ico { width: 11px; height: 11px; }
.hero-home .hero-clock { background: rgba(255, 255, 255, .12); font-size: 1.72rem; }
.htb-scope {
    margin-top: .3rem; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #ffe08a; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 224, 138, .35);
    border-radius: 999px; padding: .12rem .55rem;
}
.hero-home .hero-open, .hero-home .hero-next { background: rgba(15, 23, 42, .18); border-color: rgba(255, 255, 255, .2); backdrop-filter: blur(6px); }
@media (max-width: 720px) {
    .hero-home { padding: 1.25rem 1.1rem 1.2rem; }
    .hero-home .hero-balls { display: none; }
    .hero-avatar { width: 46px; height: 46px; }
    .hero-avatar > span { font-size: 1.05rem; }
    .hero-home .hero-timeblock { align-items: flex-start; padding: .55rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-home .hero-aurora i, .hero-glint::before, .hero-home .hb, .hero-avatar .hero-ring { animation: none; }
}
.hero-home .hero-kicker { display: inline-flex; width: max-content; }

/* policy & compliance page */
.auth-card:has(.policy) { max-width: 680px; width: 100%; }
.policy { color: var(--text); }
.policy-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.policy-crest { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(37,99,235,.5); flex-shrink: 0; }
.policy-crest .ico { width: 22px; height: 22px; }
.policy-head h1 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.policy-head p { margin: .1rem 0 0; font-size: .82rem; }
.policy-sec { margin-bottom: 1rem; }
.policy-sec h2 { margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.policy-sec p { margin: 0; font-size: .88rem; line-height: 1.6; color: #334155; }
.policy-sec ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.6; color: #334155; }
.policy-sec li { margin: .3rem 0; }
.policy-sec b, .policy-head b { color: #0c1e3a; }
.policy-foot { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--border-soft); }
.policy-actions { margin-top: 1rem; }
.foot-policy-link { color: inherit; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(15,23,42,.18); }
.foot-policy-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
.app-foot .foot-policy-link { color: var(--muted); }
.app-foot .foot-policy-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
@media (max-width: 520px) { .auth-card:has(.policy) { padding: 1.1rem; } }

/* station — play for tomorrow checkbox */
.stn-tomorrow { display: inline-flex; align-items: center; gap: .45rem; margin-top: .4rem; cursor: pointer; }
.stn-tomorrow input[type=checkbox] { width: auto; accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.stn-tomorrow span { font-size: .78rem; font-weight: 700; color: #334155; text-transform: none; letter-spacing: 0; }
.stn-tomorrow:hover span { color: var(--brand); }

/* station - send slip to customer (email/SMS) */
.stn-send { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .35rem; padding: .5rem .7rem; background: linear-gradient(135deg, #eef4ff, #f6f1fe); border: 1px solid #d7e3f7; border-radius: 11px; }
.stn-send-title { display: inline-flex; align-items: center; gap: .35rem; font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #5b6b8c; }
.stn-send-title .ico { width: 13px; height: 13px; color: var(--brand); }
.stn-send-opt { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 700; color: #334155; background: none; border: 0; padding: 0; }
.stn-send-opt input[type=checkbox] { width: auto; min-width: 15px; max-width: 15px; height: 15px; margin: 0; padding: 0; border: 2px solid #b9cfdf; border-radius: 4px; background: #fff; box-shadow: none; accent-color: var(--brand); cursor: pointer; }
.stn-send-opt small { font-weight: 600; color: var(--brand); opacity: .85; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stn-send-opt:hover small { opacity: 1; }

/* users page - quick state actions + seat meter */
.usr-state-actions { margin-top: .3rem; }
.usr-state-actions .btn { padding: .1rem .5rem; font-size: .68rem; }
.usr-child-status { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.usr-child-status .usr-state-actions { margin-top: 0; }
.usr-meter { width: 96px; height: 5px; border-radius: 999px; background: #e7edf6; overflow: hidden; margin-top: .25rem; }
.usr-meter-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.usr-meter-fill.ok { background: linear-gradient(90deg, #059669, #10b981); }
.usr-meter-fill.warn { background: linear-gradient(90deg, #d97706, #f59e0b); }
.usr-meter-fill.danger { background: linear-gradient(90deg, #dc2626, #ef4444); }
.usr-meter-fill.muted { background: #cbd5e1; }

/* financial report v2 */
.fin-head { flex-wrap: wrap; }
.fin-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fin-delta { display: inline-block; margin-top: .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .01em; }
.fin-delta.good { color: var(--success); }
.fin-delta.bad { color: var(--danger); }
.fin-delta.flat { color: var(--muted); font-weight: 600; }
.fin-callouts { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fin-callout { flex: 1; min-width: 210px; display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-xs); }
.fin-callout .fc-k { display: inline-flex; align-items: center; gap: .3rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fin-callout .fc-k .ico { width: 13px; height: 13px; }
.fin-callout b { font-size: .88rem; color: #0c1e3a; }
.fin-callout .fc-net { margin-left: auto; font-weight: 800; font-size: .92rem; }
.fin-callout.fc-best { border-color: #bfe6d4; background: linear-gradient(180deg, #f2fbf6, #fff); }
.fin-callout.fc-best .fc-k .ico, .fin-callout.fc-best .fc-net { color: var(--success); }
.fin-callout.fc-worst { border-color: #f3cdd6; background: linear-gradient(180deg, #fdf2f5, #fff); }
.fin-callout.fc-worst .fc-k .ico, .fin-callout.fc-worst .fc-net { color: var(--danger); }
.fin-mix { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: #eef3fa; }
.fin-mix-seg { display: block; height: 100%; min-width: 3px; transition: filter .15s; }
.fin-mix-seg:hover { filter: brightness(1.12); }
.fin-rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: .72rem; font-weight: 800; background: #eef3fa; color: #64748b; }
.fin-rank.top1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #432a04; }
.fin-rank.top2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #1e293b; }
.fin-rank.top3 { background: linear-gradient(135deg, #d8a06a, #b46f35); color: #fff; }
.fin-bar { display: block; height: 4px; width: min(160px, 100%); margin-top: .3rem; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.fin-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
tr.fin-row-best { background: #f2fbf6; }
tr.fin-row-best td:first-child { box-shadow: inset 3px 0 0 var(--success); }
tr.fin-row-worst { background: #fdf2f5; }
tr.fin-row-worst td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.fin-table .pos { color: var(--success); }
.fin-table .neg { color: var(--danger); }
@media (max-width: 640px) {
    .fin-callouts .fin-callout { min-width: 100%; }
}

/* Balance: sortable column headers */
.fin-sort { color: inherit; text-decoration: none; font-weight: 600; }
.fin-sort:hover { text-decoration: underline; }
.fin-sort.on { color: var(--primary, #0b7285); }

/* Salary rule type badges */
.sal-type-badge.alt { background: #eff6ff; color: #1d4ed8; }

/* Ticket formats: owner settings strip */
.tf-owner-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.tf-mini { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.tf-mini .btn { margin-top: .25rem; }

/* Balance: hold chips + good delta */
.fin-delta.good { color: #16a34a; }
.bal-hold-link {
    display: inline-flex; align-items: center; gap: .25rem; margin-top: .2rem;
    background: none; border: 0; border-radius: 4px; padding: .08rem .25rem;
    font-size: .66rem; font-weight: 700; letter-spacing: .02em; text-transform: none;
    color: #b45309; cursor: pointer; border-bottom: 1px dotted rgba(180, 83, 9, .5);
}
.bal-hold-link:hover { color: #92400e; background: #fff7ed; border-bottom-style: solid; }
.bal-hold-link .ico { width: .75rem; height: .75rem; flex: none; }
.hold-detail { margin: .9rem 0 0; display: grid; gap: .45rem; }
.hold-detail > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .45rem; border-bottom: 1px dashed var(--border-soft); }
.hold-detail > div:last-child { border-bottom: 0; padding-bottom: 0; }
.hold-detail dt { color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.hold-detail dd { margin: 0; text-align: right; font-size: .84rem; font-weight: 700; color: #0c1e3a; }
.hold-detail dd.hd-note { font-weight: 500; color: #475569; max-width: 62%; }

/* Balance summary: totals as a distinct, compact row */
.bal-summary tfoot th {
    font-size: 0.85rem;
    border-top: 1.5px solid var(--border, #e3e8f0);
    padding: .5rem .6rem;
    white-space: nowrap;
}
.bal-summary tfoot th .fin-net { font-size: 0.95rem; }


/* ============ Number Risk Analysis (owner tool) ============ */
.nr-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; align-items: start; }
.nr-rail { position: sticky; top: 1rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .6rem; }
.nr-rail-title { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; padding: .2rem .5rem .5rem; }
.nr-rail-link { display: flex; align-items: center; gap: .45rem; padding: .45rem .55rem; border-radius: 7px; color: #475569; font-size: .82rem; font-weight: 600; text-decoration: none; }
.nr-rail-link:hover { background: #f1f5f9; color: var(--brand, #0b6bcb); }
.nr-rail-link.on { background: #eef6ff; color: var(--brand, #0b6bcb); }
.nr-rail-link .ico { width: .9rem; height: .9rem; flex: 0 0 auto; }
.nr-rail-count { margin-left: auto; font-style: normal; font-size: .68rem; font-weight: 800; background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: .05rem .4rem; }
.nr-rail-note { margin-top: .6rem; padding: .55rem; border-top: 1px dashed var(--border); font-size: .7rem; line-height: 1.7; color: #64748b; }
.nr-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.nr-section { scroll-margin-top: 1rem; }
.nr-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; padding: .6rem .8rem; border-bottom: 1px solid var(--border-soft); }
.nr-toolbar .segmented { flex-wrap: wrap; }
.nr-search { border: 1px solid var(--border); border-radius: 8px; padding: .42rem .7rem; font-size: .85rem; min-width: 240px; }
.nr-search:focus { outline: 2px solid rgba(11, 107, 203, .25); border-color: var(--brand, #0b6bcb); }
.nr-table { font-size: .82rem; }
.nr-num { display: inline-block; padding: .1rem .5rem; border-radius: 5px; background: #e0f2fe; color: #0369a1; font-weight: 800; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .05em; }
.nr-cat { display: inline-block; padding: .06rem .5rem; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #64748b; white-space: nowrap; }
.nr-cat-p2 { background: #0ea5e9; } .nr-cat-p3 { background: #2563eb; } .nr-cat-p3box { background: #1e40af; }
.nr-cat-p4 { background: #7c3aed; } .nr-cat-p4box { background: #5b21b6; } .nr-cat-p5 { background: #9333ea; } .nr-cat-p5box { background: #6b21a8; }
.nr-cat-b1 { background: #059669; } .nr-cat-b2 { background: #0d9488; } .nr-cat-b3 { background: #0891b2; }
.nr-cat-pale1 { background: #db2777; } .nr-cat-pale2 { background: #be185d; } .nr-cat-pale3 { background: #9d174d; }
.nr-rec { display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 5px; font-weight: 800; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.nr-rec-do_not_sell { background: #991b1b; color: #fff; }
.nr-rec-cap { background: #f59e0b; color: #fff; }
.nr-rec-watch { background: #6366f1; color: #fff; }
.nr-rec-ok { background: #16a34a; color: #fff; }
.nr-z-hot { color: #b91c1c; font-weight: 700; }
.nr-z-cold { color: #64748b; }
.nr-heatmap { display: grid; grid-template-columns: 30px repeat(10, minmax(26px, 1fr)); gap: 3px; margin: .8rem; max-width: 560px; }
.nr-hh { display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #64748b; }
.nr-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 5px; border: 1px solid var(--border); background: #f8fafc; font-size: .72rem; font-weight: 700; color: #334155; line-height: 1.1; padding: .15rem 0; font-variant-numeric: tabular-nums; }
.nr-cell .nr-cell-h { font-size: .58rem; font-weight: 500; color: rgba(100, 116, 139, .8); }
.nr-cell.hot-0 { background: #eff6ff; border-color: #dbeafe; color: #2563eb; }
.nr-cell.hot-1 { background: #fee2e2; border-color: #fecaca; }
.nr-cell.hot-2 { background: #fecaca; border-color: #fca5a5; color: #7f1d1d; }
.nr-cell.hot-3 { background: #fca5a5; border-color: #f87171; color: #7f1d1d; }
.nr-cell.hot-4 { background: #ef4444; border-color: #dc2626; color: #fff; }
.nr-cell.hot-5 { background: #991b1b; border-color: #7f1d1d; color: #fff; }
.nr-cell.has-open::after { content: ''; position: absolute; top: 0; right: 0; border: 5px solid transparent; border-top-color: #d97706; border-right-color: #d97706; border-radius: 0 5px 0 0; }
.nr-legend { display: flex; gap: .35rem; align-items: center; font-size: .74rem; color: #64748b; padding: 0 .8rem .8rem; flex-wrap: wrap; }
.nr-legend i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--border); }
.nr-legend .l0 { background: #eff6ff; } .nr-legend .l1 { background: #fee2e2; } .nr-legend .l2 { background: #fecaca; }
.nr-legend .l3 { background: #fca5a5; } .nr-legend .l4 { background: #ef4444; } .nr-legend .l5 { background: #991b1b; }
.nr-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; padding: .9rem; }
.nr-cat-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.nr-cat-card .nr-cat-head { padding: .45rem .7rem; background: #f8fafc; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nr-cat-card .nr-cat-head small { font-weight: 500; color: #64748b; font-size: .7rem; }
.nr-cat-card table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.nr-cat-card th, .nr-cat-card td { padding: .3rem .65rem; border-bottom: 1px solid var(--border-soft); }
.nr-cat-card th { color: #94a3b8; font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
.nr-cat-card td.right, .nr-cat-card th.right { text-align: right; font-variant-numeric: tabular-nums; }
.nr-cat-card tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) {
    .nr-layout { grid-template-columns: 1fr; }
    .nr-rail { position: static; display: flex; flex-wrap: wrap; gap: .3rem; }
    .nr-rail-title, .nr-rail-note { display: none; }
}

/* ============ UI polish: calmer heroes ============ */
.hero-home { padding: 1.5rem 1.7rem; border-radius: 16px; }
.hero-home .hero-balls { opacity: .45; }
.hero-home .hero-glint { opacity: .35; }
.hero-home .hero-aurora i { opacity: .6; }
.hero-home .hero-main h2 { font-size: 1.52rem; }
.hero-home .hero-avatar { width: 50px; height: 50px; }
.hero-open, .hero-next {
    display: inline-flex; align-items: center; gap: .35rem;
    min-height: 26px; border-radius: 999px;
    font-size: .75rem; line-height: 1;
}
.hero-home .hero-timeblock { border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 1.25rem; }
.hero-home .hero-clock { font-size: 1.55rem; padding: .25rem .65rem; }
.hero-home .hero-actions { gap: .5rem; }
.hero-home .hero-actions .btn { min-height: 40px; }
.hero-shift { margin-top: .95rem; }
.hs-track { height: 3px; }
.hs-head { gap: .5rem; }

.hero-station { padding: .75rem 1.15rem; border-radius: 14px; margin-bottom: 1rem; }
.stn-hero-stats { gap: .45rem; }
.hero-station .hstat { min-width: 112px; flex: 0 1 auto; padding: .38rem .75rem; border-radius: 10px; }
.hero-station .hstat .h-val { font-size: .92rem; }

/* ============ UI polish: modals ============ */
.modal-overlay { background: rgba(15, 23, 42, .62); backdrop-filter: blur(2px); }
.modal-box {
    border-radius: 16px; padding: 1.3rem 1.35rem;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .45), 0 4px 14px rgba(15, 23, 42, .12);
    animation: nrModalPop .18s ease-out;
}
@keyframes nrModalPop {
    from { transform: translateY(10px) scale(.985); opacity: 0; }
    to { transform: none; opacity: 1; }
}
.modal-box h3 {
    display: flex; align-items: center; gap: .45rem;
    margin: 0 0 .9rem; padding-bottom: .65rem;
    font-size: 1.02rem; letter-spacing: -.01em;
    border-bottom: 1px solid var(--border-soft);
}
.modal-box h3 .ico { width: 1.05rem; height: 1.05rem; color: var(--brand); flex: 0 0 auto; }
.modal-actions {
    margin-top: 1.1rem; padding-top: .85rem;
    border-top: 1px solid var(--border-soft);
}

/* ============ UI polish: inputs ============ */
.field label { font-size: .72rem; font-weight: 700; color: #475569; letter-spacing: .02em; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
    border-radius: 9px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, input[type="search"]:focus,
input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="time"]:focus,
select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
    outline: none;
}
.modal-box .field + .field { margin-top: .35rem; }
.modal-box .sal-form-grid { gap: .6rem .8rem; }
.modal-box .muted.small { margin: .1rem 0 .3rem; }

/* ================= DESIGN V2: clean hero ================= */
.hero {
    background: linear-gradient(140deg, #0f1a2b 0%, #16263d 55%, #1d3a5f 100%);
    border-radius: 18px; padding: 1.35rem 1.6rem; gap: .5rem 1.4rem;
    box-shadow: 0 16px 38px -20px rgba(15, 26, 43, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.hero::before, .hero::after { content: none; }
.hero-home .hero-aurora, .hero-home .hero-glint, .hero-home .hero-balls { display: none; }
.hero-kicker { background: transparent; border: 0; padding: 0; color: rgba(255, 255, 255, .55); letter-spacing: .22em; font-size: .62rem; backdrop-filter: none; }
.hero-main h2, .hero-home .hero-hi-txt h2 { font-size: 1.38rem; font-weight: 700; text-shadow: none; letter-spacing: -.015em; margin-bottom: .35rem; }
.hero-main p { color: rgba(255, 255, 255, .75); }
.hero-open, .htb-scope, .hero-next {
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
    box-shadow: none; backdrop-filter: none; font-weight: 600; color: rgba(255, 255, 255, .92);
}
.hero-open .dot.on { box-shadow: none; }
.hero-next .t-countdown { background: rgba(255, 255, 255, .10); box-shadow: none; }
.hero-home .hero-timeblock { border-left: 1px solid rgba(255, 255, 255, .09); }
.hero-clock {
    background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12);
    box-shadow: none; backdrop-filter: none; text-shadow: none; font-weight: 700; font-size: 1.5rem;
}
.hero-date { color: rgba(255, 255, 255, .58); font-weight: 500; }
.htb-k { color: rgba(255, 255, 255, .48); }
.hero-avatar > span { border-radius: 13px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.hero-avatar .hero-ring { display: none; }
.hero-role { box-shadow: none; backdrop-filter: none; }
.hero-shift { margin-top: .85rem; }
.hero-shift .hs-track { background: rgba(255, 255, 255, .10); }
.hero-shift .hs-fill { background: linear-gradient(90deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .95)); }
.hs-k, .hs-hours { color: rgba(255, 255, 255, .6); }
.hs-pct { text-shadow: none; }
.hstat {
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
    box-shadow: none; backdrop-filter: none;
}
.hstat .h-label { color: rgba(255, 255, 255, .52); }
.hstat .h-val { color: #fff; }
.hstat .h-val.accent { color: #fcd34d; }
.hero-station .hero-clock { font-size: 1.38rem; }

/* ================= DESIGN V2: modals ================= */
.modal-overlay { background: rgba(10, 16, 28, .55); backdrop-filter: blur(3px); }
.modal-box {
    border-radius: 18px; padding: 1.25rem 1.35rem;
    max-height: min(88vh, 760px); overflow-y: auto; scrollbar-width: thin;
    box-shadow: 0 30px 70px -24px rgba(10, 16, 28, .55), 0 6px 18px rgba(10, 16, 28, .14);
}
.modal-box > h3 {
    margin: -1.25rem -1.35rem 1.05rem; padding: .95rem 1.35rem .85rem;
    background: linear-gradient(180deg, #f9fbff, #f2f6fc);
    border-bottom: 1px solid var(--border-soft); border-radius: 18px 18px 0 0;
    font-size: .98rem; letter-spacing: -.01em;
}
.modal-box > h3 .ico { color: var(--brand); }
.modal-box .modal-actions {
    margin: 1.1rem -1.35rem -1.25rem; padding: .85rem 1.35rem;
    border-top: 1px solid var(--border-soft); background: #f8fafc;
    border-radius: 0 0 18px 18px;
}
.modal-box p.muted { margin: .1rem 0 .4rem; }

/* ================= DESIGN V2: controls ================= */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
    border: 1.5px solid #dde7f2; border-radius: 10px; background: #fbfdff;
    min-height: 40px; padding: .45rem .75rem; box-shadow: none;
}
input[type="text"]:hover, input[type="password"]:hover, input[type="email"]:hover, input[type="number"]:hover,
input[type="tel"]:hover, input[type="url"]:hover, input[type="search"]:hover,
input[type="date"]:hover, input[type="datetime-local"]:hover, input[type="time"]:hover, select:hover, textarea:hover {
    border-color: #b9cfe9; background: #f7fbff; box-shadow: none;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, input[type="search"]:focus,
input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="time"]:focus,
select:focus, textarea:focus {
    background: #fff; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
input:not(:placeholder-shown):not(:focus):not([type="hidden"]), select:not(:focus) {
    border-color: #dde7f2; background: #fbfdff;
}
select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right .7rem center; background-size: 11px;
    padding-right: 2.15rem; cursor: pointer;
}
textarea { min-height: 84px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
label, .field label { font-size: .68rem; color: #5c6b84; letter-spacing: .07em; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="datetime-local"]::-webkit-calendar-picker-indicator { opacity: .5; }
input[type="date"]::-webkit-calendar-picker-indicator:hover, input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: .95; }

/* ================= DESIGN V2: shared surfaces ================= */
.card { border-radius: 14px; border-color: #e7edf5; box-shadow: 0 1px 2px rgba(16, 38, 71, .04), 0 12px 28px -22px rgba(16, 38, 71, .12); }
.btn { border-radius: 10px; }
.btn:active { transform: translateY(1px); }
.segmented { background: #eef2f7; border-color: #e4eaf2; border-radius: 11px; padding: .2rem; }
.segmented .btn { border-radius: 8px; }
.badge { border-radius: 999px; letter-spacing: .05em; }
thead th { color: #6b7a94; letter-spacing: .08em; }
.alert { border-radius: 12px; }
.empty { border-radius: 12px; }
.nav-item { border-radius: 9px; }
.stat .s-ico { border-radius: 10px; }
::selection { background: rgba(37, 99, 235, .16); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3ddea; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b7c6da; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid rgba(37, 99, 235, .5); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .modal-box { animation: none; }
    * { scroll-behavior: auto !important; }
}

/* ================= DESIGN V2: unify remaining bands ================= */
.tc-hero {
    background: linear-gradient(140deg, #0f1a2b 0%, #16263d 55%, #1d3a5f 100%);
    border-radius: 18px; padding: 1.35rem 1.6rem;
    box-shadow: 0 16px 38px -20px rgba(15, 26, 43, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.tc-hero::before { content: none; }
.tc-hero h2 { font-weight: 700; letter-spacing: -.015em; }
.modal-box .usr-modal-head {
    margin: -1.25rem -1.35rem 1.05rem; padding: .8rem 1.35rem;
    background: linear-gradient(180deg, #f9fbff, #f2f6fc);
    border-bottom: 1px solid var(--border-soft); border-radius: 18px 18px 0 0;
}
.modal-box .usr-modal-head h3 { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.salary-head { border-radius: 14px; border-color: #e0ecf7; box-shadow: 0 1px 2px rgba(16, 38, 71, .04), 0 12px 28px -22px rgba(16, 38, 71, .12); }
.salary-icon { border-radius: 11px; }
.salary-pill { border-radius: 999px; }

.hero-station { padding: .85rem 1.15rem; gap: .4rem 1.1rem; margin-bottom: 1rem; border-radius: 16px; }
.hero-station .hero-kicker { font-size: .6rem; margin-bottom: .2rem; }

/* ================= Hero: initial vivid gradient background ================= */
.hero, .tc-hero {
    background: linear-gradient(225deg, #7a3ced 0%, #1e46b4 55%, #16307e 100%);
}
.hero::before, .tc-hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(520px 240px at 0% -8%, rgba(255, 255, 255, .22), transparent 62%),
        radial-gradient(380px 200px at 110% 108%, rgba(255, 255, 255, .12), transparent 65%);
    pointer-events: none;
}
.hero::after, .tc-hero::after { content: none; }

/* ================= Hero: floating numbers at 25% (sidebar-nav navy kept) ================= */
.hero-home .hero-balls, .hero-station .hero-balls { display: block; opacity: 1; }
.hero-home .hero-balls .hb, .hero-station .hero-balls .hb {
    opacity: .25;
    border-color: rgba(255, 255, 255, .35);
}

/* ================= DESIGN V2: graphs match hero palette ================= */
.co-exp { fill: #2f6bf2; }
.co-dec { fill: #7c3ced; }
.sw-exp { background: #2f6bf2; }
.sw-dec { background: #7c3ced; }
.co-grid, .bc-grid { stroke: #e6edf7; }
.co-base { stroke: #c3cfdf; }
.fin-bar { background: #e6edf7; }
.fin-bar i { background: linear-gradient(90deg, #2f6bf2, #38bdf8); }
.bc-line { filter: drop-shadow(0 2px 3px rgba(47, 107, 242, .18)); }
.bc-key i { border-radius: 3px; }
/* KPI icon tiles echo the same blues when brand */
.stat.brand .s-ico { background: linear-gradient(135deg, #2f6bf2, #38bdf8); }

/* ================= DESIGN V2: tirage board + admin draw cards ================= */
.tirage-card { border-color: #dbe5f1; border-radius: 14px; }
.tirage-card::before { background: var(--accent-bg, #2f6bf2); }
.tirage-card:hover { box-shadow: 0 12px 26px -16px rgba(22, 38, 61, .28); }
.draw-card { border-color: #dbe5f1; border-radius: 14px; }
.draw-card:hover { border-color: #c4d6ee; box-shadow: 0 12px 26px -16px rgba(22, 38, 61, .28); }
.draw-card { border-left-color: var(--accent-bg, #2f6bf2); }
.draw-card .r-code-dot { background: var(--accent-bg, #2f6bf2); }
.t-countdown { background: #e9f1fe; color: #2f6bf2; }
.t-track { background: #e6edf7; }
.spark .bar i { background: linear-gradient(180deg, #8ab4f8, #2f6bf2); box-shadow: 0 8px 14px -8px rgba(47, 107, 242, .45); }
.stn-dd-sec-head { background: #f4f8fd; border-color: #dde8f5; }
.stn-dd-sec-head:hover { background: #e9f2fd; border-color: #cfe0f5; }
.usr-avatar.r-admin { background: linear-gradient(135deg, #38bdf8, #2f6bf2); box-shadow: 0 4px 10px -4px rgba(47, 107, 242, .5); }

/* ================= Station hero: floating balls (mirrors dashboard) ================= */
.hero-station .hero-balls { position: absolute; inset: 0; display: block; opacity: 1; pointer-events: none; }
.hero-station .hb {
    position: absolute; display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    font-weight: 800; font-size: .74rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
    color: #fff; text-shadow: 0 1px 4px rgba(15, 23, 42, .35);
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .28) 42%, rgba(255, 255, 255, .08) 70%);
    box-shadow: inset 0 -6px 12px rgba(15, 23, 42, .12), 0 8px 22px -8px rgba(15, 23, 42, .4);
    animation: hbFloat 7s ease-in-out infinite;
}
.hero-station .hb-1 { right: 38%; top: -12px; width: 32px; height: 32px; font-size: .64rem; opacity: .25; animation-delay: -.6s; }
.hero-station .hb-2 { right: 26%; bottom: -14px; opacity: .25; animation-delay: -2.4s; }
.hero-station .hb-3 { left: 22%; top: -16px; width: 30px; height: 30px; font-size: .64rem; opacity: .25; animation-delay: -3.8s; }
.hero-station .hb-4 { right: 10%; top: 18%; width: 46px; height: 46px; font-size: .82rem; opacity: .25; animation-delay: -1.3s; }
.hero-station .hb-5 { left: 44%; bottom: -10px; width: 26px; height: 26px; font-size: .6rem; opacity: .25; animation-delay: -5s; }
.hero-station .hero-main, .hero-station .hero-timeblock { z-index: 2; position: relative; }

/* ================= Hero box-shadow on header bands (except dashboard & station) ================= */
.tc-hero { box-shadow: 0 16px 38px -20px rgba(15, 26, 43, .55), inset 0 1px 0 rgba(255, 255, 255, .07); }
.salary-head { box-shadow: 0 16px 38px -20px rgba(15, 26, 43, .35), inset 0 1px 0 #fff; }

/* ================= Tickets page: hero card with matching shadow ================= */
.tix-head {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    box-shadow: 0 16px 38px -20px rgba(15, 26, 43, .35), inset 0 1px 0 #fff;
}

/* ================= All page headers: same hero card as tickets ================= */
.page-head {
    background: #fff;
    border-color: var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 38px -20px rgba(15, 26, 43, .35), inset 0 1px 0 #fff;
}

/* ================= Cleanup hero: floating balls (station styling) ================= */
.tc-hero .hero-balls { position: absolute; inset: 0; display: block; opacity: 1; pointer-events: none; }
.tc-hero .hb {
    position: absolute; display: grid; place-items: center;
    border-radius: 50%;
    font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em;
    color: #fff; text-shadow: 0 1px 4px rgba(15, 23, 42, .35);
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .28) 42%, rgba(255, 255, 255, .08) 70%);
    box-shadow: inset 0 -6px 12px rgba(15, 23, 42, .12), 0 8px 22px -8px rgba(15, 23, 42, .4);
    animation: hbFloat 7s ease-in-out infinite;
}
.tc-hero .hb { opacity: .25; border: 1px solid rgba(255, 255, 255, .35); }
.tc-hero .hb-1 { right: 38%; top: -12px; width: 32px; height: 32px; font-size: .64rem; animation-delay: -.6s; }
.tc-hero .hb-2 { right: 26%; bottom: -14px; width: 40px; height: 40px; font-size: .74rem; animation-delay: -2.4s; }
.tc-hero .hb-3 { left: 22%; top: -16px; width: 30px; height: 30px; font-size: .64rem; animation-delay: -3.8s; }
.tc-hero .hb-4 { right: 10%; top: 18%; width: 46px; height: 46px; font-size: .82rem; animation-delay: -1.3s; }
.tc-hero .hb-5 { left: 44%; bottom: -10px; width: 26px; height: 26px; font-size: .6rem; animation-delay: -5s; }
.tc-hero .tc-hero-main { z-index: 2; position: relative; }

/* Cleanup hero title white */
.tc-hero h2 { color: rgba(255, 255, 255, .86); text-shadow: 0 2px 12px rgba(15, 23, 42, .25); }

/* ================= Calm hovers + self-contained KPI grid ================= */
.fin-kpis { display: grid; gap: .85rem; margin-bottom: 1.2rem; }
.card, .stat, .tirage-card, .draw-card, .rd-card, .rank-row {
    transition: box-shadow .32s ease, border-color .32s ease, background-color .32s ease, transform .32s cubic-bezier(.33, .9, .35, 1);
}
.btn, .btn-deposit, .btn-withdraw, .btn-edit {
    transition: box-shadow .28s ease, border-color .28s ease, background-color .28s ease, color .28s ease, transform .28s cubic-bezier(.33, .9, .35, 1);
}
.card:hover, .stat:hover, .tirage-card:hover, .draw-card:hover, .rd-card:hover { transform: translateY(-0.5px); }
.tvm-x { transition: background-color .2s ease, color .2s ease, transform .25s ease; }
.tvm-x:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
    .card:hover, .stat:hover, .tirage-card:hover, .draw-card:hover, .rd-card:hover { transform: none; }
}

/* ================= Balance action buttons ================= */
.btn-deposit, .btn-withdraw, .btn-edit { border-width: 1.5px; font-weight: 700; }
.btn-deposit { background: #e9f9f1; border-color: #b5e6cf; color: #067647; }
.btn-deposit:hover { background: #d6f3e5; border-color: #7dd0ab; box-shadow: 0 2px 6px -3px rgba(6, 118, 71, .3); }
.btn-withdraw { background: #fdeef1; border-color: #f3c3cd; color: #b0203c; }
.btn-withdraw:hover { background: #fbdde3; border-color: #e79aab; box-shadow: 0 2px 6px -3px rgba(176, 32, 60, .3); }
.btn-edit { background: #e9f9f1; border-color: #b5e6cf; color: #067647; }
.btn-edit:hover { background: #d6f3e5; border-color: #7dd0ab; box-shadow: 0 2px 6px -3px rgba(6, 118, 71, .3); }
.btn-deposit .ico, .btn-edit .ico { color: #059669; }
.btn-withdraw .ico { color: #e11d48; }

/* Dashboard: slim the Top sellers bar */
.rank-bar { height: 4px; }

/* ================= Tickets view: tirage code chip ================= */
.tir-group-head .tirage-chip {
    padding: .16rem .5rem; border-radius: 5px;
    color: rgba(255, 255, 255, .92);
    font-size: .68rem; font-weight: 800; letter-spacing: .04em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* ================= Smooth row hover animation (all tables) ================= */
tbody tr, tbody tr td {
    transition: background-color .28s ease, box-shadow .28s ease;
}
tbody tr:hover {
    background: #f2f7fd;
}
tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--brand);
}
.tir-group-head, .usr-child, .rank-row {
    transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.rank-row:hover { transform: translateX(2px); }
.tir-group-head:hover { transform: translateX(2px); }

/* ================= Reprint button (tickets view) ================= */
.btn-reprint {
    background: #eef4fe; border: 1.5px solid #bfd6f7; color: #1d4ed8; font-weight: 700;
}
.btn-reprint .ico { color: #2563eb; }
.btn-reprint:hover {
    background: #dfeafc; border-color: #93bdf3; color: #1e40af;
    box-shadow: 0 3px 10px -4px rgba(37, 99, 235, .4);
    transform: translateY(-1px);
}
.btn-reprint:active { transform: none; }
a[href*='reprint'] .ico { vertical-align: -2px; }

/* ================= Management Console: counts, danger modal, integrity ================= */
.hstat .h-sub { display: block; font-size: .62rem; font-weight: 600; color: rgba(255, 255, 255, .55); margin-top: .1rem; }
.tc-actions-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 .2rem; }
.tc-dg-count { font-size: .82rem; color: var(--text); background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: .45rem .65rem; margin: 0 0 .2rem; }
#dgGo:disabled { opacity: .45; cursor: not-allowed; }
.tc-integrity { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .45rem; }
.tc-chk { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .38rem .6rem; border-radius: 9px; border: 1px solid var(--border); background: #f8fafc; color: #475569; }
.tc-chk .ico { width: 13px; height: 13px; }
.tc-chk.ok { border-color: #bbe7cd; background: #f1fbf5; color: #15803d; }
.tc-chk.bad { border-color: #f3c3cd; background: #fdf1f3; color: #b0203c; }
.tc-del-filtered { margin-top: .55rem; }

/* ================= FORM V2: inputs, selects, modals ================= */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
    min-height: 36px;
    padding: .38rem .7rem;
    border: 1px solid #cfdcec;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 38, 71, .04);
}
input[type="text"]:hover, input[type="password"]:hover, input[type="email"]:hover, input[type="number"]:hover,
input[type="tel"]:hover, input[type="url"]:hover, input[type="search"]:hover,
input[type="date"]:hover, input[type="datetime-local"]:hover, input[type="time"]:hover, select:hover, textarea:hover {
    border-color: #a9c4e2;
    background: #fff;
    box-shadow: 0 2px 8px -4px rgba(23, 51, 94, .14);
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, input[type="search"]:focus,
input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="time"]:focus,
select:focus, textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), 0 2px 8px -4px rgba(37, 99, 235, .18);
}
input:not(:placeholder-shown):not(:focus):not([type="hidden"]), select:not(:focus) {
    border-color: #cfdcec; background: #fff;
}
textarea { min-height: 74px; }
select { padding-right: 2rem; background-position: right .65rem center; }
input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 130px; }
input::placeholder, textarea::placeholder { color: #9db0c9; }

/* segmented / filter chips get the same 10px language */
.segmented { border-radius: 12px; }
.segmented .btn { border-radius: 9px; }
.btn-sm { border-radius: 9px; }

/* ---- modal chrome ---- */
.modal-overlay { background: rgba(9, 15, 26, .58); backdrop-filter: blur(4px); }
.modal-box {
    border: 1px solid #d7e2f1; border-radius: 18px;
    box-shadow: 0 30px 70px -22px rgba(9, 15, 26, .5), 0 4px 14px rgba(9, 15, 26, .1);
}
.modal-box > h3 {
    margin: -1.3rem -1.4rem 1rem; padding: .9rem 1.4rem .8rem;
    background: linear-gradient(180deg, #f6faff, #eef4fc);
    border-bottom: 1px solid #e0e9f4;
    font-size: 1rem; font-weight: 800; letter-spacing: -.012em;
}
.modal-box > h3 .ico {
    width: 28px; height: 28px; box-sizing: border-box; padding: 6px;
    background: #fff; border: 1px solid #d7e2f1; border-radius: 9px;
    color: var(--brand); box-shadow: 0 1px 3px rgba(23, 51, 94, .10);
}
.modal-box .modal-actions {
    margin: 1rem -1.4rem -1.3rem; padding: .8rem 1.4rem;
    background: linear-gradient(180deg, #f8fafd, #f2f6fb);
    border-top: 1px solid #e4ecf5;
    border-radius: 0 0 18px 18px;
}
.modal-box .field label { margin-bottom: .05rem; }
.modal-box { padding: 1.3rem 1.4rem; }
.modal-box .field + .field { margin-top: .3rem; }
/* usr-modal heads (users page) keep parity */
.modal-box .usr-modal-head {
    margin: -1.3rem -1.4rem 1rem; padding: .85rem 1.4rem;
    background: linear-gradient(180deg, #f6faff, #eef4fc);
    border-bottom: 1px solid #e0e9f4;
}
.modal-box .usr-modal-head h3 { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.modal-box .usr-modal-head .icon-btn { border: 1px solid #d7e2f1; background: #fff; border-radius: 9px; }

/* ================= FORM V3: slimmer controls + fixed select chevron ================= */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
    min-height: 32px;
    padding: .28rem .65rem;
    font-size: .84rem;
}
textarea { min-height: 64px; }
select {
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right .6rem center; background-size: 11px;
}
select:focus {
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
input:not(:placeholder-shown):not(:focus):not([type="hidden"]) { background-color: #fff; }
select:not(:focus) { background-color: #fff; }

/* ================= Users modals: field layout ================= */
.modal-box .field-group { gap: .6rem .8rem; }
.modal-box .field-group .field { min-width: 0; }
@media (max-width: 540px) {
    .modal-box .field-group { grid-template-columns: 1fr; }
}

/* Limits: inheritance summary tag */
.lim-inh-tag { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #0369a1; background: #e0f2fe; border-radius: 999px; padding: .05rem .4rem; vertical-align: 1px; }

/* ================= Fix: select option popup (weird OS highlight) ================= */
select, select:focus, select:hover { color-scheme: light; }
select option {
    background-color: #fff;
    color: #0f1b33;
    padding: .4rem .6rem;
}
select option:hover,
select option:focus,
select option:checked {
    background: #e8f1fd linear-gradient(0deg, #e8f1fd 0%, #e8f1fd 100%) !important;
    color: #1d4ed8 !important;
}
select optgroup { background-color: #fff; color: #0c1e3a; font-weight: 700; }
select option[disabled] { color: #9db0c9; background-color: #fff; }
/* visible selection inside text inputs (was transparent — text looked unselectable);
   only the native select popup keeps no highlight so picking options never flashes */
input::selection, textarea::selection { background: rgba(37, 99, 235, .22); }
select::selection { background: transparent; }

/* ================= Fix: remove stray blue row-hover line + alarm focus ================= */
tbody tr:hover td:first-child { box-shadow: none; }
a:focus-visible, button:focus-visible {
    outline: 2px solid rgba(71, 85, 105, .45);
    outline-offset: 2px;
}
.tir-group-head:focus, .tir-group-head:focus-visible,
.tir-group-head:hover { box-shadow: none; outline: none; }
.segmented .btn:focus, .segmented .btn:focus-visible { box-shadow: none; outline: none; }
select:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }

/* Limits: number-cap modal list */
.nr-num { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .04em; color: #0f1b33; background: #eef4fb; border: 1px solid #dbe6f2; border-radius: 6px; padding: .08rem .45rem; }

/* ================= Fix: light native widgets (dropdown popups, pickers) ================= */
:root, html, body { color-scheme: light; }
select option, select optgroup { color-scheme: light; }
/* pressed/open state must not flash a system-highlight background on the closed box */
select:active {
    background-color: #fff;
    border-color: var(--brand);
}
/* autofill used to paint a blue box inside forms */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--text);
    transition: background-color 9999s ease-in-out 0s;
}

/* ================= FINAL select-arrow override (kills tiled chevron) ================= */
select, select:hover, select:active, select:not(:focus) {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right .65rem center !important;
    background-size: 11px !important;
    padding-right: 2rem !important;
}
select:focus, select:focus-visible {
    background-color: #fff !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right .65rem center !important;
    background-size: 11px !important;
}

/* ================= Limits: per-tirage summary in number-caps drill-down ================= */
.lim-tir-summary { display: flex; flex-direction: column; gap: .3rem; padding: .5rem .2rem .1rem; }
.lim-tir-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .4rem .55rem; border: 1px solid var(--border-soft); border-radius: 9px; background: #fbfcfe; }
.lim-tir-row:hover { border-color: #cfe0f5; background: #f7fbff; }
.lim-tir-loc { font-weight: 600; font-size: .8rem; color: #334155; }
.lim-tir-caps { margin-left: auto; display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.lim-pill { font-size: .66rem; font-weight: 700; border-radius: 999px; padding: .1rem .5rem; background: #f1f5f9; color: #64748b; }
.lim-pill.own { background: #e0f2fe; color: #075985; }
.lim-pill.inh { background: #fef9c3; color: #854d0e; }
.lim-pill.unl { background: #dcfce7; color: #166534; }
.lim-pill.none { color: #94a3b8; }

/* --- Sign-out button inside POST form (CSRF) --- */
.nav-signout-form { margin: 0; }
.nav-signout-form .nav-item { width: 100%; text-align: left; background: none; cursor: pointer; font-family: inherit; font-size: .86rem; }
.nav-signout-form .nav-item:focus-visible { outline: 2px solid #fecdd3; outline-offset: 1px; }

/* --- Draggable modal dialogs (see app.js) --- */
.usr-modal-head, .tvm-head, .stn-modal-head, .modal-head, .modal-box h3 { cursor: grab; touch-action: none; }
.modal-box.is-dragging, .tvm-card.is-dragging, .stn-modal.is-dragging, .modal-box.is-dragging *, .tvm-card.is-dragging *, .stn-modal.is-dragging * { cursor: grabbing !important; user-select: none; }
.modal-box.is-dragging, .tvm-card.is-dragging, .stn-modal.is-dragging { will-change: transform; }

/* ================= Mobile polish pass ================= */
/* iOS/Android auto-zoom when a focused control is under 16px */
@media (hover: none) and (pointer: coarse) {
    input[type="text"], input[type="password"], input[type="email"], input[type="number"],
    input[type="tel"], input[type="url"], input[type="search"],
    input[type="date"], input[type="datetime-local"], input[type="time"],
    input[type="month"], input[type="week"], select, textarea {
        font-size: 1rem;
    }
}

/* Limits usage strip chips (previously unstyled) */
.lim-usage-strip { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.lu-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: #475569; background: #eef4fb; border: 1px solid #d7e6f7; border-radius: 999px; padding: .28rem .6rem; }
.lu-chip b { font-variant-numeric: tabular-nums; color: #0c1e3a; }
.lu-chip.lu-warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.lu-chip.lu-bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Narrow phones: let nested matrix/member headers wrap instead of overflow */
@media (max-width: 640px) {
    .tir-group-head, .lim-member-head { flex-wrap: wrap; }
    .tir-group-head .wt-seller-right, .lim-member-head .wt-seller-right { margin-left: 0; flex-basis: 100%; justify-content: flex-end; }
    .lim-caps-btn { margin-left: auto; }
}

/* Ticket-cleanup entry previews: allow horizontal scroll instead of clipping */
.tc-entries { overflow-x: auto; }

/* Number-risk category cards: fit below 320px */
.nr-cat-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

/* ================= Live cap-watch strip + language switcher ================= */
.risk-pulse {
    display: flex; align-items: center; flex-wrap: wrap; gap: .55rem;
    margin: .1rem 0 .95rem; padding: .6rem .85rem;
    border-radius: 12px; font-size: .85rem; border: 1px solid transparent;
}
.risk-pulse[hidden] { display: none; }
.risk-pulse.rp-warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.risk-pulse.rp-bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.risk-pulse .rp-badge { font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: .68rem; padding: .18rem .5rem; border-radius: 999px; background: rgba(0,0,0,.06); }
.risk-pulse.rp-bad .rp-badge { background: #dc2626; color: #fff; animation: rpPulse 1.4s ease-in-out infinite; }
.risk-pulse .rp-summary { font-weight: 700; }
.risk-pulse .rp-worst { font-family: ui-monospace, Consolas, monospace; opacity: .9; }
.risk-pulse .rp-link { margin-left: auto; font-weight: 700; color: inherit; text-decoration: underline; }
@keyframes rpPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5);} 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0);} }
@media (prefers-reduced-motion: reduce) { .risk-pulse.rp-bad .rp-badge { animation: none; } }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.topbar-right .topbar-user { margin-left: 0; }
.lang-switch { display: inline-flex; align-items: center; gap: .1rem; padding: .12rem .3rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.lang-switch .ico { width: 15px; height: 15px; color: var(--muted); margin: 0 .1rem 0 .25rem; }
.lang-opt { font-size: .72rem; font-weight: 800; letter-spacing: .02em; color: var(--muted); text-decoration: none; padding: .2rem .42rem; border-radius: 999px; }
.lang-opt:hover { color: var(--brand); background: #eef5ff; }
.lang-opt.on { color: #fff; background: var(--brand); }
.manual-link {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .72rem; font-weight: 800; letter-spacing: .02em;
    color: var(--muted); text-decoration: none;
    border: 1px solid var(--border); border-radius: 999px; background: #fff; padding: .24rem .55rem;
}
.manual-link .ico { width: 14px; height: 14px; }
.manual-link:hover { color: var(--brand); background: #eef5ff; border-color: #bfd6f7; }
.manual-link.active { color: var(--brand-dark); background: #e3efff; border-color: #bfd6f7; }
@media (max-width: 640px) { .manual-link-txt { display: none; } }

/* ================= LIGHT-BLUE HEROES: match the page palette ================= */
.hero, .tc-hero {
    background: linear-gradient(225deg, #dcedfa 0%, #c2d9ef 52%, #a9caea 100%);
    border: 1px solid #b3cfe9;
    color: #12315c;
    box-shadow: 0 14px 32px -22px rgba(23, 51, 94, .3), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.hero-home {
    background:
        radial-gradient(90% 130% at 0% 0%, rgba(255, 255, 255, .6), transparent 45%),
        linear-gradient(128deg, #dcedfa 0%, #c2d9ef 55%, #a9caea 100%);
    border: 1px solid #b3cfe9;
    color: #12315c;
    box-shadow: 0 14px 32px -22px rgba(23, 51, 94, .3), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.hero::before, .tc-hero::before {
    background:
        radial-gradient(520px 240px at 0% -8%, rgba(255, 255, 255, .8), transparent 62%),
        radial-gradient(380px 200px at 110% 108%, rgba(255, 255, 255, .5), transparent 65%);
}

.hero-kicker { color: #55709a; }
.hero-main h2, .tc-hero h2 {
    color: #0f2547; text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.hero-home .hero-hi-txt h2 { color: #0f2547; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.hero-main p { color: #3d5a82; }
.hero-date { color: #55709a; }

.hero-open, .hero-next,
.hero-home .hero-open, .hero-home .hero-next {
    background: rgba(255, 255, 255, .72); border: 1px solid #cfe0f2;
    color: #1d4ed8; box-shadow: inset 0 1px 0 #fff;
}
.hero-open.is-off { background: #e9eff7; color: #64748b; }
.hero-next .t-countdown { background: #e9f1fe; color: #2f6bf2; box-shadow: none; }

.hero-clock, .hero-home .hero-clock {
    background: rgba(255, 255, 255, .85); border: 1px solid #cfe0f2;
    color: #0f1b33; text-shadow: none;
    box-shadow: 0 1px 2px rgba(16, 38, 71, .05), inset 0 1px 0 #fff;
}
.hero-home .hero-timeblock {
    background: rgba(255, 255, 255, .6); border: 1px solid #d3e4f5; border-left-color: #c2d9f0;
    box-shadow: inset 0 1px 0 #fff;
}
.htb-k { color: #55709a; }
.htb-scope {
    color: #92400e; background: #fef3c7; border: 1px solid #fde68a;
}

.hstat, .tc-hero .hstat {
    background: rgba(255, 255, 255, .72); border: 1px solid #cfe0f2;
    box-shadow: inset 0 1px 0 #fff;
}
.hstat .h-label, .tc-hero .h-label { color: #55709a; }
.hstat .h-val, .tc-hero .h-val { color: #0f2547; }
.hstat .h-val.accent { color: #b45309; }
.hstat .h-sub { color: #7186a5; }

.hs-k, .hs-hours { color: #55709a; }
.hs-pct { color: #12315c; text-shadow: none; }
.hs-track, .hero-shift .hs-track { background: #c3d9ee; box-shadow: inset 0 1px 2px rgba(23, 51, 94, .12); }
.hs-fill, .hero-shift .hs-fill {
    background: linear-gradient(90deg, #7db4f5, var(--brand));
    box-shadow: 0 0 10px rgba(37, 99, 235, .35);
}
.hs-now { background: var(--brand-dark); box-shadow: 0 0 6px rgba(37, 99, 235, .6); }

.hero-role { color: #1d4ed8; background: rgba(255, 255, 255, .78); border: 1px solid #c3d9f2; box-shadow: none; }
.hero-role-admin { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.hero-role-member { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }

.hero-home .hero-balls .hb, .hero-station .hero-balls .hb, .tc-hero .hero-balls .hb {
    color: #3b6fb5; text-shadow: none; opacity: .55;
    background: radial-gradient(circle at 32% 28%, #fff, #eaf3fc 42%, #cfe3f5 78%);
    border: 1px solid #c0d7ef;
    box-shadow: inset 0 -6px 12px rgba(37, 99, 235, .08), 0 8px 22px -10px rgba(37, 99, 235, .25);
}

.btn-light {
    background: linear-gradient(135deg, #2f6bf2 0%, #1d4ed8 100%);
    color: #fff; border-color: transparent;
    box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-light:hover { background: linear-gradient(135deg, #3b76f5 0%, #2056dd 100%); color: #fff; box-shadow: 0 12px 24px -8px rgba(37, 99, 235, .6); }
.btn-ghost-light {
    background: rgba(255, 255, 255, .78); color: var(--brand-dark); border-color: #bcd6ef;
    box-shadow: inset 0 1px 0 #fff;
}
.btn-ghost-light:hover { background: #fff; color: var(--brand-deep); border-color: #93bdf3; }

/* ---- every page header band (.page-head / .tix-head) ---- */
.page-head, .tix-head {
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, .55), transparent 45%),
        linear-gradient(135deg, #dcedfa 0%, #c2d9ef 55%, #a9caea 100%);
    border-color: #b3cfe9;
    box-shadow: 0 14px 32px -22px rgba(23, 51, 94, .3), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.page-head::after { background: radial-gradient(circle, rgba(37, 99, 235, .08) 0%, transparent 70%); }

/* ---- salary report band ---- */
.salary-head {
    background: linear-gradient(100deg, #dcedfa 0%, #c2d9ef 60%, #a9caea 100%);
    border-color: #b3cfe9;
    border-left-color: #1074c6;
    box-shadow: 0 14px 32px -22px rgba(23, 51, 94, .3), inset 0 1px 0 rgba(255, 255, 255, .7);
}

/* ---- darker hairline on the bottom edge of every band ---- */
.hero, .tc-hero, .hero-home, .page-head, .tix-head, .salary-head, .auth-panel {
    border-bottom: .5px solid var(--hero-edge);
}

/* ---- auth (login) hero panel: keep the original dark navy ---- */
.auth-panel {
    background: linear-gradient(180deg, #0f2547 0%, #14335e 48%, #1a4176 100%);
}
.auth-panel::before { background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 68%); }
.auth-panel::after { background: radial-gradient(circle, rgba(56, 132, 222, .25), transparent 70%); }
.auth-body {
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(37, 99, 235, .28), transparent 55%),
        radial-gradient(700px 380px at 110% 110%, rgba(16, 163, 74, .12), transparent 50%),
        linear-gradient(165deg, #0f2547 0%, #14335e 48%, #1a4176 100%);
}
.auth-shell { box-shadow: 0 40px 90px -24px rgba(2, 8, 25, .7), 0 0 0 1px rgba(255, 255, 255, .06); }

/* ================= SIDEBAR NAV: deep blue to match the hero family ================= */
.sidebar {
    color: #b9cbe2;
    background: linear-gradient(180deg, #0f2547 0%, #14335e 48%, #1a4176 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
}
.sidebar::before {
    background:
        radial-gradient(520px 240px at 0% -8%, rgba(56, 132, 222, .22), transparent 62%),
        radial-gradient(380px 200px at 110% 108%, rgba(37, 99, 235, .16), transparent 65%);
}
.brand { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand strong { color: #fff; }
.brand small { color: #8ba3c7; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); }
.nav-label { color: #7e95ba; }
.nav-item { color: #b3c4de; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-ico { background: rgba(255, 255, 255, .06); color: #9fb4d2; }
.nav-item:hover .nav-ico { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user {
    color: #e6edf7;
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .09);
}
.side-user:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); }
.side-user-meta strong { color: #fff; }
.side-user-meta small { color: #8ba3c7; }
.nav-signout { color: #8ba0c0; }
.nav-signout:hover { color: #fecdd3; background: rgba(225, 29, 72, .16); }
.nav-signout:hover .nav-ico { background: rgba(225, 29, 72, .24); color: #fecdd3; }

/* ================= NAV ENHANCEMENTS: collapse, accordion, indicators ================= */
/* Active accent bar + hover polish */
.nav-item {
    position: relative;
}
.nav-item::before {
    content: "";
    position: absolute; left: 0; top: 50%;
    width: 3px; height: 0;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #4fc3f7, #38bdf8);
    transform: translateY(-50%);
    opacity: 0;
    transition: height .16s ease, opacity .16s ease;
}
.nav-item:hover::before { height: 40%; opacity: .55; }
.nav-item.active {
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .8), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.nav-item.active::before { height: 100%; opacity: 1; }
.nav-item.active .nav-item-txt { font-weight: 700; }

/* Collapse toggle button in the brand row */
.nav-collapse-toggle {
    margin-left: auto;
    flex: 0 0 auto;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border: 0; border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #a8bcda;
    cursor: pointer;
    transition: background .14s, color .14s, transform .14s;
}
.nav-collapse-toggle:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.nav-collapse-toggle .nav-collapse-ico { width: 15px; height: 15px; display: grid; place-items: center; }
.nav-collapse-toggle .nav-collapse-ico .ico { width: 15px; height: 15px; transition: transform .18s ease; }

/* Group accordion label → button style */
.nav-label-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 0; margin: 0;
    background: none; border: 0; cursor: pointer; text-align: left;
    border-radius: 9px;
    transition: background .14s ease, color .14s ease;
}
.nav-label-toggle:hover { background: rgba(255, 255, 255, .06); }
.nav-label-toggle:active { transform: scale(.99); }
.nav-label-toggle .nav-label {
    padding: .5rem .7rem .25rem; color: #7e95ba;
    transition: color .14s ease;
}
.nav-label-toggle:hover .nav-label { color: #a9badb; }
.nav-label-toggle .nav-label-chev { color: #5f7291; transition: transform .18s ease, color .14s ease; }
.nav-label-toggle:hover .nav-label-chev { color: #93a6c8; }
.nav-label-chev {
    width: 20px; height: 18px; display: grid; place-items: center;
    margin-right: .3rem;
}
.nav-label-chev .ico { width: 15px; height: 15px; }
.nav-group.is-open .nav-label-chev { transform: rotate(180deg); }
.nav-group-items { overflow: hidden; max-height: 0; transition: max-height .22s ease; }
.nav-group.is-open .nav-group-items { max-height: 600px; }

/* Divider between nav sections */
.nav-group { position: relative; }
.nav-group + .nav-group::before {
    content: "";
    display: block;
    height: 1px;
    margin: .35rem .9rem .55rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03) 65%, transparent);
}
.nav-group + .nav-group { margin-top: 0; }

/* Collapsed (mini) sidebar */
.sidebar.nav-collapsed { width: 64px; }
.sidebar.nav-collapsed .brand { justify-content: center; padding: 1.1rem .4rem 1rem; gap: 0; }
.sidebar.nav-collapsed .brand-mark,
.sidebar.nav-collapsed .brand-txt { display: none; }
.sidebar.nav-collapsed .nav-collapse-toggle { margin-left: 0; width: 32px; height: 32px; }
.sidebar.nav-collapsed .brand-txt,
.sidebar.nav-collapsed .nav-item-txt,
.sidebar.nav-collapsed .nav-cta-txt,
.sidebar.nav-collapsed .nav-label,
.sidebar.nav-collapsed .nav-label-chev,
.sidebar.nav-collapsed .side-user-meta { display: none; }
.sidebar.nav-collapsed .nav-label-toggle { display: none; }
.sidebar.nav-collapsed .nav-collapse-toggle .nav-collapse-ico .ico { transform: rotate(180deg); }
.sidebar.nav-collapsed .nav-cta {
    margin: .75rem .4rem .3rem; padding: .62rem 0; font-size: 0;
}
.sidebar.nav-collapsed .nav-cta .ico { width: 18px; height: 18px; }
.sidebar.nav-collapsed .nav { padding: .4rem .45rem .6rem; }
.sidebar.nav-collapsed .nav-group { margin: .1rem 0 .35rem; }
.sidebar.nav-collapsed .nav-group + .nav-group::before { margin: .3rem .55rem .4rem; }
.sidebar.nav-collapsed .nav-group-items { max-height: none; }
.sidebar.nav-collapsed .nav-item {
    justify-content: center; padding: .5rem .2rem; gap: 0;
}
.sidebar.nav-collapsed .nav-item::before { left: -2px; }
.sidebar.nav-collapsed .nav-ico { width: 32px; height: 32px; }
.sidebar.nav-collapsed .side-user { justify-content: center; padding: .5rem 0; }
.sidebar.nav-collapsed .nav-signout { justify-content: center; padding: .5rem 0; }
.sidebar.nav-collapsed .nav-signout .nav-ico { margin: 0; }
@media (max-width: 760px) {
    .sidebar.nav-collapsed { width: 252px; }
    .sidebar.nav-collapsed .brand-mark { display: grid; }
    .sidebar.nav-collapsed .brand-txt,
    .sidebar.nav-collapsed .nav-item-txt,
    .sidebar.nav-collapsed .nav-cta-txt,
    .sidebar.nav-collapsed .nav-label,
    .sidebar.nav-collapsed .nav-label-chev,
    .sidebar.nav-collapsed .side-user-meta { display: initial; }
    .sidebar.nav-collapsed .brand { justify-content: flex-start; gap: .7rem; }
    .sidebar.nav-collapsed .nav-label-toggle { display: flex; }
    .sidebar.nav-collapsed .nav-cta { font-size: .85rem; padding: .62rem .8rem; margin: .85rem .75rem .35rem; }
    .sidebar.nav-collapsed .nav-cta .ico { width: 16px; height: 16px; }
    .sidebar.nav-collapsed .nav { padding: .45rem .7rem .8rem; }
    .sidebar.nav-collapsed .nav-group-items { max-height: 0; }
    .sidebar.nav-collapsed .nav-group.is-open .nav-group-items { max-height: 600px; }
    .sidebar.nav-collapsed .nav-item { justify-content: flex-start; padding: .42rem .5rem; gap: .6rem; }
    .sidebar.nav-collapsed .nav-item::before { left: 0; }
    .sidebar.nav-collapsed .nav-ico { width: 28px; height: 28px; }
    .sidebar.nav-collapsed .side-user { justify-content: flex-start; padding: .5rem .55rem; }
    .sidebar.nav-collapsed .nav-signout { justify-content: flex-start; padding: .42rem .5rem; }
    .sidebar.nav-collapsed .nav-collapse-toggle .nav-collapse-ico .ico { transform: rotate(0); }
}



/* ================= CARDS: .5px hairline in the hero edge color ================= */
.card, .stat, .tirage-card, .draw-card, .rd-card, .result-card, .nr-cat-card, .tvm-card, .modal-box {
    border-width: .5px;
    border-color: var(--hero-edge);
}
.draw-card {
    border-left-width: 4px;
    border-left-color: var(--accent-bg, #2563eb);
}
.card:hover, .stat:hover, .draw-card:hover, .rd-card:hover, .result-card:hover { border-color: #6894c4; }

/* ---- topbar hairline in the hero edge color ---- */
.topbar { border-bottom: .5px solid var(--hero-edge); }

/* ================= CARDS: very light blue tint (soft #d7e9f5) ================= */
.card, .stat, .tirage-card, .draw-card, .rd-card, .result-card, .nr-cat-card, .tvm-card, .modal-box, .station-ticket-card {
    background: linear-gradient(180deg, #fbfdfe 0%, #f4f9fd 100%);
}
.tirage-card.is-open { background: linear-gradient(180deg, #eefaf4 0%, #f7fbfe 58%); }
.tirage-card.is-soon { background: linear-gradient(180deg, #f5f3fd 0%, #f7f9fe 62%); }
.nr-cat-card .nr-cat-head { background: #f2f8fd; }

/* ================= INPUTS: .5px hairline in the hero edge color ================= */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
    border-width: .5px;
    border-color: var(--hero-edge);
}
input[type="text"]:hover, input[type="password"]:hover, input[type="email"]:hover, input[type="number"]:hover,
input[type="tel"]:hover, input[type="url"]:hover, input[type="search"]:hover,
input[type="date"]:hover, input[type="datetime-local"]:hover, input[type="time"]:hover, select:hover, textarea:hover {
    border-color: #6894c4;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, input[type="search"]:focus,
input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="time"]:focus,
select:focus, textarea:focus {
    border-color: var(--brand);
}

/* ================= Station slip: tirages side by side (up to 3 across) ================= */
.pending-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .5rem .6rem;
    align-items: start;
}
.pending-group { min-width: 0; grid-column: span 2; margin-bottom: 0; }
.pending-group:only-child { grid-column: span 6; }
.pending-group:first-child:nth-last-child(2),
.pending-group:first-child:nth-last-child(2) ~ .pending-group { grid-column: span 3; }
@media (max-width: 560px) {
    .pending-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pending-group,
    .pending-group:first-child:nth-last-child(2),
    .pending-group:first-child:nth-last-child(2) ~ .pending-group { grid-column: span 1; }
    .pending-group:only-child { grid-column: span 2; }
}
@media (max-width: 380px) {
    .pending-list { grid-template-columns: 1fr; }
    .pending-group, .pending-group:only-child { grid-column: auto; }
}
.pending-list, .station-ticket-card .pending-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}
.pending-group {
    max-height: 272px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fbfdfe;
    border: 1px solid #dbe8f6;
    border-radius: 12px;
    padding: 0 .25rem;
    scrollbar-width: thin;
    scrollbar-color: #c9dcf1 transparent;
}
.pending-group:first-child:nth-last-child(n+4),
.pending-group:first-child:nth-last-child(n+4) ~ .pending-group { max-height: 152px; }

/* 3 tirages or less: roomier type */
.pending-group:first-child:nth-last-child(-n+3),
.pending-group:first-child:nth-last-child(-n+3) ~ .pending-group { font-size: .88rem; }
.pending-group:first-child:nth-last-child(-n+3) .p-num,
.pending-group:first-child:nth-last-child(-n+3) ~ .pending-group .p-num { font-size: .92rem; }
.pending-group:first-child:nth-last-child(-n+3) .p-amt,
.pending-group:first-child:nth-last-child(-n+3) ~ .pending-group .p-amt { font-size: .86rem; }
.pending-group:first-child:nth-last-child(-n+3) .tirage-chip,
.pending-group:first-child:nth-last-child(-n+3) ~ .pending-group .tirage-chip { font-size: .66rem; padding: .14rem .5rem; }
.pending-group:first-child:nth-last-child(-n+3) .pg-count,
.pending-group:first-child:nth-last-child(-n+3) ~ .pending-group .pg-count { font-size: .64rem; }
.pending-group:first-child:nth-last-child(-n+3) .pg-sub,
.pending-group:first-child:nth-last-child(-n+3) ~ .pending-group .pg-sub { font-size: .72rem; }
.pending-group::-webkit-scrollbar { width: 6px; }
.pending-group::-webkit-scrollbar-thumb { background: #c9dcf1; border-radius: 8px; }
.pending-group-head {
    position: sticky; top: 0; z-index: 1;
    background: #fbfdfe;
    border-bottom: 1px solid #eaf2fa;
    margin: 0 -.25rem; padding-left: .4rem; padding-right: .4rem;
}
.pending-list .pending-item {
    padding: .26rem .45rem .26rem .55rem;
    gap: .45rem;
    margin-bottom: .26rem;
    border-radius: 9px;
}
.pending-list .pending-item .p-num { font-size: .82rem; }
.pending-list .pending-item .p-amt { font-size: .78rem; }
.pending-list .pending-item .p-box { font-size: .56rem; padding: .04rem .3rem; }
.pending-list .pending-item .icon-btn { padding: .08rem .32rem; font-size: .72rem; }
.pending-group-head { padding-top: .18rem; padding-bottom: .2rem; }
.pending-group-head .tirage-chip { font-size: .6rem; padding: .12rem .45rem; }
.pending-group-head .pg-count { font-size: .6rem; }
.pending-group-head .pg-sub { font-size: .66rem; }

/* ================= STATION HERO: $ amount + 7-day spark (replaces clock/date) ================= */
.stn-money { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; position: relative; z-index: 1; }
.stn-money .h-label { font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #55709a; }
.hero-bignum { font-size: 1.5rem; font-weight: 700; color: #0f2547; line-height: 1.05; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.stn-spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: .15rem; }
.stn-spark .sb {
    width: 9px; border-radius: 3px 3px 1px 1px; display: block;
    background: linear-gradient(180deg, #8fb8e6, #5b8fc9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: filter .12s;
}
.stn-spark .sb:hover { filter: brightness(1.12); }
.stn-spark .sb.is-today { background: var(--grad); box-shadow: 0 2px 6px -2px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
@media (max-width: 640px) {
    .stn-money { align-items: flex-start; }
    .hero-bignum { font-size: 1.25rem; }
}

/* ================= LOGIN: lighter backdrop + form polish ================= */
.auth-body {
    background:
        radial-gradient(rgba(177, 206, 238, .10) 1.5px, transparent 1.7px) 0 0 / 26px 26px,
        radial-gradient(560px 340px at 88% -6%, rgba(124, 58, 237, .20), transparent 60%),
        radial-gradient(700px 400px at 4% 104%, rgba(37, 99, 235, .30), transparent 55%),
        linear-gradient(165deg, #24568f 0%, #1f4c87 48%, #173a6b 100%);
    background-attachment: fixed;
}
.auth-shell { box-shadow: 0 30px 70px -24px rgba(2, 12, 30, .55), 0 0 0 1px rgba(255, 255, 255, .14); }
.auth-card { animation: authRise .4s ease both; }
@keyframes authRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-card h2 { font-size: 1.5rem; letter-spacing: -.025em; }
.auth-badge {
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; color: #fff;
    background: var(--grad);
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
    margin-bottom: 1rem;
}
.auth-badge .ico { width: 22px; height: 22px; }
.auth-card .auth-input { position: relative; display: flex; align-items: center; }
.auth-card .auth-input > .ico:first-child {
    position: absolute; left: .8rem; width: 16px; height: 16px;
    color: #9bacc4; pointer-events: none; transition: color .15s;
}
.auth-card .auth-input:focus-within > .ico:first-child { color: var(--brand); }
.auth-card .auth-input input {
    width: 100%; height: 46px; padding: 0 2.7rem 0 2.35rem;
    border-radius: 12px; font-size: .93rem;
}
.auth-card .auth-eye {
    position: absolute; right: .45rem; display: grid; place-items: center;
    width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px;
    background: transparent; color: #94a3b8; cursor: pointer;
    transition: background .12s, color .12s;
}
.auth-card .auth-eye:hover { background: #eef4fb; color: var(--brand); }
.auth-card .auth-eye span { display: grid; place-items: center; }
.auth-card .auth-eye .ico { width: 17px; height: 17px; }
.auth-card .auth-eye .ic-eye-off { display: none; }
.auth-card .auth-eye.is-on .ic-eye { display: none; }
.auth-card .auth-eye.is-on .ic-eye-off { display: grid; }
.auth-card .auth-submit {
    height: 46px; border-radius: 12px; font-size: .95rem;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.auth-card .auth-submit .ico { width: 16px; height: 16px; transition: transform .15s; }
.auth-card .auth-submit:hover .ico { transform: translateX(3px); }
.auth-card .auth-links {
    margin-top: 1.15rem; padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
}

/* Auth page enhancements: header row, label row w/ forgot, options, footer */
.auth-card .auth-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.6rem; }
.auth-card .auth-head .auth-badge { margin-bottom: 0; flex: 0 0 auto; }
.auth-card .auth-head h2 { margin-bottom: .1rem; }
.auth-card .auth-head .auth-sub { margin-bottom: 0; }
.auth-card .auth-label-row { display: flex; align-items: center; justify-content: space-between; }
.auth-card .auth-label-row label { margin-bottom: 0; }
.auth-forgot { font-size: .8rem; font-weight: 600; color: var(--brand); }
.auth-forgot:hover { text-decoration: underline; }
.auth-options { margin: -.1rem 0 .15rem; }
.auth-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); cursor: pointer; user-select: none; }
.auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check > span {
    width: 17px; height: 17px; border-radius: 5px;
    border: 1.5px solid var(--border); background: #fff;
    display: grid; place-items: center; color: transparent; transition: all .12s;
}
.auth-check > span .ico { width: 12px; height: 12px; }
.auth-check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.auth-check:hover > span { border-color: var(--brand); }
.auth-foot-row { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: .55rem; align-items: center; }
.auth-secure { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: #9bacc4; margin: 0; }
.auth-secure .ico { width: 15px; height: 15px; color: #22c55e; }
.auth-register { margin: 0; font-size: .86rem; color: var(--muted); }
.auth-register a { color: var(--brand); font-weight: 600; }

/* ================= TOPBAR: today's $ amount + 7-day spark ================= */
.topbar-stat {
    display: flex; align-items: center; gap: .7rem;
    margin-left: .4rem; padding-left: 1.1rem;
    border-left: 1px solid rgba(15, 37, 71, .16);
}
.topbar-stat .ts-val { font-size: 1.02rem; font-weight: 700; color: #0f2547; letter-spacing: .01em; }
.topbar-stat .ts-spark { height: 20px; margin-top: 0; }
.topbar-stat .sb {
    width: 6px; border-radius: 2px 2px 1px 1px;
    background: #a9c8e8; box-shadow: none;
}
.topbar-stat .sb:hover { filter: brightness(1.05); }
.topbar-stat .sb.is-today { background: var(--grad); box-shadow: 0 1px 4px -1px rgba(37, 99, 235, .5); }
@media (max-width: 900px) { .topbar-stat .ts-spark { display: none; } }
@media (max-width: 560px) { .topbar-stat { display: none; } }

/* ================= TOPBAR: dark frosted band, light text ================= */
.topbar {
    background: linear-gradient(90deg, rgba(122, 166, 208, .70) 0%, rgba(148, 186, 224, .64) 30%, rgba(170, 203, 234, .56) 50%, rgba(148, 186, 224, .64) 70%, rgba(122, 166, 208, .70) 100%);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-bottom: 1px solid rgba(15, 37, 71, .15);
    box-shadow: 0 1px 2px rgba(16, 38, 71, .08), 0 3px 10px -5px rgba(23, 51, 94, .20), 0 8px 18px -10px rgba(37, 99, 235, .28);
    color: #1e3a5f;
}
.topbar-title h1 { color: #0f2547; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.topbar .icon-btn { background: rgba(255, 255, 255, .55); border-color: rgba(15, 37, 71, .14); color: #1e3a5f; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .75); border-color: rgba(15, 37, 71, .24); color: #0f2547; }
.topbar .lang-switch { background: rgba(255, 255, 255, .55); border-color: rgba(15, 37, 71, .14); }
.topbar .lang-switch .ico { color: #5b7ba3; }
.topbar .lang-opt { color: #3b5b82; }
.topbar .lang-opt:hover { color: #0f2547; background: rgba(255, 255, 255, .6); }
.topbar .lang-opt.on { color: #fff; background: var(--brand); }
.topbar .manual-link { background: rgba(255, 255, 255, .55); border-color: rgba(15, 37, 71, .14); color: #3b5b82; }
.topbar .manual-link:hover { background: rgba(255, 255, 255, .75); border-color: rgba(15, 37, 71, .24); color: #0f2547; }
.topbar .user-meta strong { color: #0f2547; }
.topbar .user-meta small { color: #55709a; }
.topbar .topbar-stat { border-left-color: rgba(15, 37, 71, .22); }
.topbar .topbar-stat .ts-val { color: #0f2547; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.topbar .topbar-stat .sb { background: rgba(15, 45, 80, .30); box-shadow: none; }
.topbar .topbar-stat .sb:hover { filter: brightness(1.15); }
.topbar .topbar-stat .sb.is-today { background: linear-gradient(180deg, #2563eb, #173d9e); box-shadow: 0 1px 4px -1px rgba(37, 99, 235, .45); }

/* ---- dashboard hero: roomier Next-close pill ---- */
.hero-next { padding-left: .9rem; padding-right: .9rem; }

/* ==========================================================================
   DASHBOARD POLISH — layout rhythm, hierarchy & visual refinement
   ========================================================================== */

/* Vertical rhythm between the major dashboard blocks */
.dash .hero-home { margin-bottom: 1.15rem; }
.dash .risk-pulse { margin-bottom: 1.05rem; }
.dash .stat-grid.dash-kpis { margin-bottom: 1.05rem; }
.dash-board, .dash-mid, .dash-split { margin-bottom: 1.25rem; }

/* KPI cards: cleaner icon tile + clearer value hierarchy */
.dash-kpi .s-ico {
    width: 40px; height: 40px; border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.dash-kpi .s-body .value { font-size: 1.5rem; letter-spacing: -.02em; }
.dash-kpi .s-body .label { letter-spacing: .02em; }
.dash-kpi .kpi-delta {
    display: inline-flex; align-items: center; gap: .3rem;
    margin-top: .4rem; padding: .16rem .55rem; border-radius: 999px;
    font-size: .68rem;
}
.dash-kpi .kpi-delta.up   { background: #e7f6ee; color: var(--success); }
.dash-kpi .kpi-delta.down { background: #fdecec; color: var(--danger); }
.dash-kpi .kpi-spark { margin-top: .25rem; padding-top: .5rem; }

/* Section headings: consistent accent rule + tone */
.dash .card-head h3,
.dash-board .card-head h3 {
    position: relative; padding-left: .7rem;
}
.dash .card-head h3::before,
.dash-board .card-head h3::before {
    content: "";
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 1.05em;
    border-radius: 3px;
    background: linear-gradient(180deg, #4fc3f7, #6366f1);
    opacity: .9;
}

/* Mid-column stat tiles: soft surface + tabular alignment */
.dash .hour-stat,
.dash .week-stats .hour-stat {
    padding: .65rem .75rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #f5f9fe, #fff);
    border: 1px solid var(--hero-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.dash .hour-stat .hs-v { font-size: 1.05rem; letter-spacing: -.01em; }
.dash .hour-stat .hs-k { letter-spacing: .06em; }

/* Rank & draw rows: tighter, quieter dividers */
.dash .rank-row,
.draw-split-row {
    border-radius: 10px;
    transition: background .15s;
}
.dash .rank-row:hover,
.draw-split-row:hover { background: rgba(37, 99, 235, .05); }
.dash .rank-pos {
    width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0;
    display: grid; place-items: center;
    background: #eef4ff; color: var(--brand); font-weight: 800; font-size: .72rem;
}
.dash .rank-amt { font-variant-numeric: tabular-nums; }

/* Recent-ticket feed: subtle polish on hover + paid/unpaid affordance */
.tix-feed-row { border-left: 3px solid transparent; transition: background .15s, border-color .15s; }
.tix-feed-row:hover { border-left-color: var(--brand); background: #f7fbff; }
.tix-feed-amt { font-variant-numeric: tabular-nums; }

/* Tirage board cards: calmer hover lift */
.tirage-card { transition: transform .15s, box-shadow .18s, border-color .15s; }
.dash-board .tirage-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #c3d6ef;
}

@media (max-width: 760px) {
    .dash-kpi .s-body .value { font-size: 1.3rem; }
    .dash .hero-home { margin-bottom: .9rem; }
}

/* ==========================================================================
   SIDEBAR NAV - aurora: cursor spotlight + hover polish (final layer)
   ========================================================================== */

/* ---- New Ticket CTA: same style as Save Ticket (.btn-primary) + thin ring ---- */
.nav-cta {
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 700; font-size: .9rem;
    background:
        var(--grad) padding-box,
        linear-gradient(120deg, rgba(125, 211, 252, .95), rgba(167, 139, 250, .95)) border-box;
    box-shadow: 0 4px 14px -4px rgba(37, 99, 235, .5), 0 1px 2px rgba(37, 99, 235, .2);
    transition: all .15s ease;
}
.nav-cta::after {
    content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .45s ease;
    pointer-events: none;
}
.nav-cta:hover {
    filter: none;
    transform: translateY(-1px);
    background:
        linear-gradient(135deg, #1d4ed8, #4338ca 55%, #6d28d9 100%) padding-box,
        linear-gradient(120deg, rgba(125, 211, 252, .95), rgba(167, 139, 250, .95)) border-box;
    box-shadow: 0 8px 22px -6px rgba(37, 99, 235, .55);
}
.nav-cta:hover::after { left: 125%; }
.nav-cta:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.nav-cta:focus-visible { outline: none; box-shadow: var(--ring-soft), 0 0 0 2px var(--brand); }
@media (min-width: 761px) {
    .sidebar.nav-collapsed .nav-cta { font-size: 0; }
}

/* ---- Nav links: aurora spotlight that follows the cursor ---- */
.nav-item, .nav-cta, .side-user { --mx: 50%; --my: 50%; --spot: rgba(125, 211, 252, .22); }
.nav-signout { --spot: rgba(251, 113, 133, .24); }

.nav-item {
    border-radius: 10px;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .12s;
}
.nav-item::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    background: radial-gradient(90px circle at var(--mx) var(--my), var(--spot), transparent 70%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
    z-index: 0;
}
.nav-ico, .nav-item-txt { position: relative; z-index: 1; }
.nav-item:hover {
    transform: none;
    background: rgba(255, 255, 255, .045);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(148, 197, 253, .3), 0 8px 20px -14px rgba(2, 8, 23, .9);
}
.nav-item:hover::after { opacity: 1; }
.nav-item:active { transform: scale(.98); }
.nav-item::before { transition: height .18s ease, opacity .18s ease, box-shadow .18s ease; }
.nav-item:hover::before { height: 55%; opacity: 1; box-shadow: 0 0 12px rgba(125, 211, 252, .9); }
.nav-item:hover .nav-item-txt { font-weight: 700; }
.nav-item:hover .nav-ico {
    transform: none;
    background: rgba(56, 189, 248, .14);
    color: #7dd3fc;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, .5), 0 0 16px -4px rgba(56, 189, 248, .75);
}
/* Selected page wears the same look as the hover style */
.nav-item.active {
    background: rgba(255, 255, 255, .045);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(148, 197, 253, .3), 0 8px 20px -14px rgba(2, 8, 23, .9);
}
.nav-item.active::before, .nav-item.active:hover::before { height: 100%; opacity: 1; box-shadow: 0 0 12px rgba(125, 211, 252, .95); }
.nav-item.active .nav-item-txt { font-weight: 700; }
.nav-item.active .ico { color: #7dd3fc; }
.nav-item.active .nav-ico {
    background: rgba(56, 189, 248, .14);
    color: #7dd3fc;
    transform: none;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, .5), 0 0 16px -4px rgba(56, 189, 248, .75);
}

/* ---- Sign out: same language in rose ---- */
.nav-signout:hover {
    background: rgba(255, 255, 255, .03);
    color: #fecdd3;
    box-shadow: inset 0 0 0 1px rgba(251, 113, 133, .35), 0 8px 20px -14px rgba(2, 8, 23, .9);
}
.nav-signout:hover .nav-ico {
    background: rgba(244, 63, 94, .16);
    color: #fda4af;
    transform: none;
    box-shadow: 0 0 0 1px rgba(251, 113, 133, .5), 0 0 16px -4px rgba(251, 113, 133, .7);
}
.nav-signout:hover::before { box-shadow: 0 0 12px rgba(251, 113, 133, .9); }

/* ---- User chip: aurora gradient border on hover ---- */
.side-user { transition: background .2s, border-color .2s, box-shadow .2s; }
.side-user:hover {
    background: linear-gradient(rgba(13, 32, 60, .92), rgba(13, 32, 60, .92)) padding-box,
                linear-gradient(120deg, #38bdf8, #8b5cf6) border-box;
    border-color: transparent;
    box-shadow: 0 12px 26px -16px rgba(2, 8, 23, .9);
}
.side-user .avatar { transition: box-shadow .25s ease; }
.side-user:hover .avatar { box-shadow: 0 0 0 2px rgba(56, 189, 248, .5), 0 0 18px -4px rgba(56, 189, 248, .75); }

@media (prefers-reduced-motion: reduce) {
    .nav-cta, .nav-cta::after, .nav-item, .nav-item .nav-ico, .nav-signout .nav-ico { transition-duration: .01ms; }
}
