:root {
    --navy: #0f2439;
    --gold: #d4a72c;
    --bg: #f6f4ef;
    --card: #ffffff;
    --text: #1c1c1c;
    --muted: #6b6b6b;
    --danger-bg: #fff3e0;
}

* { box-sizing: border-box; }

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

.topbar {
    background: var(--navy);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topbar .brand {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
}

.topbar nav a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.95rem;
}

.topbar nav a:hover { color: var(--gold); }

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.hero h1 { margin-bottom: 0.5rem; }
.hero p { color: var(--muted); max-width: 480px; margin: 0 auto 1.5rem; }

.button {
    display: inline-block;
    background: var(--navy);
    color: white;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin: 0.3rem;
}

.button.secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.how-it-works {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.how-it-works ol,
.how-it-works ul { padding-left: 1.2rem; }
.how-it-works li { margin-bottom: 0.4rem; }

.how-it-works h3 {
    margin: 1rem 0 0.3rem;
    font-size: 1rem;
    color: var(--navy);
}
.how-it-works h3:first-of-type { margin-top: 0.2rem; }
.how-it-works p { color: var(--text); margin: 0 0 0.5rem; }

.card-form {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 420px;
}

.card-form label { font-weight: 600; font-size: 0.9rem; }
.card-form input {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.card-form button {
    margin-top: 0.6rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    padding: 0.7rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.flash {
    background: #eaf3ea;
    border-left: 4px solid #4a9d5c;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.flash p { margin: 0.2rem 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.92rem;
}

th { background: var(--navy); color: white; }

tr.review { background: var(--danger-bg); }

details.period-year {
    background: var(--card);
    border-radius: 10px;
    padding: 0.8rem 1rem 0.2rem;
    margin-bottom: 1rem;
}

details.period-year > summary {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--navy);
    cursor: pointer;
    margin-bottom: 0.6rem;
}

details.period-month {
    margin: 0 0 0.8rem 1rem;
}

details.period-month > summary {
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 0.4rem;
}

details.period-year table,
details.period-month table {
    margin-bottom: 0.8rem;
}

.review-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.review-raw {
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 260px;
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.8rem;
    background: var(--bg);
    padding: 0.4rem;
    border-radius: 6px;
    margin: 0;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 160px;
}

.review-form label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.review-form input {
    width: 100px;
    padding: 0.3rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.review-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.review-actions button {
    flex: 1;
    padding: 0.4rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.review-actions button[value="approve"] {
    background: var(--gold);
    color: var(--navy);
}

.review-actions button.reject-btn {
    background: var(--danger-bg);
    color: #a33;
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    padding: 1rem;
}
