:root {
    --bg: #f4f8f5;
    --surface: #ffffff;
    --text: #102017;
    --muted: #5b6d63;
    --accent: #0b7a45;
    --accent-2: #f4b400;
    --border: #d7e4dc;
    --danger: #b42318;
    --success: #067647;
    --shadow: 0 10px 24px rgba(16, 32, 23, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Space Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(11, 122, 69, 0.12), transparent 40%),
        radial-gradient(circle at bottom left, rgba(244, 180, 0, 0.14), transparent 45%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.page-wrap {
    width: min(1100px, 100% - 24px);
    margin: 14px auto 24px;
}

.topbar {
    background: linear-gradient(135deg, #0f5132, #0b7a45);
    color: #fff;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h1 {
    margin: 0;
    font-size: 1.15rem;
}

.brand p {
    margin: 2px 0 0 0;
    opacity: 0.9;
    font-size: 0.78rem;
}

.brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f6c43c, #d99600);
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    margin-top: 2px;
}

.nav-toggle {
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px;
}

.nav-toggle-line {
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 82vw);
    height: 100vh;
    z-index: 1200;
    margin: 0;
    background: linear-gradient(180deg, rgba(19, 46, 34, 0.97), rgba(9, 29, 20, 0.97));
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    box-shadow: -14px 0 34px rgba(0, 0, 0, 0.28);
    padding: 88px 14px 18px;
    overflow-y: auto;
    transform: translateX(104%);
    transition: transform 0.34s cubic-bezier(.2, .8, .2, 1);
}

.main-nav.is-open {
    transform: translateX(0);
}

.main-nav a {
    text-align: left;
    padding: 12px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(236, 247, 240, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(24px);
    opacity: 0;
    transition: transform 0.26s ease, opacity 0.26s ease, background-color 0.2s ease, color 0.2s ease;
}

.main-nav.is-open a {
    transform: translateX(0);
    opacity: 1;
}

.main-nav a:hover {
    background: rgba(153, 255, 203, 0.15);
    color: #fff;
}

.main-nav a.active {
    background: linear-gradient(135deg, rgba(91, 254, 174, 0.28), rgba(244, 180, 0, 0.25));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
}

.main-nav.is-open a:nth-child(1) { transition-delay: 0.03s; }
.main-nav.is-open a:nth-child(2) { transition-delay: 0.06s; }
.main-nav.is-open a:nth-child(3) { transition-delay: 0.09s; }
.main-nav.is-open a:nth-child(4) { transition-delay: 0.12s; }
.main-nav.is-open a:nth-child(5) { transition-delay: 0.15s; }
.main-nav.is-open a:nth-child(6) { transition-delay: 0.18s; }
.main-nav.is-open a:nth-child(7) { transition-delay: 0.21s; }
.main-nav.is-open a:nth-child(8) { transition-delay: 0.24s; }
.main-nav.is-open a:nth-child(9) { transition-delay: 0.27s; }
.main-nav.is-open a:nth-child(10) { transition-delay: 0.3s; }

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 12, 0.54);
    backdrop-filter: blur(2px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-open {
    overflow: hidden;
}

main {
    margin-top: 14px;
}

.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-success {
    background: #e7f8ef;
    border: 1px solid #b7e7cc;
    color: var(--success);
}

.alert-error {
    background: #fff0ee;
    border: 1px solid #ffcdc7;
    color: var(--danger);
}

.grid {
    display: grid;
    gap: 12px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
    animation: card-enter 0.4s ease both;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stat strong {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.stat span {
    font-size: 1.05rem;
    font-weight: 700;
}

.kpi-delta {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.kpi-positive {
    color: #067647;
    background: #e5faef;
}

.kpi-negative {
    color: #b42318;
    background: #ffecea;
}

.kpi-neutral {
    color: #475467;
    background: #eef2f6;
}

label {
    display: block;
    font-size: 0.84rem;
    margin-bottom: 4px;
    color: var(--muted);
}

input,
select,
button {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 10px 11px;
    font-size: 0.95rem;
    margin-bottom: 10px;
    background: #fff;
}

button {
    border: none;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #0b7a45, #0d9154);
}

button:hover {
    filter: brightness(1.05);
    cursor: pointer;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

th,
td {
    border-bottom: 1px solid #edf2ee;
    padding: 9px 6px;
    text-align: left;
    font-size: 0.86rem;
}

th {
    color: var(--muted);
    font-weight: 600;
}

.subtext {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: -4px;
    margin-bottom: 12px;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 760px) {
    .grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }

    .nav-overlay {
        display: none;
    }

    .main-nav {
        position: static;
        margin-top: 12px;
        width: auto;
        height: auto;
        z-index: auto;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
        padding: 8px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        overflow: visible;
        transform: none;
        transition: none;
    }

    .main-nav a {
        text-align: center;
        color: var(--muted);
        background: transparent;
        border: none;
        transform: none;
        opacity: 1;
        transition-delay: 0s;
    }

    .main-nav a:hover {
        background: #e8f5ee;
        color: var(--accent);
    }

    .main-nav a.active {
        background: #dff3e8;
        color: #0f5132;
        border: none;
    }
}

.dashboard-shell {
    display: grid;
    gap: 14px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #245640;
    color: #effff5;
    background:
        radial-gradient(circle at 15% 20%, rgba(94, 255, 189, 0.28), transparent 35%),
        radial-gradient(circle at 90% 10%, rgba(244, 180, 0, 0.3), transparent 34%),
        linear-gradient(130deg, #0a2d20, #103f2f 55%, #0f5132);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: auto -30% -60% 20%;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 65%);
    pointer-events: none;
}

.hero-title {
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 2rem);
    letter-spacing: 0.02em;
}

.hero-sub {
    margin: 8px 0 16px;
    color: rgba(234, 251, 243, 0.86);
    max-width: 680px;
}

.hero-badge {
    display: inline-block;
    margin-top: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(8, 23, 16, 0.44);
}

.hero-grid {
    display: grid;
    gap: 10px;
}

.metric-card {
    border: 1px solid #1f6c4b;
    background: linear-gradient(150deg, rgba(9, 39, 28, 0.76), rgba(17, 65, 47, 0.74));
    color: #eafff3;
}

.metric-label {
    display: block;
    font-size: 0.78rem;
    opacity: 0.8;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 6px;
}

.section-title {
    margin: 0 0 8px;
    font-size: 1.02rem;
}

.link-grid {
    display: grid;
    gap: 8px;
}

.action-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d9ebe0;
    background: linear-gradient(135deg, #f7fffb, #eef8f3);
    font-weight: 600;
}

.neon-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0f5132;
    background: linear-gradient(135deg, #86ffc7, #ffe08a);
}

.chart-card {
    position: relative;
    overflow: hidden;
}

.trend-chart {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 251, 247, 0.96));
    border: 1px solid #d7e4dc;
}

.list-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d7e4dc;
    box-shadow: 0 6px 14px rgba(16, 32, 23, 0.12);
    display: block;
}

.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: none;
}

.img-lightbox.is-open {
    display: block;
}

.img-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 10, 0.8);
    backdrop-filter: blur(3px);
}

.img-lightbox-figure {
    position: relative;
    margin: 28px auto;
    width: min(94vw, 920px);
    background: #0d1913;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 12px;
    animation: lightbox-up 0.22s ease both;
}

.img-lightbox-figure img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    border-radius: 10px;
    background: #09110d;
}

.img-lightbox-figure figcaption {
    color: rgba(240, 253, 244, 0.9);
    font-size: 0.9rem;
    margin-top: 10px;
}

.img-lightbox-close {
    width: auto;
    margin: 0 0 8px auto;
    display: block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
}

.not-found-card {
    max-width: 760px;
    margin: 14vh auto 0;
    border: 1px solid #245640;
    background:
        radial-gradient(circle at 85% 12%, rgba(244, 180, 0, 0.18), transparent 30%),
        linear-gradient(130deg, #ffffff, #f3fbf7);
}

@keyframes lightbox-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 760px) {
    .hero-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
