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

body {
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 10px;
}

/* ─────────────────────────────────────────
   CONTENEDOR PRINCIPAL
───────────────────────────────────────── */
.container {
    background: #1e293b;
    padding: 24px 20px;
    border-radius: 15px;
    width: 100%;
    max-width: 620px;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    margin-top: 0;
    font-size: 1.4rem;
}

/* ─────────────────────────────────────────
   NAVEGACIÓN DE MÓDULOS (page-nav)
───────────────────────────────────────── */
.page-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 20px;
    background: #334155;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: #2563eb;
    color: white;
}

.nav-link.active {
    background: #3b82f6;
    color: white;
    border-color: #60a5fa;
}

/* ─────────────────────────────────────────
   TABS
───────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Evita overflow en pantallas muy pequeñas */
}

.tab {
    flex: 1;
    min-width: 90px;  /* FIX MÓVIL: No colapsa en pantallas angostas */
    padding: 10px 6px;
    cursor: pointer;
    background: #334155;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: background 0.2s;
    user-select: none;
}

.tab:hover {
    background: #2563eb;
}

.tab.active {
    background: #3b82f6;
    font-weight: bold;
}

/* ─────────────────────────────────────────
   FORMULARIOS
───────────────────────────────────────── */
form {
    text-align: left;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 12px;
    margin-bottom: 4px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: white;
    font-size: 16px; /* FIX MÓVIL: Evita zoom automático en iOS */
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: #3b82f6;
}

/* ─────────────────────────────────────────
   SELECT (WAN tipo enlace)
───────────────────────────────────────── */
.select-tipo {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: white;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

.select-tipo:focus {
    border-color: #3b82f6;
}

/* ─────────────────────────────────────────
   RADIO BUTTONS
───────────────────────────────────────── */
.label-modo {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 12px 0 6px;
    text-align: left;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    text-align: left;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: white;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #3b82f6;
}

/* ─────────────────────────────────────────
   BOTÓN
───────────────────────────────────────── */
button {
    width: 100%;
    padding: 13px;
    margin-top: 14px;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #2563eb;
}

/* ─────────────────────────────────────────
   RESULTADO
───────────────────────────────────────── */
.resultado {
    margin-top: 20px;
    background: #334155;
    padding: 15px;
    border-radius: 8px;
    max-height: 420px;      /* FIX: Más espacio para tablas grandes */
    overflow-y: auto;
    text-align: left;
    line-height: 1.7;
}

/* Buscador dentro del resultado */
.resultado input[type="text"],
#buscador {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #1e293b;
    color: white;
    font-size: 15px;
    margin-bottom: 10px;
}

/* ─────────────────────────────────────────
   TABLA DE SUBREDES — FIX MÓVIL PRINCIPAL
───────────────────────────────────────── */
.table-wrapper {
    width: 100%;
    overflow-x: auto;           /* FIX MÓVIL: Tabla scrolleable horizontalmente */
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table {
    width: 100%;
    min-width: 340px;           /* FIX MÓVIL: Evita que las columnas colapsen */
    border-collapse: collapse;
    font-size: 0.85rem;         /* FIX MÓVIL: Texto más compacto en pantalla pequeña */
}

th, td {
    padding: 8px 6px;
    border: 1px solid #475569;
    text-align: center;
    white-space: nowrap;        /* FIX MÓVIL: No rompe IPs en varias líneas */
}

th {
    background: #3b82f6;
    cursor: pointer;
    user-select: none;
    font-size: 0.82rem;
}

th:hover {
    background: #2563eb;
}

td {
    background: #1e293b;
}

tr:hover td {
    background: #334155;
}

/* ─────────────────────────────────────────
   UTILIDADES
───────────────────────────────────────── */
.hidden {
    display: none;
}

/* ─────────────────────────────────────────
   APP HEADER — SubnetiumX
───────────────────────────────────────── */
.app-header {
    width: 100%;
    max-width: 820px;
    text-align: center;
    padding: 28px 16px 16px;
}

.app-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.app-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #f1f5f9;
    line-height: 1;
}

.app-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ─────────────────────────────────────────
   FOOTER actualizado
───────────────────────────────────────── */
footer {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding: 24px 16px;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-brand {
    color: #64748b;
    font-size: 0.82rem;
}

.footer-support {
    font-size: 0.85rem;
    color: #94a3b8;
}

.footer-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ─────────────────────────────────────────
   RESPONSIVE — pantallas <= 480px
───────────────────────────────────────── */
@media (max-width: 480px) {
    .container {
        padding: 16px 14px;
        border-radius: 10px;
    }

    h2 {
        font-size: 1.2rem;
    }

    .tab {
        font-size: 0.78rem;
        padding: 9px 4px;
    }

    .table {
        font-size: 0.78rem;
    }

    th, td {
        padding: 6px 4px;
    }

    button {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* ─────────────────────────────────────────
   BOTONES DE EXPORTACIÓN
───────────────────────────────────────── */
.export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-export {
    flex: 1;
    min-width: 140px;
    padding: 11px 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: inline-block;
    border: none;
    color: white;
    margin-top: 0;
    width: auto;
}

.btn-export:active {
    transform: scale(0.97);
}

.btn-pdf {
    background: #dc2626;
    color: white;
}

.btn-pdf:hover {
    background: #b91c1c;
}

.btn-excel {
    background: #16a34a;
    color: white;
}

.btn-excel:hover {
    background: #15803d;
}

.btn-json {
    background: #d97706;
}

.btn-json:hover {
    background: #b45309;
}

.btn-csv-dl {
    background: #0891b2;
}

.btn-csv-dl:hover {
    background: #0e7490;
}

@media (max-width: 480px) {
    .export-buttons {
        flex-direction: column;
    }
    .btn-export {
        width: 100%;
    }
}


/* ═══════════════════════════════════════════
   MÓDULOS VLSM Y WAN — estilos específicos
═══════════════════════════════════════════ */

/* Badge de módulo junto al h2 */
.badge-mod {
    display: inline-block;
    background: #1d4ed8;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    vertical-align: middle;
    letter-spacing: 0.05em;
    margin-left: 6px;
}

.badge-wan {
    background: #0f766e;
}

/* Descripción de página */
.page-desc {
    color: #94a3b8;
    font-size: 0.88rem;
    margin: -8px 0 18px;
    text-align: center;
}

/* ── Inputs VLSM/WAN ─────────────────────── */
.vlsm-inputs {
    background: #0f172a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
    text-align: left;
}

.input-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
}

.input-group--small {
    max-width: 130px;
    min-width: 100px;
}

.input-group label {
    margin-top: 0;
}

/* ── Nota WAN ────────────────────────────── */
.wan-note {
    font-size: 0.82rem;
    color: #64748b;
    margin: 12px 0 0;
    border-left: 3px solid #0f766e;
    padding-left: 8px;
    line-height: 1.4;
}

/* ── Sección de departamentos/enlaces ───── */
.dept-section {
    background: #0f172a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.dept-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dept-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
}

.btn-add {
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    margin-top: 0;
    transition: background 0.2s;
}

.btn-add:hover {
    background: #2563eb;
}

/* ── Fila de departamento/enlace ─────────── */
.dept-row {
    background: #1e293b;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #334155;
    transition: border-color 0.2s;
}

.dept-row:hover {
    border-color: #3b82f6;
}

.dept-row-inner {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.dept-nombre {
    flex: 2;
    min-width: 140px;
}

.dept-hosts {
    flex: 1;
    min-width: 110px;
}

/* Botón eliminar fila */
.btn-remove {
    background: #7f1d1d;
    color: #fca5a5;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    margin-top: 0;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 0;
    transition: background 0.2s;
}

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

/* ── Botones de acción principales ─────── */
.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.btn-calc {
    flex: 2;
    background: #3b82f6;
    margin-top: 0;
}

.btn-calc:hover {
    background: #2563eb;
}

.btn-clear {
    flex: 1;
    background: #475569;
    margin-top: 0;
}

.btn-clear:hover {
    background: #334155;
}

/* ── Área de resultados VLSM/WAN ─────────── */
.vlsm-resultado {
    margin-top: 20px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 18px;
    text-align: left;
    overflow-x: auto;
}

.vlsm-error {
    background: #450a0a;
    border: 1px solid #991b1b;
    border-radius: 8px;
    padding: 14px 16px;
    color: #fca5a5;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Summary cards ────────────────────────── */
.vlsm-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.summary-item {
    background: #1e293b;
    border-radius: 8px;
    padding: 10px 14px;
    flex: 1;
    min-width: 110px;
    border-left: 3px solid #3b82f6;
}

.summary-item.libre {
    border-left-color: #16a34a;
}

.summary-item.agotado {
    border-left-color: #dc2626;
}

.s-label {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.s-val {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
}

/* ── Títulos de sección dentro de resultado ── */
.section-title {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #1e293b;
}

/* ── Bloque espacio libre ─────────────────── */
.libre-block {
    background: #052e16;
    border: 1px solid #166534;
    border-radius: 8px;
    padding: 12px 16px;
    color: #86efac;
    font-size: 0.88rem;
    margin-top: 16px;
    line-height: 1.5;
}

.libre-block code {
    background: #14532d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ── Tables VLSM ─────────────────────────── */
.vlsm-plan-table,
.vlsm-assign-table,
.wan-table {
    min-width: 600px;
}

.vlsm-assign-table th:nth-child(3),
.vlsm-assign-table td:nth-child(3),
.wan-table th:nth-child(3),
.wan-table td:nth-child(3) {
    font-family: monospace;
}

/* ── WAN: colorear filas por tipo ─────────── */
.row-30 td {
    background: #0f1f3d;
}

.row-30:hover td {
    background: #172554;
}

.row-31 td {
    background: #0a1f1e;
}

.row-31:hover td {
    background: #134e4a;
}

/* ── Leyenda WAN ─────────────────────────── */
.wan-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    background: #1e293b;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.83rem;
    color: #94a3b8;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-30 { background: #3b82f6; }
.dot-31 { background: #2dd4bf; }

/* ── Celda de notas WAN ──────────────────── */
.notas-cell {
    font-size: 0.78rem;
    color: #64748b;
    white-space: normal;
    min-width: 160px;
    text-align: left;
}

/* ── code inline ─────────────────────────── */
code {
    background: #1e293b;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #7dd3fc;
    font-family: 'Courier New', monospace;
}

/* ═══════════════════════════════════════════
   MÓDULO HOSTS — badge y estilos propios
═══════════════════════════════════════════ */

.badge-host {
    background: #7c3aed;
}

/* Panel contenedor de cada sección */
.host-panel {
    background: #0f172a;
    border-radius: 10px;
    padding: 18px 16px;
    margin-top: 4px;
}

/* Área de resultado */
.host-resultado {
    margin-top: 20px;
}

/* ── Cards de resultado ────────────────────── */
.host-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.host-card {
    background: #1e293b;
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 3px solid #3b82f6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.host-card--main {
    border-left-color: #7c3aed;
    background: #1a1040;
    grid-column: 1 / -1;   /* ocupa todo el ancho */
}

.hc-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hc-value {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.hc-big {
    font-size: 1.8rem;
    color: #a78bfa;
}

.hc-sub {
    font-size: 0.75rem;
    color: #475569;
}

.hc-range-sep {
    color: #475569;
    font-weight: 400;
    margin: 0 2px;
}

/* ── Alerta de resultado ───────────────────── */
.host-alert {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 4px;
}

.host-ok {
    background: #052e16;
    border: 1px solid #166534;
    color: #86efac;
}

.host-warn {
    background: #431407;
    border: 1px solid #9a3412;
    color: #fdba74;
}

.host-alert code {
    background: rgba(255,255,255,0.1);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* ── Responsive VLSM/WAN ─────────────────── */
@media (max-width: 600px) {
    .input-row {
        flex-direction: column;
    }
    .input-group--small {
        max-width: 100%;
    }
    .dept-row-inner {
        flex-direction: column;
    }
    .btn-remove {
        align-self: flex-start;
    }
    .action-row {
        flex-direction: column;
    }
    .vlsm-summary {
        flex-direction: column;
    }
    .summary-item {
        min-width: 100%;
    }
}



/* ════════════════════════════════════════════════════
   SNLX UI — Sidebar · Modales · Acordeón
   Agregar AL FINAL de style.css
   Todas las clases usan prefijo .snlx- para evitar
   conflictos con estilos existentes
════════════════════════════════════════════════════ */

/* ── Botón hamburguesa ── */
.snlx-hamburger {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1100;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.snlx-hamburger:hover {
    background: #3b82f6;
    border-color: #60a5fa;
}

/* ── Overlay ── */
.snlx-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1050;
    backdrop-filter: blur(2px);
}

.snlx-overlay.snlx-active {
    display: block;
}

/* ── Sidebar ── */
.snlx-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 80%;
    max-width: 300px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}

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

.snlx-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px;
    border-bottom: 1px solid #1e293b;
}

.snlx-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.02em;
}

.snlx-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
}

.snlx-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-family: Arial, sans-serif;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.snlx-nav-item:hover {
    background: #1e293b;
    color: #f1f5f9;
}

.snlx-nav-item:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.snlx-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: #94a3b8;
}

.snlx-nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.snlx-nav-item:hover .snlx-nav-icon {
    color: #bfdbfe;
}

.snlx-nav-item-install {
    margin: 4px 0;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
    color: #eaf2ff;
}

.snlx-nav-item-install .snlx-nav-icon {
    color: #60a5fa;
}

.snlx-nav-item-install:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.42);
}

.snlx-hamburger svg,
.snlx-menu-icon svg,
.snlx-close-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}

.snlx-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Botón de cierre compartido */
.snlx-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
}

.snlx-close-btn:hover {
    background: #1e293b;
    color: #f1f5f9;
}

/* ── Modal base ── */
.snlx-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1300;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.snlx-modal.snlx-active {
    display: flex;
}

.snlx-modal-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    animation: snlxFadeIn 0.25s ease-out;
}

.snlx-modal-box--sm {
    max-width: 360px;
}

@keyframes snlxFadeIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.snlx-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}

.snlx-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
}

.snlx-modal-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

/* ── Acordeón ── */
.snlx-accordion {
    border: 1px solid #334155;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.snlx-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    background: #0f172a;
    border: none;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.snlx-accordion-header:hover {
    background: #1e3a5f;
    color: #f1f5f9;
}

.snlx-accordion-header.snlx-open {
    background: #1e3a5f;
    color: #60a5fa;
}

.snlx-accordion-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease-in-out;
    flex-shrink: 0;
    margin-left: 8px;
}

.snlx-accordion-header.snlx-open .snlx-accordion-arrow {
    transform: rotate(180deg);
}

.snlx-accordion-body {
    display: none;
    padding: 14px 16px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
}

.snlx-accordion-body.snlx-open {
    display: block;
    animation: snlxSlideDown 0.25s ease-out;
}

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

.snlx-accordion-body p {
    margin: 0 0 8px;
}

.snlx-accordion-body pre {
    background: #0a1120;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #7dd3fc;
    overflow-x: auto;
    margin: 6px 0 10px;
    line-height: 1.55;
}

.snlx-accordion-body code {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.83rem;
}

/* ── Botón PDF dentro del modal ── */
.snlx-pdf-row {
    margin-top: 16px;
    text-align: center;
}

.snlx-btn-pdf {
    display: inline-block;
    padding: 10px 22px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s;
}

.snlx-btn-pdf:hover {
    background: #2563eb;
}

/* ── Modal Acerca de ── */
.snlx-acerca-body {
    text-align: center;
    padding: 28px 20px 32px;
}

.snlx-acerca-nombre {
    font-size: 1.4rem;
    font-weight: 900;
    color: #f1f5f9;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.snlx-acerca-autor {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0 0 8px;
}

.snlx-acerca-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 16px;
}

.snlx-acerca-version {
    display: inline-block;
    background: #0f172a;
    color: #3b82f6;
    border: 1px solid #1e3a5f;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .snlx-modal-box {
        max-height: 92vh;
        border-radius: 10px;
    }
    .snlx-hamburger {
        top: 10px;
        left: 10px;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}


.snlx-sidebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.snlx-menu-icon {
    font-size: 1rem;
    color: #94a3b8;
}

.snlx-nav-item {
    margin: 2px 0;
}

.snlx-modal-title {
    white-space: nowrap;
}
/* Evitar que el botón global afecte el cierre */
.snlx-close-btn {
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
    margin: 0 !important;
}

/* FIX FINAL — alineación header y botón cerrar */
.snlx-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.snlx-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.snlx-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.snlx-close-btn {
    margin-left: auto;
    flex-shrink: 0;
}
/* Estilo pqra eo boton de escribirme que se encuentra en acerca de mi */
#snlxFeedbackInput,
.snlx-feedback-box textarea {
    width: 100%;
    resize: none;
    min-height: 80px;

    border-radius: 8px;
    border: 1px solid #334155;

    background: #0f172a;
    color: #f1f5f9;

    padding: 10px;
    font-size: 0.85rem;
    outline: none;
}

.snlx-feedback-box textarea::placeholder {
    color: #64748b;
}

.snlx-feedback-box textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Mensaje de alerta */
#snlx-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

#snlx-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* ═══════════════════════════════════════════
   CONTACTO Y PIE DE PÁGINA — versión pública segura
═══════════════════════════════════════════ */
.snlx-about-support {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.84rem;
    line-height: 1.55;
}
.snlx-about-support p { margin: 0 0 8px; }

.snlx-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
}
.snlx-social-link:hover { background: #1e293b; color: #f1f5f9; border-color: #475569; }

.snlx-contacto-body { padding: 22px 20px 24px; }
.snlx-contacto-intro {
    margin: 0 0 8px; color: #e2e8f0; font-size: 0.9rem; line-height: 1.5;
}
.snlx-contacto-privacidad,
.snlx-contacto-nota {
    margin: 0 0 16px; color: #64748b; font-size: 0.76rem; line-height: 1.5;
}
.snlx-feedback-box {
    display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.snlx-feedback-box label {
    color: #cbd5e1; font-size: 0.78rem; font-weight: 600;
}
.snlx-feedback-box label span { color: #64748b; font-weight: 400; }
.snlx-feedback-box input[type="email"],
.snlx-feedback-box textarea {
    box-sizing: border-box; width: 100%; border-radius: 8px;
    border: 1px solid #334155; background: #0f172a; color: #f1f5f9;
    padding: 10px; font-size: 0.85rem; outline: none;
}
.snlx-feedback-box input[type="email"] { min-height: 40px; }
.snlx-feedback-box textarea { resize: vertical; min-height: 110px; }
.snlx-feedback-box input[type="email"]:focus,
.snlx-feedback-box textarea:focus {
    border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6;
}
.snlx-feedback-box input::placeholder,
.snlx-feedback-box textarea::placeholder { color: #64748b; }

.snlx-bot-trap {
    position: absolute !important; left: -10000px !important; top: auto !important;
    width: 1px !important; height: 1px !important; overflow: hidden !important;
    opacity: 0 !important; pointer-events: none !important;
}
.snlx-btn-feedback {
    margin-top: 4px; padding: 10px 16px; border: 1px solid #2563eb;
    border-radius: 8px; background: #2563eb; color: #fff;
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
}
.snlx-btn-feedback:hover { background: #1d4ed8; }

.footer-description {
    max-width: 760px; margin: 8px auto 10px; padding: 0 16px;
    color: #94a3b8; font-size: 0.78rem; line-height: 1.5; text-align: center;
}
.footer-links {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px 14px; margin-top: 8px;
}
.footer-link-button { font: inherit; cursor: pointer; }
.footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    line-height: 1.35;
    color: #94a3b8;
    text-decoration: none;
}
.footer-link:hover { color: #f1f5f9; }


.snlx-instagram-icon,
.snlx-paypal-icon {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex: 0 0 20px;
}



/* Iconografía SVG compartida: alineación uniforme en toda la interfaz */
.snlx-inline-icon {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    vertical-align: -0.16em;
}
.snlx-modal-title, .snlx-accordion-header, .nav-link, .btn-calc, .btn-clear,
.btn-export, .btn-remove, .footer-contact-link, .footer-link {
    align-items: center;
}
.snlx-modal-title { display: inline-flex; gap: 0.5rem; }
.snlx-accordion-header > span:first-child { display: inline-flex; align-items: center; gap: 0.5rem; }
.snlx-accordion-arrow { display: inline-flex; align-items: center; justify-content: center; }
.snlx-chevron-icon { width: 16px; height: 16px; transition: transform 0.2s ease; }
.snlx-close-icon { display: block; width: 20px; height: 20px; }
.nav-link { display: inline-flex; justify-content: center; gap: 0.4rem; }
.btn-calc, .btn-clear, .btn-export { display: inline-flex; justify-content: center; gap: 0.45rem; }
.btn-remove { display: inline-flex; align-items: center; justify-content: center; }
.btn-remove .snlx-inline-icon { width: 16px; height: 16px; }
.status-inline { display: inline-flex; align-items: center; gap: 0.4rem; }
.snlx-conversion-result .snlx-inline-icon { width: 18px; height: 18px; vertical-align: -0.2em; }
.footer-contact-link, .footer-support a { display: inline-flex; gap: 0.4rem; }
