:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e4e7eb;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --danger: #dc2626;
    --warn: #b45309;
    --success: #16a34a;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
}

body.centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.sidebar {
    width: 220px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { font-weight: 700; font-size: 18px; padding: 6px 10px 18px; }

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

.sidebar nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
}

.sidebar nav a:hover { background: var(--bg); text-decoration: none; }
.sidebar nav a.active { background: #eef2ff; color: var(--primary); font-weight: 600; }

.nav-badge {
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

.sidebar .logout { margin-top: auto; padding: 10px; }

.content { flex: 1; padding: 28px 36px; max-width: 1400px; min-width: 0; }

.page-header { display: flex; align-items: center; justify-content: space-between; }
.page-header h1 { margin: 0 0 20px; font-size: 22px; }

.section-title { font-size: 15px; margin: 26px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

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

.card-title { margin: 0 0 12px; font-size: 17px; }
.card.empty { color: var(--muted); text-align: center; padding: 28px; }

.login-card { width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { margin: 0 0 6px; font-size: 20px; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
label.inline { flex-direction: row; align-items: center; font-weight: 400; gap: 8px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    max-width: 100%;
}

textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--primary); }

.btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn.disabled { opacity: .5; pointer-events: none; }
.sidebar .logout .btn-ghost { width: 100%; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-success { background: #f0fdf4; color: #166534; }

.muted { color: var(--muted); font-size: 13px; }
.muted-inline { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { color: var(--muted); margin-top: 4px; font-size: 13px; }
.stat-warn .stat-value { color: var(--warn); }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: #fafbfc; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
td form { display: inline; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-active { background: #f0fdf4; color: #166534; }
.badge-suspended { background: #fffbeb; color: #92400e; }
.badge-banned { background: #fef2f2; color: #991b1b; }
.badge-guest { background: #eef2ff; color: #4338ca; }
.badge-report-open { background: #fffbeb; color: #92400e; }
.badge-report-actioned { background: #f0fdf4; color: #166534; }
.badge-report-dismissed { background: #f3f4f6; color: #4b5563; }
.badge-report-reviewed { background: #eef2ff; color: #4338ca; }

.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 16px; padding: 14px 20px; }
.filters label { font-size: 12px; color: var(--muted); }

.details { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; }

.quote { border-left: 3px solid var(--border); padding-left: 12px; margin: 16px 0 0; color: var(--text); }

.action-form { display: flex; flex-direction: column; gap: 14px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.transcript { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.transcript-line { padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.transcript-line.highlight { background: #fffbeb; border: 1px solid #fcd34d; }
.transcript-meta { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }

.review-image { max-width: 100%; max-height: 420px; border-radius: 8px; margin-top: 12px; display: block; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.media-card { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.media-preview { background: var(--bg); border-radius: 8px; min-height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-preview img, .media-preview video { max-width: 100%; max-height: 200px; display: block; }
.media-preview audio { width: 100%; padding: 0 8px; }
.media-gone { color: var(--muted); font-size: 13px; }
.media-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.settings-section { padding: 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-label label { font-weight: 600; }
.setting-control input[type="number"] { width: 120px; }
.setting-control input[type="checkbox"] { width: 20px; height: 20px; }

.form-footer { margin: 24px 0; }

.pagination { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
