/* ─── Design tokens ─── */
:root {
    --bg: #08080a;
    --bg-2: #0e0e11;
    --surface: rgba(18, 18, 22, 0.85);
    --surface-solid: #121216;
    --surface-hover: #1a1a20;
    --surface-inset: #0c0c0f;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --text: #f4f4f5;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --accent: #8b7cf8;
    --accent-2: #a78bfa;
    --accent-dim: rgba(139, 124, 248, 0.14);
    --accent-glow: rgba(139, 124, 248, 0.35);
    --blue: #60a5fa;
    --cyan: #22d3ee;
    --emerald: #34d399;
    --violet: #a78bfa;
    --success: #4ade80;
    --success-dim: rgba(74, 222, 128, 0.12);
    --warning: #fbbf24;
    --warning-dim: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-dim: rgba(248, 113, 113, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --sidebar-w: 260px;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 60% at 10% -10%, rgba(139, 124, 248, 0.09), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 0%, rgba(96, 165, 250, 0.06), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(52, 211, 153, 0.04), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: #c4b5fd; }

/* ─── App shell ─── */
.app-body {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    background: var(--bg);
}

.app-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 12% 20%, rgba(139, 124, 248, 0.11), transparent 55%),
        radial-gradient(ellipse 55% 45% at 88% 10%, rgba(96, 165, 250, 0.07), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(52, 211, 153, 0.04), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.app {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    position: relative;
    z-index: 1;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-w);
    background: rgba(14, 14, 17, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 22px 32px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #8b7cf8 0%, #6366f1 100%);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.brand-mark-img {
    display: block;
    object-fit: cover;
    background: none;
    box-shadow: 0 8px 24px var(--accent-glow);
    border-radius: 11px;
}

.brand-mark-lg.brand-mark-img {
    border-radius: 14px;
}

.brand-mark-sm.brand-mark-img {
    border-radius: 9px;
}

.brand-mark-lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
    border-radius: 14px;
    margin-bottom: 28px;
}

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

.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.2;
}

.brand-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
}

/* Legacy brand classes */
.brand-icon, .brand-icon-lg {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #8b7cf8, #6366f1);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; color: #fff;
}

.brand-icon-lg {
    width: 56px; height: 56px;
    font-size: 22px;
    border-radius: 14px;
}

.sidebar-nav {
    flex: 1;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.18s var(--ease);
    border: 1px solid transparent;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
}

.nav-icon svg { width: 18px; height: 18px; }

.nav-item svg { width: 18px; height: 18px; opacity: 0.55; }

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--border);
}

.nav-item:hover .nav-icon,
.nav-item:hover svg { opacity: 0.9; }

.nav-item.active {
    background: linear-gradient(135deg, rgba(139, 124, 248, 0.18), rgba(139, 124, 248, 0.08));
    color: var(--accent-2);
    border-color: rgba(139, 124, 248, 0.25);
    box-shadow: 0 0 20px rgba(139, 124, 248, 0.08);
}

.nav-item.active .nav-icon,
.nav-item.active svg { opacity: 1; }

.nav-label { display: none; }

.sidebar-user {
    padding: 18px 14px 22px;
    border-top: 1px solid var(--border);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: var(--accent-dim);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-2);
}

.user-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }

.sidebar-account-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-password-panel {
    max-width: 480px;
    padding: 24px;
}

.profile-password-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.profile-password-form .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.profile-password-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.verified-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.verified-account-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.yes-no-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-solid);
}

.yes-no-option {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.yes-no-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.yes-no-option span {
    display: inline-block;
    min-width: 56px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--text-3);
    transition: all 0.15s var(--ease);
}

.yes-no-option input:checked + span {
    background: var(--accent-dim);
    color: var(--accent-2);
    box-shadow: inset 0 0 0 1px rgba(139, 124, 248, 0.35);
}

.yes-no-option:hover span {
    color: var(--text-2);
}

.kyc-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.kyc-fields.is-hidden {
    display: none;
}

.id-card-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.id-card-upload-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.id-card-upload-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.id-card-upload {
    position: relative;
}

.id-card-upload-drop {
    display: block;
    min-height: 148px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1.5px dashed rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(160deg, rgba(139, 124, 248, 0.06), rgba(255, 255, 255, 0.02)),
        var(--surface-inset);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
    overflow: hidden;
}

.id-card-upload-drop:hover,
.id-card-upload.is-dragover .id-card-upload-drop {
    border-color: rgba(139, 124, 248, 0.45);
    background:
        linear-gradient(160deg, rgba(139, 124, 248, 0.1), rgba(255, 255, 255, 0.03)),
        var(--surface-inset);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.id-card-upload.has-file .id-card-upload-drop {
    border-style: solid;
    border-color: rgba(139, 124, 248, 0.35);
    padding: 10px;
}

.id-card-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 116px;
    text-align: center;
    padding: 8px 12px;
}

.id-card-upload.has-file .id-card-upload-placeholder {
    display: none;
}

.id-card-upload-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--accent-2);
    background: var(--accent-dim);
    border: 1px solid rgba(139, 124, 248, 0.2);
}

.id-card-upload-icon svg {
    width: 22px;
    height: 22px;
}

.id-card-upload-text {
    margin: 0;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.4;
}

.id-card-upload-text strong {
    color: var(--accent-2);
    font-weight: 700;
}

.id-card-upload-hint {
    margin: 0;
    font-size: 11px;
    color: var(--text-3);
}

.id-card-upload-filled {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.id-card-upload-filled.hidden {
    display: none;
}

.id-card-upload.has-file .id-card-upload-filled {
    display: flex;
}

.id-card-upload-preview-img {
    display: block;
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
}

.id-card-upload-filled-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
}

.id-card-upload-filename {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.id-card-upload-clear {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s var(--ease);
}

.id-card-upload-clear:hover {
    background: rgba(248, 113, 113, 0.22);
}

.id-card-current {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.id-card-thumb {
    display: block;
    max-width: 100%;
    max-height: 120px;
    width: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: var(--surface-2);
}

.id-card-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.id-card-image-link {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.id-card-image-link img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.id-card-image-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}


@media (max-width: 640px) {
    .id-card-images {
        grid-template-columns: 1fr;
    }
}

.sign-out,
.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.15s var(--ease);
}

.sign-out svg { width: 16px; height: 16px; }

.sign-out:hover,
.logout-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border);
    color: var(--text-2);
}

.sidebar-footer { display: none; }

.content-area {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    min-width: 0;
    position: relative;
    z-index: 1;
}

.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 48px 64px;
    min-width: 0;
}

/* ─── Page header ─── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 32px;
}

.page-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 8px;
}

.page-header h1,
.page-intro h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--text);
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-2);
    margin-top: 8px;
    font-weight: 400;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 12px;
}

.breadcrumb a { color: var(--text-2); }

.breadcrumb span { margin: 0 6px; opacity: 0.4; }

.header-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ─── Stats ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    position: relative;
    background: rgba(18, 18, 22, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px 20px;
    overflow: hidden;
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.accent-violet::before { background: linear-gradient(90deg, #8b7cf8, #a78bfa); }
.stat-card.accent-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.accent-cyan::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.stat-card.accent-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }

.stat-card:hover {
    border-color: rgba(139, 124, 248, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
}

.stat-value-sm { font-size: 28px; }

.stat-divider {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-3);
    margin: 0 2px;
}

.stat-meta {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 10px;
}

/* ─── Panels & cards ─── */
.panel-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-stack .panel {
    padding: 0;
}

.panel-stack .panel-head {
    padding: 20px 24px 0;
}

.panel-stack .table-shell {
    padding: 8px 8px 12px;
}

.panel,
.card {
    background: rgba(18, 18, 22, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.panel-head,
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 4px;
}

.panel-head h2,
.card-header h2,
.card-header h3,
.card h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.panel-link,
.link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-2);
}

.card { padding: 24px; }
.card h3 { margin-bottom: 18px; padding: 0; }
.card .card-header { padding: 0; margin-bottom: 16px; }
.card .card-header h2,
.card .card-header h3 { margin: 0; }

.panel .table-shell,
.panel .table-wrap {
    margin: 8px -8px -8px;
    padding: 0;
}

.card .table-wrap {
    margin: 16px -24px -24px;
    padding: 0 16px 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.detail-grid .span-full { grid-column: 1 / -1; }

/* ─── Tables ─── */
.table-shell,
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 8px 12px;
    max-width: 100%;
    overscroll-behavior-x: contain;
}

.card .table-wrap {
    margin: 16px -24px -24px;
    padding: 0 16px 16px;
}

.table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.table td {
    padding: 14px 16px;
    color: var(--text-2);
    border-top: 1px solid var(--border);
}

.table tbody tr { transition: background 0.12s var(--ease); }

.table tbody tr:hover {
    background: rgba(139, 124, 248, 0.04);
}

.clickable-row { cursor: pointer; }

.clickable-row:hover td:first-child { color: var(--text); }

.row-title,
.table-link {
    font-weight: 600;
    color: var(--text);
    transition: color 0.12s;
}

.table-link:hover,
.clickable-row:hover .row-title { color: var(--accent-2); }

.text-dim { color: var(--text-2); }

.empty-cell {
    text-align: center;
    color: var(--text-3);
    padding: 48px 16px !important;
}

.table-compact td,
.table-compact th { padding: 10px 16px; }

.table-actions { display: flex; gap: 4px; }

/* ─── Pills & badges ─── */
.platform-pill,
.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface-hover);
    color: var(--text-2);
}

.platform-pill::before,
.platform-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.platform-pocket_option::before,
.platform-pocket_option.platform-pill::before { background: #60a5fa; }
.platform-quotex::before,
.platform-quotex.platform-pill::before { background: #c084fc; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-success { background: var(--success-dim); color: var(--success); }
.badge-neutral { background: rgba(255,255,255,0.05); color: var(--text-2); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-danger { background: var(--danger-dim); color: var(--danger); }

.commission-badge { font-size: 13px; color: var(--text-2); font-weight: 500; }

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.commission-rate-type {
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.text-muted { color: var(--text-3); font-size: 13px; }

.mono {
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
    font-size: 13px;
    color: var(--text);
}

/* ─── Filters ─── */
.filters-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.filters-bar .filter-input {
    flex: 1;
    min-width: 200px;
}

.filters-bar .filter-select {
    min-width: 140px;
}

.filters-bar #accounts-advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.accounts-filters-form .filters-advanced-panel {
    margin-top: -8px;
    margin-bottom: 20px;
}

.filters-advanced-panel:not(.is-open) {
    display: none;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 16px;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface-inset);
    border: 1px solid var(--border);
}

.filters-collapsible:not(.is-open) {
    display: none;
}

.panel-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.panel-toolbar .btn svg {
    flex-shrink: 0;
}

.filter-active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

#accounts-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.filter-field label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
}

.filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    grid-column: span 2;
}

.filter-input,
.filter-select {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-input::placeholder { color: var(--text-3); }
.filter-input { flex: 1; min-width: 200px; }

.filter-field .filter-select,
.filter-field .filter-input {
    width: 100%;
    min-width: 0;
}

.filter-input:focus,
.filter-select:focus {
    border-color: rgba(139, 124, 248, 0.45);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.filter-select option { background: var(--surface-solid); }

@media (max-width: 900px) {
    .filters-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-actions { grid-column: span 2; }
}

@media (max-width: 540px) {
    .filters-grid { grid-template-columns: 1fr; }
    .filter-actions { grid-column: span 1; flex-direction: column; align-items: stretch; }
}

/* ─── List pages: filters & mobile list ─── */
.filters-bar-compact {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filters-mobile-toggle {
    display: none;
    flex-shrink: 0;
    min-height: 44px;
}

.filters-bar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filters-bar-row .filter-select {
    flex: 1 1 140px;
    min-width: 0;
}

.filters-drawer {
    display: block;
}

.accounts-filters-form .filters-drawer,
.affiliates-filters-form .filters-drawer,
.list-filters-form .filters-drawer {
    margin-top: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.accounts-mobile-list,
.affiliates-mobile-list {
    display: none;
}

.account-mobile-card,
.affiliate-mobile-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.account-mobile-card:first-child,
.affiliate-mobile-card:first-child {
    border-top: none;
    padding-top: 4px;
}

.account-mobile-card-body,
.affiliate-mobile-card-body {
    flex: 1;
    min-width: 0;
}

.account-mobile-title,
.affiliate-mobile-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 4px;
    word-break: break-word;
}

.account-mobile-title:hover,
.affiliate-mobile-title:hover {
    color: var(--accent-2);
}

.account-mobile-email {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-2);
    word-break: break-all;
}

.account-mobile-meta,
.affiliate-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.account-mobile-affiliate {
    font-size: 12px;
    color: var(--text-3);
}

.account-mobile-added {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-3);
}

.account-mobile-edit,
.affiliate-mobile-edit {
    flex-shrink: 0;
    margin-top: 2px;
}

.accounts-mobile-empty,
.affiliates-mobile-empty,
.list-empty-state {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
}

.accounts-panel,
.affiliates-panel {
    overflow-x: hidden;
}

.affiliate-mobile-rate {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-2);
}

.affiliate-mobile-gologin {
    margin: 8px 0 0;
}

@media (max-width: 860px) {
    .filters-mobile-toggle {
        display: inline-flex;
    }

    .filters-bar-compact {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 0;
    }

    .filters-bar-compact .filters-search {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .filters-drawer:not(.is-open) {
        display: none;
    }

    .filters-drawer.is-open {
        display: block;
        margin-top: 12px;
    }

    .filters-bar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar-row .filter-select,
    .filters-bar-row .btn {
        width: 100%;
        flex: none;
    }

    .accounts-filters-form .filters-advanced-panel {
        margin-top: 0;
    }

    .accounts-table-desktop,
    .affiliates-table-desktop {
        display: none;
    }

    .accounts-mobile-list,
    .affiliates-mobile-list {
        display: block;
        margin-top: 8px;
    }

    .panel .accounts-table-desktop,
    .panel .affiliates-table-desktop {
        margin: 0;
        padding: 0;
    }
}

@media (min-width: 861px) {
    .filters-mobile-toggle {
        display: none !important;
    }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    cursor: pointer;
    transition: all 0.18s var(--ease);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #8b7cf8, #7c6df0);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9d8ffa, #8b7cf8);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: #222228;
    border-color: rgba(255,255,255,0.14);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.btn-danger {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover { background: rgba(248, 113, 113, 0.18); }

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-icon {
    display: inline-flex;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-3);
    transition: all 0.15s;
}

.btn-icon svg { width: 16px; height: 16px; }

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--text);
}

/* ─── Forms ─── */
.form-card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
}

.form-section {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.section-hint {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 20px;
}

.field-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-3); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(139, 124, 248, 0.45);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group select option { background: var(--surface-solid); }

.form-group textarea { resize: vertical; min-height: 96px; }

.input-with-toggle { position: relative; }
.input-with-toggle input { width: 100%; padding-right: 44px; }

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
}

.toggle-password svg { width: 18px; height: 18px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
}

.checkbox-label input { width: 16px; height: 16px; accent-color: var(--accent); }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 28px;
    margin-top: 8px;
}

/* Compact forms */
.form-compact {
    width: 100%;
}

.form-compact .form-essentials {
    margin-bottom: 8px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.form-grid-2 .span-2 {
    grid-column: span 2;
}

.label-hint {
    font-weight: 400;
    color: var(--text-3);
    font-size: 12px;
}

.form-collapse {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 10px;
    background: var(--surface-inset);
    overflow: hidden;
}

.form-collapse summary {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.form-collapse summary::-webkit-details-marker {
    display: none;
}

.form-collapse summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: var(--text-3);
}

.form-collapse[open] summary::after {
    content: '−';
}

.form-collapse summary:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.form-collapse > .form-grid,
.form-collapse > .totp-setup,
.form-collapse > .bonus-checklist,
.form-collapse > .section-hint {
    padding: 0 18px 18px;
}

.form-collapse > .section-hint {
    padding-top: 0;
    margin-top: -4px;
}

.totp-setup-compact {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

@media (max-width: 640px) {
    .form-grid-2,
    .form-grid-2 .span-2 {
        grid-template-columns: 1fr !important;
        grid-column: span 1;
    }

    .form-compact {
        width: 100%;
    }
}

.totp-setup {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.totp-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.qr-reader {
    margin-top: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 300px;
    border: 1px solid var(--border);
}

/* ─── 2FA card ─── */
.totp-card {
    background: linear-gradient(135deg, rgba(139,124,248,0.08), rgba(18,18,22,1) 60%);
    border-color: rgba(139, 124, 248, 0.2) !important;
    padding: 28px !important;
}

.totp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.totp-card-header h3 { margin: 0; font-size: 16px; font-weight: 700; }

.totp-status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: var(--accent-dim);
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(139, 124, 248, 0.25);
}

.totp-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.totp-code {
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text);
    line-height: 1;
    text-shadow: 0 0 40px var(--accent-glow);
}

.totp-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    min-width: 200px;
}

.totp-timer-bar {
    height: 4px;
    background: var(--surface-hover);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.totp-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b7cf8, #a78bfa);
    border-radius: 999px;
    transition: width 1s linear;
}

.totp-timer-text { font-size: 12px; color: var(--text-3); }

/* ─── Detail list ─── */
.detail-list { display: grid; gap: 0; }

.detail-list > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.detail-list > div:last-child { border-bottom: none; }

.detail-list dt { font-size: 13px; font-weight: 500; color: var(--text-3); }
.detail-list dd { font-size: 14px; color: var(--text); }

.detail-list .span-full {
    grid-column: 1 / -1;
    display: block;
    border-bottom: none;
    padding-top: 0;
}

.password-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.hidden { display: none !important; }

.notes-text { font-size: 14px; color: var(--text-2); line-height: 1.7; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-state p { margin-bottom: 16px; }

.danger-zone {
    background: var(--danger-dim);
    border: 1px solid rgba(248, 113, 113, 0.18);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-top: 28px;
}

.danger-zone h3 { color: var(--danger); font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.danger-zone p { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }

/* ─── Alerts ─── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; }

.alert-error { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }
.alert-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(74,222,128,0.2); }

/* ─── Auth ─── */
.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    background: var(--bg);
    overflow-x: hidden;
}

.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 50%, rgba(139, 124, 248, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(96, 165, 250, 0.08), transparent 50%);
    pointer-events: none;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    position: relative;
    z-index: 1;
}

.auth-showcase {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    border-right: 1px solid var(--border);
}

.auth-showcase-inner { max-width: 400px; }

.auth-showcase h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.auth-showcase p {
    font-size: 16px;
    color: var(--text-2);
    line-height: 1.6;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.auth-form-wrap { width: 100%; max-width: 380px; }

.auth-form-header { margin-bottom: 32px; }

.auth-form-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.auth-form-header p { font-size: 15px; color: var(--text-2); }

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.auth-hint {
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
}

.auth-hint code {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
    color: var(--text-2);
}

/* Legacy auth */
.auth-container, .auth-card, .auth-brand, .auth-footer, .auth-bg { display: none; }

.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 80px;
    font-weight: 800;
    color: var(--surface-hover);
    letter-spacing: -0.05em;
}

.error-page p { color: var(--text-2); margin: 12px 0 28px; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
}

@media (max-width: 860px) {
    .content-area { margin-left: 0; }
    .main {
        padding: 16px 16px calc(88px + env(safe-area-inset-bottom, 0px));
    }
    .grid-2, .detail-grid, .form-grid { grid-template-columns: 1fr; }
    .form-group.span-2, .form-group.span-3 { grid-column: span 1; }
    .stats-grid { grid-template-columns: 1fr; }
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .page-header h1, .page-intro h1 { font-size: 26px; }
    .page-header > .btn,
    .page-header .header-actions {
        width: 100%;
    }
    .page-header .header-actions {
        flex-wrap: wrap;
    }
    .page-header > .btn,
    .page-header .header-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 44px;
    }
    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .form-actions .btn {
        width: 100%;
        min-height: 44px;
    }
    .totp-code { font-size: 36px; }
    .totp-display { flex-direction: column; align-items: flex-start; }
    .totp-meta { align-items: flex-start; width: 100%; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-guide { position: static; }
    .panel { padding: 16px; }
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filters-bar .btn,
    .filters-bar .filter-input,
    .filters-bar .filter-select {
        width: 100%;
    }
    .filters-grid,
    .filters-grid-compact {
        grid-template-columns: 1fr;
    }
    .filter-actions {
        grid-column: span 1;
        width: 100%;
        flex-direction: column;
    }
    .filter-actions .btn {
        width: 100%;
    }
    .table-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .session-summary-stats {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .session-summary-stats::-webkit-scrollbar {
        display: none;
    }
    .session-summary-stats .dash-metric {
        flex: 0 0 clamp(132px, 42vw, 176px);
        scroll-snap-align: start;
    }
}

@media (max-width: 600px) {
    .stat-value { font-size: 28px; }
    .header-actions { width: 100%; }
    .header-actions .btn { flex: 1; }
}

/* ─── Settings & bonuses ─── */
.settings-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

.settings-guide {
    position: sticky;
    top: 24px;
    padding: 28px !important;
}

.settings-guide-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 10px;
}

.settings-guide h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.settings-guide-lead {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 24px;
}

.settings-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
    position: relative;
    padding-left: 4px;
}

.settings-steps::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border);
}

.settings-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 8px;
    position: relative;
}

.settings-step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    z-index: 1;
}

.settings-steps strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.settings-steps small {
    font-size: 12px;
    color: var(--text-3);
}

.settings-tip {
    padding: 14px 16px;
    background: var(--accent-dim);
    border: 1px solid rgba(139, 124, 248, 0.2);
    border-radius: var(--radius-sm);
}

.settings-tip strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-2);
    margin-bottom: 4px;
}

.settings-tip p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
}

.settings-platforms {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-platform-card {
    padding: 0 !important;
    overflow: hidden;
    position: relative;
}

.settings-platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.platform-accent-pocket_option::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.platform-accent-quotex::before {
    background: linear-gradient(90deg, #a855f7, #c084fc);
}

.bonus-repeater-form {
    display: flex;
    flex-direction: column;
    padding: 24px 28px 28px;
}

.settings-platform-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.settings-platform-title h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0 0;
    letter-spacing: -0.02em;
}

.settings-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-inset);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.bonus-repeater {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}

.repeater-row {
    display: grid;
    grid-template-columns: 1fr auto 40px;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}

.repeater-row:focus-within {
    border-color: rgba(139, 124, 248, 0.35);
}

.repeater-fields {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 14px;
    min-width: 0;
}

.repeater-fields .form-group {
    gap: 6px;
    margin: 0;
}

.repeater-fields label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
}

.repeater-input {
    width: 100%;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.repeater-input:focus {
    border-color: rgba(139, 124, 248, 0.45);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.repeater-input::placeholder { color: var(--text-3); }

.form-group-percent .input-suffix-wrap {
    position: relative;
}

.form-group-percent .repeater-input {
    padding-right: 28px;
}

.input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    pointer-events: none;
}

.bonus-item-pct {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-dim);
    color: var(--accent);
    flex-shrink: 0;
}

.toggle-pill {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-pill span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface-solid);
    color: var(--text-3);
    transition: all 0.15s;
}

.toggle-pill input:checked + span {
    background: var(--success-dim);
    border-color: rgba(74, 222, 128, 0.35);
    color: var(--success);
}

.toggle-pill:hover span {
    border-color: var(--border-strong);
    color: var(--text-2);
}

.btn-remove-row {
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.btn-remove-row:hover {
    background: var(--danger-dim);
    color: var(--danger);
}

.repeater-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}

.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Legacy settings classes */
.settings-grid { display: contents; }
.settings-panel { padding: 0 !important; }
.settings-panel-head { display: none; }
.repeater-head { display: none; }
.repeater-check { display: none; }
.settings-note { display: none; }

.bonus-checklist {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.bonus-placeholder,
.bonus-none {
    font-size: 13px;
    color: var(--text-3);
}

.bonus-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bonus-col-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.available-label { color: var(--success); }
.taken-label { color: var(--text-2); }

.bonus-panel {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.bonus-panel-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-3);
}

.bonus-summary-stat strong {
    color: var(--text);
    font-weight: 700;
}

.bonus-summary-available strong { color: var(--success); }
.bonus-summary-redeemed strong { color: var(--text-2); }
.bonus-summary-divider { opacity: 0.4; }

.bonus-item-action {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    opacity: 0;
    transition: opacity 0.15s;
}

.bonus-item:hover .bonus-item-action { opacity: 1; }

.bonus-available .bonus-item-action { color: var(--success); }
.bonus-taken .bonus-item-action { color: var(--accent-2); }

.bonus-item-date {
    font-size: 11px;
    color: var(--text-3);
}

.bonus-none a {
    color: var(--accent-2);
    text-decoration: none;
}

.bonus-none a:hover { text-decoration: underline; }

.flow-section-bonuses .flow-section-head {
    margin-bottom: 12px;
}

.flow-section-bonuses .flow-section-head h3 {
    margin: 0 0 4px;
}

.flow-section-bonuses .section-hint {
    margin: 0;
}

.bonus-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bonus-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.bonus-item input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.bonus-available {
    background: rgba(52, 211, 153, 0.06);
    border-color: rgba(52, 211, 153, 0.2);
}

.bonus-available:hover {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.1);
}

.bonus-taken {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    opacity: 0.85;
}

.bonus-item.readonly { cursor: default; }

.bonus-item-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bonus-item-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.bonus-item-desc {
    font-size: 12px;
    color: var(--text-3);
}

.bonus-show-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.bonus-show-header h3 { margin: 0; }

.bonus-summary-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface-hover);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
}

@media (max-width: 768px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-guide {
        position: static;
    }

    .repeater-fields {
        grid-template-columns: 1fr;
    }

    .repeater-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .repeater-active {
        justify-self: start;
    }

    .btn-remove-row {
        justify-self: end;
        margin-top: -40px;
    }

    .repeater-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .repeater-actions .btn { width: 100%; justify-content: center; }

    .settings-grid,
    .bonus-columns { grid-template-columns: 1fr; }
}

/* GoLogin */
.gologin-card {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), var(--surface-solid) 55%);
    border-color: rgba(96, 165, 250, 0.2) !important;
}

.gologin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.gologin-card-head h3 { margin: 0; }

.gologin-detail { margin-top: 4px; }

.gologin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.gologin-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #60a5fa;
}

/* ── Account flow (split multi-step) ── */
.flow-body {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    background: var(--bg);
    overflow-x: hidden;
}

.flow-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 15% 40%, rgba(139, 124, 248, 0.1), transparent 55%),
        radial-gradient(ellipse 50% 45% at 85% 15%, rgba(96, 165, 250, 0.06), transparent 50%);
    pointer-events: none;
}

.flow-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.flow-aside {
    display: flex;
    flex-direction: column;
    padding: 36px 40px;
    border-right: 1px solid var(--border);
    background: rgba(14, 14, 17, 0.6);
    backdrop-filter: blur(12px);
}

.flow-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 48px;
    transition: color 0.15s;
}

.flow-back svg { width: 18px; height: 18px; }
.flow-back:hover { color: var(--text); }

.flow-aside-inner { flex: 1; }

.flow-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 12px;
}

.flow-aside h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.flow-tagline {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 40px;
    max-width: 320px;
}

.flow-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 4px;
}

.flow-steps::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.flow-step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.flow-step-item:hover { background: rgba(255, 255, 255, 0.03); }

.flow-step-marker {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: var(--surface-solid);
    border: 2px solid var(--border-strong);
    color: var(--text-3);
    z-index: 1;
    transition: all 0.2s;
}

.flow-step-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 2px;
    transition: color 0.15s;
}

.flow-step-item small {
    font-size: 12px;
    color: var(--text-3);
    opacity: 0.8;
}

.flow-step-item.is-active strong { color: var(--text); }
.flow-step-item.is-active .flow-step-marker {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 4px var(--accent-dim);
}

.flow-step-item.is-done .flow-step-marker {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent-2);
}

.flow-step-item.is-done strong { color: var(--text-2); }

.flow-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    overflow-y: auto;
}

.flow-form {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.flow-form-wide {
    max-width: 560px;
}

/* Session wizard — use full panel width for tables */
.flow-layout:has(.flow-form-session) {
    grid-template-columns: minmax(260px, 300px) 1fr;
}

.flow-panel:has(.flow-form-session) {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px 48px 48px 40px;
}

.flow-form.flow-form-session {
    max-width: none;
    width: 100%;
    min-height: calc(100vh - 96px);
}

.flow-form.flow-form-session .session-filter-row,
.session-filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.session-filter-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.filter-field-action .session-filter-apply {
    width: 100%;
}

.filter-label-spacer {
    visibility: hidden;
}

.session-filter-apply {
    height: 42px;
    padding-inline: 18px;
    white-space: nowrap;
}

.filter-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.filter-multiselect.is-disabled .filter-multiselect-trigger {
    opacity: 0.55;
    cursor: not-allowed;
}

.flow-form.flow-form-session .session-pick-bonuses {
    max-width: none;
}

.flow-form.flow-form-session .session-pick-table .col-bonuses {
    min-width: 200px;
}

.flow-form.flow-form-session .session-table-wrap,
.flow-form.flow-form-session .session-pick-table-wrap {
    max-height: none;
}

.flow-step-panel {
    display: none;
    flex: 1;
    animation: flow-in 0.3s var(--ease);
}

.flow-step-panel.is-active {
    display: flex;
    flex-direction: column;
}

@keyframes flow-in {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.flow-step-header {
    margin-bottom: 32px;
}

.flow-step-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.flow-step-header p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.5;
}

.flow-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.flow-fields .form-group { gap: 8px; }

.flow-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.affiliate-link-notice {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(139, 124, 248, 0.08);
    border: 1px solid rgba(139, 124, 248, 0.22);
}

.affiliate-link-notice-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.affiliate-link-notice-text {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.45;
}

.affiliate-link-notice-url {
    display: block;
    font-size: 12px;
    color: var(--accent-2);
    word-break: break-all;
    text-decoration: none;
}

.affiliate-link-notice-url:hover {
    text-decoration: underline;
}

.affiliate-link-notice-actions {
    margin-top: 12px;
}

.send-link-form {
    padding: 0 20px 20px;
}

.send-link-modal-text {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.45;
}

.send-link-status {
    margin: 0 0 12px;
    font-size: 13px;
}

.send-link-status.is-success {
    color: var(--success);
}

.send-link-status.is-error {
    color: var(--danger);
}

.send-link-status.hidden {
    display: none;
}

.account-locked-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
}

.badge-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.08);
}

.badge-lock-sm {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.22);
    vertical-align: middle;
}

.account-lock-hero {
    position: relative;
    margin-bottom: 24px;
    padding: 1px;
    border-radius: calc(var(--radius-lg) + 2px);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.45), rgba(139, 124, 248, 0.2) 50%, rgba(251, 191, 36, 0.15));
    overflow: hidden;
}

.account-lock-hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 0% 50%, rgba(251, 191, 36, 0.12), transparent 60%),
        radial-gradient(ellipse 50% 60% at 100% 0%, rgba(139, 124, 248, 0.08), transparent 55%);
    pointer-events: none;
}

.account-lock-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    gap: 28px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(24, 20, 12, 0.96), rgba(14, 14, 18, 0.98));
}

.account-lock-hero-main {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.account-lock-icon-wrap {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: 0 0 32px rgba(251, 191, 36, 0.12);
}

.account-lock-icon-wrap svg {
    width: 28px;
    height: 28px;
}

.account-lock-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
}

.account-lock-hero-copy h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.account-lock-hero-copy > p {
    margin: 0 0 16px;
    max-width: 52ch;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
}

.account-lock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.account-lock-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.account-lock-chip svg {
    flex-shrink: 0;
    color: var(--text-3);
}

.account-lock-panel {
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border);
}

.account-lock-panel-title {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.account-lock-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-lock-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.account-lock-step-num {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.account-lock-step-body {
    flex: 1;
    min-width: 0;
}

.account-lock-step-body strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
}

.account-lock-step-body > p {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
}

.account-lock-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.account-lock-send-btn.is-sent {
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.35);
    background: var(--success-dim);
}

.account-lock-otp-form {
    margin: 0;
}

.account-lock-otp-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.account-lock-otp-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-inset);
    color: var(--text);
}

.account-lock-otp-input:focus {
    outline: none;
    border-color: rgba(139, 124, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(139, 124, 248, 0.15);
}

.account-lock-verify-btn {
    flex-shrink: 0;
    min-width: 88px;
}

.card-credentials-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-credentials-head h3 {
    margin: 0;
}

.card-credentials-lock-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.card-credentials-locked {
    position: relative;
    border-color: rgba(251, 191, 36, 0.14);
}

.credentials-locked-preview {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0 8px;
    overflow: hidden;
}

.credentials-locked-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
}

.credentials-locked-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}

.credentials-locked-bar {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.credentials-locked-row:nth-child(2) .credentials-locked-bar { width: 72%; }
.credentials-locked-row:nth-child(3) .credentials-locked-bar { width: 48%; }
.credentials-locked-row:nth-child(4) .credentials-locked-bar { width: 86%; }
.credentials-locked-row:nth-child(5) .credentials-locked-bar { width: 36%; }

.credentials-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(180deg, rgba(18, 18, 22, 0.2), rgba(18, 18, 22, 0.88) 45%, rgba(18, 18, 22, 0.95));
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.credentials-locked-overlay svg {
    color: #fbbf24;
    opacity: 0.9;
}

@media (max-width: 900px) {
    .account-lock-hero-grid {
        grid-template-columns: 1fr;
        padding: 22px;
        gap: 22px;
    }

    .account-lock-hero-main {
        flex-direction: column;
        gap: 14px;
    }

    .account-lock-otp-row {
        flex-direction: column;
    }

    .account-lock-verify-btn {
        width: 100%;
    }

    .credentials-locked-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.id-card-locked-preview {
    margin-top: 4px;
}

.id-card-locked-slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.id-card-locked-slot {
    aspect-ratio: 1.6;
    border-radius: 10px;
    border: 1px dashed rgba(251, 191, 36, 0.22);
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.04), rgba(255, 255, 255, 0.02)),
        repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255, 255, 255, 0.02) 8px, rgba(255, 255, 255, 0.02) 16px);
}

.id-card-locked-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 13px;
    color: var(--text-3);
}

.id-card-locked-note svg {
    color: #fbbf24;
    flex-shrink: 0;
}

.account-locked-copy h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.account-locked-copy p {
    margin: 0 0 8px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.45;
}

.account-unlock-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: min(100%, 320px);
}

.account-unlock-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.account-unlock-form input {
    flex: 1 1 140px;
    min-width: 0;
}

.account-unlock-status {
    margin: 0;
    font-size: 13px;
}

.account-unlock-status.is-success {
    color: var(--success);
}

.account-unlock-status.is-error {
    color: var(--danger);
}

.account-unlock-status.is-pending {
    color: var(--text-2);
}

.account-unlock-status.hidden {
    display: none;
}

.account-unlock-status:not(.hidden) {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.account-unlock-status.is-success:not(.hidden) {
    color: var(--success);
    background: var(--success-dim);
    border-color: rgba(74, 222, 128, 0.2);
}

.account-unlock-status.is-error:not(.hidden) {
    color: var(--danger);
    background: var(--danger-dim);
    border-color: rgba(248, 113, 113, 0.2);
}

.credentials-locked-note {
    margin: 0;
    color: var(--text-2);
    font-size: 14px;
}

.release-lock-modal {
    max-width: 460px;
}

.release-lock-form {
    padding: 20px 24px 0;
}

.release-lock-steps {
    list-style: none;
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.release-lock-steps li {
    display: grid;
    gap: 8px;
}

.release-lock-steps strong {
    font-size: 14px;
}

.release-lock-steps p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.release-lock-steps button {
    justify-self: start;
}

.release-lock-form .account-lock-otp-input {
    width: 100%;
}

.flow-section {
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.flow-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.flow-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.flow-section .section-hint {
    margin-bottom: 14px;
}

.flow-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.flow-section-head h3 { margin: 0; }

.flow-grid { gap: 14px !important; }

.flow-empty {
    font-size: 13px;
    color: var(--text-3);
    padding: 16px;
    background: var(--surface-inset);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    text-align: center;
}

.flow-section .bonus-columns {
    gap: 14px;
}

.flow-section .bonus-item {
    padding: 12px 14px;
}

.flow-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 32px;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.flow-actions .btn-primary { min-width: 140px; }

@media (max-width: 960px) {
    .flow-layout { grid-template-columns: 1fr; }
    .flow-aside {
        padding: 24px 24px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .flow-back { margin-bottom: 24px; }
    .flow-aside h1 { font-size: 24px; }
    .flow-tagline { margin-bottom: 24px; }
    .flow-steps { flex-direction: row; gap: 8px; padding-left: 0; }
    .flow-steps::before { display: none; }
    .flow-step-item { flex: 1; padding: 10px; }
    .flow-step-item small { display: none; }
    .flow-panel { padding: 32px 24px 40px; align-items: flex-start; }
    .flow-step-header h2 { font-size: 22px; }
    .flow-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
    .flow-form.flow-form-session .session-filter-row,
    .session-filter-row,
    .session-filter-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ─── Dashboard ─── */
.dash-header { margin-bottom: 24px; }

.dash-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.dash-metrics-member {
    grid-template-columns: repeat(3, 1fr);
}

.dash-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 22px;
    background: rgba(16, 16, 20, 0.9);
}

.dash-metric-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

.dash-metric-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-metric-money { font-size: 26px; }

.dash-metric-sub {
    font-size: 12px;
    color: var(--text-3);
}

.dash-trend {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    width: fit-content;
    font-variant-numeric: tabular-nums;
}

.dash-trend-up { background: var(--success-dim); color: var(--success); }
.dash-trend-down { background: var(--danger-dim); color: var(--danger); }
.dash-trend-flat { background: rgba(255,255,255,0.05); color: var(--text-3); }

.dash-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

.dash-chart-panel {
    padding: 0 !important;
    overflow: hidden;
    border-color: rgba(139, 124, 248, 0.12) !important;
    box-shadow: 0 0 0 1px rgba(139, 124, 248, 0.06), 0 20px 50px rgba(0, 0, 0, 0.25);
}

.dash-chart-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 0;
}

.dash-chart-toolbar h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}

.dash-chart-toolbar p {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

.dash-chart-toolbar-compact { padding-bottom: 4px; }

.dash-range {
    display: flex;
    gap: 4px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.dash-range-btn {
    border: none;
    background: transparent;
    color: var(--text-3);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.dash-range-btn:hover { color: var(--text-2); }

.dash-range-btn.is-active {
    background: var(--accent);
    color: #fff;
}

.dash-chart-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 24px 8px;
}

.dash-chart-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.dash-chart-stat span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
}

.dash-chart-stat strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-chart-stat small {
    font-size: 11px;
    color: var(--text-3);
}

.dash-chart-canvas {
    position: relative;
    height: 380px;
    padding: 8px 16px 20px;
}

.dash-chart-canvas-sm { height: 200px; padding: 0 16px 16px; }

.dash-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-side-card {
    padding: 18px 20px !important;
}

.dash-side-card h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
    margin: 0 0 14px;
}

.dash-platform + .dash-platform { margin-top: 14px; }

.dash-platform-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-3);
    font-weight: 600;
}

.dash-bar {
    height: 8px;
    background: var(--surface-inset);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.dash-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.dash-bar-po { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.dash-bar-qx { background: linear-gradient(90deg, #a855f7, #c084fc); }

.dash-period-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-period-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-2);
}

.dash-period-list li:last-child { border-bottom: none; padding-bottom: 0; }

.dash-period-list strong {
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-leaderboard {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-leaderboard li {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: center;
}

.dash-leader-name {
    grid-column: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-leader-name:hover { color: var(--accent-2); }

.dash-leader-count {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-leader-bar {
    grid-column: 1;
    height: 6px;
    background: var(--surface-inset);
    border-radius: 999px;
    overflow: hidden;
}

.dash-leader-bar div {
    height: 100%;
    background: linear-gradient(90deg, #8b7cf8, #a78bfa);
    border-radius: 999px;
    min-width: 2px;
    transition: width 0.5s ease;
}

.dash-empty {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

.dash-growth {
    padding: 0 !important;
    margin-bottom: 24px;
    overflow: hidden;
}

.dash-growth-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 8px 14px;
    background: var(--success-dim);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius-sm);
}

.dash-growth-badge span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--success);
}

.dash-growth-badge strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.dash-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dash-tables-single {
    grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
    .dash-main { grid-template-columns: 1fr; }
    .dash-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .dash-metrics { grid-template-columns: 1fr 1fr; }
    .dash-chart-stats { grid-template-columns: 1fr 1fr; }
    .dash-chart-canvas { height: 280px; }
    .dash-side { grid-template-columns: 1fr; }
    .dash-tables { grid-template-columns: 1fr; }
    .dash-metric-value { font-size: 26px; }
}

/* Quick add (accounts list) */
.quick-add-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    transition: max-height 0.3s var(--ease), opacity 0.25s var(--ease), margin 0.3s var(--ease);
}

.quick-add-panel.is-open {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 20px;
}

.quick-add-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 20px 24px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.quick-add-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr 1fr;
    gap: 14px;
}

.quick-add-fields .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 6px;
    display: block;
}

.quick-add-fields input,
.quick-add-fields select {
    width: 100%;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
}

.quick-add-fields input:focus,
.quick-add-fields select:focus {
    border-color: rgba(139, 124, 248, 0.45);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.quick-add-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 2px;
}

@media (max-width: 900px) {
    .quick-add-form {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-add-fields {
        grid-template-columns: 1fr 1fr;
    }

    .quick-add-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 540px) {
    .quick-add-fields {
        grid-template-columns: 1fr;
    }
}

/* ─── Sessions ─── */
.session-start-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, rgba(139, 124, 248, 0.15), rgba(18, 18, 22, 0.9) 55%);
    border: 1px solid rgba(139, 124, 248, 0.3);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.session-start-cta:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 124, 248, 0.5);
    box-shadow: 0 16px 48px rgba(139, 124, 248, 0.15);
}

.session-start-glow {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 124, 248, 0.25), transparent 70%);
    pointer-events: none;
}

.session-start-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(139, 124, 248, 0.4);
}

.session-start-icon svg { width: 22px; height: 22px; }

.session-start-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.session-start-text strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.session-start-text small {
    font-size: 13px;
    color: var(--text-2);
}

.session-start-arrow {
    font-size: 24px;
    color: var(--accent-2);
    opacity: 0.8;
}

.session-dash-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.session-dash-actions .session-start-cta {
    margin-bottom: 0;
}

.session-active-strip {
    padding: 16px 20px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.session-active-strip-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin-bottom: 12px;
}

.session-active-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.session-active-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-width: 240px;
    flex: 1;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}

.session-active-card:hover {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.05);
}

.session-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    flex-shrink: 0;
    animation: session-dot-pulse 2s ease infinite;
}

.session-active-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.session-active-meta strong {
    font-size: 14px;
}

.session-active-meta small {
    font-size: 12px;
    color: var(--text-3);
}

.session-active-continue {
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
    flex-shrink: 0;
}

.sessions-live-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
    padding: 8px 14px;
    background: rgba(52, 211, 153, 0.1);
    border-radius: 999px;
}

.nav-item-session .nav-icon svg { fill: rgba(139, 124, 248, 0.15); }

.panel-inset {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.filters-grid-compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.filter-field-multiselect {
    position: relative;
}

.filter-multiselect-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.filter-multiselect-trigger:hover,
.filter-multiselect-trigger[aria-expanded="true"] {
    border-color: rgba(139, 124, 248, 0.45);
}

.filter-multiselect-trigger svg {
    flex-shrink: 0;
    color: var(--text-3);
}

.filter-multiselect-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.filter-multiselect-panel.hidden {
    display: none;
}

.filter-multiselect-group {
    margin: 8px 8px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

.filter-multiselect-group:first-child {
    margin-top: 0;
}

.filter-multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}

.filter-multiselect-option:hover {
    background: var(--surface-inset);
}

.filter-multiselect-option input {
    accent-color: var(--accent);
    flex-shrink: 0;
}

.filter-multiselect-option-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-multiselect-group.is-hidden,
.filter-multiselect-option.is-hidden {
    display: none;
}
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-3);
}

.session-select-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(139, 124, 248, 0.03);
}

.session-select-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-select-count {
    font-size: 13px;
    color: var(--text-2);
}

.session-select-count strong {
    color: var(--accent-2);
    font-size: 16px;
}

.session-select-progress-track {
    height: 4px;
    background: var(--surface-inset);
    border-radius: 999px;
    overflow: hidden;
    max-width: 220px;
}

.session-select-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    transition: width 0.2s var(--ease);
}

.session-pick-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-inset);
}

.session-pick-table-wrap {
    border: none;
    border-radius: 0;
    max-height: 440px;
    overflow: auto;
}

.session-pick-table {
    margin: 0;
}

.session-pick-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-solid);
    box-shadow: 0 1px 0 var(--border);
}

.session-pick-table .col-check {
    width: 44px;
    padding-left: 16px;
}

.session-pick-row {
    cursor: pointer;
}

.session-pick-row:hover:not(.is-selected) {
    background: rgba(255, 255, 255, 0.02);
}

.session-pick-row.is-selected {
    background: rgba(139, 124, 248, 0.08);
}

.session-pick-row.is-selected td {
    border-color: rgba(139, 124, 248, 0.12);
}

.session-pick-row.is-selected .session-pick-check-box {
    background: var(--accent);
    border-color: var(--accent);
}

.session-pick-row.is-selected .session-pick-check-box::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.session-pick-check {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.session-pick-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.session-pick-check-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: var(--surface-solid);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s var(--ease);
}

.session-pick-check-box::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0.5);
    opacity: 0;
    margin-top: -2px;
    transition: all 0.15s var(--ease);
}

.session-pick-account {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.session-pick-account .row-sub {
    font-size: 12px;
    color: var(--text-3);
}

.session-pick-bonuses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 280px;
}

.session-pick-bonus-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(139, 124, 248, 0.12);
    color: var(--accent-2);
    border: 1px solid rgba(139, 124, 248, 0.18);
}

.session-pick-bonus-tag em {
    font-style: normal;
    font-size: 10px;
    opacity: 0.85;
    color: var(--text-3);
}

.session-pick-empty {
    padding: 48px 24px !important;
    text-align: center;
}

.session-filters {
    margin-bottom: 16px;
}

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

.session-table .btn-copy { margin-left: 8px; }

.session-cred { font-size: 13px; }

.session-totp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.session-totp-ring {
    flex-shrink: 0;
    line-height: 0;
}

.session-totp-ring-track {
    stroke: var(--border);
}

.session-totp-ring-progress {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.session-totp-code {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-2);
}

.session-totp .btn-copy-totp {
    padding: 2px 6px;
    font-size: 12px;
    min-height: 0;
}

.session-bonus-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.session-bonus-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
}

.session-bonus-check input { accent-color: var(--accent); }

.session-bonus-radios .session-bonus-check:has(input:checked) {
    border-color: rgba(139, 124, 248, 0.55);
    background: rgba(139, 124, 248, 0.12);
}

.session-review {
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.session-review-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.session-review-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.session-review-item:last-child { border-bottom: none; }

.session-review-total {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-2);
}

.session-start-preview {
    text-align: center;
    padding: 24px;
}

.session-start-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 3px solid rgba(139, 124, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: session-ring-pulse 2s ease infinite;
}

.session-start-ring-inner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
}

@keyframes session-ring-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 124, 248, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(139, 124, 248, 0); }
}

.btn-session-start {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #ef4444;
    filter: brightness(1.05);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    justify-content: center;
}

.session-live-hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(18, 18, 22, 0.9) 60%);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius-lg);
}

.session-live-animation {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.session-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(52, 211, 153, 0.4);
    animation: session-pulse 2s ease-out infinite;
}

.session-pulse-ring-2 { animation-delay: 1s; }

@keyframes session-pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.session-pulse-core {
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.5);
    animation: session-core-glow 2s ease infinite;
}

.session-pulse-core svg { width: 24px; height: 24px; margin-left: 3px; }

@keyframes session-core-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(52, 211, 153, 0.4); }
    50% { box-shadow: 0 0 40px rgba(52, 211, 153, 0.7); }
}

.session-live-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--success);
    margin-bottom: 6px;
}

.session-live-info h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.session-live-timer {
    font-size: 40px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 6px;
}

.session-live-meta {
    font-size: 14px;
    color: var(--text-2);
}

.session-live-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.session-live-stat {
    padding: 20px 24px;
    background: var(--surface-solid);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-live-stat-highlight {
    background: linear-gradient(135deg, rgba(139, 124, 248, 0.1), var(--surface-solid));
}

.session-live-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

.session-live-stat-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.session-live-stat-money {
    font-variant-numeric: tabular-nums;
}

.session-live-stat-bonus {
    color: var(--accent-2);
}

.session-live-stat small {
    font-size: 11px;
    color: var(--text-3);
}

.session-live-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
}

.session-live-accounts-panel .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.session-live-table tfoot .session-live-tfoot {
    background: rgba(139, 124, 248, 0.06);
    border-top: 2px solid var(--border);
}

.session-live-table tfoot td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.session-live-bonus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.session-live-bonus-amt {
    color: var(--accent-2);
    font-weight: 600;
}

.session-deposit-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.session-deposit-cell .session-deposit-input {
    width: 100px;
    min-width: 80px;
}

.session-deposit-total-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.session-deposit-total-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
}

.session-deposit-total {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

.session-live-total-amt {
    color: var(--success);
}

.session-add-bonuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.session-add-bonuses .session-bonus-check em {
    font-style: normal;
    opacity: 0.75;
    font-size: 11px;
}

.session-add-preview {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-add-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-2);
}

.session-add-preview-total {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}

.session-add-preview-total strong {
    font-size: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
}

.session-live-actions-panel {
    padding: 24px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-live-actions-panel h2 {
    font-size: 17px;
    margin: 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.session-add-modal-wide {
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.session-add-modal-sub {
    font-size: 13px;
    color: var(--text-3);
    margin: 4px 0 0;
}

.session-add-steps {
    display: flex;
    gap: 8px;
    padding: 0 24px 16px;
    border-bottom: 1px solid var(--border);
}

.session-add-step-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-3);
    background: var(--surface-inset);
}

.session-add-step-pill.is-active {
    color: var(--accent-2);
    background: rgba(139, 124, 248, 0.15);
}

.session-add-step-pill.is-done {
    color: var(--text-2);
}

.session-add-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.session-add-step {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    flex-direction: column;
    gap: 12px;
}

.session-add-step.is-active {
    display: flex;
}

.session-add-filters {
    margin-bottom: 0;
}

.session-add-select-bar {
    margin: 0;
    padding: 10px 0;
    border: none;
    background: none;
}

.session-add-table-wrap {
    max-height: 280px;
    overflow: auto;
}

.session-add-foot {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    justify-content: space-between;
}

.session-add-foot-actions {
    display: flex;
    gap: 10px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-head h2 { margin: 0; font-size: 18px; }

.modal-close {
    font-size: 24px;
    line-height: 1;
    color: var(--text-3);
    background: none;
    border: none;
    cursor: pointer;
}

.session-end-form {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: min(78vh, 720px);
    overflow-y: auto;
}

.session-end-head {
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
}

.session-end-head h2 {
    margin-bottom: 4px;
}

.session-end-sub {
    font-size: 13px;
    color: var(--text-2);
    margin: 0;
}

.session-end-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.session-end-section:last-of-type {
    border-bottom: none;
}

.session-end-hint {
    font-size: 13px;
    color: var(--text-2);
    margin: 10px 0 0;
    line-height: 1.45;
}

.withdrawal-count-block {
    margin-bottom: 18px;
}

.withdrawal-count-block > label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
    margin-bottom: 10px;
}

.withdrawal-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.withdrawal-stepper-btn {
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 22px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.withdrawal-stepper-btn:hover {
    background: var(--surface-hover);
}

.withdrawal-count-input {
    width: 72px;
    height: 48px;
    border: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text);
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font);
    -moz-appearance: textfield;
}

.withdrawal-count-input::-webkit-outer-spin-button,
.withdrawal-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.withdrawal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.withdrawal-list.hidden {
    display: none;
}

.withdrawal-none-hint {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
    background: var(--surface-inset);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.withdrawal-none-hint.hidden {
    display: none;
}

.withdrawal-row {
    padding: 14px 16px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.withdrawal-row-head {
    margin-bottom: 12px;
}

.withdrawal-row-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-2);
}

.withdrawal-row-grid {
    display: grid;
    grid-template-columns: 1fr minmax(140px, 180px);
    gap: 16px;
    align-items: end;
}

.withdrawal-row-grid .form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
    margin-bottom: 6px;
}

.withdrawal-row-grid .filter-input,
.withdrawal-row-grid .filter-select {
    width: 100%;
    min-height: 42px;
}

.withdrawal-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-2);
    transition: border-color 0.15s, background 0.15s;
}

.withdrawal-total-bar.is-active {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.22);
}

.withdrawal-total-bar strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-3);
    transition: color 0.15s;
}

.withdrawal-total-bar.is-active strong {
    color: var(--success);
}

.session-end-foot {
    padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: rgba(12, 12, 15, 0.96);
    position: sticky;
    bottom: 0;
}

.session-end-modal {
    width: min(800px, calc(100vw - 32px));
    max-width: 800px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-width: 640px) {
    .withdrawal-row-grid {
        grid-template-columns: 1fr;
    }
}

.modal-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 8px;
}

.session-summary-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.dash-metric-profit {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.18), rgba(74, 222, 128, 0.08));
}

.dash-metric-profit .dash-metric-label {
    color: rgba(74, 222, 128, 0.85);
}

.dash-metric-profit .dash-metric-value {
    color: var(--success);
}

.dash-metric-profit-loss {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(248, 113, 113, 0.08));
}

.dash-metric-profit-loss .dash-metric-label {
    color: rgba(248, 113, 113, 0.85);
}

.dash-metric-profit-loss .dash-metric-value {
    color: var(--danger);
}

.session-notes-panel {
    padding: 20px 24px !important;
    margin-bottom: 20px;
}

.badge-success {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--success-dim);
    color: var(--success);
}

@media (max-width: 900px) {
    .session-live-hero { flex-direction: column; text-align: center; }
    .session-live-stats { grid-template-columns: 1fr 1fr; }
    .session-live-grid { grid-template-columns: 1fr; }
    .filters-grid-compact { grid-template-columns: 1fr 1fr; }
    .session-summary-stats .dash-metric {
        padding: 16px 14px;
    }
    .session-summary-stats .dash-metric-value {
        font-size: 24px;
    }
    .session-summary-stats .dash-metric-money {
        font-size: 20px;
    }
}

/* Sidebar sessions menu */
.sidebar-session-menu {
    margin: 4px 0 12px 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-session-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sidebar-session-link:hover,
.sidebar-session-link.is-current {
    background: var(--surface-inset);
    color: var(--text);
}

.sidebar-session-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
    flex-shrink: 0;
}

.sidebar-session-dot.is-live {
    background: var(--success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
    animation: session-dot-pulse 2s ease infinite;
}

@keyframes session-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.sidebar-session-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sidebar-session-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-session-sub {
    font-size: 11px;
    color: var(--text-3);
}

.sidebar-session-all {
    margin-top: 4px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.sidebar-session-all:hover {
    text-decoration: underline;
}

/* Sessions list page */
.session-list-filters {
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.session-list-table .session-row-active {
    background: rgba(52, 211, 153, 0.04);
}

.session-status-live {
    animation: session-badge-glow 2s ease infinite;
}

@keyframes session-badge-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(52, 211, 153, 0.35); }
}

/* ─── PWA & Mobile shell ─── */
.mobile-header,
.mobile-bottom-nav,
.flow-mobile-header,
.flow-mobile-steps,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

.brand-mark-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 9px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-solid);
    color: var(--text-2);
    cursor: pointer;
}

.btn-icon svg { width: 18px; height: 18px; }

.pwa-install-banner {
    margin-bottom: 20px;
    border: 1px solid rgba(139, 124, 248, 0.25);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(139, 124, 248, 0.12), rgba(16, 16, 20, 0.95));
    overflow: hidden;
}

.pwa-install-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    flex-wrap: wrap;
}

.pwa-install-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.pwa-install-banner-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.pwa-install-banner-copy {
    flex: 1;
    min-width: 180px;
}

.pwa-install-banner-copy strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.pwa-install-banner-copy p {
    margin: 0;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.4;
}

.pwa-install-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 540px) {
    .pwa-install-banner-actions {
        width: 100%;
    }

    .pwa-install-banner-actions .btn {
        flex: 1;
    }
}

.session-pick-table,
.session-live-table,
.session-add-pick-table,
.session-list-table {
    min-width: 720px;
}

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-105%);
        transition: transform 0.28s var(--ease);
        box-shadow: none;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 24px 0 80px rgba(0, 0, 0, 0.55);
    }

    .sidebar-brand {
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        padding-right: 12px;
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin-left: auto;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface-solid);
        color: var(--text-2);
        cursor: pointer;
    }

    .sidebar-close svg { width: 18px; height: 18px; }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        border: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s var(--ease);
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 50;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
        margin: -16px -16px 16px;
        background: rgba(8, 8, 10, 0.88);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface-solid);
        color: var(--text);
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-menu-btn svg { width: 20px; height: 20px; }

    .mobile-header-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1;
        font-size: 15px;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(12, 12, 15, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border);
        justify-content: space-around;
        gap: 4px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 56px;
        min-height: 48px;
        padding: 6px 8px;
        border-radius: var(--radius-sm);
        color: var(--text-3);
        font-size: 10px;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.15s, background 0.15s;
    }

    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-item.active,
    .mobile-nav-item.mobile-nav-item-session.active {
        color: var(--accent-2);
        background: var(--accent-dim);
    }

    .dash-header { margin-bottom: 20px; }

    .dash-header .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .session-dash-actions .session-start-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .session-active-list {
        flex-direction: column;
    }

    .session-active-card {
        min-width: 0;
        width: 100%;
    }

    .session-live-stats {
        grid-template-columns: 1fr 1fr;
    }

    .session-live-grid {
        grid-template-columns: 1fr;
    }

    .session-live-hero {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal,
    .session-add-modal-wide,
    .session-end-modal {
        width: 100%;
        max-width: none;
        max-height: 92vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        margin: 0;
    }

    .modal-foot,
    .session-end-foot {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-foot .btn,
    .session-end-foot .btn {
        width: 100%;
        min-height: 44px;
    }

    .session-end-section {
        padding: 16px;
    }

    .withdrawal-row-grid {
        grid-template-columns: 1fr;
    }

    .dash-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-chart-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dash-chart-toolbar .header-actions,
    .dash-chart-period {
        width: 100%;
    }

    .session-start-arrow {
        display: none;
    }

    .mobile-bottom-nav {
        justify-content: space-evenly;
    }

    .mobile-nav-item {
        min-width: 0;
        flex: 1;
        max-width: 80px;
        padding: 6px 4px;
    }

    .mobile-nav-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .flow-mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 60;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
        background: rgba(8, 8, 10, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
    }

    .flow-mobile-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        color: var(--text);
        flex-shrink: 0;
    }

    .flow-mobile-back svg { width: 18px; height: 18px; }

    .flow-mobile-title {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .flow-mobile-eyebrow {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-3);
    }

    .flow-mobile-title strong {
        font-size: 16px;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .flow-mobile-steps {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        background: rgba(12, 12, 15, 0.9);
    }

    .flow-mobile-step {
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-3);
        border: 2px solid var(--border-strong);
        background: var(--surface-solid);
    }

    .flow-mobile-step.is-active {
        color: #fff;
        border-color: var(--accent);
        background: var(--accent);
    }

    .flow-mobile-step.is-done {
        color: var(--accent-2);
        border-color: var(--accent);
        background: var(--accent-dim);
    }

    .flow-layout {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 120px);
    }

    .flow-aside {
        display: none;
    }

    .flow-panel {
        padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
        align-items: flex-start;
        justify-content: flex-start;
    }

    .flow-panel:has(.flow-form-session) {
        padding: 16px;
    }

    .flow-step-header h2 {
        font-size: 22px;
    }

    .flow-actions {
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, transparent, rgba(8, 8, 10, 0.96) 24%);
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .flow-actions .btn {
        min-height: 44px;
        width: 100%;
    }

    .quick-add-form {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-add-fields {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .filter-actions {
        grid-column: span 1;
        width: 100%;
    }

    .auth-panel {
        padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .auth-form-wrap {
        width: 100%;
    }

    .btn,
    .filter-select,
    .filter-input,
    .filter-multiselect-trigger {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 36px;
    }

    .session-bonus-check {
        min-height: 40px;
    }
}

@media (max-width: 540px) {
    .dash-metrics,
    .session-live-stats {
        grid-template-columns: 1fr;
    }

    .sessions-live-count {
        width: 100%;
        text-align: center;
    }

    .flow-form.flow-form-session .session-filter-row,
    .session-filter-row,
    .session-filter-row-3 {
        grid-template-columns: 1fr;
    }

    .session-filter-apply {
        width: 100%;
    }

    .dash-chart-stats {
        grid-template-columns: 1fr;
    }

    .settings-tabs {
        flex-direction: column;
    }

    .settings-tab {
        width: 100%;
        justify-content: center;
    }

    .team-permissions-grid {
        grid-template-columns: 1fr;
    }
}

@media (display-mode: standalone) {
    .mobile-install-btn { display: none !important; }

    .mobile-header {
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }

    .flow-mobile-header {
        padding-top: calc(14px + env(safe-area-inset-top, 0px));
    }
}

/* ─── Settings tabs & team ─── */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.settings-tab:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.settings-tab.active {
    color: var(--accent-2);
    border-color: rgba(139, 124, 248, 0.35);
    background: var(--accent-dim);
}

.team-form-panel {
    padding: 24px;
}

.team-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.team-role-notes {
    margin-bottom: 24px;
}

.team-role-note {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-inset);
}

.team-role-note strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.team-role-note p {
    margin: 0;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
}

.team-permissions-block {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-inset);
    margin-bottom: 24px;
}

.team-permissions-block.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.team-permissions-block h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.team-permissions-hint {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 14px;
}

.team-permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.team-permission-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-solid);
    cursor: pointer;
}

.team-permission-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.team-access-cell {
    max-width: 280px;
}

.btn-danger-text {
    color: var(--danger);
}

.inline-form {
    display: inline;
}

.btn,
.filter-select,
.filter-input,
.filter-multiselect-trigger,
.mobile-menu-btn,
.mobile-nav-item,
.nav-item {
    touch-action: manipulation;
}

@media (max-width: 860px) {
    .team-form .form-grid {
        grid-template-columns: 1fr;
    }

    .team-form-panel {
        padding: 16px;
    }
}

/* ─── Activity / attendance ─── */
.activity-header {
    align-items: flex-end;
    gap: 16px;
}

.activity-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.activity-user-filter {
    margin: 0;
}

.activity-user-filter .filter-select {
    min-width: 150px;
}

.activity-checkin-dock {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(18, 18, 22, 0.9);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.activity-checkin-dock.is-live {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(18, 28, 22, 0.95);
}

.activity-checkin-dock .btn {
    border-radius: 999px;
    min-height: 36px;
    padding: 0 16px;
}

.activity-checkin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.activity-checkout-modal {
    max-width: 640px;
    width: min(640px, calc(100vw - 32px));
}

.activity-checkout-sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-3);
}

.activity-checkout-form-modal {
    padding: 0 20px 20px;
}

.activity-checkout-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.activity-checkout-summary-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.22);
}

.activity-checkout-summary-item span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.activity-checkout-summary-item strong {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.activity-checkout-form-modal textarea {
    width: 100%;
    min-height: 260px;
    height: 280px;
    resize: vertical;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    font-family: var(--font);
    outline: none;
}

.activity-checkout-form-modal textarea:focus {
    border-color: rgba(139, 124, 248, 0.45);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.activity-checkout-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-3);
}

.activity-checkout-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

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

.activity-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
    animation: activity-pulse 1.6s ease-in-out infinite;
}

@keyframes activity-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.activity-status-checked_in {
    color: var(--success);
    background: var(--success-dim);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.activity-status-checked_out {
    color: var(--text-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.activity-status-not_started {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.activity-today-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.activity-today-stat {
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(18, 18, 22, 0.72);
}

.activity-today-stat span {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
}

.activity-today-stat strong {
    font-size: 26px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.activity-today-stat small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-3);
}

.activity-days-panel {
    margin-bottom: 20px;
}

.activity-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.activity-section-head h2 {
    margin: 0 0 4px;
}

.activity-section-head p {
    margin: 0;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-timeline-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 14px;
    min-height: 84px;
}

.activity-timeline-rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.activity-timeline-rail::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: -10px;
    width: 2px;
    background: rgba(255, 255, 255, 0.06);
}

.activity-timeline-item:last-child .activity-timeline-rail::before {
    display: none;
}

.activity-timeline-dot {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--surface-solid);
    border: 2px solid rgba(167, 139, 250, 0.55);
    box-shadow: 0 0 0 4px rgba(139, 124, 248, 0.08);
}

.activity-timeline-item.is-today .activity-timeline-dot {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
    background: rgba(74, 222, 128, 0.25);
}

.activity-timeline-item.is-idle .activity-timeline-dot {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.activity-timeline-body {
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.activity-timeline-item.is-today .activity-timeline-body {
    border-color: rgba(74, 222, 128, 0.22);
    background: rgba(74, 222, 128, 0.05);
}

.activity-timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.activity-timeline-top strong {
    display: block;
    font-size: 15px;
}

.activity-timeline-top .text-dim {
    font-size: 12px;
}

.activity-timeline-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.activity-timeline-metrics em {
    display: block;
    margin-bottom: 3px;
    font-style: normal;
    font-size: 11px;
    color: var(--text-3);
}

.activity-timeline-metrics b {
    font-size: 14px;
    font-weight: 700;
}

.activity-timeline-notes {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-2);
}

.activity-charts-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    margin-bottom: 20px;
}

.activity-chart-panel {
    margin: 0;
}

.activity-board-panel {
    margin-bottom: 20px;
}

.activity-admin-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.activity-admin-metric {
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 50%),
        rgba(12, 12, 16, 0.9);
}

.activity-admin-metric.is-primary {
    border-color: rgba(139, 124, 248, 0.35);
    background:
        linear-gradient(145deg, rgba(139, 124, 248, 0.16), transparent 55%),
        rgba(12, 12, 16, 0.92);
}

.activity-admin-metric.is-live {
    border-color: rgba(74, 222, 128, 0.28);
    background:
        linear-gradient(145deg, rgba(74, 222, 128, 0.1), transparent 55%),
        rgba(12, 12, 16, 0.92);
}

.activity-admin-metric > span {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
}

.activity-admin-metric > strong {
    display: block;
    font-size: 34px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.activity-admin-metric > small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-3);
}

.activity-trend {
    display: inline-flex;
    margin-top: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.activity-trend.is-up {
    color: #86efac;
    background: rgba(74, 222, 128, 0.12);
}

.activity-trend.is-down {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
}

.activity-trend.is-flat {
    color: var(--text-3);
    background: rgba(255, 255, 255, 0.04);
}

.activity-admin-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.activity-vs-panel,
.activity-members-chart-panel {
    margin: 0;
}

.activity-vs-head {
    margin-bottom: 18px;
}

.activity-vs-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.activity-vs-head p {
    margin: 0;
}

.activity-vs-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-vs-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.activity-vs-label span {
    font-size: 13px;
    color: var(--text-2);
}

.activity-vs-label strong {
    font-size: 20px;
    letter-spacing: -0.03em;
}

.activity-vs-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.activity-vs-track div {
    height: 100%;
    border-radius: 999px;
    min-width: 2px;
}

.activity-vs-track .is-today {
    background: linear-gradient(90deg, #8b7cf8, #c4b5fd);
}

.activity-vs-track .is-yesterday {
    background: linear-gradient(90deg, #52525b, #a1a1aa);
}

.activity-vs-delta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.activity-vs-delta strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.activity-vs-delta strong.is-up { color: #86efac; }
.activity-vs-delta strong.is-down { color: #fca5a5; }
.activity-vs-delta strong.is-flat { color: var(--text-2); }

.activity-vs-delta span {
    font-size: 13px;
    color: var(--text-3);
}

.activity-members-canvas {
    height: 220px;
}

.activity-admin-main-canvas {
    height: 320px;
}

.activity-chart-panel-wide {
    margin-bottom: 20px;
}

.activity-compare-highlights-admin .activity-compare-you-body > strong {
    font-size: 32px;
}

.activity-compare-panel {
    margin-bottom: 20px;
}

.activity-compare-head {
    margin-bottom: 16px;
}

.activity-compare-head h2 {
    margin: 0 0 4px;
}

.activity-compare-head p {
    margin: 0;
}

.activity-compare-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.activity-compare-spotlight,
.activity-compare-you {
    position: relative;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    min-height: 132px;
}

.activity-compare-spotlight.is-today {
    background:
        linear-gradient(145deg, rgba(251, 191, 36, 0.14), transparent 55%),
        rgba(12, 12, 16, 0.92);
    border-color: rgba(251, 191, 36, 0.28);
}

.activity-compare-spotlight.is-week {
    background:
        linear-gradient(145deg, rgba(96, 165, 250, 0.14), transparent 55%),
        rgba(12, 12, 16, 0.92);
    border-color: rgba(96, 165, 250, 0.28);
}

.activity-compare-you.is-today-rank {
    background:
        linear-gradient(145deg, rgba(139, 124, 248, 0.16), transparent 55%),
        rgba(12, 12, 16, 0.92);
    border-color: rgba(139, 124, 248, 0.3);
}

.activity-compare-you.is-week-rank {
    background:
        linear-gradient(145deg, rgba(74, 222, 128, 0.12), transparent 55%),
        rgba(12, 12, 16, 0.92);
    border-color: rgba(74, 222, 128, 0.25);
}

.activity-compare-spotlight-label {
    display: block;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.activity-compare-spotlight-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.activity-compare-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.activity-compare-avatar.is-week {
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.3);
}

.activity-compare-spotlight-body strong {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.activity-compare-spotlight-body span {
    font-size: 12px;
    color: var(--text-3);
}

.activity-compare-spotlight-score {
    text-align: right;
}

.activity-compare-spotlight-score em {
    display: block;
    font-style: normal;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.activity-compare-spotlight.is-today .activity-compare-spotlight-score em {
    color: #fcd34d;
}

.activity-compare-spotlight.is-week .activity-compare-spotlight-score em {
    color: #93c5fd;
}

.activity-compare-spotlight-score small {
    font-size: 11px;
    color: var(--text-3);
}

.activity-compare-empty {
    margin: 0;
    font-size: 13px;
    color: var(--text-3);
}

.activity-compare-you-body {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 14px;
}

.activity-compare-you-body > strong {
    font-size: 36px;
    letter-spacing: -0.05em;
    line-height: 0.9;
}

.activity-compare-you.is-today-rank .activity-compare-you-body > strong {
    color: var(--accent-2);
}

.activity-compare-you.is-week-rank .activity-compare-you-body > strong {
    color: #86efac;
}

.activity-compare-you-body span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.activity-compare-you-body small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-3);
}

.activity-compare-you-meter {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.activity-compare-you-meter div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b7cf8, #c4b5fd);
}

.activity-compare-you-meter.is-week div {
    background: linear-gradient(90deg, #4ade80, #86efac);
}

.activity-compare-board {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
}

.activity-compare-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.activity-compare-board-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.activity-compare-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-compare-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.activity-compare-row.is-you {
    border-color: rgba(139, 124, 248, 0.35);
    background: rgba(139, 124, 248, 0.08);
}

.activity-compare-row.is-lead:not(.is-you) {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.05);
}

.activity-compare-rank {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.activity-compare-row.is-lead .activity-compare-rank {
    color: #fcd34d;
}

.activity-compare-row.is-you .activity-compare-rank {
    color: var(--accent-2);
}

.activity-compare-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    min-width: 0;
}

.activity-compare-name strong {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-compare-name em {
    flex-shrink: 0;
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--accent-2);
    background: var(--accent-dim);
    border: 1px solid rgba(139, 124, 248, 0.25);
}

.activity-compare-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.activity-compare-bar div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b7cf8, #60a5fa);
    min-width: 2px;
    transition: width 0.35s ease;
}

.activity-compare-row.is-you .activity-compare-bar div {
    background: linear-gradient(90deg, #a78bfa, #c4b5fd);
}

.activity-compare-row.is-lead .activity-compare-bar div {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.activity-compare-nums {
    text-align: right;
}

.activity-compare-nums strong {
    display: block;
    font-size: 18px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.activity-compare-nums span {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
}

@media (max-width: 980px) {
    .activity-compare-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-admin-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .activity-compare-highlights {
        grid-template-columns: 1fr;
    }

    .activity-compare-board-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-compare-row {
        grid-template-columns: 36px 1fr;
    }

    .activity-compare-nums {
        grid-column: 2;
        text-align: left;
    }
}

.activity-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.activity-board-head h2 {
    margin: 0 0 4px;
}

.activity-board-head p {
    margin: 0;
}

.activity-board-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.activity-board-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-2);
}

.activity-board-chip.is-in {
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.25);
    background: var(--success-dim);
}

.activity-board-chip.is-in em {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

.activity-board-chip.is-idle {
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.22);
    background: rgba(251, 191, 36, 0.08);
}

.activity-board-chip.is-accounts {
    color: var(--accent-2);
    border-color: rgba(139, 124, 248, 0.25);
    background: var(--accent-dim);
}

.activity-team-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.activity-team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        rgba(12, 12, 16, 0.9);
    overflow: hidden;
    transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.activity-team-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.activity-team-card-accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.activity-team-card-checked_in .activity-team-card-accent {
    background: linear-gradient(180deg, #4ade80, #22c55e);
}

.activity-team-card-checked_out .activity-team-card-accent {
    background: rgba(161, 161, 170, 0.55);
}

.activity-team-card-not_started .activity-team-card-accent {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.activity-team-card-checked_in {
    border-color: rgba(74, 222, 128, 0.22);
    background:
        linear-gradient(180deg, rgba(74, 222, 128, 0.08), transparent 42%),
        rgba(12, 12, 16, 0.9);
}

.activity-team-card-not_started {
    border-color: rgba(251, 191, 36, 0.16);
}

.activity-team-card-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.activity-team-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-2);
    background: var(--accent-dim);
    border: 1px solid rgba(139, 124, 248, 0.28);
}

.activity-team-avatar[data-status="checked_in"] {
    color: #86efac;
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
}

.activity-team-avatar[data-status="not_started"] {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.28);
}

.activity-team-identity strong {
    display: block;
    margin: 0 0 2px;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.activity-team-role {
    font-size: 12px;
    color: var(--text-3);
}

.activity-team-card-top .activity-status-pill {
    font-size: 11px;
    padding: 5px 9px;
}

.activity-team-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.activity-team-stat {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-team-stat span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.activity-team-stat strong {
    font-size: 20px;
    letter-spacing: -0.03em;
    line-height: 1;
}

.activity-team-card-shift {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-team-card-shift span {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    color: var(--text-3);
}

.activity-team-card-shift strong {
    font-size: 13px;
    font-weight: 600;
}

.activity-team-shift-sep {
    width: 18px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.activity-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.activity-history-head h2 {
    margin: 0 0 4px;
}

.activity-history-head p {
    margin: 0;
}

.activity-note-cell {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 980px) {
    .activity-charts-grid {
        grid-template-columns: 1fr;
    }

    .activity-today-strip {
        grid-template-columns: 1fr 1fr;
    }

    .activity-timeline-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .activity-header,
    .activity-header-actions {
        align-items: stretch;
    }

    .activity-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .activity-checkin-dock {
        width: 100%;
        justify-content: space-between;
        border-radius: 14px;
    }

    .activity-user-filter,
    .activity-user-filter .filter-select {
        width: 100%;
    }

    .activity-today-strip {
        grid-template-columns: 1fr;
    }

    .activity-admin-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .activity-admin-split {
        grid-template-columns: 1fr;
    }

    .activity-board-head {
        flex-direction: column;
    }

    .activity-board-chips {
        justify-content: flex-start;
    }

    .activity-team-card-top {
        grid-template-columns: auto 1fr;
    }

    .activity-team-card-top .activity-status-pill {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
