/* ============================================================
   NMRGIS — Vanilla CSS Framework
   Replaces Bootstrap 5.3.3. Keep the same class names where
   possible so templates need minimal changes.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --brand-cyan: #00b4d8;
    --brand-dark: #023e58;
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-danger: #dc3545;
    --bs-warning: #ffc107;
    --bs-info: #0dcaf0;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-body-bg: #f4f6f9;
    --bs-body-color: #212529;
    --bs-border-color: #dee2e6;
    --bs-border-radius: 0.375rem;
    --bs-font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ── Reset / base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--bs-font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    -webkit-text-size-adjust: 100%;
}

a { color: var(--bs-primary); text-decoration: underline; }
a:hover { color: #0a58ca; }

img, svg { vertical-align: middle; }
table { border-collapse: collapse; width: 100%; }
code { font-size: 0.875em; color: #d63384; }

h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; font-weight: 500; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }
p { margin-top: 0; margin-bottom: 1rem; }
ol, ul { padding-left: 2rem; margin-top: 0; margin-bottom: 1rem; }
small, .small { font-size: 0.875em; }
strong { font-weight: 700; }
label { display: inline-block; }

/* ── Layout ────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 0.75rem; }
.container-fluid { width: 100%; padding: 0 0.75rem; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}
.row > * { padding: 0 0.75rem; }

/* Columns — mobile-first (default full width) */
.col-12 { flex: 0 0 100%; max-width: 100%; }
[class*="col-md-"], [class*="col-lg-"] { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
    .col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-md-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
}

@media (min-width: 992px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
}

/* Gutters */
.g-2 { gap: 0.5rem; }
.g-3 { gap: 1rem; }
.g-4 { gap: 1.5rem; }
.row.g-2 { margin: 0 -0.25rem; }
.row.g-2 > * { padding: 0 0.25rem; margin-bottom: 0.5rem; }
.row.g-3 { margin: 0 -0.5rem; }
.row.g-3 > * { padding: 0 0.5rem; margin-bottom: 1rem; }
.row.g-4 { margin: 0 -0.75rem; }
.row.g-4 > * { padding: 0 0.75rem; margin-bottom: 1.5rem; }

/* ── Spacing utilities ─────────────────────────────────────── */
.m-3 { margin: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-auto { margin-left: auto !important; }
.me-1 { margin-right: 0.25rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

/* ── Display ───────────────────────────────────────────────── */
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-grid { display: grid !important; }
.d-none { display: none !important; }

/* ── Flex utilities ────────────────────────────────────────── */
.flex-grow-1 { flex-grow: 1 !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-middle { vertical-align: middle !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* ── Sizing ────────────────────────────────────────────────── */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

/* ── Text utilities ────────────────────────────────────────── */
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-capitalize { text-transform: capitalize !important; }
.text-decoration-none { text-decoration: none !important; }
.text-muted { color: #6c757d !important; }
.text-danger { color: var(--bs-danger) !important; }
.text-success { color: var(--bs-success) !important; }
.text-warning { color: var(--bs-warning) !important; }
.text-dark { color: var(--bs-dark) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fs-2 { font-size: 2rem !important; }

/* ── Border ────────────────────────────────────────────────── */
.border { border: 1px solid var(--bs-border-color) !important; }
.border-success { border-color: var(--bs-success) !important; }
.border-warning { border-color: var(--bs-warning) !important; }
.border-danger { border-color: var(--bs-danger) !important; }
.rounded { border-radius: var(--bs-border-radius) !important; }

/* ── Shadows ───────────────────────────────────────────────── */
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important; }

/* ── Background colors ─────────────────────────────────────── */
.bg-primary { background-color: var(--bs-primary) !important; }
.bg-secondary { background-color: var(--bs-secondary) !important; }
.bg-success { background-color: var(--bs-success) !important; }
.bg-danger { background-color: var(--bs-danger) !important; }
.bg-warning { background-color: var(--bs-warning) !important; }
.bg-info { background-color: var(--bs-info) !important; }
.bg-opacity-25 { --bg-opacity: 0.25; }
.bg-warning.bg-opacity-25 { background-color: rgba(255, 193, 7, 0.25) !important; }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.navbar > .container,
.navbar > .container-fluid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.25rem;
    margin-right: 1rem;
}
.navbar-brand img { height: 40px; }

.navbar-dark { color: rgba(255,255,255,0.85); }
.navbar-dark .nav-link { color: rgba(255,255,255,0.85); text-decoration: none; padding: 0.5rem 0.75rem; display: block; }
.navbar-dark .nav-link:hover { color: #fff; }

.navbar-nav { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }

.navbar-toggler {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--bs-border-radius);
    margin-left: auto;
}
.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    background: no-repeat center/100%
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    vertical-align: middle;
}

.navbar-collapse { display: flex; align-items: center; flex-grow: 1; }

@media (max-width: 991.98px) {
    .navbar-toggler { display: block; }
    .navbar-collapse {
        display: none;
        flex-basis: 100%;
        flex-grow: 1;
    }
    .navbar-collapse.show { display: flex; }
    .navbar-nav { flex-direction: column; width: 100%; }
}

/* ── Nav tabs ──────────────────────────────────────────────── */
.nav { display: flex; flex-wrap: wrap; padding-left: 0; margin-bottom: 0; list-style: none; }
.nav-tabs { border-bottom: 2px solid var(--bs-border-color); }
.nav-tabs .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--bs-secondary);
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
}
.nav-tabs .nav-link:hover { color: var(--bs-primary); border-color: var(--bs-border-color) var(--bs-border-color) transparent; }
.nav-tabs .nav-link.active {
    color: var(--bs-body-color);
    background-color: #fff;
    border-color: var(--bs-border-color) var(--bs-border-color) #fff;
    font-weight: 600;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.card-header {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 12px 12px 0 0;
}
.card-body { padding: 1rem; flex: 1 1 auto; }
.card-title { margin-bottom: 0.5rem; font-weight: 600; }
.card-text { margin-bottom: 1rem; }
.card-icon { font-size: 2.5rem; color: var(--brand-cyan); }

.simple-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--bs-border-radius);
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    color: var(--bs-body-color);
    background-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

.btn-primary { background-color: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.btn-primary:hover { background-color: #0b5ed7; border-color: #0a58ca; color: #fff; }
.btn-danger { background-color: var(--bs-danger); border-color: var(--bs-danger); color: #fff; }
.btn-danger:hover { background-color: #bb2d3b; color: #fff; }
.btn-warning { background-color: var(--bs-warning); border-color: var(--bs-warning); color: #000; }
.btn-warning:hover { background-color: #e0a800; color: #000; }
.btn-link { color: var(--bs-primary); background: none; border: none; padding: 0; text-decoration: underline; }
.btn-link:hover { color: #0a58ca; }

.btn-outline-primary { color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-outline-primary:hover { background-color: var(--bs-primary); color: #fff; }
.btn-outline-secondary { color: var(--bs-secondary); border-color: var(--bs-secondary); }
.btn-outline-secondary:hover { background-color: var(--bs-secondary); color: #fff; }
.btn-outline-danger { color: var(--bs-danger); border-color: var(--bs-danger); }
.btn-outline-danger:hover { background-color: var(--bs-danger); color: #fff; }
.btn-outline-warning { color: #997404; border-color: var(--bs-warning); }
.btn-outline-warning:hover { background-color: var(--bs-warning); color: #000; }
.btn-outline-success { color: var(--bs-success); border-color: var(--bs-success); }
.btn-outline-success:hover { background-color: var(--bs-success); color: #fff; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.25rem; }
.btn-lg { padding: 0.5rem 1rem; font-size: 1.25rem; border-radius: 0.5rem; }

.btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    font-size: 1rem;
    line-height: 1;
    color: inherit;
}
.btn-close::after { content: "\00d7"; font-size: 1.25rem; }
.btn-close:hover { opacity: 1; }

.btn-brand { background-color: var(--brand-cyan); border: none; color: #fff; }
.btn-brand:hover { background-color: var(--brand-dark); color: #fff; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.25em 0.55em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

/* ── Tables ────────────────────────────────────────────────── */
.table { width: 100%; margin-bottom: 1rem; vertical-align: top; border-color: var(--bs-border-color); }
.table > :not(caption) > * > * { padding: 0.5rem; border-bottom: 1px solid var(--bs-border-color); }
.table > thead { vertical-align: bottom; }
.table > thead > tr > th { font-weight: 600; }

.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(0, 0, 0, 0.02); }
.table-hover > tbody > tr:hover > * { background-color: rgba(0, 0, 0, 0.04); }
.table-sm > :not(caption) > * > * { padding: 0.25rem; }
.table-borderless > :not(caption) > * > * { border-bottom: none; }
.table-dark { background-color: var(--bs-dark); color: #fff; }
.table-dark > :not(caption) > * > * { background-color: var(--bs-dark); color: #fff; border-bottom-color: rgba(255,255,255,0.15); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-danger { background-color: #f8d7da; }
.table-secondary { background-color: #e2e3e5; }
.align-middle { vertical-align: middle !important; }
.table.align-middle > :not(caption) > * > * { vertical-align: middle; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
}
.alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }
.alert-danger { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-dismissible { padding-right: 3rem; }
.alert-dismissible .btn-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.fade { opacity: 1; transition: opacity 0.15s; }
.show { /* kept for compatibility */ }

/* ── Forms ─────────────────────────────────────────────────── */
.form-label { margin-bottom: 0.5rem; font-weight: 500; }
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}
.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}
.form-control-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.25rem; }
.form-control[readonly] { background-color: #e9ecef; }

.form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    appearance: none;
}
.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}
.form-select-sm { padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 0.875rem; }

textarea.form-control { min-height: calc(1.5em + 0.75rem + 2px); resize: vertical; }

.form-check { display: block; min-height: 1.5rem; padding-left: 1.5em; margin-bottom: 0.125rem; }
.form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    margin-left: -1.5em;
    vertical-align: top;
    accent-color: var(--bs-primary);
    cursor: pointer;
}
.form-check-label { cursor: pointer; }

.form-text { display: block; margin-top: 0.25rem; font-size: 0.875em; color: #6c757d; }

.is-invalid { border-color: var(--bs-danger) !important; }
.is-invalid:focus { box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important; }
.invalid-feedback { display: block; width: 100%; margin-top: 0.25rem; font-size: 0.875em; color: var(--bs-danger); }

.input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.input-group > .form-control,
.input-group > .form-select { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group-sm > .form-control { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.input-group-sm > .btn { padding: 0.25rem 0.5rem; font-size: 0.875rem; }

/* ── Breadcrumbs ───────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
    font-size: 0.9rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: #6c757d;
}
.breadcrumb-item a { text-decoration: none; color: var(--bs-primary); }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #6c757d; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2px;
}
.pagination-sm .page-link { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.page-item { }
.page-link {
    display: block;
    padding: 0.375rem 0.75rem;
    color: var(--bs-primary);
    text-decoration: none;
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: color 0.15s, background-color 0.15s;
}
.page-link:hover { background-color: #e9ecef; color: #0a58ca; }
.page-item.active .page-link,
.page-item.active > span.page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}
.page-item.disabled .page-link,
.page-item.disabled > span.page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: var(--bs-border-color);
}

/* ── Material Symbols icon helper ──────────────────────────── */
.material-symbols-outlined {
    vertical-align: middle;
    font-size: 1.2em;
    line-height: 1;
}
/* When used inline with text, shrink slightly */
.btn .material-symbols-outlined,
.badge .material-symbols-outlined {
    font-size: 1.1em;
    vertical-align: -0.15em;
    margin-right: 0.15em;
}

/* ============================================================
   PROJECT-SPECIFIC CUSTOM STYLES
   ============================================================ */

/* ── Hero section ──────────────────────────────────────────── */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}
.hero h1 { color: var(--brand-dark); font-weight: 700; }
.hero p { color: #6c757d; max-width: 600px; margin: 0 auto; }

/* ── Auth form cards ───────────────────────────────────────── */
.card h3 { font-weight: 700; }

/* ── Folder tree picker ────────────────────────────────────── */
.folder-tree ul { list-style: none; padding-left: 1.2rem; }
.folder-tree > ul { padding-left: 0; }
.folder-tree li { padding: 2px 0; }
.folder-tree .folder-name { cursor: pointer; padding: 2px 8px; border-radius: 4px; }
.folder-tree .folder-name:hover { background-color: #e9ecef; }
.folder-tree .folder-name.selected { background-color: var(--brand-cyan); color: #fff; }

/* ── Explorer tree panel ───────────────────────────────────── */
.explorer-panel { position: sticky; top: 1rem; }
.explorer-panel:hover { transform: none; }

.explorer-header {
    background-color: #023e58;
    color: white;
    padding-left: 10px;
}

.explorer-tree-container {
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px 0;
    background: #fff;
}

.explorer-tree-list { list-style: none; margin: 0; padding: 0 0 0 20px; }
.explorer-tree-container > .explorer-tree-list { padding-left: 8px; }

.explorer-tree-item { position: relative; padding: 0; line-height: 22px; }

.explorer-tree-item .tree-connector {
    position: absolute; left: -12px; top: 0; width: 12px; height: 100%; pointer-events: none;
}
.explorer-tree-item .tree-connector::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-left: 1px dotted #aaa;
}
.explorer-tree-item .tree-connector::after {
    content: ""; position: absolute; left: 0; top: 11px; width: 12px; height: 0; border-top: 1px dotted #aaa;
}
.explorer-tree-item.last > .tree-connector::before { bottom: auto; height: 12px; }

.tree-toggle {
    display: inline-block; width: 11px; height: 11px; border: 1px solid #888; background: #fff;
    text-align: center; line-height: 9px; font-size: 9px; cursor: pointer; vertical-align: middle;
    margin-right: 3px; position: relative; text-decoration: none; color: #444;
}
.tree-toggle::before { content: "+"; }
.tree-toggle.open::before { content: "\2212"; }
.tree-toggle.leaf { border: none; background: none; cursor: default; }
.tree-toggle.leaf::before { content: ""; }

.tree-label {
    display: inline-block; padding: 1px 6px; border-radius: 3px; text-decoration: none;
    color: #212529; font-size: 0.875rem; white-space: nowrap; vertical-align: middle;
}
.tree-label .material-symbols-outlined { color: #e8a735; margin-right: 3px; font-size: 1rem; }
.tree-label:hover { background-color: #e8f4f8; color: #212529; }
.tree-label.selected { background-color: var(--brand-cyan); color: #fff; }
.tree-label.selected .material-symbols-outlined { color: #fff; }

/* ── Browse search ─────────────────────────────────────────── */
.search-card:hover { transform: none; }
#search-map { border: 1px solid #dee2e6; }

/* ── Map preview ───────────────────────────────────────────── */
.map-preview-card:hover { transform: none; }
#map-preview { height: 400px; border-radius: 0 0 12px 12px; }

/* ── Potree 3D viewer ──────────────────────────────────────── */
body.potree-page { overflow-y: auto !important; height: auto !important; }
#potree-viewer {
    height: 500px; border-radius: 0 0 12px 12px; position: relative;
    background: #1a1a2e; overflow: hidden;
}
#potree-viewer .potree-scroll-hint {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7); color: #fff; padding: 6px 16px;
    border-radius: 20px; font-size: 0.8rem; pointer-events: none;
    opacity: 0; transition: opacity 0.4s; z-index: 100;
}
#potree-viewer .potree-scroll-hint.visible { opacity: 1; }
#potree-viewer::after {
    content: ''; position: absolute; inset: 0;
    border: 2px solid transparent; border-radius: 0 0 12px 12px;
    pointer-events: none; transition: border-color 0.3s;
}
#potree-viewer.active::after { border-color: var(--brand-cyan); }

#footprint-map { height: 250px; border-radius: 0 0 12px 12px; }

/* ── CMS page content ─────────────────────────────────────── */
.cms-content img { max-width: 100%; height: auto; border-radius: var(--bs-border-radius); }
.cms-content h1, .cms-content h2, .cms-content h3 { color: var(--brand-dark); }
.cms-content blockquote {
    border-left: 4px solid var(--brand-cyan);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
.cms-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--bs-border-radius);
    overflow-x: auto;
}
