/* =========================================================
   RICE PEST DETECTION — DESIGN SYSTEM (AGRICULTURAL AI)
   ========================================================= */

:root {
    --bg: #f5f7f4;
    --bg-elevated: #ffffff;
    --bg-muted: #edf2ec;
    --bg-glass: rgba(255, 255, 255, 0.86);
    --text: #132217;
    --text-muted: #526658;
    --border: #dbe4da;
    --border-strong: #c2d1c0;

    --primary: #15803d;
    --primary-hover: #166534;
    --primary-soft: rgba(21, 128, 61, 0.11);
    --accent: #d97706;
    --accent-soft: rgba(217, 119, 6, 0.12);
    --info: #0284c7;
    --info-soft: rgba(2, 132, 199, 0.12);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.12);

    --shadow-sm: 0 1px 3px rgba(19, 34, 23, 0.06);
    --shadow-md: 0 8px 24px rgba(19, 34, 23, 0.08);
    --shadow-lg: 0 18px 42px rgba(19, 34, 23, 0.12);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
    --bg: #0b130e;
    --bg-elevated: #121d16;
    --bg-muted: #19281f;
    --bg-glass: rgba(18, 29, 22, 0.86);
    --text: #edf5ef;
    --text-muted: #98aea0;
    --border: #23372b;
    --border-strong: #324f3d;

    --primary: #22c55e;
    --primary-hover: #16a34a;
    --primary-soft: rgba(34, 197, 94, 0.14);
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.14);
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 12% 8%, var(--primary-soft) 0%, transparent 32%),
        radial-gradient(circle at 88% 18%, var(--accent-soft) 0%, transparent 28%);
}

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

img {
    max-width: 100%;
    display: block;
}

button,
input,
select {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex: 1;
    padding: 32px 0 64px;
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 70px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #059669);
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.18s ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-muted);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: grid;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 14px 20px 18px;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-cta-desktop {
        display: none;
    }
}

/* =========================================================
   BUTTONS & BADGES
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-lg {
    padding: 13px 26px;
    font-size: 0.98rem;
    border-radius: 12px;
}

.btn-sm {
    padding: 7px 13px;
    font-size: 0.82rem;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.24);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-muted);
    color: var(--text);
}

.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.35);
}

.btn-danger-outline:hover:not(:disabled) {
    background: var(--danger-soft);
    border-color: var(--danger);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}

.pill-green {
    background: var(--primary-soft);
    color: var(--primary);
}

.pill-amber {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill-blue {
    background: var(--info-soft);
    color: var(--info);
}

.pill-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

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

/* =========================================================
   CARDS & LAYOUT HELPERS
   ========================================================= */

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.card-subtitle {
    margin: 4px 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.page-header {
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.page-title {
    margin: 6px 0 4px;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.page-desc {
    margin: 0;
    color: var(--text-muted);
    max-width: 680px;
}

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

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

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

@media (max-width: 960px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .grid-2,
    .grid-3,
    .grid-5 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HOME / HERO SECTION
   ========================================================= */

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
    padding: 28px 0 40px;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 12px;
    }
}

.hero-title {
    margin: 14px 0 16px;
    font-size: clamp(2rem, 4.2vw, 3.05rem);
    line-height: 1.13;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-title span {
    color: var(--primary);
}

.hero-desc {
    font-size: 1.04rem;
    color: var(--text-muted);
    margin: 0 0 26px;
    max-width: 560px;
}

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

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.hero-metric-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
}

.hero-metric-lbl {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.hero-visual-tag {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
}

.section-block {
    margin-top: 52px;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 6px 0 6px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-heading p {
    margin: 0;
    color: var(--text-muted);
}

.pest-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.pest-chip {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.pest-chip strong {
    display: block;
    font-size: 0.92rem;
    color: var(--primary);
    margin-bottom: 3px;
}

.pest-chip span {
    font-size: 0.81rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.4;
}

/* =========================================================
   MODEL SELECTION CARDS (DETEKSI PAGE)
   ========================================================= */

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

@media (max-width: 820px) {
    .model-grid {
        grid-template-columns: 1fr;
    }
}

.model-card {
    position: relative;
    text-align: left;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-card:hover:not(:disabled) {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.model-card.active {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-soft), var(--bg-elevated) 65%);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.model-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.model-name {
    font-size: 1.12rem;
    font-weight: 800;
}

.model-selected-badge {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
}

.model-card.active .model-selected-badge {
    display: inline-flex;
}

.model-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.model-desc {
    margin: 2px 0 0;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* =========================================================
   DRAG & DROP UPLOAD ZONE
   ========================================================= */

.dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    padding: 36px 24px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: scale(1.005);
}

.dropzone-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--primary);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}

.dropzone h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
}

.dropzone p {
    margin: 0 0 16px;
    font-size: 0.87rem;
    color: var(--text-muted);
}

.preview-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    overflow: hidden;
}

.preview-img-wrap {
    max-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(var(--bg-muted) 0% 25%, var(--bg-elevated) 0% 50%) 50% / 20px 20px;
    padding: 12px;
}

.preview-img-wrap img {
    max-height: 350px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: var(--shadow-md);
}

.preview-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-name {
    font-weight: 700;
    font-size: 0.92rem;
    word-break: break-all;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* =========================================================
   ADVANCED SETTINGS
   ========================================================= */

.advanced-panel {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-muted);
}

.setting-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 680px) {
    .setting-grid {
        grid-template-columns: 1fr;
    }
}

.setting-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.setting-value {
    font-family: var(--font-mono);
    color: var(--primary);
    background: var(--primary-soft);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

select.form-select {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

/* =========================================================
   RESULT VIEWER, STATS & TABLE
   ========================================================= */

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.viewer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.viewer-btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.viewer-stage {
    position: relative;
    overflow: auto;
    max-height: 560px;
    min-height: 300px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0d1510;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.viewer-stage img {
    transition: transform 0.16s ease;
    transform-origin: center center;
    max-height: 520px;
    border-radius: 6px;
}

.zoom-indicator {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-muted);
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

table.data-table th {
    background: var(--bg-muted);
    font-size: 0.79rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 700;
}

table.data-table tr:last-child td {
    border-bottom: none;
}

.conf-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.conf-bar {
    flex: 1;
    max-width: 120px;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-muted);
    overflow: hidden;
}

.conf-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #10b981);
}

/* =========================================================
   COMPARISON PAGE
   ========================================================= */

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

@media (max-width: 780px) {
    .compare-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.compare-check-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all 0.16s ease;
}

.compare-check-card.checked {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.compare-check-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.metric-bar-row {
    margin-bottom: 12px;
}

.metric-bar-row:last-child {
    margin-bottom: 0;
}

.metric-bar-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-bar-track {
    height: 10px;
    border-radius: 999px;
    background: var(--bg-muted);
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
    transition: width 0.4s ease;
}

.metric-bar-fill.amber {
    background: var(--accent);
}

.metric-bar-fill.blue {
    background: var(--info);
}

.cmp-img-frame {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0d1510;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.cmp-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================================================
   LOADING OVERLAY, TOAST & MODAL
   ========================================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(11, 19, 14, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-overlay.active {
    display: flex;
}

.loading-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.spinner-ring {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 4px solid var(--primary-soft);
    border-top-color: var(--primary);
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 600;
    animation: slideIn 0.2s ease;
}

.toast.error {
    border-color: var(--danger);
    color: var(--danger);
}

.toast.success {
    border-color: var(--primary);
    color: var(--primary);
}

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

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(11, 19, 14, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 780px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 22px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hidden {
    display: none !important;
}
