* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #172033;
}

a {
    color: #1f4ed8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrap {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: #111827;
    color: #fff;
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand a {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 18px;
}

.nav a {
    color: #dbe4ff;
    text-decoration: none;
    font-weight: 600;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

h1 {
    margin-top: 0;
    font-size: 30px;
}

h2 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-row-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select,
button {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccd5e1;
    border-radius: 10px;
    font-size: 15px;
}

button {
    background: #111827;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

button:hover {
    opacity: .95;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

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

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

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.restaurant-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

.muted {
    color: #6b7280;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #eef2ff;
    color: #3730a3;
}

@media (max-width: 800px) {
    .form-grid,
    .restaurant-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

table th {
    font-size: 14px;
    color: #374151;
    background: #f9fafb;
}

table td,
table th {
    vertical-align: middle;
}

input[type="checkbox"] {
    transform: scale(1.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}

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

.data-table th,
.data-table td {
    padding: 12px 10px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.data-table thead th {
    background: #f9fafb;
    font-size: 13px;
    color: #374151;
}

.badge-submitted {
    background: #fff7ed;
    color: #9a3412;
}

.badge-accepted {
    background: #ecfeff;
    color: #155e75;
}

.badge-redeemed {
    background: #ecfdf5;
    color: #166534;
}

.badge-cancelled {
    background: #fef2f2;
    color: #991b1b;
}

code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

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