* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 34px;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
}

.login-card h2 {
    margin: 0 0 8px;
    color: #111827;
}

.login-card p {
    color: #6b7280;
}

.form-control {
    width: 100%;
    padding: 13px 14px;
    margin: 9px 0;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

.btn {
    display: inline-block;
    padding: 11px 18px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-muted {
    background: #475569;
}

.error-text {
    color: #dc2626;
    font-weight: 700;
}

.topbar {
    background: #0f172a;
    color: white;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h2 {
    margin: 0;
    font-size: 20px;
}

.topbar nav a {
    color: #dbeafe;
    margin-left: 18px;
    font-weight: 700;
}

.container {
    max-width: 1250px;
    margin: 28px auto;
    padding: 0 18px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
    margin-bottom: 22px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
    border-left: 5px solid #2563eb;
}

.stat-card.danger {
    border-left-color: #dc2626;
}

.stat-card.success {
    border-left-color: #16a34a;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 34px;
    font-weight: 800;
    color: #0f172a;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #f8fafc;
    color: #475569;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    padding: 13px;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 13px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 14px;
}

tr:hover {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

.detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 10px;
}

.detail-key {
    font-weight: 800;
    color: #475569;
}

.detail-value {
    word-break: break-word;
}

.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .topbar {
        display: block;
    }

    .topbar nav {
        margin-top: 12px;
    }

    .topbar nav a {
        display: inline-block;
        margin: 6px 12px 0 0;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}