/*:root {
    --blanco: #ffffff;
    --oscuro: #1f2937;
    --primario: #3b82f6;
    --primario-oscuro: #2563eb;
    --secundario: #0f3c68;
    --gris: #6b7280;
    --grisClaro: #e5eef7;
    --chip: #eef2ff;
}*/

/* ===== Reset ===== */
/**,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Krub', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background-image: linear-gradient(to top, var(--grisClaro) 0%, var(--blanco) 100%);
    color: var(--oscuro);
}*/

/* ===== Header (definido en _Layout) ===== */
/*.header {
    background: var(--secundario);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.header__inner {
    max-width: 150rem;
    margin: 0 auto;
    padding: .6rem 1.2rem;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr auto;
    gap: .8rem;
}

.header__title {
    font-size: clamp(1.6rem, 2vw, 2rem);
    margin: 0;
    font-weight: 700;
    letter-spacing: .2px;
}

.header__actions {
    display: inline-flex;
    gap: .4rem;
    justify-self: end;
}*/

/* ===== Botones / inputs básicos ===== */
/*.btn {
    border: 0;
    border-radius: .8rem;
    padding: .5rem .9rem;
    cursor: pointer;
    font-weight: 700;
    transition: transform .06s ease, box-shadow .2s ease, background .2s;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn--primary {
    background: var(--primario);
    color: #fff;
}

    .btn--primary:hover {
        background: var(--primario-oscuro);
    }

.btn--ghost {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}

    .btn--ghost:hover {
        background: rgba(255,255,255,.18);
    }

.search__input {
    border-radius: .6rem;
    border: 1px solid rgba(0,0,0,.15);
    padding: .5rem .6rem;
    min-width: 180px;
    font: inherit;
}

.search__input,
.filters .search__input {
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .search__input:hover,
    .filters .search__input:hover {
        background-color: #f3f4f6;
        border-color: rgba(0,0,0,.2);
    }

    .search__input:focus,
    .filters .search__input:focus {
        outline: none;
        border-color: var(--primario);
        box-shadow: 0 0 0 3px rgb(59 130 246 / 20%);
        background-color: #fff;
    }*/

/* ===== Loader ===== */
/*.loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 1rem;
    background: rgba(255,255,255,.9);
    z-index: 9999;
    font-size: 1.6rem;
}

.spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,.1);
    border-top-color: var(--primario);
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader--hidden {
    opacity: 0;
    transition: opacity .35s ease;
}*/

/* ===== Dashboard ===== */
/*.dashboard {
    display: flex;
    gap: .8rem;
    align-items: end;
    flex-wrap: wrap;
    padding: 1rem;
}

.stat {
    background: var(--blanco);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: .8rem;
    padding: .8rem 1rem;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat__label {
    color: var(--gris);
    font-size: .95rem;
}

.stat__value {
    font-weight: 800;
    font-size: 1.6rem;
}*/

/* Filtros junto al contador */
/*.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: .6rem;
    align-items: end;
    margin-left: auto;
}

@media (min-width: 680px) {
    .filters {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    }
}

.filters__field {
    display: grid;
    gap: .25rem;
}

    .filters__field > span {
        font-size: .85rem;
        color: var(--gris);
        font-weight: 700;
    }

.filters__buttons {
    display: inline-flex;
    gap: .4rem;
}*/

/* ===== Grid principal ===== */
/*.grid-desktop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.map-wrapper, .side-panel {
    min-width: 0;
}

@media (min-width: 768px) {
    .grid-desktop {
        grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
        align-items: start;
    }

    .side-panel {
        position: sticky;
        top: 0.8rem;
        max-height: calc(100vh - 3rem);
        overflow: auto;
    }
}*/

/* ===== Mapa ===== */
/*.map-wrapper {
    position: relative;
}

#map {
    width: 100%;
    height: clamp(360px, 60vh, 70vh);
    min-height: 360px;
    border-radius: 1rem;
}

.leaflet-container {
    font: inherit;
}

.leaflet-control-zoom a {
    border-radius: .6rem !important;
}

.leaflet-popup-content-wrapper {
    border-radius: .8rem;
}

.leaflet-popup-content {
    margin: .6rem .8rem;
}*/

/* Toolbar sobre el mapa */
/*.map-toolbar {
    position: absolute;
    left: .6rem;
    top: .6rem;
    display: flex;
    gap: .4rem;
    z-index: 500;
}

    .map-toolbar .btn {
        padding: .35rem .6rem;
        font-weight: 600;
        background: rgba(255,255,255,.85);
        color: #111;
        border: 1px solid rgba(0,0,0,.12);
        backdrop-filter: blur(4px);
    }*/

/* ===== Panel info ===== */
/*.info-buque-block {
    margin-top: 1rem;
    background: var(--blanco);
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    padding: 1rem;
}

#info-buque-desktop[aria-hidden="true"] {
    display: none;
}

#info-buque-desktop[aria-hidden="false"] {
    display: block;
}*/

/* Panel móvil debajo del mapa */
/*#info-buque-mobile {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    margin: .6rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    padding-bottom: .25rem;
    position: relative;
    z-index: 1;
    scroll-margin-bottom: 120px;
}

    #info-buque-mobile.mostrar {
        display: block;
        opacity: 1;
        transform: none;
    }

    #info-buque-mobile .info-header {
        position: sticky;
        top: 0;
        background: inherit;
        z-index: 2;
        padding-bottom: .25rem;
        margin-bottom: .35rem;
        border-bottom: 1px solid rgba(0,0,0,.06);
    }

@media (max-width: 768px) {
    #info-buque-desktop {
        display: none !important;
    }
}*/

/* Card del seleccionado */
/*.card-buque {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 1rem 1.2rem;
    margin: .5rem 0;
    font-size: .95rem;
    line-height: 1.4;
}

    .card-buque h4 {
        margin: 0 0 .8rem;
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f3c68;
    }

    .card-buque .label {
        font-weight: 700;
        color: #374151;
    }

    .card-buque .value {
        color: #111827;
    }*/

/* Placeholder del panel derecho */
/*.empty-state {
    display: grid;
    gap: .35rem;
    place-items: start;
    border: 1px dashed rgba(0,0,0,.18);
    border-radius: 12px;
    padding: .9rem 1rem;
    background: #fafafa;
}

.empty-state__icon {
    font-size: 1.2rem;
}

.empty-state__title {
    font-weight: 800;
    color: #0f3c68;
}

.empty-state__desc {
    color: #6b7280;
    font-size: .95rem;
}*/

/* ===== Footer ===== */
/*.footer {
    text-align: center;
    color: var(--gris);
    padding: .8rem 1rem 1.4rem;
    font-size: .9rem;
}*/

/* ===== Animaciones y toasts ===== */
/*.fade-in {
    animation: fadeIn .45s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.toast {
    min-width: 220px;
    max-width: 320px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    color: #fff;
    background: rgba(0,0,0,.85);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease;
}

    .toast.mostrar {
        opacity: 1;
        transform: translateY(0);
    }

    .toast.error {
        background-color: #d9534f;
    }

    .toast.info {
        background-color: #0275d8;
    }

    .toast.success {
        background-color: #5cb85c;
    }*/

/* ===== Clusters estilo pro ===== */
/*.marker-cluster.mc-one.mc-pro {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
    border: 1.5px solid rgba(0,0,0,.06);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .marker-cluster.mc-one.mc-pro .mc-count {
        font-weight: 800;
        color: #111827;
        font-size: 14px;
        letter-spacing: .2px;
        font-variant-numeric: tabular-nums;
    }

    .marker-cluster.mc-one.mc-pro.mc-small .mc-count {
        font-size: 12px;
    }

    .marker-cluster.mc-one.mc-pro.mc-medium .mc-count {
        font-size: 13px;
    }

    .marker-cluster.mc-one.mc-pro.mc-large .mc-count {
        font-size: 14px;
    }

    .marker-cluster.mc-one.mc-pro.mc-green {
        background: radial-gradient(100% 100% at 30% 30%, rgba(180, 237, 180, 0.98) 0%, rgba(128, 211, 128, 0.96) 100%);
    }

    .marker-cluster.mc-one.mc-pro.mc-yellow {
        background: radial-gradient(100% 100% at 30% 30%, rgba(255, 239, 170, 0.98) 0%, rgba(245, 199, 84, 0.96) 100%);
    }

    .marker-cluster.mc-one.mc-pro.mc-orange {
        background: radial-gradient(100% 100% at 30% 30%, rgba(252, 208, 175, 0.98) 0%, rgba(236, 140, 86, 0.96) 100%);
    }

.marker-cluster--selected {
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .35), 0 4px 12px rgba(0,0,0,.16) !important;
}

.mc-ship-lg {
    position: absolute;
    right: -8px;
    top: -8px;
    width: 24px;
    height: 24px;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.18));
}*/

/* ===== Tema oscuro base ===== */
/*:root.dark {
    --blanco: #0f172a;
    --oscuro: #e5e7eb;
    --secundario: #0b3a66;
    --gris: #9aa3af;
    --grisClaro: #0b1220;
    --chip: #1e293b;
    --primario: #60a5fa;
    --primario-oscuro: #3b82f6;
}

    :root.dark body {
        background-image: none;
        background: #0b1220;
    }*/

    /* ===== Dark: legibilidad en cards, inputs, popups, stat ===== */
    /*:root.dark .info-buque-block {
        background: #111827;
        border: 1px solid rgba(255,255,255,.08);
    }

    :root.dark .info-header h3 {
        color: #e5e7eb;
    }

    :root.dark .btn-cerrar {
        color: #e5e7eb;
    }

    :root.dark .card-buque {
        background: #111827;
        border: 1px solid rgba(255,255,255,.08);
        color: #e5e7eb;
    }

        :root.dark .card-buque h4 {
            color: #93c5fd;
        }

        :root.dark .card-buque .label {
            color: #cbd5e1;
        }

        :root.dark .card-buque .value {
            color: #f9fafb;
        }

    :root.dark #info-buque-mobile .info-header {
        background: #111827;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }

    :root.dark .stat {
        background: #0f172a;
        border: 1px solid rgba(255,255,255,.08);
        color: #e5e7eb;
    }

    :root.dark .stat__label {
        color: #9aa3af;
    }

    :root.dark .stat__value {
        color: #f9fafb;
    }

    :root.dark .filters__field > span {
        color: #9aa3af;
    }

    :root.dark .search__input,
    :root.dark .filters .search__input {
        background: #0b1220;
        color: #e5e7eb;
        border: 1px solid rgba(255,255,255,.18);
    }

        :root.dark .search__input::placeholder {
            color: #9aa3af;
        }

        :root.dark .search__input:hover,
        :root.dark .filters .search__input:hover {
            background: #0f172a;
            border-color: rgba(255,255,255,.28);
        }

        :root.dark .search__input:focus,
        :root.dark .filters .search__input:focus {
            border-color: #60a5fa;
            box-shadow: 0 0 0 3px rgba(96,165,250,.25);
            background: #0f172a;
        }

    :root.dark .leaflet-popup-content-wrapper {
        background: #111827;
        color: #e5e7eb;
        border: 1px solid rgba(255,255,255,.08);
    }

    :root.dark .leaflet-popup-tip {
        background: #111827;
    }

    :root.dark .toast.info {
        background-color: #2563eb;
    }

    :root.dark .toast.success {
        background-color: #16a34a;
    }

    :root.dark .toast.error {
        background-color: #dc2626;
    }*/
/* === Ghost buttons sobre superficies CLARAS (dashboard, panel info, card móvil) === */
/*.dashboard .btn--ghost,
.filters .btn--ghost,
.info-buque-block .btn--ghost,
#info-buque-mobile .btn--ghost {
    background: rgba(0,0,0,.04);
    color: #111;*/ /* texto oscuro visible */
    /*border: 1px solid rgba(0,0,0,.12);
}

    .dashboard .btn--ghost:hover,
    .filters .btn--ghost:hover,
    .info-buque-block .btn--ghost:hover,
    #info-buque-mobile .btn--ghost:hover {
        background: rgba(0,0,0,.08);
    }*/

/* ✖ (close) visible en modo CLARO */
/*.info-buque-block .btn-cerrar,
#info-buque-mobile .btn-cerrar {
    color: #111827;*/ /* más contraste en claro */
/*}*/

/* Asegurar foco accesible en ghost sobre claro */
/*.dashboard .btn--ghost:focus,
.filters .btn--ghost:focus,
.info-buque-block .btn--ghost:focus,
#info-buque-mobile .btn--ghost:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,.25);
    border-color: #3b82f6;
}*/

/* Mantener estilo original del header oscuro */
/*.header .btn--ghost {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}

    .header .btn--ghost:hover {
        background: rgba(255,255,255,.18);
    }*/
:root {
    --blanco: #ffffff;
    --oscuro: #1f2937;
    --primario: #3b82f6;
    --primario-oscuro: #2563eb;
    --secundario: #0f3c68;
    --gris: #6b7280;
    --grisClaro: #e5eef7;
    --chip: #eef2ff;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Krub', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background-image: linear-gradient(to top, var(--grisClaro) 0%, var(--blanco) 100%);
    color: var(--oscuro);
}

/* ===== Header (del _Layout) ===== */
.header {
    background: var(--secundario);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.header__inner {
    max-width: 150rem;
    margin: 0 auto;
    padding: .6rem 1.2rem;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr auto;
    gap: .8rem;
}

.header__title {
    font-size: clamp(1.6rem, 2vw, 2rem);
    margin: 0;
    font-weight: 700;
    letter-spacing: .2px;
}

.header__actions {
    display: inline-flex;
    gap: .4rem;
    justify-self: end;
}

/* ===== Botones / inputs ===== */
.btn {
    border: 0;
    border-radius: .8rem;
    padding: .5rem .9rem;
    cursor: pointer;
    font-weight: 700;
    transition: transform .06s ease, box-shadow .2s ease, background .2s;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn--primary {
    background: var(--primario);
    color: #fff;
}

    .btn--primary:hover {
        background: var(--primario-oscuro);
    }

.btn--ghost {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}

    .btn--ghost:hover {
        background: rgba(255,255,255,.18);
    }

/* Ghost sobre superficies claras (dashboard, filtros, panel info, card móvil) */
.dashboard .btn--ghost,
.filters .btn--ghost,
.info-buque-block .btn--ghost,
#info-buque-mobile .btn--ghost {
    background: rgba(0,0,0,.04);
    color: #111;
    border: 1px solid rgba(0,0,0,.12);
}

    .dashboard .btn--ghost:hover,
    .filters .btn--ghost:hover,
    .info-buque-block .btn--ghost:hover,
    #info-buque-mobile .btn--ghost:hover {
        background: rgba(0,0,0,.08);
    }

    .dashboard .btn--ghost:focus,
    .filters .btn--ghost:focus,
    .info-buque-block .btn--ghost:focus,
    #info-buque-mobile .btn--ghost:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(59,130,246,.25);
        border-color: #3b82f6;
    }
/* Mantener estilo del header (fondo oscuro) */
.header .btn--ghost {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}

    .header .btn--ghost:hover {
        background: rgba(255,255,255,.18);
    }

.search__input {
    border-radius: .6rem;
    border: 1px solid rgba(0,0,0,.15);
    padding: .5rem .6rem;
    min-width: 180px;
    font: inherit;
}

.search__input {
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .search__input:hover {
        background-color: #f3f4f6;
        border-color: rgba(0,0,0,.2);
    }

    .search__input:focus {
        outline: none;
        border-color: var(--primario);
        box-shadow: 0 0 0 3px rgb(59 130 246 / 20%);
        background-color: #fff;
    }

/* ===== Loader ===== */
.loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 1rem;
    background: rgba(255,255,255,.9);
    z-index: 9999;
    font-size: 1.6rem;
}

.spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,.1);
    border-top-color: var(--primario);
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader--hidden {
    opacity: 0;
    transition: opacity .35s ease;
}

/* ===== Dashboard ===== */
.dashboard {
    display: flex;
    gap: .8rem;
    align-items: end;
    flex-wrap: wrap;
    padding: 1rem;
}

.stat {
    background: var(--blanco);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: .8rem;
    padding: .8rem 1rem;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat__label {
    color: var(--gris);
    font-size: .95rem;
}

.stat__value {
    font-weight: 800;
    font-size: 1.6rem;
}

.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: .6rem;
    align-items: end;
    margin-left: auto;
}

@media (min-width: 680px) {
    .filters {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    }
}

.filters__field {
    display: grid;
    gap: .25rem;
}

    .filters__field > span {
        font-size: .85rem;
        color: var(--gris);
        font-weight: 700;
    }

.filters__buttons {
    display: inline-flex;
    gap: .4rem;
}

/* ===== Grid principal ===== */
.grid-desktop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.map-wrapper, .side-panel {
    min-width: 0;
}

@media (min-width: 768px) {
    .grid-desktop {
        grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
        align-items: start;
    }

    .side-panel {
        position: sticky;
        top: 0.8rem;
        max-height: calc(100vh - 3rem);
        overflow: auto;
    }
}

/* ===== Mapa ===== */
.map-wrapper {
    position: relative;
}

#map {
    width: 100%;
    height: clamp(360px, 60vh, 70vh);
    min-height: 360px;
    border-radius: 1rem;
}

.leaflet-container {
    font: inherit;
}

.leaflet-control-zoom a {
    border-radius: .6rem !important;
}

.leaflet-popup-content-wrapper {
    border-radius: .8rem;
}

.leaflet-popup-content {
    margin: .6rem .8rem;
}

/* Toolbar sobre el mapa */
.map-toolbar {
    position: absolute;
    left: .6rem;
    top: .6rem;
    display: flex;
    gap: .4rem;
    z-index: 500;
}

    .map-toolbar .btn {
        padding: .35rem .6rem;
        font-weight: 600;
        background: rgba(255,255,255,.85);
        color: #111;
        border: 1px solid rgba(0,0,0,.12);
        backdrop-filter: blur(4px);
    }

/* ===== Panel info ===== */
.info-buque-block {
    margin-top: 1rem;
    background: var(--blanco);
    border-radius: 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    padding: 1rem;
}

#info-buque-desktop[aria-hidden="true"] {
    display: none;
}

#info-buque-desktop[aria-hidden="false"] {
    display: block;
}

/* Panel móvil debajo del mapa, sin solaparse con el footer */
#info-buque-mobile {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    margin: .6rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    padding-bottom: .25rem;
    position: relative;
    z-index: 1;
    scroll-margin-bottom: 120px;
}

    #info-buque-mobile.mostrar {
        display: block;
        opacity: 1;
        transform: none;
    }

    #info-buque-mobile .info-header {
        position: sticky;
        top: 0;
        background: inherit;
        z-index: 2;
        padding-bottom: .25rem;
        margin-bottom: .35rem;
        border-bottom: 1px solid rgba(0,0,0,.06);
    }

@media (max-width: 768px) {
    #info-buque-desktop {
        display: none !important;
    }
}

/* Card del seleccionado */
.card-buque {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 1rem 1.2rem;
    margin: .5rem 0;
    font-size: .95rem;
    line-height: 1.4;
}

    .card-buque h4 {
        margin: 0 0 .8rem;
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f3c68;
    }

    .card-buque .label {
        font-weight: 700;
        color: #374151;
    }

    .card-buque .value {
        color: #111827;
    }

/* Botón cerrar visible en claro */
.info-buque-block .btn-cerrar,
#info-buque-mobile .btn-cerrar {
    color: #111827;
}

/* Placeholder (panel derecho vacío) */
.empty-state {
    display: grid;
    gap: .35rem;
    place-items: start;
    border: 1px dashed rgba(0,0,0,.18);
    border-radius: 12px;
    padding: .9rem 1rem;
    background: #fafafa;
}

.empty-state__icon {
    font-size: 1.2rem;
}

.empty-state__title {
    font-weight: 800;
    color: #0f3c68;
}

.empty-state__desc {
    color: #6b7280;
    font-size: .95rem;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    color: var(--gris);
    padding: .8rem 1rem 1.4rem;
    font-size: .9rem;
}

/* ===== Animaciones y toasts ===== */
.fade-in {
    animation: fadeIn .45s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.toast {
    min-width: 220px;
    max-width: 320px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    color: #fff;
    background: rgba(0,0,0,.85);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease;
}

    .toast.mostrar {
        opacity: 1;
        transform: translateY(0);
    }

    .toast.error {
        background-color: #d9534f;
    }

    .toast.info {
        background-color: #0275d8;
    }

    .toast.success {
        background-color: #5cb85c;
    }

/* ===== Clusters personalizados ===== */
.marker-cluster.mc-one.mc-pro {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
    border: 1.5px solid rgba(0,0,0,.06);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .marker-cluster.mc-one.mc-pro .mc-count {
        font-weight: 800;
        color: #111827;
        font-size: 14px;
        letter-spacing: .2px;
        font-variant-numeric: tabular-nums;
    }

    .marker-cluster.mc-one.mc-pro.mc-small .mc-count {
        font-size: 12px;
    }

    .marker-cluster.mc-one.mc-pro.mc-medium .mc-count {
        font-size: 13px;
    }

    .marker-cluster.mc-one.mc-pro.mc-large .mc-count {
        font-size: 14px;
    }

    .marker-cluster.mc-one.mc-pro.mc-green {
        background: radial-gradient(100% 100% at 30% 30%, rgba(180, 237, 180, 0.98) 0%, rgba(128, 211, 128, 0.96) 100%);
    }

    .marker-cluster.mc-one.mc-pro.mc-yellow {
        background: radial-gradient(100% 100% at 30% 30%, rgba(255, 239, 170, 0.98) 0%, rgba(245, 199, 84, 0.96) 100%);
    }

    .marker-cluster.mc-one.mc-pro.mc-orange {
        background: radial-gradient(100% 100% at 30% 30%, rgba(252, 208, 175, 0.98) 0%, rgba(236, 140, 86, 0.96) 100%);
    }

.marker-cluster--selected {
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .35), 0 4px 12px rgba(0,0,0,.16) !important;
}

.mc-ship-lg {
    position: absolute;
    right: -8px;
    top: -8px;
    width: 24px;
    height: 24px;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.18));
}

/* ===== Tema oscuro ===== */
:root.dark {
    --blanco: #0f172a;
    --oscuro: #e5e7eb;
    --secundario: #0b3a66;
    --gris: #9aa3af;
    --grisClaro: #0b1220;
    --chip: #1e293b;
    --primario: #60a5fa;
    --primario-oscuro: #3b82f6;
}

    :root.dark body {
        background-image: none;
        background: #0b1220;
    }

    /* Legibilidad en oscuro */
    :root.dark .info-buque-block {
        background: #111827;
        border: 1px solid rgba(255,255,255,.08);
    }

    :root.dark .info-header h3 {
        color: #e5e7eb;
    }

    :root.dark .btn-cerrar {
        color: #e5e7eb;
    }

    :root.dark .card-buque {
        background: #111827;
        border: 1px solid rgba(255,255,255,.08);
        color: #e5e7eb;
    }

        :root.dark .card-buque h4 {
            color: #93c5fd;
        }

        :root.dark .card-buque .label {
            color: #cbd5e1;
        }

        :root.dark .card-buque .value {
            color: #f9fafb;
        }

    :root.dark #info-buque-mobile .info-header {
        background: #111827;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }

    :root.dark .stat {
        background: #0f172a;
        border: 1px solid rgba(255,255,255,.08);
        color: #e5e7eb;
    }

    :root.dark .stat__label {
        color: #9aa3af;
    }

    :root.dark .stat__value {
        color: #f9fafb;
    }

    :root.dark .filters__field > span {
        color: #9aa3af;
    }

    :root.dark .search__input,
    :root.dark .filters .search__input {
        background: #0b1220;
        color: #e5e7eb;
        border: 1px solid rgba(255,255,255,.18);
    }

        :root.dark .search__input::placeholder {
            color: #9aa3af;
        }

        :root.dark .search__input:hover,
        :root.dark .filters .search__input:hover {
            background: #0f172a;
            border-color: rgba(255,255,255,.28);
        }

        :root.dark .search__input:focus,
        :root.dark .filters .search__input:focus {
            border-color: #60a5fa;
            box-shadow: 0 0 0 3px rgba(96,165,250,.25);
            background: #0f172a;
        }

    :root.dark .leaflet-popup-content-wrapper {
        background: #111827;
        color: #e5e7eb;
        border: 1px solid rgba(255,255,255,.08);
    }

    :root.dark .leaflet-popup-tip {
        background: #111827;
    }

    :root.dark .toast.info {
        background-color: #2563eb;
    }

    :root.dark .toast.success {
        background-color: #16a34a;
    }

    :root.dark .toast.error {
        background-color: #dc2626;
    }
    /* === Dark mode: ghost visibles en dashboard/filtros/panel/card === */
    :root.dark .dashboard .btn--ghost,
    :root.dark .filters .btn--ghost,
    :root.dark .info-buque-block .btn--ghost,
    :root.dark #info-buque-mobile .btn--ghost {
        background: rgba(255,255,255,.08);
        color: #e5e7eb;
        border: 1px solid rgba(255,255,255,.18);
    }

        :root.dark .dashboard .btn--ghost:hover,
        :root.dark .filters .btn--ghost:hover,
        :root.dark .info-buque-block .btn--ghost:hover,
        :root.dark #info-buque-mobile .btn--ghost:hover {
            background: rgba(255,255,255,.14);
            border-color: rgba(255,255,255,.28);
        }

        :root.dark .dashboard .btn--ghost:focus,
        :root.dark .filters .btn--ghost:focus,
        :root.dark .info-buque-block .btn--ghost:focus,
        :root.dark #info-buque-mobile .btn--ghost:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(96,165,250,.35);
            border-color: #60a5fa;
        }
