/* Library reporting modal + moderation dashboard shared styles */

body.lr-modal-open { overflow: hidden; }

.lr-modal-root {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lr-modal-root.hidden { display: none !important; }

.lr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.lr-modal {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(90dvh, 720px);
    overflow-y: auto;
    background: var(--panel, #111827);
    color: var(--text, #f9fafb);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    padding: 22px;
}

.lr-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.lr-modal-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.lr-modal-close {
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: transparent;
    color: var(--muted, #9ca3af);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
}

.lr-modal-intro {
    margin: 0 0 14px;
    color: var(--muted, #9ca3af);
    font-size: 14px;
    line-height: 1.55;
}

.lr-book-preview {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    font-size: 14px;
}

.lr-muted { color: var(--muted, #9ca3af); }

.lr-form { display: grid; gap: 12px; }

.lr-label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted, #9ca3af);
}

.lr-reasons {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.lr-reason-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: rgba(255,255,255,0.03);
    cursor: pointer;
}

.lr-reason-option:hover { border-color: rgba(167,139,250,0.35); }

.lr-reason-option.is-critical {
    border-color: rgba(239,68,68,0.35);
    background: rgba(127,29,29,0.15);
}

.lr-reason-option input { margin-top: 4px; flex-shrink: 0; }

.lr-reason-copy { display: grid; gap: 4px; min-width: 0; }

.lr-reason-title { font-weight: 800; font-size: 14px; }

.lr-reason-desc { font-size: 13px; color: var(--muted, #9ca3af); line-height: 1.45; }

.lr-textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: rgba(255,255,255,0.03);
    color: inherit;
    padding: 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.55;
}

.lr-error {
    margin: 0;
    color: #fecaca;
    font-size: 14px;
    line-height: 1.5;
}

.lr-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.lr-btn {
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    background: var(--panel, #111827);
    color: var(--text, #f9fafb);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

.lr-btn.primary {
    background: linear-gradient(135deg, #5b21b6, #6d28d9);
    color: #fff;
    border-color: transparent;
}

.lr-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lr-success {
    display: grid;
    gap: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.lr-success.hidden { display: none !important; }

/* Report trigger button (reader / library) */
.btn-report {
    border: 1px solid rgba(239,68,68,0.25);
    background: rgba(127,29,29,0.12);
    color: #fecaca;
}

.btn-report:hover {
    background: rgba(127,29,29,0.22);
    border-color: rgba(239,68,68,0.4);
}

/* Moderation dashboard — matches Alysum library chrome */
.mod-page,
.mod-page *,
.mod-page *::before,
.mod-page *::after {
    box-sizing: border-box;
}

.mod-page {
    --mod-purple: #6d28d9;
    --mod-purple-dark: #5b21b6;
    --mod-bg: #0b1220;
    --mod-panel: #111827;
    --mod-panel-soft: #172132;
    --mod-muted: #9ca3af;
    --mod-border: rgba(255,255,255,0.08);
    --mod-gold: #fbbf24;
    --mod-text: #f9fafb;
    margin: 0;
    min-height: 100vh;
    color-scheme: dark;
    background:
        radial-gradient(ellipse 120% 60% at 50% -10%, rgba(124, 58, 237, 0.22) 0%, transparent 55%),
        linear-gradient(180deg, #0d1426 0%, var(--mod-bg) 42%);
    color: var(--mod-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mod-page button,
.mod-page input,
.mod-page textarea,
.mod-page select {
    font: inherit;
}

.mod-page code {
    font-size: 0.92em;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--mod-border);
    word-break: break-all;
}

.mod-topbar {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(11,18,32,0.92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 40;
}

.mod-topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.mod-brand {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #fff;
    text-decoration: none;
}

.mod-brand span { color: #c4b5fd; }

.mod-shell { max-width: 1320px; margin: 0 auto; padding: 22px 20px 56px; }

.mod-header { margin-bottom: 22px; }

.mod-header h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 900;
    line-height: 1.1;
}

.mod-header p {
    margin: 10px 0 0;
    color: var(--mod-muted);
    font-size: 15px;
    line-height: 1.55;
    max-width: 52rem;
}

.mod-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.mod-stat {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--mod-panel);
    border: 1px solid var(--mod-border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.mod-stat-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mod-muted);
}

.mod-stat-value { margin-top: 8px; font-size: 22px; font-weight: 900; }

.mod-stat.is-critical .mod-stat-value { color: #f87171; }

.mod-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
    align-items: start;
}

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

.mod-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--mod-panel);
    border: 1px solid var(--mod-border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}

.mod-panel h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 900;
    color: var(--mod-gold);
    letter-spacing: 0.02em;
}

.mod-queue { display: grid; gap: 10px; max-height: 520px; overflow-y: auto; padding-right: 4px; }

.mod-split-list .mod-queue {
    flex: 1;
    min-height: 0;
    max-height: none;
}

.mod-split-list .mod-user-list {
    flex: 1;
    min-height: 0;
    max-height: none;
}

.mod-split-list .mod-search-row {
    margin-bottom: 0;
}

.mod-queue-item {
    border: 1px solid var(--mod-border);
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
    background: var(--mod-panel-soft);
    transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.mod-queue-item:hover {
    transform: translateY(-1px);
    border-color: rgba(167,139,250,0.35);
}

.mod-queue-item.is-selected {
    border-color: rgba(167,139,250,0.5);
    background: rgba(124,58,237,0.14);
    box-shadow: inset 0 0 0 1px rgba(167,139,250,0.2);
}

.mod-queue-item.is-critical { border-left: 4px solid #ef4444; }

.mod-queue-title { font-weight: 900; font-size: 15px; line-height: 1.3; }

.mod-queue-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--mod-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mod-badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.06);
}

.mod-badge.critical { background: rgba(239,68,68,0.22); color: #fecaca; }
.mod-badge.high { background: rgba(251,191,36,0.18); color: #fde68a; }

.mod-detail-empty { color: var(--mod-muted); font-size: 14px; line-height: 1.6; }

.mod-detail-block {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mod-border);
}

.mod-detail-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.mod-detail-block h3 {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mod-muted);
    font-weight: 900;
}

.mod-detail-block p,
.mod-detail-block pre {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.mod-form { display: grid; gap: 10px; margin-top: 10px; }

.mod-input,
.mod-textarea,
.mod-select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--mod-border);
    background: rgba(0,0,0,0.22);
    color: inherit;
    padding: 11px 13px;
    font: inherit;
    font-size: 14px;
}

.mod-input:focus,
.mod-textarea:focus {
    outline: none;
    border-color: rgba(167,139,250,0.45);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}

.mod-textarea { min-height: 88px; resize: vertical; }

.mod-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--mod-border);
    background: rgba(255,255,255,0.04);
    color: inherit;
    border-radius: 12px;
    padding: 10px 15px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.mod-btn:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

.mod-btn.primary,
.mod-btn.is-active {
    background: linear-gradient(135deg, var(--mod-purple-dark), var(--mod-purple));
    border-color: transparent;
    color: #fff;
}

.mod-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.mod-btn:disabled:hover {
    background: rgba(255,255,255,0.04);
    transform: none;
}
.mod-btn.success { background: rgba(6,78,59,0.28); border-color: rgba(52,211,153,0.35); color: #a7f3d0; }

.mod-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.mod-view-header .mod-toolbar {
    margin-bottom: 0;
}

.mod-status {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--mod-border);
    font-size: 14px;
    line-height: 1.5;
}

.mod-status.error { border-color: rgba(239,68,68,0.35); color: #fecaca; background: rgba(127,29,29,0.2); }
.mod-status.ok { border-color: rgba(52,211,153,0.35); color: #a7f3d0; background: rgba(6,78,59,0.2); }

.mod-denied {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 12px;
}

.mod-denied-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--mod-panel);
    border: 1px solid var(--mod-border);
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.mod-denied-card h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 900;
    color: #fff;
}

.mod-denied-card > p {
    margin: 0 0 14px;
    color: var(--mod-muted);
    font-size: 14px;
    line-height: 1.6;
}

.mod-setup-steps {
    margin: 18px 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.mod-setup-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--mod-border);
    background: rgba(0,0,0,0.18);
    font-size: 14px;
    line-height: 1.5;
}

.mod-setup-steps li.is-done {
    border-color: rgba(52,211,153,0.35);
    background: rgba(6,78,59,0.12);
}

.mod-setup-steps li.is-done::before {
    content: "✓";
    color: #6ee7b7;
}

.mod-setup-steps li::before {
    content: "○";
    flex-shrink: 0;
    font-weight: 900;
    color: var(--mod-muted);
}

.mod-denied-code {
    text-align: left;
    margin: 14px 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--mod-border);
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.mod-denied-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.mod-denied-meta {
    margin-top: 14px;
    font-size: 12px;
    color: var(--mod-muted);
    word-break: break-all;
}

.mod-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--mod-border);
    background: rgba(0,0,0,0.2);
    width: fit-content;
    max-width: 100%;
}

.mod-nav a.mod-btn {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    padding: 9px 14px;
}

.mod-nav a.mod-btn:not(.is-active):hover {
    background: rgba(255,255,255,0.06);
}

.mod-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}

.mod-search-row .mod-input {
    flex: 1;
    min-width: min(100%, 280px);
    max-width: 480px;
}

.mod-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--mod-border);
    background: rgba(0,0,0,0.12);
}

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

.mod-table th,
.mod-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--mod-border);
    vertical-align: top;
}

.mod-table th {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mod-muted);
    background: rgba(255,255,255,0.02);
}

.mod-table tr:last-child td { border-bottom: 0; }

.mod-table tbody tr:hover td { background: rgba(124,58,237,0.06); }

.mod-table a {
    color: #ddd6fe;
    text-decoration: none;
    font-weight: 800;
}

.mod-table a:hover { color: #fff; text-decoration: underline; }

.mod-user-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mod-user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--mod-border);
    background: rgba(255,255,255,0.04);
}

.mod-user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: var(--mod-muted);
}

.mod-user-title { margin: 0; font-size: 26px; font-weight: 900; }

.mod-user-sub {
    margin: 6px 0 0;
    color: var(--mod-muted);
    font-size: 14px;
    line-height: 1.5;
}

.mod-flag {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    margin-right: 6px;
    margin-top: 4px;
}

.mod-flag.warn { background: rgba(251,191,36,0.15); color: #fde68a; }
.mod-flag.danger { background: rgba(239,68,68,0.2); color: #fecaca; }
.mod-flag.ok { background: rgba(52,211,153,0.15); color: #a7f3d0; }
.mod-flag.muted { background: rgba(255,255,255,0.06); color: var(--mod-muted); }

.mod-sections { display: grid; gap: 18px; }

.mod-json {
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 280px;
    overflow: auto;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--mod-border);
}

.mod-pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--mod-muted);
}

.mod-panel-spaced { margin-top: 18px; }

.mod-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.mod-panel-head h2 { margin: 0; }

.mod-panel-intro { margin: 0 0 14px; }

.mod-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.mod-filter-row .mod-btn.is-active,
.mod-subnav .mod-btn.is-active {
    background: rgba(124,58,237,0.2);
    border-color: rgba(167,139,250,0.42);
    color: #ede9fe;
}

.mod-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mod-online-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(52,211,153,0.35);
    background: rgba(6,78,59,0.18);
    color: #d1fae5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.mod-online-chip:hover {
    background: rgba(6,78,59,0.28);
    color: #fff;
}

.mod-presence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.mod-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #6b7280;
}

.mod-presence.is-online { color: #6ee7b7; }
.mod-presence.is-online .mod-presence-dot {
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52,211,153,0.25);
}

.mod-presence.is-recent { color: #fde68a; }
.mod-presence.is-recent .mod-presence-dot { background: #fbbf24; }

.mod-presence.is-offline { color: var(--mod-muted); }

.mod-stat.is-online-stat .mod-stat-value { color: #6ee7b7; }

.mod-nav button.mod-btn {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    padding: 9px 14px;
    font-family: inherit;
}

.mod-nav button.mod-btn:not(.is-active):hover {
    background: rgba(255,255,255,0.06);
}

/* ---- Moderation console layout ---- */

.mod-console-page .mod-shell-console {
    max-width: none;
    padding: 0;
    min-height: calc(100vh - 56px);
}

.mod-console {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: calc(100vh - 56px);
}

.mod-sidebar {
    border-right: 1px solid var(--mod-border);
    background: rgba(0,0,0,0.28);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mod-sidebar-title {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mod-muted);
    padding: 0 8px;
}

.mod-sidebar-nav {
    display: grid;
    gap: 6px;
}

.mod-sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.mod-sidebar-btn:hover { background: rgba(255,255,255,0.06); }

.mod-sidebar-btn.is-active {
    background: linear-gradient(135deg, rgba(91,33,182,0.5), rgba(109,40,217,0.35));
    border-color: rgba(167,139,250,0.35);
}

.mod-sidebar-badge {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.mod-sidebar-btn.is-active .mod-sidebar-badge {
    background: rgba(255,255,255,0.2);
}

.mod-sidebar-foot {
    margin-top: auto;
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--mod-border);
}

.mod-sidebar-stat {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--mod-muted);
    padding: 0 8px;
}

.mod-sidebar-stat strong { color: #e5e7eb; }

.mod-main {
    padding: 22px 24px 40px;
    overflow: auto;
}

.mod-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.mod-view-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
}

.mod-view-header p {
    margin: 6px 0 0;
    color: var(--mod-muted);
    font-size: 14px;
}

.mod-split {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    min-height: 520px;
}

.mod-split.is-single-pane {
    grid-template-columns: 1fr;
}

.mod-split.is-single-pane .mod-split-detail {
    display: none;
}

.mod-split-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    background: var(--mod-panel);
    border: 1px solid var(--mod-border);
    border-radius: 18px;
    padding: 16px;
    min-height: 520px;
}

.mod-split-detail {
    background: var(--mod-panel);
    border: 1px solid var(--mod-border);
    border-radius: 18px;
    padding: 18px;
    min-height: 520px;
    overflow: auto;
}

.mod-split-detail-user {
    min-height: 520px;
    overflow: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.mod-split-detail-user .mod-user-detail {
    min-height: 100%;
}

.mod-load-error {
    padding: 32px 20px;
    text-align: center;
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 18px;
    background: rgba(127,29,29,0.15);
}

.mod-load-error h2 { margin: 0 0 8px; }

.mod-split-detail-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 900;
}

.mod-user-list {
    display: grid;
    gap: 8px;
    max-height: min(68vh, 720px);
    overflow-y: auto;
    padding-right: 4px;
}

.mod-user-row {
    width: 100%;
    text-align: left;
    border: 1px solid var(--mod-border);
    border-radius: 14px;
    background: rgba(0,0,0,0.18);
    padding: 12px 14px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.mod-user-row:hover { border-color: rgba(167,139,250,0.35); }

.mod-user-row.is-selected {
    border-color: rgba(167,139,250,0.55);
    background: rgba(124,58,237,0.14);
}

.mod-user-row.has-pending {
    border-left: 3px solid #fbbf24;
}

.mod-user-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mod-user-row-name {
    font-weight: 900;
    font-size: 14px;
}

.mod-user-row-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--mod-muted);
    line-height: 1.45;
}

.mod-user-row-pending {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #fde68a;
}

.mod-online-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--mod-border);
    background: rgba(6,78,59,0.1);
    align-items: center;
}

.mod-online-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.mod-online-strip-label {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6ee7b7;
    margin-right: 4px;
    flex-shrink: 0;
}

.mod-standing-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--mod-border);
    margin-bottom: 16px;
}

.mod-standing-card.is-ok {
    background: linear-gradient(135deg, rgba(6,78,59,0.22), rgba(6,78,59,0.08));
    border-color: rgba(52,211,153,0.35);
}

.mod-standing-card.is-warn {
    background: linear-gradient(135deg, rgba(120,53,15,0.28), rgba(120,53,15,0.1));
    border-color: rgba(251,191,36,0.35);
}

.mod-standing-card.is-danger {
    background: linear-gradient(135deg, rgba(127,29,29,0.32), rgba(127,29,29,0.12));
    border-color: rgba(239,68,68,0.4);
}

.mod-standing-label {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mod-muted);
}

.mod-standing-title {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 900;
}

.mod-standing-summary {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--mod-muted);
    line-height: 1.5;
    max-width: 52ch;
}

.mod-standing-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
}

.mod-stats-compact .mod-stat-value { font-size: 20px; }

.mod-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0;
}

.mod-user-detail .mod-panel {
    margin-bottom: 0;
}

.mod-user-detail .mod-user-header {
    margin-bottom: 0;
}

.mod-user-header-copy { min-width: 0; }

.mod-pending-list { display: grid; gap: 10px; }

.mod-pending-item {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--mod-border);
    background: rgba(0,0,0,0.16);
}

.mod-pending-type {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #93c5fd;
}

.mod-pending-type.warn { color: #fde68a; }

.mod-pending-body { font-size: 14px; line-height: 1.5; }

.mod-pick-user-hint {
    padding: 48px 24px;
    text-align: center;
    border: 1px dashed var(--mod-border);
    border-radius: 18px;
    background: rgba(0,0,0,0.12);
}

.mod-pick-user-hint h2 { margin: 0 0 8px; }

.mod-table tr.is-pending-row td {
    background: rgba(251,191,36,0.06);
}

.mod-presence-dot.is-online { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,0.25); }
.mod-presence-dot.is-recent { background: #fbbf24; }

@media (max-width: 960px) {
    .mod-console {
        grid-template-columns: 1fr;
    }

    .mod-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid var(--mod-border);
    }

    .mod-sidebar-foot {
        margin-top: 0;
        border-top: 0;
        flex: 1;
        justify-content: flex-end;
        display: flex;
        gap: 16px;
    }

    .mod-split {
        grid-template-columns: 1fr;
    }

    .mod-user-list {
        max-height: 320px;
    }
}

.mod-people-usage {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

@media (min-width: 1100px) {
    .mod-people-usage {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
        align-items: start;
    }

    .mod-split-people {
        grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    }
}

.mod-joins-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--mod-panel);
    border: 1px solid var(--mod-border);
    border-radius: 16px;
    padding: 16px 18px 14px;
}

.mod-joins-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.mod-joins-head p {
    margin: 4px 0 0;
    color: var(--mod-muted);
    font-size: 13px;
}

.mod-joins-bars {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
    margin-top: 16px;
}

.mod-joins-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    gap: 4px;
    height: 148px;
}

.mod-joins-bar-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 96px;
}

.mod-joins-bar {
    width: 100%;
    max-width: 28px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #a78bfa, #6d28d9);
    min-height: 3px;
    transition: height 0.15s ease;
}

.mod-joins-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--mod-muted);
    line-height: 1;
}

.mod-joins-day {
    font-size: 9px;
    color: var(--mod-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.mod-recent-joins {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mod-border);
}

.mod-recent-join {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--mod-border);
    background: rgba(255,255,255,0.03);
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.mod-recent-join:hover {
    border-color: rgba(125, 211, 252, 0.45);
    background: rgba(59, 130, 246, 0.12);
}

.mod-recent-join-name {
    font-size: 13px;
    font-weight: 700;
}

.mod-recent-join-meta {
    font-size: 11px;
    color: var(--mod-muted);
}

@media (max-width: 720px) {
    .mod-joins-bars {
        gap: 3px;
        height: 96px;
    }

    .mod-joins-day,
    .mod-joins-count {
        font-size: 8px;
    }
}

.hidden { display: none !important; }
