:root {
    --bg: #020617;
    --bg-alt: #020617;
    --surface: #020617;
    --border: #16a34a;
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #022c22 0, #020617 40%, #000000 100%);
    color: var(--text-main);
}

/* HEADER */

.site-header {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--primary);
    background: #000;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.site-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.site-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.site-header-right {
    display: flex;
    gap: 8px;
}

/* NAV */

.nav-link {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid transparent;
    transition: all 0.16s ease-out;
}

.nav-link:hover {
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(15, 23, 42, 0.9);
}

.nav-link-primary {
    border-color: rgba(34, 197, 94, 0.9);
    background: rgba(22, 163, 74, 0.1);
}

/* LAYOUT */

.container {
    max-width: 1100px;
    margin: 25px auto 40px;
    padding: 0 16px;
}

.container-narrow {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 16px;
}

.page-title {
    font-size: 26px;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* HERO */

.hero {
    margin-top: 26px;
    margin-bottom: 26px;
    padding: 26px 24px;
    border-radius: 24px;
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 32px rgba(34, 197, 94, 0.45);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: center;
    animation: heroFade 0.6s ease-out;
}

.hero-title {
    font-size: 30px;
    margin-bottom: 8px;
}

.hero-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tag {
    font-size: 12px;
    color: #bbf7d0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-card {
    border-radius: 18px;
    border: 1px dashed rgba(34, 197, 94, 0.5);
    padding: 14px 12px;
    font-size: 13px;
    background: rgba(2, 6, 23, 0.9);
}

/* CARDS */

.card-list-title {
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 20px;
}

.card {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.95));
    border-radius: 14px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 18px 18px 16px;
    margin-bottom: 14px;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.15);
    transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, border-color 0.16s ease-out;
    animation: fadeInUp 0.35s ease-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.35);
    border-color: rgba(34, 197, 94, 0.8);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 18px;
}

.card p {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.16s ease-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4ade80);
    color: #02120b;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.5);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.6);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    border-color: rgba(34, 197, 94, 0.5);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 1);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* FORMS */

form {
    margin-top: 10px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out, background 0.16s ease-out;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.4);
    background: rgba(15, 23, 42, 1);
}

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

/* ALERTS */

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.alert-error {
    background: rgba(127, 29, 29, 0.85);
    border: 1px solid #fca5a5;
}

.alert-success {
    background: rgba(21, 128, 61, 0.85);
    border: 1px solid #6ee7b7;
}

.alert ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

/* TABLES (admin) */

.table-wrapper {
    overflow-x: auto;
    margin-top: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    border: 1px solid rgba(15, 23, 42, 0.9);
    padding: 8px;
    vertical-align: top;
}

th {
    background: rgba(15, 23, 42, 0.95);
}

tr:nth-child(even) {
    background: rgba(2, 6, 23, 0.9);
}

tr:nth-child(odd) {
    background: rgba(2, 6, 23, 0.8);
}

textarea.readonly {
    width: 100%;
    min-height: 140px;
    resize: vertical;
}

/* FILTER LINKS */

.filters {
    margin: 10px 0 6px;
    font-size: 13px;
}

.filters a {
    margin-right: 8px;
    text-decoration: none;
    color: #bbf7d0;
}

.filters a.active {
    font-weight: 600;
    text-decoration: underline;
}

/* FOOTER */

.site-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 18px 10px 24px;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    background: rgba(0, 0, 0, 0.85);
    margin-top: 40px;
}

/* SIMPLE CONTENT LAYOUT */

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 18px;
}

@media (max-width: 800px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }
    .content-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ANIMATIONS */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
