:root {
    --bg: #0c1024;
    --panel: rgba(255, 255, 255, 0.06);
    --panel-strong: rgba(255, 255, 255, 0.12);
    --text: #e6e9f2;
    --muted: #9aa6c3;
    --accent: #1dd3b0;
    --accent-2: #ff8a3d;
    --border: rgba(255, 255, 255, 0.15);
    --radius: 18px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(29, 211, 176, 0.1), transparent 35%),
                radial-gradient(circle at 80% 10%, rgba(255, 138, 61, 0.12), transparent 30%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.04), transparent 40%),
                var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.background-gradient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(29, 211, 176, 0.1), rgba(255, 138, 61, 0.08));
    filter: blur(80px);
    z-index: 0;
}

.background-dots {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.4;
    z-index: 0;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: rgba(12, 16, 36, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo a {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    font-size: 1.1rem;
}

.top-nav nav a {
    margin-left: 18px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.top-nav nav a:hover {
    color: var(--text);
}

.page {
    position: relative;
    z-index: 1;
    padding: 28px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 32px;
    margin-bottom: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero.compact {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.hero-copy h1 {
    margin: 10px 0 12px;
    font-size: 2.2rem;
}

.hero-copy .lede {
    color: var(--muted);
    max-width: 520px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-size: 0.8rem;
    margin: 0 0 6px;
}

.lede {
    margin: 0 0 18px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    min-width: 200px;
}

.inline-form button {
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #0c1024;
    font-weight: 600;
    cursor: pointer;
}

.inline-form.subtle button {
    background: var(--panel-strong);
    color: var(--text);
    border: 1px solid var(--border);
}

.hero-card {
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel-strong);
}

.metric {
    display: grid;
    grid-template-columns: auto;
    gap: 4px;
    margin-bottom: 12px;
}

.metric .label {
    color: var(--muted);
    font-size: 0.9rem;
}

.metric .value {
    font-size: 2rem;
    font-weight: 700;
}

.metric .caption {
    color: var(--muted);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

.pill.muted {
    color: var(--muted);
}

.pill.tiny {
    font-size: 0.75rem;
    padding: 4px 8px;
}

.small-note {
    color: var(--muted);
    margin-top: 10px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 12px;
}

.ghost-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.card-grid.three-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb.small {
    aspect-ratio: 1.6 / 1;
}

.thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb.tiny {
    width: 46px;
    height: 46px;
}

.card-thumb img,
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-link {
    color: var(--text);
    text-decoration: none;
}

.card-link:hover {
    color: var(--accent);
}

.thumb-fallback,
.card-thumb .thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: linear-gradient(135deg, rgba(29, 211, 176, 0.15), rgba(255, 138, 61, 0.12));
}

.thumb-fallback.tiny {
    font-size: 0.75rem;
}

.thumb-fallback.small {
    font-size: 0.9rem;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.card h3 {
    margin: 8px 0;
}

.card .muted {
    margin: 0;
}

.card-actions {
    margin-top: auto;
    padding-top: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #0c1024;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.button.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.alert {
    padding: 12px 14px;
    background: rgba(255, 138, 61, 0.12);
    border: 1px solid rgba(255, 138, 61, 0.4);
    color: #ffd6b8;
    border-radius: 12px;
    margin-bottom: 14px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    align-items: center;
}

.filter-form input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.filter-form select {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.filter-form button {
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #0c1024;
    font-weight: 700;
    cursor: pointer;
}

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

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    color: var(--muted);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
}

.stacked {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.color-chip {
    display: inline-block;
    width: 22px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: var(--chip, #ccc);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.info-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 10px;
}

.image-frame {
    margin-top: 6px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.image-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.footer {
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    padding: 18px 24px 28px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

@media (max-width: 720px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .hero {
        padding: 20px;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

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