:root {
    /* Material 3 color scheme — dark admin theme */
    --md-sys-color-primary: #a8c7fa;
    --md-sys-color-on-primary: #062e6f;
    --md-sys-color-primary-container: #17458a;
    --md-sys-color-on-primary-container: #d3e3fd;
    --md-sys-color-surface: #131316;
    --md-sys-color-surface-container: #1e1f25;
    --md-sys-color-surface-container-low: #1a1b21;
    --md-sys-color-surface-container-high: #282a31;
    --md-sys-color-on-surface: #e3e2e6;
    --md-sys-color-on-surface-variant: #c4c6d0;
    --md-sys-color-outline: #8e9099;
    --md-sys-color-outline-variant: #44464f;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-secondary: #bec6dc;
    --md-sys-color-tertiary: #d6bee4;

    --md-ref-typeface-plain: 'Roboto', sans-serif;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    min-height: 100vh;
}

/* ── App Shell ── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Navigation Rail ── */
.nav-rail {
    width: 260px;
    background: var(--md-sys-color-surface-container);
    border-right: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    flex-shrink: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 24px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    margin-bottom: 16px;
}

.nav-brand-icon {
    font-size: 28px;
    color: var(--md-sys-color-primary);
}

.nav-brand-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 28px;
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--md-sys-color-surface-container-high);
}

.nav-item.active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.nav-item .material-symbols-outlined {
    font-size: 24px;
}

.nav-spacer {
    flex: 1;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--md-sys-color-surface-container);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 400;
    color: var(--md-sys-color-primary);
}

/* ── Data Table ── */
.data-table-container {
    background: var(--md-sys-color-surface-container);
    border-radius: 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-low);
}

.data-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.data-table tbody tr:hover {
    background: var(--md-sys-color-surface-container-high);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Chips / Badges ── */
.trust-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.trust-badge.trusted {
    background: #1b4332;
    color: #95d5b2;
}

.trust-badge.approved {
    background: #1a3a2a;
    color: #74c69d;
}

.trust-badge.pending {
    background: #3d3200;
    color: #ffd60a;
}

.trust-badge.rejected {
    background: #451a03;
    color: #fb923c;
}

.trust-badge.banned {
    background: #450a0a;
    color: #fca5a5;
}

.trust-badge.unverified {
    background: #27272a;
    color: #a1a1aa;
}

.report-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.report-badge.pending {
    background: #3d3200;
    color: #ffd60a;
}

.report-badge.reviewed {
    background: #1b4332;
    color: #95d5b2;
}

.report-badge.dismissed {
    background: #27272a;
    color: #a1a1aa;
}

/* ── Table Toolbar ── */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.table-toolbar-title {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.pagination-info {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin-right: 16px;
}

/* ── Dialog ── */
.dialog-content {
    padding: 16px 0;
}

.dialog-field {
    margin-bottom: 16px;
}

/* ── Login Page ── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--md-sys-color-surface);
}

.login-card {
    background: var(--md-sys-color-surface-container);
    border-radius: 28px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.login-title {
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    margin-bottom: 32px;
}

.login-field {
    margin-bottom: 16px;
}

.login-field md-outlined-text-field,
.login-field md-filled-text-field {
    width: 100%;
}

.login-actions {
    margin-top: 24px;
}

.login-actions md-filled-button {
    width: 100%;
}

.login-error {
    color: var(--md-sys-color-error);
    font-size: 13px;
    text-align: center;
    margin-bottom: 16px;
}

/* ── Empty State ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--md-sys-color-on-surface-variant);
}

.empty-state .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
}

/* ── Utilities ── */
.flex-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.truncate {
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }

/* ── Skip Link ── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: 12px 16px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    z-index: 1000;
    text-decoration: none;
    font-weight: 500;
    border-bottom-right-radius: 8px;
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 0;
}
