:root {
    --spm-ink: #1f2937;
    --spm-muted: #64748b;
    --spm-line: #d8dee7;
    --spm-bg: #f5f7fb;
    --spm-panel: #ffffff;
    --spm-navy: #18324a;
    --spm-teal: #087f8c;
    --spm-green: #2f855a;
    --spm-red: #b42318;
    --spm-amber: #b7791f;
}

body {
    color: var(--spm-ink);
    background: var(--spm-bg);
    letter-spacing: 0;
}

.spm-topbar {
    background: var(--spm-navy);
}

.spm-admin .container-fluid {
    max-width: 1480px;
}

.spm-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(24, 50, 74, .92), rgba(8, 127, 140, .85)),
        url("https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.auth-shell {
    width: min(430px, calc(100vw - 32px));
}

.auth-panel,
.content-panel,
.filter-panel {
    background: var(--spm-panel);
    border: 1px solid var(--spm-line);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.auth-panel {
    padding: 28px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
}

.stat-box {
    background: var(--spm-panel);
    border: 1px solid var(--spm-line);
    border-left: 4px solid var(--spm-teal);
    border-radius: 8px;
    padding: 16px;
    min-height: 104px;
}

.stat-box .label {
    color: var(--spm-muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-box .value {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
}

.table {
    vertical-align: middle;
}

.table thead th {
    color: #475569;
    font-size: .78rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    font-size: .92rem;
}

.mono {
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: .85rem;
}

.form-label {
    font-weight: 600;
    color: #334155;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-panel > form.row > [class*="col-"]:not(.filter-actions) {
    flex: 1 1 140px;
    width: auto;
    min-width: 0;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-actions .btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 6px 12px;
    font-size: .875rem;
    white-space: nowrap;
}

.btn-icon {
    min-width: 34px;
}

.badge {
    border-radius: 6px;
}

.pagination {
    margin-bottom: 0;
}

@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 760px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .stat-box .value {
        font-size: 1.6rem;
    }
}

@media (max-width: 520px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}
