:root {
    color-scheme: dark;
    --bg: #090909;
    --surface: #151515;
    --surface-raised: #1c1c1c;
    --text: #f2efeb;
    --muted: #aaa29c;
    --line: #38332f;
    --accent: #b28f76;
    --success: #87aa88;
    --danger: #d4867f;
    --warning: #d1aa70;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--bg);
}

button,
select,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.admin-header {
    min-height: 72px;
    padding: 12px max(20px, calc((100vw - 1180px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    background: #0c0c0c;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.admin-brand img {
    width: 40px;
    height: 40px;
}

.admin-session {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 58px 0 80px;
}

.access-state {
    padding: 28px;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    color: var(--muted);
}

.access-state.error {
    border-color: var(--danger);
}

.access-state a {
    color: var(--accent);
}

.admin-title-row,
.moderation-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.button {
    min-height: 42px;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
}

.button-secondary {
    background: transparent;
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #090909;
}

.stats-grid {
    margin: 42px 0 68px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-block: 1px solid var(--line);
}

.stats-grid > div {
    min-height: 120px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-grid > div + div {
    border-left: 1px solid var(--line);
}

.stats-grid span {
    color: var(--muted);
    font-size: 0.78rem;
}

.stats-grid strong {
    color: var(--accent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.4rem;
}

.moderation-toolbar {
    margin-bottom: 24px;
}

.moderation-toolbar label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

select,
input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
}

select {
    min-width: 180px;
    margin-left: 10px;
    padding: 8px 12px;
}

.admin-status {
    min-height: 24px;
    color: var(--muted);
}

.admin-status.error {
    color: var(--danger);
}

.admin-status.success {
    color: var(--success);
}

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

.moderation-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
}

.moderation-card[data-status="reportado"],
.moderation-card[data-status="pendiente"] {
    border-left: 3px solid var(--warning);
}

.moderation-card-header,
.moderation-card-meta,
.moderation-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.moderation-card-header strong {
    color: var(--text);
}

.moderation-card-meta {
    margin-top: 5px;
    justify-content: flex-start;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.75rem;
}

.moderation-comment {
    margin: 22px 0;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    line-height: 1.5;
}

.moderation-reason {
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.moderation-actions {
    align-items: end;
    flex-wrap: wrap;
}

.moderation-actions label {
    color: var(--muted);
    font-size: 0.75rem;
}

.moderation-actions select {
    min-width: 150px;
    margin: 5px 0 0;
    display: block;
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-button {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-raised);
    color: var(--text);
    font-weight: 700;
}

.action-button.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.empty-state {
    padding: 42px;
    border: 1px dashed var(--line);
    color: var(--muted);
    text-align: center;
}

[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .admin-header,
    .admin-title-row,
    .moderation-toolbar,
    .moderation-card-header,
    .moderation-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-session {
        align-items: flex-end;
        flex-direction: column;
    }

    .admin-main {
        width: min(100% - 28px, 1180px);
        padding-top: 36px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid > div + div {
        border-left: 0;
    }

    .stats-grid > div:nth-child(even) {
        border-left: 1px solid var(--line);
    }

    .stats-grid > div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .moderation-toolbar label,
    .moderation-toolbar select {
        width: 100%;
    }

    .moderation-toolbar select {
        margin: 7px 0 0;
    }
}
