:root {
    color-scheme: dark;
    --bg: #12131a;
    --panel: #1b1d29;
    --text: #e8e8f0;
    --muted: #9a9ab0;
    --accent: #9b6bff;
    --error: #ff6b6b;
}

* { box-sizing: border-box; }

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

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #2a2c3a;
}

.brand { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 1.25rem; }

nav a, nav button {
    color: var(--text);
    margin-left: 1rem;
    text-decoration: none;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

.inline-form { display: inline; }

main { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem; }

.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); }
.hero-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; }

.button, button, input[type="submit"] {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
}

.button-secondary { background: var(--panel); color: var(--text); }

.section { margin-top: 3rem; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.25rem;
}
.section-header h2 { margin: 0; }
.section-header a { color: var(--accent); text-decoration: none; }

.news-list { display: grid; gap: 1rem; }
.news-card { background: var(--panel); padding: 1.25rem 1.5rem; border-radius: 12px; }
.news-card h2, .news-card h3 { margin: 0 0 0.25rem; }
.news-card h2 a, .news-card h3 a { color: var(--text); text-decoration: none; }
.news-date { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem; }
.news-excerpt { margin: 0; }

.news-article .news-body { white-space: pre-line; line-height: 1.6; }

.auth-box { background: var(--panel); padding: 2rem; border-radius: 12px; }

input[type="text"] {
    background: var(--bg);
    border: 1px solid #2a2c3a;
    color: var(--text);
    padding: 0.6rem;
    border-radius: 8px;
    margin-right: 0.5rem;
}

.code {
    font-size: 2.5rem;
    letter-spacing: 0.3rem;
    font-weight: 700;
    color: var(--accent);
}

.error { color: var(--error); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--panel);
    padding: 1.25rem;
    border-radius: 12px;
}

.product-card .price { color: var(--accent); font-weight: 700; }

.admin-nav { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.admin-nav a {
    color: var(--text);
    background: var(--panel);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
}

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid #2a2c3a; }
th { color: var(--muted); font-weight: 600; }

.status-paid { color: #4ade80; }
.status-pending { color: #facc15; }
.status-failed, .status-cancelled { color: var(--error); }

form.stacked label { display: block; margin: 0.75rem 0 0.25rem; color: var(--muted); }
form.stacked input[type="text"],
form.stacked input[type="number"],
form.stacked textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid #2a2c3a;
    color: var(--text);
    padding: 0.6rem;
    border-radius: 8px;
}
form.stacked textarea { min-height: 150px; }

.flash-status { background: #1c3a2a; color: #4ade80; padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
