@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --mikis-brand: #006EA4;
    --mikis-brand-strong: #003667;
    --mikis-brand-mid: #014376;
    --mikis-accent: #00A7DE;
    --mikis-muted: #5f6b83;
    --mikis-surface: #f2f6fb;
    --mikis-brand-gradient: linear-gradient(135deg, #003667 0%, #006EA4 100%);
}

body {
    font-family: 'Inter', 'Manrope', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--mikis-surface);
    color: #0f172a;
    min-height: 100vh;
    word-break: normal;
    overflow-wrap: normal;
}

.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: radial-gradient(circle at 30% 20%, #0D1F3C, #001024 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: opacity 0.6s ease;
    animation: splash-bg 2s ease-in-out infinite alternate;
}

.splash-screen.is-hiding {
    opacity: 0;
    pointer-events: none;
}

.splash-screen__inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.splash-screen__logo {
    height: 82px;
    width: auto;
    filter: drop-shadow(0 18px 40px rgba(3, 10, 30, 0.65));
    animation: splash-logo 1.2s ease-in-out forwards;
}

.splash-screen__tagline {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.85;
}

.splash-screen__spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: splash-spin 1s linear infinite;
}

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

@keyframes splash-logo {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    55% {
        transform: scale(5.25);
        opacity: 1;
    }
    100% {
        transform: scale(15);
        opacity: 1;
    }
}

@keyframes splash-bg {
    0% {
        background: radial-gradient(circle at 10% 90%, #0D1F3C, #001024 65%);
    }
    50% {
        background: radial-gradient(circle at 50% 50%, #013166, #000a1c 70%);
    }
    100% {
        background: radial-gradient(circle at 90% 10%, #014376, #010F39 65%);
    }
}

.card,
.alert,
.swal2-popup {
    overflow-wrap: break-word;
    word-break: break-word;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    line-height: 1.35;
    flex-wrap: nowrap;
    white-space: normal;
    min-width: 0;
}

.btn .icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.btn .btn-label {
    display: inline-flex;
    white-space: normal;
    text-align: center;
}

.btn-primary,
.btn-primary:focus {
    background-image: var(--mikis-brand-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 54, 103, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-outline-primary {
    color: var(--mikis-brand-strong);
    border: 1px solid rgba(0, 110, 164, 0.5);
}

.btn-outline-primary:hover {
    color: #fff;
    background-image: var(--mikis-brand-gradient);
    border-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.35;
    white-space: normal;
    min-width: 0;
}

.btn .icon {
    flex-shrink: 0;
}

.btn .btn-label {
    display: inline-flex;
    text-align: center;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--mikis-brand) !important;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--mikis-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar .nav-link .icon {
    width: 18px;
    height: 18px;
}

.navbar .nav-link.active {
    color: var(--mikis-brand) !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stats-card {
    border-radius: 1rem;
    border: 1px solid rgba(15, 118, 110, 0.12);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--mikis-brand-strong);
}

.stats-card .stats-label {
    font-size: 0.95rem;
    color: var(--mikis-muted);
}

.card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.badge-soft {
    background: #eef2ff;
    color: #1e3a8a;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-image: linear-gradient(120deg, rgba(0, 54, 103, 0.95), rgba(0, 110, 164, 0.92));
    border-radius: 1rem;
    padding: 0.85rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 45px rgba(0, 27, 68, 0.25);
    color: #fff;
}

.app-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.08em;
}

.app-topbar__logo {
    height: 34px;
    width: auto;
    filter: drop-shadow(0 10px 18px rgba(0, 10, 30, 0.4));
}

.auth-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 14px 30px rgba(0, 10, 30, 0.4));
}

.app-topbar__nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.app-topbar__nav-link {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.app-topbar__nav-link:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-topbar__nav-link.is-active {
    border-color: transparent;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.app-topbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-topbar .btn-outline-primary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.app-topbar .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: transparent;
}

.app-topbar__user {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.section-tabs__panels {
    margin-top: 2rem;
}

.section-tabs__panel {
    display: block;
    animation: panel-fade 160ms ease-out;
}

.section-tabs__panel + .section-tabs__panel {
    margin-top: 1.5rem;
}

.section-tabs__panel[hidden] {
    display: none !important;
}

@keyframes panel-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#map {
    height: 100vh;
    width: 100%;
}

.table {
    width: 100%;
    font-size: 0.95rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    font-size: 0.95rem;
    vertical-align: middle;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.table .badge,
.table .btn {
    white-space: normal;
    line-height: 1.35;
}

.mission-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mission-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.mission-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.mission-card__badges {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.mission-card__reservation {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.mission-card__reservation .icon {
    width: 0.9rem;
    height: 0.9rem;
}

.mission-card__reservation--pilot {
    background: rgba(13, 110, 253, 0.08);
    color: #0b5ed7;
}

.mission-card__reservation--admin {
    background: rgba(25, 135, 84, 0.10);
    color: #146c43;
}

.mission-card__id {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    flex: 0 0 auto;
}

.mission-card__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mission-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
}

.mission-card__meta span {
    display: block;
}

.mission-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mission-card__note {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.35;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.mission-card__note .icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin-top: 0.05rem;
}

.mission-card__note--info {
    background: rgba(13, 110, 253, 0.06);
    color: #1e293b;
}

.mission-card__note--warning {
    background: rgba(255, 193, 7, 0.12);
    color: #1e293b;
}

.mission-upload-progress .btn {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    white-space: nowrap;
    min-width: 88px;
}

.mission-upload-progress .spinner-border {
    flex: 0 0 auto;
}

.mission-upload-progress .text-truncate {
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
}

.mission-upload-progress .progress {
    display: none;
}

.mission-upload-file-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.mission-upload-file-name {
    background: #fff;
}

.table thead th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.mission-action-stack,
.mission-action-stack form {
    width: 100%;
}

.mission-action-stack .btn {
    white-space: normal;
    line-height: 1.35;
}

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

.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #001024 0%, #003667 45%, #014376 100%);
    color: #fff;
    padding: 1.5rem;
    border-right: none;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 15px 0 40px rgba(0, 16, 36, 0.35);
}

.app-sidebar__brand {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #fff;
}

.text-muted-50 {
    color: rgba(255, 255, 255, 0.5);
}

.tiny {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}

.app-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.app-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
}

.app-sidebar__link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.app-sidebar__link.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.app-sidebar__link .icon {
    width: 18px;
    height: 18px;
}

.app-sidebar__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

.app-main {
    flex: 1;
    background: var(--mikis-surface);
    padding: 2rem;
    overflow-y: auto;
}

.app-main.app-main--map {
    padding: 0;
}

.map-viewport {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.map-panel {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    color: #0f172a;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
    width: min(320px, calc(100% - 2.5rem));
    max-width: calc(100% - 2.5rem);
    z-index: 1010;
}

@media (max-width: 767.98px) {
    .map-panel {
        position: static;
        width: 100%;
        margin-bottom: 1rem;
    }
}

.map-panel--status {
    top: 1.5rem;
    left: 1.5rem;
    max-width: 300px;
}

.map-panel--photo,
.map-panel.map-panel--photo {
    top: 5.6rem;
    left: 1.5rem;
    width: 300px;
    max-width: calc(100% - 2.5rem);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.map-panel__heading {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(15, 23, 42, 0.6);
    margin: 0 0 0.25rem 0;
}

.map-panel__subtitle {
    font-size: 0.84rem;
    color: rgba(15, 23, 42, 0.65);
    margin: 0;
    line-height: 1.35;
}

.map-photo__frame {
    position: relative;
    width: 100%;
    min-height: 170px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 0 0 0 transparent !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.map-photo__img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 0.6rem;
    display: block;
    cursor: zoom-in;
}

.map-photo__empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: none;
    color: rgba(15, 23, 42, 0.6);
}

.map-photo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1500;
    cursor: zoom-out;
}

.map-photo-overlay[hidden] {
    display: none;
}

.map-photo-overlay__content {
    position: relative;
    background: #fff;
    border-radius: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    max-width: min(94vw, 1400px);
    max-height: min(94vh, 1100px);
    width: auto;
    height: auto;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.map-photo-overlay__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.7rem;
    display: block;
}

.map-photo-overlay__close {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: #fff;
    color: #0f172a;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.map-photo-overlay__close:hover {
    background: #0f172a;
    color: #fff;
}

.map-panel--modes {
    top: 1.5rem;
    right: 1.5rem;
    gap: 0.5rem;
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: auto;
    max-width: none;
}

.map-panel--stats {
    top: 7.5rem;
    right: 1.5rem;
    width: 280px;
    max-width: calc(100% - 2.5rem);
}

.map-panel--layers {
    top: 4.8rem;
    bottom: auto;
    right: 1.5rem;
    width: 240px;
    max-width: calc(100% - 2.5rem);
}

.map-panel--zoom {
    right: 1.5rem;
    bottom: 1.5rem;
    width: auto;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
}

.map-zoom-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.map-zoom-btn:hover {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.map-control__section + .map-control__section {
    margin-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 1rem;
}

.map-control__title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.6);
}

.map-control__segment {
    display: flex;
    gap: 0.5rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.03);
    padding: 0.35rem;
}

.map-control__segment .map-layer-option {
    flex: 1;
}

.map-control__overlay-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-layer-option {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.6rem;
    color: #0f172a;
    padding: 0.4rem 0.75rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 calc(50% - 0.5rem);
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.map-layer-option.is-active {
    border-color: #4338ca;
    background: rgba(67, 56, 202, 0.08);
    color: #312e81;
}

.map-layers-overlays {
    border-top: 1px solid rgba(226, 232, 240, 0.15);
    padding-top: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
}

.map-overlay-btn {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.6rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    width: 100%;
    font-size: 0.85rem;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
    white-space: normal;
    text-align: left;
    flex-wrap: nowrap;
}

.map-overlay-btn.is-active {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    color: #064e3b;
}

.map-panel--feed {
    right: 1.5rem;
    bottom: 1.5rem;
    width: 280px;
    max-width: calc(100% - 2.5rem);
    max-height: 45vh;
    overflow-y: auto;
}

.map-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px !important;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(1, 15, 57, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
}

.map-mode-btn.is-active {
    border-color: transparent;
    background-image: var(--mikis-brand-gradient);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 54, 103, 0.25);
}

.map-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.map-stat {
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.map-stat-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.8);
}

.map-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.map-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 36vh;
    overflow-y: auto;
}

.map-feed-item {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.65rem;
    padding: 0.75rem;
    color: #0f172a;
    transition: background 120ms ease, border-color 120ms ease;
    word-break: break-word;
    text-align: left;
}

.map-feed-item:hover {
    border-color: rgba(0, 110, 164, 0.45);
    box-shadow: 0 8px 18px rgba(0, 54, 103, 0.15);
}

.map-status {
    font-size: 0.9rem;
    color: var(--mikis-brand-strong);
}

.map-panel--legend {
    left: 1.5rem;
    bottom: 1.5rem;
    width: 240px;
    background: rgba(4, 7, 28, 0.92);
    color: rgba(255, 255, 255, 0.88);
}

.legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.78);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-swatch {
    position: relative;
    display: inline-flex;
    width: 28px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid transparent;
    background: rgba(15, 23, 42, 0.08);
}

.legend-swatch.line-primary {
    border-color: #0f766e;
    background: transparent;
    height: 2px;
}

.legend-swatch.road-good,
.legend-swatch.road-fair,
.legend-swatch.road-poor,
.legend-swatch.road-bad {
    height: 6px;
    border-radius: 6px;
}

.legend-swatch.road-good {
    background: #2ecc71;
    border-color: #2ecc71;
}

.legend-swatch.road-fair {
    background: #f1c40f;
    border-color: #f1c40f;
}

.legend-swatch.road-poor {
    background: #e67e22;
    border-color: #e67e22;
}

.legend-swatch.road-bad {
    background: #e74c3c;
    border-color: #e74c3c;
}

.legend-swatch.dot {
    width: 8px;
    height: 8px;
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.legend-swatch.catalog {
    width: 8px;
    height: 8px;
    background: #f97316;
    border-color: #f97316;
}

.legend-swatch.fill-warning {
    background: rgba(59, 125, 140, 0.2);
    border-color: #3b7d8c;
}

.legend-swatch.mission-area {
    height: 10px;
    border: 2px dashed #fb923c;
    background: rgba(251, 146, 60, 0.12);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.legend-swatch.fire-count-low {
    height: 6px;
    background: #22c55e;
    border-color: #22c55e;
}

.legend-swatch.fire-count-medium {
    height: 6px;
    background: #f59e0b;
    border-color: #f59e0b;
}

.legend-swatch.fire-count-high {
    height: 6px;
    background: #ef4444;
    border-color: #ef4444;
}

.legend-swatch.ndvi-gradient {
    height: 10px;
    background: linear-gradient(90deg, #1a9641 0%, #a6d96a 25%, #ffffc0 50%, #fdaf61 75%, #d7191c 100%);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.legend-swatch.ndvi-square {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border-width: 1px;
}

.legend-swatch.ndvi-1 { background: rgb(26, 150, 65); border-color: rgb(26, 150, 65); }
.legend-swatch.ndvi-2 { background: rgb(166, 217, 106); border-color: rgb(166, 217, 106); }
.legend-swatch.ndvi-3 { background: rgb(255, 255, 192); border-color: rgb(200, 200, 150); }
.legend-swatch.ndvi-4 { background: rgb(253, 174, 97); border-color: rgb(253, 174, 97); }
.legend-swatch.ndvi-5 { background: rgb(215, 25, 28); border-color: rgb(215, 25, 28); }

.legend-swatch.fire-mission {
    height: 10px;
    border: 2px dashed #fb923c;
    background: rgba(249, 115, 22, 0.16);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.legend-swatch.risk-low {
    background: linear-gradient(90deg, #0f9d58 0%, #34d399 100%);
    border-color: transparent;
}

.legend-swatch.risk-medium {
    background: linear-gradient(90deg, #f4c430 0%, #fbbf24 100%);
    border-color: transparent;
}

.legend-swatch.risk-high {
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
    border-color: transparent;
}

.legend-swatch.risk-extreme {
    background: linear-gradient(90deg, #ef4444 0%, #b91c1c 100%);
    border-color: transparent;
}

[data-sensitivity-loading][hidden],
[data-ndvi-loading][hidden] {
    display: none !important;
}

[data-sensitivity-hint],
[data-ndvi-hint] {
    min-height: 18px;
}

[data-sensitivity-hint][hidden],
[data-ndvi-hint][hidden] {
    display: none !important;
}

.legend-caption {
    margin-top: 0.65rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

.table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-toolbar .form-select {
    min-width: 180px;
}

.input-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.input-icon-addon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mikis-muted);
    display: inline-flex;
    pointer-events: none;
}

.input-icon .form-select {
    padding-left: 2.2rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    padding-inline: 1.1rem;
    white-space: nowrap;
}

.btn-icon .icon {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.45rem;
}

.btn-icon .btn-label {
    display: inline-block;
    flex: 0 1 auto;
}

.table-action-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 0.85rem;
    text-align: center;
}

.card-table {
    padding: 0;
}

.card-table .card-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    margin-bottom: 0;
}

.card-body--flush {
    padding: 0;
}

.card-table .table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.card-table .table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(15, 23, 42, 0.55);
    background-color: rgba(241, 245, 249, 0.6);
    border-color: rgba(15, 23, 42, 0.05);
}

.card-table .table tbody td {
    vertical-align: middle;
    border-color: rgba(15, 23, 42, 0.04);
}

.card-table__empty {
    padding: 2rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .map-panel--stats,
    .map-panel--feed {
        display: none;
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 150ms ease;
}

.sidebar-toggle {
    width: 100%;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .app-shell {
        position: relative;
    }

    .app-sidebar {
        position: fixed;
        z-index: 999;
        height: 100vh;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform 200ms ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .app-main {
        padding: 1.25rem;
    }

    .map-panel--layers {
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 6rem;
    }

    .map-panel--layers .btn-group .btn {
        flex-basis: 100%;
    }
}

.turbo-frame-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    color: var(--mikis-muted);
    font-size: 0.95rem;
}

.swal2-container .swal2-title {
    font-family: inherit;
}
.app-sidebar__brand img {
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.45));
}
.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 1rem;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(220, 233, 255, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 25px 55px rgba(0, 10, 40, 0.45);
    backdrop-filter: blur(10px);
}

.logo-badge--light {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.92));
    border-color: rgba(0, 110, 164, 0.25);
    box-shadow: 0 18px 35px rgba(0, 54, 103, 0.3);
}

.section-anchor {
    scroll-margin-top: 140px;
}

.notification-center {
    gap: 0.5rem;
}

.notification-center__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.75rem;
}

.notification-center__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.35);
    background: rgba(15, 118, 110, 0.06);
    color: inherit;
    text-align: left;
}

.alert-chip:hover {
    background: rgba(15, 118, 110, 0.12);
}

.notification-popup__section ul {
    padding-left: 0;
    margin-bottom: 0;
}

.notification-popup__item + .notification-popup__item {
    margin-top: 0.5rem;
}

.notification-bell {
    background: transparent;
    border: none;
    padding: 6px;
    line-height: 1;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover,
.notification-bell:focus-visible {
    color: var(--tblr-primary);
    outline: none;
}

.notification-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-message-row {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--tblr-border-color, #e5e7eb);
}

.notification-dropdown {
    min-width: 260px;
    padding: 0;
    overflow: hidden;
}

.notification-dropdown__header {
    font-weight: 600;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--tblr-border-color, #e5e7eb);
}

.notification-dropdown__list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--tblr-border-color, #e5e7eb);
}

.notification-dropdown__badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
}

.notification-dropdown__title {
    font-weight: 600;
}

.notification-dropdown__meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.notification-dropdown__empty {
    padding: 0.9rem;
    text-align: center;
}

.notification-dropdown__footer {
    border-top: 1px solid var(--tblr-border-color, #e5e7eb);
}

.notification-dropdown__footer .dropdown-item {
    text-align: center;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    font-size: 1.25rem;
    color: #6b7280;
    overflow: hidden;
}

.profile-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
