﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Design tokens from Figma ── */
:root {
    --bg:            #1b1f24;
    --bg-2:          #252a31;
    --bg-gradient:   linear-gradient(135deg, #1b1f24 0%, #323740 100%);
    --surface:       rgba(27,31,36,0.85);
    --surface-hover: rgba(255,255,255,0.05);
    --border:        rgba(255,255,255,0.08);
    --border-input:  rgba(255,255,255,0.10);

    --primary:       #7c1e9b;
    --secondary:     #4d1e9b;
    --accent:        #00d9ff;
    --teal-grad:     linear-gradient(to left, #00ff99, #00bbff);

    --text:          #ffffff;
    --text-muted:    #bcbcbc;
    --text-dim:      rgba(188,188,188,0.6);

    --danger:        #e53e3e;
    --warning-bg:    rgba(245,158,11,0.10);
    --warning-text:  #fffca3;
    --success:       #34d399;

    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     16px;
    --radius-xl:     20px;
    --radius-full:   9999px;

    --sidebar-w:     260px;
    --topbar-h:      64px;

    --shadow-card:   0 4px 24px rgba(0,0,0,0.35);
    --shadow-teal:   0 4px 16px rgba(0,217,255,0.18);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App shell: sidebar + content ── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(20,23,28,0.92);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--teal-grad);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-teal);
    flex-shrink: 0;
    font-size: 18px;
    overflow: hidden;
}

.brand-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.brand-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.brand-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.brand-text span {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Groups a run of links under a heading. The sidebar is otherwise one flat list, which is fine while
   everything in it concerns the same product - the management portal does not. */
.nav-section-label {
    margin: 16px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.7;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.sidebar-nav a:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.sidebar-nav a.active {
    background: var(--teal-grad);
    color: #1b1f24;
    box-shadow: 0 4px 12px rgba(0,217,255,0.12);
}

.sidebar-nav a .nav-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
    display: flex; align-items: center; justify-content: center;
}

.sidebar-nav a .nav-icon svg {
    width: 18px; height: 18px;
    stroke: currentColor;
}

.sidebar-nav a.active .nav-icon { opacity: 1; }

.sidebar-nav-separator {
    height: 1px;
    margin: 10px 12px;
    background: rgba(255,255,255,0.10);
}

.sidebar-nav a[data-help] {
    padding-right: 36px;
}

.sidebar-nav a[data-help]::after {
    content: "i";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    border: 1px solid currentColor;
    border-radius: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    opacity: .55;
}

.sidebar-nav a[data-help]:hover::after,
.sidebar-nav a[data-help]:focus-visible::after {
    opacity: 1;
}

.sidebar-nav a[data-help]::before {
    content: attr(data-help);
    position: absolute;
    left: 12px;
    top: calc(100% + 6px);
    width: calc(100% - 24px);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-2);
    color: var(--text);
    box-shadow: var(--shadow-card);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    transform: translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    z-index: 1100;
}

.sidebar-nav a[data-help]:hover::before,
.sidebar-nav a[data-help]:focus-visible::before {
    opacity: 1;
    transform: translateY(0);
}

.nav-badge {
    margin-left: 0;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    min-width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-security-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    padding: 4px 8px 10px;
    text-decoration: none;
    transition: color 0.15s;
}

.sidebar-security-link:hover { color: var(--text-muted); text-decoration: none; }

/* ── User Search ───────────────────────────────────────────── */
.user-search-wrap { max-width: 860px; }

.user-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 8px 6px 14px;
    margin-bottom: 24px;
}

.user-search-icon { display: flex; align-items: center; color: var(--text-dim); flex-shrink: 0; }

.user-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text);
    min-width: 0;
}

.user-search-input::placeholder { color: var(--text-dim); }

.user-search-btn { flex-shrink: 0; }

.user-search-default,
.user-search-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.user-search-empty .empty-hint { font-size: 13px; margin-top: 4px; color: var(--text-dim); }

.user-search-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.user-results-table-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.user-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.user-results-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
}

.user-results-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle, var(--border));
    vertical-align: middle;
}

/* Billing & Credits */
.billing-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.billing-summary-card,
.admin-panel.billing-panel {
    background: rgba(20,23,28,0.55);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.billing-summary-card {
    min-height: 112px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
}

.billing-summary-icon,
.heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.billing-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.billing-summary-icon svg,
.heading-icon svg {
    width: 22px;
    height: 22px;
}

.billing-summary-icon.danger,
.billing-avatar.danger {
    background: rgba(229,62,62,0.18);
    color: #ff6b6b;
}

.billing-summary-icon.warning,
.billing-avatar.warning {
    background: rgba(245,158,11,0.18);
    color: #f5b700;
}

.billing-summary-icon.success,
.billing-avatar.success {
    background: rgba(52,211,153,0.18);
    color: var(--success);
}

.billing-avatar.info {
    background: rgba(59,130,246,0.18);
    color: #60a5fa;
}

.billing-summary-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
}

.billing-summary-value span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.billing-summary-label,
.panel-note {
    color: var(--text-muted);
    font-size: 13px;
}

.billing-summary-amount {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
}

.billing-summary-amount.danger,
.heading-icon.danger {
    color: #ff6b6b;
}

.billing-summary-amount.warning {
    color: #f5b700;
}

.billing-summary-amount.success,
.heading-icon.accent {
    color: var(--success);
}

.admin-panel.billing-panel {
    padding: 20px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-heading h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    line-height: 1.2;
}

.billing-export-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.billing-export-link svg {
    width: 14px;
    height: 14px;
}

.billing-payment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-payment-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto auto auto;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
}

.billing-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.billing-row-main,
.billing-user-cell > div {
    min-width: 0;
}

.billing-row-main strong,
.billing-user-cell strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
}

.billing-row-main span,
.billing-user-cell span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.billing-row-amount {
    font-weight: 700;
    white-space: nowrap;
}

.billing-status-pill,
.billing-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.billing-status-pill.danger,
.billing-action.remove {
    background: rgba(229,62,62,0.18);
    color: #ff6b6b;
    border: 1px solid rgba(229,62,62,0.28);
}

.billing-status-pill.warning {
    background: rgba(245,158,11,0.18);
    color: #f5b700;
    border: 1px solid rgba(245,158,11,0.28);
}

.billing-status-pill.info {
    background: rgba(59,130,246,0.18);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.28);
}

.billing-status-pill.success,
.billing-action.add {
    background: rgba(52,211,153,0.16);
    color: var(--success);
    border: 1px solid rgba(52,211,153,0.28);
}

.billing-action.retry {
    background: rgba(0,217,255,0.15);
    color: var(--accent);
    border: 1px solid rgba(0,217,255,0.25);
}

.billing-action.contact {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
}

.billing-action.disabled {
    opacity: 0.45;
}

.billing-action:hover {
    text-decoration: none;
    filter: brightness(1.1);
}

.billing-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.billing-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.billing-table th {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.billing-table tr:last-child td {
    border-bottom: none;
}

.billing-user-cell,
.billing-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.billing-empty {
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

@media (max-width: 1100px) {
    .billing-summary-grid {
        grid-template-columns: 1fr;
    }

    .billing-payment-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .billing-status-pill,
    .billing-action {
        grid-column: 2 / span 2;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .admin-panel.billing-panel,
    .billing-summary-card {
        padding: 16px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .billing-payment-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .billing-row-amount,
    .billing-status-pill,
    .billing-action {
        grid-column: 2;
    }
}

.user-results-table tr:last-child td { border-bottom: none; }

.user-result-row:hover td { background: var(--surface-hover, rgba(255,255,255,0.03)); }

.user-result-name { font-weight: 500; }
.user-result-name a { color: var(--text); text-decoration: none; }

.user-result-date { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.user-result-action { text-align: right; }

/* Account type badges */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-venue    { background: rgba(99, 179, 237, 0.15); color: #63b3ed; }
.badge-artist   { background: rgba(154, 117, 240, 0.15); color: #9a75f0; }

/* Status badges */
.badge-status-active    { background: rgba(72, 187, 120, 0.15); color: #48bb78; }
.badge-status-suspended { background: rgba(237, 137, 54, 0.15);  color: #ed8936; }
.badge-status-banned    { background: rgba(245, 101, 101, 0.15); color: #f56565; }
.badge-status-default   { background: rgba(160, 174, 192, 0.15); color: #a0aec0; }
.badge-info             { background: rgba(99, 179, 237, 0.15);  color: #63b3ed; }

/* ── Account Detail Page ───────────────────────────────────── */
.detail-page { max-width: 1080px; }

.detail-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.detail-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.detail-breadcrumb a:hover { color: var(--text); }

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700;
    flex-shrink: 0;
}

.detail-name { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.detail-id { font-size: 12px; margin-left: 6px; }
.detail-header-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
}

.detail-col-main { display: flex; flex-direction: column; gap: 16px; }
.detail-col-side  { display: flex; flex-direction: column; gap: 16px; }

.detail-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
}

.detail-card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-card-count {
    background: var(--surface-raised);
    color: var(--text-dim);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}
.detail-card-count-warn { background: rgba(245, 101, 101, 0.15); color: #f56565; }

.help-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.help-intro {
    max-width: 980px;
}

.help-intro h1 {
    font-size: 28px;
    margin: 12px 0 8px;
}

.help-intro p,
.help-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.help-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-card .detail-card-title {
    margin-bottom: 2px;
    color: var(--text);
}

.help-card strong {
    color: var(--text);
    font-weight: 600;
}

@media (max-width: 1100px) {
    .help-grid { grid-template-columns: 1fr; }
}

.detail-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 16px;
    font-size: 14px;
    margin: 0;
}
.detail-dl dt { color: var(--text-dim); font-weight: 500; }
.detail-dl dd { margin: 0; color: var(--text); }
.detail-dl a  { color: var(--accent); text-decoration: none; }
.detail-dl a:hover { text-decoration: underline; }

.detail-table-wrap {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid var(--border-subtle, var(--border));
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.detail-table th {
    text-align: left;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
}
.detail-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle, var(--border));
    vertical-align: middle;
}
.detail-table tr:last-child td { border-bottom: none; }
.detail-date { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.detail-empty { color: var(--text-dim); font-size: 14px; margin: 0; padding: 8px 0; }

.metadata-block {
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    padding: 14px;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-role-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 7px 10px;
}

.detail-status-reason {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin: 8px 0 0;
}

.detail-action-form { margin: 0; }
.detail-action-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}
.detail-action-btns button { width: 100%; }
.action-btn-warn      { border-color: #ed8936; color: #ed8936; }
.action-btn-warn:hover      { background: rgba(237, 137, 54, 0.12); }
.action-btn-suspend   { border-color: #ed8936; color: #ed8936; }
.action-btn-suspend:hover   { background: rgba(237, 137, 54, 0.12); }
.action-btn-ban       { border-color: #f56565; color: #f56565; }
.action-btn-ban:hover       { background: rgba(245, 101, 101, 0.12); }
.action-btn-reinstate { border-color: #48bb78; color: #48bb78; }
.action-btn-reinstate:hover { background: rgba(72, 187, 120, 0.12); }

/* Notes */
.note-add-form { display: flex; flex-direction: column; gap: 8px; }
.note-textarea {
    width: 100%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    resize: vertical;
    font-family: inherit;
}
.note-textarea:focus { outline: none; border-color: var(--accent); }
.note-list { display: flex; flex-direction: column; gap: 12px; }
.note { background: var(--surface-raised); border-radius: 6px; padding: 12px 14px; }
.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: 12px;
    gap: 8px;
}
.note-meta strong { font-size: 13px; color: var(--text); }
.note-meta time { color: var(--text-dim); white-space: nowrap; }
.note-body { font-size: 14px; color: var(--text-muted); margin: 0; white-space: pre-wrap; }

/* ── Warn User Page ────────────────────────────────────────── */
.warn-page { max-width: 680px; }

.warn-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
}

.warn-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.warn-icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 10px;
    background: rgba(237, 137, 54, 0.12);
    color: #ed8936;
    display: flex; align-items: center; justify-content: center;
}

.warn-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.warn-subtitle { font-size: 14px; color: var(--text-muted); margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.warn-send-error {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #f56565;
    margin-bottom: 20px;
}

.warn-info {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.warn-effects-list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

.warn-message-field label { font-weight: 500; }
.warn-label-hint { font-weight: 400; color: var(--text-dim); font-size: 12px; margin-left: 6px; }

.warn-textarea { min-height: 140px; }

.warn-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    min-height: 20px;
}

.warn-char-count { font-size: 12px; color: var(--text-dim); margin-left: auto; }

.warn-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.warn-submit-btn { min-width: 140px; }

.detail-action-full-width { display: block; text-align: center; width: 100%; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    transition: background 0.15s;
}

.sidebar-user:hover { background: var(--surface-hover); }

.avatar {
    width: 32px; height: 32px;
    border-radius: var(--radius-full);
    background: var(--teal-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
    color: #1b1f24;
    flex-shrink: 0;
}

.avatar.lg { width: 40px; height: 40px; font-size: 15px; }

.user-info strong { display: block; font-size: 12px; font-weight: 500; color: var(--text); }
.user-info span   { font-size: 12px; color: var(--text-muted); }

/* ── Main content area ── */
.main-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* ── Top bar ── */
.topbar {
    height: var(--topbar-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(20,23,28,0.6);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 240px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 16px 8px 36px;
    font-size: 14px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.15s;
    display: block;
    margin: 0;
    width: 240px;
}

.search-box input::placeholder { color: #666; }
.search-box input:focus { outline: none; border-color: rgba(0,217,255,0.4); }

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ── Page content ── */
.shell {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ── Glass card ── */
.card, .panel, .metric {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-card);
}

.card, .panel { padding: 20px; }
.metric       { padding: 20px; }

/* ── Metric grid ── */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}

.metric .value {
    display: block;
    font-size: 30px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
}

.metric .label {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Content grid ── */
.content-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* ── Panel ── */
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: rgba(255,255,255,0.025); }

small { color: var(--text-muted); font-size: 12px; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-danger  { background: rgba(229,62,62,0.15);   color: #fc8181; }
.badge-warn    { background: rgba(245,158,11,0.15);   color: #fbbf24; }
.badge-success { background: rgba(52,211,153,0.15);   color: #34d399; }
.badge-info    { background: rgba(0,217,255,0.15);    color: #00d9ff; }
.badge-muted   { background: rgba(255,255,255,0.08);  color: var(--text-muted); }
.badge-purple  { background: rgba(124,30,155,0.20);   color: #c084fc; }

/* ── Buttons ── */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-full);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--teal-grad);
    color: #1b1f24;
    box-shadow: var(--shadow-teal);
}

.btn-primary:hover { opacity: 0.88; }

.btn-danger {
    background: rgba(229,62,62,0.15);
    color: #fc8181;
    border: 1px solid rgba(229,62,62,0.25);
}

.btn-danger:hover { background: rgba(229,62,62,0.25); }

.btn-ghost {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover { background: rgba(255,255,255,0.10); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-link { background: none; padding: 0; color: var(--accent); font-size: 13px; }
.btn-link:hover { text-decoration: underline; }

/* ── Forms ── */
label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input, select, textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.15s;
    margin-top: 0;
}

input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.3); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(0,217,255,0.5);
}

select { appearance: none; cursor: pointer; }
select option { background: var(--bg-2); color: var(--text); }
textarea { min-height: 96px; resize: vertical; }

.field { margin-bottom: 16px; }

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 8px;
    align-items: end;
}

/* ── Login page ── */
.login-page {
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-panel {
    width: 100%;
    max-width: 420px;
}

.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-brand-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-xl);
    background: var(--teal-grad);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0,217,255,0.18);
    font-size: 22px;
    margin-bottom: 16px;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.login-brand p { font-size: 14px; color: var(--text-muted); }

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    padding: 32px;
}

.login-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; }

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: rgba(188,188,188,0.5);
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap input {
    padding-left: 40px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 16px;
}

/* ── Notices / alerts ── */
.notice, .notice-warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
}

.notice-warn {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid rgba(245,158,11,0.2);
}

.notice-danger {
    background: rgba(229,62,62,0.10);
    color: #fc8181;
    border: 1px solid rgba(229,62,62,0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
}

.validation { color: #fc8181; font-size: 13px; margin-bottom: 12px; }

/* Alert colours, one per meaning, so a result stands out from the page: green worked, red failed or needs
   fixing, amber is a warning, cyan is information. A plain .notice is information. */
.notice {
    background: rgba(0,217,255,0.08);
    color: var(--accent);
    border: 1px solid rgba(0,217,255,0.25);
    border-left-width: 4px;
}

.notice-success {
    background: rgba(52,211,153,0.12);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.35);
    border-left-width: 4px;
}

.notice-error,
.notice-danger,
.validation-summary-errors {
    background: rgba(229,62,62,0.14);
    color: #fc8181;
    border: 1px solid rgba(229,62,62,0.40);
    border-left-width: 4px;
}

.notice-warn {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid rgba(245,158,11,0.45);
    border-left-width: 4px;
}

/* The summary ASP.NET renders for form errors: shown as a red alert only when there is something to say. */
.validation-summary-errors {
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
}

.validation-summary-errors ul,
.notice ul {
    margin: 0;
    padding-left: 18px;
}

.validation-summary-valid { display: none; }
.field-validation-error { color: #fc8181; font-size: 12px; }

/* A checkbox or radio next to its text. The global input rule makes every input full width with padding,
   which pushed the box away from its label. */
input[type="checkbox"],
input[type="radio"] {
    display: inline-block;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--accent);
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

/* ── Activity log rows ── */
.log-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.log-row:last-child { border-bottom: none; }

.log-dot {
    width: 24px; height: 24px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 12px;
}

.log-row .action { font-size: 13px; font-weight: 500; color: var(--text); }
.log-row .target  { font-size: 12px; color: var(--text-muted); }
.log-row .time    { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.log-row .meta    { flex: 1; min-width: 0; }

/* ── Pager ── */
.pager {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Misc ── */
h1 { font-size: 24px; font-weight: 600; margin-bottom: 20px; }
h2 { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
h3 { font-size: 15px; font-weight: 600; }

.empty { color: var(--text-muted); text-align: center; padding: 32px 0; font-size: 14px; }
.note  { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px; }

.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: #fc8181; }
.text-success { color: var(--success); }
.text-warn    { color: #fbbf24; }
.text-purple  { color: #c084fc; }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }

/* ── Session-expired notice on login page ── */
.notice-session-expired {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    background: rgba(0,217,255,0.08);
    color: var(--accent);
    border: 1px solid rgba(0,217,255,0.20);
}

/* ── Version badge ── */
.app-version-badge {
    position: fixed;
    right: 10px;
    bottom: 8px;
    z-index: 10;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.25);
    padding: 2px 8px;
    border-radius: 10px;
    pointer-events: none;
    user-select: none;
}

/* ── Idle timeout overlay ── */
.idle-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.idle-overlay[hidden] { display: none; }

.idle-dialog {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.idle-icon {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

.idle-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.idle-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.idle-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── OTP verification page ── */
.otp-header {
    text-align: center;
    margin-bottom: 28px;
}

.otp-icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

.otp-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.otp-subtext {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.otp-resent-notice {
    display: block;
    color: var(--success);
    font-weight: 500;
    margin-bottom: 4px;
}

/* 6-digit code input — large, centred, thumb-friendly */
.otp-code-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.otp-code-input {
    width: 100%;
    max-width: 220px;
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.06);
    border: 2px solid var(--border-input);
    color: var(--text);
    caret-color: var(--accent);
    outline: none;
    transition: border-color 0.15s;
}

.otp-code-input:focus {
    border-color: var(--accent);
    background: rgba(0,217,255,0.04);
}

.otp-code-input::placeholder {
    color: rgba(255,255,255,0.15);
    letter-spacing: 8px;
}

.otp-code-hint {
    font-size: 12px;
    color: var(--text-dim);
}

.otp-submit-btn {
    width: 100%;
    margin-top: 4px;
}

/* Resend row */
.otp-resend-row {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}

.otp-resend-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--accent);
    font-size: 13px;
    font-family: inherit;
    text-decoration: none;
}

.otp-resend-btn:hover { text-decoration: underline; }

.otp-resend-cooldown {
    color: var(--text-muted);
}

/* Throttled state */
.otp-throttled {
    text-align: center;
    padding: 24px 0 8px;
}

.otp-throttled-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 12px;
}

.otp-throttled p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: repeat(2, 1fr); }
    .search-box input { width: 160px; }
}

@media (max-width: 560px) {
    .metric-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .inline-form { grid-template-columns: 1fr; }
    .shell { padding: 16px; }
}

/* ── Ban page ── */

.ban-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.ban-card {
    background: var(--surface);
    border: 1px solid rgba(197, 48, 48, 0.35);
    border-radius: 12px;
    padding: 28px 32px;
    margin-top: 20px;
}

.ban-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.ban-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(197, 48, 48, 0.18);
    color: #fc8181;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ban-title {
    font-size: 20px;
    font-weight: 600;
    color: #fc8181;
    margin: 0 0 4px;
}

.ban-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.ban-irreversible-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(197, 48, 48, 0.12);
    border: 1px solid rgba(197, 48, 48, 0.4);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    color: #fc8181;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ban-reason-field { margin-bottom: 20px; }

.ban-confirm-check {
    background: rgba(197, 48, 48, 0.07);
    border: 1px solid rgba(197, 48, 48, 0.25);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 4px;
}

.ban-confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ban-checkbox {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #c53030;
    cursor: pointer;
}

.btn-ban {
    background: #742a2a;
    color: #fff;
    border-color: transparent;
}

.btn-ban:hover:not(:disabled) { background: #63171b; }

.btn-ban:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ban-submit-btn { min-width: 200px; }

/* ── Suspend / Reinstate pages ── */

.suspend-page,
.reinstate-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.suspend-card,
.reinstate-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    margin-top: 20px;
}

/* ── Card headers ── */

.suspend-card-header,
.reinstate-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.suspend-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(245, 101, 101, 0.12);
    color: #f56565;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reinstate-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(72, 187, 120, 0.12);
    color: #48bb78;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suspend-title,
.reinstate-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.suspend-subtitle,
.reinstate-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ── Error banner ── */

.suspend-action-error {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.35);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #fc8181;
    margin-bottom: 20px;
}

/* ── Consequence box ── */

.suspend-consequence-box {
    background: rgba(245, 101, 101, 0.06);
    border: 1px solid rgba(245, 101, 101, 0.22);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.suspend-consequence-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fc8181;
    margin: 0 0 10px;
}

.suspend-effects-list {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.suspend-effects-list li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 4px;
}

.suspend-effects-list li:last-child { margin-bottom: 0; }

/* ── Affected parties details ── */

.suspend-affected-details {
    margin-top: 12px;
    font-size: 13px;
}

.suspend-affected-details > summary {
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 0;
    user-select: none;
}

.suspend-affected-details > summary:hover { color: var(--text-secondary); }

.suspend-affected-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    border-top: 1px solid var(--border);
}

.suspend-affected-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.suspend-affected-name { color: var(--text-secondary); }

.suspend-affected-count {
    color: var(--text-muted);
    font-size: 12px;
}

/* ── Reason field ── */

.suspend-reason-field { margin-bottom: 20px; }

.suspend-label-required {
    color: #f56565;
    margin-left: 3px;
}

.suspend-textarea {
    min-height: 100px;
    resize: vertical;
}

.suspend-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 4px;
    gap: 8px;
}

.suspend-char-count {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    text-align: right;
}

/* ── Actions ── */

.suspend-actions,
.reinstate-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Danger button */
.btn-danger {
    background: #c53030;
    color: #fff;
    border-color: transparent;
}

.btn-danger:hover:not(:disabled) {
    background: #9b2c2c;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.suspend-submit-btn { min-width: 160px; }
.reinstate-submit-btn { min-width: 160px; }

/* ── Reinstate info ── */

.reinstate-info {
    background: rgba(72, 187, 120, 0.06);
    border: 1px solid rgba(72, 187, 120, 0.22);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.reinstate-info .suspend-consequence-title { color: #48bb78; }

/* ── Blocked (banned) state ── */

.reinstate-blocked {
    background: rgba(113, 128, 150, 0.12);
    border: 1px solid rgba(113, 128, 150, 0.3);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── CSS vars missing from legacy selectors ── */
:root {
    --surface-card:   rgba(37,42,49,0.85);
    --surface-raised: rgba(255,255,255,0.04);
}

/* ── Sidebar logout button ── */
.sidebar-logout-btn {
    margin-left: auto;
    opacity: 0.55;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.sidebar-logout-btn:hover { opacity: 1; text-decoration: none; }

/* ── Topbar user info ── */
.topbar-bell {
    position: relative;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.topbar-bell:hover { background: rgba(255,255,255,0.10); color: var(--text); }

.topbar-bell-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: var(--radius-full);
    min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.topbar-user-info strong { font-size: 13px; font-weight: 500; color: var(--text); }
.topbar-user-info span   { font-size: 11px; color: var(--text-muted); }

/* ── User Management page ── */
.um-wrap { }

.um-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.um-search-form { flex-shrink: 0; }

.um-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px 8px 12px;
    width: 300px;
}

.um-search-icon { display: flex; align-items: center; color: var(--text-dim); flex-shrink: 0; }

.um-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text);
    min-width: 0;
    font-family: 'Poppins', sans-serif;
}
.um-search-input::placeholder { color: rgba(255,255,255,0.3); }

.um-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.um-filter-group {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px;
}

.um-filter-btn {
    background: none;
    border: none;
    border-radius: var(--radius-full);
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}
.um-filter-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.um-filter-btn.active { background: var(--teal-grad); color: #1b1f24; }

.um-table-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.um-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.um-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
}

.um-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

.um-table tr:last-child td { border-bottom: none; }
.um-row { transition: background 0.1s; }
.um-row:hover td { background: rgba(255,255,255,0.025); }

.um-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.um-avatar {
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    flex-shrink: 0;
    color: #1b1f24;
}
.um-avatar.avatar-venue  { background: linear-gradient(135deg, #63b3ed, #4299e1); }
.um-avatar.avatar-artist { background: linear-gradient(135deg, #a075f0, #7c3aed); }

.um-user-name {
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}
.um-user-name:hover { color: var(--accent); text-decoration: none; }

.um-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-muted);
}
.um-location-none { color: var(--text-dim); }

.um-cell-date { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.um-cell-action { text-align: right; }

.um-count {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 10px;
    text-align: right;
}

.um-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

/* Status badge additions */
.badge-status-warned { background: rgba(251,191,36,0.15); color: #fbbf24; }

/* ── Dashboard layout ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
}

.dashboard-attention,
.dashboard-activity { }

.metric-top {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 12px;
}

/* Attention list */
.attention-list { display: flex; flex-direction: column; }

.attention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.attention-item:last-child { border-bottom: none; }

.attention-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.attention-item-dispute .attention-icon { background: rgba(229,62,62,0.15); color: #fc8181; }
.attention-item-flag    .attention-icon { background: rgba(245,158,11,0.15); color: #fbbf24; }

.attention-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.attention-title { font-size: 14px; font-weight: 500; color: var(--text); }
.attention-sub   { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.attention-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.attention-time   { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.attention-review { font-size: 12px; }

.panel-badge-warn {
    margin-left: 4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    min-width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 5px;
}

/* Recent activity in dashboard */
.recent-activity-list { display: flex; flex-direction: column; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.activity-item:last-child { border-bottom: none; }

.activity-avatar {
    width: 28px; height: 28px;
    border-radius: var(--radius-full);
    background: var(--teal-grad);
    color: #1b1f24;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}

.activity-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.activity-action  { font-size: 13px; font-weight: 500; }
.activity-target  { font-size: 12px; color: var(--text-muted); }
.activity-date    { font-size: 11px; color: var(--text-dim); white-space: nowrap; }

.action-suspend  { color: #ed8936; }
.action-ban      { color: #fc8181; }
.action-warn     { color: #fbbf24; }
.action-reinstate{ color: #48bb78; }
.action-dispute  { color: #63b3ed; }
.action-credit   { color: var(--accent); }
.action-default  { color: var(--text-muted); }

/* ── Activity Log page ── */
.al-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.al-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}
.al-search-icon { display: flex; align-items: center; color: var(--text-dim); flex-shrink: 0; }
.al-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
}
.al-search-input::placeholder { color: rgba(255,255,255,0.3); }

.al-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.al-audit-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--success);
    background: rgba(52,211,153,0.08);
    border: 1px solid rgba(52,211,153,0.2);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    white-space: nowrap;
}

.al-export-btn { white-space: nowrap; }

.al-table-wrap { overflow-x: auto; }

.al-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.al-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.al-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.al-table tr:last-child td { border-bottom: none; }
.al-table tr:hover td { background: rgba(255,255,255,0.025); }

.al-cell-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.al-admin {
    display: flex;
    align-items: center;
    gap: 8px;
}
.al-avatar {
    width: 26px; height: 26px;
    border-radius: var(--radius-full);
    background: var(--teal-grad);
    color: #1b1f24;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    flex-shrink: 0;
}

.al-action { font-weight: 500; }
.al-action-suspend  { color: #ed8936; }
.al-action-ban      { color: #fc8181; }
.al-action-warn     { color: #fbbf24; }
.al-action-reinstate{ color: #48bb78; }
.al-action-dispute  { color: #63b3ed; }
.al-action-credit   { color: var(--accent); }

.al-target-link { color: var(--accent); text-decoration: none; }
.al-target-link:hover { text-decoration: underline; }
.al-cell-empty { color: var(--text-dim); }

.al-cell-reason {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    font-size: 13px;
}

.al-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.al-count {
    font-size: 12px;
    color: var(--text-dim);
}

/* ── Coming soon stub pages ── */
.coming-soon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    color: var(--text-muted);
    gap: 12px;
}
.coming-soon-wrap h2 { font-size: 20px; font-weight: 600; margin: 0; }
.coming-soon-wrap p  { font-size: 14px; color: var(--text-dim); margin: 0; }

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .um-toolbar { flex-direction: column; align-items: flex-start; }
    .um-search-bar { width: 100%; }
    .al-toolbar { flex-direction: column; align-items: flex-start; }
    .al-toolbar-right { margin-left: 0; }
    .topbar-user-info { display: none; }
    .fin-main-grid { grid-template-columns: 1fr; }
    .fin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Finance page ── */
.fin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fin-stat { position: relative; }

.fin-stat-delta {
    position: absolute;
    top: 14px; right: 14px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    padding: 2px 8px;
}
.fin-delta-up   { background: rgba(52,211,153,0.15); color: #34d399; }
.fin-delta-warn { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.fin-delta-down { background: rgba(245,101,101,0.15); color: #fc8181; }
.fin-delta-flat { background: rgba(160,174,192,0.15); color: #a0aec0; }

.fin-stat .metric-icon svg,
.fin-export-icon svg,
.fin-export-btn svg,
.fin-chart-panel .panel-title svg {
    width: 18px;
    height: 18px;
}

.fin-icon-blue   { background: rgba(0,217,255,0.1); color: #00d9ff; }
.fin-icon-green  { background: rgba(52,211,153,0.12); color: #34d399; }
.fin-icon-amber  { background: rgba(245,158,11,0.12); color: #fbbf24; }
.fin-icon-purple { background: rgba(160,117,255,0.12); color: #a075f0; }

.fin-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.fin-chart-wrap {
    position: relative;
    height: 200px;
    margin-top: 8px;
}

.fin-period-label,
.fin-period-select select,
.fin-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    font-size: 13px;
    padding: 5px 28px 5px 12px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    width: auto;
    display: inline-block;
}

.fin-breakdown-list { display: flex; flex-direction: column; gap: 0; }

.fin-breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fin-breakdown-row:last-child { border-bottom: none; }

.fin-breakdown-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.fin-dot-blue   { background: #00d9ff; }
.fin-dot-purple { background: #a075f0; }
.fin-dot-amber  { background: #fbbf24; }
.fin-dot-red    { background: #fc8181; }
.fin-dot-green  { background: #34d399; }
.fin-breakdown-label { flex: 1; font-size: 13px; color: var(--text-muted); }
.fin-breakdown-value { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; }
.fin-breakdown-neg   { color: #fc8181; }
.fin-breakdown-pos   { color: #34d399; }
.fin-breakdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.fin-breakdown-total .fin-breakdown-label { font-weight: 600; color: var(--text); }

.fin-export-panel { }

.fin-export-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fin-export-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.fin-export-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(99,179,237,0.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.fin-export-title { font-size: 14px; font-weight: 500; color: var(--text); }
.fin-export-sub   { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.fin-export-btns { display: flex; gap: 8px; }
.fin-export-btn  { display: flex; align-items: center; gap: 6px; }

/* ── Settings page ── */
.settings-tabs-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    width: fit-content;
}

.settings-tab {
    padding: 7px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.settings-tab:hover { color: var(--text); text-decoration: none; }
.settings-tab.active { background: var(--teal-grad); color: #1b1f24; }

.settings-panel {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 600px;
}

.settings-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--text);
}

.settings-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.settings-avatar {
    width: 52px; height: 52px;
    border-radius: var(--radius-full);
    background: var(--teal-grad);
    color: #1b1f24;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    flex-shrink: 0;
}

.settings-profile-name { display: block; font-size: 16px; font-weight: 600; }
.settings-profile-email { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.settings-form { display: flex; flex-direction: column; gap: 0; }
.settings-save-btn { margin-top: 8px; width: fit-content; }

/* Security toggles */
.settings-toggle-list { display: flex; flex-direction: column; }

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.settings-toggle-info { display: flex; flex-direction: column; gap: 3px; }
.settings-toggle-label { font-size: 14px; font-weight: 500; color: var(--text); }
.settings-toggle-sub   { font-size: 12px; color: var(--text-muted); }

/* CSS toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    display: block;
    margin: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-thumb {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s;
}
.toggle-thumb::after {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-thumb { background: var(--teal-grad); }
.toggle-switch input:checked + .toggle-thumb::after { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-thumb { opacity: 0.6; cursor: not-allowed; }

/* Role management */
.settings-roles-sub { font-size: 13px; color: var(--text-muted); margin: -12px 0 20px; }

.settings-role-list { display: flex; flex-direction: column; gap: 12px; }

.settings-role-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
}

.settings-role-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.settings-perms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-perm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(52,211,153,0.08);
    border: 1px solid rgba(52,211,153,0.15);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Disputes & Reports ── */
.disp-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.disp-tabs-left { display: flex; gap: 6px; flex-wrap: wrap; }
.disp-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--text-muted);
    background: var(--bg-2); border: 1px solid var(--border);
    text-decoration: none; transition: all .15s;
}
.disp-tab:hover { color: var(--text); background: rgba(255,255,255,.05); }
.disp-tab.active { background: var(--teal-grad); color: #fff; border-color: transparent; }
.disp-tab-count {
    background: rgba(0,0,0,.25); color: #fff; border-radius: 20px;
    padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.disp-tab.active .disp-tab-count { background: rgba(0,0,0,.2); }

.disp-status-filters { display: flex; gap: 4px; }
.disp-sf {
    padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
    color: var(--text-muted); background: transparent; border: 1px solid var(--border);
    text-decoration: none; transition: all .15s;
}
.disp-sf:hover { color: var(--text); }
.disp-sf.active { background: rgba(255,255,255,.1); color: var(--text); border-color: rgba(255,255,255,.15); }

/* Layout with optional slide-in panel */
.disp-layout { display: flex; gap: 0; min-height: 400px; }
.disp-table-wrap { flex: 1; overflow: hidden; transition: all .25s; }
.disp-layout.panel-open .disp-table-wrap { flex: 1; }

.disp-table { width: 100%; border-collapse: collapse; }
.disp-table thead th {
    padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600;
    letter-spacing: .05em; color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.disp-table tbody tr { border-bottom: 1px solid var(--border); }
.disp-table tbody tr:last-child { border-bottom: none; }

.disp-row { cursor: pointer; transition: background .1s; }
.disp-row:hover { background: rgba(255,255,255,.04); }
.disp-row.active { background: rgba(0,209,255,.06); }
.disp-row td { padding: 12px 14px; vertical-align: middle; }

.disp-td-gig { min-width: 180px; }
.disp-gig-name { display: block; font-size: 13px; font-weight: 600; }
.disp-gig-date { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.disp-inline-badge {
    display: inline-block; margin-top: 4px;
    font-size: 10px; font-weight: 700; letter-spacing: .04em;
    padding: 2px 6px; border-radius: 4px;
    background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.3);
}

.disp-td-parties { min-width: 140px; }
.disp-venue-name  { display: block; font-size: 13px; }
.disp-artist-name { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.disp-flag-pill {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; letter-spacing: .04em;
}
.disp-flag-nosh  { background: rgba(239,68,68,.15);   color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.disp-flag-behav { background: rgba(251,191,36,.15);  color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }

.disp-fee        { font-size: 14px; font-weight: 600; white-space: nowrap; }
.disp-submitted  { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.disp-status-pill {
    display: inline-block; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.disp-status-open     { background: rgba(239,68,68,.15);   color: #f87171; }
.disp-status-review   { background: rgba(251,191,36,.15);  color: #fbbf24; }
.disp-status-resolved { background: rgba(52,211,153,.15);  color: #34d399; }

/* Slide-in panel */
.disp-panel {
    width: 0; overflow: hidden; flex-shrink: 0;
    background: var(--bg-2); border-left: 1px solid var(--border);
    transition: width .25s ease;
}
.disp-panel:not([hidden]) {
    width: 340px;
}
.disp-panel-inner {
    width: 340px; padding: 20px 18px; height: 100%; overflow-y: auto;
    display: flex; flex-direction: column; gap: 14px;
}
.disp-panel-close {
    position: absolute; top: 16px; right: 18px;
    background: rgba(255,255,255,.07); border: none; color: var(--text-muted);
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.disp-panel-close:hover { background: rgba(255,255,255,.15); color: var(--text); }
.disp-panel { position: relative; }

.disp-panel-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.disp-panel-tag-flag {
    padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
    background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.2);
}
.disp-panel-tag-status { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.disp-panel-tag-status.disp-status-open     { background: rgba(239,68,68,.15);  color: #f87171; }
.disp-panel-tag-status.disp-status-review,
.disp-panel-tag-status.disp-status-under-review { background: rgba(251,191,36,.15); color: #fbbf24; }
.disp-panel-tag-status.disp-status-resolved { background: rgba(52,211,153,.15); color: #34d399; }

.disp-panel-title { font-size: 18px; font-weight: 700; margin: 0; }
.disp-panel-date  { font-size: 12px; color: var(--text-muted); margin: 0; }

.disp-pp-row { display: flex; gap: 8px; }
.disp-pp {
    flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--border);
    border-radius: 8px; padding: 10px 12px;
    display: flex; flex-direction: column; gap: 3px;
}
.disp-pp-l { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--text-dim); text-transform: uppercase; }
.disp-pp-v { font-size: 12px; font-weight: 600; }
.disp-pp-artist { color: #60a5fa; }
.disp-pp-fee    { color: #34d399; }

.disp-conflict-alert {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px; padding: 10px 12px;
    font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
.disp-conflict-alert span:first-child { color: #f87171; flex-shrink: 0; font-size: 14px; }

.disp-report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.disp-report-col {
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px;
}
.disp-report-hdr { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; letter-spacing: .04em; }
.disp-report-body { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.disp-actions-section { margin-top: 4px; }
.disp-actions-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--text-dim); display: block; margin-bottom: 10px; }
.disp-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.disp-action-btn {
    padding: 10px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
    border: 1px solid var(--border); cursor: pointer; text-align: center;
    transition: all .15s; background: rgba(255,255,255,.06); color: var(--text);
}
.disp-action-btn:hover { filter: brightness(1.15); }
.disp-action-btn.da-neutral { background: rgba(255,255,255,.06); }
.disp-action-btn.da-teal    { background: rgba(0,209,255,.12); color: #00d9ff; border-color: rgba(0,209,255,.2); }
.disp-action-btn.da-warn    { background: rgba(251,191,36,.1); color: #fbbf24; border-color: rgba(251,191,36,.2); }
.disp-action-btn.da-return  { background: rgba(0,209,255,.08); color: #67e8f9; border-color: rgba(0,209,255,.15); }
.disp-action-btn.da-danger  { background: rgba(239,68,68,.1); color: #f87171; border-color: rgba(239,68,68,.2); }
.disp-action-btn.da-wide    { grid-column: span 2; }

.disp-resolved-note { font-size: 12px; color: var(--text-muted); margin: 0; }

.disp-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px; gap: 12px;
}
.disp-empty p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* Dispute modals */
.disp-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; backdrop-filter: blur(4px);
}
.disp-modal-overlay[hidden] { display: none; }
.disp-modal {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 14px; padding: 28px 28px 24px;
    width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.disp-modal-icon-wrap { margin-bottom: 16px; }
.dmi-neutral, .dmi-warn, .dmi-danger {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.dmi-neutral { background: rgba(255,255,255,.08); color: var(--text-muted); }
.dmi-warn    { background: rgba(251,191,36,.15); color: #fbbf24; }
.dmi-danger  { background: rgba(239,68,68,.15);  color: #f87171; }
.disp-modal-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.disp-modal-desc  { font-size: 13px; color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.disp-modal-reason-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; }
.disp-modal-textarea {
    width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--border-input);
    border-radius: 8px; color: var(--text); padding: 12px; font-size: 13px;
    resize: vertical; min-height: 90px; transition: border-color .15s;
    font-family: inherit;
}
.disp-modal-textarea:focus { outline: none; border-color: var(--accent); }
.disp-modal-btns { display: flex; gap: 10px; margin-top: 20px; }
.btn-modal-cancel {
    flex: 1; padding: 11px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,.06); border: 1px solid var(--border);
    color: var(--text); cursor: pointer;
}
.btn-modal-cancel:hover { background: rgba(255,255,255,.1); }
.disp-modal-confirm {
    flex: 1; padding: 11px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
    border: none; cursor: pointer; transition: filter .15s;
}
.disp-modal-confirm:hover { filter: brightness(1.1); }
.btn-ghost-confirm  { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--border) !important; border: none; }
.btn-teal-confirm   { background: var(--teal-grad); color: #fff; }
.btn-danger-confirm { background: linear-gradient(to right,#c0392b,#9b1e1e); color: #fff; }

/* ── Role badge in sidebar ─────────────────────────────────────────────── */
.sidebar-role-badge {
    font-size: 10px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; padding: 2px 7px; border-radius: 4px;
    display: inline-block; margin-top: 2px;
}
.sidebar-role-admin   { background: rgba(139,92,246,.25); color: #c4b5fd; }
.sidebar-role-manager { background: rgba(245,158,11,.2);  color: #fcd34d; }
.sidebar-role-support { background: rgba(59,130,246,.2);  color: #93c5fd; }

/* ── Verification Queue ───────────────────────────────────────────────── */
.verif-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.verif-tab {
    padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); background: rgba(255,255,255,.04);
    border: 1px solid var(--border); text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px; transition: all .15s;
}
.verif-tab:hover, .verif-tab.active { background: rgba(255,255,255,.1); color: var(--text); }
.verif-list { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.verif-row {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: rgba(255,255,255,.03); border: 1px solid var(--border);
    border-radius: 10px; flex-wrap: wrap;
}
.verif-avatar {
    width: 42px; height: 42px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
    flex-shrink: 0;
}
.verif-av-artist { background: rgba(0,255,153,.15); color: #00ff99; }
.verif-av-venue  { background: rgba(0,217,255,.15); color: #00d9ff; }
.verif-info { flex: 1; min-width: 180px; }
.verif-name  { font-weight: 600; font-size: 14px; }
.verif-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.verif-date  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.verif-status { flex-shrink: 0; }
.verif-actions { display: flex; gap: 8px; flex-shrink: 0; }
.verif-btn-approve {
    background: rgba(0,255,153,.15); color: #00ff99;
    border: 1px solid rgba(0,255,153,.3); font-size: 12px;
}
.verif-btn-approve:hover { background: rgba(0,255,153,.25); }
.verif-btn-reject {
    border-color: rgba(239,68,68,.4); color: #f87171;
}
.verif-btn-reject:hover { background: rgba(239,68,68,.1); }

/* ── Bookings ─────────────────────────────────────────────────────────── */
.bk-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.bk-filter {
    padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); background: rgba(255,255,255,.04);
    border: 1px solid var(--border); text-decoration: none; transition: all .15s;
}
.bk-filter:hover, .bk-filter.active { background: rgba(255,255,255,.1); color: var(--text); }
.bk-table-wrap { overflow-x: auto; }
.bk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bk-table th, .bk-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.bk-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.bk-table tr:last-child td { border-bottom: none; }
.bk-table tbody tr:hover { background: rgba(255,255,255,.03); }
.bk-row-risk { background: rgba(245,158,11,.04) !important; }
.bk-row-risk:hover { background: rgba(245,158,11,.08) !important; }
.bk-date { white-space: nowrap; color: var(--text-muted); font-size: 12px; }
.bk-gig  { font-weight: 600; }
.bk-link { color: var(--teal); text-decoration: none; }
.bk-link:hover { text-decoration: underline; }
.bk-risk-badge {
    font-size: 10px; font-weight: 700; color: #fbbf24;
    background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.3);
    border-radius: 4px; padding: 1px 6px; margin-left: 8px;
}
.bk-pill {
    display: inline-block; font-size: 11px; font-weight: 700;
    padding: 2px 9px; border-radius: 20px; letter-spacing: .03em;
}
.bk-pill-confirmed { background: rgba(0,255,153,.15); color: #00ff99; }
.bk-pill-pending   { background: rgba(245,158,11,.15); color: #fbbf24; }
.bk-pill-canceled  { background: rgba(239,68,68,.15); color: #ef4444; }
.bk-cell-empty { opacity: .5; }
.bk-actions { display: flex; gap: 6px; white-space: nowrap; }

/* ── Finance extensions ───────────────────────────────────────────────── */
.fin-chart-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); padding: 0 16px 4px; }
.fin-legend-dot   { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mb-6 { margin-bottom: 24px; }

/* ── Settings admin list ──────────────────────────────────────────────── */
.settings-admin-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.settings-admin-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px;
    background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px;
}
.settings-admin-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(139,92,246,.2); color: #c4b5fd;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.settings-admin-info { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.settings-role-select {
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 6px; padding: 6px 10px; font-size: 13px; cursor: pointer;
}
.settings-role-select:focus { outline: none; border-color: var(--teal); }

.outreach-modal {
    max-width: 520px;
    text-align: left;
}

.outreach-modal-header {
    display: block;
    width: 100%;
    margin-bottom: 18px;
}

.outreach-modal-header h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: var(--text);
}

.outreach-modal-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.outreach-form {
    display: grid;
    gap: 14px;
}

.outreach-form .field {
    margin: 0;
}

.outreach-form label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.outreach-input,
.outreach-textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.outreach-input {
    height: 40px;
    padding: 8px 12px;
}

.outreach-textarea {
    min-height: 112px;
    padding: 12px;
    resize: vertical;
}

.outreach-input:focus,
.outreach-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.outreach-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

@media (max-width: 560px) {
    .outreach-modal {
        max-width: calc(100vw - 28px);
        padding: 22px 18px;
    }

    .outreach-actions {
        flex-direction: column-reverse;
    }

    .outreach-actions .btn {
        width: 100%;
    }
}

/* ── Edit profile / booking ── */
.edit-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s, color 0.15s;
}
.edit-profile-btn:hover {
    background: var(--surface-2);
    color: var(--accent);
}

.edit-profile-modal {
    min-width: 440px;
    max-width: 520px;
}
.edit-profile-modal-header {
    padding: 22px 24px 12px;
    border-bottom: 1px solid var(--border);
}
.edit-profile-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.edit-profile-form {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.edit-profile-form .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.edit-profile-form label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}
.ep-input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 8px 12px;
    font-size: 0.875rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.ep-input:focus {
    outline: none;
    border-color: var(--accent);
}
.ep-required { color: var(--danger); }
.ep-row {
    display: flex;
    gap: 12px;
}
.ep-half { flex: 1; }
.edit-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

@media (max-width: 540px) {
    .edit-profile-modal {
        min-width: 0;
        max-width: calc(100vw - 28px);
        padding: 0;
    }
    .ep-row { flex-direction: column; gap: 14px; }
    .edit-profile-actions { flex-direction: column-reverse; }
    .edit-profile-actions .btn { width: 100%; }
}

/* ── Global Params ── */
.gp-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.gp-filter   { display:flex; gap:8px; }
.gp-readonly-note { font-size:0.78rem; color:var(--text-muted); margin-left:auto; }
.gp-table .gp-param-name { width:220px; }
.gp-table .gp-desc { max-width:280px; font-size:0.8rem; color:var(--text-muted); }
.gp-table .gp-value { max-width:200px; word-break:break-all; font-family:monospace; font-size:0.8rem; }
.gp-before-val {
    background: var(--surface-2); border:1px solid var(--border); border-radius:6px;
    padding:8px 12px; font-family:monospace; font-size:0.82rem;
    min-height:30px; word-break:break-all;
}

/* ── Webhook Payload ── */
.webhook-payload {
    background: var(--surface-2); border:1px solid var(--border); border-radius:8px;
    padding:14px 16px; overflow-x:auto; font-size:0.75rem; font-family:monospace;
    white-space:pre; max-height:400px; overflow-y:auto;
}

/* ── Blocked Words ── */
.bw-pattern { font-size:0.82rem; }
.bw-inactive-row td { opacity:0.5; }

/* ── Settings Create Admin ── */
.settings-create-admin-form { max-width:600px; display:flex; flex-direction:column; gap:12px; }

/* ── Venue Ledger ── */
.vl-top-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    align-items: start;
}
.vl-sub-body { padding: 4px 0 8px; }
.vl-sub-plan {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 20px 14px;
    border-bottom: 1px solid var(--border);
}
.vl-plan-name { font-size: 1.05rem; font-weight: 600; }
.vl-plan-code { font-size: 0.72rem; font-family: monospace; }
.vl-sub-meta  { padding: 10px 20px; display: flex; flex-direction: column; gap: 8px; }
.vl-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.83rem;
}
.vl-meta-label { color: var(--text-muted); font-size: 0.78rem; }
.vl-credit-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.vl-stat-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vl-stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.vl-stat-label { font-size: 0.75rem; color: var(--text-muted); }
.vl-ledger-table .vl-desc { max-width: 220px; }
.vl-col-num { text-align: right; white-space: nowrap; }
.vl-delta-pos { color: #34d399; font-weight: 600; }
.vl-delta-neg { color: #f87171; font-weight: 600; }
.vl-type-badge { font-size: 0.68rem; padding: 2px 7px; }
.vl-fail { max-width: 200px; font-size: 0.78rem; }
.vl-failure-code { font-family: monospace; font-size: 0.75rem; color: #f87171; }
.text-success { color: #34d399; }
@media (max-width: 760px) {
    .vl-top-grid { grid-template-columns: 1fr; }
    .vl-credit-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Notification Templates ── */
.nt-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.nt-filters {
    display: flex;
    gap: 8px;
}
.nt-select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 6px 10px;
    font-size: 0.82rem;
}
.nt-channel-pills {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.nt-channel-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.nt-channel-guide-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255,255,255,0.025);
}
.nt-channel-guide-card strong {
    display: block;
    font-size: 0.86rem;
}
.nt-channel-guide-card span:last-child {
    display: block;
    color: var(--text-muted);
    font-size: 0.74rem;
}
.nt-channel-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 800;
}
.nt-channel-email .nt-channel-icon { background: rgba(96,165,250,0.18); color: #60a5fa; }
.nt-channel-sms .nt-channel-icon { background: rgba(52,211,153,0.18); color: #34d399; }
.nt-channel-push .nt-channel-icon { background: rgba(250,204,21,0.18); color: #facc15; }
.nt-channel-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nt-channel-pill.active,
.nt-channel-pill:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.nt-section .panel-heading h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.nt-table-wrap { overflow-x: auto; }
.nt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.nt-table th {
    padding: 8px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.nt-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.nt-table tbody tr:last-child td { border-bottom: none; }
.nt-table tbody tr:hover td { background: var(--surface-2); }
.nt-col-name { width: 38%; }
.nt-col-for  { width: 90px; }
.nt-col-ch   { width: 230px; }
.nt-channel-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nt-channel-heading strong {
    display: block;
    color: var(--text);
    font-size: 0.78rem;
}
.nt-channel-heading small {
    display: block;
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.nt-name { display: flex; flex-direction: column; gap: 2px; }
.nt-display-name { font-weight: 500; }
.nt-type-key { font-size: 0.72rem; font-family: monospace; }
.nt-ch-cell { vertical-align: top; }
.nt-channel-cell {
    border-left: 3px solid transparent;
}
.nt-channel-cell.nt-channel-email { border-left-color: rgba(96,165,250,0.55); }
.nt-channel-cell.nt-channel-sms { border-left-color: rgba(52,211,153,0.55); }
.nt-channel-cell.nt-channel-push { border-left-color: rgba(250,204,21,0.55); }
.nt-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.nt-status-active   { background: rgba(52,211,153,0.15); color: #34d399; }
.nt-status-inactive { background: rgba(250,204,21,0.12); color: #facc15; }
.nt-status-none     { color: var(--text-muted); opacity: 0.4; }
.nt-template-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.nt-template-topline {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nt-country {
    font-size: 0.66rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 5px;
}
.nt-template-subject {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}
.nt-template-body {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 190px;
}
.nt-template-empty .nt-template-body { opacity: 0.65; }
.nt-edit-btn { margin-top: 8px; padding: 2px 8px; font-size: 0.75rem; }

/* Template modal */
.nt-modal { min-width: 520px; max-width: 640px; }
.nt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--border);
}
.nt-modal-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.nt-modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}
.nt-modal-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.nt-modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.nt-modal-body { padding: 20px 24px 0; display: flex; flex-direction: column; gap: 14px; }
.nt-label { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); display: block; margin-bottom: 5px; }
.nt-body-textarea { min-height: 120px; resize: vertical; }
.nt-hint { font-size: 0.72rem; color: var(--text-muted); opacity: 0.7; margin-top: 4px; display: block; }
.nt-active-row { display: flex; align-items: center; gap: 10px; }
.nt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

/* Preview */
.nt-preview-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nt-preview-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.nt-preview-subject { font-weight: 600; font-size: 0.95rem; }
.nt-preview-body { line-height: 1.55; font-size: 0.88rem; white-space: pre-wrap; }

@media (max-width: 600px) {
    .nt-modal { min-width: 0; max-width: calc(100vw - 28px); }
    .nt-toolbar { flex-direction: column; align-items: stretch; }
    .nt-channel-pills { margin-left: 0; }
    .nt-channel-guide { grid-template-columns: 1fr; }
}

/* ── Permissions matrix table ── */
.perm-table-wrap {
    overflow-x: auto;
    margin-top: 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.perm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.perm-table thead tr {
    background: var(--surface-2);
}
.perm-table th {
    padding: 10px 16px;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.perm-table th.perm-action-col {
    text-align: left;
    width: 52%;
}
.perm-table td {
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
    color: var(--text);
}
.perm-table td:first-child {
    text-align: left;
    color: var(--text-muted);
}
.perm-table tbody tr:last-child td {
    border-bottom: none;
}
.perm-table tbody tr:hover td {
    background: var(--surface-2);
}
.perm-section-row td {
    background: rgba(255,255,255,0.03);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted) !important;
    padding: 7px 16px !important;
    text-align: left !important;
}
.perm-section-row:hover td {
    background: rgba(255,255,255,0.03) !important;
}
.perm-dash {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 1rem;
}

/* ── Authenticator app: set-up, sign-in code and recovery codes ──────────────────────────────────
   These screens sit in the same .login-card as the rest of sign-in and reuse its notice, otp-header and
   otp-code-input styles. What is new is only what they alone need. */

/* A recovery code is letters and digits, not six digits, so its box is smaller and not stretched apart. */
.otp-code-input--text {
    max-width: 280px;
    font-size: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.otp-code-input--text::placeholder {
    letter-spacing: 3px;
}

.otp-code-input:disabled { opacity: 0.45; }

.auth-back {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-back:hover { color: var(--text); text-decoration: none; }

.auth-steps {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    counter-reset: auth-step;
}

.auth-steps li {
    counter-increment: auth-step;
    font-size: 13px;
    line-height: 2;
    color: var(--text-muted);
}

.auth-steps li::before {
    content: counter(auth-step) ". ";
    color: var(--accent);
    font-weight: 600;
}

/* White, whatever the theme: a QR code needs a light quiet zone to be read. */
.qr-frame {
    width: 232px;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    line-height: 0;
}

.qr-frame svg {
    display: block;
    width: 100%;
    height: auto;
}

/* The manual key, for setting up on the phone that holds the app, where there is nothing to scan the code with. */
.auth-details { margin-bottom: 20px; }

.auth-details summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.auth-details summary::-webkit-details-marker { display: none; }

.auth-details summary::before {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent currentColor;
    transition: transform 0.15s ease;
}

.auth-details[open] summary::before { transform: rotate(90deg); }
.auth-details summary:hover { color: var(--text); }

.auth-details__body {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
}

.auth-details__intro {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.auth-keys { margin: 0 0 12px; }

.auth-keys__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.auth-keys__row:first-child { border-top: none; }
.auth-keys__row dt { color: var(--text-muted); }
.auth-keys__row dd { margin: 0; text-align: right; word-break: break-all; }

.auth-keys__secret {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.auth-keys__secret code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    letter-spacing: 0.06em;
}

.auth-copy {
    padding: 3px 10px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-full);
    background: none;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-copy:hover { color: var(--text); background: var(--surface-hover); }

.auth-details__open {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-details__hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

/* The option offered to an admin who already has a CeolConnect authenticator entry. */
.auth-reuse {
    margin-bottom: 4px;
    padding: 18px;
    border: 1px solid rgba(0,217,255,0.25);
    border-radius: var(--radius-lg);
    background: rgba(0,217,255,0.04);
}

.auth-reuse h3 {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

.auth-reuse p {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}

.auth-reuse .otp-code-field { margin-bottom: 14px; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 12px;
    color: var(--text-dim);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.auth-actions .btn,
.auth-actions button { flex: 1; }

.auth-actions--stack { flex-direction: column; margin-bottom: 14px; }

.auth-alt {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}

.recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.recovery-grid__code {
    padding: 12px 8px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.06);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-align: center;
    user-select: all;
}

/* Settings: an admin's authenticator on the Security tab, and the reset on the Role Management tab. */
.settings-authenticator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.settings-authenticator__info { display: flex; flex-direction: column; gap: 2px; }
.settings-authenticator__label { font-size: 14px; font-weight: 500; }
.settings-authenticator__sub { font-size: 12px; color: var(--text-muted); }

.settings-authenticator-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.settings-authenticator-form .field { margin-bottom: 0; }
.settings-authenticator-form input[type="text"] { width: 160px; }

.settings-admin-row { flex-wrap: wrap; }

.settings-admin-extra {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.settings-admin-extra form { display: flex; align-items: center; gap: 8px; }
.settings-admin-extra input[type="text"] { width: 220px; padding: 6px 10px; font-size: 13px; }

/* A confirm button held back until its code box has all six digits (authenticator.js switches it off). */
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
