:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --border: #d8dee6;
    --text: #1b2430;
    --muted: #5a6778;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --danger: #b91c1c;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --ok-bg: #dcfce7;
    --ok-text: #166534;
    --review-bg: #fee2e2;
    --review-text: #991b1b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

.topbar {
    background: #0f172a;
    color: #f8fafc;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topbar nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.topbar a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 0.92rem;
}

.topbar a:hover,
.topbar a.active {
    background: #1e293b;
    color: #ffffff;
}

.container {
    max-width: 1280px;
    margin: 1.25rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.15rem;
    margin-bottom: 1.25rem;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 0.85rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    background: #fff;
}

.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.28rem 0.6rem;
    font-size: 0.82rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-verified {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.badge-needs_manual_review,
.badge-rejected {
    background: var(--review-bg);
    color: var(--review-text);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.84rem;
}

.text-right {
    text-align: right;
}