:root {
    --bg: #07111f;
    --panel: rgba(12, 26, 44, 0.82);
    --border: rgba(148, 163, 184, 0.18);
    --text: #e5edf8;
    --muted: #97a9c1;
    --primary: #58c4ff;
    --shadow: 0 20px 60px rgba(2, 8, 23, 0.45);
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(88, 196, 255, 0.18), transparent 30%),
        radial-gradient(circle at right center, rgba(251, 191, 36, 0.12), transparent 22%),
        linear-gradient(160deg, #040913 0%, #07111f 45%, #0e2034 100%);
}

body {
    padding: 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: "Courier New", monospace;
    color: #bde8ff;
}

.page-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
}

.sidebar,
.card,
.auth-card {
    border: 1px solid var(--border);
    background: var(--panel);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.sidebar {
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(180deg, rgba(21, 41, 70, 0.92), rgba(7, 17, 31, 0.95)),
        var(--panel);
}

.sidebar h1 {
    margin: 12px 0 10px;
    font-size: 2rem;
    line-height: 1.1;
}

.sidebar-copy,
.sidebar-footer span,
.hero p,
.auth-card p,
.timeline-item span,
td small,
.gallery-empty,
.media-card__meta small,
.filter-label {
    color: var(--muted);
}

.sidebar-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--primary);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    margin-top: 32px;
}

.sidebar-nav a,
.button,
.auth-form button {
    border-radius: 16px;
    padding: 14px 18px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar-nav a {
    background: rgba(88, 196, 255, 0.08);
    border: 1px solid rgba(88, 196, 255, 0.12);
}

.sidebar-nav a.is-active {
    background: linear-gradient(135deg, rgba(88, 196, 255, 0.22), rgba(156, 230, 255, 0.12));
    border-color: rgba(88, 196, 255, 0.28);
}

.sidebar-nav a:hover,
.button:hover,
.auth-form button:hover,
.media-card:hover {
    transform: translateY(-2px);
}

.sidebar-footer {
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 6px;
}

.content {
    display: grid;
    gap: 24px;
    padding: 4px 0;
}

.flash {
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid transparent;
    font-weight: 600;
}

.flash-success {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.2);
}

.flash-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.22);
}

.flash-danger {
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.18);
}

.tab-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-pill {
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--muted);
    font-weight: 700;
}

.tab-pill.is-active {
    background: linear-gradient(135deg, rgba(88, 196, 255, 0.18), rgba(156, 230, 255, 0.08));
    color: var(--text);
    border-color: rgba(88, 196, 255, 0.28);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 4px;
}

.hero.compact {
    padding-bottom: 0;
}

.hero h2,
.section-heading h3,
.auth-card h2 {
    margin: 10px 0 0;
    font-size: 2rem;
}

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

.button,
.auth-form button {
    border: 0;
    color: #04101d;
    background: linear-gradient(135deg, var(--primary) 0%, #9ce6ff 100%);
    cursor: pointer;
}

.button-secondary {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

.stat-card {
    border-radius: 24px;
    padding: 24px;
}

.stat-card span,
.stat-card small {
    color: var(--muted);
    display: block;
}

.stat-card strong {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px;
}

.detail-layout {
    align-items: start;
}

.card {
    border-radius: 28px;
    padding: 24px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 16px;
}

.map-canvas {
    min-height: 380px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(88, 196, 255, 0.12);
    background:
        linear-gradient(135deg, rgba(88, 196, 255, 0.12), rgba(15, 34, 56, 0.85)),
        #0d1d31;
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding-bottom: 14px;
}

tbody td {
    padding: 16px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    vertical-align: top;
}

td small {
    display: block;
    margin-top: 6px;
}

.table-link {
    font-weight: 700;
    color: #d7efff;
}

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 24px 12px;
}

.timeline {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.timeline-item {
    display: grid;
    gap: 6px;
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.media-card {
    display: grid;
    gap: 10px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 19, 34, 0.88);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.media-card:hover {
    border-color: rgba(88, 196, 255, 0.3);
}

.media-card img,
.media-card video {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.media-card__meta {
    display: grid;
    gap: 4px;
    padding: 0 14px 14px;
}

.media-card__meta strong {
    font-size: 0.92rem;
    line-height: 1.35;
}

.gallery-empty {
    min-height: 160px;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    border-radius: 22px;
    border: 1px dashed rgba(148, 163, 184, 0.18);
    background: rgba(8, 19, 34, 0.55);
}

.filter-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 22px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.filter-select {
    min-width: 240px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(7, 17, 31, 0.75);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(3, 8, 16, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.lightbox.hidden {
    display: none;
}

.lightbox-inner {
    max-width: min(1080px, 100%);
    max-height: 100%;
    display: grid;
    gap: 16px;
}

.lightbox img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.lightbox-video {
    width: min(1080px, 100%);
    max-height: 78vh;
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: #000;
}

.lightbox-caption {
    text-align: center;
    color: var(--text);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: #04101d;
    background: linear-gradient(135deg, var(--primary) 0%, #9ce6ff 100%);
}

.auth-card {
    max-width: 540px;
    margin: auto;
    border-radius: 32px;
    overflow: hidden;
}

.auth-card__content {
    padding: 40px;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-form label {
    display: grid;
    gap: 10px;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(7, 17, 31, 0.75);
    color: var(--text);
    padding: 16px 18px;
    font: inherit;
}

.auth-form input:focus,
.filter-select:focus {
    outline: 2px solid rgba(88, 196, 255, 0.35);
    border-color: rgba(88, 196, 255, 0.35);
}

@media (max-width: 1160px) {
    .stats-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .page-shell,
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    body {
        padding: 16px;
    }

    .hero,
    .stats-grid,
    .stats-grid--four {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hero-actions,
    .filter-row {
        width: 100%;
    }

    .button,
    .button-secondary,
    .filter-select {
        width: 100%;
        text-align: center;
    }

    .lightbox {
        padding: 16px;
    }
}
