/* Boxdash — admin portal styles (no build step) */

:root {
    --ink: #111318;
    --ink-2: #1a1d24;
    --ink-3: #262a33;
    --ink-text: #a9afbc;

    --bg: #f4f5f8;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --border: #e6e8ee;
    --border-strong: #d5d9e1;

    --text: #171a21;
    --text-2: #4a5160;
    --muted: #7c8494;

    --brand: #ff5a1f;
    --brand-600: #eb4a10;
    --brand-soft: #fff0e9;
    --brand-ring: rgba(255, 90, 31, .18);

    --green: #0e9f6e;
    --green-soft: #e7f7f0;
    --red: #e02d3c;
    --red-soft: #fdecee;
    --blue: #2f6bff;
    --blue-soft: #eaf0ff;
    --violet: #7c4dff;
    --violet-soft: #f1ecff;
    --amber: #d98a00;
    --amber-soft: #fff5e0;
    --teal: #0891b2;
    --teal-soft: #e5f6fa;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(17, 19, 24, .04);
    --shadow: 0 1px 2px rgba(17, 19, 24, .04), 0 4px 16px rgba(17, 19, 24, .05);
    --shadow-lg: 0 10px 40px rgba(17, 19, 24, .12);

    --sidebar-w: 256px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Components set display (e.g. .alert is flex), which would otherwise override the hidden attribute. */
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Shell */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--ink);
    color: var(--ink-text);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    z-index: 40;
    transition: transform .25s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 10px 22px;
    color: #fff;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #ff7a3d, var(--brand) 55%, #e2400a);
    box-shadow: 0 6px 18px rgba(255, 90, 31, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
    font-size: 17px;
}

.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: #6f7686; font-weight: 500; margin-top: -2px; }

.nav-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #5c6373;
    padding: 14px 12px 8px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--ink-text);
    transition: background .15s, color .15s;
}

.nav a i { font-size: 17px; width: 18px; text-align: center; opacity: .85; }
.nav a:hover { background: var(--ink-2); color: #e6e8ee; }

.nav a.active {
    background: var(--ink-3);
    color: #fff;
}

.nav a.active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
}

.nav a.active i { color: var(--brand); opacity: 1; }

.sidebar-foot { margin-top: auto; padding-top: 12px; }

/* Links scroll on short screens; brand and account card stay put. */
.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0 -14px;
    padding: 0 14px 8px;
    scrollbar-width: thin;
    scrollbar-color: #2e333d transparent;
}

.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #2e333d; border-radius: 3px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }

.me {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: 12px;
    background: var(--ink-2);
    border: 1px solid #22262e;
}

.me-name { color: #fff; font-weight: 700; font-size: 13px; line-height: 1.2; }
.me-role { font-size: 11.5px; color: #7d8494; }
.me-text { min-width: 0; flex: 1; }
.me-text > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
    border: 0;
    background: transparent;
    color: #8b92a1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.icon-btn:hover { background: var(--ink-3); color: #fff; }

.avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(140deg, #ff8a52, var(--brand));
}

.avatar.sm { width: 34px; height: 34px; border-radius: 50%; font-size: 12px; }

.main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}

.topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ink);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar .brand { padding: 0; }
.topbar .icon-btn { color: #fff; font-size: 20px; }

.content { padding: 32px 36px 48px; max-width: 1480px; width: 100%; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

.scrim { display: none; }

/* ------------------------------------------------------------------ Cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-pad { padding: 20px 22px; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}

.card-title { font-weight: 700; font-size: 15px; margin: 0; }

/* Filters */

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.filters.with-show { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}

.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.range-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: #a8390d;
    font-weight: 600;
    font-size: 13px;
}

/* ------------------------------------------------------------------ Forms */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    letter-spacing: .01em;
}

.hint { font-size: 12px; color: var(--muted); }
.error-text { font-size: 12px; color: var(--red); font-weight: 600; }

.input, .select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}

.input:hover, .select:hover { border-color: #c2c7d1; }

.input:focus, .select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
}

.input:disabled, .select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.input.is-invalid, .select.is-invalid { border-color: var(--red); }

.select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%237c8494'%3E%3Cpath d='M1.6 5.1a.75.75 0 0 1 1.06 0L8 10.4l5.34-5.3a.75.75 0 1 1 1.06 1.06l-5.87 5.83a.75.75 0 0 1-1.06 0L1.6 6.16a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }

.input-action { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.input-action .icon-btn { color: var(--muted); }
.input-action .icon-btn:hover { background: var(--surface-2); color: var(--text); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 4px 12px rgba(255, 90, 31, .25); }
.btn-primary:hover { background: var(--brand-600); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }

.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: #c2c7d1; }

.btn-sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: span 2; }

.form-section { padding: 22px 24px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; }
.form-section > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Role picker (radio cards) */

.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

.role-option { position: relative; }
.role-option input { position: absolute; opacity: 0; pointer-events: none; }

.role-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all .15s;
}

.role-option label:hover { border-color: #c2c7d1; }
.role-option input:checked + label { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-ring); }
.role-option input:focus-visible + label { box-shadow: 0 0 0 4px var(--brand-ring); }

.role-dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; }

.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); gap: 4px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--text-2); }
.segmented input:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ Stats */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
}

.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }

.stat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-2);
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.stat-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-split > div + div { border-left: 1px solid var(--border); padding-left: 16px; }

.stat-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value small { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-right: 3px; }
.stat-value.md { font-size: 24px; }
.stat-caption { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 4px; }

.stat::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--tint, transparent);
    opacity: .5;
    pointer-events: none;
}

.tone-brand { --tint: var(--brand-soft); }
.tone-brand .stat-icon { background: var(--brand-soft); color: var(--brand); }
.tone-green { --tint: var(--green-soft); }
.tone-green .stat-icon { background: var(--green-soft); color: var(--green); }
.tone-red { --tint: var(--red-soft); }
.tone-red .stat-icon { background: var(--red-soft); color: var(--red); }
.tone-blue { --tint: var(--blue-soft); }
.tone-blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.tone-amber { --tint: var(--amber-soft); }
.tone-amber .stat-icon { background: var(--amber-soft); color: var(--amber); }
.tone-violet { --tint: var(--violet-soft); }
.tone-violet .stat-icon { background: var(--violet-soft); color: var(--violet); }

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--muted); }


/* ------------------------------------------------------------------ Tables */

.tabs {
    display: flex;
    gap: 4px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 10px 12px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s;
}

.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }

.count {
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 11.5px;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    color: var(--text-2);
}

.tabs a.active .count { background: var(--brand); border-color: var(--brand); color: #fff; }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    flex-wrap: wrap;
}

.toolbar .input-icon { width: 320px; max-width: 100%; }

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    background: var(--surface-2);
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfbfc; }
.table .right { text-align: right; }
.table.compact td { padding: 10px 14px; font-size: 13px; }
.table.compact th { padding: 10px 14px; }

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }

.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell .name { font-weight: 700; }
.user-cell .sub { font-size: 12px; color: var(--muted); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }

.role-super { background: var(--violet-soft); color: var(--violet); }
.role-admin { background: var(--blue-soft); color: var(--blue); }
.role-tech { background: var(--teal-soft); color: var(--teal); }
.role-support { background: var(--amber-soft); color: var(--amber); }
.role-presenter { background: var(--brand-soft); color: var(--brand-600); }

.status-active { background: var(--green-soft); color: var(--green); }
.status-inactive { background: #f0f1f4; color: var(--muted); }

.expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
}

.expand-btn:hover { background: var(--surface-2); }
.expand-btn i { transition: transform .2s; }
.expand-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.expand-btn:disabled { opacity: .55; cursor: default; }

tr.detail-row > td { background: var(--surface-2) !important; padding: 0 16px 16px 64px; white-space: normal; }
tr.detail-row[hidden] { display: none; }

.show-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding-top: 4px; }

.show-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.show-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.show-card .title { font-weight: 700; }
.show-card .meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.show-card .meta + .meta { margin-top: 3px; }
.show-card .meta i { color: var(--muted); }

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.pager-btns { display: flex; gap: 6px; align-items: center; }

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}

.page-btn:hover:not(:disabled) { background: var(--surface-2); }
.page-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: default; }

.empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--muted);
}

.empty i { font-size: 30px; color: #c3c8d2; display: block; margin-bottom: 10px; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.skeleton {
    display: inline-block;
    height: 1em;
    width: 7ch;
    border-radius: 6px;
    background: linear-gradient(90deg, #eceef2 0%, #f6f7f9 50%, #eceef2 100%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
    vertical-align: middle;
}

@keyframes shimmer { to { background-position: -200% 0; } }

.loading-row td { padding: 0 !important; }
.loading-bar { height: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 50% 100%; animation: slide 1s infinite linear; background-repeat: no-repeat; }
@keyframes slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ------------------------------------------------------------------ Alerts */

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
}

.alert i { font-size: 16px; margin-top: 1px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert-error { background: var(--red-soft); color: #9f1b27; border: 1px solid #f7cdd2; }
.alert-success { background: var(--green-soft); color: #0a6b4b; border: 1px solid #bfe9d7; }
.alert-info { background: var(--blue-soft); color: #1d48b0; border: 1px solid #cddbff; }

.gap-y > * + * { margin-top: 18px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Auth */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: var(--surface);
}

.auth-art {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: #fff;
    padding: 44px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 60%, #000 20%, transparent 75%);
}

.auth-art::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    right: -180px;
    bottom: -200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 90, 31, .55), rgba(255, 90, 31, 0) 65%);
    filter: blur(10px);
}

.auth-art > * { position: relative; z-index: 1; }

.auth-hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.035em; font-weight: 800; margin: 0 0 16px; max-width: 12ch; }
.auth-hero h1 span { color: var(--brand); }
.auth-hero p { color: #a3a9b6; font-size: 15.5px; max-width: 42ch; margin: 0; }

.auth-ticker { display: flex; gap: 12px; flex-wrap: wrap; }

.auth-ticker div {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
    font-size: 12px;
    color: #9aa1af;
}

.auth-ticker b { display: block; color: #fff; font-size: 15px; font-weight: 700; }

.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h2 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 6px; }
.auth-form > p { color: var(--muted); margin: 0 0 28px; }
.auth-form .field + .field { margin-top: 16px; }
.auth-form .btn { margin-top: 24px; height: 46px; }
.auth-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ Responsive */

@media (max-width: 1280px) {
    .filters.with-show { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters.with-show .field-show { grid-column: span 2; }
    .filters.with-show .field-submit { grid-column: span 2; }
    .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .stats { grid-template-columns: 1fr; }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters .field-submit { grid-column: span 2; }
}

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .scrim.open { display: block; position: fixed; inset: 0; background: rgba(17, 19, 24, .45); z-index: 35; }
    .main { margin-left: 0; }
    .topbar { display: flex; }
    .content { padding: 22px 16px 40px; }
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}

@media (max-width: 640px) {
    .filters, .filters.with-show { grid-template-columns: 1fr; }
    .filters .field-submit, .filters.with-show .field-show, .filters.with-show .field-submit { grid-column: auto; }
    .stats.four { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .page-title { font-size: 22px; }
    .stat-value { font-size: 26px; }
    tr.detail-row > td { padding-left: 16px; }
}

/* ------------------------------------------------------------------ Shows */

.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: var(--muted); pointer-events: none; }
.input-prefix > .input { padding-left: 46px; }

.sched-grid { display: grid; gap: 12px; }

.sched-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    min-height: 66px;
}

.sched-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sched-name i, .check i { color: var(--muted); }
.sched-times { display: flex; align-items: center; gap: 10px; }
.sched-times[hidden] { display: none; }
.sched-times .input { width: 140px; }

.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.check span { display: inline-flex; align-items: center; gap: 8px; }

.timeline { margin-top: 20px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 8px; border-radius: 3px; display: inline-block; }
.sw-new { background: var(--brand); }
.sw-existing { background: #cfd5df; }
.sw-clash { background: var(--red); }

.tl-rows { display: grid; gap: 6px; }
.tl-row { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px; }
.tl-day { font-size: 12px; font-weight: 700; color: var(--text-2); }

.tl-track {
    position: relative;
    height: 22px;
    border-radius: 6px;
    background:
        repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), var(--border) calc(25% - 1px), var(--border) 25%),
        var(--surface-2);
    overflow: hidden;
}

.tl-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; min-width: 2px; }
.tl-bar.existing { background: #cfd5df; }
.tl-bar.new { background: var(--brand); opacity: .9; }
.tl-bar.clash { background: repeating-linear-gradient(45deg, var(--red) 0 5px, #f16b76 5px 10px); z-index: 2; }

.tl-axis { display: flex; justify-content: space-between; margin: 6px 0 0 46px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.tl-status { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.tl-status.good { color: var(--green); }
.tl-status.bad { color: var(--red); }

@media (max-width: 640px) {
    .sched-times { width: 100%; }
    .sched-times .input { flex: 1; width: auto; }
}

/* ------------------------------------------------------------------ Profiles */

.filters.profile-filters { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; }

.avatar-muted { background: linear-gradient(140deg, #3a4150, var(--ink)); }
.avatar.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 20px; }

.badge.suspended { background: var(--red-soft); color: var(--red); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c21f2d; }

a.page-btn { display: inline-grid; place-items: center; }
a.page-btn.disabled { opacity: .45; pointer-events: none; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--text); }

.profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 22px 24px;
}

.profile-id { display: flex; gap: 18px; align-items: flex-start; min-width: 0; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-meta i { color: var(--muted); }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.copy-btn { border: 0; background: none; padding: 2px 4px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.copy-btn:hover { color: var(--text); background: var(--surface-2); }

.credit-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin: 16px 18px 0;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px dashed #cdbcff;
    background: #fbf9ff;
}

.credit-form[hidden] { display: none; }
.credit-form .credit-intro { flex-basis: 100%; }
.credit-form .field { flex: 1; min-width: 180px; }
.credit-form .field:last-child { flex: none; min-width: 0; }

.wrap-cell { display: inline-block; white-space: normal; min-width: 200px; max-width: 360px; }
#searchWrap[hidden] { display: none; }

@media (max-width: 1100px) {
    .filters.profile-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters.profile-filters .field:first-child { grid-column: span 2; }
}

@media (max-width: 640px) {
    .filters.profile-filters { grid-template-columns: 1fr; }
    .filters.profile-filters .field:first-child { grid-column: auto; }
    .profile-id { flex-direction: column; }
}

/* ------------------------------------------------------------------ Modal */

.modal {
    border: 0;
    padding: 0;
    border-radius: 18px;
    width: min(420px, calc(100vw - 32px));
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.modal::backdrop { background: rgba(17, 19, 24, .45); backdrop-filter: blur(2px); }
.modal-body { padding: 24px; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.modal-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ------------------------------------------------------------------ Lists */

.filters.list-filters { grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr)); }
.filters.list-filters .field-submit { grid-column: auto; }
.date-time { display: grid; grid-template-columns: 1fr 104px; gap: 6px; }

.link { color: var(--text); border-bottom: 1px dashed var(--border-strong); }
.link:hover { color: var(--brand-600); border-bottom-color: var(--brand); }

.message-cell { display: inline-block; white-space: normal; min-width: 260px; max-width: 520px; font-size: 13px; line-height: 1.45; }
.file-input { padding: 8px 10px; height: auto; }

.bankroll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.bankroll-card { padding: 20px 22px; }
.bankroll-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bankroll-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.bankroll-facts dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bankroll-facts dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.modal .form-grid { gap: 14px 16px; }

@media (max-width: 1280px) {
    .filters.list-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters.list-filters .field-search { grid-column: span 2; }
}

@media (max-width: 640px) {
    .filters.list-filters { grid-template-columns: 1fr; }
    .filters.list-filters .field-search { grid-column: auto; }
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }

.modal.modal-wide { width: min(620px, calc(100vw - 32px)); }
.modal.modal-xl { width: min(860px, calc(100vw - 32px)); }
.modal-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }

.winner-btn { background: var(--amber-soft); color: #9a6200; border: 1px solid #f3dca8; }
.winner-btn:hover { background: #ffecc2; }
.award-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.award-facts dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.award-facts dd { margin: 2px 0 0; font-weight: 600; }
.sms-preview { padding: 12px 14px; border-radius: 12px 12px 12px 4px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; }
