:root {
    --page: #F1F5F2;
    --surface: #FFFFFF;
    --surface-subtle: #F7FAF8;
    --surface-raised: #FBFCFB;
    --primary-dark: #0B4F38;
    --primary: #2F6F4E;
    --primary-hover: #245A3F;
    --primary-soft: #EAF4ED;
    --soft-green: var(--primary-soft);
    --mint: #F3F7F4;
    --deep-teal: #173F34;
    --text: #17211B;
    --muted: #526158;
    --white: #FFFFFF;
    --border: #CBD8CF;
    --control-border: #87968D;
    --focus: #2563EB;
    --info: #1D5F91;
    --info-soft: #E9F2FB;
    --info-border: #B9D4EA;
    --success: #166534;
    --success-soft: #EAF6EE;
    --success-border: #B9DEC4;
    --warning: #8A4B08;
    --warning-soft: #FFF4D6;
    --warning-border: #E8CE8B;
    --danger: #B42318;
    --danger-soft: #FDECEA;
    --danger-border: #EAB9B5;
    --neutral: #526158;
    --neutral-soft: #EEF2EF;
    --neutral-border: #D2DBD5;
    --soft-blue: var(--info-soft);
    --shadow: 0 12px 30px rgba(25, 57, 44, 0.08);
    --soft-shadow: 0 5px 16px rgba(25, 57, 44, 0.055);
    --shadow-soft: var(--soft-shadow);
}

* { box-sizing: border-box; }

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
    overflow-x: hidden;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

:where(button, input, select, textarea):disabled,
[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.58;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

.admin-main,
.admin-content,
.panel,
.form-card,
.detail-card,
.stat-card,
.report-card,
.analytics-card,
.settings-card,
.table-wrap,
.form-grid > *,
.detail-grid > *,
.dashboard-grid > *,
.settings-grid > *,
.report-grid > *,
.review-grid > * {
    min-width: 0;
}

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    padding: 20px 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(151, 194, 150, 0.18), transparent 32%),
        linear-gradient(180deg, #174F3D, #123F33 48%, #0E342D);
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 22px;
    border-radius: 0 18px 18px 0;
    z-index: 40;
    overflow-y: auto;
    transition: transform 0.22s ease, visibility 0.22s ease;
}

.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
    position: relative;
}
.leaf-mark,
.leaf-mark::before,
.leaf-mark::after {
    display: block;
    width: 18px;
    height: 28px;
    border-radius: 18px 18px 18px 3px;
    background: linear-gradient(135deg, #B8E37E, #6FBF5B);
    transform: rotate(38deg);
}
.leaf-mark::before,
.leaf-mark::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 22px;
}
.leaf-mark::before { transform: rotate(-70deg); left: 12px; top: 20px; }
.leaf-mark::after { transform: rotate(110deg); right: 11px; top: 20px; opacity: 0.9; }
.brand-block h1 {
    margin: 0;
    font-size: 17px;
    letter-spacing: 0;
}
.brand-block p { margin: 3px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 13px; }

.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav a, .disabled-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.17);
    color: var(--white);
    box-shadow: inset 3px 0 0 #9EDC7A;
}
.sidebar-group { min-width: 0; }
.sidebar-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--white);
}
.sidebar-group summary.group-active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}
.sidebar-group summary:focus-visible,
.sidebar-nav a:focus-visible {
    outline-color: #CBE7B6;
    outline-offset: 2px;
}
.sidebar-chevron {
    width: 8px;
    height: 8px;
    flex: none;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
.sidebar-group[open] .sidebar-chevron { transform: rotate(225deg); }
.sidebar-group-links {
    display: grid;
    gap: 3px;
    margin: 2px 0 8px 9px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.sidebar-group-links a { font-weight: 600; }
.disabled-link { opacity: 0.48; }

.sidebar-card {
    margin-top: auto;
    min-height: 156px;
    padding: 18px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
        rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    align-content: end;
    overflow: hidden;
    position: relative;
}
.sprout-visual {
    position: absolute;
    top: 22px;
    left: 50%;
    width: 54px;
    height: 54px;
    transform: translateX(-50%);
    border-bottom: 3px solid rgba(255, 255, 255, 0.32);
}
.sprout-visual::before {
    content: "";
    position: absolute;
    left: 25px;
    bottom: 0;
    width: 3px;
    height: 42px;
    background: rgba(255, 255, 255, 0.42);
}
.sprout-visual span {
    position: absolute;
    width: 24px;
    height: 15px;
    border-radius: 18px 18px 3px 18px;
    background: #9EDC7A;
}
.sprout-visual span:first-child { left: 4px; top: 8px; transform: rotate(22deg); }
.sprout-visual span:last-child { right: 4px; top: 1px; transform: rotate(-28deg); }
.sidebar-card p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 13px; }

.admin-main { margin-left: 260px; width: calc(100% - 260px); transition: margin-left 0.22s ease, width 0.22s ease; }
.admin-content { padding: 24px; }

.mobile-sidebar-backdrop {
    display: none;
}

@media (min-width: 821px) {
    body.sidebar-collapsed .admin-sidebar {
        transform: translateX(-105%);
        visibility: hidden;
        pointer-events: none;
    }

    body.sidebar-collapsed .admin-main {
        margin-left: 0;
        width: 100%;
    }
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 14px 22px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--soft-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mobile-nav-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--primary-dark);
    min-height: 42px;
    padding: 8px 11px;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    cursor: pointer;
}

.mobile-nav-toggle:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.mobile-nav-toggle:focus-visible {
    outline-color: var(--focus);
    outline-offset: 2px;
}

.mobile-nav-bars {
    display: grid;
    gap: 3px;
}

.mobile-nav-bars span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.search-box {
    flex: 1;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border-radius: 10px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}
.search-box:focus-within {
    background: var(--white);
    border-color: var(--control-border);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.search-icon {
    width: 14px;
    height: 14px;
    border: 2px solid #94A59A;
    border-radius: 50%;
    position: relative;
}
.search-icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 2px;
    right: -5px;
    bottom: -3px;
    background: #94A59A;
    transform: rotate(45deg);
}
.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.system-status {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid var(--success-border);
    font-size: 13px;
    font-weight: 700;
}
.notification-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid var(--danger-border);
    font-weight: 800;
}
.profile-chip { display: flex; align-items: center; gap: 10px; }
.profile-chip strong, .profile-chip span { display: block; }
.profile-chip strong { font-size: 14px; }
.profile-chip span { color: var(--muted); font-size: 12px; }
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-dark);
    color: var(--white);
}
.logout-button, .login-form button {
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.logout-button {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--primary-dark);
}

.logout-button:hover {
    border-color: var(--control-border);
    background: var(--surface-subtle);
}

.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 12px 0 20px;
}
.page-heading h2 { margin: 0; font-size: 26px; }
.page-heading p { margin: 6px 0 0; color: var(--muted); }
.date-chip {
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--soft-shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.stat-card, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--soft-shadow);
}
.stat-card {
    padding: 16px;
    min-height: 142px;
    position: relative;
    border-top: 3px solid #AEC9B8;
}
.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
}
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 25px; color: var(--deep-teal); }
.stat-card small { display: block; margin-top: 8px; color: var(--primary-dark); }

.dashboard-grid, .settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 16px; }
.section-panel { margin-bottom: 14px; }
.panel.wide { grid-column: span 1; }
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.panel-header h3, .panel h3 { margin: 0; }
.panel-header span { color: var(--muted); font-size: 13px; }
.panel p { color: var(--muted); }

.mobile-field-grid {
    grid-template-columns: 1.35fr 1fr;
}

.mobile-map-canvas {
    position: relative;
    min-height: 260px;
    border: 1px solid #DDEBE2;
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.72) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.72) 1px, transparent 1px),
        radial-gradient(circle at 18% 25%, rgba(111, 191, 91, 0.32), transparent 22%),
        radial-gradient(circle at 78% 58%, rgba(47, 125, 70, 0.22), transparent 26%),
        linear-gradient(135deg, #EAF5E9, #EAF4FA);
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.mobile-map-canvas::before {
    content: "";
    position: absolute;
    inset: 28% -10% auto;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 60, 58, 0.12);
    transform: rotate(-8deg);
}

.mobile-map-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50% 50% 50% 4px;
    background: var(--primary);
    border: 3px solid var(--white);
    box-shadow: 0 8px 18px rgba(0, 60, 58, 0.24);
    transform: rotate(-45deg);
}

.mobile-map-pin::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #B8E37E;
}

.pin-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.pin-list div,
.mobile-story-row {
    border: 1px solid #E7EFEA;
    border-radius: 12px;
    background: #FBFDFB;
    padding: 10px;
}

.pin-list strong,
.pin-list span,
.mobile-story-row strong,
.mobile-story-row small {
    display: block;
}

.pin-list span,
.mobile-story-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.mobile-story-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.mobile-story-row > span {
    display: grid;
    place-items: center;
    min-height: 42px;
    border-radius: 10px;
    background: var(--soft-green);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.model-list { display: grid; gap: 12px; }
.model-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px;
    border-radius: 12px;
    background: #FBFDFB;
    border: 1px solid #E7EFEA;
}
.model-row strong, .model-row span { display: block; }
.model-row span { color: var(--muted); font-size: 12px; margin-top: 3px; }

.chart-placeholder {
    min-height: 220px;
    border: 1px dashed #BCD5C2;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(234, 245, 233, 0.7), rgba(255, 255, 255, 0.7)),
        var(--mint);
    color: var(--muted);
    text-align: center;
    padding: 20px;
}
.chart-placeholder strong { color: var(--deep-teal); font-size: 16px; }
.chart-placeholder span { display: block; margin-top: 6px; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 11px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th {
    color: var(--deep-teal);
    font-weight: 800;
    background: #EAF0EC;
}
td { color: var(--text); }
tbody tr { transition: background 0.16s ease, transform 0.16s ease; }
tbody tr:nth-child(even) { background: var(--surface-raised); }
tbody tr:hover,
tbody tr:focus-within { background: #EAF3ED; }
tbody tr:last-child td { border-bottom: 0; }
.compact-table th, .compact-table td { padding: 11px 10px; font-size: 13px; }

.scan-monitoring-table {
    min-width: 1180px;
}

.scan-monitoring-filter {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.table-subtext {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.table-thumbnail,
.table-thumbnail-placeholder {
    display: grid;
    place-items: center;
    width: 58px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--soft-green);
    object-fit: cover;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #EAF0EC;
}
.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--control-border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    padding: 9px 12px;
    outline: none;
}
.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.small-button,
.reset-link,
.primary-action,
.secondary-action,
.icon-button {
    min-height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.small-button,
.primary-action {
    border: 0;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
}
.small-button:hover,
.primary-action:hover { background: var(--primary-hover); }
.reset-link,
.secondary-action {
    border: 1px solid var(--border);
    color: var(--primary-dark);
    background: var(--white);
}
.reset-link:hover,
.secondary-action:hover {
    border-color: var(--control-border);
    background: var(--surface-subtle);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.icon-button {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.icon-button:hover {
    border-color: var(--control-border);
    background: var(--surface-subtle);
}
.icon-button.danger {
    color: var(--danger);
    border-color: var(--danger-border);
    background: var(--danger-soft);
}
.icon-button.danger:hover { background: #F8DAD7; }
.inline-delete { display: inline; margin: 0; }

.status-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    gap: 6px;
    border: 1px solid var(--info-border);
    background: var(--info-soft);
    color: var(--info);
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.status-badge::before {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    content: "";
}
.status-tone-success,
.status-active,
.status-completed,
.status-match,
.status-verified,
.status-synced,
.status-online,
.status-connected,
.status-linked,
.status-resolved,
.status-research {
    border-color: var(--success-border);
    background: var(--success-soft);
    color: var(--success);
}
.status-tone-warning,
.status-pending,
.status-pending-sync,
.status-open,
.status-needs-id,
.status-planned,
.status-missing {
    border-color: var(--warning-border);
    background: var(--warning-soft);
    color: var(--warning);
}
.status-tone-danger,
.status-mismatch,
.status-failed,
.status-rejected,
.status-reject,
.status-error {
    border-color: var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
}
.status-tone-info,
.status-likely-found,
.status-reviewed,
.status-exported,
.status-processed {
    border-color: var(--info-border);
    background: var(--info-soft);
    color: var(--info);
}
.status-tone-neutral,
.status-inactive,
.status-draft,
.status-unknown,
.status-dismissed,
.status-casual {
    border-color: var(--neutral-border);
    background: var(--neutral-soft);
    color: var(--neutral);
}

.empty-state { color: var(--muted); text-align: center; }
.empty-card {
    display: grid;
    place-items: center;
    min-height: 150px;
    border: 1px dashed #BCD5C2;
    border-radius: 14px;
    background: var(--mint);
    color: var(--muted);
    text-align: center;
    padding: 22px;
}
.muted-text { color: var(--muted); }

.flash-alert {
    margin: 0 0 16px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    font-size: 14px;
}
.flash-alert ul { margin: 8px 0 0; padding-left: 18px; }
.flash-success {
    border-color: var(--success-border);
    background: var(--success-soft);
    color: var(--success);
}
.flash-error {
    border-color: var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
}
.flash-warning {
    border-color: var(--warning-border);
    background: var(--warning-soft);
    color: var(--warning);
}

.form-card,
.detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--soft-shadow);
    padding: 18px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-group {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.form-group.full { grid-column: 1 / -1; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--control-border);
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    padding: 11px 12px;
    font: inherit;
    font-weight: 400;
    outline: none;
}
.form-group textarea { resize: vertical; min-height: 98px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    background: var(--white);
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.detail-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-grid > div,
.metadata-section {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #FBFDFB;
}
.detail-grid > div > span,
.metadata-section > span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}
.detail-grid > div > strong {
    color: var(--deep-teal);
    font-size: 15px;
}
.metadata-section { margin-top: 12px; }
.metadata-section p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.review-grid .detail-card,
.detail-card {
    margin-bottom: 14px;
}
.detail-card h3 {
    margin: 0 0 14px;
    color: var(--deep-teal);
}
.prediction-list,
.image-list {
    display: grid;
    gap: 10px;
}
.prediction-row,
.image-card,
.log-box {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #FBFDFB;
}
.prediction-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(160px, 1fr) minmax(140px, 0.8fr);
    align-items: center;
    gap: 12px;
}
.prediction-row strong,
.image-card strong,
.log-box strong {
    color: var(--deep-teal);
}
.prediction-row span,
.image-card span,
.log-box span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.image-card {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 12px;
    align-items: start;
}
.image-card-preview,
.image-card-placeholder {
    width: 108px;
    height: 84px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--soft-green);
    object-fit: cover;
}
.image-card-placeholder {
    display: grid;
    place-items: center;
    padding: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.image-card-meta {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.log-box {
    margin-bottom: 10px;
}
.log-box p {
    margin: 8px 0;
    color: var(--text);
    line-height: 1.5;
}
.log-response {
    background: var(--mint);
}
.severity-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    border: 1px solid var(--info-border);
    background: var(--info-soft);
    color: var(--info);
}
.severity-low {
    border-color: var(--info-border);
    background: var(--info-soft);
    color: var(--info);
}
.severity-medium {
    border-color: var(--warning-border);
    background: var(--warning-soft);
    color: var(--warning);
}
.severity-high,
.severity-critical {
    border-color: var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
}
.severity-critical { box-shadow: inset 3px 0 0 var(--danger); }
.status-update-form {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.report-filter-toolbar {
    margin-bottom: 0;
}

.analytics-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.analytics-card,
.report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--soft-shadow);
}

.analytics-card {
    min-height: 132px;
    padding: 15px;
}

.analytics-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    background: var(--soft-green);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.analytics-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.analytics-card strong {
    display: block;
    margin-top: 7px;
    color: var(--deep-teal);
    font-size: 24px;
}

.analytics-card small {
    display: block;
    margin-top: 7px;
    color: var(--primary-dark);
}

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

.report-card {
    padding: 16px;
}

.wide-report-card {
    grid-column: 1 / -1;
}

.mini-bar-chart {
    min-height: 210px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    align-items: end;
    gap: 10px;
    padding: 12px 0 2px;
}

.mini-bar-item {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 7px;
}

.mini-bar-value {
    color: var(--deep-teal);
    font-size: 12px;
    font-weight: 800;
}

.mini-bar-track {
    width: 100%;
    max-width: 36px;
    height: 132px;
    border-radius: 999px;
    background: #E4EFE7;
    display: flex;
    align-items: end;
    overflow: hidden;
}

.mini-bar-track span {
    display: block;
    width: 100%;
    min-height: 8px;
    border-radius: inherit;
    background: linear-gradient(180deg, #6FBF5B, var(--primary));
}

.mini-bar-item small {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.progress-metric {
    display: grid;
    gap: 7px;
    margin-bottom: 11px;
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-meta span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.progress-meta strong {
    color: var(--deep-teal);
    font-size: 13px;
}

.progress-track {
    height: 9px;
    border-radius: 999px;
    border: 1px solid var(--neutral-border);
    background: var(--neutral-soft);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--primary));
}

.metric-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.metric-row .progress-metric {
    margin-bottom: 0;
}

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

.metric-grid div {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
}

.summary-tone-success,
.summary-tone-warning,
.summary-tone-danger,
.summary-tone-info,
.summary-tone-neutral {
    border-left-width: 4px !important;
}
.summary-tone-success { border-left-color: var(--success) !important; }
.summary-tone-warning { border-left-color: #B7791F !important; }
.summary-tone-danger { border-left-color: var(--danger) !important; }
.summary-tone-info { border-left-color: var(--info) !important; }
.summary-tone-neutral { border-left-color: var(--neutral) !important; }
.summary-tone-success strong { color: var(--success) !important; }
.summary-tone-warning strong { color: var(--warning) !important; }
.summary-tone-danger strong { color: var(--danger) !important; }
.summary-tone-info strong { color: var(--info) !important; }
.summary-tone-neutral strong { color: var(--neutral) !important; }

.metric-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.metric-grid strong {
    color: var(--deep-teal);
    font-size: 18px;
}

.metric-list {
    display: grid;
    gap: 2px;
}

.severity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.report-table {
    min-width: 720px;
}

.activity-list {
    display: grid;
    gap: 9px;
}

.activity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #FBFDFB;
    color: var(--text);
    text-decoration: none;
}

.activity-row:hover {
    background: var(--soft-green);
}

.activity-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--deep-teal);
    font-size: 13px;
}

.activity-row small {
    color: var(--muted);
    font-size: 12px;
}

.confidence-meter {
    display: grid;
    grid-template-columns: minmax(64px, auto) minmax(80px, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.confidence-meter .confidence-value {
    display: block;
    min-width: 0;
    margin: 0;
    color: var(--deep-teal);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.confidence-track {
    width: 100%;
    min-width: 0;
    height: 10px;
    padding: 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--neutral-soft);
    border: 1px solid var(--neutral-border);
}
.confidence-fill {
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: var(--info);
}
.confidence-meter.confidence-low .confidence-fill { background: var(--danger); }
.confidence-meter.confidence-medium .confidence-fill { background: #B7791F; }
.confidence-meter.confidence-high .confidence-fill { background: var(--success); }
.confidence-meter.confidence-low > .confidence-value { color: var(--danger); }
.confidence-meter.confidence-medium > .confidence-value { color: var(--warning); }
.confidence-meter.confidence-high > .confidence-value { color: var(--success); }
.confidence-meter .confidence-track:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.pagination-wrap { margin-top: 16px; }
.pagination-wrap nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.pagination-wrap .hidden { display: none; }
.pagination-wrap p { color: var(--muted); font-size: 13px; margin: 0; }
.pagination-wrap a,
.pagination-wrap span[aria-current] span,
.pagination-wrap span[aria-disabled] span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--deep-teal);
    text-decoration: none;
    font-size: 13px;
}
.pagination-wrap span[aria-current] span {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}
.pagination-wrap span[aria-disabled] span {
    color: #66756C;
    background: var(--neutral-soft);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--deep-teal));
    padding: 24px;
}
.login-panel {
    width: min(440px, 100%);
    padding: 30px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand .brand-mark { margin: 0 auto 12px; background: var(--primary-dark); color: var(--white); }
.login-brand h1 { margin: 0; }
.login-brand p { margin: 6px 0 0; color: var(--muted); }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.login-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 13px;
    color: var(--text);
}
.checkbox-row { display: flex !important; align-items: center; gap: 8px !important; }
.checkbox-row input { width: auto; }
.form-error {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
}

.landing-page {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 252, 249, 0.94) 52%, rgba(233, 246, 238, 0.9) 100%),
        radial-gradient(circle at 0% 24%, rgba(47, 125, 70, 0.18), transparent 34%);
    color: var(--text);
}

.landing-nav {
    width: min(1780px, calc(100% - 80px));
    min-height: 92px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
}

.landing-brand,
.login-story-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-dark);
    text-decoration: none;
}

.landing-brand strong,
.login-story-brand strong {
    font-size: 20px;
    letter-spacing: 0;
}

.public-logo {
    width: 48px;
    height: 42px;
    position: relative;
    display: inline-grid;
    place-items: center;
}

.public-logo::before,
.public-logo::after,
.public-logo span {
    content: "";
    position: absolute;
    background: linear-gradient(135deg, #8ECF5C, #0B6847);
}

.public-logo::before {
    width: 22px;
    height: 34px;
    left: 10px;
    top: 2px;
    border-radius: 22px 22px 4px 22px;
    transform: rotate(34deg);
}

.public-logo::after {
    width: 22px;
    height: 34px;
    right: 8px;
    top: 4px;
    border-radius: 22px 22px 22px 4px;
    transform: rotate(-34deg);
}

.public-logo span {
    width: 44px;
    height: 3px;
    bottom: 3px;
    border-radius: 999px;
    background: var(--primary-dark);
}

.public-logo.light::before,
.public-logo.light::after { background: #A7E063; }
.public-logo.light span { background: rgba(255, 255, 255, 0.88); }

.landing-nav nav {
    display: flex;
    align-items: center;
    gap: 42px;
    font-size: 13px;
    font-weight: 700;
}

.landing-nav nav a {
    color: #1E2C26;
    text-decoration: none;
    padding: 29px 0 10px;
    border-bottom: 3px solid transparent;
}

.landing-nav nav a:hover {
    color: var(--primary);
    border-color: #A8C9B4;
}

.landing-nav nav a.active {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.landing-actions {
    justify-self: end;
    display: flex;
    gap: 12px;
}

.solid-public-button,
.outline-public-button {
    min-height: 42px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    font-weight: 800;
    text-decoration: none;
}

.solid-public-button {
    background: linear-gradient(135deg, #0A6B48, #064D35);
    color: var(--white);
    border: 1px solid #064D35;
    box-shadow: 0 12px 24px rgba(6, 77, 53, 0.16);
}

.outline-public-button {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(6, 77, 53, 0.52);
}

.outline-public-button.light {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.08);
}

.solid-public-button.large,
.outline-public-button.large {
    min-width: 164px;
    min-height: 52px;
    font-size: 15px;
}

.landing-hero {
    width: min(1780px, calc(100% - 80px));
    min-height: 535px;
    margin: 0 auto;
    position: relative;
    display: grid;
    grid-template-columns: minmax(380px, 0.85fr) minmax(620px, 1.15fr);
    align-items: center;
    gap: 34px;
    overflow: hidden;
}

.mangrove-visual {
    position: absolute;
    left: -80px;
    top: 12px;
    bottom: -20px;
    width: 340px;
    opacity: 0.88;
    pointer-events: none;
}

.mangrove-canopy {
    position: absolute;
    inset: 0 42px 32% 0;
    border-radius: 0 220px 170px 0;
    background:
        radial-gradient(circle at 22% 22%, #89B95C 0 8px, transparent 9px),
        radial-gradient(circle at 48% 18%, #5D963F 0 13px, transparent 14px),
        radial-gradient(circle at 60% 42%, #6EAC4D 0 11px, transparent 12px),
        radial-gradient(circle at 28% 52%, #376D35 0 14px, transparent 15px),
        linear-gradient(135deg, #315D2B, #79A94D);
}

.mangrove-roots {
    position: absolute;
    left: 0;
    right: 40px;
    bottom: 0;
    height: 48%;
    border-radius: 0 0 160px 0;
    background:
        linear-gradient(114deg, transparent 0 38%, rgba(59, 54, 33, 0.7) 39% 41%, transparent 42%),
        linear-gradient(72deg, transparent 0 34%, rgba(59, 54, 33, 0.64) 35% 37%, transparent 38%),
        linear-gradient(155deg, transparent 0 48%, rgba(59, 54, 33, 0.6) 49% 51%, transparent 52%),
        linear-gradient(180deg, rgba(76, 134, 92, 0.7), rgba(142, 190, 173, 0.42));
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 660px;
    padding-left: clamp(150px, 13vw, 230px);
}

.hero-copy h1 {
    margin: 0;
    color: var(--primary-dark);
    font-size: clamp(42px, 4.2vw, 70px);
    line-height: 1.02;
}

.hero-copy p {
    margin: 22px 0 0;
    max-width: 560px;
    color: #50615A;
    font-size: 18px;
    line-height: 1.58;
}

.hero-buttons,
.hero-checks {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-checks span {
    color: #52635B;
    font-size: 13px;
}

.hero-checks span::before {
    content: "";
    width: 17px;
    height: 17px;
    display: inline-block;
    margin-right: 7px;
    vertical-align: -4px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    background: var(--white);
}

.product-preview {
    position: relative;
    min-height: 492px;
}

.dashboard-preview {
    position: absolute;
    top: 22px;
    left: 0;
    width: min(650px, 74%);
    min-height: 390px;
    display: grid;
    grid-template-columns: 150px 1fr;
    overflow: hidden;
    border: 11px solid rgba(255, 255, 255, 0.94);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 28px 60px rgba(0, 60, 58, 0.15);
}

.dashboard-preview aside {
    padding: 22px 14px;
    display: grid;
    align-content: start;
    gap: 13px;
    color: var(--white);
    background: linear-gradient(180deg, #0A5A3E, #064D35);
}

.dashboard-preview aside strong {
    font-size: 13px;
}

.dashboard-preview aside span {
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 11px;
}

.dashboard-preview section {
    padding: 22px;
    background: #F8FBF9;
}

.preview-topbar {
    width: 260px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--white);
}

.dashboard-preview h3 {
    margin: 22px 0 14px;
    color: var(--deep-teal);
}

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

.preview-stats span {
    min-height: 64px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--deep-teal);
    font-weight: 900;
}

.preview-chart {
    margin-top: 22px;
    height: 150px;
    display: flex;
    align-items: end;
    gap: 18px;
    padding: 18px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--border);
}

.preview-chart i {
    width: 34px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #6FBF5B, var(--primary));
}

.phone-preview,
.login-phone-preview {
    width: 176px;
    min-height: 318px;
    border: 8px solid #172821;
    border-radius: 34px;
    background: #F9FCFA;
    box-shadow: 0 24px 36px rgba(0, 39, 34, 0.25);
    overflow: hidden;
}

.phone-one {
    position: absolute;
    right: 190px;
    top: 135px;
    transform: rotate(9deg);
}

.phone-two {
    position: absolute;
    right: 20px;
    top: 104px;
    transform: rotate(6deg);
}

.phone-screen {
    height: 150px;
    background:
        radial-gradient(circle at 52% 34%, rgba(255, 255, 255, 0.58), transparent 18%),
        linear-gradient(135deg, rgba(19, 99, 67, 0.18), rgba(0, 61, 58, 0.32)),
        linear-gradient(155deg, #78A44D, #174B36 62%, #103A31);
}

.map-screen {
    background:
        radial-gradient(circle at 40% 35%, #F5A33B 0 6px, transparent 7px),
        radial-gradient(circle at 65% 52%, #2F80ED 0 6px, transparent 7px),
        linear-gradient(135deg, #E8F5E9, #5BAA73);
}

.phone-result,
.phone-tools {
    margin: 12px;
    padding: 10px;
    border-radius: 12px;
    background: var(--soft-green);
    color: var(--deep-teal);
    font-size: 11px;
    font-weight: 800;
}

.phone-result span {
    display: block;
    margin-top: 4px;
    color: var(--primary);
}

.phone-tools {
    display: grid;
    gap: 8px;
}

.phone-tools span {
    height: 30px;
    border-radius: 9px;
    background: var(--primary);
}

.feature-strip,
.landing-metrics,
.landing-lower-grid,
.solution-grid,
.trusted-panel,
.landing-cta,
.landing-footer {
    width: min(1780px, calc(100% - 80px));
    margin: 18px auto 0;
}

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

.feature-strip article,
.solution-grid article,
.landing-metrics,
.landing-footer {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--soft-shadow);
}

.feature-strip article {
    min-height: 96px;
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 14px;
    padding: 16px;
}

.feature-strip article span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #0A6B48, #064D35);
    color: var(--white);
    font-size: 11px;
    font-weight: 900;
}

.feature-strip article strong,
.solution-grid article strong {
    color: var(--deep-teal);
}

.feature-strip article p {
    grid-column: 2;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 18px;
}

.landing-metrics div {
    display: grid;
    place-items: center;
    gap: 4px;
    border-right: 1px solid var(--border);
}

.landing-metrics div:last-child {
    border-right: 0;
}

.landing-metrics strong {
    color: var(--primary-dark);
    font-size: 22px;
}

.landing-metrics span {
    color: var(--muted);
    font-size: 12px;
}

.landing-lower-grid {
    display: grid;
    grid-template-columns: 1.55fr 0.95fr;
    gap: 18px;
    align-items: stretch;
}

.landing-lower-grid .solution-grid {
    width: 100%;
    margin: 8px 0 0;
}

.section-kicker {
    margin: 0 0 8px 16px;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 900;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.solution-grid article {
    min-height: 150px;
    padding: 14px;
    overflow: hidden;
    position: relative;
}

.solution-photo {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 45%;
    opacity: 0.78;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), transparent 14%),
        linear-gradient(135deg, #83B65C, #215C41);
}

.solution-grid article strong,
.solution-grid article p,
.solution-grid article a {
    position: relative;
    z-index: 1;
    max-width: 58%;
}

.solution-grid article p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.42;
}

.solution-grid article a {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.trusted-panel {
    width: auto;
    margin: 0;
    min-height: 150px;
}

.trusted-grid {
    min-height: 142px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--soft-shadow);
}

.trusted-grid span {
    min-height: 70px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--deep-teal);
    font-size: 13px;
    font-weight: 900;
    border-right: 1px solid var(--border);
}

.trusted-grid span:last-child {
    border-right: 0;
}

.trusted-grid small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.landing-cta {
    min-height: 166px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 30px 44px;
    border-radius: 18px;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(6, 77, 53, 0.95), rgba(6, 77, 53, 0.72)),
        radial-gradient(circle at 88% 34%, rgba(158, 220, 122, 0.35), transparent 22%),
        #064D35;
}

.landing-cta h2 {
    margin: 0;
    font-size: 30px;
}

.landing-cta p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.landing-cta > div:last-child {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.landing-footer {
    margin-bottom: 28px;
    padding: 28px 44px;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 28px;
    color: var(--white);
    background: linear-gradient(135deg, #064D35, #003C3A);
}

.footer-brand {
    color: var(--white);
}

.landing-footer p,
.landing-footer span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.landing-footer div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.login-page {
    min-height: 100vh;
    padding: 0;
    display: block;
    background: #F9FBFA;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.07fr 1fr;
}

.login-story {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: center;
    gap: clamp(24px, 3vw, 48px);
    padding: clamp(36px, 4vw, 72px);
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(0, 61, 58, 0.94), rgba(6, 77, 53, 0.72)),
        radial-gradient(circle at 15% 12%, rgba(129, 185, 92, 0.44), transparent 28%),
        linear-gradient(135deg, #073F34, #236B51 54%, #7BAA86);
}

.login-story::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 38%, rgba(71, 51, 26, 0.38) 39% 41%, transparent 42%),
        linear-gradient(70deg, transparent 0 42%, rgba(71, 51, 26, 0.34) 43% 45%, transparent 46%),
        radial-gradient(circle at 18% 16%, rgba(158, 220, 122, 0.32), transparent 18%);
    opacity: 0.9;
}

.login-story-content {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: none;
    padding: 0;
}

.login-story-brand {
    color: var(--white);
}

.login-story-brand p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 22px;
}

.login-story-brand strong {
    font-size: 40px;
}

.login-divider {
    width: 70px;
    height: 4px;
    margin: 54px 0 34px;
    border-radius: 999px;
    background: #8DD85E;
}

.login-story h1 {
    margin: 0;
    font-size: clamp(34px, 3.2vw, 48px);
    line-height: 1.15;
}

.login-story-content > p {
    margin: 22px 0 0;
    max-width: 550px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.55;
}

.login-feature-list {
    display: grid;
    gap: 26px;
    margin-top: 46px;
}

.login-feature-list article,
.login-security-note {
    display: flex;
    align-items: center;
    gap: 22px;
}

.login-feature-list article > span,
.login-security-note > span {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(18, 128, 84, 0.88);
    color: var(--white);
    font-weight: 900;
}

.login-feature-list strong,
.login-security-note strong {
    display: block;
    font-size: 20px;
}

.login-feature-list p,
.login-security-note p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.42;
}

.login-security-note {
    margin-top: 54px;
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.login-phone-preview {
    position: relative;
    z-index: 2;
    justify-self: center;
    width: 210px;
    min-height: 410px;
}

.login-phone-preview .phone-screen {
    height: 170px;
}

@media (max-width: 1600px) {
    .login-story {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-story-content {
        width: min(100%, 720px);
        margin: 0 auto;
    }

    .login-phone-preview {
        margin-bottom: 20px;
    }
}

.phone-map-card {
    height: 92px;
    margin: 12px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 28% 42%, #F5A33B 0 5px, transparent 6px),
        radial-gradient(circle at 62% 36%, #2F80ED 0 5px, transparent 6px),
        linear-gradient(135deg, #DFF2E4, #5DA874);
}

.login-form-side {
    display: grid;
    place-items: center;
    padding: 64px clamp(36px, 6vw, 86px);
    background:
        radial-gradient(circle at 22% 20%, rgba(47, 125, 70, 0.08), transparent 28%),
        #FBFDFC;
}

.login-card {
    width: min(720px, 100%);
    padding: clamp(34px, 4vw, 52px) clamp(28px, 4.5vw, 56px);
    border: 1px solid #D7E1DB;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 70px rgba(0, 60, 58, 0.12);
}

.login-icon {
    width: 118px;
    height: 118px;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--soft-green);
}

.login-icon span {
    width: 38px;
    height: 60px;
    border: 4px solid var(--primary);
    border-top: 0;
    border-radius: 0 0 28px 28px;
    position: relative;
}

.login-icon span::before,
.login-icon span::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 22px;
    border: 4px solid var(--primary);
    border-radius: 24px 24px 2px 24px;
    top: -10px;
}

.login-icon span::before {
    left: -26px;
    transform: rotate(26deg);
}

.login-icon span::after {
    right: -26px;
    transform: rotate(-26deg);
}

.login-card h2 {
    margin: 0;
    text-align: center;
    color: var(--primary-dark);
    font-size: 40px;
}

.login-card > p {
    margin: 12px 0 34px;
    text-align: center;
    color: #66756E;
    font-size: 18px;
}

.login-card label {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
    color: #1F2D27;
    font-weight: 800;
}

.login-input-wrap {
    min-height: 58px;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    border: 1px solid #CFDAD4;
    border-radius: 10px;
    background: var(--white);
    padding: 0 14px;
}

.login-input-wrap.has-action {
    grid-template-columns: 42px 1fr auto;
}

.login-input-wrap i {
    color: #83918A;
    font-style: normal;
    font-weight: 900;
}

.login-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    font-size: 18px;
}

.password-toggle {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-weight: 800;
    padding: 8px 0 8px 12px;
}

.flash-warning {
    border-color: #F4C95D;
    background: #FFF8E5;
    color: #7A5200;
}

.dataset-export-panel {
    display: grid;
    grid-template-columns: minmax(320px, 1.4fr) minmax(320px, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.export-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #DDEBE4;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFFFFF 0%, #EFF9F3 100%);
    box-shadow: 0 14px 30px rgba(22, 70, 50, 0.08);
    padding: 20px;
}

.export-action-card h3 {
    margin: 0 0 6px;
    color: var(--primary-dark);
}

.export-action-card p {
    margin: 0;
    color: var(--muted);
}

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

.dataset-count-grid div {
    display: grid;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    padding: 16px;
    text-align: center;
}

.dataset-count-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.dataset-count-grid strong {
    color: var(--primary-dark);
    font-size: 24px;
}

.dataset-filter-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.dataset-verification-page .dataset-export-panel { grid-template-columns: minmax(0, 1fr); }
.dataset-verification-page .export-action-card {
    flex-wrap: wrap;
    border-radius: 18px;
    background: var(--white);
}
.dataset-verification-page .export-action-card > div { flex: 1 1 280px; min-width: 0; }
.dataset-verification-page .export-action-card form { flex: 0 0 auto; max-width: 100%; }
.dataset-verification-page .export-action-card .primary-action { white-space: nowrap; }
.dataset-verification-page .dataset-count-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 16px;
}
.dataset-verification-page .dataset-count-grid > div { border-radius: 16px; text-align: left; padding: 20px; }
.dataset-verification-page .dataset-filter-toolbar > input,
.dataset-verification-page .dataset-filter-toolbar > select { min-width: 0; }
.dataset-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dataset-verification-page .dataset-filter-actions > * { width: auto; white-space: nowrap; flex: 0 0 auto; }
.dataset-verification-page .dataset-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.dataset-verification-page .dataset-image-card { border-radius: 18px; min-width: 0; }
.dataset-verification-page .dataset-image-card img { display: block; height: 220px; object-fit: contain; }
.dataset-verification-page .metadata-row { flex-wrap: wrap; }
.dataset-verification-page .metadata-row strong { overflow-wrap: anywhere; }

.dataset-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.dataset-image-card {
    overflow: hidden;
    border: 1px solid #E1EBE5;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 30px rgba(22, 70, 50, 0.08);
}

.dataset-image-card img,
.dataset-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #EAF5EF;
}

.dataset-image-placeholder,
.dataset-large-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

.dataset-image-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.dataset-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dataset-card-head strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.metadata-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #EEF4F0;
    padding-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.metadata-row strong {
    color: var(--text);
    text-align: right;
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid var(--neutral-border);
    background: var(--neutral-soft);
    color: var(--neutral);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.quality-good {
    border-color: var(--success-border);
    background: var(--success-soft);
    color: var(--success);
}

.quality-acceptable {
    border-color: var(--warning-border);
    background: var(--warning-soft);
    color: var(--warning);
}

.quality-reject {
    border-color: var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
}

.dataset-review-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
    gap: 20px;
    align-items: start;
}

.dataset-large-preview,
.dataset-large-placeholder {
    width: 100%;
    max-height: 560px;
    border-radius: 8px;
    object-fit: contain;
    background: #EAF5EF;
}

.dataset-large-placeholder {
    min-height: 320px;
}

.verification-form-card {
    margin-top: 20px;
}

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

.admin-form-grid label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
    width: 100%;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
}

.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-form-grid textarea:focus {
    border-color: var(--focus);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.admin-form-grid textarea {
    resize: vertical;
}

.form-wide {
    grid-column: 1 / -1;
}

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

.review-action-button {
    justify-self: start;
    margin-top: 4px;
}

.export-path-box {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    border: 1px solid #DDEBE4;
    border-radius: 8px;
    background: #F6FBF8;
    padding: 14px;
}

.export-path-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.export-path-box strong {
    color: var(--primary-dark);
    overflow-wrap: anywhere;
}

.export-note {
    margin-top: 12px;
    border-left: 4px solid var(--primary);
    background: #EFF9F3;
    border-radius: 8px;
    color: var(--text);
    padding: 12px 14px;
}

.status-pending {
    border-color: var(--warning-border);
    background: var(--warning-soft);
    color: var(--warning);
}

.status-verified {
    border-color: var(--success-border);
    background: var(--success-soft);
    color: var(--success);
}

.status-rejected,
.status-reject {
    border-color: var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
}

.status-exported {
    border-color: var(--info-border);
    background: var(--info-soft);
    color: var(--info);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 24px;
}

.login-options .checkbox-row {
    margin: 0;
    color: #23322B;
    font-weight: 500;
}

.login-options a {
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.login-submit,
.google-button {
    width: 100%;
    min-height: 64px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.login-submit {
    border: 0;
    color: var(--white);
    background: linear-gradient(135deg, #0A6B48, #064D35);
    box-shadow: 0 12px 24px rgba(6, 77, 53, 0.18);
}

.login-or {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin: 26px 0;
    color: #6E7A74;
}

.login-or span {
    height: 1px;
    background: var(--border);
}

.google-button {
    border: 1px solid #D6E0DA;
    color: #26332D;
    background: var(--white);
}

.staff-note {
    margin-top: 24px;
    text-align: center;
    color: #58675F;
}

.staff-note strong,
.staff-note span {
    display: block;
}

.staff-note strong {
    color: #34443C;
    font-size: 16px;
}

.role-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-badge,
.build-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.role-badge {
    background: var(--soft-green);
    color: var(--primary-dark);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #FBFDFB;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--deep-teal);
    font-weight: 800;
}

.checkbox-group input {
    width: auto;
    accent-color: var(--primary);
}

.password-card {
    align-self: start;
}

.full-width-card {
    grid-column: 1 / -1;
}

.settings-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.settings-card h3 {
    margin: 0 0 14px;
    color: var(--deep-teal);
}

.system-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.system-info-row:last-child {
    border-bottom: 0;
}

.system-info-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.system-info-row strong {
    color: var(--deep-teal);
    font-size: 13px;
    text-align: right;
    overflow-wrap: anywhere;
}

.api-list {
    display: grid;
    gap: 8px;
}

.api-list span {
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #FBFDFB;
    color: var(--deep-teal);
    font-size: 13px;
    font-weight: 800;
}

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

.build-badge.status-completed,
.build-badge.status-connected,
.build-badge.status-linked {
    background: var(--success-soft);
    color: var(--success);
}

.build-badge.status-pending,
.build-badge.status-planned,
.build-badge.status-missing {
    background: var(--warning-soft);
    color: var(--warning);
}

.build-badge.status-error {
    background: var(--danger-soft);
    color: var(--danger);
}

.report-print-actions {
    align-self: center;
}

.report-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 14px 0;
}

.report-note,
.print-note p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.report-metric-grid {
    margin-bottom: 8px;
}

.cnn-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.cnn-metric-grid div {
    min-width: 0;
    min-height: 112px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.cnn-metric-grid span,
.confusion-matrix-preview span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 0;
    text-transform: uppercase;
}

.cnn-metric-grid strong {
    color: var(--deep-teal);
    font-size: clamp(22px, 2vw, 30px);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}

.confusion-matrix-preview {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--mint);
}

.confusion-matrix-preview img {
    display: block;
    width: min(100%, 760px);
    max-height: 520px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--white);
}

.classification-report-table {
    margin-top: 14px;
}

.classification-report-table td:first-child {
    font-weight: 800;
    color: var(--deep-teal);
}

.print-note {
    margin-bottom: 14px;
}

.chatbot-stats-grid,
.observation-map-stats {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.observation-map-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.map-scope-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.map-scope-switch a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px 11px;
    border-radius: 7px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.map-scope-switch a strong {
    display: grid;
    min-width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 50%;
    background: var(--soft-green);
    color: var(--primary-dark);
    font-size: 12px;
}

.map-scope-switch a.active {
    background: var(--primary-dark);
    color: var(--white);
}

.map-scope-switch a.active strong {
    background: var(--white);
}

.chatbot-test-form {
    display: grid;
    gap: 12px;
}

.admin-chat-panel {
    display: grid;
    gap: 14px;
}

.admin-chat-window {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 360px;
    max-height: 520px;
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(227, 244, 234, 0.72), rgba(255, 255, 255, 0.92)),
        var(--mint);
}

.admin-chat-message {
    width: min(86%, 720px);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.admin-chat-message.user {
    justify-self: end;
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.admin-chat-message.assistant {
    justify-self: start;
}

.admin-chat-message.error {
    border-color: #F2B8B5;
    background: #FFF5F4;
}

.admin-chat-message span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-chat-message.user span {
    color: rgba(255, 255, 255, 0.94);
}

.admin-chat-message p {
    margin: 0;
    line-height: 1.6;
    white-space: pre-line;
}

.admin-chat-message.user p {
    color: var(--white);
}

.admin-chat-form textarea {
    resize: vertical;
}

.admin-chat-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-chat-status {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-chat-examples {
    margin-top: 0;
}

.chatbot-test-response {
    margin-top: 14px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--mint);
}

.chatbot-test-response span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.chatbot-test-response strong {
    display: block;
    margin-top: 5px;
    color: var(--primary-dark);
}

.chatbot-test-response p {
    margin: 10px 0 0;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-line;
}

.chatbot-suggestion-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.chatbot-suggestion-row span {
    width: auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-dark);
    text-transform: none;
}

.chatbot-suggestion-row a,
.chatbot-suggestion-row button {
    width: auto;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.chatbot-suggestion-row button:hover,
.chatbot-suggestion-row a:hover {
    border-color: var(--primary);
    background: var(--soft-green);
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-list-row {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #FBFDFB;
}

.compact-list-row strong {
    color: var(--deep-teal);
}

.compact-list-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.observation-map-filter {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.observation-map-panel {
    padding: 0;
    overflow: hidden;
}

.observation-map-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1.4fr) minmax(300px, 0.8fr);
    gap: 14px;
    align-items: stretch;
}

.observation-map-shell {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--mint);
}

.observation-map-shell-app {
    min-height: min(820px, calc(100vh - 210px));
    border: 0;
    border-radius: 14px;
    background: #123428;
}

.observation-map-canvas {
    width: 100%;
    height: 620px;
    min-height: 420px;
}

.observation-map-shell-app .observation-map-canvas {
    height: min(820px, calc(100vh - 210px));
    min-height: 620px;
}

.admin-map-floating-top {
    position: absolute;
    z-index: 480;
    top: 16px;
    left: 16px;
    right: 16px;
    max-width: 920px;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 40px rgba(0, 45, 35, 0.18);
    backdrop-filter: blur(10px);
}

.admin-map-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-map-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-map-title-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--primary-dark);
    color: var(--white);
    font-size: 11px;
    font-weight: 900;
}

.admin-map-title strong {
    display: block;
    color: var(--deep-teal);
    font-size: 16px;
}

.admin-map-title span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-map-count {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--soft-green);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.admin-map-species-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.admin-map-species-chip {
    flex: 0 0 auto;
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--white);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.admin-map-species-chip:hover:not(.selected) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.admin-map-species-chip.selected {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: var(--white);
}

.admin-map-filter-details {
    border-top: 1px solid var(--border);
    padding-top: 8px;
}

.admin-map-filter-details summary {
    width: max-content;
    cursor: pointer;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.admin-map-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.admin-map-filter-grid input,
.admin-map-filter-grid select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--control-border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    padding: 8px 10px;
    outline: none;
}

.admin-map-filter-grid input:focus,
.admin-map-filter-grid select:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.observation-map-empty {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: min(460px, calc(100% - 36px));
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted);
    font-weight: 800;
    box-shadow: var(--soft-shadow);
}

.observation-marker {
    display: grid;
    place-items: center;
}

.observation-marker span {
    position: relative;
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--white);
    border-radius: 999px;
    box-shadow: 0 5px 14px rgba(0, 45, 35, 0.22);
}

.observation-marker span::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 12px;
    height: 12px;
    background: inherit;
    border-right: 3px solid var(--white);
    border-bottom: 3px solid var(--white);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
}

.observation-marker span i {
    position: absolute;
    inset: 9px;
    border-radius: 999px;
    background: var(--white);
    opacity: 0.88;
}

.observation-details-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.observation-details-floating {
    position: absolute;
    z-index: 470;
    right: 16px;
    bottom: 16px;
    width: min(440px, calc(100% - 32px));
    max-height: min(620px, calc(100% - 210px));
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.observation-details-floating.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.observation-details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--primary-dark);
    font-weight: 900;
    cursor: pointer;
}

.observation-details-panel h3 {
    margin: 0 0 8px;
    color: var(--deep-teal);
}

.observation-details-panel .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.observation-image-wrap {
    margin: 14px 0;
}

.observation-image-wrap img,
.observation-image-wrap .image-card-placeholder {
    width: 100%;
    height: 210px;
    border-radius: 12px;
    object-fit: cover;
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .admin-sidebar,
    .admin-topbar,
    .filter-toolbar,
    .report-print-actions,
    .sidebar-card,
    .icon-button,
    .small-button,
    .reset-link {
        display: none !important;
    }

    .admin-main {
        width: 100%;
        margin-left: 0;
    }

    .admin-content {
        padding: 0;
    }

    .page-heading,
    .panel,
    .analytics-card,
    .report-card,
    .detail-card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .report-grid,
    .dashboard-grid,
    .summary-grid,
    .cnn-metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .wide-report-card {
        grid-column: 1 / -1;
    }

    table {
        min-width: 0;
    }

    th,
    td {
        font-size: 11px;
        padding: 7px;
    }
}

@media (max-width: 1100px) {
    .admin-content { padding: 20px; }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-grid { grid-template-columns: 1fr; }
    .cnn-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chatbot-stats-grid,
    .observation-map-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .observation-map-layout { grid-template-columns: 1fr; }
    .admin-map-floating-top {
        max-width: calc(100% - 32px);
    }
    .landing-nav,
    .landing-hero,
    .feature-strip,
    .landing-metrics,
    .landing-lower-grid,
    .solution-grid,
    .trusted-panel,
    .landing-cta,
    .landing-footer { width: min(100% - 32px, 980px); }
    .landing-nav { grid-template-columns: 1fr; justify-items: center; padding: 18px 0; }
    .landing-actions { justify-self: center; }
    .landing-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 24px; }
    .hero-copy { padding-left: 0; }
    .product-preview { min-height: 520px; }
    .feature-strip,
    .landing-metrics,
    .solution-grid,
    .landing-lower-grid,
    .landing-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-lower-grid { grid-template-columns: 1fr; }
    .trusted-panel { width: 100%; }
    .trusted-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .build-status-grid { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-story { min-height: 640px; }
    .login-phone-preview { margin-bottom: 20px; }
}

@media (max-width: 820px) {
    body.sidebar-open { overflow: hidden; }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        pointer-events: none;
        background: rgba(0, 24, 20, 0.42);
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    body.sidebar-open .mobile-sidebar-backdrop {
        pointer-events: auto;
        opacity: 1;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 320px);
        max-width: 100%;
        border-radius: 0 18px 18px 0;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.22s ease;
        box-shadow: 18px 0 40px rgba(0, 24, 20, 0.22);
    }

    body.sidebar-open .admin-sidebar {
        transform: translateX(0);
        visibility: visible;
    }

    .admin-shell { display: block; }
    .admin-main { margin-left: 0; width: 100%; }
    .admin-content { padding: 16px; }

    .admin-topbar {
        margin: 10px 12px 0;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        line-height: 1;
    }

    .search-box {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
    }

    .topbar-actions {
        flex: 1 1 auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
    }

    .system-status {
        font-size: 12px;
        padding: 7px 9px;
    }

    .profile-chip {
        max-width: min(100%, 210px);
        min-width: 0;
    }

    .profile-chip div:last-child {
        min-width: 0;
    }

    .profile-chip strong,
    .profile-chip span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .page-heading h2 { font-size: 24px; }
    .page-heading > * { max-width: 100%; }

    .map-scope-switch {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid { grid-template-columns: 1fr; }
    .filter-toolbar { grid-template-columns: 1fr; }
    table { min-width: 680px; }
    th, td { padding: 11px 10px; }
    .form-grid,
    .dataset-export-panel,
    .dataset-count-grid,
    .detail-grid,
    .detail-grid.two,
    .review-grid,
    .dataset-filter-toolbar,
    .dataset-review-layout,
    .admin-form-grid,
    .prediction-row,
    .image-card { grid-template-columns: 1fr; }
    .image-card-preview,
    .image-card-placeholder { width: 100%; height: 180px; }
    .summary-grid,
    .metric-grid,
    .metric-row,
    .chatbot-stats-grid,
    .observation-map-stats,
    .activity-row { grid-template-columns: 1fr; }
    .observation-map-shell,
    .observation-map-canvas { min-height: 430px; height: 430px; }
    .observation-map-shell-app,
    .observation-map-shell-app .observation-map-canvas {
        min-height: 680px;
        height: calc(100vh - 160px);
    }
    .admin-map-floating-top {
        top: 12px;
        left: 12px;
        right: 12px;
        padding: 12px;
    }
    .admin-map-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-map-filter-grid {
        grid-template-columns: 1fr;
    }
    .observation-details-floating {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-height: 46%;
    }
    .form-actions,
    .export-action-card,
    .action-row { align-items: stretch; flex-direction: column; }
    .form-actions > *,
    .action-row > *,
    .export-action-card > * { width: 100%; }
    .landing-nav nav { flex-wrap: wrap; justify-content: center; gap: 18px; }
    .landing-actions,
    .hero-buttons,
    .landing-cta,
    .landing-cta > div:last-child { flex-direction: column; align-items: stretch; }
    .product-preview {
        min-height: auto;
        width: 100%;
        transform: none;
        overflow: hidden;
    }
    .dashboard-preview {
        position: relative;
        inset: auto;
        width: 100%;
        min-height: 320px;
        grid-template-columns: 116px 1fr;
    }
    .phone-one,
    .phone-two { display: none; }
    .feature-strip,
    .landing-metrics,
    .solution-grid,
    .landing-lower-grid,
    .trusted-grid,
    .landing-footer { grid-template-columns: 1fr; }
    .trusted-grid span { border-right: 0; border-bottom: 1px solid var(--border); }
    .trusted-grid span:last-child { border-bottom: 0; }
    .landing-metrics div { border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 0; }
    .landing-metrics div:last-child { border-bottom: 0; }
    .solution-grid article strong,
    .solution-grid article p,
    .solution-grid article a { max-width: 68%; }
    .login-story {
        min-height: auto;
        padding: 48px 24px 28px;
    }
    .login-story-content { padding: 0; }
    .login-story-brand strong { font-size: 30px; }
    .login-story-brand p { font-size: 16px; }
    .login-phone-preview { margin: 0 auto 36px; }
    .login-form-side { padding: 28px 16px; }
    .login-card { padding: 32px 22px; }
    .login-card h2 { font-size: 32px; }
    .login-options { align-items: flex-start; flex-direction: column; gap: 12px; }
    .system-info-row { align-items: flex-start; flex-direction: column; gap: 5px; }
    .system-info-row strong { text-align: left; }
    .checkbox-group { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .admin-content {
        padding: 12px;
    }

    .admin-topbar {
        margin: 8px 8px 0;
        padding: 10px;
        gap: 10px;
    }

    .topbar-actions {
        justify-content: stretch;
    }

    .system-status,
    .logout-button {
        width: 100%;
    }

    .notification-dot {
        width: 36px;
        height: 36px;
    }

    .profile-chip {
        flex: 1 1 auto;
    }

    .page-heading {
        margin-top: 10px;
    }

    .page-heading h2 {
        font-size: 22px;
        line-height: 1.18;
    }

    .panel,
    .form-card,
    .detail-card,
    .settings-card,
    .report-card,
    .analytics-card,
    .stat-card {
        border-radius: 12px;
        padding: 14px;
    }

    .cnn-metric-grid {
        grid-template-columns: 1fr;
    }

    .observation-map-panel {
        padding: 0;
    }

    .observation-map-shell-app,
    .observation-map-shell-app .observation-map-canvas {
        min-height: 720px;
        height: calc(100vh - 126px);
    }

    .admin-map-title-icon {
        width: 36px;
        height: 36px;
    }

    .admin-map-species-chip {
        min-height: 32px;
        padding: 6px 10px;
    }

    .panel-header,
    .dataset-card-head,
    .metadata-row,
    .progress-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .table-wrap {
        width: calc(100vw - 24px);
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 620px;
    }

    th,
    td {
        font-size: 12px;
    }

    .primary-action,
    .secondary-action,
    .small-button,
    .reset-link {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .severity-badge,
    .role-badge,
    .build-badge {
        white-space: normal;
    }

    .confidence-meter {
        min-width: 0;
        grid-template-columns: minmax(64px, auto) minmax(60px, 1fr);
        gap: 8px;
    }

    .prediction-row,
    .image-card,
    .activity-row {
        gap: 10px;
    }

    .image-card-preview,
    .image-card-placeholder {
        height: 160px;
    }

    .landing-nav,
    .landing-hero,
    .feature-strip,
    .landing-metrics,
    .landing-lower-grid,
    .solution-grid,
    .trusted-panel,
    .landing-cta,
    .landing-footer {
        width: min(100% - 24px, 100%);
    }

    .landing-nav {
        min-height: auto;
        gap: 14px;
        padding: 16px 0;
    }

    .landing-nav nav {
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 6px;
    }

    .landing-nav nav a {
        flex: 0 0 auto;
        padding: 10px 0 8px;
    }

    .landing-actions,
    .landing-actions a,
    .hero-buttons a,
    .landing-cta a {
        width: 100%;
    }

    .landing-hero {
        gap: 20px;
    }

    .mangrove-visual {
        display: none;
    }

    .hero-copy h1 {
        font-size: clamp(32px, 11vw, 42px);
        line-height: 1.08;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .dashboard-preview {
        border-width: 7px;
        border-radius: 18px;
        grid-template-columns: 1fr;
    }

    .dashboard-preview aside {
        display: none;
    }

    .preview-topbar {
        width: 100%;
    }

    .preview-chart {
        gap: 10px;
        padding: 12px;
    }

    .feature-strip article {
        grid-template-columns: 42px 1fr;
        padding: 14px;
    }

    .feature-strip article span {
        width: 42px;
        height: 42px;
    }

    .landing-cta,
    .landing-footer {
        padding: 22px;
    }

    .landing-cta h2 {
        font-size: 24px;
    }

    .solution-photo {
        width: 38%;
    }

    .solution-grid article strong,
    .solution-grid article p,
    .solution-grid article a {
        max-width: 72%;
    }

    .login-story { padding: 34px 18px 22px; }
    .login-story-content { padding: 0; }

    .login-story h1 {
        font-size: clamp(32px, 11vw, 46px);
        line-height: 1.08;
    }

    .login-story-content > p {
        font-size: 16px;
    }

    .login-feature-list article,
    .login-security-note {
        grid-template-columns: 1fr;
    }

    .login-feature-list article > span,
    .login-security-note > span {
        width: fit-content;
        min-width: 72px;
    }

    .login-form-side {
        padding: 20px 12px;
    }

    .login-card {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .login-card h2 {
        font-size: 28px;
    }

    .login-input-wrap,
    .login-input-wrap.has-action {
        grid-template-columns: 32px minmax(0, 1fr);
        min-height: 54px;
    }

    .login-input-wrap.has-action .password-toggle {
        grid-column: 2;
        justify-self: start;
        padding: 0 0 10px;
    }

    .login-input-wrap input {
        font-size: 16px;
    }

    .login-submit,
    .google-button {
        min-height: 54px;
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .admin-topbar {
        margin-inline: 6px;
    }

    .admin-content {
        padding-inline: 10px;
    }

    .panel,
    .form-card,
    .detail-card,
    .settings-card,
    .report-card,
    .analytics-card,
    .stat-card {
        padding: 12px;
    }

    .table-wrap {
        width: calc(100vw - 20px);
    }

    .landing-cta,
    .landing-footer {
        padding: 18px;
    }
}

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

.transect-map-panel {
    position: relative;
    margin-bottom: 14px;
    overflow: hidden;
}

.transect-panel-header {
    gap: 18px;
}

.transect-panel-header p {
    margin: 5px 0 0;
    font-size: 13px;
}

.transect-map-canvas {
    width: 100%;
    height: min(620px, 62vh);
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--mint);
}

.transect-map-empty {
    position: absolute;
    left: 34px;
    bottom: 34px;
    z-index: 450;
    max-width: calc(100% - 68px);
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--soft-shadow);
}

.transect-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.transect-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.legend-line {
    width: 25px;
    height: 4px;
    border-radius: 2px;
    background: var(--primary);
}

.legend-line.manual {
    background: #2472B8;
}

.legend-dot {
    width: 11px;
    height: 11px;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: #F3B61F;
    box-shadow: 0 0 0 1px var(--border);
}

.legend-dot.start {
    background: #2F7D46;
}

.legend-dot.end {
    background: #C53A3A;
}

.transect-endpoint-icon {
    background: transparent;
}

.transect-endpoint-icon span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 3px solid var(--white);
    border-radius: 50%;
    background: var(--marker-color);
    color: var(--white);
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 5px 14px rgba(0, 45, 35, 0.28);
}

.transect-filter-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.transect-table {
    min-width: 1120px;
}

.transect-observation-table,
.transect-point-table {
    min-width: 900px;
}

.transect-species-list {
    display: grid;
    gap: 8px;
}

.transect-species-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #FBFDFB;
}

.transect-species-list em {
    color: var(--deep-teal);
    font-weight: 800;
}

.transect-species-list strong {
    display: grid;
    min-width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--soft-green);
    color: var(--primary-dark);
}

.compact-empty {
    min-height: 110px;
}

.transect-disclaimer {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 4px solid #2472B8;
    background: var(--soft-blue);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

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

    .transect-panel-header {
        align-items: flex-start;
    }

    .transect-map-legend {
        justify-content: flex-start;
    }

    .transect-map-canvas {
        height: 500px;
        min-height: 380px;
    }
}

@media (max-width: 560px) {
    .transect-stats {
        grid-template-columns: 1fr;
    }

    .transect-map-canvas {
        height: 420px;
        min-height: 340px;
    }
}

/* Map semantics and legends: symbols and line patterns supplement color. */
:root {
    --map-gps: #276749;
    --map-manual: #2B6CB0;
    --map-start: #276749;
    --map-end: #B54747;
    --map-observation: #A96612;
    --map-verified: #276749;
    --map-pending: #946200;
    --map-issue: #A6403A;
    --map-neutral: #3E668F;
    --map-community: #247482;
    --map-selected: #5B4AA0;
    --map-outline: #FFFFFF;
}

.observation-status-legend {
    display: flex;
    gap: 8px 14px;
    overflow-x: auto;
    padding: 2px 0 4px;
    color: var(--muted);
    scrollbar-width: thin;
}

.observation-status-legend > span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
}

.map-status-symbol {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 2px solid var(--map-outline);
    border-radius: 50%;
    background: var(--map-neutral);
    color: var(--map-outline);
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(32, 48, 41, 0.25);
}

.map-status-symbol.is-verified,
.observation-marker span.is-verified { background: var(--map-verified); }
.map-status-symbol.is-pending,
.observation-marker span.is-pending { background: var(--map-pending); }
.map-status-symbol.is-issue,
.observation-marker span.is-issue { background: var(--map-issue); }
.map-status-symbol.is-neutral,
.observation-marker span.is-neutral { background: var(--map-neutral); }
.map-status-symbol.is-community,
.observation-marker span.is-community { background: var(--map-community); }

.map-status-symbol.is-selected {
    border: 3px solid var(--map-selected);
    background: var(--white);
    box-shadow: none;
}

.observation-marker span b {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--map-outline);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.observation-marker.is-selected span {
    outline: 4px solid var(--map-selected);
    outline-offset: 2px;
}

.legend-line.gps { background: var(--map-gps); }
.legend-line.manual {
    height: 0;
    border-top: 4px dashed var(--map-manual);
    background: transparent;
}

.legend-dot {
    position: relative;
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--map-outline);
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
}

.legend-dot::after { content: "O"; }
.legend-dot.start { background: var(--map-start); }
.legend-dot.start::after { content: "S"; }
.legend-dot.end { background: var(--map-end); }
.legend-dot.end::after { content: "E"; }
.legend-dot.observation { background: var(--map-observation); }

.transect-observation-icon {
    background: transparent;
}

.transect-observation-icon span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid var(--map-outline);
    border-radius: 50%;
    background: var(--map-observation);
    color: var(--map-outline);
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(32, 48, 41, 0.24);
}

@media (max-width: 560px) {
    .observation-status-legend {
        margin-inline: -2px;
    }
}

/* Semantic actions shared by management pages. */
.secondary-action, .icon-button:not(.danger) {
    color: #245d85;
    background: #edf4fa;
    border-color: #c5d8e6;
}
.neutral-action, .reset-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border: 1px solid #ccd3d0;
    border-radius: 10px;
    background: #f2f4f3;
    color: #46534d;
    font-weight: 800;
    text-decoration: none;
}
.primary-action, .secondary-action, .neutral-action, .small-button, .reset-link, .icon-button {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
}
.action-row .icon-button {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    flex-shrink: 0;
    min-width: max-content;
}
.action-row .inline-delete {
    flex-shrink: 0;
}
.icon-button.danger { color: #a52424; background: #fff0f0; }
.icon-button.action-warning, .icon-button.review-action-button { color: #865400; background: #fff4da; }
.icon-button.action-success { color: #256b38; background: #edf7ef; }
.record-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.record-pagination [aria-disabled="true"] { color: #66716c; background: #f2f4f3; cursor: default; }
.empty-state { text-align: center; padding: 32px 20px; }
.empty-state-icon { display: block; font-size: 32px; margin-bottom: 12px; }
.empty-state p { max-width: 440px; margin: 12px auto 20px; color: var(--muted); }
.table-wrap td { overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible { outline: 3px solid #245d85; outline-offset: 3px; }
.observation-map-panel { padding: 16px; }
.observation-map-layout { min-width: 0; }
.observation-map-shell { min-width: 0; }
.admin-map-floating-top { max-height: 45%; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 640px) {
    .admin-content { padding: 16px; }
    .observation-map-panel { padding: 16px; }
    .observation-map-shell-app, .observation-map-shell-app .observation-map-canvas {
        min-height: 480px;
        height: 75vh;
    }
    .admin-map-floating-top { top: 12px; left: 12px; right: 12px; }
}

.conversation-table { table-layout: fixed; min-width: 900px; }
.conversation-table th:nth-child(3), .conversation-table th:nth-child(4) { width: 24%; }
.observation-details-close { width: 44px; height: 44px; color: #46534d; }
.observation-details-panel h3 { padding-right: 44px; }
.observation-details-floating { max-height: 43%; }
@media (max-width: 640px) {
    .observation-details-floating { left: 64px; }
    .observation-map-empty { left: 64px; max-width: calc(100% - 80px); }
}

/* Keep zoom and empty-state controls clear of multi-line tile attribution. */
.observation-map-shell .leaflet-container .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; }
.observation-map-shell .leaflet-bottom .leaflet-control-zoom { margin-bottom: 60px; }
.observation-map-empty { z-index: 470; bottom: 60px; }
.observation-details-floating { bottom: 60px; }
.observation-status-legend { flex-wrap: wrap; }
@media (max-width: 640px) {
    .observation-details-floating { max-height: 35%; }
    .observation-status-legend { flex-wrap: wrap; overflow: visible; }
}

/* Keep admin content usable at narrow widths and increased browser zoom. */
.admin-topbar { flex-wrap: wrap; }
.admin-topbar .search-box { min-width: 0; flex: 1 1 220px; }
.admin-topbar .topbar-actions { min-width: 0; flex-wrap: wrap; }
.admin-content .form-actions { flex-wrap: wrap; }
.admin-content .form-actions > *, .admin-content .action-row > * {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}
.admin-content .system-info-row { gap: 12px; flex-wrap: wrap; }
.admin-content .system-info-row strong { min-width: 0; overflow-wrap: anywhere; }
.admin-sidebar h1, .admin-content h2, .admin-content h3 { overflow-wrap: anywhere; }
.admin-content .table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.admin-settings { align-items: start; }
.admin-settings .form-card { height: 100%; }
.admin-settings .form-group { align-content: start; }
.settings-password-control { display: flex; align-items: stretch; min-width: 0; }
.settings-password-control input { min-width: 0; flex: 1 1 0; border-radius: 12px 0 0 12px; }
.settings-password-control button {
    flex: 0 0 auto; border: 1px solid var(--control-border); border-left: 0;
    border-radius: 0 12px 12px 0; padding: 8px 10px;
    background: var(--primary-soft); color: var(--primary-dark); cursor: pointer;
}
.settings-password-control button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (min-width: 1101px) and (max-width: 1350px) {
    .admin-settings .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .admin-content input, .admin-content select, .admin-content textarea { font-size: 16px; }
    .admin-content button, .admin-content .primary-action, .admin-content .secondary-action { min-height: 44px; }
    .admin-sidebar { height: 100dvh; overflow-y: auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .admin-topbar .topbar-actions { max-width: 100%; }
    .admin-settings .form-actions { margin-top: 20px; }
}
@media (max-width: 380px) {
    .admin-content { padding: 12px; }
    .admin-settings .form-card { padding: 14px; }
    .admin-topbar .profile-chip { max-width: 160px; }
}
/* Six-panel administration workspace. */
.settings-heading { justify-content: flex-start; align-items: center; gap: 18px; }
.settings-icon { flex: 0 0 42px; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: #07553e; }
.settings-icon svg { width: 34px; height: 34px; }
.settings-heading > .settings-icon { width: 52px; height: 52px; flex-basis: 52px; background: #e1eee7; border-radius: 14px; }
.settings-workspace { gap: 18px; align-items: stretch; }
.settings-workspace .form-card { display: flex; flex-direction: column; height: auto; margin: 0; padding: 22px; border: 1px solid #d6e3dd; border-radius: 14px; box-shadow: 0 5px 18px rgba(18, 61, 44, .035); }
.settings-card-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.settings-card-heading > div { min-width: 0; }
.settings-workspace .settings-card-heading h3 { margin: 0 0 5px; font-size: 18px; line-height: 1.35; }
.settings-workspace .settings-card-heading p { margin: 0; font-size: 13px; line-height: 1.5; color: #5b6c65; }
.settings-workspace .form-grid { gap: 16px; margin: 0; }
.settings-workspace .form-group { gap: 7px; font-size: 13px; }
.settings-workspace input, .settings-workspace select { min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.settings-workspace small { color: #68776f; font-size: 12px; font-weight: 400; }
.settings-workspace .form-actions { margin-top: auto; padding-top: 20px; border: 0; gap: 10px; }
.settings-workspace .primary-action, .settings-workspace .secondary-action { min-height: 44px; padding: 10px 16px; font-size: 14px; border-radius: 7px; }
.settings-workspace .primary-action { background: #0b6549; }
.settings-workspace .primary-action:hover { background: #084e39; }
.settings-fixed-value { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border: 1px solid #d8e1dc; border-radius: 8px; background: #f7faf8; font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.settings-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.settings-facts dt { font-size: 12px; font-weight: 600; color: #63736a; margin-bottom: 5px; }
.settings-facts dd { margin: 0; font-size: 14px; font-weight: 600; }
.settings-workspace .settings-note { margin: 16px 0 0; font-size: 12px; line-height: 1.6; color: #62746a; }
.settings-feature-list, .settings-export-fields { list-style: none; margin: 0; padding: 0; }
.settings-feature-list { display: grid; gap: 14px; }
.settings-feature-list li, .settings-export-fields li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.settings-check { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 4px; background: #e0eee7; color: #086047; font-size: 12px; font-weight: 700; }
.settings-unit { margin-left: auto; color: #697b71; font-size: 12px; }
.settings-inline-value { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 13px; }
.settings-field-label { margin: 14px 0 10px; font-size: 13px; }
.settings-export-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin-bottom: 16px; }
.settings-export-fields li { font-size: 13px; }
.settings-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 22px; font-size: 13px; }
.settings-footer-links a { color: #0b6549; text-decoration: underline; text-underline-offset: 3px; }
.settings-footer-links span { margin-left: auto; color: #62746a; }
.settings-workspace :is(input, select, button, a):focus-visible, .settings-footer-links a:focus-visible { outline: 3px solid #80b99b; outline-offset: 3px; }
@media (min-width: 1101px) and (max-width: 1350px) {
    .settings-workspace .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .settings-heading { gap: 10px; }
    .settings-workspace .form-card { padding: 18px; }
    .settings-card-heading { gap: 10px; }
    .settings-facts, .settings-workspace .form-grid { grid-template-columns: minmax(0, 1fr); }
    .settings-workspace input, .settings-workspace select { font-size: 16px; }
    .settings-inline-value { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .settings-footer-links span { margin-left: 0; width: 100%; }
}
@media (max-width: 380px) {
    .settings-export-fields { grid-template-columns: minmax(0, 1fr); }
}
/* Reference sidebar: evergreen navigation and mangrove conservation card. */
.admin-sidebar { padding: 22px 10px 16px; gap: 26px; border-radius: 0; background: radial-gradient(ellipse at 0 0, #105d46 0, transparent 45%), linear-gradient(165deg, #043b2e, #023a2c 55%, #063e31); scrollbar-width: thin; scrollbar-color: #528372 transparent; }
.admin-sidebar .brand-block { padding: 0 10px 9px; gap: 12px; }
.admin-sidebar .brand-block > div:last-child { min-width: 0; }
.admin-sidebar .brand-mark { flex: 0 0 48px; width: 48px; height: 48px; background: transparent; }
.admin-sidebar .brand-block h1 { font-size: 19px; letter-spacing: .3px; line-height: 1.25; }
.admin-sidebar .brand-block p { font-size: 9px; color: #e4f1e9; line-height: 1.5; margin-top: 6px; }
.admin-sidebar .sidebar-nav { gap: 5px; }
.admin-sidebar .sidebar-nav > a, .admin-sidebar .sidebar-group summary { display: flex; align-items: center; justify-content: flex-start; gap: 14px; min-height: 48px; padding: 12px 14px; color: #eff8f3; font-size: 14px; font-weight: 600; border-radius: 10px; }
.sidebar-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.sidebar-group-label { flex: 1; min-width: 0; }
.admin-sidebar .sidebar-chevron { margin-left: auto; margin-right: 4px; }
.admin-sidebar .sidebar-nav a.active { background: #ffffff29; box-shadow: inset 4px 0 0 #a0d977; }
.admin-sidebar .sidebar-group-links { margin-left: 26px; padding-left: 12px; }
.admin-sidebar .sidebar-group-links a { padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.admin-sidebar .sidebar-mangrove-card { flex: 0 0 auto; min-height: 250px; margin: auto 6px 0; padding: 28px 22px 62px; border: 1px solid #ffffff20; border-radius: 15px; background: #165841; isolation: isolate; }
.sidebar-mangrove-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 83% center; z-index: -2; }
.sidebar-mangrove-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, #022f2dde, #01332e55), linear-gradient(0deg, #003c2c80, transparent); }
.sidebar-mangrove-card strong { color: #fff; font-size: 18px; font-weight: 700; line-height: 1.45; }
.sidebar-card-leaf { position: absolute; right: 25px; bottom: 27px; }
@media (max-width: 820px) {
    .admin-sidebar { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
    .admin-sidebar .sidebar-mangrove-card { min-height: 210px; }
}
