/* ===============================
   RESET Y VARIABLES
================================= */

* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #0f4c81;
    --primary-dark: #0b3b63;
    --sidebar: #111827;
    --sidebar-hover: #1f2937;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --warning-bg: #fffaeb;
    --warning-text: #b54708;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius: 14px;
    --content-max: 100%;
}

/* ===============================
   BASE GENERAL
================================= */

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    min-width: 320px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
}

/* ===============================
   LAYOUT PRINCIPAL
================================= */

.topbar {
    min-height: 64px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 22px;
}

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

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.topbar-right {
    color: var(--muted);
    font-size: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-body {
    display: flex;
    min-height: calc(100vh - 64px);
    min-width: 0;
}

.sidebar {
    width: 240px;
    flex: 0 0 240px;
    background: var(--sidebar);
    color: #fff;
    padding: 20px 16px;
}

.app-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: var(--content-max);
    padding: 24px;
}

.footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    font-size: 13px;
}

/* ===============================
   SIDEBAR
================================= */

.sidebar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar nav li {
    margin-bottom: 8px;
}

.sidebar nav a {
    display: block;
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar nav a:hover {
    background: var(--sidebar-hover);
    text-decoration: none;
}

.sidebar nav a.is-active {
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar nav a.is-active:hover {
    background: #ffffff;
    color: #111827;
}

.sidebar-link-with-counter {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nav-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}

.nav-counter.is-danger {
    background: #fee4e2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.nav-counter.is-neutral {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.sidebar nav a.is-active .nav-counter.is-neutral {
    background: #d1d5db;
    color: #111827;
    border-color: #c4cbd4;
}

.sidebar nav a.is-active .nav-counter.is-danger {
    background: #fee4e2;
    color: #b42318;
    border-color: #fecdca;
}

/* ===============================
   BARRA DE IMPERSONACIÓN
================================= */

.backend-impersonation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    background: #fff7cc;
    border-bottom: 1px solid #f0d96a;
    color: #5c4400;
    font-size: 14px;
}

.backend-impersonation-bar__left {
    line-height: 1.4;
}

.backend-impersonation-bar__right {
    display: flex;
    align-items: center;
}

.backend-impersonation-bar__button {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.backend-impersonation-bar__button:hover {
    background: #1f2937;
    text-decoration: none;
}

/* ===============================
   TARJETAS
================================= */

.card,
.summary-card,
.card-mini {
    min-width: 0;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 34px;
    line-height: 1.15;
}

.card p {
    color: var(--muted);
    line-height: 1.55;
}

.card-mini,
.summary-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    height: 100%;
}

.card-mini h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.25;
}

.card-mini p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.summary-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.35;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

/* ===============================
   HEADERS DE PÁGINA
================================= */

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

.page-header h1,
.page-header h2,
.page-header h3 {
    margin: 0;
    min-width: 0;
}

.page-header h1 {
    font-size: 34px;
    line-height: 1.15;
}

.page-header > div:first-child {
    min-width: 0;
}

/* ===============================
   BOTONES
================================= */

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.2;
    vertical-align: middle;
}

button:hover,
.btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-danger {
    background: #b91c1c;
}

.btn-danger:hover {
    background: #991b1b;
}

.btn-warning {
    background: #f97316;
    color: #fff;
}

.btn-warning:hover {
    background: #ea580c;
    color: #fff;
}

/* ===============================
   FORMULARIOS
================================= */

.form-group {
    margin-bottom: 16px;
    min-width: 0;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="number"],
input[type="time"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

.card .form-group input,
.card .form-group select,
.card .form-group textarea {
    width: 100%;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: normal;
}

.checkbox-line input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.info-box {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    background: #f8fafc;
    border-radius: 8px;
    color: #101828;
}

/* ===============================
   ALERTAS Y MENSAJES
================================= */

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

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

.text-danger {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 12px;
}

/* ===============================
   BADGES
================================= */

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-neutral {
    background: #e5e7eb;
    color: #374151;
}

.badge-danger {
    background: #fee4e2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.badge-warning {
    background: #fffaeb;
    color: #b54708;
    border: 1px solid #fedf89;
}

/* ===============================
   TABLAS
================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: #fff;
}

.table thead th {
    text-align: left;
    padding: 14px 12px;
    font-size: 14px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f9fbfd;
}

.table input:not([type="checkbox"]):not([type="radio"]),
.table select {
    min-width: 100px;
}

/* ===============================
   GRIDS GENERALES REUTILIZABLES
================================= */

.grid,
.dashboard-grid-responsive,
.summary-grid,
.filters-grid,
.piloto-grid,
.aeronave-grid,
.permissions-grid {
    display: grid;
    gap: 16px;
    align-items: stretch;
}

.grid > *,
.dashboard-grid-responsive > *,
.summary-grid > *,
.filters-grid > *,
.piloto-grid > *,
.aeronave-grid > *,
.permissions-grid > * {
    min-width: 0;
}

.grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 20px;
}

.dashboard-grid-responsive {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-grid-responsive > .summary-card,
.dashboard-grid-responsive > .card-mini {
    width: auto;
    min-width: 0;
    margin: 0;
}

.dashboard-grid-responsive + .dashboard-grid-responsive {
    margin-top: 20px;
}

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

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

.piloto-grid,
/* Nota: aeronave-grid se mantiene como grid principal de formularios
   por compatibilidad con la app actual. */
.aeronave-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

/* ===============================
   BLOQUES ESPECÍFICOS DE MÓDULOS
================================= */

.summary-grid-links .summary-link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
}

.summary-grid-links .summary-card {
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.summary-grid-links .summary-link:hover .summary-card {
    transform: translateY(-2px);
}

.summary-grid-links .summary-link.is-active .summary-card {
    border: 1px solid #1f6feb;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.mini-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    line-height: 1.2;
}

.mini-stat {
    color: #555;
}

.mini-stat strong {
    color: #111;
    font-weight: 700;
}

.sync-notice {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #b7d7f7;
    background: #eef6ff;
    color: #175286;
    border-radius: 8px;
    font-size: 13px;
}

.caducidad-row.caducidad-danger {
    background: #fff1f0;
}

.caducidad-row.caducidad-warning {
    background: #fff8e8;
}

.caducidad-row.caducidad-ok {
    background: transparent;
}

/* ===============================
   POPUP DE AVISOS
================================= */

.avisos-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.avisos-popup-box {
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.avisos-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.avisos-popup-header h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.avisos-popup-close {
    background: transparent;
    color: var(--text);
    border: none;
    font-size: 28px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    min-height: auto;
}

.avisos-popup-close:hover {
    background: transparent;
    color: var(--primary);
}

.avisos-popup-body {
    padding: 20px;
    display: grid;
    gap: 16px;
}

.aviso-popup-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: var(--panel-2);
}

.aviso-popup-item h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}

.aviso-popup-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.aviso-popup-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.avisos-popup-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.topbar-alertas-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.topbar-alertas-link:hover {
    text-decoration: none;
    background: #eef2f7;
}

/* ===============================
   AUTENTICACIÓN
================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #edf4fb 0%, #f8fbff 100%);
}

.auth-wrapper {
    width: 100%;
    max-width: 430px;
    padding: 24px;
}

.auth-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 22px;
    font-size: 30px;
    line-height: 1.15;
}

/* ===============================
   UTILIDADES DE VISTAS
================================= */

.mb-16 {
    margin-bottom: 16px;
}

.mt-16 {
    margin-top: 16px;
}

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

.page-actions--start {
    justify-content: flex-start;
}

.page-actions--end {
    justify-content: flex-end;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    margin-top: 16px;
}

.grid-col-full {
    grid-column: 1 / -1;
}

.section-title-sm {
    font-size: 28px !important;
    line-height: 1.2;
}

.table-col-xs {
    width: 70px;
}

.table-col-sm {
    width: 90px;
}

.table-col-md {
    width: 130px;
}

.table-col-lg {
    width: 220px;
}

.is-hidden {
    display: none !important;
}



@media (max-width: 767px) {
    .page-actions,
    .form-actions {
        align-items: stretch;
    }

    .page-actions .btn,
    .page-actions .btn-small,
    .form-actions .btn,
    .form-actions .btn-small {
        flex: 1 1 100%;
    }
}

/* ===============================
   RESPONSIVE - TABLET GRANDE
================================= */

@media (max-width: 1199px) {
    .dashboard-grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }

    .summary-grid {
        grid-template-columns: repeat(4, minmax(220px, 1fr));
    }

    .grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }

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

    .filters-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

/* ===============================
   RESPONSIVE - TABLET
================================= */

@media (max-width: 991px) {
    .app-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: 0 0 auto;
    }

    .app-content {
        padding: 18px;
    }

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

    .summary-grid {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
    }

    .grid,
    .filters-grid,
    .piloto-grid,
    .aeronave-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .summary-card,
    .card-mini {
        padding: 16px;
    }

    .summary-value {
        font-size: 2rem;
        line-height: 1.1;
    }

    .card-mini h3 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .card h1,
    .page-header h1 {
        font-size: 28px;
    }

    .backend-impersonation-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===============================
   RESPONSIVE - MÓVIL AMPLIO
================================= */

@media (max-width: 767px) {
    .topbar {
        padding: 12px 16px;
        min-height: auto;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .app-content,
    .footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-grid-responsive,
    .summary-grid,
    .grid,
    .filters-grid,
    .piloto-grid,
    .aeronave-grid,
    .permissions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .summary-card,
    .card-mini,
    .card {
        border-radius: 14px;
    }

    .card,
    .summary-card,
    .card-mini {
        padding: 14px;
    }

    .summary-label {
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .summary-value {
        font-size: 1.7rem;
        line-height: 1.1;
    }

    .card-mini h3 {
        font-size: 1.15rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .card-mini p {
        margin-bottom: 8px;
        line-height: 1.35;
        font-size: 0.95rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header .btn,
    .page-header .btn-small {
        width: 100%;
    }

    .table {
        min-width: 640px;
    }

    .avisos-popup-overlay {
        padding: 14px;
    }

    .avisos-popup-header,
    .avisos-popup-body,
    .avisos-popup-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ===============================
   RESPONSIVE - MÓVIL
================================= */

@media (max-width: 480px) {
    .topbar strong {
        font-size: 20px;
    }

    .app-content,
    .footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .dashboard-grid-responsive,
    .summary-grid,
    .grid,
    .permissions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .filters-grid,
    .piloto-grid,
    .aeronave-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .summary-card,
    .card-mini {
        padding: 12px;
    }

    .summary-label {
        font-size: 0.85rem;
    }

    .summary-value {
        font-size: 1.45rem;
    }

    .card-mini h3 {
        font-size: 1.05rem;
    }

    .card-mini p {
        font-size: 0.9rem;
    }

    .page-header h1 {
        font-size: 2rem;
        line-height: 1.15;
    }

    .table {
        min-width: 560px;
    }

    button,
    .btn {
        width: 100%;
    }

    .topbar-alertas-link {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===============================
   RESPONSIVE - MÓVIL MUY ESTRECHO
================================= */

@media (max-width: 360px) {
    .dashboard-grid-responsive,
    .summary-grid,
    .grid,
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}
 
/* ===============================
   METEO
================================= */

.meteo-search-card {
    position: relative;
}

.meteo-location-field {
    position: relative;
}

.meteo-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    z-index: 20;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.meteo-suggestion-item {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-align: left;
    padding: 12px 14px;
    min-height: auto;
    border-radius: 0;
}

.meteo-suggestion-item:last-child {
    border-bottom: none;
}

.meteo-suggestion-item:hover {
    background: #f8fafc;
}

.meteo-status-box {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.meteo-status-box--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.meteo-status-box--warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.meteo-status-box--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.meteo-status-box__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.meteo-status-box__body p {
    margin: 0 0 8px;
    color: var(--text);
    line-height: 1.5;
}

.meteo-status-box__body p:last-child {
    margin-bottom: 0;
}

.meteo-summary-text {
    font-size: 32px;
    line-height: 1.1;
}

/* ===============================
   LOGS DJI
================================= */

.dji-file-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dji-upload-box {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 16px;
    align-items: stretch;
}

.dji-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dji-dropzone:hover,
.dji-dropzone:focus,
.dji-dropzone.is-dragover {
    border-color: var(--primary);
    background: #eef6ff;
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.08);
    outline: none;
}

.dji-dropzone__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: var(--text);
    pointer-events: none;
}

.dji-dropzone__content strong {
    font-size: 18px;
}

.dji-dropzone__content span,
.dji-dropzone__content small {
    color: var(--muted);
}

.dji-selected-files-box {
    min-height: 190px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.dji-selected-files-box__title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dji-selected-files {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.dji-selected-file {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.dji-selected-file__name {
    color: var(--text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dji-selected-file__meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 767px) {
    .dji-upload-box {
        grid-template-columns: 1fr;
    }

    .dji-dropzone,
    .dji-selected-files-box {
        min-height: 150px;
    }
}
.dji-json-preview {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.45;
    max-height: 320px;
    overflow: auto;
}
/* ===============================
   LOGS DJI - ACCIONES AVISOS
================================= */

.table .page-actions form {
    margin: 0;
}

.table .page-actions {
    gap: 6px;
}

/* ===============================
   LOGS DJI - MAPA DE VUELO
================================= */

.dji-flight-map-card {
    overflow: hidden;
}

.dji-flight-map-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 150px;
    gap: 14px;
    align-items: stretch;
}

.dji-flight-map {
    min-height: 520px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #e5e7eb;
}

.dji-flight-map-side {
    display: grid;
    gap: 12px;
    align-content: start;
}

.dji-flight-stat-box {
    min-height: 76px;
    padding: 12px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.05);
}

.dji-flight-stat-box span {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 12px;
    line-height: 1.25;
}

.dji-flight-stat-box strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dji-flight-stat-box small {
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
}

@media (max-width: 991px) {
    .dji-flight-map-layout {
        grid-template-columns: 1fr;
    }

    .dji-flight-map-side {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dji-flight-map {
        min-height: 420px;
    }
}

@media (max-width: 767px) {
    .dji-flight-map-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dji-flight-map {
        min-height: 360px;
    }
}

@media (max-width: 480px) {
    .dji-flight-map-side {
        grid-template-columns: 1fr;
    }

    .dji-flight-map {
        min-height: 320px;
    }
}
/* ===============================
   LOGS DJI - MAPA INTERACTIVO
================================= */

.dji-map-tooltip {
    font-size: 12px;
    line-height: 1.35;
}

.dji-map-popup {
    min-width: 220px;
    font-size: 13px;
    line-height: 1.35;
}

.dji-map-popup strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
}

.dji-map-popup table {
    width: 100%;
    border-collapse: collapse;
}

.dji-map-popup td {
    padding: 4px 0;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.dji-map-popup td:first-child {
    width: 82px;
    color: #6b7280;
    font-weight: 700;
}

.dji-map-popup td:last-child {
    color: #111827;
}

.dji-selected-point-panel {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #f8fbff;
}

.dji-selected-point-panel__title {
    margin-bottom: 10px;
    font-weight: 700;
    color: #111827;
}

.dji-selected-point-panel__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dji-selected-point-panel__grid div {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    min-width: 0;
}

.dji-selected-point-panel__grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.dji-selected-point-panel__grid strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .dji-selected-point-panel__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .dji-selected-point-panel__grid {
        grid-template-columns: 1fr;
    }
}
/* ===============================
   LOGS DJI - HOME POINT
================================= */

.dji-home-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dji-home-marker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #111827;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}
/* ===============================
   LOGS DJI - FICHA TRAZABILIDAD
================================= */

.dji-trace-card {
    overflow: hidden;
}

.dji-trace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.dji-trace-main {
    display: grid;
    gap: 12px;
}

.dji-trace-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.dji-trace-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #e5e7eb;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.dji-trace-icon.is-ok {
    background: #dcfce7;
    color: #166534;
}

.dji-trace-icon.is-warning {
    background: #fffaeb;
    color: #b54708;
}

.dji-trace-icon.is-neutral {
    background: #e5e7eb;
    color: #374151;
}

.dji-trace-content {
    min-width: 0;
}

.dji-trace-content span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dji-trace-content strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.dji-trace-content small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dji-trace-side {
    display: grid;
    gap: 12px;
}

.dji-trace-kpi {
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    text-align: center;
}

.dji-trace-kpi span {
    display: block;
    margin-bottom: 6px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 700;
}

.dji-trace-kpi strong {
    display: block;
    color: #0f4c81;
    font-size: 28px;
    line-height: 1;
}

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

.dji-trace-alerts div {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.dji-trace-alerts span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
}

.dji-trace-alerts strong {
    display: block;
    color: var(--text);
    font-size: 18px;
}

.dji-trace-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.dji-trace-footer strong {
    color: var(--text);
}

@media (max-width: 991px) {
    .dji-trace-layout {
        grid-template-columns: 1fr;
    }

    .dji-trace-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dji-trace-alerts {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .dji-trace-side {
        grid-template-columns: 1fr;
    }

    .dji-trace-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .dji-trace-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 12px;
    }
}
/* ===============================
   LOGS DJI - AYUDA IMPORTACIÓN
================================= */

.dji-help-steps {
    display: grid;
    gap: 14px;
}

.dji-help-step {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.dji-help-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.dji-help-step h3,
.dji-help-device-card h3 {
    margin: 0 0 8px;
    color: var(--text);
}

.dji-help-step p,
.dji-help-device-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.dji-help-device-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.dji-help-path {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.dji-help-faq {
    display: grid;
    gap: 10px;
}

.dji-help-faq details {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 14px;
}

.dji-help-faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
}

.dji-help-faq p {
    margin: 10px 0 0;
    color: var(--muted);
}

@media (max-width: 991px) {
    .dji-help-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .dji-help-grid {
        grid-template-columns: 1fr;
    }

    .dji-help-step {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   LOGS DJI - ACCIONES MASIVAS
================================= */

.table-col-select {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    text-align: center;
    white-space: nowrap;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.table-col-select input[type="checkbox"],
.table input.dji-log-checkbox {
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    margin: 0 auto;
    display: block;
}

.dji-bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.dji-bulk-actions__left,
.dji-bulk-actions__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.dji-bulk-actions__right select {
    width: 230px;
    min-width: 230px;
}

.dji-bulk-actions__right button {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .dji-bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dji-bulk-actions__left,
    .dji-bulk-actions__right {
        width: 100%;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .dji-bulk-actions__right select,
    .dji-bulk-actions__right button {
        width: 100%;
        min-width: 0;
    }
}

/* ===============================
   LOGS DJI - VINCULACIÓN RÁPIDA
================================= */

.dji-inline-link-card {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.dji-inline-link-card .page-header {
    margin-bottom: 12px;
}

.dji-inline-link-card h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.dji-inline-link-card p {
    margin: 6px 0 0;
}

/* ===============================
   OPERACIONES - SHOW / MAPA
================================= */

.operation-map-card {
    overflow: hidden;
}

.operation-map-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 170px;
    gap: 14px;
    align-items: stretch;
}

.operation-map-center {
    min-width: 0;
}

.operation-routes-map {
    min-height: 560px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #e5e7eb;
}

.operation-empty-map {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
}

.operation-empty-map strong {
    color: var(--text);
    font-size: 18px;
}

.operation-empty-map p {
    max-width: 620px;
    margin: 0;
}

.operation-map-side {
    display: grid;
    gap: 12px;
    align-content: start;
}

.operation-map-stat {
    min-height: 82px;
    padding: 12px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.05);
}

.operation-map-stat span {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 12px;
    line-height: 1.25;
}

.operation-map-stat strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.25;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.operation-map-stat small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.operation-drones-list {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #f8fbff;
    color: #111827;
    line-height: 1.45;
}

@media (max-width: 991px) {
    .operation-map-layout {
        grid-template-columns: 1fr;
    }

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

    .operation-routes-map {
        min-height: 440px;
    }
}

@media (max-width: 767px) {
    .operation-map-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operation-routes-map {
        min-height: 360px;
    }
}

@media (max-width: 480px) {
    .operation-map-side {
        grid-template-columns: 1fr;
    }

    .operation-routes-map {
        min-height: 320px;
    }
}

/* ===============================
   LOGS DJI - EDITAR / VUELO
================================= */

.dji-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.dji-inline-actions .btn,
.dji-inline-actions button {
    width: auto;
}

/* ===============================
   BLOQUES PLEGABLES / DETALLE
================================= */

.collapsible-card {
    padding: 0;
    overflow: hidden;
}

.collapsible-card summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 22px;
    background: var(--panel);
    border-radius: var(--radius);
}

.collapsible-card summary:focus {
    outline: none;
}

.collapsible-card summary:focus-visible {
    outline: 2px solid rgba(15, 76, 129, 0.35);
    outline-offset: -2px;
}

.collapsible-card summary::-webkit-details-marker {
    display: none;
}

.collapsible-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.collapsible-card__title h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.collapsible-card__title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.collapsible-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: 0 0 auto;
    transition: transform 0.15s ease;
}

.collapsible-card[open] .collapsible-card__icon {
    transform: rotate(180deg);
}

.collapsible-card__body {
    padding: 0 22px 22px;
}

/* Fallback por si algún contenido queda directo dentro del details */
.collapsible-card[open] > p,
.collapsible-card[open] > .aeronave-grid,
.collapsible-card[open] > .grid,
.collapsible-card[open] > .summary-grid,
.collapsible-card[open] > .table-responsive,
.collapsible-card[open] > .info-box,
.collapsible-card[open] > .dji-json-preview,
.collapsible-card[open] > pre {
    margin-left: 22px;
    margin-right: 22px;
}

.collapsible-card[open] > p:first-of-type {
    margin-top: 0;
}

.collapsible-card[open] > .aeronave-grid,
.collapsible-card[open] > .grid,
.collapsible-card[open] > .summary-grid {
    width: calc(100% - 44px);
}

.collapsible-card:not([open]) {
    margin-bottom: 20px;
}

.collapsible-card[open] summary {
    border-bottom: 1px solid var(--border);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 18px;
}

/* ===============================
   ENAIRE / ZONAS UAS - AJUSTE LEAFLET
================================= */

.enaire-map-card {
    overflow: hidden;
}

.enaire-map-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.enaire-map-center {
    min-width: 0;
}

.enaire-map {
    position: relative;
    width: 100%;
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #e5e7eb;
}

.enaire-map.leaflet-container,
.enaire-map.is-leaflet-ready {
    height: 520px;
    max-height: 520px;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    cursor: grab;
}

.enaire-map .leaflet-pane,
.enaire-map .leaflet-map-pane,
.enaire-map .leaflet-tile-pane,
.enaire-map .leaflet-overlay-pane,
.enaire-map .leaflet-shadow-pane,
.enaire-map .leaflet-marker-pane,
.enaire-map .leaflet-tooltip-pane,
.enaire-map .leaflet-popup-pane,
.enaire-map .leaflet-control-container,
.enaire-map .leaflet-top,
.enaire-map .leaflet-bottom {
    position: absolute;
}

.enaire-map .leaflet-pane,
.enaire-map .leaflet-tile,
.enaire-map .leaflet-marker-icon,
.enaire-map .leaflet-marker-shadow,
.enaire-map .leaflet-tile-container,
.enaire-map .leaflet-pane > svg,
.enaire-map .leaflet-pane > canvas,
.enaire-map .leaflet-zoom-box,
.enaire-map .leaflet-image-layer,
.enaire-map .leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.enaire-map .leaflet-container img,
.enaire-map .leaflet-tile,
.enaire-map .leaflet-marker-icon,
.enaire-map .leaflet-marker-shadow,
.enaire-map img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
}

.enaire-map .leaflet-tile {
    width: 256px;
    height: 256px;
    border: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    user-select: none;
}

.enaire-map .leaflet-tile-loaded {
    visibility: inherit;
}

.enaire-map .leaflet-map-pane {
    z-index: 400;
}

.enaire-map .leaflet-tile-pane {
    z-index: 200;
}

.enaire-map .leaflet-overlay-pane {
    z-index: 400;
}

.enaire-map .leaflet-shadow-pane {
    z-index: 500;
}

.enaire-map .leaflet-marker-pane {
    z-index: 600;
}

.enaire-map .leaflet-tooltip-pane {
    z-index: 650;
}

.enaire-map .leaflet-popup-pane {
    z-index: 700;
}

.enaire-map .leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
    float: left;
    clear: both;
}

.enaire-map .leaflet-top {
    top: 0;
    z-index: 1000;
    pointer-events: none;
}

.enaire-map .leaflet-right {
    right: 0;
}

.enaire-map .leaflet-bottom {
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.enaire-map .leaflet-left {
    left: 0;
}

.enaire-map .leaflet-top .leaflet-control {
    margin-top: 10px;
}

.enaire-map .leaflet-left .leaflet-control {
    margin-left: 10px;
}

.enaire-map .leaflet-right .leaflet-control {
    margin-right: 10px;
}

.enaire-map .leaflet-bottom .leaflet-control {
    margin-bottom: 10px;
}

.enaire-map .leaflet-control-zoom a {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: #fff;
    border-bottom: 1px solid #ccc;
    color: #111827;
    text-align: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

.enaire-map .leaflet-control-zoom a:hover {
    background: #f4f4f4;
    text-decoration: none;
}

.enaire-map .leaflet-control-zoom {
    border: 1px solid #bbb;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.enaire-map .leaflet-control-layers {
    max-width: 260px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
}

.enaire-map .leaflet-control-layers label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
    font-weight: 400;
}

.enaire-map .leaflet-control-layers input {
    width: auto;
    margin: 0;
}

.enaire-map .leaflet-control-attribution {
    padding: 4px 7px;
    background: rgba(255, 255, 255, 0.88);
    color: #334155;
    font-size: 11px;
    line-height: 1.3;
}

.enaire-center-marker {
    stroke: #111827;
    fill: #0f4c81;
}

.enaire-map-side {
    display: grid;
    gap: 12px;
    align-content: start;
}

.enaire-map-help-box {
    min-height: 82px;
    padding: 12px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.05);
}

.enaire-map-help-box strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
}

.enaire-map-help-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.enaire-map-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.enaire-map-toolbar .btn-small,
.enaire-map-toolbar button {
    width: auto;
}

.enaire-map-status {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.45;
}

.enaire-map-status--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

@media (max-width: 991px) {
    .enaire-map-layout {
        grid-template-columns: 1fr;
    }

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

    .enaire-map,
    .enaire-map.leaflet-container,
    .enaire-map.is-leaflet-ready {
        height: 440px;
        min-height: 440px;
        max-height: 440px;
    }
}

@media (max-width: 767px) {
    .enaire-map-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .enaire-map,
    .enaire-map.leaflet-container,
    .enaire-map.is-leaflet-ready {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }

    .enaire-map-toolbar .btn-small,
    .enaire-map-toolbar button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .enaire-map-side {
        grid-template-columns: 1fr;
    }

    .enaire-map,
    .enaire-map.leaflet-container,
    .enaire-map.is-leaflet-ready {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }
}
/* Añadir al final del bloque ENAIRE de app.css */
.enaire-map .leaflet-pane > svg,
.enaire-map .leaflet-overlay-pane svg,
.enaire-map .leaflet-zoom-animated svg {
    position: absolute;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible;
}

.enaire-map .leaflet-interactive {
    cursor: pointer;
}

.enaire-map .enaire-broken-tile,
.enaire-map img.enaire-broken-tile {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.enaire-layer-panel {
    min-width: 210px;
    max-width: 260px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
}

.enaire-layer-panel strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 13px;
}

.enaire-layer-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0;
    font-weight: 400;
    cursor: pointer;
}

.enaire-layer-panel input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    margin: 0;
}

.enaire-layer-panel input[type="checkbox"]:disabled + span {
    color: #94a3b8;
}

.enaire-point-label {
    padding: 2px 5px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 700;
    box-shadow: none;
}

.enaire-map .leaflet-tooltip.enaire-point-label::before {
    display: none;
}

@media (max-width: 767px) {
    .enaire-layer-panel {
        min-width: 180px;
        max-width: 220px;
        font-size: 12px;
    }
}
/* ===============================
   ENAIRE - FIX CAPAS ARCGIS EXPORT
================================= */

.enaire-map {
    position: relative;
}

.enaire-map .leaflet-pane > svg,
.enaire-map .leaflet-overlay-pane svg,
.enaire-map .leaflet-zoom-animated svg {
    position: absolute;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible;
}

.enaire-map .leaflet-interactive {
    cursor: pointer;
}

.enaire-map .enaire-broken-tile,
.enaire-map img.enaire-broken-tile {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.enaire-map .leaflet-image-layer {
    max-width: none !important;
    max-height: none !important;
}

.enaire-layer-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1200;
    min-width: 220px;
    max-width: 270px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
}

.enaire-layer-panel strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 13px;
}

.enaire-layer-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0;
    font-weight: 400;
    cursor: pointer;
}

.enaire-layer-panel input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    margin: 0;
}

.enaire-layer-panel input[type="checkbox"]:disabled + span {
    color: #94a3b8;
}

.enaire-point-label {
    padding: 2px 5px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 700;
    box-shadow: none;
}

.enaire-map .leaflet-tooltip.enaire-point-label::before {
    display: none;
}

@media (max-width: 767px) {
    .enaire-layer-panel {
        left: 12px;
        right: 12px;
        top: 12px;
        min-width: 0;
        max-width: none;
        font-size: 12px;
    }
}
/* ===============================
   ENAIRE - FIX CAPAS ARCGIS EXPORT
================================= */

.enaire-map {
    position: relative;
}

.enaire-map .leaflet-pane > svg,
.enaire-map .leaflet-overlay-pane svg,
.enaire-map .leaflet-zoom-animated svg {
    position: absolute;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible;
}

.enaire-map .leaflet-interactive {
    cursor: pointer;
}

.enaire-map .enaire-broken-tile,
.enaire-map img.enaire-broken-tile {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.enaire-map .leaflet-image-layer {
    max-width: none !important;
    max-height: none !important;
}

.enaire-layer-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1200;
    min-width: 220px;
    max-width: 270px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
}

.enaire-layer-panel strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 13px;
}

.enaire-layer-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0;
    font-weight: 400;
    cursor: pointer;
}

.enaire-layer-panel input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    margin: 0;
}

.enaire-layer-panel input[type="checkbox"]:disabled + span {
    color: #94a3b8;
}

.enaire-point-label {
    padding: 2px 5px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 700;
    box-shadow: none;
}

.enaire-map .leaflet-tooltip.enaire-point-label::before {
    display: none;
}

@media (max-width: 767px) {
    .enaire-layer-panel {
        left: 12px;
        right: 12px;
        top: 12px;
        min-width: 0;
        max-width: none;
        font-size: 12px;
    }
}

/* ===============================
   ENAIRE - FIX 4 CAPAS DRONES
================================= */

.enaire-layer-panel--wide {
    min-width: 260px;
    max-width: 330px;
}

.enaire-layer-panel--wide label {
    margin: 6px 0;
}

.enaire-layer-panel--wide span {
    overflow-wrap: anywhere;
}

.enaire-map .leaflet-image-layer[alt="AERODROMOS"],
.enaire-map .leaflet-image-layer[alt="AEROMODELISMO"] {
    image-rendering: auto;
}
/* ===============================
   ENAIRE - TABLA DE ZONAS
================================= */

.enaire-zone-message,
.enaire-zone-detail {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.enaire-zone-detail {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}
/* ===============================
   ENAIRE - ICONOS Y TIPO DE ZONA
================================= */

.enaire-zones-table {
    min-width: 980px;
}

.enaire-zone-icon-th {
    width: 64px;
    text-align: center;
}

.enaire-zone-icon-cell {
    width: 64px;
    min-width: 64px;
    text-align: center;
    vertical-align: middle;
}

.enaire-zone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 22px;
    line-height: 1;
    cursor: help;
}

.enaire-zone-type-box {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 92px;
}

.enaire-zone-type-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #0f4c81;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.enaire-zone-type-value {
    display: inline-block;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.enaire-zone-message,
.enaire-zone-detail {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.enaire-zone-detail {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}
/* ===============================
   ENAIRE - CONSULTA RÁPIDA PUNTUAL
================================= */

.enaire-map-toolbar .is-active {
    background: #f97316;
    color: #fff;
}

.enaire-quick-panel {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 1200;
    width: 360px;
    max-width: calc(100% - 36px);
    max-height: calc(100% - 36px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
}

.enaire-quick-panel.is-visible {
    display: flex;
}

.enaire-quick-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #0ea5e9;
    color: #fff;
}

.enaire-quick-panel__header strong {
    color: #fff;
}

.enaire-quick-panel__header button {
    width: auto;
    min-height: auto;
    padding: 0 6px;
    background: transparent;
    color: #fff;
    border-radius: 4px;
    font-size: 22px;
    line-height: 1;
}

.enaire-quick-panel__header button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.enaire-quick-panel__body {
    overflow: auto;
    padding: 10px;
    background: #fff;
}

.enaire-quick-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text);
}

.enaire-quick-popup__header span {
    color: var(--muted);
    font-size: 12px;
}

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

.enaire-quick-item {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fffbeb;
}

.enaire-quick-item__bar {
    background: #e11d48;
}

.enaire-quick-item__body {
    min-width: 0;
    padding: 10px 10px 10px 0;
}

.enaire-quick-item__title {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin-bottom: 8px;
}

.enaire-quick-item__title strong {
    display: block;
    color: var(--text);
    line-height: 1.25;
}

.enaire-quick-item__title small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.25;
}

.enaire-quick-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
}

.enaire-quick-type {
    margin-bottom: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.enaire-quick-type span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #0f4c81;
    font-size: 11px;
    font-weight: 800;
}

.enaire-quick-type strong {
    font-size: 12px;
    color: var(--text);
}

.enaire-quick-item p {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
}

.enaire-quick-item p:last-child {
    margin-bottom: 0;
}

.enaire-quick-contact {
    color: var(--muted) !important;
}

.enaire-quick-empty,
.enaire-quick-loading {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 767px) {
    .enaire-quick-panel {
        left: 10px;
        right: 10px;
        top: 10px;
        width: auto;
        max-width: none;
        max-height: calc(100% - 20px);
    }
}

/* ===============================
   ENAIRE - SELECTOR DE CAPAS EN LATERAL
================================= */

.enaire-map-layers-box {
    overflow: visible;
}

.enaire-layer-panel-host {
    margin-top: 10px;
}

.enaire-layer-panel--embedded {
    position: static !important;
    width: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.enaire-layer-panel--embedded label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
}

.enaire-layer-panel--embedded label:last-child {
    margin-bottom: 0;
}

.enaire-layer-panel--embedded input[type="checkbox"] {
    width: 15px;
    min-width: 15px;
    height: 15px;
    margin: 1px 0 0;
    flex: 0 0 auto;
}

.enaire-layer-panel--embedded span {
    overflow-wrap: anywhere;
}

.enaire-layer-panel--embedded input[disabled] + span {
    color: #94a3b8;
}

/* Cuando el selector se inserta en el lateral, no debe quedar encima del mapa. */
.enaire-map .enaire-layer-panel--embedded {
    display: none;
}

/* ===============================
   ENAIRE - AJUSTE VENTANA CONSULTA RÁPIDA
================================= */

.enaire-quick-panel {
    pointer-events: auto;
}

.enaire-quick-panel__body {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
/* ===============================
   ENAIRE - AYUDAS PLEGABLES CREATE
================================= */

.enaire-help-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.enaire-help-toggle-card {
    width: auto;
    min-width: 180px;
    max-width: 260px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
}

.enaire-help-toggle-card summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    user-select: none;
}

.enaire-help-toggle-card summary::-webkit-details-marker {
    display: none;
}

.enaire-help-toggle-card summary::after {
    content: '+';
    float: right;
    font-weight: 700;
    color: var(--muted);
}

.enaire-help-toggle-card[open] summary::after {
    content: '–';
}

.enaire-help-toggle-card__body {
    padding: 0 12px 12px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
}

/* ===============================
   ENAIRE - AJUSTE GRID Y Z-INDEX
================================= */

.enaire-map-layout {
    align-items: start;
    gap: 16px;
}

.enaire-map-side {
    position: relative;
    z-index: 3;
    overflow: visible;
}

.enaire-map-center {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.enaire-map {
    position: relative;
    z-index: 1;
}

/* ===============================
   ENAIRE - PANEL CAPAS EMBEBIDO
================================= */

.enaire-map-layers-box {
    overflow: visible;
}

.enaire-layer-panel-host {
    margin-top: 10px;
    position: relative;
    z-index: 4;
}

.enaire-layer-panel--embedded {
    position: relative !important;
    z-index: 4;
    width: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.enaire-layer-panel--embedded label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
}

.enaire-layer-panel--embedded label:last-child {
    margin-bottom: 0;
}

.enaire-layer-panel--embedded input[type="checkbox"] {
    width: 15px;
    min-width: 15px;
    height: 15px;
    margin: 1px 0 0;
    flex: 0 0 auto;
}

.enaire-layer-panel--embedded span {
    overflow-wrap: anywhere;
}

.enaire-layer-panel--embedded input[disabled] + span {
    color: #94a3b8;
}

/* ===============================
   ENAIRE - OPACIDAD DE CAPAS
================================= */

.enaire-layer-opacity {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    margin: 0 0 12px;
    padding: 10px 0 12px;
    border-bottom: 1px solid var(--border);
}

.enaire-layer-opacity__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.enaire-layer-opacity__value {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.enaire-layer-opacity__range {
    grid-column: 1 / -1;
    width: 100%;
}

/* ===============================
   ENAIRE - CONTROL MAPA BASE
================================= */

.enaire-map .leaflet-control-layers {
    position: relative;
    z-index: 1400 !important;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.enaire-map .leaflet-control-layers-toggle {
    display: block;
    width: 36px;
    height: 36px;
    background-color: #fff;
    background-size: 20px 20px;
}

.enaire-map .leaflet-control-layers-expanded {
    padding: 10px 12px;
    min-width: 150px;
    font-size: 12px;
    line-height: 1.35;
}

.enaire-map .leaflet-control-layers-expanded label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 5px 0;
    font-weight: 600;
    color: #111827;
}

.enaire-map .leaflet-control-layers-expanded input {
    width: auto;
    min-width: auto;
    margin: 0;
}

/* ===============================
   ENAIRE - VENTANA INFORMACIÓN MÁS PEQUEÑA
================================= */

.enaire-quick-panel {
    width: 300px;
    max-width: calc(100% - 28px);
    max-height: calc(100% - 28px);
    left: 14px;
    top: 14px;
    border-radius: 12px;
}

.enaire-quick-panel__header {
    padding: 8px 10px;
    font-size: 13px;
}

.enaire-quick-panel__header button {
    font-size: 20px;
}

.enaire-quick-panel__body {
    padding: 8px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.enaire-quick-popup__header {
    margin-bottom: 8px;
}

.enaire-quick-popup__header strong {
    font-size: 13px;
}

.enaire-quick-popup__header span {
    font-size: 11px;
}

.enaire-quick-list {
    gap: 8px;
}

.enaire-quick-item {
    border-radius: 10px;
}

.enaire-quick-item__body {
    padding: 8px 8px 8px 0;
}

.enaire-quick-item__title {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.enaire-quick-item__title strong {
    font-size: 12px;
}

.enaire-quick-item__title small {
    font-size: 11px;
}

.enaire-quick-item__icon {
    width: 22px;
    height: 22px;
    font-size: 14px;
    border-radius: 7px;
}

.enaire-quick-type {
    margin-bottom: 6px;
    gap: 5px;
}

.enaire-quick-type span {
    padding: 2px 6px;
    font-size: 10px;
}

.enaire-quick-type strong {
    font-size: 11px;
}

.enaire-quick-item p {
    font-size: 12px;
    line-height: 1.35;
    margin: 0 0 6px;
}

@media (max-width: 767px) {
    .enaire-help-toggle-row {
        flex-direction: column;
    }

    .enaire-help-toggle-card {
        max-width: none;
    }

    .enaire-quick-panel {
        width: auto;
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
        max-height: calc(100% - 20px);
    }
}
/* ===============================
   ENAIRE - FIX FINAL LAYOUT MAPA/CAPAS
================================= */

.enaire-map-card {
    overflow: visible;
}

.enaire-map-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.enaire-map-side {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 12px;
    align-content: start;
}

.enaire-map-center {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.enaire-map-layers-box {
    position: relative;
    z-index: 3;
    margin-right: 0;
    overflow: visible;
}

.enaire-layer-panel-host {
    position: relative;
    z-index: 4;
    margin-top: 12px;
}

.enaire-layer-panel--embedded {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    display: block !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.enaire-layer-panel--embedded label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
}

.enaire-layer-panel--embedded input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    min-width: 15px;
    height: 15px;
    margin: 1px 0 0;
}

.enaire-layer-panel--embedded span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.enaire-layer-panel--embedded input[disabled] + span {
    color: #94a3b8;
}
/* ===============================
   ENAIRE - TARJETA CAPAS MÁS LIMPIA
================================= */

.enaire-map-help-box.enaire-map-layers-box {
    padding: 12px 12px 14px;
}

.enaire-map-help-box.enaire-map-layers-box > strong {
    margin-bottom: 5px;
}

.enaire-map-help-box.enaire-map-layers-box > span {
    margin-bottom: 8px;
}
/* ===============================
   ENAIRE - RESPONSIVE FIX
================================= */

@media (max-width: 991px) {
    .enaire-map-layout {
        grid-template-columns: 1fr;
    }

    .enaire-map-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .enaire-map-layout {
        gap: 12px;
    }

    .enaire-map-help-box.enaire-map-layers-box {
        margin-bottom: 0;
    }

    .enaire-quick-panel {
        width: auto !important;
        left: 10px !important;
        right: 10px !important;
        top: 10px !important;
        max-width: none !important;
        max-height: calc(100% - 20px) !important;
    }
}

/* ===============================
   ENAIRE - SELECTOR MAPA BASE PROPIO
================================= */

.enaire-basemap-switcher {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1300;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

.enaire-basemap-button {
    width: auto;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.enaire-basemap-button:hover {
    background: #eff6ff;
    color: #0f4c81;
}

.enaire-basemap-button.is-active {
    background: #0f4c81;
    color: #fff;
}

@media (max-width: 767px) {
    .enaire-basemap-switcher {
        top: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        overflow-x: auto;
    }

    .enaire-basemap-button {
        font-size: 10px;
        padding: 5px 7px;
    }
}
/* ===============================
   ENAIRE - MAPA CONSULTA RÁPIDA INDEX
================================= */

.enaire-quick-index-card .enaire-map {
    height: 480px;
    min-height: 480px;
    max-height: 480px;
}

.enaire-quick-index-card .enaire-map.leaflet-container,
.enaire-quick-index-card .enaire-map.is-leaflet-ready {
    height: 480px;
    min-height: 480px;
    max-height: 480px;
}

.enaire-quick-index-card .enaire-map-toolbar {
    margin-bottom: 12px;
}

.enaire-quick-index-card .enaire-map-side {
    align-content: start;
}

@media (max-width: 991px) {
    .enaire-quick-index-card .enaire-map,
    .enaire-quick-index-card .enaire-map.leaflet-container,
    .enaire-quick-index-card .enaire-map.is-leaflet-ready {
        height: 420px;
        min-height: 420px;
        max-height: 420px;
    }
}

@media (max-width: 767px) {
    .enaire-quick-index-card .enaire-map,
    .enaire-quick-index-card .enaire-map.leaflet-container,
    .enaire-quick-index-card .enaire-map.is-leaflet-ready {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }
}
/* ===============================
   ENAIRE - SHOW MAP TOPBAR
================================= */

.enaire-show-map-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 14px;
}

.enaire-show-map-topbar .enaire-map-toolbar {
    margin-bottom: 0;
    align-items: stretch;
}

.enaire-show-map-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.enaire-map-help-box--compact {
    min-height: 58px;
    padding: 10px 12px;
}

.enaire-map-help-box--compact strong {
    margin-bottom: 4px;
    font-size: 12px;
}

.enaire-map-help-box--compact span {
    font-size: 12px;
    line-height: 1.3;
}

@media (max-width: 991px) {
    .enaire-show-map-topbar {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767px) {
    .enaire-show-map-stats {
        grid-template-columns: 1fr;
    }
}
/* ===============================
   ENAIRE - NOTAM EN CONSULTA RÁPIDA
================================= */

.enaire-quick-item--notam {
    background: #fffde7 !important;
    border-color: #f3e89a !important;
}

.enaire-quick-item--notam .enaire-quick-item__bar {
    background: #eab308 !important;
}

.enaire-notam-title {
    margin-bottom: 4px;
}

.enaire-notam-title strong {
    display: block;
    color: #1f2937;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.enaire-notam-title small {
    display: block;
    margin-top: 2px;
    color: #4b5563;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.enaire-notam-limits {
    margin-bottom: 4px;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.enaire-notam-row {
    color: #111827;
    font-size: 12px;
    line-height: 1.3;
}

.enaire-notam-row strong {
    font-weight: 800;
}

.enaire-notam-description {
    margin-top: 5px;
    color: #111827;
    font-size: 12px;
    line-height: 1.35;
}

.enaire-notam-description strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 800;
}
/* ===============================
   ENAIRE - FILTROS NOTAM
================================= */

.enaire-layer-panel--embedded label:has(input[value="FILTRO_INFERIOR"]),
.enaire-layer-panel--embedded label:has(input[value="FILTRO_UAS"]) {
    margin: 10px 0 10px;
    padding: 8px 9px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    color: #92400e;
}

.enaire-layer-panel--embedded label:has(input[value="FILTRO_INFERIOR"]) span,
.enaire-layer-panel--embedded label:has(input[value="FILTRO_UAS"]) span {
    color: #92400e;
    font-weight: 800;
}

/* ===============================
   OPERACIONES - ENAIRE RESUMEN
================================= */

.operation-enaire-card {
    border-left: 5px solid #cbd5e1;
}

.operation-enaire-card.is-success {
    border-left-color: #16a34a;
}

.operation-enaire-card.is-warning {
    border-left-color: #f97316;
}

.operation-enaire-card.is-danger {
    border-left-color: #dc2626;
}

.operation-enaire-card.is-neutral {
    border-left-color: #94a3b8;
}

.operation-enaire-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
    gap: 16px;
    align-items: stretch;
}

.operation-enaire-status {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.operation-enaire-status p {
    margin: 12px 0 8px;
    color: var(--text);
    line-height: 1.45;
}

.operation-enaire-status small {
    display: block;
    color: var(--muted);
    line-height: 1.4;
}

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

.operation-enaire-kpi {
    min-width: 0;
    padding: 13px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.operation-enaire-kpi span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.operation-enaire-kpi strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.operation-enaire-warning {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 12px;
    background: #fffbeb;
    color: #92400e;
    line-height: 1.45;
}

.operation-enaire-warning strong {
    color: #78350f;
}

@media (max-width: 991px) {
    .operation-enaire-layout {
        grid-template-columns: 1fr;
    }

    .operation-enaire-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .operation-enaire-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .operation-enaire-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   OPERACIONES - ENAIRE AFECCIONES
================================= */

.operation-enaire-afecciones {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.operation-enaire-afecciones__header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.operation-enaire-afecciones__header strong {
    color: var(--text);
    font-size: 15px;
}

.operation-enaire-afecciones__header span {
    color: var(--muted);
    font-size: 12px;
}

.operation-enaire-afecciones__list {
    display: grid;
    gap: 10px;
}

.operation-enaire-afeccion {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.operation-enaire-afeccion__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    font-size: 19px;
}

.operation-enaire-afeccion__body {
    min-width: 0;
}

.operation-enaire-afeccion__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.operation-enaire-afeccion__title strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.operation-enaire-afeccion__title span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.operation-enaire-afeccion p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
}

.operation-enaire-afeccion small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.operation-enaire-empty {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 767px) {
    .operation-enaire-afeccion__title {
        flex-direction: column;
        align-items: flex-start;
    }

    .operation-enaire-afeccion__title span {
        white-space: normal;
    }
}

/* ===============================
   OPERACIONES - ENAIRE AFECCIONES COLAPSABLES
================================= */

.operation-enaire-afecciones {
    margin-top: 16px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

.operation-enaire-afecciones > summary {
    list-style: none;
}

.operation-enaire-afecciones > summary::-webkit-details-marker {
    display: none;
}

.operation-enaire-afecciones__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    cursor: pointer;
    user-select: none;
}

.operation-enaire-afecciones__summary:hover {
    background: #f1f5f9;
}

.operation-enaire-afecciones__summary strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}

.operation-enaire-afecciones__summary span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.operation-enaire-afecciones__toggle {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985 !important;
    text-align: center;
    font-size: 12px !important;
    font-weight: 800;
}

.operation-enaire-afecciones[open] .operation-enaire-afecciones__toggle {
    background: #fee2e2;
    color: #991b1b !important;
}

.operation-enaire-afecciones[open] .operation-enaire-afecciones__toggle {
    font-size: 0 !important;
}

.operation-enaire-afecciones[open] .operation-enaire-afecciones__toggle::after {
    content: "Cerrar";
    font-size: 12px;
}

.operation-enaire-afecciones__list {
    padding: 0 14px 14px;
}

/* ===============================
   ENAIRE - OPERACIÓN VINCULADA EN SHOW
================================= */

.enaire-data-grid {
    align-items: stretch;
}

.enaire-data-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.enaire-data-card .info-box {
    flex: 1 1 auto;
    min-height: 76px;
}

.enaire-operation-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enaire-operation-box__main {
    min-height: 42px;
}

.enaire-operation-link {
    display: block;
    color: var(--text);
    text-decoration: none;
}

.enaire-operation-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.enaire-operation-link strong {
    display: block;
    color: var(--text);
    line-height: 1.25;
}

.enaire-operation-link span {
    display: block;
    margin-top: 2px;
    color: var(--text);
    line-height: 1.25;
}

.enaire-operation-actions {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 7px;
}

.enaire-operation-actions summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    list-style: none;
    user-select: none;
    outline: none;
}

.enaire-operation-actions summary::-webkit-details-marker {
    display: none;
}

.enaire-operation-actions summary::after {
    content: " +";
    color: var(--muted);
}

.enaire-operation-actions[open] summary::after {
    content: " –";
}

.enaire-operation-actions__body {
    display: grid;
    gap: 9px;
    margin-top: 9px;
}

.enaire-operation-link-form {
    margin: 0;
}

.enaire-operation-link-form select {
    width: 100%;
}

.enaire-operation-actions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.enaire-operation-actions__buttons .btn-small,
.enaire-operation-actions__buttons button {
    width: auto;
}

.enaire-operation-unlink-form {
    display: inline-flex;
    margin: 0;
}

/* ===============================
   ENAIRE - RESUMEN IMPRIMIBLE
================================= */

.enaire-print-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.enaire-print-toolbar h1 {
    margin: 0 0 6px;
    font-size: 34px;
    line-height: 1.15;
}

.enaire-print-toolbar p {
    margin: 0;
    color: var(--muted);
}

.enaire-print-card h2 {
    margin-top: 0;
}

.enaire-print-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 16px;
    align-items: start;
}

.enaire-print-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.enaire-print-header p {
    margin: 0;
}

.enaire-print-status {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
}

.enaire-print-status strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 18px;
}

.enaire-print-status span {
    color: var(--muted);
    font-size: 12px;
}

.enaire-print-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    align-items: stretch;
}

.enaire-print-grid > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    min-height: 78px;
    height: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.enaire-print-grid span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.enaire-print-grid strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.enaire-print-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.enaire-print-flags span {
    padding: 7px 10px;
    border: 1px solid #fedf89;
    border-radius: 999px;
    background: #fffaeb;
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
}

.enaire-print-warning {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 12px;
    background: #fffbeb;
    color: #92400e;
    line-height: 1.45;
}

.enaire-print-layer {
    margin-top: 18px;
    page-break-inside: avoid;
}

.enaire-print-layer h3 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
}

.enaire-print-layer h3 span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.enaire-print-zones {
    display: grid;
    gap: 10px;
}

.enaire-print-zone {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    page-break-inside: avoid;
}

.enaire-print-zone__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 20px;
}

.enaire-print-zone__body {
    min-width: 0;
}

.enaire-print-zone__title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.enaire-print-zone__title strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.enaire-print-zone__title span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.enaire-print-zone__text {
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.enaire-print-zone__detail {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.enaire-print-zone__detail strong {
    color: var(--text);
}

@media (max-width: 991px) {
    .enaire-print-toolbar,
    .enaire-print-header {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .enaire-print-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .enaire-print-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .enaire-print-zone__title {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .enaire-print-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }
    .topbar,
    .sidebar,
    .footer,
    .enaire-print-toolbar .page-actions,
    .backend-impersonation-bar {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .app-body {
        display: block !important;
        min-height: auto !important;
    }

    .app-content {
        padding: 0 !important;
        width: 680px !important;
        max-width: 680px !important;
        min-width: 680px !important;
        margin: 0 auto !important;
    }
    .card,
    .enaire-print-card {
        box-shadow: none !important;
        border-color: #d1d5db !important;
    }

    .card:not(.enaire-print-zones-card),
    .enaire-print-card:not(.enaire-print-zones-card) {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .enaire-print-zones-card {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .enaire-print-toolbar {
        display: block;
        margin-bottom: 12px;
    }

    .enaire-print-zone {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .enaire-print-layer {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }
}

/* ===============================
   ENAIRE - MAPA EN RESUMEN IMPRIMIBLE
================================= */

.enaire-print-map {
    position: relative;
    width: 100%;
    height: 430px;
    min-height: 430px;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
}

.enaire-print-map.leaflet-container {
    height: 430px;
    min-height: 430px;
    background: #e5e7eb;
}

/* Fix Leaflet específico para el mapa del resumen.
   Necesario porque el CSS global de la app limita img/svg/canvas. */
.enaire-print-map .leaflet-pane,
.enaire-print-map .leaflet-map-pane,
.enaire-print-map .leaflet-tile-pane,
.enaire-print-map .leaflet-overlay-pane,
.enaire-print-map .leaflet-shadow-pane,
.enaire-print-map .leaflet-marker-pane,
.enaire-print-map .leaflet-tooltip-pane,
.enaire-print-map .leaflet-popup-pane,
.enaire-print-map .leaflet-control-container,
.enaire-print-map .leaflet-top,
.enaire-print-map .leaflet-bottom {
    position: absolute;
}

.enaire-print-map .leaflet-pane,
.enaire-print-map .leaflet-tile,
.enaire-print-map .leaflet-marker-icon,
.enaire-print-map .leaflet-marker-shadow,
.enaire-print-map .leaflet-tile-container,
.enaire-print-map .leaflet-pane > svg,
.enaire-print-map .leaflet-pane > canvas,
.enaire-print-map .leaflet-zoom-box,
.enaire-print-map .leaflet-image-layer,
.enaire-print-map .leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.enaire-print-map .leaflet-container img,
.enaire-print-map .leaflet-tile,
.enaire-print-map .leaflet-marker-icon,
.enaire-print-map .leaflet-marker-shadow,
.enaire-print-map img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    width: 256px;
    height: 256px;
}

.enaire-print-map .leaflet-tile {
    border: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    user-select: none;
}

.enaire-print-map .leaflet-pane > svg,
.enaire-print-map .leaflet-overlay-pane svg,
.enaire-print-map .leaflet-zoom-animated svg {
    position: absolute;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
}

.enaire-print-map .leaflet-interactive {
    cursor: default;
}


.enaire-print-map .leaflet-tile {
    filter: saturate(0.85) contrast(0.95);
}

.enaire-print-map-help {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.enaire-print-map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 260px;
    color: #64748b;
    font-weight: 700;
}

body.enaire-printing {
    background: #fff !important;
}

body.enaire-printing .app-content {
    width: 680px !important;
    max-width: 680px !important;
    min-width: 680px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

body.enaire-printing .enaire-print-card,
body.enaire-printing .card {
    width: 100% !important;
    max-width: 100% !important;
}

body.enaire-printing .enaire-print-map {
    height: 360px !important;
    min-height: 360px !important;
    width: 100% !important;
}

body.enaire-printing .enaire-print-map.leaflet-container {
    height: 360px !important;
    min-height: 360px !important;
    width: 100% !important;
}

@media (max-width: 767px) {
    .enaire-print-map {
        height: 340px;
        min-height: 340px;
    }

    .enaire-print-map.leaflet-container {
        height: 340px;
        min-height: 340px;
    }
}

@media print {
    .enaire-print-map-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .enaire-print-map {
        height: 360px !important;
        min-height: 360px !important;
        width: 100% !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .enaire-print-map.leaflet-container {
        height: 360px !important;
        min-height: 360px !important;
        width: 100% !important;
    }

    .enaire-print-map .leaflet-container img,
    .enaire-print-map .leaflet-tile,
    .enaire-print-map .leaflet-marker-icon,
    .enaire-print-map .leaflet-marker-shadow,
    .enaire-print-map img.leaflet-tile {
        max-width: none !important;
        max-height: none !important;
        width: 256px !important;
        height: 256px !important;
    }

    .enaire-print-map .leaflet-pane > svg,
    .enaire-print-map .leaflet-overlay-pane svg,
    .enaire-print-map .leaflet-zoom-animated svg {
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .leaflet-control-container {
        display: none !important;
    }
    
    .enaire-print-page-break-before {
        break-before: page;
        page-break-before: always;
    }
}

/* ===============================
   OPERACIONES - ENAIRE INACTIVO
================================= */

.operation-enaire-module-inactive {
    margin: 8px 0 0;
    color: #b42318 !important;
    font-weight: 800;
    line-height: 1.45;
}




/* ===============================
   PÚBLICO / LANDING COMERCIAL
================================= */

.public-page {
    background: #f4f7fb;
}

.public-header {
    min-height: 72px;
    padding: 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.public-header__brand a {
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
}

.public-header__nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.public-header__nav a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.public-header__nav a:hover {
    color: var(--primary);
}

.public-main {
    width: 100%;
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 32px;
    align-items: center;
    padding: 70px 24px;
    max-width: 1180px;
    margin: 0 auto;
}

.public-eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 13px;
    font-weight: 800;
}

.public-hero h1 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.public-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.public-hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.public-hero__panel {
    display: grid;
    gap: 16px;
}

.public-hero-card,
.public-feature-card,
.public-plan-card,
.public-trial-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.public-hero-card {
    padding: 22px;
}

.public-hero-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 22px;
}

.public-hero-card span {
    color: var(--muted);
    line-height: 1.45;
}

.public-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 24px;
}

.public-section--soft {
    max-width: none;
    background: #eef4fb;
}

.public-section--soft > * {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.public-section__header {
    max-width: 760px;
    margin-bottom: 28px;
}

.public-section__header h1,
.public-section__header h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 38px;
    line-height: 1.15;
}

.public-section__header p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.public-feature-grid,
.public-plan-grid {
    display: grid;
    gap: 18px;
}

.public-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-plan-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
}

.public-feature-card {
    padding: 22px;
}

.public-feature-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 21px;
}

.public-feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.public-plan-card {
    position: relative;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.public-plan-card.is-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(15, 76, 129, 0.12), var(--shadow);
}

.public-plan-badge {
    align-self: flex-start;
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.public-plan-card h2,
.public-plan-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    line-height: 1.2;
}

.public-plan-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.public-plan-price {
    margin-top: 4px;
}

.public-plan-price strong {
    color: var(--text);
    font-size: 30px;
    line-height: 1;
}

.public-plan-price span {
    color: var(--muted);
    font-weight: 700;
}

.public-plan-discount {
    color: #166534 !important;
    font-weight: 800;
    font-size: 13px;
}

.public-plan-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.7;
}

.public-plan-card .btn {
    margin-top: auto;
}

.public-cta {
    margin: 40px auto 70px;
    max-width: 980px;
    padding: 42px 24px;
    border-radius: 24px;
    background: #111827;
    color: #ffffff;
    text-align: center;
}

.public-cta h2 {
    margin: 0 0 12px;
    font-size: 36px;
    line-height: 1.15;
}

.public-cta p {
    max-width: 720px;
    margin: 0 auto 22px;
    color: #d1d5db;
    line-height: 1.55;
}

.public-register-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 28px;
    align-items: start;
}

.public-register-copy h1 {
    margin: 0 0 14px;
    font-size: 42px;
    line-height: 1.1;
}

.public-register-copy p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.public-trial-box {
    margin-top: 20px;
    padding: 20px;
}

.public-trial-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.public-trial-box ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.7;
}

.public-register-form {
    margin-bottom: 0;
}

@media (max-width: 1199px) {
    .public-plan-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .public-hero,
    .public-register-layout {
        grid-template-columns: 1fr;
    }

    .public-hero h1 {
        font-size: 42px;
    }

    .public-feature-grid,
    .public-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .public-hero,
    .public-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .public-hero h1 {
        font-size: 34px;
    }

    .public-section__header h1,
    .public-section__header h2,
    .public-cta h2 {
        font-size: 30px;
    }

    .public-feature-grid,
    .public-plan-grid {
        grid-template-columns: 1fr;
    }

    .public-header__nav {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .public-header__nav .btn {
        width: 100%;
    }
}

/* ===============================
   COMERCIAL - USO Y LÍMITES
================================= */

.commercial-usage-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
}

.commercial-usage-box strong {
    display: block;
    margin-bottom: 3px;
    color: #1e3a8a;
    font-size: 14px;
}

.commercial-usage-box span,
.commercial-usage-box small {
    color: #1e40af;
    line-height: 1.35;
}

.commercial-usage-box p {
    flex: 1 1 100%;
    margin: 0;
    color: #92400e;
    font-weight: 700;
}

.commercial-usage-box.is-limit-reached {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #92400e;
}

.commercial-usage-box.is-limit-reached strong,
.commercial-usage-box.is-limit-reached span,
.commercial-usage-box.is-limit-reached small {
    color: #92400e;
}

@media (max-width: 767px) {
    .commercial-usage-box {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ===============================
   COMERCIAL - DEMO DE MÓDULOS
================================= */

.commercial-demo-card {
    overflow: hidden;
}

.commercial-demo-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: stretch;
}

.commercial-demo-copy {
    min-width: 0;
}

.commercial-demo-copy h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 30px;
    line-height: 1.2;
}

.commercial-demo-copy p {
    color: var(--muted);
    line-height: 1.55;
}

.commercial-demo-plan-box {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
}

.commercial-demo-plan-box strong {
    display: block;
    margin-bottom: 5px;
    color: #1e3a8a;
}

.commercial-demo-plan-box span {
    color: #1e40af;
}

.commercial-demo-benefits {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.commercial-demo-benefits h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.commercial-demo-benefits ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.7;
}

.commercial-demo-image-box {
    position: relative;
    min-height: 380px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #e5e7eb;
    overflow: hidden;
}

.commercial-demo-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
}

.commercial-demo-missing {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    min-height: 380px;
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

.commercial-demo-missing strong {
    color: var(--text);
    font-size: 20px;
}

.commercial-demo-missing code {
    word-break: break-all;
}

.commercial-demo-image-box.is-missing-image .commercial-demo-missing {
    display: flex;
}

@media (max-width: 991px) {
    .commercial-demo-layout {
        grid-template-columns: 1fr;
    }

    .commercial-demo-image-box,
    .commercial-demo-image,
    .commercial-demo-missing {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .commercial-demo-image-box,
    .commercial-demo-image,
    .commercial-demo-missing {
        min-height: 220px;
    }
}

/* ===============================
   SIDEBAR - MÓDULOS DEMO
================================= */

.sidebar-section-title {
    display: block;
    padding: 8px 14px 4px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-demo-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    vertical-align: middle;
}

.sidebar nav a.is-active .sidebar-demo-badge {
    background: #fde68a;
    color: #78350f;
}

/* ===============================
   COMERCIAL - SOLICITUD DE PLAN
================================= */

.public-plan-request {
    margin-top: auto;
}

.public-plan-request summary {
    list-style: none;
    cursor: pointer;
}

.public-plan-request summary::-webkit-details-marker {
    display: none;
}

.public-plan-request-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.public-plan-request-form .form-group {
    margin-bottom: 12px;
}

.public-plan-request-form textarea {
    min-height: 90px;
}

/* ===============================
   COMERCIAL - CHECKOUT MANUAL
================================= */

.commercial-checkout-card {
    overflow: hidden;
}

.commercial-checkout-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
    gap: 22px;
    align-items: start;
}

.commercial-checkout-summary,
.commercial-checkout-instructions {
    min-width: 0;
}

.commercial-checkout-row,
.commercial-checkout-total {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.commercial-checkout-row span,
.commercial-checkout-total span {
    color: var(--muted);
    font-weight: 700;
}

.commercial-checkout-row strong,
.commercial-checkout-total strong {
    color: var(--text);
    text-align: right;
}

.commercial-checkout-total {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
}

.commercial-checkout-total strong {
    color: #1e3a8a;
    font-size: 24px;
}

.commercial-payment-box {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
}

.commercial-payment-box > div {
    margin-bottom: 14px;
}

.commercial-payment-box > div:last-child {
    margin-bottom: 0;
}

.commercial-payment-box span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.commercial-payment-box strong {
    display: block;
    color: var(--text);
    word-break: break-word;
}

.commercial-payment-box p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

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

.commercial-checkout-step {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
    opacity: 0.65;
}

.commercial-checkout-step.is-active {
    border-color: #bfdbfe;
    background: #eff6ff;
    opacity: 1;
}

.commercial-checkout-step strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.commercial-checkout-step span {
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 991px) {
    .commercial-checkout-grid,
    .commercial-checkout-steps {
        grid-template-columns: 1fr;
    }

    .commercial-checkout-row,
    .commercial-checkout-total {
        align-items: flex-start;
        flex-direction: column;
    }

    .commercial-checkout-row strong,
    .commercial-checkout-total strong {
        text-align: left;
    }
}

