:root {
    color-scheme: light;
    --bg: #f7f7f4;
    --ink: #20201d;
    --muted: #6b6a64;
    --line: #deddd6;
    --panel: #ffffff;
    --accent: #116149;
    --accent-2: #cf5937;
    --soft: #edf4f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: var(--accent);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 14px 24px;
}

.brand {
    color: var(--ink);
    font-weight: 700;
}

.topbar nav {
    display: flex;
    gap: 16px;
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px;
}

.flash {
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.flash.success {
    background: var(--soft);
    color: #174838;
}

.flash.error {
    background: #fff1ec;
    color: #8b2e1d;
}

.toolbar,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.toolbar {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 180px 180px auto auto;
    margin-bottom: 18px;
}

.field {
    display: grid;
    gap: 6px;
}

label {
    color: var(--muted);
    font-size: 13px;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    padding: 10px 11px;
    width: 100%;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.button {
    background: var(--accent);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 13px;
    text-align: center;
}

.button.secondary {
    background: #2f3835;
}

.button.warn {
    background: var(--accent-2);
}

.review-list {
    display: grid;
    gap: 14px;
}

.review {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.review-head {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.review-title {
    font-size: 17px;
    font-weight: 700;
}

.meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.stars {
    color: #a85b00;
    font-weight: 700;
    white-space: nowrap;
}

.comment {
    line-height: 1.5;
    margin: 14px 0;
    white-space: pre-wrap;
}

.reply {
    background: var(--soft);
    border-radius: 6px;
    margin-top: 12px;
    padding: 12px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.login {
    margin: 60px auto;
    max-width: 420px;
}

.stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.stat strong {
    display: block;
    font-size: 28px;
}

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

    .review-head {
        display: grid;
    }
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e9e8e2;
    color: var(--ink);
}

.badge.auto {
    background: #d1fae5;
    color: #065f46;
}

.badge.review {
    background: #fef3c7;
    color: #92400e;
}

.badge.flag {
    background: #fee2e2;
    color: #991b1b;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    margin-right: 4px;
    margin-bottom: 4px;
}

.badge.voice {
    background: #e0e7ff;
    color: #3730a3;
    text-transform: none;
}

.draft-box {
    background: #fafaf8;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
}

.draft-box h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
}

.draft-meta {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.4;
}

