:root {
    --bg: #14161a;
    --card-bg: #1e2126;
    --border: #2c3038;
    --text: #e8e8ea;
    --text-muted: #9aa0aa;
    --red: #e3383f;
    --red-dark: #b52128;
    --green: #3fb872;
    color-scheme: dark;
}

* { box-sizing: border-box; }

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

.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    border-bottom: 1px solid var(--border);
    background: #0f1113;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}
.logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: var(--text);
}
.logo span { color: var(--red); }
.logo .dot { color: var(--text-muted); font-weight: 400; font-size: 0.9rem; }
.site-header nav a {
    margin-left: 18px;
    color: var(--text-muted);
    font-weight: 500;
}
.site-header nav a:hover { color: var(--text); }

main.wrap { padding: 24px 16px 60px; }

.hero { text-align: center; padding: 24px 0 8px; }
.hero h1 { font-size: 1.9rem; margin-bottom: 8px; }
.hero h1 span { color: var(--red); }
.hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 24px;
}
.card h2 { margin-top: 0; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.field-hint { color: var(--text-muted); font-size: 0.82rem; margin: 6px 0 0; }
input[type=text], input[type=email], input[type=password], textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #14161a;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
textarea { resize: vertical; }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

.btn {
    display: inline-block;
    background: var(--red);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}
.btn:hover { background: var(--red-dark); text-decoration: none; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-muted { background: #4a4f58; }
.btn-muted:hover { background: #3a3e46; }
.btn-danger { background: #7a1f24; }
.btn-danger:hover { background: #5c171b; }

.fine-print { color: var(--text-muted); font-size: 0.8rem; margin-top: 12px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-error { background: rgba(227, 56, 63, 0.12); border: 1px solid var(--red); color: #ff9a9d; }
.flash-success { background: rgba(63, 184, 114, 0.12); border: 1px solid var(--green); color: #8fe0b3; }
.flash-info { background: rgba(154, 160, 170, 0.12); border: 1px solid var(--border); color: var(--text-muted); }

.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li a {
    display: inline-flex; align-items: center; gap: 6px;
    background: #14161a; border: 1px solid var(--border); border-radius: 999px;
    padding: 6px 12px; color: var(--text); font-size: 0.88rem;
}
.tag-list .count { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 0.75rem; }

.list-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.search-form { display: flex; gap: 8px; }
.search-form input { width: auto; }

.complaint-preview { border-top: 1px solid var(--border); padding: 16px 0; }
.complaint-preview:first-of-type { border-top: none; }
.complaint-preview h3 { margin: 0 0 4px; }
.complaint-meta { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 8px; }
.company-link { color: var(--text); font-weight: 600; }
.read-more { font-size: 0.88rem; font-weight: 600; }

.empty { color: var(--text-muted); }

.pagination { display: flex; justify-content: space-between; margin-top: 12px; }

.breadcrumb { color: var(--text-muted); font-size: 0.85rem; }
.complaint-full h1 { margin-bottom: 4px; }
.complaint-body { margin-top: 16px; white-space: pre-wrap; }
.report-link { margin-top: 24px; font-size: 0.85rem; color: var(--text-muted); }
.count-line { color: var(--text-muted); }

.terms h2 { margin-top: 28px; }

.mod-item { border-top: 1px solid var(--border); padding: 16px 0; }
.mod-item:first-of-type { border-top: none; }
.mod-body { white-space: pre-wrap; background: #14161a; border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.admin-actions-row { display: flex; gap: 8px; margin-top: 10px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table tr { border-top: 1px solid var(--border); }
.admin-table td { padding: 12px 6px; vertical-align: top; }
.admin-table .excerpt { color: var(--text-muted); font-size: 0.85rem; margin: 4px 0; }
.admin-table time { color: var(--text-muted); font-size: 0.8rem; }
.admin-table .badge { font-size: 0.7rem; text-transform: uppercase; background: var(--border); padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.admin-actions { text-align: right; white-space: nowrap; }
.admin-actions form { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.admin-actions button, .admin-actions a { background: none; border: 1px solid var(--border); color: var(--text); padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 0.82rem; }
.admin-actions button:hover, .admin-actions a:hover { border-color: var(--red); text-decoration: none; }

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 20px 0 40px;
}

@media (max-width: 600px) {
    .site-header .wrap { flex-direction: column; gap: 8px; }
    .admin-actions { text-align: left; }
    .admin-actions form { justify-content: flex-start; }
}
