:root {
    --color-bg: #f2f4fa;
    --color-surface: #ffffff;
    --color-border: #e6e9f2;
    --color-text: #1f2430;
    --color-text-muted: #6b7280;
    --color-primary: #ff7a29;
    --color-primary-dark: #e8630f;
    --color-primary-light: #fb923c;
    --color-primary-soft: rgba(255, 122, 41, 0.12);
    --color-topbar-start: #ff9142;
    --color-topbar-end: #ff5a1f;
    --color-success: #16a34a;
    --color-success-bg: #dcfce7;
    --color-warning: #ca8a04;
    --color-warning-bg: #fef9c3;
    --color-danger: #dc2626;
    --color-danger-bg: #fee2e2;
    --color-info: #0891b2;
    --color-info-bg: #cffafe;
    --color-muted-bg: #e5e7eb;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(20, 24, 38, 0.06), 0 6px 20px rgba(20, 24, 38, 0.05);
    --topbar-height: 64px;
    --sidebar-width: 240px;
}

:root[data-theme="dark"] {
    --color-bg: #10131c;
    --color-surface: #1b1f2c;
    --color-border: #2b3040;
    --color-text: #e9ebf3;
    --color-text-muted: #9aa1b8;
    --color-primary-soft: rgba(255, 122, 41, 0.18);
    --color-success-bg: rgba(22, 163, 74, 0.18);
    --color-warning-bg: rgba(202, 138, 4, 0.18);
    --color-danger-bg: rgba(220, 38, 38, 0.18);
    --color-info-bg: rgba(8, 145, 178, 0.18);
    --color-muted-bg: #2a2f3d;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #10131c;
        --color-surface: #1b1f2c;
        --color-border: #2b3040;
        --color-text: #e9ebf3;
        --color-text-muted: #9aa1b8;
        --color-primary-soft: rgba(255, 122, 41, 0.18);
        --color-success-bg: rgba(22, 163, 74, 0.18);
        --color-warning-bg: rgba(202, 138, 4, 0.18);
        --color-danger-bg: rgba(220, 38, 38, 0.18);
        --color-info-bg: rgba(8, 145, 178, 0.18);
        --color-muted-bg: #2a2f3d;
    }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

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

svg.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ----- Shell: topbar + sidebar + content ----- */
.app-shell { min-height: 100vh; }

.topbar {
    height: var(--topbar-height);
    background: linear-gradient(120deg, var(--color-topbar-start), var(--color-topbar-end));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
}

.topbar-brand .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.25); }

.topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    display: none;
}

.topbar-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 0 12px;
    height: 38px;
    max-width: 420px;
}

.topbar-search svg { opacity: 0.85; }

.topbar-search input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.9rem;
    width: 100%;
}

.topbar-search input::placeholder { color: rgba(255, 255, 255, 0.75); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 0.72rem;
    margin-right: 7px;
    vertical-align: -5px;
    flex-shrink: 0;
}

.card h2 .field-icon { vertical-align: -3px; }

.avatar-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.avatar-badge-lg { width: 48px; height: 48px; font-size: 1.05rem; }

/* ----- Portal: menu desplegable del perfil (tarjeta arriba + opciones) ----- */
.kx5-profile .dropdown-menu.kx5-profile-menu {
    min-width: 250px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}
.kx5-profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-primary-soft);
}
.kx5-profile-menu-info { display: flex; flex-direction: column; min-width: 0; }
.kx5-profile-menu-info strong { font-size: 0.92rem; }
.kx5-profile-menu-info span {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kx5-profile-menu .dropdown-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}
.kx5-profile-menu .dropdown-item i { width: 16px; text-align: center; color: var(--color-text-muted); }
.kx5-profile-menu .dropdown-item.text-danger i { color: var(--color-danger); }

.shell-body {
    display: flex;
    align-items: flex-start;
}

/* ----- Sidebar ----- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 28, 0.5);
    z-index: 39;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    min-height: calc(100vh - var(--topbar-height));
    position: sticky;
    top: var(--topbar-height);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    transition: transform 0.25s ease;
}

.sidebar-section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: 14px 10px 6px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    border-left: 3px solid transparent;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav-item:hover { background: var(--color-bg); text-decoration: none; }

.nav-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

.nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon svg { width: 16px; height: 16px; }

/* ----- Grupo desplegable del sidebar (submenus) ----- */
.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    border: none;
    border-left: 3px solid transparent;
    background: none;
    color: var(--color-text);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.nav-group-toggle:hover { background: var(--color-bg); }

.nav-group-toggle .chevron {
    margin-left: auto;
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
    transform: rotate(-90deg);
    transition: transform 0.2s ease;
}

.nav-group.open .nav-group-toggle .chevron { transform: rotate(0deg); }

.nav-subitems {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    padding-left: 40px;
    transition: max-height 0.25s ease;
}

.nav-group.open .nav-subitems { max-height: 260px; }

.nav-subitem {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.86rem;
    border-left: 3px solid transparent;
}

.nav-subitem:hover { background: var(--color-bg); color: var(--color-text); text-decoration: none; }

.nav-subitem.active {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 10px 4px;
    font-size: 0.76rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

.badge-teal { background: rgba(20, 184, 166, .15); color: #0d9488; }
.badge-purple { background: rgba(139, 92, 246, .15); color: #7c3aed; }
.badge-orange { background: rgba(251, 146, 60, .15); color: #ea580c; }
.badge-green { background: rgba(34, 197, 94, .15); color: #16a34a; }
.badge-pink { background: rgba(236, 72, 153, .15); color: #db2777; }
.badge-indigo { background: rgba(99, 102, 241, .15); color: #4f46e5; }
.badge-blue { background: rgba(59, 130, 246, .15); color: #2563eb; }
.badge-amber { background: rgba(245, 158, 11, .15); color: #d97706; }

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 40;
        transform: translateX(-100%);
        box-shadow: var(--shadow);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.open { display: block; }
    .topbar-search { display: none; }
}

@media (min-width: 992px) {
    .topbar-title { display: block; }
}

/* ----- Content ----- */
.content {
    flex: 1;
    min-width: 0;
    padding: 20px 16px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ----- Dashboard: banner, quick actions, stats ----- */
.welcome-banner {
    background: linear-gradient(120deg, var(--color-primary), #ff5a1f);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.welcome-banner h2 { margin: 4px 0 0; font-size: 1.4rem; }
.welcome-banner .welcome-date { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.85rem; opacity: 0.95; }
.welcome-banner svg { width: 46px; height: 46px; opacity: 0.85; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .quick-actions { grid-template-columns: repeat(4, 1fr); }
}

.quick-action-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
}

.quick-action-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform 0.15s ease; }

.quick-action-card .nav-icon { width: 48px; height: 48px; border-radius: 14px; }
.quick-action-card .nav-icon svg { width: 22px; height: 22px; }

/* ----- Portal de clientes: circulos de icono reutilizados (accesos rapidos,
   metodos de pago en Reportar pago, etc.) ----- */
.portal-quick-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.15s ease;
}

.portal-card-hero {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 24px;
    padding: 22px 24px;
    color: #fff;
    box-shadow: 0 14px 26px -14px rgba(20, 24, 38, 0.35);
}

.portal-card-hero::before, .portal-card-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.portal-card-hero::before { width: 150px; height: 150px; top: -60px; right: -40px; }
.portal-card-hero::after { width: 90px; height: 90px; bottom: -40px; right: 50px; background: rgba(255, 255, 255, 0.1); }

.portal-card-hero.tone-purple { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.portal-card-hero.tone-pink { background: linear-gradient(135deg, #db2777, #f472b6); }

.portal-card-hero h2 { color: #fff; position: relative; z-index: 1; border-bottom-color: rgba(255, 255, 255, 0.25); }
.portal-card-hero .field { position: relative; z-index: 1; }
.portal-card-hero .field label { color: rgba(255, 255, 255, 0.85); }
.portal-card-hero .field span { color: #fff; font-weight: 700; }
.portal-card-hero .field-icon { background: rgba(255, 255, 255, 0.22); color: #fff; }
.portal-card-hero .empty-state { color: rgba(255, 255, 255, 0.9); position: relative; z-index: 1; }
.portal-card-hero .badge {
    align-self: flex-start;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(20, 24, 38, 0.18);
}
.portal-card-hero .badge.badge-success { background: #dcfce7; color: #15803d; }
.portal-card-hero .badge.badge-warning { background: #fef9c3; color: #a16207; }
.portal-card-hero .badge.badge-danger { background: #fee2e2; color: #b91c1c; }
.portal-card-hero .badge.badge-info { background: #cffafe; color: #0e7490; }
.portal-card-hero .badge.badge-muted { background: #e5e7eb; color: #374151; }

/* ----- Portal: reportar pago (pasos, metodo de pago, dropzone) ----- */
.report-step { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.report-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.pay-method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.pay-method-option {
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: var(--color-surface);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    text-align: center;
}
.pay-method-option:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.pay-method-option.selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.pay-method-label { font-size: 0.78rem; font-weight: 600; }

/* ----- Portal: simulacion del menu de WiFi de un celular (Mi WiFi) ----- */
.wifi-preview {
    margin-top: 14px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
}
.wifi-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}
.wifi-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.9rem;
}
.wifi-preview-item:last-child { border-bottom: none; }
.wifi-preview-item > i:first-child { color: var(--color-text-muted); width: 16px; text-align: center; }
.wifi-preview-item > i.fa-lock { color: var(--color-text-muted); font-size: 0.75rem; }
.wifi-preview-name { font-weight: 600; color: var(--color-text); overflow-wrap: anywhere; }
.wifi-preview-sub { font-size: 0.72rem; color: var(--color-primary-dark); font-weight: 600; margin-top: 1px; }
.wifi-preview-item-mine { background: var(--color-primary-soft); }
.wifi-preview-item-mine > i:first-child { color: var(--color-primary); }
.wifi-preview-item-faded { opacity: 0.55; }

/* ----- Portal: lista de dispositivos conectados (tarjetas en vez de tabla) ----- */
.device-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border);
}
.device-row:last-child { border-bottom: none; }
.device-row-icon-wrap { position: relative; flex-shrink: 0; }
.device-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.device-row-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--color-text-muted);
    border: 2px solid var(--color-surface);
}
.device-row-dot.is-on {
    background: var(--color-success);
    animation: device-row-pulse 2s infinite;
}
@keyframes device-row-pulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
    70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.device-row.is-inactive { opacity: 0.5; }
.device-row.is-inactive .device-row-icon { filter: grayscale(1); }

.device-row-main { flex: 1; min-width: 0; }
.device-row-name { font-weight: 700; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row-sub { font-size: 0.76rem; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.device-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; text-align: right; }
.device-row-time { font-size: 0.72rem; color: var(--color-text-muted); white-space: nowrap; }

@media (max-width: 640px) {
    .device-row { flex-wrap: wrap; }
    .device-row-meta { align-items: flex-start; text-align: left; width: 100%; padding-left: 54px; flex-direction: row; }
}

/* ----- Portal: lista de facturas (tarjetas en vez de tabla) ----- */
.invoice-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--color-border);
}
.invoice-row:last-child { border-bottom: none; }
.invoice-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.invoice-row-main { flex: 1; min-width: 0; }
.invoice-row-title { font-weight: 700; color: var(--color-text); text-transform: capitalize; }
.invoice-row-sub { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 1px; }
.invoice-row-amounts { text-align: right; flex-shrink: 0; }
.invoice-row-total { font-weight: 800; color: var(--color-text); font-size: 1.02rem; }
.invoice-row-paid { font-size: 0.76rem; color: var(--color-text-muted); margin-top: 1px; }
.invoice-row-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; margin-left: 6px; }

@media (max-width: 640px) {
    .invoice-row { flex-wrap: wrap; }
    .invoice-row-amounts { order: 3; text-align: left; padding-left: 54px; width: 100%; }
    .invoice-row-status { order: 2; margin-left: auto; }
}

.invoice-row.js-invoice-toggle { cursor: pointer; }
.invoice-row.js-invoice-toggle:hover { background: var(--color-bg); border-radius: 10px; }

.invoice-payments {
    background: var(--color-bg);
    border-radius: 10px;
    padding: 4px 14px;
    margin: 2px 0 8px 54px;
}
.invoice-payment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.82rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}
.invoice-payment-item:last-child { border-bottom: none; }
.invoice-payment-item i.fa-circle-check { color: var(--color-success); }
.invoice-payment-monto { font-weight: 700; color: var(--color-text); }

@media (max-width: 640px) {
    .invoice-payments { margin-left: 0; }
}

/* ----- Portal: seleccion de paquete (Cambiar de paquete) ----- */
.plan-option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.plan-option {
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 16px 14px;
    cursor: pointer;
    text-align: center;
    background: var(--color-surface);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.plan-option:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.plan-option.selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.plan-option-name { font-weight: 700; color: var(--color-text); margin-bottom: 6px; }
.plan-option-speed { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 8px; }
.plan-option-price { font-size: 1.15rem; font-weight: 800; color: var(--color-primary); }
.plan-option-price span { font-size: 0.72rem; font-weight: 600; color: var(--color-text-muted); }

.dropzone {
    display: block;
    border: 2px dashed var(--color-border);
    border-radius: 18px;
    padding: 30px 16px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--color-success); background: var(--color-success-bg); }
.dropzone i { font-size: 2rem; color: var(--color-primary); }
.dropzone-text { font-weight: 600; margin-top: 8px; }
.dropzone-filename { margin-top: 8px; font-weight: 700; font-size: 0.85rem; color: var(--color-success); }
.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.stat-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .stat-cards { grid-template-columns: repeat(3, 1fr); }
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card .nav-icon { width: 44px; height: 44px; border-radius: 12px; }
.stat-card .nav-icon svg { width: 20px; height: 20px; }
.stat-card-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); }
.stat-card-value { font-size: 1.3rem; font-weight: 700; }

/* ----- Componentes generales ----- */
.page-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-header h1 { margin: 0; font-size: 1.5rem; }

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

.card h2 {
    margin-top: 0;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-bg); }
.btn-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--color-success-bg); color: var(--color-success); }
.btn-success:hover { background: #bbf7d0; }
.btn-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.btn-warning:hover { background: #fef08a; }
.btn-info { background: var(--color-info-bg); color: var(--color-info); }
.btn-info:hover { background: #a5f3fc; }
.btn-sm { padding: 5px 10px; font-size: 0.82rem; }
.btn-icon { padding: 7px 9px; gap: 0; }
.btn-icon i { font-size: 0.85rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ----- Visual de NAP (mini grafico tipo caja terminal) ----- */
.nap-device {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--color-surface), var(--color-bg));
    min-width: 90px;
}

.nap-device-ports {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 96px;
}

.nap-port-dot {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--color-muted-bg);
}

.nap-port-dot.free { background: var(--color-success); }
.nap-port-dot.occupied { background: var(--color-danger); }

.nap-device-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.port-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.port-cell {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.port-cell .port-number {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.75;
    margin-bottom: 2px;
}

.port-cell.free { background: var(--color-success-bg); color: var(--color-success); }
.port-cell.occupied { background: var(--color-danger-bg); color: var(--color-danger); }

.port-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; font-size: 0.85rem; }
.port-legend span { display: inline-flex; align-items: center; gap: 6px; }
.port-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.port-legend .dot.free { background: var(--color-success); }
.port-legend .dot.occupied { background: var(--color-danger); }

/* ----- Breadcrumb ----- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb svg { width: 14px; height: 14px; }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--color-text); font-weight: 600; }

/* ----- Pestanas tipo pildora (filtros de estado en listados) ----- */
.pill-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.pill-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pill-tab:hover { text-decoration: none; background: var(--color-primary-soft); color: var(--color-primary-dark); }

.pill-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ----- Tarjetas de conteo compactas (fila de estadisticas cortas) ----- */
.stat-cards.compact { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 768px) {
    .stat-cards.compact { grid-template-columns: repeat(4, 1fr); }
}

.stat-cards.compact .stat-card { padding: 12px 14px; gap: 10px; }
.stat-cards.compact .stat-card-value { font-size: 1.15rem; }

/* ----- Tabs ----- */
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-link:hover { text-decoration: none; color: var(--color-text); }

.tab-link.active {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary);
}

.tab-link svg { width: 16px; height: 16px; }

/* ----- Barra de botones de accion (circulares) ----- */
.action-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 8px;
}

.action-toolbar form { display: contents; }

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--color-text);
    width: 82px;
    text-align: center;
    font-family: inherit;
}

.action-btn:hover { text-decoration: none; color: var(--color-text); }

.action-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.action-circle svg { width: 20px; height: 20px; }

.action-btn:hover .action-circle { filter: brightness(1.08); }

.action-circle.bg-green { background: var(--color-success); }
.action-circle.bg-amber { background: var(--color-warning); }
.action-circle.bg-blue { background: #2563eb; }
.action-circle.bg-red { background: var(--color-danger); }
.action-circle.bg-indigo { background: #4f46e5; }

/* ----- Formularios ----- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
    .form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field .badge, .field .badge-soft { align-self: flex-start; }
.field.span-2 { grid-column: 1 / -1; }

.field label { font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted); }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="tel"],
.field select,
.field textarea {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.field-hint { font-size: 0.78rem; color: var(--color-text-muted); }

.repeatable-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.repeatable-row input { flex: 1; }

/* ----- Alertas / badges ----- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.9rem; }
.alert-success { background: var(--color-success-bg); color: #14532d; }
.alert-danger { background: var(--color-danger-bg); color: #7f1d1d; }
.alert-info { background: var(--color-info-bg); color: #164e63; }

:root[data-theme="dark"] .alert-success, :root:not([data-theme="light"]) .alert-success { color: #86efac; }
:root[data-theme="dark"] .alert-danger, :root:not([data-theme="light"]) .alert-danger { color: #fca5a5; }
:root[data-theme="dark"] .alert-info, :root:not([data-theme="light"]) .alert-info { color: #67e8f9; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info { background: var(--color-info-bg); color: var(--color-info); }
.badge-muted { background: var(--color-muted-bg); color: var(--color-text-muted); }

/* ----- Tabla responsiva (colapsa a tarjetas en movil) ----- */
.table-wrap { overflow-x: auto; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
table.data-table th, table.data-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
table.data-table th { color: var(--color-text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.data-table tbody tr:hover { background: var(--color-bg); }

@media (max-width: 767px) {
    table.data-table thead { display: none; }
    table.data-table, table.data-table tbody, table.data-table tr, table.data-table td { display: block; width: 100%; }
    table.data-table tr { border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 12px; padding: 8px 4px; background: var(--color-surface); }
    table.data-table td { border-bottom: none; padding: 8px 12px; display: flex; justify-content: space-between; gap: 12px; }
    table.data-table td::before { content: attr(data-label); font-weight: 600; color: var(--color-text-muted); font-size: 0.78rem; }
    table.data-table td.cell-block { display: block; }
    table.data-table td.cell-block::before { display: none; }
}

/* ----- Fila estilo "producto" (kronix): avatar/icono + titulo + subtitulo + badges ----- */
.kx-row { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.kx-row-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}
.kx-row-thumb.bg-fibra { background: linear-gradient(135deg, #6366f1, #818cf8); }
.kx-row-thumb.bg-inalambrica { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.kx-row-body { min-width: 0; }
.kx-row-title { font-weight: 700; color: var(--color-text); display: block; }
.kx-row-title:hover { color: var(--color-primary); }
.kx-row-subtitle { color: var(--color-text-muted); font-size: 0.82rem; margin-top: 2px; }
.kx-row-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-muted-bg);
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.badge-soft-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-soft-muted { background: var(--color-muted-bg); color: var(--color-text-muted); }

.kx-row-actions-group { display: inline-flex; align-items: center; gap: 6px; }
.kx-row-actions-group form { margin: 0; display: inline-flex; }
.kx-row-actions { display: inline-block; }
.kx-row-actions .btn.dropdown-toggle::after { margin-left: 6px; vertical-align: 2px; }
.kx-row-actions .dropdown-menu { min-width: 180px; }
.kx-row-actions .dropdown-item { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.kx-row-actions form { margin: 0; }
.kx-row-actions form .dropdown-item { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }

.filters-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .filters-bar { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
}

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--color-text-muted);
}

.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.85rem;
}
.pagination .active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ----- DataTables (tema oscuro/naranja) ----- */
.dataTables_wrapper { color: var(--color-text); }

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 10px 0;
}

.dataTables_wrapper .dataTables_filter { float: right; }
.dataTables_wrapper .dataTables_length { float: left; }
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 6px; }

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    padding: 6px 10px;
}

.dataTables_wrapper .dataTables_filter input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: 0.4; cursor: default; }

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    background: var(--color-primary-soft) !important;
    color: var(--color-primary-dark) !important;
    border-color: var(--color-primary) !important;
}

table.dataTable thead th { position: relative; cursor: pointer; padding-right: 22px !important; }

table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    content: '\2195';
    position: absolute;
    right: 10px;
    opacity: 0.4;
}

table.dataTable thead th.sorting_asc:after { content: '\2191'; opacity: 0.9; }
table.dataTable thead th.sorting_desc:after { content: '\2193'; opacity: 0.9; }

.dataTables_processing {
    color: var(--color-text-muted);
    padding: 10px;
    text-align: center;
}

.dt-clearfix::after { content: ''; display: table; clear: both; }


/* ----- Indicadores del inicio (pagos / clientes / tickets) ----- */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 22px;
}

@media (min-width: 992px) {
    .dash-grid { grid-template-columns: repeat(3, 1fr); }
}

.dash-group { display: flex; flex-direction: column; gap: 10px; }
.dash-group-titulo { margin: 0 0 4px; font-size: 1.05rem; font-weight: 600; color: var(--color-text); }

.dash-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
}

.dash-card-link:hover { border-color: var(--color-primary); }
.dash-card-valor { font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.dash-card-etiqueta { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); margin-top: 2px; }
.dash-icono { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.dash-icono svg { width: 22px; height: 22px; }

.dash-green { color: var(--color-success); }
.dash-amber { color: #d97706; }
.dash-blue { color: #2563eb; }
.dash-red { color: var(--color-danger); }
.dash-bg-green { background: rgba(34, 197, 94, .15); color: #16a34a; }
.dash-bg-amber { background: rgba(245, 158, 11, .15); color: #d97706; }
.dash-bg-blue { background: rgba(59, 130, 246, .15); color: #2563eb; }
.dash-bg-red { background: rgba(220, 38, 38, .12); color: #dc2626; }


/* ----- Historial de finanzas anual ----- */
.fin-anual {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px 12px;
    margin-bottom: 22px;
}
.fin-anual-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fin-anual-sub { font-size: .82rem; color: var(--color-text-muted); }
.fin-anual-nav { display: flex; align-items: center; gap: 10px; }
.fin-anual-nav .disabled { pointer-events: none; opacity: .4; }
.fin-anual-anio { font-weight: 700; font-size: 1.1rem; }
.fin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fin-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; }
.fin-kpi-e { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
.fin-kpi-v { font-size: 1.25rem; font-weight: 700; }
.fin-kpi-d { font-size: .75rem; color: var(--color-text-muted); }
.fin-leyenda { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.fin-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--color-border); background: transparent; color: var(--color-text); border-radius: 999px; padding: 4px 12px; font-size: .8rem; cursor: pointer; opacity: .45; }
.fin-chip.on { opacity: 1; }
.fin-punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.fin-chip .fin-punto { margin-right: 0; }
.fin-grafica { position: relative; }
.fin-svg { width: 100%; height: auto; display: block; }
.fin-grid { stroke: var(--color-border); stroke-width: 1; stroke-dasharray: 3 4; }
.fin-cero { stroke-dasharray: none; stroke: var(--color-text-muted); }
.fin-eje { font-size: 12px; fill: var(--color-text-muted); }
.fin-barra { transition: opacity .15s; }
.fin-zona:hover { fill: color-mix(in srgb, var(--color-primary) 7%, transparent); }
.fin-tooltip { position: absolute; z-index: 5; pointer-events: none; background: #1f2937; color: #fff; border-radius: 10px; padding: 10px 12px; font-size: .8rem; line-height: 1.5; box-shadow: 0 6px 20px rgba(0,0,0,.25); min-width: 200px; }
.fin-tooltip[hidden] { display: none; }
.fin-tip-fact { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.2); color: #cbd5e1; }

/* ----- Selector de ubicacion en mapa ----- */
.map-picker-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.map-picker-overlay[hidden] { display: none; }
.map-picker-modal { background: var(--color-surface); border-radius: var(--radius); width: min(860px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.map-picker-head, .map-picker-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.map-picker-search { display: flex; gap: 8px; padding: 0 16px 10px; }
.map-picker-search input { flex: 1; }
#mapPickerMapa { height: 420px; width: 100%; }

/* ----- Registro manual de servicio ----- */
.srv-manual-toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.srv-opciones { display: flex; gap: 10px; flex-wrap: wrap; }
.srv-opcion { border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.srv-opcion.activa { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); font-weight: 600; }
.srv-opcion input { display: none; }
.srv-auto { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(37, 99, 235, .07); }
.srv-auto-fila { display: flex; gap: 8px; align-items: center; }
.srv-auto-fila input { flex: 1; }

.srv-titulo { font-size: 1rem; margin: 22px 0 10px; color: var(--color-text); }
[hidden] { display: none !important; }

.card-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-cabecera h2 { margin: 0; }

/* ----- Etiquetas (asuntos y fallas) ----- */
.tag-lista { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid var(--color-border); border-radius: 10px; padding: 12px; min-height: 52px; }
.tag { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 12px 5px 8px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px; font-size: .9rem; }
.tag-x { border: 0; background: transparent; color: var(--color-text-muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.tag-x:hover { color: var(--color-danger); }

/* ----- Controles de formulario con el mismo diseno aunque no esten dentro de .field ----- */
.field input[type="date"], .field input[type="time"], .field input[type="search"], .field input[type="url"], .field input[type="datetime-local"],
.card input[type="text"],
.card input[type="email"],
.card input[type="password"],
.card input[type="number"],
.card input[type="tel"],
.card input[type="date"],
.card input[type="time"],
.card input[type="search"],
.card input[type="url"],
.card input[type="datetime-local"],
.card select,
.card textarea,
.map-picker-modal input[type="text"],
.map-picker-modal input[type="email"],
.map-picker-modal input[type="password"],
.map-picker-modal input[type="number"],
.map-picker-modal input[type="tel"],
.map-picker-modal input[type="date"],
.map-picker-modal input[type="time"],
.map-picker-modal input[type="search"],
.map-picker-modal input[type="url"],
.map-picker-modal input[type="datetime-local"],
.map-picker-modal select,
.map-picker-modal textarea,
.page-header input[type="text"],
.page-header input[type="email"],
.page-header input[type="password"],
.page-header input[type="number"],
.page-header input[type="tel"],
.page-header input[type="date"],
.page-header input[type="time"],
.page-header input[type="search"],
.page-header input[type="url"],
.page-header input[type="datetime-local"],
.page-header select,
.page-header textarea,
.btn-row input[type="text"],
.btn-row input[type="email"],
.btn-row input[type="password"],
.btn-row input[type="number"],
.btn-row input[type="tel"],
.btn-row input[type="date"],
.btn-row input[type="time"],
.btn-row input[type="search"],
.btn-row input[type="url"],
.btn-row input[type="datetime-local"],
.btn-row select,
.btn-row textarea {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    max-width: 100%;
}
.card input[type="text"], .card input[type="email"], .card input[type="password"], .card input[type="number"], .card input[type="tel"], .card input[type="date"], .card input[type="time"], .card input[type="search"], .card select, .card textarea, .map-picker-modal input[type="text"] { min-height: 42px; }
.card textarea { width: 100%; min-height: 0; }
.card input:focus, .card select:focus, .card textarea:focus, .map-picker-modal input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.card input[type="checkbox"], .card input[type="radio"] { accent-color: var(--color-primary); }

/* ----- Buscador de cliente ----- */
.picker { position: relative; }
.picker .picker-input { width: 100%; padding-right: 40px; }
.picker .picker-input.elegido { border-color: var(--color-primary); font-weight: 600; }
.picker-limpiar { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--color-text-muted); cursor: pointer; padding: 2px 8px; }
.picker-limpiar:hover { color: var(--color-danger); }
.picker-lista { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.picker-lista[hidden] { display: none; }
.picker-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--color-border); }
.picker-item:last-child { border-bottom: 0; }
.picker-item small { color: var(--color-text-muted); font-size: .78rem; }
.picker-item:hover, .picker-item.activo { background: var(--color-primary-soft); }
.picker-vacio { padding: 12px 14px; color: var(--color-text-muted); font-size: .9rem; }

/* ----- Mikrotiks: tarjetas ----- */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-bottom: 24px; }
.mk-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.mk-card.mk-inactivo { opacity: .75; }
.mk-cabecera { display: flex; align-items: center; gap: 12px; }
.mk-titulo { flex: 1; min-width: 0; }
.mk-titulo h3 { margin: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-ip { font-size: .8rem; color: var(--color-text-muted); }
.mk-punto { width: 12px; height: 12px; border-radius: 50%; background: #9ca3af; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(156,163,175,.2); }
.mk-punto.mk-on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.mk-punto.mk-off { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.22); }
.mk-punto.mk-probando { background: #f59e0b; animation: mkPulso 1s infinite; }
@keyframes mkPulso { 50% { opacity: .35; } }
.mk-ubicacion { font-size: .85rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; }
.mk-ubicacion svg { width: 15px; height: 15px; }
.mk-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-cifras div { background: var(--color-bg, rgba(148,163,184,.12)); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.mk-cifras strong { font-size: 1.15rem; }
.mk-cifras span { font-size: .72rem; color: var(--color-text-muted); }
.mk-estado { min-height: 54px; font-size: .85rem; }
.mk-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.mk-datos div { display: flex; flex-direction: column; }
.mk-datos span { font-size: .7rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.mk-datos b { font-size: .88rem; word-break: break-word; }
.mk-error { color: var(--color-danger); }
.mk-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.mk-acciones form { margin: 0; }
.mk-vacio { text-align: center; padding: 40px 20px; }
.mk-check { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-weight: 400; }

/* ----- Mikrotik: trafico en vivo ----- */
.mk-trafico { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1000px) { .mk-trafico { grid-template-columns: minmax(0, 1fr) 320px; } }
.mk-trafico h3 { margin: 0 0 6px; font-size: 1rem; }
.mk-svg { width: 100%; height: auto; display: block; }
.mk-leyenda { display: flex; gap: 18px; justify-content: center; font-size: .85rem; font-weight: 600; margin-top: 4px; }
.mk-leyenda i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; }
.mk-trafico-lateral { display: flex; flex-direction: column; gap: 16px; }
.mk-tarjeta-verde { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.mk-tarjeta-titulo { background: #22c55e; color: #fff; font-weight: 700; padding: 10px 14px; }
.mk-tarjeta-cuerpo { padding: 14px; font-size: .9rem; }
.mk-barra { height: 16px; background: rgba(148,163,184,.2); border-radius: 8px; margin-top: 10px; overflow: hidden; }
.mk-barra div { height: 100%; background: linear-gradient(90deg, #38bdf8, #0ea5e9); transition: width .4s; }
.mk-totales div { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.mk-totales div:last-child { border-bottom: 0; }

/* Mikrotiks: botones de accion de la tarjeta */
.mk-grid { grid-template-columns: repeat(auto-fill, minmax(min(410px, 100%), 1fr)); }
.mk-acciones { gap: 6px; margin: auto 0 0; justify-content: space-between; border-top: 1px solid var(--color-border); padding-top: 12px; }
.mk-acciones .action-btn { width: 70px; font-size: .68rem; line-height: 1.2; text-decoration: none; }
.mk-acciones .action-btn:disabled { opacity: .55; cursor: progress; }

/* SweetAlert2: eliminar Mikrotik */
.swal-mk-popup { border-radius: 20px !important; padding: 28px 24px 22px !important; font-family: inherit !important; }
.swal-mk-popup .swal2-title { font-size: 1.45rem; font-weight: 800; }
.swal-mk-nombre { display: inline-block; margin: 4px 0 10px; padding: 6px 16px; border-radius: 999px; background: rgba(239,68,68,.12); color: #dc2626; font-weight: 700; font-size: 1.05rem; }
.swal-mk-impacto { text-align: left; background: rgba(245,158,11,.12); border-left: 4px solid #f59e0b; border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: .92rem; }
.swal-mk-impacto ul { margin: 6px 0 0 18px; padding: 0; }
.swal-mk-pide { margin: 14px 0 4px; font-size: .9rem; color: var(--color-text-muted); }
.swal-mk-btn { border-radius: 999px !important; padding: 11px 26px !important; font-weight: 700 !important; }
.swal-mk-popup .swal2-icon.swal2-warning { animation: mkSacudir .6s ease .2s 1; }
@keyframes mkSacudir { 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }

/* Mikrotik: tipo de corte */
.mk-corte-badge { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--color-text-muted); }
.mk-corte-badge svg { width: 15px; height: 15px; color: #f59e0b; }
.mk-corte-badge b { color: var(--color-text); }
.mk-opciones-corte { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .mk-opciones-corte { grid-template-columns: 1fr; } }
.mk-opcion-corte { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--color-border); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.mk-opcion-corte.activa { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 7%, transparent); }
.mk-opcion-corte small { display: block; color: var(--color-text-muted); font-size: .78rem; margin-top: 2px; font-weight: 400; }
.mk-opcion-corte input { margin-top: 4px; accent-color: var(--color-primary); }

.mk-bloque-sync { border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; }
.mk-bloque-sync h3 { margin-top: 0; }
.mk-opcion-check input { margin-top: 4px; }

/* Mikrotik: seis botones de accion en una sola fila */
.mk-acciones { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.mk-acciones .action-btn { width: auto; font-size: .66rem; }
.mk-acciones .action-circle { width: 42px; height: 42px; }
.action-circle.bg-teal { background: #0d9488; }

/* Direccion publica y pagina de aviso automatica */
.mk-url-publica { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mk-aviso-auto { border: 1px dashed var(--color-border); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.mk-aviso-url { margin: 6px 0; padding: 6px 10px; background: rgba(148,163,184,.14); border-radius: 8px; font-family: monospace; font-size: .8rem; word-break: break-all; }

/* Dialogo de reglas de bloqueo: eleccion de la interfaz WAN */
.swal-mk-lista { text-align: left; margin: 6px 0 12px 22px; font-size: .92rem; }
.swal-mk-wan-caja { text-align: left; border: 1px solid var(--color-border); border-radius: 12px; padding: 12px 14px; background: rgba(34,197,94,.06); }
.swal-mk-wan-caja > b { display: block; color: #166534; }
.swal-mk-wan-caja small { display: block; color: var(--color-text-muted); margin: 2px 0 8px; }
.swal-mk-wan-lista { max-height: 190px; overflow-y: auto; }
.swal-mk-wan { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.swal-mk-wan:hover { background: rgba(34,197,94,.12); }
.swal-mk-wan input { accent-color: #16a34a; }
.swal-mk-wan-error { color: #dc2626; }

/* Facturacion: tabla de facturas y ventana de registrar pago */
.fx-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fx-filtro { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: .86rem; cursor: pointer; font-family: inherit; }
.fx-filtro:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.fx-filtro.activo { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 30%, transparent); }
.fx-folio { font-weight: 800; font-size: 1.02rem; }
.fx-sub { font-size: .78rem; color: var(--color-text-muted); margin-top: 2px; }
.fx-vencida { color: #dc2626; font-weight: 700; }
.fx-cliente { font-weight: 700; }
.fx-acceso { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.fx-tipo { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; }
.fx-tipo.ip { background: rgba(59,130,246,.14); color: #1d4ed8; }
.fx-tipo.pppoe { background: rgba(139,92,246,.14); color: #6d28d9; }
.fx-zona { display: inline-block; padding: 4px 11px; border-radius: 999px; background: rgba(100,116,139,.12); font-weight: 600; font-size: .82rem; }
.fx-total { font-weight: 800; font-size: 1.08rem; margin-bottom: 4px; }
.fx-tabla .fx-pagar { white-space: nowrap; font-weight: 700; padding: 8px 16px; }

.fx-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.6); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fx-overlay[hidden] { display: none; }
body.fx-sin-scroll { overflow: hidden; }
.fx-modal { background: var(--color-surface); width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.fx-modal-cab { display: flex; align-items: center; gap: 14px; padding: 18px 22px; color: #fff; background: linear-gradient(135deg, #22c55e, #15803d); }
.fx-modal-cab h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.fx-modal-cab p { margin: 2px 0 0; font-size: .86rem; opacity: .92; }
.fx-modal-icono { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: none; }
.fx-cerrar { margin-left: auto; align-self: flex-start; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.22); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.fx-modal-cuerpo { padding: 20px 22px 22px; overflow-y: auto; }
.fx-ficha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; padding: 14px 16px; border-radius: 14px; background: var(--color-bg, #f6f7fb); border: 1px solid var(--color-border); margin-bottom: 18px; }
.fx-ficha span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); font-weight: 600; }
.fx-ficha b { font-size: .95rem; word-break: break-word; }
.fx-estado { font-style: normal; font-weight: 700; }
.fx-estado.ok { color: #16a34a; } .fx-estado.mal { color: #d97706; }
.fx-monto label, .fx-grupo label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 6px; }
.fx-monto-caja { position: relative; }
.fx-monto-caja span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 800; color: var(--color-text-muted); }
.fx-modal .fx-monto-caja input { width: 100%; padding: 12px 14px 12px 38px; font-size: 1.9rem; font-weight: 900; border: 2px solid var(--color-border); border-radius: 14px; background: var(--color-surface); color: var(--color-text); min-height: 62px; }
.fx-monto small { display: block; margin-top: 6px; font-size: .8rem; color: var(--color-text-muted); }
.fx-monto small.fx-aviso { color: #b45309; font-weight: 600; }
.fx-monto small.fx-info { color: #1d4ed8; font-weight: 600; }
.fx-grupo { margin-top: 16px; }
.fx-formas { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.fx-forma { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border: 2px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text); font-weight: 700; font-size: .88rem; cursor: pointer; font-family: inherit; text-align: left; }
.fx-forma.sel { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 10%, transparent); color: var(--color-primary-dark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent); }
.fx-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fx-modal input[type=text], .fx-modal input[type=datetime-local] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-family: inherit; font-size: .95rem; }
.fx-modal input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.fx-modal-pie { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.fx-modal-pie .btn { padding: 11px 22px; font-weight: 700; }
@media (max-width: 560px) { .fx-ficha, .fx-dos { grid-template-columns: 1fr; } .fx-modal-pie .btn { flex: 1; justify-content: center; } .fx-overlay { padding: 8px; } }

@media (max-width: 767px) {
    .fx-tabla td { align-items: center; }
    .fx-tabla td .fx-cel { min-width: 0; text-align: right; margin-left: auto; }
    .fx-tabla .fx-acceso { justify-content: flex-end; }
    .fx-tabla .fx-pagar { width: 100%; padding: 11px 16px; }
    .fx-tabla td:last-child .fx-cel { width: 100%; margin-left: 0; }
    .fx-tabla td:last-child::before { display: none; }
}

@media (max-width: 767px) {
    .fx-tabla, .fx-tabla tbody, .fx-tabla tr, .fx-tabla td { box-sizing: border-box; max-width: 100%; }
}

@media (max-width: 767px) {
    table.data-table.fx-tabla td { width: auto; }
    table.data-table.fx-tabla tr { overflow: hidden; }
}

/* Facturacion > Facturas (estilo WispHub: filas desplegables, seleccion y botones de accion) */
.fx2-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 14px; }
.fx2-bloque { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fx2-largo { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .86rem; margin: 0; }
.fx2-largo select { min-height: 38px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); }
.fx2-grupo { display: flex; gap: 6px; flex-wrap: wrap; }
.fx2-etiqueta { font-weight: 600; font-size: .86rem; color: var(--color-text-muted); }
.fx2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 12px; border: 0; border-radius: 9px; color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.fx2-btn:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }
.fx2-btn.verde { background: #22b35e; } .fx2-btn.azul { background: #0ea5e9; } .fx2-btn.morado { background: #8b5cf6; } .fx2-btn.rojo { background: #ef4444; }
.fx2-contador { font-size: .8rem; font-weight: 700; color: var(--color-primary-dark); }
.fx2-buscar-global label { margin: 0; font-weight: 700; }
.fx2-buscar-global input { min-height: 40px; min-width: 240px; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); color: var(--color-text); }
.fx2-menu { position: relative; }
.fx2-menu-lista { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 210px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.18); padding: 8px; }
.fx2-menu-lista[hidden] { display: none; }
.fx2-menu-lista label, .fx2-menu-lista button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--color-text); cursor: pointer; margin: 0; text-align: left; font-family: inherit; }
.fx2-menu-lista label:hover, .fx2-menu-lista button:hover { background: color-mix(in srgb, var(--color-primary) 10%, transparent); }
.fx2-tabla { border-collapse: collapse; font-size: .9rem; }
.fx2-tabla thead th { text-align: left; font-weight: 800; font-size: .84rem; padding: 12px 10px; border-bottom: 2px solid var(--color-border); white-space: nowrap; }
.fx2-tabla thead tr.fx2-filtros-col th { padding: 6px 6px 10px; border-bottom: 3px solid var(--color-border); }
.fx2-tabla .fx2-fcol { width: 100%; min-width: 90px; min-height: 34px; padding: 4px 8px; font-size: .8rem; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-surface); color: var(--color-text); font-weight: 400; }
.fx2-tabla tbody td { padding: 11px 10px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.fx2-tabla tbody tr:hover > td { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.fx2-tabla tbody tr.fx2-marcada > td { background: rgba(99,102,241,.14); }
.fx2-tabla td.fx2-ctl, .fx2-tabla th.fx2-ctl { width: 46px; text-align: center; }
.fx2-tabla td.fx2-chk, .fx2-tabla th.fx2-chk { width: 40px; text-align: center; }
.fx2-tabla input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--color-primary); }
.fx2-mas { width: 26px; height: 26px; border-radius: 50%; border: 0; background: #3b82f6; color: #fff; font-size: .7rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.fx2-mas.menos { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.fx2-tabla tr.abierta > td { background: rgba(59,130,246,.1); }
.fx2-tabla tr.fx2-hija > td { padding: 0; background: var(--color-surface); }
.fx2-det { padding: 6px 18px 16px 62px; }
.fx2-det > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--color-border); max-width: 560px; }
.fx2-det b { min-width: 150px; font-size: .88rem; }
.fx2-det-acc > span { display: flex; gap: 8px; flex-wrap: wrap; }
.fx2-solo-movil { display: none !important; }
.fx2-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .86rem; color: var(--color-text-muted); }
.fx2-pie .dataTables_paginate .paginate_button { border-radius: 8px; }
@media (max-width: 991px) {
    .fx2-tabla th:nth-child(5), .fx2-tabla td:nth-child(5), .fx2-tabla th:nth-child(6), .fx2-tabla td:nth-child(6),
    .fx2-tabla th:nth-child(8), .fx2-tabla td:nth-child(8), .fx2-tabla th:nth-child(9), .fx2-tabla td:nth-child(9),
    .fx2-tabla th:nth-child(10), .fx2-tabla td:nth-child(10) { display: none; }
    .fx2-tabla tr.fx2-hija > td { display: table-cell; }
    .fx2-solo-movil { display: flex !important; }
    .fx2-det { padding-left: 16px; }
    .fx2-det b { min-width: 120px; }
    .fx2-buscar-global { width: 100%; }
    .fx2-buscar-global input { flex: 1; min-width: 0; }
}

@media (max-width: 991px) {
    .fx2-tabla thead tr.fx2-filtros-col { display: none; }
    .fx2-tabla { table-layout: auto; }
    .fx2-det > div { max-width: 100%; }
}

/* Facturas: columnas compactas (forma de pago + referencia + cajero juntos, usuario + tipo juntos) para que la tabla quepa sin desbordar */
.fx2-tabla { table-layout: auto; width: 100%; }
.fx2-tabla .fx2-fcol { min-width: 0; }
.fx2-tabla thead th { padding: 11px 8px; }
.fx2-tabla tbody td { padding: 10px 8px; }
.fx2-pago { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.fx2-pago b { font-size: .92rem; }
.fx2-pago span { font-size: .76rem; color: var(--color-text-muted); }
.fx2-monto { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.fx2-monto b { font-size: 1rem; }
.fx2-user { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.fx2-user-txt { font-weight: 600; word-break: break-all; }
@media (max-width: 991px) {
    /* Pago (5), Usuario (7) y Fecha (8) pasan a la fila desplegable; quedan +, casilla, #, cliente y total */
    .fx2-tabla th:nth-child(5), .fx2-tabla td:nth-child(5), .fx2-tabla th:nth-child(7), .fx2-tabla td:nth-child(7), .fx2-tabla th:nth-child(8), .fx2-tabla td:nth-child(8) { display: none; }
    .fx2-tabla th:nth-child(6), .fx2-tabla td:nth-child(6) { display: table-cell; }
}

/* ===== Facturas: filas como tarjetas (icono + info con chips + estado + costo + fecha + opciones) ===== */
.fx3-tabla { width: 100%; border-collapse: separate; border-spacing: 0 12px; margin-top: -4px; }
.fx3-tabla thead th { padding: 4px 14px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 800; text-align: left; border: 0; background: none; white-space: nowrap; }
.fx3-tabla .fx3-todas { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: inherit; cursor: pointer; }
.fx3-tabla input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--color-primary); }
.fx3-tabla tbody tr.fx3-fila { background: var(--color-surface); box-shadow: 0 2px 10px rgba(15,23,42,.07); transition: transform .15s, box-shadow .15s; }
.fx3-tabla tbody tr.fx3-fila:hover { box-shadow: 0 8px 22px rgba(15,23,42,.14); transform: translateY(-1px); }
.fx3-tabla tbody tr.fx3-marcada { outline: 2px solid var(--color-primary); }
.fx3-tabla tbody td { padding: 14px; border: 0; background: var(--color-surface); vertical-align: middle; }
.fx3-tabla tbody td:first-child { border-radius: 16px 0 0 16px; border-left: 6px solid #94a3b8; }
.fx3-tabla tbody td:last-child { border-radius: 0 16px 16px 0; }
.fx3-tabla tr.est-pagada td:first-child { border-left-color: #22c55e; }
.fx3-tabla tr.est-pendiente td:first-child { border-left-color: #f59e0b; }
.fx3-tabla tr.est-parcial td:first-child { border-left-color: #3b82f6; }
.fx3-tabla tr.est-vencida td:first-child { border-left-color: #ef4444; }
.fx3-tabla tr.est-anulada td:first-child { border-left-color: #94a3b8; }
.fx3-tabla tr.est-anulada .fx3-info, .fx3-tabla tr.est-anulada .fx3-costo { opacity: .6; }
.fx3-fac { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 64px; position: relative; }
.fx3-fac input { position: absolute; top: -6px; left: -6px; }
.fx3-fac b { font-size: .95rem; }
.fx3-icono { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.35rem; background: linear-gradient(135deg, #60a5fa, #3b82f6); box-shadow: 0 6px 14px rgba(59,130,246,.35); }
.est-pagada .fx3-icono { background: linear-gradient(135deg, #4ade80, #16a34a); box-shadow: 0 6px 14px rgba(22,163,74,.35); }
.est-pendiente .fx3-icono { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 6px 14px rgba(245,158,11,.4); }
.est-vencida .fx3-icono { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 6px 14px rgba(220,38,38,.35); }
.est-anulada .fx3-icono { background: linear-gradient(135deg, #cbd5e1, #94a3b8); box-shadow: none; }
.fx3-cliente { font-weight: 800; font-size: 1.02rem; color: var(--color-text); }
.fx3-cliente:hover { color: var(--color-primary-dark); }
.fx3-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.fx3-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(100,116,139,.1); border: 1px solid var(--color-border); font-size: .76rem; font-weight: 600; color: var(--color-text); white-space: nowrap; }
.fx3-chip .fa-solid { font-size: .72rem; color: var(--color-text-muted); }
.fx3-chip a { color: inherit; font-weight: 700; }
.fx3-chip.pppoe { background: rgba(139,92,246,.1); border-color: rgba(139,92,246,.25); color: #6d28d9; } .fx3-chip.pppoe .fa-solid { color: #8b5cf6; }
.fx3-chip.ip { background: rgba(14,165,233,.1); border-color: rgba(14,165,233,.25); color: #0369a1; } .fx3-chip.ip .fa-solid { color: #0ea5e9; }
.fx3-chip.activo { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: #15803d; } .fx3-chip.activo .fa-solid { color: #22c55e; font-size: .5rem; }
.fx3-chip.suspendido { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.35); color: #b45309; } .fx3-chip.suspendido .fa-solid { color: #f59e0b; font-size: .5rem; }
.fx3-chip.pago { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); color: #166534; } .fx3-chip.pago .fa-solid { color: #16a34a; }
.fx3-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; color: #fff; font-weight: 800; font-size: .85rem; white-space: nowrap; box-shadow: 0 6px 14px rgba(0,0,0,.14); }
.fx3-pill .fa-solid { font-size: .5rem; background: #fff; border-radius: 50%; padding: 4px; color: transparent; width: 10px; height: 10px; }
.fx3-pill.pendiente { background: linear-gradient(135deg, #fbbf24, #f59e0b); } .fx3-pill.pagada { background: linear-gradient(135deg, #4ade80, #16a34a); }
.fx3-pill.vencida { background: linear-gradient(135deg, #f87171, #dc2626); } .fx3-pill.parcial { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.fx3-pill.anulada { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.fx3-costo { min-width: 170px; font-size: .8rem; }
.fx3-costo > div { display: flex; justify-content: space-between; gap: 18px; }
.fx3-costo span { color: var(--color-text-muted); }
.fx3-costo em { font-style: normal; font-weight: 700; }
.fx3-costo em.neg { color: #ef4444; }
.fx3-costo .tot { margin-top: 3px; padding-top: 3px; border-top: 1px dashed var(--color-border); font-size: .98rem; }
.fx3-costo .tot span { font-weight: 700; color: var(--color-text); } .fx3-costo .tot em { font-weight: 900; color: #16a34a; }
.fx3-costo .tot.por-cobrar em { color: #ea580c; }
.fx3-fecha { display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.fx3-fecha b { font-size: 1.02rem; }
.fx3-fecha span { font-size: .78rem; color: var(--color-text-muted); }
.fx3-fecha span.venc { color: #dc2626; font-weight: 700; } .fx3-fecha span.pago { color: #16a34a; font-weight: 700; }
.fx3-ops { display: flex; gap: 8px; }
.fx3-op { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid transparent; color: #fff; font-size: .9rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s; }
.fx3-op:hover { transform: translateY(-2px); }
.fx3-op.azul { background: linear-gradient(135deg, #60a5fa, #3b82f6); box-shadow: 0 5px 12px rgba(59,130,246,.35); }
.fx3-op.verde { background: linear-gradient(135deg, #4ade80, #16a34a); box-shadow: 0 5px 12px rgba(22,163,74,.35); }
.fx3-op.claro { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text-muted); }
.fx3-op.rojo { background: var(--color-surface); border-color: #ef4444; color: #ef4444; }
.fx3-op.rojo:hover { background: #ef4444; color: #fff; }
@media (max-width: 991px) {
    .fx3-tabla thead { display: none; }
    .fx3-tabla, .fx3-tabla tbody { display: block; }
    .fx3-tabla tbody tr.fx3-fila { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 14px; border-radius: 16px; margin-bottom: 14px; border-left: 6px solid #94a3b8; }
    .fx3-tabla tr.est-pagada { border-left-color: #22c55e; } .fx3-tabla tr.est-pendiente { border-left-color: #f59e0b; }
    .fx3-tabla tr.est-parcial { border-left-color: #3b82f6; } .fx3-tabla tr.est-vencida { border-left-color: #ef4444; } .fx3-tabla tr.est-anulada { border-left-color: #94a3b8; }
    .fx3-tabla tbody td { display: block; padding: 0; border: 0 !important; border-radius: 0 !important; background: none; }
    .fx3-tabla td.fx3-c-fac { grid-column: 1; grid-row: 1 / span 2; }
    .fx3-tabla td.fx3-c-info { grid-column: 2; grid-row: 1; }
    .fx3-tabla td.fx3-c-estado { grid-column: 2; grid-row: 2; }
    .fx3-tabla td.fx3-c-costo { grid-column: 1 / -1; grid-row: 3; }
    .fx3-tabla td.fx3-c-fecha { grid-column: 1 / -1; grid-row: 4; }
    .fx3-tabla td.fx3-c-op { grid-column: 1 / -1; grid-row: 5; }
    .fx3-costo { min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(100,116,139,.07); }
    .fx3-fecha { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
    .fx3-ops .fx3-op { flex: 1; width: auto; }
    .fx3-fac input { top: -4px; left: -4px; }
}

@media (max-width: 991px) {
    .fx3-tabla, .fx3-tabla tbody { width: 100%; max-width: 100%; }
    .fx3-tabla tbody tr.fx3-fila { box-sizing: border-box; width: 100%; grid-template-columns: auto minmax(0, 1fr); }
    .fx3-tabla tbody td { min-width: 0; }
    .fx3-chip { white-space: normal; max-width: 100%; }
    .fx3-fecha { white-space: normal; }
}

@media (max-width: 991px) { .fx3-chip.pppoe, .fx3-chip.ip { white-space: nowrap; overflow: hidden; } .fx3-chip.pppoe a, .fx3-chip.ip a { overflow: hidden; text-overflow: ellipsis; } }

/* ===== Facturas: version compacta de las tarjetas (datos mas chicos, separacion real entre tarjetas) ===== */
table.dataTable.fx3-tabla { border-collapse: separate !important; border-spacing: 0 8px !important; border-bottom: 0 !important; margin: 0 !important; }
table.dataTable.fx3-tabla thead th { border-bottom: 0 !important; padding: 2px 10px 0; font-size: .66rem; }
table.dataTable.fx3-tabla.no-footer { border-bottom: 0 !important; }
table.dataTable.fx3-tabla tbody tr.fx3-fila { box-shadow: 0 1px 6px rgba(15,23,42,.08); }
table.dataTable.fx3-tabla tbody td { padding: 8px 10px; border: 0 !important; box-shadow: none; }
table.dataTable.fx3-tabla tbody td:first-child { border-left: 0 !important; box-shadow: inset 5px 0 0 #94a3b8; border-radius: 12px 0 0 12px; padding-left: 14px; }
table.dataTable.fx3-tabla tbody td:last-child { border-radius: 0 12px 12px 0; }
table.dataTable.fx3-tabla tr.est-pagada td:first-child { box-shadow: inset 5px 0 0 #22c55e; }
table.dataTable.fx3-tabla tr.est-pendiente td:first-child { box-shadow: inset 5px 0 0 #f59e0b; }
table.dataTable.fx3-tabla tr.est-parcial td:first-child { box-shadow: inset 5px 0 0 #3b82f6; }
table.dataTable.fx3-tabla tr.est-vencida td:first-child { box-shadow: inset 5px 0 0 #ef4444; }
table.dataTable.fx3-tabla tr.est-anulada td:first-child { box-shadow: inset 5px 0 0 #94a3b8; }
.fx3-fac { min-width: 46px; gap: 3px; }
.fx3-fac b { font-size: .75rem; }
.fx3-fac input { width: 15px; height: 15px; top: -4px; left: -8px; }
.fx3-icono { width: 36px; height: 36px; border-radius: 11px; font-size: .95rem; box-shadow: 0 3px 8px rgba(59,130,246,.3); }
.fx3-cliente { font-size: .88rem; }
.fx3-chips { gap: 4px; margin-top: 4px; }
.fx3-chip { padding: 2px 8px; font-size: .68rem; gap: 4px; }
.fx3-chip .fa-solid { font-size: .62rem; }
.fx3-pill { padding: 5px 13px; font-size: .72rem; gap: 6px; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.fx3-costo { min-width: 140px; font-size: .7rem; line-height: 1.35; }
.fx3-costo > div { gap: 12px; }
.fx3-costo .tot { font-size: .84rem; margin-top: 2px; padding-top: 2px; }
.fx3-fecha b { font-size: .86rem; }
.fx3-fecha span { font-size: .68rem; }
.fx3-ops { gap: 5px; }
.fx3-op { width: 30px; height: 30px; border-radius: 9px; font-size: .75rem; }
@media (max-width: 991px) {
    table.dataTable.fx3-tabla tbody tr.fx3-fila { padding: 10px 12px; gap: 8px 10px; margin-bottom: 8px; box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #94a3b8; }
    table.dataTable.fx3-tabla tr.est-pagada { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #22c55e; }
    table.dataTable.fx3-tabla tr.est-pendiente { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #f59e0b; }
    table.dataTable.fx3-tabla tr.est-parcial { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #3b82f6; }
    table.dataTable.fx3-tabla tr.est-vencida { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #ef4444; }
    table.dataTable.fx3-tabla tr.est-anulada { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #94a3b8; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila { border-left: 0; padding-left: 16px; }
    table.dataTable.fx3-tabla tbody td:first-child { box-shadow: none; padding-left: 0; }
    .fx3-costo { padding: 6px 10px; }
    .fx3-ops .fx3-op { height: 34px; }
}

/* Pagos pendientes: boton grande de cobro y dias de atraso */
.fx3-cobrar { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #4ade80, #16a34a); color: #fff; font-weight: 800; font-size: .8rem; cursor: pointer; box-shadow: 0 4px 12px rgba(22,163,74,.35); white-space: nowrap; font-family: inherit; transition: transform .12s; }
.fx3-cobrar:hover { transform: translateY(-2px); }
.fx3-dias { font-weight: 800 !important; }
.fx3-dias.venc { color: #dc2626 !important; } .fx3-dias.pronto { color: #d97706 !important; } .fx3-dias.ok { color: #16a34a !important; }
.fx-filtro .fa-solid, .fx-filtro .fa-regular { margin-right: 4px; }
@media (max-width: 991px) { .fx3-cobrar { width: 100%; justify-content: center; padding: 11px 16px; font-size: .9rem; } }

/* Movil: una sola franja de color por tarjeta (sobre la fila, no sobre la primera celda) */
@media (max-width: 991px) {
    table.dataTable.fx3-tabla tbody tr.fx3-fila td:first-child { box-shadow: none !important; border-radius: 0 !important; padding-left: 0 !important; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila { border-left: 0 !important; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila.est-pagada { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #22c55e; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila.est-pendiente { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #f59e0b; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila.est-parcial { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #3b82f6; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila.est-vencida { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #ef4444; }
    table.dataTable.fx3-tabla tbody tr.fx3-fila.est-anulada { box-shadow: 0 1px 6px rgba(15,23,42,.08), inset 5px 0 0 #94a3b8; }
}

.fx3-chip.ipcliente { background: rgba(14,165,233,.1); border-color: rgba(14,165,233,.25); color: #0369a1; font-variant-numeric: tabular-nums; } .fx3-chip.ipcliente .fa-solid { color: #0ea5e9; }

.fx2-btn.ambar { background: #f59e0b; } .fx2-btn.gris { background: #64748b; }
.fx2-barra .fx2-acciones { flex-wrap: wrap; }
@media (max-width: 575px) { .fx2-acciones .fx2-btn { flex: 1 1 auto; } }

/* Sin franja de color curva en el borde izquierdo de las tarjetas (el color ya se ve en el icono y en la pildora de estado) */
table.dataTable.fx3-tabla tbody tr.fx3-fila td:first-child { box-shadow: none !important; border-left: 0 !important; }
table.dataTable.fx3-tabla tbody tr.fx3-fila { box-shadow: 0 1px 6px rgba(15,23,42,.08) !important; border-left: 0 !important; }
table.dataTable.fx3-tabla tbody tr.fx3-fila:hover { box-shadow: 0 8px 22px rgba(15,23,42,.14) !important; }
@media (max-width: 991px) { table.dataTable.fx3-tabla tbody tr.fx3-fila { padding-left: 14px !important; } }

/* ===== Pagos reportados (tarjetas): monto, miniatura del comprobante y visor ===== */
.pr-pago { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.pr-pago b { font-size: 1.05rem; font-weight: 900; color: #16a34a; }
.pr-pago span { font-size: .72rem; color: var(--color-text-muted); }
.pr-mini { width: 54px; height: 54px; padding: 0; border: 2px solid var(--color-border); border-radius: 12px; overflow: hidden; background: var(--color-surface); cursor: zoom-in; display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #dc2626; font-size: 1.1rem; transition: transform .12s, border-color .12s; }
.pr-mini:hover { transform: scale(1.06); border-color: var(--color-primary); }
.pr-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-mini span { font-size: .6rem; font-weight: 800; }
.pr-visor .fx-modal.pr-visor-caja { width: min(900px, 100%); height: min(88vh, 900px); }
.pr-visor-cuerpo { flex: 1; min-height: 0; background: #0f172a; display: flex; align-items: center; justify-content: center; overflow: auto; }
.pr-visor-cuerpo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pr-visor-cuerpo iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pr-visor-pie { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
@media (max-width: 991px) {
    .pr-tabla td.fx3-c-fac { grid-row: 1 / span 2; }
    .pr-tabla td.fx3-c-costo { grid-column: 1 / -1; grid-row: 3; }
    .pr-tabla td.pr-c-comp { grid-column: 1 / -1; grid-row: 4; }
    .pr-tabla td.fx3-c-fecha { grid-column: 1 / -1; grid-row: 5; }
    .pr-tabla td.fx3-c-op { grid-column: 1 / -1; grid-row: 6; }
    .pr-pago { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
}

.pr-nota { margin-top: 6px; font-size: .74rem; color: var(--color-text-muted); font-style: italic; }
.pr-ref { font-weight: 600; }
a.fx3-op { text-decoration: none; }
a.fx3-op.azul, a.fx3-op.azul:hover { color: #fff; }

.fx-rango { margin-bottom: 10px; }
.fx-fecha-lbl { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; font-size: .84rem; }
.fx-fecha-lbl input[type=date] { min-height: 38px; padding: 4px 10px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); color: var(--color-text); font-family: inherit; }
.fx-resumen { font-size: .86rem; color: var(--color-text-muted); }
.fx-resumen b { color: #16a34a; font-size: 1rem; }
@media (max-width: 575px) { .fx-fecha-lbl { flex: 1 1 100%; justify-content: space-between; } }

/* ===== Planes de internet: ventana con pestanas (basica / avanzada) ===== */
.pl-modal { width: min(820px, 100%); }
.pl-form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pl-tabs { display: flex; gap: 6px; padding: 12px 18px 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.pl-tab { border: 0; background: none; padding: 10px 16px; font-weight: 700; font-size: .88rem; color: var(--color-text-muted); cursor: pointer; border-bottom: 3px solid transparent; font-family: inherit; }
.pl-tab.activo { color: #6d28d9; border-bottom-color: #6d28d9; }
.pl-panel { padding: 16px 20px 6px; overflow-y: auto; }
.pl-panel[hidden] { display: none; }
.pl-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pl-grupo { margin-bottom: 14px; }
.pl-grupo > label { display: block; font-weight: 700; font-size: .84rem; margin-bottom: 6px; }
.pl-grupo small { display: block; margin-top: 4px; font-size: .74rem; color: var(--color-text-muted); }
.pl-form input[type=text], .pl-form input[type=number], .pl-form textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-family: inherit; font-size: .93rem; }
.pl-form input:focus, .pl-form textarea:focus { outline: 2px solid #8b5cf6; outline-offset: 1px; }
.pl-pre { display: flex; align-items: stretch; }
.pl-pre span { display: flex; align-items: center; padding: 0 12px; background: rgba(100,116,139,.12); border: 1px solid var(--color-border); font-weight: 700; color: var(--color-text-muted); }
.pl-pre span:first-child { border-radius: 10px 0 0 10px; border-right: 0; }
.pl-pre span:first-child + input { border-radius: 0 10px 10px 0; }
.pl-pre.pl-post input { border-radius: 10px 0 0 10px; }
.pl-pre.pl-post span { border-radius: 0 10px 10px 0; border-left: 0; }
.pl-check { display: flex; flex-direction: column; justify-content: center; }
.pl-check label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0; cursor: pointer; }
.pl-check input { width: 18px; height: 18px; accent-color: #6d28d9; }
.pl-lupa { margin-left: 6px; width: 28px; height: 26px; border: 0; border-radius: 7px; background: #22b35e; color: #fff; cursor: pointer; font-size: .75rem; }
.pl-aviso { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25); color: #1d4ed8; font-size: .84rem; }
.pl-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-tipo-op { display: block; cursor: pointer; margin: 0; }
.pl-tipo-op input { position: absolute; opacity: 0; pointer-events: none; }
.pl-tipo-op > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px; border: 2px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.pl-tipo-op > span .fa-solid { font-size: 1.2rem; color: #6d28d9; }
.pl-tipo-op small { font-weight: 400; }
.pl-tipo-op input:checked + span { border-color: #6d28d9; background: rgba(109,40,217,.07); box-shadow: 0 0 0 3px rgba(109,40,217,.15); }
.pl-form .fx-modal-pie { padding: 12px 20px 18px; margin: 0; border-top: 1px solid var(--color-border); }
.pl-tipo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pl-tipo.pppoe { background: rgba(139,92,246,.12); color: #6d28d9; } .pl-tipo.queue { background: rgba(14,165,233,.12); color: #0369a1; }
.pl-vel { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; font-weight: 700; font-size: .85rem; color: #16a34a; } .pl-vel.sub { color: #2563eb; }
@media (max-width: 640px) { .pl-fila, .pl-tipos { grid-template-columns: 1fr; } .pl-tab { flex: 1; padding: 10px 8px; } }

/* Las alertas de SweetAlert deben verse por encima de las ventanas propias (fx-overlay, z-index 1200) */
.swal2-container { z-index: 3000 !important; }

/* ===== Modo oscuro: alertas, planes, facturacion y pagos reportados ===== */
:root[data-theme="dark"] .swal2-popup { background: var(--color-surface); color: var(--color-text); }
:root[data-theme="dark"] .swal2-title, :root[data-theme="dark"] .swal2-html-container, :root[data-theme="dark"] .swal2-input-label { color: var(--color-text); }
:root[data-theme="dark"] .swal2-select, :root[data-theme="dark"] .swal2-input, :root[data-theme="dark"] .swal2-textarea { background: var(--color-bg); color: var(--color-text); border-color: var(--color-border); }
:root[data-theme="dark"] .swal2-select option { background: var(--color-surface); color: var(--color-text); }
:root[data-theme="dark"] .swal2-validation-message { background: rgba(239,68,68,.15); color: #fca5a5; }
:root[data-theme="dark"] .swal2-timer-progress-bar { background: rgba(255,255,255,.3); }
:root[data-theme="dark"] .pl-tab.activo { color: #c4b5fd; border-bottom-color: #a78bfa; }
:root[data-theme="dark"] .pl-tipo-op > span .fa-solid { color: #c4b5fd; }
:root[data-theme="dark"] .pl-tipo-op input:checked + span { border-color: #a78bfa; background: rgba(167,139,250,.14); box-shadow: 0 0 0 3px rgba(167,139,250,.2); }
:root[data-theme="dark"] .pl-form input:focus, :root[data-theme="dark"] .pl-form textarea:focus { outline-color: #a78bfa; }
:root[data-theme="dark"] .pl-check input { accent-color: #a78bfa; }
:root[data-theme="dark"] .pl-aviso { background: rgba(59,130,246,.14); border-color: rgba(96,165,250,.35); color: #93c5fd; }
:root[data-theme="dark"] .pl-tipo.pppoe { background: rgba(167,139,250,.16); color: #c4b5fd; }
:root[data-theme="dark"] .pl-tipo.queue { background: rgba(56,189,248,.16); color: #7dd3fc; }
:root[data-theme="dark"] .pl-vel { color: #4ade80; }
:root[data-theme="dark"] .pl-vel.sub { color: #60a5fa; }
:root[data-theme="dark"] .fx3-chip.pppoe, :root[data-theme="dark"] .fx3-chip.pppoe .fa-solid { color: #c4b5fd; }
:root[data-theme="dark"] .fx3-chip.pppoe { background: rgba(167,139,250,.14); border-color: rgba(167,139,250,.3); }
:root[data-theme="dark"] .fx3-chip.ip, :root[data-theme="dark"] .fx3-chip.ipcliente, :root[data-theme="dark"] .fx3-chip.ip .fa-solid, :root[data-theme="dark"] .fx3-chip.ipcliente .fa-solid { color: #7dd3fc; }
:root[data-theme="dark"] .fx3-chip.ip, :root[data-theme="dark"] .fx3-chip.ipcliente { background: rgba(56,189,248,.14); border-color: rgba(56,189,248,.3); }
:root[data-theme="dark"] .fx3-chip.activo, :root[data-theme="dark"] .fx3-chip.pago, :root[data-theme="dark"] .fx3-chip.activo .fa-solid, :root[data-theme="dark"] .fx3-chip.pago .fa-solid { color: #4ade80; }
:root[data-theme="dark"] .fx3-chip.suspendido, :root[data-theme="dark"] .fx3-chip.suspendido .fa-solid { color: #fbbf24; }
:root[data-theme="dark"] .fx3-chip a { color: inherit; }
:root[data-theme="dark"] .fx3-costo .tot em { color: #4ade80; }
:root[data-theme="dark"] .fx3-costo .tot.por-cobrar em { color: var(--color-primary-light); }
:root[data-theme="dark"] .fx3-costo em.neg { color: #f87171; }
:root[data-theme="dark"] .fx3-fecha span.venc, :root[data-theme="dark"] .fx3-dias.venc, :root[data-theme="dark"] .fx-vencida { color: #f87171 !important; }
:root[data-theme="dark"] .fx3-fecha span.pago, :root[data-theme="dark"] .fx3-dias.ok { color: #4ade80 !important; }
:root[data-theme="dark"] .fx3-dias.pronto { color: #fbbf24 !important; }
:root[data-theme="dark"] .fx-tipo.ip { background: rgba(56,189,248,.16); color: #7dd3fc; }
:root[data-theme="dark"] .fx-tipo.pppoe { background: rgba(167,139,250,.16); color: #c4b5fd; }
:root[data-theme="dark"] .fx-estado.ok { color: #4ade80; }
:root[data-theme="dark"] .fx-estado.mal { color: #fbbf24; }
:root[data-theme="dark"] .fx-monto small.fx-aviso { color: #fbbf24; }
:root[data-theme="dark"] .fx-monto small.fx-info { color: #93c5fd; }
:root[data-theme="dark"] .pr-pago b { color: #4ade80; }
:root[data-theme="dark"] .fx3-op.claro { color: var(--color-text-muted); border-color: var(--color-border); }
:root[data-theme="dark"] .fx3-cliente { color: var(--color-text); }
:root[data-theme="dark"] .fx3-cliente:hover { color: var(--color-primary); }
:root[data-theme="dark"] table.dataTable.fx3-tabla tbody tr.fx3-fila { box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 6px 16px rgba(0,0,0,.35) !important; }
:root[data-theme="dark"] table.dataTable.fx3-tabla tbody tr.fx3-fila:hover { box-shadow: 0 0 0 1px rgba(255,138,41,.45), 0 10px 22px rgba(0,0,0,.45) !important; }
:root[data-theme="dark"] .fx3-costo { background-color: transparent; }
:root[data-theme="dark"] .fx2-btn.gris { background: #475569; }
@media (max-width: 991px) { :root[data-theme="dark"] .fx3-costo { background: rgba(255,255,255,.05); } }

/* ===== Plantillas ===== */
.pt-modal { width: min(920px, 100%); max-height: calc(100vh - 24px); }
.pt-form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pt-cuerpo { padding: 16px 20px 4px; overflow-y: auto; }
.pt-form .fx-modal-pie { padding: 12px 20px 16px; margin: 0; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.pt-acciones { display: flex; gap: 6px; }
.pt-canal { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.pt-documento { background: rgba(239,68,68,.12); color: #b91c1c; } .pt-aviso { background: rgba(245,158,11,.14); color: #b45309; }
.pt-app { background: rgba(59,130,246,.12); color: #1d4ed8; } .pt-mensaje { background: rgba(34,197,94,.14); color: #15803d; }
.pt-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-var { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); padding: 4px 10px; border-radius: 999px; font-family: ui-monospace, Consolas, monospace; font-size: .76rem; cursor: pointer; }
.pt-var:hover { border-color: #059669; color: #059669; background: rgba(5,150,105,.08); }
.pt-visor-cuerpo { flex: 1; min-height: 360px; overflow: auto; background: #e5e7eb; padding: 18px; display: flex; align-items: flex-start; justify-content: center; }
.pt-iframe { width: min(794px, 100%); height: 68vh; border: 0; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.pt-chat { width: min(420px, 100%); padding: 24px 18px; border-radius: 16px; background: #e8dfd2 linear-gradient(#efe7db, #e8dfd2); margin-top: 30px; }
.pt-burbuja { position: relative; max-width: 92%; padding: 9px 12px 18px; border-radius: 10px 10px 10px 0; background: #fff; color: #111827; font-size: .92rem; line-height: 1.4; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.pt-burbuja small { position: absolute; right: 9px; bottom: 3px; font-size: .66rem; color: #6b7280; }
.pt-push { display: flex; gap: 12px; align-items: flex-start; width: min(420px, 100%); margin-top: 30px; padding: 14px 16px; border-radius: 18px; background: #fff; color: #111827; box-shadow: 0 8px 26px rgba(0,0,0,.25); font-size: .9rem; }
.pt-push-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; background: linear-gradient(135deg, #ff9a4d, #f25c05); color: #fff; display: flex; align-items: center; justify-content: center; }
.pt-push small { color: #6b7280; }
.note-editor.note-frame { border-color: var(--color-border); }
:root[data-theme="dark"] .note-editor.note-frame, :root[data-theme="dark"] .note-editor.note-frame .note-editing-area .note-editable { background: var(--color-surface); color: var(--color-text); }
:root[data-theme="dark"] .note-editor.note-frame .note-toolbar { background: var(--color-bg); border-color: var(--color-border); }
:root[data-theme="dark"] .note-editor .note-btn { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
:root[data-theme="dark"] .note-editor .note-statusbar { background: var(--color-bg); }
:root[data-theme="dark"] .pt-documento { color: #fca5a5; } :root[data-theme="dark"] .pt-aviso { color: #fbbf24; } :root[data-theme="dark"] .pt-app { color: #93c5fd; } :root[data-theme="dark"] .pt-mensaje { color: #4ade80; }
@media (max-width: 640px) { .pt-form .fx-modal-pie .btn { flex: 1 1 45%; } }

.pt-form input[type=text], .pt-form textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-family: inherit; font-size: .93rem; }
.pt-form textarea { line-height: 1.45; }
.pt-form input:focus, .pt-form textarea:focus { outline: 2px solid #10b981; outline-offset: 1px; }

/* ===== Clientes: resumen en cintas de color + grid de tarjetas de contacto ===== */
.ct-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ct-resumen-tile { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.12); position: relative; overflow: hidden; }
.ct-resumen-tile::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); top: -50px; right: -40px; }
.ct-resumen-tile.total { background: linear-gradient(135deg, #6366f1, #4338ca); }
.ct-resumen-tile.activos { background: linear-gradient(135deg, #22c55e, #15803d); }
.ct-resumen-tile.sin-servicio { background: linear-gradient(135deg, #f59e0b, #b45309); }
.ct-resumen-ico { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex: none; }
.ct-resumen-num { position: relative; z-index: 1; font-size: 1.9rem; font-weight: 900; line-height: 1.1; }
.ct-resumen-lbl { position: relative; z-index: 1; font-size: .82rem; opacity: .92; font-weight: 600; }

.ct-card { padding-bottom: 18px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-top: 16px; }
.ct-tarjeta { display: block; border: 1px solid var(--color-border); border-radius: 18px; padding: 16px; background: var(--color-surface); text-decoration: none; color: inherit; cursor: pointer; transition: transform .14s, box-shadow .14s, border-color .14s; }
.ct-tarjeta:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.ct-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(15,23,42,.14); border-color: var(--color-primary); text-decoration: none; color: inherit; }
.ct-cab { display: flex; align-items: center; gap: 12px; }
.ct-avatar { width: 50px; height: 50px; flex: none; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.05rem; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.ct-avatar.g1 { background: linear-gradient(135deg, #f472b6, #db2777); }
.ct-avatar.g2 { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.ct-avatar.g3 { background: linear-gradient(135deg, #34d399, #047857); }
.ct-avatar.g4 { background: linear-gradient(135deg, #fbbf24, #b45309); }
.ct-avatar.g5 { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.ct-avatar.g6 { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.ct-nombre-caja { min-width: 0; flex: 1; }
.ct-nombre { font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ct-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: rgba(100,116,139,.12); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.ct-chip .fa-solid { font-size: .5rem; }
.ct-chip.ok { background: rgba(34,197,94,.14); color: #15803d; } .ct-chip.ok .fa-solid { color: #22c55e; }
.ct-chip.mal { background: rgba(245,158,11,.16); color: #b45309; } .ct-chip.mal .fa-solid { color: #f59e0b; }
.ct-chip.sin { background: rgba(148,163,184,.18); color: #475569; } .ct-chip.sin .fa-solid { color: #94a3b8; }
.ct-chip.cancel { background: rgba(239,68,68,.14); color: #b91c1c; } .ct-chip.cancel .fa-solid { color: #ef4444; }
.ct-chip.favor { background: rgba(16,185,129,.14); color: #047857; }
.ct-chip.portal { background: rgba(99,102,241,.14); color: #4338ca; }
.ct-cuerpo { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--color-border); display: flex; flex-direction: column; gap: 6px; }
.ct-meta { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-meta .fa-solid { width: 14px; color: var(--color-primary); flex: none; }
.ct-meta.ct-sin-datos { font-style: italic; opacity: .7; }
.ct-ops { display: flex; gap: 8px; margin-top: 14px; }
.ct-op { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 36px; border-radius: 10px; border: 1.5px solid transparent; color: #fff; font-size: .9rem; cursor: pointer; text-decoration: none; }
.ct-op.azul { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.ct-op.verde { background: linear-gradient(135deg, #34d399, #16a34a); }
.ct-op.rojo { background: var(--color-surface); border-color: #ef4444; color: #ef4444; }
.ct-op.rojo:hover { background: #ef4444; color: #fff; }
.ct-botones-pag { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
@media (max-width: 575px) { .ct-grid { grid-template-columns: 1fr; } .ct-resumen { grid-template-columns: 1fr; } }

/* ===== Ficha del cliente: hero con avatar, chips y acciones rapidas ===== */
.cf-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 14px; border-radius: 18px; background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.cf-avatar { width: 64px; height: 64px; flex: none; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.4rem; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.cf-hero-datos { flex: 1; min-width: 200px; }
.cf-hero-datos h2 { margin: 0 0 8px; font-size: 1.3rem; border: 0; padding: 0; }
.cf-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-hero-ops { display: flex; gap: 8px; }
.cf-hero-ops .ct-op { width: 40px; height: 40px; flex: none; }
.cf-tabs.tab-bar { margin-bottom: 18px; }
@media (max-width: 560px) { .cf-hero { flex-direction: column; align-items: flex-start; } .cf-hero-ops { width: 100%; } .cf-hero-ops .ct-op { flex: 1; } }

/* ===== Ficha del cliente: formulario de datos en secciones con icono ===== */
.cf-datos .cf-seccion { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px dashed var(--color-border); }
.cf-datos .cf-seccion:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.cf-seccion-titulo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cf-seccion-ico { width: 38px; height: 38px; border-radius: 11px; font-size: .95rem; flex: none; }
.cf-seccion-titulo h3 { margin: 0; font-size: .98rem; font-weight: 800; }
.cf-seccion-titulo p { margin: 1px 0 0; font-size: .78rem; color: var(--color-text-muted); }

.cf-telefonos { margin-top: 16px; }
.cf-telefonos > label { display: block; font-weight: 700; font-size: .84rem; margin-bottom: 8px; }
.cf-tel-lista { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cf-tel-fila { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg); }
.cf-tel-ico { width: 30px; height: 30px; border-radius: 9px; background: rgba(34,197,94,.14); color: #16a34a; display: flex; align-items: center; justify-content: center; flex: none; font-size: .85rem; }
.cf-tel-fila input { border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); color: var(--color-text); min-height: 38px; padding: 6px 10px; font-size: .9rem; }
.cf-tel-fila input[name=telefono[]] { flex: 1.1; min-width: 0; font-weight: 700; }
.cf-tel-fila input[name=etiqueta[]] { flex: 1; min-width: 0; }
.cf-tel-quitar { width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: rgba(239,68,68,.12); color: #ef4444; cursor: pointer; font-size: .8rem; }
.cf-tel-quitar:hover { background: #ef4444; color: #fff; }
.cf-tel-agregar { display: inline-flex; align-items: center; gap: 7px; border: 1.5px dashed var(--color-primary); background: color-mix(in srgb, var(--color-primary) 6%, transparent); color: var(--color-primary-dark); padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: .85rem; cursor: pointer; font-family: inherit; }
.cf-tel-agregar:hover { background: color-mix(in srgb, var(--color-primary) 12%, transparent); }
@media (max-width: 560px) { .cf-tel-fila { flex-wrap: wrap; } .cf-tel-fila input { width: 100%; } }

/* ===== Ficha del cliente > pestana Pagos: filas de facturas e historial ===== */
.cfp-lista { display: flex; flex-direction: column; gap: 10px; }
.cfp-fila { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.cfp-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; }
.cfp-ico.pagada { background: linear-gradient(135deg, #4ade80, #16a34a); }
.cfp-ico.pendiente { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.cfp-ico.parcial { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.cfp-ico.vencida { background: linear-gradient(135deg, #f87171, #dc2626); }
.cfp-ico.anulada { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.cfp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cfp-info b { font-size: .92rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfp-info span { font-size: .78rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfp-monto { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cfp-monto b { font-size: 1rem; font-weight: 800; }
.cfp-monto small { font-size: .74rem; color: var(--color-text-muted); }
.cfp-monto .fx3-pill { padding: 3px 11px; font-size: .68rem; }
@media (max-width: 560px) { .cfp-fila { flex-wrap: wrap; } .cfp-info { min-width: 60%; } .cfp-monto { margin-left: auto; align-items: flex-end; } }

/* ===== Ficha del cliente > Servicios: tarjetas con icono de conexion ===== */
.ct-chip.ip { background: rgba(14,165,233,.1); border-color: rgba(14,165,233,.25); color: #0369a1; } .ct-chip.ip .fa-solid { color: #0ea5e9; }
.ct-chip.pppoe { background: rgba(139,92,246,.1); border-color: rgba(139,92,246,.25); color: #6d28d9; } .ct-chip.pppoe .fa-solid { color: #8b5cf6; }
.kx-row-thumb.bg-ethernet { background: linear-gradient(135deg, #10b981, #34d399); }
.cfs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cfs-tarjeta { border: 1px solid var(--color-border); border-radius: 16px; padding: 16px; background: var(--color-surface); }
.cfs-cab { display: flex; align-items: center; gap: 12px; }
.cfs-nombre-caja { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.cfs-nombre-caja b { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfs-nombre-caja .badge { align-self: flex-start; }
.cfs-pie { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.cfs-pie span { font-size: .78rem; color: var(--color-text-muted); }
.cfs-pie .ct-op { flex: none; width: 34px; height: 34px; }
.ct-chip.ip, .ct-chip.pppoe { border-width: 1px; border-style: solid; }
:root[data-theme="dark"] .ct-chip.pppoe, :root[data-theme="dark"] .ct-chip.pppoe .fa-solid { color: #c4b5fd; }
:root[data-theme="dark"] .ct-chip.pppoe { background: rgba(167,139,250,.14); border-color: rgba(167,139,250,.3); }
:root[data-theme="dark"] .ct-chip.ip, :root[data-theme="dark"] .ct-chip.ip .fa-solid { color: #7dd3fc; }
:root[data-theme="dark"] .ct-chip.ip { background: rgba(56,189,248,.14); border-color: rgba(56,189,248,.3); }

/* ===== Ficha del cliente > Historial: linea de tiempo ===== */
.cfl-linea { position: relative; padding-left: 6px; }
.cfl-item { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.cfl-item:last-child { padding-bottom: 0; }
.cfl-item::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--color-border); }
.cfl-item:last-child::before { display: none; }
.cfl-punto { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; box-shadow: 0 0 0 4px var(--color-surface); }
.cfl-punto.verde { background: linear-gradient(135deg, #4ade80, #16a34a); }
.cfl-punto.azul { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.cfl-punto.ambar { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.cfl-punto.rojo { background: linear-gradient(135deg, #f87171, #dc2626); }
.cfl-punto.morado { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.cfl-punto.gris { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.cfl-cuerpo { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg); }
.cfl-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.cfl-cab b { font-size: .9rem; text-transform: capitalize; }
.cfl-fecha { font-size: .74rem; color: var(--color-text-muted); white-space: nowrap; }
.cfl-cuerpo p { margin: 5px 0 0; font-size: .85rem; color: var(--color-text); line-height: 1.45; }
.cfl-usuario { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: .74rem; color: var(--color-text-muted); }
@media (max-width: 480px) { .cfl-cab { flex-direction: column; align-items: flex-start; } }

/* Tablas con menu desplegable de acciones: sin scroll propio para que el menu no se recorte */
.table-wrap.tw-visible { overflow: visible; }

/* ----- Migracion WispHub ----- */
.mw-estado { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--color-bg); color: var(--color-text-muted); }
.mw-estado.ok { background: #dcfce7; color: #15803d; }
.mw-estado.mal { background: #fee2e2; color: #b91c1c; }
.mw-global { display: flex; gap: 8px; flex-wrap: wrap; }
.mw-pasos { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.mw-paso { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); transition: box-shadow .15s, border-color .15s; }
.mw-paso:hover { box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.mw-ico { flex: none; width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem; box-shadow: 0 8px 18px rgba(0,0,0,.14); }
.mw-ico.azul { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.mw-ico.verde { background: linear-gradient(135deg, #10b981, #34d399); }
.mw-ico.ambar { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.mw-ico.morado { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.mw-ico.rosa { background: linear-gradient(135deg, #ec4899, #f472b6); }
.mw-cuerpo { flex: 1; min-width: 0; }
.mw-titulo { font-weight: 800; font-size: 1rem; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.mw-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-bg); color: var(--color-text-muted); font-size: .75rem; font-weight: 800; }
.mw-texto { margin-top: 3px; font-size: .85rem; color: var(--color-text-muted); line-height: 1.5; }
.mw-cifras { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mw-cifra { font-size: .78rem; padding: 4px 11px; border-radius: 999px; background: var(--color-bg); color: var(--color-text-muted); }
.mw-cifra b { color: var(--color-text); font-size: .9rem; margin-right: 2px; }
.mw-barra { margin-top: 12px; height: 8px; border-radius: 999px; background: var(--color-bg); overflow: hidden; }
.mw-barra span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #10b981); transition: width .3s; }
.mw-resultado { margin-top: 10px; font-size: .84rem; font-weight: 600; padding: 8px 12px; border-radius: 12px; }
.mw-resultado.ok { background: #dcfce7; color: #15803d; }
.mw-resultado.mal { background: #fee2e2; color: #b91c1c; }
.mw-botones { flex: none; display: flex; flex-direction: column; gap: 8px; }
.mw-botones .btn { white-space: nowrap; justify-content: center; }
.mw-log { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.mw-log-item { font-size: .82rem; padding: 8px 12px; border-radius: 10px; background: var(--color-bg); color: var(--color-text-muted); border-left: 4px solid #94a3b8; word-break: break-word; }
.mw-log-item.error { border-left-color: #dc2626; background: #fef2f2; color: #991b1b; }
.mw-log-item.nota { border-left-color: #f59e0b; }
.mw-notas { margin: 0; padding-left: 20px; color: var(--color-text-muted); font-size: .9rem; line-height: 1.7; }
:root[data-theme="dark"] .mw-estado.ok, :root[data-theme="dark"] .mw-resultado.ok { background: rgba(16,185,129,.18); color: #6ee7b7; }
:root[data-theme="dark"] .mw-estado.mal, :root[data-theme="dark"] .mw-resultado.mal { background: rgba(239,68,68,.18); color: #fca5a5; }
:root[data-theme="dark"] .mw-log-item.error { background: rgba(239,68,68,.12); color: #fca5a5; }
:root[data-theme="dark"] .mw-paso:hover { box-shadow: 0 8px 22px rgba(0,0,0,.35); }
@media (max-width: 720px) {
    .mw-paso { flex-wrap: wrap; }
    .mw-cuerpo { flex-basis: calc(100% - 64px); }
    .mw-botones { flex-direction: row; flex-basis: 100%; }
    .mw-botones .btn { flex: 1; }
}
.mw-desde { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--color-bg); }
.mw-desde label { margin: 0; font-size: .82rem; font-weight: 700; color: var(--color-text); }
.mw-desde input[type="date"] { width: auto; padding: 6px 10px; }
.mw-desde .field-hint { flex-basis: 100%; margin: 0; }
.mw-desde { margin: 4px 0 16px; }

/* ----- Vinculacion WispHub ----- */
.vc-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 16px; }
.vc-cifra { padding: 14px 16px; border-radius: 16px; background: var(--color-bg); display: flex; flex-direction: column; gap: 2px; }
.vc-cifra b { font-size: 1.5rem; font-weight: 800; color: var(--color-text); line-height: 1.1; }
.vc-cifra span { font-size: .78rem; color: var(--color-text-muted); }
.vc-cifra.ambar { background: #fef3c7; } .vc-cifra.ambar b { color: #b45309; }
.vc-cifra.rojo { background: #fee2e2; } .vc-cifra.rojo b { color: #b91c1c; }
.vc-resumen { margin-top: 14px; font-size: .82rem; color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.vc-opcion { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 14px; margin-bottom: 8px; cursor: pointer; background: var(--color-surface); }
.vc-opcion:hover { border-color: var(--color-primary-light); }
.vc-opcion input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--color-primary); }
.vc-opcion span { display: flex; flex-direction: column; gap: 2px; }
.vc-opcion b { color: var(--color-text); font-size: .92rem; }
.vc-opcion small { color: var(--color-text-muted); font-size: .8rem; line-height: 1.45; }
.vc-principal { background: linear-gradient(135deg, rgba(249,115,22,.10), rgba(251,191,36,.10)); border-color: #fdba74; }
.vc-sub { margin: 20px 0 10px; font-size: .95rem; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.vc-sub i { color: var(--color-primary); }
.vc-campo { margin: 6px 0 12px; }
.vc-doble { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.vc-cola { display: flex; flex-direction: column; gap: 8px; }
.vc-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.vc-item .mw-ico { width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; box-shadow: none; }
.vc-info { flex: 1; min-width: 0; }
.vc-desc { font-weight: 700; font-size: .88rem; color: var(--color-text); }
.vc-meta { font-size: .76rem; color: var(--color-text-muted); margin-top: 2px; }
.vc-error { font-size: .78rem; color: #b91c1c; margin-top: 4px; word-break: break-word; }
.vc-verde { background: #dcfce7; color: #15803d; } .vc-ambar { background: #fef3c7; color: #b45309; }
.vc-rojo { background: #fee2e2; color: #b91c1c; } .vc-gris { background: var(--color-bg); color: var(--color-text-muted); }
:root[data-theme="dark"] .vc-cifra.ambar { background: rgba(245,158,11,.16); } :root[data-theme="dark"] .vc-cifra.rojo { background: rgba(239,68,68,.16); }
:root[data-theme="dark"] .vc-verde { background: rgba(16,185,129,.18); color: #6ee7b7; } :root[data-theme="dark"] .vc-ambar { background: rgba(245,158,11,.18); color: #fcd34d; }
:root[data-theme="dark"] .vc-rojo { background: rgba(239,68,68,.18); color: #fca5a5; } :root[data-theme="dark"] .vc-error { color: #fca5a5; }
@media (max-width: 720px) { .vc-item { flex-wrap: wrap; } }

/* ----- Reglas de facturacion ----- */
.rf-ico { margin-right: 8px; width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; color: #fff; vertical-align: middle; }
.rf-ico.rojo { background: linear-gradient(135deg, #ef4444, #f97316); } .rf-ico.verde { background: linear-gradient(135deg, #10b981, #34d399); }
.rf-ico.morado { background: linear-gradient(135deg, #8b5cf6, #c084fc); } .rf-ico.ambar { background: linear-gradient(135deg, #f59e0b, #fbbf24); } .rf-ico.azul { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.rf-series { display: flex; flex-direction: column; gap: 10px; }
.rf-serie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.rf-serie.principal { border-color: #fdba74; background: linear-gradient(135deg, rgba(249,115,22,.07), rgba(251,191,36,.07)); }
.rf-serie-nombre { display: flex; align-items: center; gap: 8px; min-width: 110px; font-size: 1.05rem; }
.rf-tag { font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #ffedd5; color: #c2410c; text-transform: uppercase; letter-spacing: .03em; }
.rf-serie input[type="text"] { flex: 1; min-width: 160px; }
.rf-folio { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--color-text-muted); }
.rf-folio input { width: 100px; }
.rf-check { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.rf-usadas { font-size: .78rem; color: var(--color-text-muted); }
.rf-acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rf-ov { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.rf-ov:last-child { border-bottom: 0; }
.rf-ov-cab { display: flex; flex-direction: column; min-width: 220px; flex: 1; }
.rf-ov-cab b { font-size: .9rem; color: var(--color-text); } .rf-ov-cab small { color: var(--color-text-muted); font-size: .76rem; }
.rf-ov-campos { display: flex; gap: 6px; align-items: center; } .rf-ov-campos input { width: 110px; }
:root[data-theme="dark"] .rf-tag { background: rgba(249,115,22,.2); color: #fdba74; }
.cf-periodos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--color-bg); margin-bottom: 12px; font-size: .85rem; }
.cf-periodos select { max-width: 340px; } .cf-periodos input { width: 72px; }

/* ----- Mensajeria ----- */
.ms-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ms-grid { grid-template-columns: 1fr; } }
.ms-tipos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ms-tipo { padding: 8px 16px; border: 1px solid var(--color-border); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .85rem; background: var(--color-surface); }
.ms-tipo input { display: none; } .ms-tipo.activo { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: #fff; border-color: transparent; }
.ms-vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: .78rem; color: var(--color-text-muted); }
.ms-var { border: 1px dashed var(--color-border); background: var(--color-bg); color: var(--color-text); border-radius: 8px; padding: 3px 9px; font-size: .78rem; cursor: pointer; }
.ms-var:hover { border-color: var(--color-primary-light); }
.ms-mant { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.ms-estados { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: .85rem; } .ms-estados label { display: flex; gap: 5px; align-items: center; }
.ms-canales { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.ms-canal { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 14px; cursor: pointer; background: var(--color-surface); }
.ms-canal i { font-size: 1.2rem; color: var(--color-primary); } .ms-canal small { grid-column: 2; color: var(--color-text-muted); font-size: .76rem; }
.ms-canal input { display: none; } .ms-canal:has(input:checked) { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 7%, transparent); }
.ms-canal.apagado { opacity: .6; cursor: default; }
.ms-previa { position: sticky; top: 76px; }
.ms-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; } .ms-total b { font-size: 2rem; font-weight: 800; color: var(--color-text); } .ms-total span { color: var(--color-text-muted); font-size: .85rem; }
.ms-fila { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--color-bg); margin-bottom: 6px; font-size: .85rem; } .ms-fila em { color: #b45309; font-style: normal; }
.ms-ejemplo-t { margin: 12px 0 6px; font-size: .78rem; color: var(--color-text-muted); }
.ms-ejemplo { white-space: pre-wrap; background: #dcfce7; color: #14532d; border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-family: inherit; font-size: .88rem; margin: 0; }
.ms-prueba { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--color-bg); }
.ms-prueba input { flex: 1; min-width: 200px; max-width: 280px; }
.ms-prueba-resultado { font-size: .84rem; font-weight: 600; } .ms-prueba-resultado.ok { color: #15803d; } .ms-prueba-resultado.mal { color: #b91c1c; }
.ms-avanzado { margin: 6px 0 12px; } .ms-avanzado summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--color-text-muted); margin-bottom: 8px; }
:root[data-theme="dark"] .ms-ejemplo { background: rgba(16,185,129,.18); color: #a7f3d0; }
.ms-fechas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 4px; }
@media (max-width: 560px) { .ms-fechas { grid-template-columns: 1fr; } }
.ms-fechas input, .ms-grid input[type="datetime-local"] { width: 100%; max-width: 100%; }
.ms-disp { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.ms-qr { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ms-qr-caja { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: var(--color-bg); }
.ms-qr-caja img { background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--color-border); }
.ms-qr-caja ol { margin: 0; padding-left: 18px; font-size: .85rem; color: var(--color-text-muted); line-height: 1.7; max-width: 340px; }
.ms-estado-wa { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--color-bg); }
.ms-estado-punto { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; flex: none; box-shadow: 0 0 0 4px rgba(148,163,184,.2); }
.ms-estado-punto.ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.2); } .ms-estado-punto.aviso { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.2); }
.ms-estado-punto.mal { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.2); }
.ms-estado-texto { flex: 1; display: flex; flex-direction: column; min-width: 0; } .ms-estado-texto b { font-size: .92rem; color: var(--color-text); } .ms-estado-texto small { color: var(--color-text-muted); font-size: .8rem; }

/* ----- Asistente de WhatsApp (para el dueño de la empresa) ----- */
.wz-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.wz-cab h2 { margin: 0; } .wz-cab p { margin: 2px 0 0; color: var(--color-text-muted); font-size: .9rem; }
.wz-logo { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; flex: none; box-shadow: 0 8px 18px rgba(18,140,126,.3); }
.wz-centro { text-align: center; padding: 18px 8px 8px; }
.wz-centro h3 { margin: 10px 0 6px; font-size: 1.25rem; color: var(--color-text); }
.wz-nota { color: var(--color-text-muted); font-size: .88rem; max-width: 520px; margin: 10px auto 0; line-height: 1.5; }
.wz-pasos3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; max-width: 640px; margin: 0 auto 22px; }
.wz-pasos3 div { background: var(--color-bg); border-radius: 16px; padding: 16px 12px; font-weight: 600; font-size: .92rem; color: var(--color-text); }
.wz-pasos3 span, .wz-qr-pasos li span { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: #25d366; color: #fff; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 8px; flex: none; }
.wz-boton { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; border: 0; border-radius: 16px; padding: 16px 34px; font-size: 1.15rem; font-weight: 800; cursor: pointer; box-shadow: 0 10px 22px rgba(18,140,126,.35); transition: transform .12s; }
.wz-boton:hover { transform: translateY(-2px); } .wz-boton:disabled { opacity: .6; cursor: default; }
.wz-boton.chico { padding: 10px 18px; font-size: .95rem; border-radius: 12px; box-shadow: none; }
.wz-cargando { font-size: 2.6rem; color: #25d366; }
.wz-qr { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; align-items: center; padding: 14px 6px; }
.wz-qr-img { background: #fff; padding: 14px; border-radius: 20px; border: 1px solid var(--color-border); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.wz-qr-img img { display: block; width: 260px; height: 260px; }
.wz-qr-pasos { max-width: 420px; } .wz-qr-pasos h3 { margin: 0 0 12px; font-size: 1.2rem; }
.wz-qr-pasos ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wz-qr-pasos li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; line-height: 1.45; } .wz-qr-pasos li span { margin: 0; }
.wz-check { width: 74px; height: 74px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 2rem; display: inline-flex; align-items: center; justify-content: center; }
.wz-check.mal { background: #fee2e2; color: #dc2626; }
.wz-num { font-size: 1.15rem; font-weight: 700; color: var(--color-text); margin: 0 0 14px; } .wz-num i { color: #25d366; }
.wz-prueba { max-width: 480px; margin: 12px auto 16px; background: var(--color-bg); border-radius: 16px; padding: 14px 16px; text-align: left; }
.wz-prueba p { margin: 4px 0 10px; font-size: .88rem; color: var(--color-text-muted); }
.wz-prueba-fila { display: flex; gap: 8px; flex-wrap: wrap; } .wz-prueba-fila input { flex: 1; min-width: 170px; }
.wz-siguiente { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: #128c7e; text-decoration: none; margin: 6px 0; }
.wz-enlace { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--color-text-muted); font-size: .82rem; text-decoration: underline; cursor: pointer; }
.wz-tec { margin: 14px auto 0; max-width: 520px; text-align: left; font-size: .78rem; color: var(--color-text-muted); }
.ms-otros { padding: 0; } .ms-otros > summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--color-text); list-style: none; } .ms-otros > summary small { color: var(--color-text-muted); font-weight: 400; }
.ms-otros[open] > summary { border-bottom: 1px solid var(--color-border); }
.ms-canal-bloque { padding: 18px 20px; border-bottom: 1px solid var(--color-border); } .ms-canal-bloque:last-child { border-bottom: 0; }
:root[data-theme="dark"] .wz-check { background: rgba(22,163,74,.2); } :root[data-theme="dark"] .wz-check.mal { background: rgba(220,38,38,.2); }
@media (max-width: 560px) { .wz-qr-img img { width: 220px; height: 220px; } .wz-boton { padding: 14px 22px; font-size: 1.02rem; } }

/* ----- WhatsApp conectado: panel ----- */
.wz-panel { display: grid; grid-template-columns: minmax(270px, 340px) 1fr; gap: 20px; align-items: stretch; margin-top: 12px; }
@media (max-width: 900px) { .wz-panel { grid-template-columns: 1fr; } }
.wz-tel { background: linear-gradient(155deg, #0f766e 0%, #16a34a 60%, #25d366 100%); color: #fff; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; box-shadow: 0 16px 34px rgba(18,140,126,.28); position: relative; overflow: hidden; }
.wz-tel::after { content: ''; position: absolute; right: -50px; bottom: -50px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.08); }
.wz-tel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; position: relative; z-index: 1; }
.wz-tel-ico { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.wz-linea { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.2); padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.wz-linea i { width: 9px; height: 9px; border-radius: 50%; background: #bbf7d0; animation: wzPulso 1.8s infinite; }
@keyframes wzPulso { 0% { box-shadow: 0 0 0 0 rgba(187,247,208,.8); } 70% { box-shadow: 0 0 0 9px rgba(187,247,208,0); } 100% { box-shadow: 0 0 0 0 rgba(187,247,208,0); } }
.wz-tel-num { font-size: 1.6rem; font-weight: 800; letter-spacing: .01em; position: relative; z-index: 1; }
.wz-tel-nombre { opacity: .9; font-weight: 600; margin-top: 2px; position: relative; z-index: 1; }
.wz-tel-desde { opacity: .8; font-size: .8rem; margin-top: 6px; position: relative; z-index: 1; }
.wz-tel-nota { opacity: .85; font-size: .84rem; line-height: 1.45; margin: 16px 0 18px; position: relative; z-index: 1; }
.wz-tel-botones { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: stretch; position: relative; z-index: 1; }
.wz-tel-btn { background: #fff; color: #0f766e; border: 0; border-radius: 14px; padding: 11px 14px; font-weight: 800; font-size: .92rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wz-tel-btn:hover { background: #f0fdf4; }
.wz-tel-enlace { background: none; border: 0; color: rgba(255,255,255,.8); font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 4px; }
.wz-der { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .wz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wz-stat { background: var(--color-bg); border-radius: 18px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.wz-stat i { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; color: #fff; margin-bottom: 6px; }
.wz-stat.verde i { background: linear-gradient(135deg, #10b981, #34d399); } .wz-stat.azul i { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.wz-stat.ambar i { background: linear-gradient(135deg, #f59e0b, #fbbf24); } .wz-stat.rojo i { background: linear-gradient(135deg, #ef4444, #f97316); }
.wz-stat b { font-size: 1.5rem; font-weight: 800; color: var(--color-text); line-height: 1.1; } .wz-stat span { font-size: .76rem; color: var(--color-text-muted); }
.wz-acc-titulo { margin: 4px 0 0; font-size: .95rem; color: var(--color-text); }
.wz-accs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .wz-accs { grid-template-columns: 1fr; } }
.wz-acc { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.wz-acc:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,.08); border-color: #86efac; }
.wz-acc-ico { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; flex: none; }
.wz-acc-ico.verde { background: linear-gradient(135deg, #10b981, #34d399); } .wz-acc-ico.azul { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.wz-acc-ico.ambar { background: linear-gradient(135deg, #f59e0b, #fbbf24); } .wz-acc-ico.rojo { background: linear-gradient(135deg, #ef4444, #f97316); }
.wz-acc-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; } .wz-acc-txt b { font-size: .92rem; color: var(--color-text); } .wz-acc-txt small { color: var(--color-text-muted); font-size: .78rem; line-height: 1.35; }
.wz-acc-flecha { color: var(--color-text-muted); font-size: .8rem; }
/* El panel se adapta al ANCHO DE LA TARJETA (no de la pantalla): con el menu lateral abierto la tarjeta es mas angosta que la ventana. */
.wz { container-type: inline-size; container-name: wz; }
@container wz (max-width: 760px) {
    .wz-panel { grid-template-columns: 1fr; }
    .wz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wz-accs { grid-template-columns: 1fr; }
    .wz-tel-botones { margin-top: 4px; flex-direction: row; align-items: center; justify-content: space-between; }
}
@container wz (max-width: 520px) { .wz-tel-botones { flex-direction: column; align-items: stretch; } .wz-tel-num { font-size: 1.35rem; } }
.wz-acc-txt b, .wz-acc-txt small { word-break: normal; overflow-wrap: break-word; }

/* ----- Mensajeria: pestañas superiores, correo y SMS ----- */
.ms-tabs { display: flex; gap: 10px; margin: 6px 0 18px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.ms-tab { --ms-c: var(--color-primary); position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); color: var(--color-text-muted); font-weight: 700; font-size: .94rem; cursor: pointer; white-space: nowrap; transition: border-color .12s, box-shadow .12s, color .12s; }
.ms-tab[data-tab="whatsapp"] { --ms-c: #16a34a; } .ms-tab[data-tab="correo"] { --ms-c: #7c3aed; } .ms-tab[data-tab="sms"] { --ms-c: #2563eb; } .ms-tab[data-tab="historial"] { --ms-c: #f59e0b; }
.ms-tab:hover { border-color: var(--ms-c); color: var(--color-text); }
.ms-tab.active { border-color: var(--ms-c); color: var(--color-text); box-shadow: 0 0 0 3px rgba(148,163,184,.18), 0 8px 18px rgba(15,23,42,.08); }
.ms-tab.active::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: -9px; height: 3px; border-radius: 3px; background: var(--ms-c); }
.ms-tab-ico { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; flex: none; }
.ms-tab-ico.verde { background: linear-gradient(135deg, #25d366, #128c7e); } .ms-tab-ico.morado { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.ms-tab-ico.azul { background: linear-gradient(135deg, #3b82f6, #1d4ed8); } .ms-tab-ico.ambar { background: linear-gradient(135deg, #f59e0b, #f97316); }
.ms-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; flex: none; }
.ms-dot.ok { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.2); } .ms-dot.aviso { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.ms-pane { display: none; } .ms-pane.active { display: block; }
@media (max-width: 560px) { .ms-tab { padding-right: 12px; font-size: .88rem; } }

/* Variantes de color del asistente (WhatsApp es el verde de siempre) */
.wz-logo.morado { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 8px 18px rgba(109,40,217,.3); }
.wz-logo.azul { background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 8px 18px rgba(29,78,216,.3); }
.wz.morado .wz-pasos3 span { background: #7c3aed; } .wz.azul .wz-pasos3 span { background: #2563eb; }
.wz-boton.morado { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 10px 22px rgba(109,40,217,.35); }
.wz-boton.azul { background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 10px 22px rgba(29,78,216,.35); }
.wz-boton.chico { box-shadow: none; }
.wz-tel.morado { background: linear-gradient(155deg, #4c1d95 0%, #6d28d9 60%, #8b5cf6 100%); box-shadow: 0 16px 34px rgba(109,40,217,.28); }
.wz-tel.azul { background: linear-gradient(155deg, #1e3a8a 0%, #1d4ed8 60%, #3b82f6 100%); box-shadow: 0 16px 34px rgba(29,78,216,.28); }
.wz-tel.morado .wz-tel-btn { color: #5b21b6; } .wz-tel.morado .wz-tel-btn:hover { background: #f5f3ff; }
.wz-tel.azul .wz-tel-btn { color: #1d4ed8; } .wz-tel.azul .wz-tel-btn:hover { background: #eff6ff; }
.wz-tel-num.largo { font-size: 1.2rem; overflow-wrap: anywhere; line-height: 1.25; }
.wz-acc:hover { border-color: #c4b5fd; }

/* Formulario sencillo dentro del asistente */
.ms-form { margin-top: 16px; padding: 18px; border-radius: 18px; background: var(--color-bg); }
.ms-form[hidden] { display: none; }
.ms-form .field > label { font-weight: 700; }
.ms-servs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ms-serv { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--color-text); }
.ms-serv input { display: none; } .ms-serv i { color: #7c3aed; font-size: 1.05rem; width: 20px; text-align: center; }
.ms-serv:has(input:checked) { border-color: #7c3aed; background: rgba(124,58,237,.09); box-shadow: 0 0 0 2px rgba(124,58,237,.18); }
.ms-ayuda { margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: var(--color-surface); border: 1px dashed var(--color-border); font-size: .88rem; }
.ms-ayuda summary { cursor: pointer; font-weight: 700; color: var(--color-text); }
.ms-ayuda p, .ms-ayuda ul { margin: 8px 0 0; color: var(--color-text-muted); line-height: 1.55; } .ms-ayuda ul { padding-left: 18px; }
.ms-form .btn-row { margin-top: 14px; }

/* Historial: filtros por canal */
.ms-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ms-chip { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 700; cursor: pointer; }
.ms-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.vc-cola .vc-item[hidden] { display: none; }

/* ===== Pantallas de administracion (.pg-*): encabezado, listas, ventanas "Agregar", preloader ===== */
.pg-cab { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; flex-wrap: wrap; }
.pg-cab-txt { flex: 1; min-width: 220px; }
.pg-cab-txt h2 { margin: 0; font-size: 1.35rem; color: var(--color-text); border: 0; padding: 0; }
.pg-cab-txt p { margin: 3px 0 0; color: var(--color-text-muted); font-size: .92rem; line-height: 1.45; }
.pg-logo { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; flex: none; background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary)); box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary) 28%, transparent); }
.pg-logo.verde, .pg-modal-ico.verde, .pg-fila-ico.verde, .pg-vacio-ico.verde { background: linear-gradient(135deg, #10b981, #34d399); }
.pg-logo.azul, .pg-modal-ico.azul, .pg-fila-ico.azul, .pg-vacio-ico.azul { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.pg-logo.morado, .pg-modal-ico.morado, .pg-fila-ico.morado, .pg-vacio-ico.morado { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.pg-logo.rojo, .pg-modal-ico.rojo, .pg-fila-ico.rojo, .pg-vacio-ico.rojo { background: linear-gradient(135deg, #ef4444, #f97316); }
.pg-logo.ambar, .pg-modal-ico.ambar, .pg-fila-ico.ambar, .pg-vacio-ico.ambar { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.pg-logo.cian, .pg-modal-ico.cian, .pg-fila-ico.cian, .pg-vacio-ico.cian { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.pg-logo.gris, .pg-modal-ico.gris, .pg-fila-ico.gris, .pg-vacio-ico.gris { background: linear-gradient(135deg, #94a3b8, #64748b); }

.pg-agregar { display: inline-flex; align-items: center; gap: 9px; border: 0; cursor: pointer; padding: 13px 24px; border-radius: 16px; color: #fff; font-weight: 800; font-size: 1rem; background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary)); box-shadow: 0 10px 22px color-mix(in srgb, var(--color-primary) 32%, transparent); transition: transform .12s, box-shadow .12s; text-decoration: none; }
.pg-agregar:hover { transform: translateY(-2px); box-shadow: 0 14px 26px color-mix(in srgb, var(--color-primary) 38%, transparent); color: #fff; text-decoration: none; }
.pg-agregar i { font-size: .95rem; }

.pg-ayuda { margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; background: var(--color-surface); border: 1px dashed var(--color-border); font-size: .9rem; }
.pg-ayuda summary { cursor: pointer; font-weight: 700; color: var(--color-text); list-style: none; }
.pg-ayuda summary i { color: var(--color-primary); margin-right: 4px; }
.pg-ayuda ol { margin: 10px 0 2px; padding-left: 22px; color: var(--color-text-muted); line-height: 1.6; display: flex; flex-direction: column; gap: 4px; }
.pg-ayuda ol b { color: var(--color-text); }

.pg-lista { display: flex; flex-direction: column; gap: 10px; }
.pg-fila { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .12s, border-color .12s, transform .12s; flex-wrap: wrap; }
.pg-fila:hover { box-shadow: 0 10px 22px rgba(15,23,42,.07); border-color: #fdba74; }
.pg-fila[hidden] { display: none; }
.pg-fila.apagada { opacity: .62; }
.pg-fila-ico { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; flex: none; background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary)); }
.pg-fila-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.pg-fila-info b { font-size: 1rem; color: var(--color-text); overflow-wrap: anywhere; }
.pg-fila-info small { color: var(--color-text-muted); font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; }
.pg-acc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.pg-inline { display: inline; margin: 0; }
.pg-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font-weight: 700; font-size: .85rem; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s; }
.pg-btn:hover { background: var(--color-bg); border-color: #fdba74; text-decoration: none; color: var(--color-text); }
.pg-btn.rojo { color: #dc2626; border-color: #fecaca; background: #fef2f2; } .pg-btn.rojo:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.pg-btn.verde { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; } .pg-btn.verde:hover { background: #dcfce7; }
.pg-btn.azul { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; } .pg-btn.azul:hover { background: #dbeafe; }
.pg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: #f1f5f9; color: #475569; white-space: nowrap; }
.pg-chip.verde { background: #dcfce7; color: #15803d; } .pg-chip.rojo { background: #fee2e2; color: #b91c1c; } .pg-chip.ambar { background: #fef3c7; color: #b45309; } .pg-chip.azul { background: #dbeafe; color: #1d4ed8; } .pg-chip.morado { background: #ede9fe; color: #6d28d9; }
@media (max-width: 640px) { .pg-fila { padding: 12px; } .pg-acc { width: 100%; margin-left: 0; } .pg-acc .pg-btn { flex: 1; justify-content: center; } .pg-acc .pg-inline { flex: 1; display: flex; } .pg-acc .pg-inline .pg-btn { width: 100%; } }

/* Tarjetas en cuadricula (para planes, zonas... cuando hay mas datos que un nombre) */
.pg-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pg-tarjeta { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .12s, border-color .12s; }
.pg-tarjeta:hover { box-shadow: 0 12px 26px rgba(15,23,42,.08); border-color: #fdba74; }
.pg-tarjeta-cab { display: flex; align-items: center; gap: 12px; }
.pg-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pg-dato { background: var(--color-bg); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pg-dato span { font-size: .72rem; color: var(--color-text-muted); } .pg-dato b { font-size: .92rem; color: var(--color-text); overflow-wrap: anywhere; }
.pg-tarjeta .pg-acc { margin-left: 0; margin-top: auto; }

.pg-vacio { text-align: center; padding: 38px 16px 30px; background: var(--color-surface); border: 1px dashed var(--color-border); border-radius: 22px; }
.pg-vacio-ico { width: 74px; height: 74px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary)); box-shadow: 0 12px 24px color-mix(in srgb, var(--color-primary) 25%, transparent); }
.pg-vacio h3 { margin: 14px 0 6px; font-size: 1.15rem; color: var(--color-text); }
.pg-vacio p { margin: 0 auto 18px; max-width: 460px; color: var(--color-text-muted); font-size: .92rem; line-height: 1.5; }

/* Ventana de agregar / editar */
.pg-modal { border: 0; padding: 0; border-radius: 24px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--color-surface); color: var(--color-text); box-shadow: 0 30px 70px rgba(15,23,42,.35); overflow: hidden; }
.pg-modal[open] { display: flex; flex-direction: column; animation: pgModal .18s ease-out; }
.pg-modal::backdrop { background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
@keyframes pgModal { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.pg-modal.ancha { width: min(780px, calc(100vw - 24px)); }
.pg-modal-cab { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--color-border); }
.pg-modal-cab h3 { margin: 0; flex: 1; font-size: 1.15rem; color: var(--color-text); }
.pg-modal-ico { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary)); flex: none; }
.pg-x { border: 0; background: var(--color-bg); color: var(--color-text-muted); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; } .pg-x:hover { background: #fee2e2; color: #dc2626; }
.pg-modal-cuerpo { padding: 18px 20px 20px; overflow-y: auto; }
.pg-modal-cuerpo .field > label { font-weight: 700; color: var(--color-text); }
.pg-modal-cuerpo .field-hint { margin: 2px 0 0; }
.pg-modal-cuerpo .form-grid { gap: 14px; }
.pg-modal-pie { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.pg-modal-pie .btn { padding: 11px 20px; border-radius: 14px; }
@media (max-width: 560px) { .pg-modal-pie .btn { flex: 1; justify-content: center; } }

/* Interruptor (activo / inactivo) */
.pg-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-bg); }
.pg-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pg-switch-pista { width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1; position: relative; flex: none; transition: background .15s; }
.pg-switch-pista::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.pg-switch input:checked + .pg-switch-pista { background: #16a34a; } .pg-switch input:checked + .pg-switch-pista::after { transform: translateX(20px); }
.pg-switch input:focus-visible + .pg-switch-pista { outline: 3px solid color-mix(in srgb, var(--color-primary) 40%, transparent); outline-offset: 2px; }
.pg-switch-txt { display: flex; flex-direction: column; } .pg-switch-txt b { color: var(--color-text); font-size: .94rem; } .pg-switch-txt small { color: var(--color-text-muted); font-size: .8rem; }

/* Buscador y "Mostrar mas" de las listas largas */
.pg-buscar { display: flex; align-items: center; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 4px 14px; margin-bottom: 12px; }
.pg-buscar > i { color: var(--color-text-muted); }
.pg-buscar input { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 10px 4px; min-width: 0; font-size: .95rem; }
.pg-contador { font-size: .78rem; color: var(--color-text-muted); white-space: nowrap; font-weight: 700; }
.pg-mas { display: block; margin: 14px auto 0; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 14px; padding: 10px 22px; font-weight: 700; cursor: pointer; } .pg-mas:hover { border-color: #fdba74; } .pg-mas[hidden] { display: none; }

/* Preloader: barra de arriba, velo mientras se guarda y "cargando" de las tablas */
.pg-progreso { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 3000; background: linear-gradient(90deg, #f97316, #fbbf24); box-shadow: 0 0 10px rgba(249,115,22,.6); opacity: 0; transition: width .2s ease, opacity .25s; pointer-events: none; }
.pg-velo { position: fixed; inset: 0; z-index: 2900; display: none; align-items: center; justify-content: center; background: rgba(241,245,249,.65); backdrop-filter: blur(2px); }
.pg-velo.on { display: flex; }
.pg-velo-caja { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--color-surface); padding: 22px 34px; border-radius: 22px; box-shadow: 0 20px 50px rgba(15,23,42,.2); }
.pg-velo-caja i { font-size: 2.2rem; color: var(--color-primary); margin-bottom: 6px; } .pg-velo-caja b { color: var(--color-text); } .pg-velo-caja small { color: var(--color-text-muted); }
button.pg-ocupado { opacity: .7; pointer-events: none; }
div.dataTables_processing { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 20; padding: 14px 26px; border-radius: 16px; background: var(--color-surface); color: var(--color-text); font-weight: 700; box-shadow: 0 14px 34px rgba(15,23,42,.18); border: 1px solid var(--color-border); }
div.dataTables_processing i { color: var(--color-primary); margin-right: 6px; }

:root[data-theme="dark"] .pg-velo { background: rgba(2,6,23,.6); }
:root[data-theme="dark"] .pg-chip { background: rgba(148,163,184,.18); color: #cbd5e1; }
:root[data-theme="dark"] .pg-chip.verde { background: rgba(16,185,129,.18); color: #6ee7b7; } :root[data-theme="dark"] .pg-chip.rojo { background: rgba(239,68,68,.18); color: #fca5a5; }
:root[data-theme="dark"] .pg-chip.ambar { background: rgba(245,158,11,.18); color: #fcd34d; } :root[data-theme="dark"] .pg-chip.azul { background: rgba(59,130,246,.2); color: #93c5fd; } :root[data-theme="dark"] .pg-chip.morado { background: rgba(139,92,246,.2); color: #c4b5fd; }
:root[data-theme="dark"] .pg-btn.rojo { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.35); color: #fca5a5; }
:root[data-theme="dark"] .pg-btn.verde { background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.35); color: #6ee7b7; }
:root[data-theme="dark"] .pg-btn.azul { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.35); color: #93c5fd; }
.pg-fila-img { width: 64px; height: 48px; object-fit: cover; border-radius: 12px; flex: none; border: 1px solid var(--color-border); }
.pg-tarjeta.apagada { opacity: .65; }

/* Filtros por estado (pestañas con numero) y entrega en linea */
.pg-tabs { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; padding-bottom: 6px; }
.pg-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.pg-tab:hover { border-color: #fdba74; color: var(--color-text); text-decoration: none; }
.pg-tab .n { background: var(--color-bg); color: var(--color-text-muted); border-radius: 999px; padding: 1px 9px; font-size: .78rem; }
.pg-tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; } .pg-tab.active .n { background: rgba(255,255,255,.25); color: #fff; }
.pg-entregar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.pg-entregar input { min-width: 220px; }
@media (max-width: 640px) { .pg-entregar { width: 100%; margin-left: 0; } .pg-entregar input { flex: 1 1 100%; } .pg-entregar .pg-btn { flex: 1; justify-content: center; } }
.pg-barra { height: 10px; border-radius: 999px; background: var(--color-bg); overflow: hidden; }
.pg-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10b981, #34d399); transition: width .4s; }
.pg-barra i.ambar { background: linear-gradient(90deg, #f59e0b, #fbbf24); } .pg-barra i.rojo { background: linear-gradient(90deg, #ef4444, #f97316); }
.pg-barra-txt { display: flex; justify-content: space-between; margin-top: 6px; font-size: .8rem; color: var(--color-text-muted); } .pg-barra-txt b { color: var(--color-text); }
.pg-sub { margin: 22px 0 8px; font-size: 1rem; color: var(--color-text); }
.pg-precio { font-size: 1.7rem; font-weight: 800; color: var(--color-text); line-height: 1; } .pg-precio small { font-size: .8rem; font-weight: 600; color: var(--color-text-muted); }
.pg-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-etiqueta { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--color-bg); color: var(--color-text-muted); font-size: .76rem; font-weight: 700; }
.pg-tarjeta[hidden] { display: none; }
.pg-avatar { border-radius: 50%; font-weight: 800; font-size: .95rem; letter-spacing: .02em; }
.pg-permisos { margin-top: 12px; border: 1px solid var(--color-border); border-radius: 18px; overflow: hidden; }
.pg-permisos-cab { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--color-bg); font-weight: 800; color: var(--color-text); } .pg-permisos-cab i { color: #7c3aed; margin-right: 6px; }
.pg-todos { border: 0; background: none; color: var(--color-primary); font-weight: 800; font-size: .82rem; cursor: pointer; }
.pg-permisos-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; padding: 10px 14px 12px; }
@media (max-width: 560px) { .pg-permisos-lista { grid-template-columns: 1fr; } }
.pg-permiso { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: .9rem; color: var(--color-text); }
.pg-permiso input { position: absolute; opacity: 0; pointer-events: none; }
.pg-permiso .pg-switch-pista { width: 38px; height: 22px; } .pg-permiso .pg-switch-pista::after { width: 16px; height: 16px; top: 3px; left: 3px; }
.pg-permiso input:checked + .pg-switch-pista { background: #16a34a; } .pg-permiso input:checked + .pg-switch-pista::after { transform: translateX(16px); }
/* Tablas de datos (DataTables) dentro de las pantallas nuevas: mas aire y encabezado suave */
.pg-tabla { padding: 8px 14px 14px; border-radius: 22px; }
.pg-tabla table.data-table thead th { background: var(--color-bg); border-bottom: 0; }
.pg-tabla table.data-table thead th:first-child { border-radius: 12px 0 0 12px; } .pg-tabla table.data-table thead th:last-child { border-radius: 0 12px 12px 0; }
.pg-tabla .dataTables_wrapper { position: relative; }
.pg-tabla .dataTables_filter input { border-radius: 12px; padding: 8px 12px; }
.pg-picker { position: relative; }
.pg-picker-res { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 16px 34px rgba(15,23,42,.18); max-height: 280px; overflow-y: auto; padding: 6px; }
.pg-picker-res[hidden] { display: none; }
.pg-picker-op { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--color-text); } .pg-picker-op:hover { background: var(--color-bg); }
.pg-picker-op small { color: var(--color-text-muted); font-size: .78rem; }
.pg-picker-msg { padding: 12px; color: var(--color-text-muted); font-size: .88rem; text-align: center; }
.pg-acciones-cab { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: -4px 0 14px; }
.pg-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pg-asignar { flex: 1 1 100%; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px dashed var(--color-border); }
.pg-asignar select { flex: 1 1 200px; min-width: 0; } .pg-asignar input[type=date] { flex: 0 1 170px; }
.pg-aviso { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin: 0 0 16px; border-radius: 16px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: .92rem; } .pg-aviso i { font-size: 1.1rem; } .pg-aviso span { flex: 1; min-width: 200px; }
:root[data-theme="dark"] .pg-aviso { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #fcd34d; }
.pg-ips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pg-ip { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--color-border); text-decoration: none; color: var(--color-text); min-width: 0; }
.pg-ip[hidden] { display: none; } .pg-ip b { font-size: .88rem; } .pg-ip small { font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-ip.libre { background: #f0fdf4; border-color: #bbf7d0; } .pg-ip.libre small { color: #15803d; }
.pg-ip.uso { background: #fef2f2; border-color: #fecaca; } .pg-ip.uso small { color: #b91c1c; } a.pg-ip.uso:hover { border-color: #f87171; text-decoration: none; }
:root[data-theme="dark"] .pg-ip.libre { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); } :root[data-theme="dark"] .pg-ip.uso { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); }
button.pg-tab { cursor: pointer; font-family: inherit; }
.pg-linea { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pg-paso { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--color-bg); text-align: center; }
.pg-paso-dia { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; color: #fff; background: linear-gradient(135deg, #3b82f6, #6366f1); }
.pg-paso.rojo .pg-paso-dia { background: linear-gradient(135deg, #ef4444, #f97316); } .pg-paso small { color: var(--color-text-muted); font-size: .74rem; font-weight: 700; }
.pg-paso-tit { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font-size: 1rem; color: var(--color-text); } .pg-paso-tit:first-child { margin-top: 4px; }
.pg-paso-tit span { width: 26px; height: 26px; border-radius: 50%; background: var(--color-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; flex: none; }
.pg-sw-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } @media (max-width: 640px) { .pg-sw-lista { grid-template-columns: 1fr; } }
.pg-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 10px; margin: 0 0 14px; }
.pg-filtros select, .pg-filtros input[type=search] { flex: 1 1 160px; min-width: 0; } .pg-filtros input[type=search] { flex: 2 1 240px; }
.pg-barra-sel { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.pg-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--color-text); } .pg-check input { width: 18px; height: 18px; accent-color: var(--color-primary); }
.pg-check-solo { margin-right: -4px; }
.pg-tarjetas-anchas { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.pg-det { border-radius: 14px; background: var(--color-bg); padding: 10px 12px; } .pg-det summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--color-text); }
.pg-mini { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 260px; overflow-y: auto; }
.pg-mini-fila { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--color-surface); cursor: pointer; } .pg-mini-fila input { margin-top: 4px; accent-color: var(--color-primary); }
.pg-mini-fila span { display: flex; flex-direction: column; min-width: 0; } .pg-mini-fila b { font-size: .88rem; color: var(--color-text); } .pg-mini-fila small { color: var(--color-text-muted); font-size: .76rem; }
@media (max-width: 640px) { .wz-stats[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.ms-tab[data-tab="mora"] { --ms-c: #ef4444; } .ms-tab[data-tab="pronto"] { --ms-c: #16a34a; } .ms-tab[data-tab="reconexion"] { --ms-c: #7c3aed; } .ms-tab[data-tab="prorrateo"] { --ms-c: #f59e0b; } .ms-tab[data-tab="series"] { --ms-c: #2563eb; }
.ms-tab-ico.rojo { background: linear-gradient(135deg, #ef4444, #f97316); } .ms-tab-ico.cian { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.ms-guardar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; } .ms-guardar[hidden] { display: none; } .ms-guardar small { color: var(--color-text-muted); }

/* Barra de numeros en una sola tarjeta (resumen de arriba de cada pantalla) */
.wz-stats.pg-kpis { display: flex; flex-wrap: wrap; gap: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; box-shadow: 0 8px 22px rgba(15,23,42,.06); padding: 6px; overflow: hidden; }
.wz-stats.pg-kpis .wz-stat { flex: 1 1 170px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico lbl" "ico num"; column-gap: 14px; row-gap: 0; align-content: center; align-items: center; background: none; border-radius: 0; border-left: 1px solid var(--color-border); padding: 14px 20px; min-width: 0; }
.wz-stats.pg-kpis .wz-stat:first-child { border-left: 0; }
.wz-stats.pg-kpis .wz-stat i { grid-area: ico; width: 48px; height: 48px; border-radius: 15px; margin: 0; font-size: 1.15rem; background: #f1f5f9; color: #64748b; }
.wz-stats.pg-kpis .wz-stat span { grid-area: lbl; align-self: end; text-transform: uppercase; font-size: .68rem; font-weight: 800; letter-spacing: .06em; color: var(--color-text-muted); line-height: 1.2; }
.wz-stats.pg-kpis .wz-stat b { grid-area: num; align-self: start; font-size: 1.9rem; font-weight: 800; line-height: 1.05; overflow-wrap: anywhere; }
.wz-stats.pg-kpis .wz-stat.verde i { background: #dcfce7; color: #16a34a; } .wz-stats.pg-kpis .wz-stat.verde b { color: #16a34a; }
.wz-stats.pg-kpis .wz-stat.azul i { background: #dbeafe; color: #3b82f6; } .wz-stats.pg-kpis .wz-stat.azul b { color: #3b82f6; }
.wz-stats.pg-kpis .wz-stat.ambar i { background: #fef3c7; color: #d97706; } .wz-stats.pg-kpis .wz-stat.ambar b { color: #d97706; }
.wz-stats.pg-kpis .wz-stat.rojo i { background: #fee2e2; color: #dc2626; } .wz-stats.pg-kpis .wz-stat.rojo b { color: #dc2626; }
a.wz-stat:hover { text-decoration: none; }
@media (max-width: 640px) {
    .wz-stats.pg-kpis .wz-stat { flex: 1 1 45%; border-left: 0; border-bottom: 1px solid var(--color-border); padding: 12px; column-gap: 10px; }
    .wz-stats.pg-kpis .wz-stat i { width: 40px; height: 40px; font-size: 1rem; } .wz-stats.pg-kpis .wz-stat b { font-size: 1.5rem; }
}
:root[data-theme="dark"] .wz-stats.pg-kpis .wz-stat.verde i { background: rgba(22,163,74,.2); } :root[data-theme="dark"] .wz-stats.pg-kpis .wz-stat.azul i { background: rgba(59,130,246,.2); }
:root[data-theme="dark"] .wz-stats.pg-kpis .wz-stat.ambar i { background: rgba(245,158,11,.2); } :root[data-theme="dark"] .wz-stats.pg-kpis .wz-stat.rojo i { background: rgba(220,38,38,.2); }
@media (min-width: 700px) { .ms-tabs { flex-wrap: wrap; overflow: visible; row-gap: 14px; } }

/* Pestañas de arriba en una sola tarjeta con divisiones (mismo estilo que la barra de numeros) */
.ms-tabs { display: flex; flex-wrap: nowrap; gap: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; box-shadow: 0 8px 22px rgba(15,23,42,.06); padding: 6px; margin: 4px 0 18px; overflow-x: auto; row-gap: 0; }
.ms-tab { flex: 1 1 0; min-width: 168px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-left: 1px solid var(--color-border); border-radius: 0; background: none; box-shadow: none; text-align: left; position: relative; color: var(--color-text-muted); transition: background .12s; }
.ms-tab:first-child { border-left: 0; }
.ms-tab:hover { background: var(--color-bg); border-color: var(--color-border); }
.ms-tab.active { background: color-mix(in srgb, var(--ms-c) 9%, transparent); box-shadow: none; border-left-color: var(--color-border); border-radius: 16px; }
.ms-tab.active + .ms-tab, .ms-tab:has(+ .ms-tab.active) { border-left-color: transparent; }
.ms-tab.active::after { left: 18%; right: 18%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ms-c); }
.ms-tab-ico { width: 44px; height: 44px; border-radius: 14px; font-size: 1.15rem; }
.ms-tab-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-tab-txt b { font-size: .98rem; color: var(--color-text); white-space: nowrap; }
.ms-tab-txt small { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }
.ms-tab-txt small .ms-dot { width: 8px; height: 8px; box-shadow: none; }
.ms-tab.active .ms-tab-txt b { color: var(--ms-c); }
@media (min-width: 700px) { .ms-tabs { flex-wrap: nowrap; overflow-x: auto; } }
@media (max-width: 560px) { .ms-tab { min-width: 150px; padding: 10px 12px; } .ms-tab-ico { width: 38px; height: 38px; } }
.ms-tabs { scrollbar-width: none; } .ms-tabs::-webkit-scrollbar { display: none; }
.ms-tab { flex: 1 1 auto; min-width: 0; padding: 10px 12px; gap: 10px; }
.ms-tab-ico { width: 40px; height: 40px; font-size: 1.05rem; flex: none; }
.ms-tab-txt b { font-size: .92rem; }
@media (max-width: 900px) { .ms-tab { flex: 0 0 auto; min-width: 150px; } }
a.ms-tab, a.ms-tab:hover { text-decoration: none; }
.ms-tab-ico.gris { background: linear-gradient(135deg, #94a3b8, #64748b); }
.ms-tabs.filtros { margin: 0 0 16px; }
.wz-linea.mal { background: rgba(254,202,202,.35); } .wz-linea.mal i { background: #fecaca; animation: none; }

/* Tickets de soporte en tarjetas */
.tk-lista { display: flex; flex-direction: column; gap: 14px; }
.tk-card { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 5px solid #94a3b8; border-radius: 20px; padding: 16px 18px; box-shadow: 0 2px 8px rgba(15,23,42,.04); display: flex; flex-direction: column; gap: 12px; }
.tk-card.rojo { border-left-color: #ef4444; } .tk-card.ambar { border-left-color: #f59e0b; } .tk-card.verde { border-left-color: #16a34a; }
.tk-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-quien { flex: 1; min-width: 160px; display: flex; flex-direction: column; } .tk-quien b { font-size: 1rem; } .tk-quien small { color: var(--color-text-muted); font-size: .8rem; }
.tk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-cuerpo h3 { margin: 0 0 4px; font-size: 1.12rem; color: var(--color-text); }
.tk-desc { margin: 0; color: var(--color-text-muted); font-size: .92rem; line-height: 1.5; white-space: pre-line; } .tk-desc.vacio { font-style: italic; }
.tk-dato { margin-top: 8px; font-size: .86rem; color: var(--color-text); } .tk-dato i { color: #64748b; width: 18px; }
.tk-resp { margin-top: 10px; display: flex; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f0fdf4; color: #166534; font-size: .86rem; line-height: 1.45; } .tk-resp i { margin-top: 3px; }
:root[data-theme="dark"] .tk-resp { background: rgba(16,185,129,.12); color: #86efac; }
.tk-pie { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.tk-card.esq { border-left-color: var(--color-border); } .esq-linea { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--color-bg), #e2e8f0, var(--color-bg)); background-size: 200% 100%; animation: tkEsq 1.2s infinite; width: 70%; } .esq-linea.ancho { width: 45%; height: 18px; } .esq-linea.corto { width: 30%; }
@keyframes tkEsq { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tk-resumen { padding: 12px 14px; border-radius: 14px; background: var(--color-bg); font-size: .9rem; line-height: 1.5; } .tk-resumen p { margin: 6px 0 0; color: var(--color-text-muted); white-space: pre-line; }
.tk-estados { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } @media (max-width: 560px) { .tk-estados { grid-template-columns: 1fr; } }
.tk-estado { cursor: pointer; } .tk-estado input { position: absolute; opacity: 0; pointer-events: none; }
.tk-estado span { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 14px 8px; border: 2px solid var(--color-border); border-radius: 16px; background: var(--color-surface); transition: border-color .12s, background .12s; }
.tk-estado span i { font-size: 1.3rem; color: #94a3b8; margin-bottom: 4px; } .tk-estado span b { color: var(--color-text); } .tk-estado span small { color: var(--color-text-muted); font-size: .74rem; }
.tk-estado.rojo input:checked + span { border-color: #ef4444; background: #fef2f2; } .tk-estado.rojo input:checked + span i { color: #ef4444; }
.tk-estado.ambar input:checked + span { border-color: #f59e0b; background: #fffbeb; } .tk-estado.ambar input:checked + span i { color: #f59e0b; }
.tk-estado.verde input:checked + span { border-color: #16a34a; background: #f0fdf4; } .tk-estado.verde input:checked + span i { color: #16a34a; }
:root[data-theme="dark"] .tk-estado input:checked + span { background: rgba(148,163,184,.12); }

/* ===== Inicio (panel principal) ===== */
.hm-saludo { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.hm-saludo h2 { margin: 0; font-size: 1.6rem; color: var(--color-text); border: 0; padding: 0; } .hm-saludo p { margin: 4px 0 0; color: var(--color-text-muted); }
.hm-rapidos { display: flex; gap: 8px; flex-wrap: wrap; }
.hm-rapidos .pg-agregar { padding: 10px 18px; font-size: .92rem; border-radius: 14px; }

.hm-atencion { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; padding: 16px 18px; margin: 0 0 18px; box-shadow: 0 8px 22px rgba(15,23,42,.05); }
.hm-atencion h3 { margin: 0 0 12px; font-size: 1.05rem; color: var(--color-text); } .hm-atencion h3 i { color: var(--color-primary); margin-right: 6px; }
.hm-atencion-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.hm-aten { --c: #64748b; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--color-border); background: var(--color-bg); text-decoration: none; color: var(--color-text); transition: transform .12s, box-shadow .12s, border-color .12s; }
.hm-aten:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(15,23,42,.08); border-color: var(--c); text-decoration: none; }
.hm-aten.rojo { --c: #ef4444; } .hm-aten.ambar { --c: #f59e0b; } .hm-aten.azul { --c: #3b82f6; } .hm-aten.morado { --c: #7c3aed; }
.hm-aten-ico { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--c); flex: none; }
.hm-aten-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; } .hm-aten-txt b { font-size: .95rem; } .hm-aten-txt small { color: var(--color-text-muted); font-size: .78rem; }
.hm-aten > .fa-chevron-right { color: var(--color-text-muted); font-size: .8rem; }
.hm-atencion.ok { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border-color: #bbf7d0; }
.hm-todo-bien { display: flex; align-items: center; gap: 14px; } .hm-todo-bien span { width: 46px; height: 46px; border-radius: 50%; background: #16a34a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.hm-todo-bien b { display: block; color: #166534; font-size: 1.05rem; } .hm-todo-bien small { color: #15803d; }
:root[data-theme="dark"] .hm-atencion.ok { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); } :root[data-theme="dark"] .hm-todo-bien b, :root[data-theme="dark"] .hm-todo-bien small { color: #86efac; }

.hm-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 0 0 18px; }
.hm-grupo { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; padding: 14px; box-shadow: 0 8px 22px rgba(15,23,42,.05); display: flex; flex-direction: column; gap: 8px; }
.hm-grupo-cab { display: flex; align-items: center; gap: 10px; padding: 2px 4px 6px; } .hm-grupo-cab h3 { margin: 0; flex: 1; font-size: 1.02rem; color: var(--color-text); } .hm-grupo-cab a { font-size: .8rem; font-weight: 700; color: var(--color-primary); text-decoration: none; }
.hm-fila { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--color-bg); text-decoration: none; color: var(--color-text); transition: transform .12s, background .12s; } .hm-fila:hover { transform: translateX(3px); text-decoration: none; background: var(--color-bg); box-shadow: inset 0 0 0 1px var(--color-border); }
.hm-fila-ico { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #f1f5f9; color: #64748b; }
.hm-fila-ico.verde { background: #dcfce7; color: #16a34a; } .hm-fila-ico.azul { background: #dbeafe; color: #3b82f6; } .hm-fila-ico.ambar { background: #fef3c7; color: #d97706; } .hm-fila-ico.rojo { background: #fee2e2; color: #dc2626; } .hm-fila-ico.morado { background: #ede9fe; color: #7c3aed; }
.hm-fila-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; } .hm-fila-txt small { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); } .hm-fila-txt em { font-style: normal; font-size: .78rem; color: var(--color-text-muted); }
.hm-fila b { font-size: 1.45rem; font-weight: 800; } .hm-fila b.verde { color: #16a34a; } .hm-fila b.azul { color: #3b82f6; } .hm-fila b.ambar { color: #d97706; } .hm-fila b.rojo { color: #dc2626; } .hm-fila b.morado { color: #7c3aed; }
:root[data-theme="dark"] .hm-fila-ico.verde { background: rgba(22,163,74,.2); } :root[data-theme="dark"] .hm-fila-ico.azul { background: rgba(59,130,246,.2); } :root[data-theme="dark"] .hm-fila-ico.ambar { background: rgba(245,158,11,.2); } :root[data-theme="dark"] .hm-fila-ico.rojo { background: rgba(220,38,38,.2); } :root[data-theme="dark"] .hm-fila-ico.morado { background: rgba(124,58,237,.2); }

.hm-fin { border-radius: 22px; box-shadow: 0 8px 22px rgba(15,23,42,.05); }
.hm-fin-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } .hm-fin-tit { flex: 1; min-width: 220px; } .hm-fin-tit h3 { margin: 0; font-size: 1.1rem; color: var(--color-text); } .hm-fin-tit p { margin: 2px 0 0; font-size: .84rem; color: var(--color-text-muted); }
.hm-anios { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--color-bg); } .hm-anios a { padding: 7px 12px; border-radius: 10px; font-weight: 700; font-size: .84rem; color: var(--color-text-muted); text-decoration: none; } .hm-anios a:hover { background: var(--color-surface); color: var(--color-text); } .hm-anios a.off { opacity: .35; pointer-events: none; } .hm-anios b { padding: 7px 14px; border-radius: 10px; background: var(--color-primary); color: #fff; }
.hm-kpis { margin-bottom: 16px; box-shadow: none; background: var(--color-bg); border-color: transparent; }
.hm-kpis .wz-stat { flex: 1 1 200px; } .hm-kpis .wz-stat b { font-size: 1.45rem; }
.wz-stats.pg-kpis .wz-stat { grid-template-areas: "ico lbl" "ico num" "ico sub"; }
.wz-stats.pg-kpis .wz-stat em { grid-area: sub; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--color-text-muted); }
.wz-stats.pg-kpis .wz-stat em.sube { color: #16a34a; } .wz-stats.pg-kpis .wz-stat em.baja { color: #dc2626; }
@media (max-width: 640px) { .hm-saludo h2 { font-size: 1.3rem; } .hm-rapidos .pg-btn, .hm-rapidos .pg-agregar { flex: 1 1 45%; justify-content: center; } }
.hm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; background: none; border: 0; padding: 0; box-shadow: none; overflow: visible; }
.hm-kpis .wz-stat { flex: none; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-bg); padding: 12px 14px; }
.hm-kpis .wz-stat:first-child { border-left: 1px solid var(--color-border); }
.hm-kpis .wz-stat b { font-size: 1.3rem; white-space: nowrap; }
.hm-kpis .wz-stat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .hm-kpis .wz-stat { border-bottom: 1px solid var(--color-border); } }
.wz-stats.pg-kpis.hm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; background: none; border: 0; padding: 0; box-shadow: none; overflow: visible; }
.wz-stats.pg-kpis.hm-kpis .wz-stat { flex: none; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-bg); padding: 12px 14px; }
.wz-stats.pg-kpis.hm-kpis .wz-stat b { font-size: 1.3rem; white-space: nowrap; }
.wz-stats.pg-kpis.hm-kpis .wz-stat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Clientes: buscador grande, tarjetas con botones con texto */
.ct-buscar { margin: 0 0 16px; padding: 6px 14px; } .ct-buscar input { font-size: 1rem; }
.ct-largo { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--color-text-muted); white-space: nowrap; } .ct-largo select { border-radius: 10px; padding: 5px 8px; }
.ct-grid { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ct-tarjeta { border-radius: 22px; padding: 16px; box-shadow: 0 2px 8px rgba(15,23,42,.04); }
.ct-tarjeta:hover { border-color: #fdba74; }
.ct-ops { gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: stretch; }
.ct-ops .pg-btn { flex: 1 1 auto; justify-content: center; } .ct-ops .pg-btn.rojo { flex: 0 0 auto; }
.ct-tarjeta.esq { pointer-events: none; display: flex; flex-direction: column; gap: 10px; min-height: 140px; }
.ct-pie { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; color: var(--color-text-muted); font-size: .86rem; }
.ct-botones-pag { display: inline-flex; align-items: center; gap: 8px; }
.ct-ops { flex-wrap: wrap; } .ct-ops .pg-btn { padding: 8px 9px; font-size: .8rem; gap: 5px; white-space: nowrap; }

/* Servicios: tarjetas con botones con texto */
.sv-filtros label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; font-size: .78rem; font-weight: 700; color: var(--color-text-muted); }
.sv-filtros select { width: 100%; }
.sv-grid { display: flex; flex-direction: column; gap: 12px; }
.sv-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(15,23,42,.04); transition: border-color .12s, box-shadow .12s; }
.sv-card:hover { border-color: #fdba74; box-shadow: 0 10px 22px rgba(15,23,42,.07); }
.sv-card.esq { flex-direction: column; align-items: stretch; pointer-events: none; min-height: 110px; gap: 10px; }
.sv-main { flex: 1 1 320px; min-width: 0; }
.sv-main .kx-row-thumb { width: 54px; height: 54px; border-radius: 16px; font-size: 1.35rem; }
.sv-main .kx-row-title { font-size: 1.05rem; font-weight: 800; }
.sv-acc { flex: 0 0 auto; }
.sv-acc .kx-row-actions-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sv-acc form { display: inline; margin: 0; }
@media (max-width: 700px) { .sv-acc, .sv-acc .kx-row-actions-group { width: 100%; } .sv-acc .pg-btn { flex: 1; justify-content: center; } .sv-acc .kx-row-actions-group > form { flex: 1; display: flex; } .sv-acc .kx-row-actions-group > form .pg-btn { width: 100%; } .sv-acc .kx-row-actions { flex: 1; display: flex; } .sv-acc .kx-row-actions .pg-btn { width: 100%; } }
.sv-filtros select { flex: none !important; height: auto; }
.sv-filtros select, .pg-filtros select { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; background-color: var(--color-surface); color: var(--color-text); font-size: .92rem; font-weight: 600; min-height: 42px; }
.sv-filtros { padding: 12px 14px; gap: 12px; border-radius: 20px; }
.cf-hero-ops { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cf-hero-ops .pg-btn { padding: 9px 14px; }
@media (max-width: 700px) { .cf-hero-ops { width: 100%; } .cf-hero-ops .pg-btn { flex: 1; justify-content: center; } }
.sv-acciones { padding: 14px 16px; border-radius: 22px; }
.sv-acciones-fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .sv-acciones-fila .pg-btn { padding: 10px 16px; font-size: .9rem; }
.sv-eliminar { margin-left: auto; }
@media (max-width: 700px) { .sv-eliminar { margin-left: 0; } .sv-acciones-fila > * { flex: 1 1 45%; } .sv-acciones-fila .pg-btn, .sv-acciones-fila form .pg-btn { width: 100%; justify-content: center; } }
.ms-tabs.cf-tabs { overflow-x: auto; flex-wrap: nowrap; }
.ms-tabs.cf-tabs .ms-tab { flex: 0 0 auto; min-width: 168px; }
@media (min-width: 1100px) { .ms-tabs.cf-tabs .ms-tab { flex: 1 1 auto; min-width: 0; } }

/* ===== Mapa de red ===== */
.mp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; margin-bottom: 20px; }
@media (max-width: 1100px) { .mp-wrap { grid-template-columns: 1fr; } }
.mp-mapa-caja { position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; box-shadow: 0 8px 22px rgba(15,23,42,.06); overflow: hidden; }
.mp-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.mp-capas { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-capa input { position: absolute; opacity: 0; pointer-events: none; }
.mp-capa span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-bg); font-size: .78rem; font-weight: 800; color: var(--color-text-muted); cursor: pointer; user-select: none; }
.mp-capa input:checked + span { color: #fff; border-color: transparent; }
.mp-capa.verde input:checked + span { background: #16a34a; } .mp-capa.rojo input:checked + span { background: #ef4444; } .mp-capa.gris input:checked + span { background: #64748b; } .mp-capa.azul input:checked + span { background: #2563eb; } .mp-capa.cian input:checked + span { background: #0891b2; }
.mp-capa span i { font-size: .7rem; }
.mp-herr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mp-herr select { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text); font-weight: 600; font-size: .85rem; }
.mp-buscar { position: relative; margin: 0; padding: 2px 10px; min-width: 210px; } .mp-buscar input { padding: 7px 4px; font-size: .88rem; }
.mp-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1200; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 14px 30px rgba(15,23,42,.2); padding: 4px; } .mp-sug[hidden] { display: none; }
.mp-sug button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--color-text); font-size: .86rem; } .mp-sug button:hover { background: var(--color-bg); }
.mp-sug-vacio { display: block; padding: 8px 10px; font-size: .8rem; color: var(--color-text-muted); }
#mapa { height: 68vh; min-height: 430px; width: 100%; background: #0f172a; z-index: 1; }
#mapa.colocando, #mapa.colocando .leaflet-grab, #mapa.colocando .leaflet-interactive { cursor: crosshair !important; }
.mp-modo { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 10px; background: var(--color-primary); color: #fff; padding: 9px 14px; border-radius: 14px; font-weight: 700; font-size: .88rem; box-shadow: 0 10px 24px color-mix(in srgb, var(--color-primary) 40%, transparent); max-width: calc(100% - 24px); } .mp-modo[hidden] { display: none; }
.mp-modo .pg-btn { padding: 4px 10px; font-size: .78rem; }
.mp-vacio { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); z-index: 900; background: var(--color-surface); border-radius: 18px; padding: 18px 22px; text-align: center; box-shadow: 0 14px 34px rgba(15,23,42,.3); display: flex; flex-direction: column; gap: 4px; max-width: 320px; } .mp-vacio[hidden] { display: none; }
.mp-vacio i { font-size: 1.6rem; color: var(--color-primary); } .mp-vacio span { font-size: .84rem; color: var(--color-text-muted); }

.mp-lado { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; box-shadow: 0 8px 22px rgba(15,23,42,.06); padding: 8px; }
.mp-pest { margin: 0 0 8px; box-shadow: none; padding: 4px; border-radius: 16px; } .mp-pest .ms-tab { min-width: 0; padding: 8px 10px; } .mp-pest .ms-tab-ico { width: 32px; height: 32px; font-size: .9rem; }
.mp-panel { max-height: 62vh; overflow-y: auto; padding: 2px 4px 6px; } .mp-panel[hidden] { display: none; }
.mp-al { display: flex; gap: 10px; padding: 12px; border-radius: 16px; margin-bottom: 8px; background: #fef2f2; border: 1px solid #fecaca; } .mp-al > i { margin-top: 3px; color: #dc2626; }
.mp-al.amarillo { background: #fffbeb; border-color: #fde68a; } .mp-al.amarillo > i { color: #d97706; }
.mp-al b { display: block; font-size: .92rem; color: #0f172a; } .mp-al small { display: block; color: #475569; font-size: .78rem; margin-top: 2px; line-height: 1.4; }
.mp-al-bt { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .mp-al-bt .pg-btn { padding: 5px 10px; font-size: .76rem; }
.mp-sub { margin: 12px 4px 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.mp-fila { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: var(--color-bg); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; color: var(--color-text); }
.mp-fila:hover { box-shadow: inset 0 0 0 1px #fdba74; } .mp-fila b { display: block; font-size: .88rem; } .mp-fila small { color: var(--color-text-muted); font-size: .74rem; }
.mp-ico { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; } .mp-ico.azul { background: #2563eb; } .mp-ico.verde { background: #16a34a; }
.mp-ok { text-align: center; padding: 26px 12px; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 4px; } .mp-ok i { font-size: 1.8rem; color: #16a34a; } .mp-ok b { color: var(--color-text); }
:root[data-theme="dark"] .mp-al { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); } :root[data-theme="dark"] .mp-al.amarillo { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); } :root[data-theme="dark"] .mp-al b { color: #f1f5f9; } :root[data-theme="dark"] .mp-al small { color: #cbd5e1; }

/* Radar de ONU (adaptado de tu prototipo: se escala con el zoom) */
.rd { position: relative; }
.rd-circulo { position: absolute; border: 3px solid #22c55e; border-radius: 50%; background: transparent; animation: rdPulso 1.7s infinite; pointer-events: none; }
.rd-rojo .rd-circulo { border-color: #ef4444; animation-duration: .9s; }
.rd-onu { position: absolute; top: 0; left: 0; border-radius: 50%; z-index: 2; background: #22c55e url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='13' width='18' height='7' rx='2'/><path d='M7 13V5M17 13V5'/><circle cx='8' cy='16.5' r='.7' fill='white'/><circle cx='12' cy='16.5' r='.7' fill='white'/></svg>") center / 62% no-repeat; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 2px 6px rgba(0,0,0,.45); }
.rd-rojo .rd-onu { background-color: #ef4444; } .rd-gris .rd-onu { background-color: #64748b; }
.rd-punto { display: block; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; border: 1.5px solid rgba(255,255,255,.9); box-shadow: 0 0 4px rgba(0,0,0,.4); }
.rd-punto.rd-rojo { background: #ef4444; } .rd-punto.rd-gris { background: #64748b; }
.mp-fila .rd-punto { flex: none; }
@keyframes rdPulso { 0% { transform: scale(.5); opacity: 1; } 70% { transform: scale(2); opacity: 0; } 100% { transform: scale(2); opacity: 0; } }

.mp-nap, .mp-mk { width: 30px; height: 30px; border-radius: 9px; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .85rem; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.mp-nap.falla { background: #dc2626; animation: mpNapFalla 1s infinite; }
.mp-mk { width: 34px; height: 34px; border-radius: 50%; background: #0891b2; font-size: .95rem; } .mp-mk.mal { background: #f59e0b; }
@keyframes mpNapFalla { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.8); } 100% { box-shadow: 0 0 0 18px rgba(220,38,38,0); } }
.mp-falla-circulo { animation: mpCirculo 1.6s ease-in-out infinite; }
@keyframes mpCirculo { 0%, 100% { stroke-opacity: .9; fill-opacity: .12; } 50% { stroke-opacity: .35; fill-opacity: .3; } }

.leaflet-popup-content-wrapper { border-radius: 16px; } .leaflet-popup-content { margin: 12px 14px; }
.mp-pop { display: flex; flex-direction: column; gap: 5px; color: #0f172a; min-width: 190px; } .mp-pop b { font-size: .98rem; } .mp-pop-sub { font-size: .78rem; color: #64748b; }
.mp-pop .pg-chip { align-self: flex-start; } .mp-pop-bt { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .mp-pop-bt .pg-btn { padding: 5px 10px; font-size: .76rem; color: #0f172a; }
.marker-cluster div { font-weight: 800; }
.mp-oscuro .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }

/* Avisos automaticos */
.au-lista { display: flex; flex-direction: column; gap: 10px; }
.au-fila { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); }
.au-canales { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.au-canal input { position: absolute; opacity: 0; pointer-events: none; }
.au-canal span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-bg); font-size: .82rem; font-weight: 800; color: var(--color-text-muted); cursor: pointer; user-select: none; }
.au-canal input:checked + span { background: #16a34a; border-color: #16a34a; color: #fff; }
.au-canal.off span { opacity: .45; cursor: not-allowed; }
@media (max-width: 700px) { .au-canales { width: 100%; margin-left: 0; } .au-canal { flex: 1; } .au-canal span { width: 100%; justify-content: center; } }
.mp-conf { margin: 8px 4px 4px; padding: 12px; border-radius: 16px; background: var(--color-bg); display: flex; flex-direction: column; gap: 8px; } .mp-conf[hidden] { display: none; }
.mp-conf h4 { margin: 0; font-size: .95rem; color: var(--color-text); } .mp-conf h4 i { color: var(--color-primary); } .mp-conf p { margin: 0; font-size: .8rem; color: var(--color-text-muted); line-height: 1.4; }
.mp-conf .field input { padding: 8px 10px; }
.mp-herr select { max-width: 150px; }
.sv-conexion { border-radius: 22px; }
.sv-con-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.sv-con-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } @media (max-width: 800px) { .sv-con-cuerpo { grid-template-columns: 1fr; } }
.sv-con-mapa { display: flex; flex-direction: column; gap: 8px; } #svMini { height: 210px; border-radius: 16px; border: 1px solid var(--color-border); z-index: 1; }
.sv-sin-ubic { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 12px; border: 1px dashed var(--color-border); border-radius: 16px; color: var(--color-text-muted); } .sv-sin-ubic i { font-size: 1.6rem; color: #2563eb; } .sv-sin-ubic b { color: var(--color-text); }
.sv-caidas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; color: var(--color-text-muted); } .sv-caidas i { color: #ef4444; width: 18px; }
.verde-txt { color: #16a34a; } .ambar-txt { color: #d97706; } .rojo-txt { color: #dc2626; } .gris-txt { color: #64748b; }

/* Consumo de red */
.cn-horas { border-radius: 22px; margin-bottom: 14px; }
.cn-grafica { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; align-items: end; height: 130px; margin-top: 14px; }
.cn-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.cn-col span { display: block; width: 100%; max-width: 22px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #60a5fa, #2563eb); min-height: 3px; }
.cn-col.pico span { background: linear-gradient(180deg, #fb923c, #ef4444); } .cn-col.futuro span { opacity: .25; }
.cn-col small { font-size: .65rem; color: var(--color-text-muted); height: 12px; }
.cn-fila-barra { height: 8px; border-radius: 999px; background: var(--color-bg); overflow: hidden; margin: 6px 0 4px; max-width: 360px; } .cn-fila-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #6366f1); }
.cn-total { text-align: right; min-width: 90px; display: flex; flex-direction: column; } .cn-total b { font-size: 1.25rem; color: var(--color-text); } .cn-total small { color: var(--color-text-muted); font-size: .72rem; }
.pg-fila.esq { pointer-events: none; min-height: 70px; }
.pg-datos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 560px) { .pg-datos-3 { grid-template-columns: 1fr; } }
.cn-14 { grid-template-columns: repeat(14, minmax(0, 1fr)); height: 100px; }
.rd-ambar .rd-circulo { border-color: #f59e0b; } .rd-ambar .rd-onu { background-color: #f59e0b; } .rd-punto.rd-ambar { background: #f59e0b; }

/* Tareas y agenda */
.tr-filtros label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; font-size: .78rem; font-weight: 700; color: var(--color-text-muted); } .tr-filtros select { width: 100%; flex: none !important; }
.tr-tablero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; } @media (max-width: 1000px) { .tr-tablero { grid-template-columns: 1fr; } }
.tr-col { background: var(--color-bg); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.tr-col-cab { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: .95rem; color: var(--color-text); } .tr-col-cab span { margin-left: auto; background: var(--color-surface); border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: .8rem; }
.tr-col-cab.ambar i { color: #d97706; } .tr-col-cab.azul i { color: #2563eb; } .tr-col-cab.verde i { color: #16a34a; }
.tr-vacia { text-align: center; padding: 22px 8px; color: var(--color-text-muted); font-size: .85rem; }
.tr-tarea { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 5px solid #94a3b8; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 2px 6px rgba(15,23,42,.04); }
.tr-tarea.alta { border-left-color: #ef4444; } .tr-tarea.media { border-left-color: #f59e0b; } .tr-tarea.baja { border-left-color: #94a3b8; } .tr-tarea.vencida { box-shadow: 0 0 0 2px rgba(239,68,68,.25); }
.tr-tarea-tit { font-weight: 800; color: var(--color-text); line-height: 1.3; } .tr-desc { margin: 0; font-size: .82rem; color: var(--color-text-muted); line-height: 1.4; white-space: pre-line; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--color-text-muted); } .tr-meta i { width: 14px; }
.tr-acc { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--color-border); } .tr-acc .pg-btn { padding: 6px 10px; font-size: .78rem; }
.tr-cal { padding: 14px; border-radius: 22px; } .tr-cal-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; } .tr-cal-cab h3 { margin: 0 auto 0 4px; font-size: 1.15rem; color: var(--color-text); }
.tr-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tr-cal-dn { text-align: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--color-text-muted); padding: 4px 0; }
.tr-cal-dia { min-height: 96px; border: 1px solid var(--color-border); border-radius: 14px; padding: 6px; background: var(--color-surface); display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--color-text); overflow: hidden; } .tr-cal-dia.vacio { background: transparent; border-color: transparent; }
.tr-cal-dia:hover { border-color: #fdba74; text-decoration: none; } .tr-cal-dia.hoy { border-color: #f97316; box-shadow: inset 0 0 0 1px #f97316; } .tr-cal-dia.sel { background: rgba(249,115,22,.08); }
.tr-cal-dia b { font-size: .82rem; } .tr-cal-dia small { font-size: .68rem; color: var(--color-text-muted); }
.tr-pill { font-size: .66rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #64748b; }
.tr-pill.rojo { background: #ef4444; } .tr-pill.ambar { background: #f59e0b; } .tr-pill.azul { background: #3b82f6; } .tr-pill.verde { background: #16a34a; } .tr-pill.morado { background: #7c3aed; }
@media (max-width: 700px) { .tr-cal-dia { min-height: 64px; padding: 4px; } .tr-pill { font-size: .6rem; } }
.tr-miembros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 220px; overflow-y: auto; padding: 10px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-bg); } @media (max-width: 560px) { .tr-miembros { grid-template-columns: 1fr; } }
.au-canales select { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text); font-size: .82rem; font-weight: 600; max-width: 170px; }

/* Pagos desde Excel */
.cc-vista { overflow-x: auto; border: 1px solid var(--color-border); border-radius: 14px; } .cc-vista table { border-collapse: collapse; width: 100%; font-size: .78rem; } .cc-vista th { background: var(--color-bg); padding: 6px 10px; text-align: left; color: var(--color-text-muted); } .cc-vista td { padding: 6px 10px; border-top: 1px solid var(--color-border); white-space: nowrap; }
.cc-masivo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.3); margin-bottom: 12px; } .cc-masivo > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; } .cc-masivo small { color: var(--color-text-muted); }
.cc-monto { display: flex; flex-direction: column; min-width: 110px; font-size: 1.1rem; font-weight: 800; color: #16a34a; } .cc-monto small { font-weight: 600; color: var(--color-text-muted); font-size: .74rem; }
.cc-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: .84rem; } .cc-sug small { flex-basis: 100%; }
.cc-pag { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0; color: var(--color-text-muted); }

/* Reportes */
.rp-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .rp-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--color-text-muted); } .rp-filtros input[type=date] { padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text); }
.rp-excel { margin-left: auto; }
.rp-grafica { padding: 16px 18px; border-radius: 22px; } .rp-leyenda { display: flex; gap: 16px; font-size: .8rem; color: var(--color-text-muted); margin-bottom: 8px; } .rp-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.rp-barras { display: flex; gap: 10px; align-items: flex-end; height: 170px; overflow-x: auto; } .rp-mes { flex: 1 0 54px; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; } .rp-par { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; } .rp-par span { width: 40%; max-width: 26px; min-height: 2px; border-radius: 6px 6px 0 0; } .rp-mes small { font-size: .68rem; color: var(--color-text-muted); white-space: nowrap; }
.rp-tabla { border-radius: 22px; padding: 16px; } .rp-scroll { overflow-x: auto; } .rp-scroll table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rp-scroll th { text-align: left; padding: 10px 12px; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--color-text-muted); border-bottom: 2px solid var(--color-border); white-space: nowrap; } .rp-scroll td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.rp-scroll .der { text-align: right; font-variant-numeric: tabular-nums; } .rp-scroll .neg { color: #dc2626; font-weight: 700; } .rp-scroll tr.total td { font-weight: 800; background: var(--color-bg); } .rp-scroll tbody tr:hover td { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.wz-stats.pg-kpis.rp-kpis .wz-stat { flex: 1 1 210px; } .wz-stats.pg-kpis.rp-kpis .wz-stat b { font-size: 1.5rem; overflow-wrap: normal; white-space: nowrap; }
.mp-build { background: rgba(124,58,237,.95) !important; color: #fff; } .mp-build .pg-btn { margin-left: 8px; }
#mpConstruir.activo { background: #7c3aed; color: #fff; border-color: #7c3aed; } #mapa.construyendo { cursor: crosshair; } #mapa.construyendo .leaflet-marker-draggable { cursor: grab; }
@keyframes mpParpadeo { 0%, 100% { stroke-opacity: .95; } 50% { stroke-opacity: .25; } } path.mp-enlace-caido { animation: mpParpadeo 1.1s ease-in-out infinite; }
.mp-nap { position: relative; } .mp-nap.olt { width: 38px; height: 38px; border-radius: 12px; background: #7c3aed; font-size: 1rem; box-shadow: 0 0 0 3px rgba(124,58,237,.3), 0 3px 10px rgba(0,0,0,.35); }
.mp-niv { position: absolute; top: -8px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fff; color: #1e3a8a; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); border: 1px solid #2563eb; }
.mp-emp { position: relative; width: 24px; height: 24px; border-radius: 50%; background: #f59e0b; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .72rem; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.mp-emp.reserva { background: #16a34a; } .mp-emp.poste { background: #64748b; border-radius: 6px; }
.mp-emp.revisar { background: #ef4444; animation: mpNapFalla 1s infinite; box-shadow: 0 0 0 4px rgba(239,68,68,.35), 0 2px 6px rgba(0,0,0,.45); }
.mp-corte { width: 30px; height: 30px; border-radius: 50%; background: #dc2626; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(220,38,38,.35), 0 2px 8px rgba(0,0,0,.5); animation: mpNapFalla 1s infinite; }

/* Manual de usuario */
.mn-barra { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; } .mn-barra .pg-buscar { flex: 1 1 320px; }
.mn-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; } @media (max-width: 900px) { .mn-wrap { grid-template-columns: 1fr; } }
.mn-indice { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; padding: 12px; max-height: calc(100vh - 100px); overflow-y: auto; } .mn-indice > b { padding: 4px 8px 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.mn-indice a { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; font-size: .86rem; color: var(--color-text); text-decoration: none; line-height: 1.25; } .mn-indice a:hover { background: var(--color-bg); } .mn-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--color-bg); font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; color: var(--color-text-muted); }
@media (max-width: 900px) { .mn-indice { position: static; max-height: 220px; } }
.mn-temas { display: flex; flex-direction: column; gap: 16px; } .mn-tema { border-radius: 22px; padding: 20px 22px; scroll-margin-top: 80px; }
.mn-tema-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; } .mn-tema-cab small { color: var(--color-text-muted); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .05em; } .mn-tema-cab h2 { margin: 0; font-size: 1.2rem; color: var(--color-text); }
.mn-intro { margin: 0 0 14px; color: var(--color-text-muted); line-height: 1.5; }
.mn-pasos { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .mn-pasos li { counter-increment: paso; display: flex; gap: 12px; align-items: flex-start; line-height: 1.55; color: var(--color-text); }
.mn-pasos li::before { content: counter(paso); flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: #fff; font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.mn-pasos b { color: var(--color-text); background: color-mix(in srgb, var(--color-primary) 10%, transparent); padding: 0 5px; border-radius: 6px; }
.mn-tip { display: flex; gap: 10px; margin-top: 12px; padding: 11px 14px; border-radius: 14px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); font-size: .9rem; line-height: 1.5; color: var(--color-text); } .mn-tip i { color: #d97706; margin-top: 3px; }
.mn-vacio { text-align: center; padding: 30px; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--color-text-muted); } .mn-vacio i { font-size: 1.6rem; }
@media print { .kx5-sidebar, .kx5-page-header, .mn-barra, .mn-indice, .kx5-topbar, header { display: none !important; } .mn-wrap { display: block; } .mn-tema { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; } .kx5-main { margin: 0 !important; } }
/* Mapa: las 3 pestañas del panel lateral caben siempre (icono arriba, texto centrado) */
.mp-lado .ms-tabs.mp-pest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible; padding: 4px; }
.mp-lado .mp-pest .ms-tab { flex: none; min-width: 0 !important; width: 100%; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 8px 4px; border-left: 0; }
.mp-lado .mp-pest .ms-tab-txt { align-items: center; min-width: 0; max-width: 100%; } .mp-lado .mp-pest .ms-tab-txt b { font-size: .8rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mp-lado .mp-pest .ms-tab-txt small { font-size: .68rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-lado .mp-pest .ms-tab.active::after { left: 20%; right: 20%; bottom: -2px; }
.mn-areas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; } .mn-area-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); font-weight: 700; font-size: .86rem; text-decoration: none; } .mn-area-chip:hover { border-color: #fdba74; } .mn-area-chip .pg-fila-ico { width: 28px; height: 28px; font-size: .8rem; }
.mn-ind-area { display: flex !important; align-items: center; gap: 8px; padding: 12px 8px 4px !important; font-size: .76rem !important; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); } .mn-ind-area i { width: 16px; text-align: center; }
.mn-area { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 80px; } .mn-area-tit { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; font-size: 1.35rem; color: var(--color-text); } .mn-area-tit .pg-fila-ico { width: 38px; height: 38px; }
.mn-tema-cab h3 { margin: 0; font-size: 1.15rem; color: var(--color-text); }
/* Indice del manual colapsable */
.mn-ind-grupo { border-radius: 12px; } .mn-ind-grupo.abierto { background: var(--color-bg); }
.mn-indice button.mn-ind-area { display: flex !important; width: 100%; align-items: center; gap: 10px; padding: 10px !important; border: 0; background: none; border-radius: 12px; cursor: pointer; font: inherit; font-size: .88rem !important; font-weight: 700; text-transform: none !important; letter-spacing: 0 !important; color: var(--color-text) !important; text-align: left; } .mn-indice button.mn-ind-area:hover { background: var(--color-bg); }
.mn-ind-area > i:first-child { width: 18px; text-align: center; color: var(--color-text-muted); } .mn-ind-area span { flex: 1; } .mn-ind-area em { font-style: normal; font-size: .7rem; font-weight: 800; background: var(--color-bg); color: var(--color-text-muted); border-radius: 999px; padding: 1px 8px; } .mn-ind-grupo.abierto em { background: var(--color-surface); }
.mn-caret { font-size: .7rem; color: var(--color-text-muted); transition: transform .15s; } .mn-ind-area[aria-expanded="true"] .mn-caret { transform: rotate(180deg); }
.mn-ind-lista { padding: 0 6px 8px 14px; display: flex; flex-direction: column; gap: 1px; } .mn-ind-lista[hidden] { display: none; }
.mn-elige { display: flex; gap: 16px; align-items: center; padding: 26px; border-radius: 22px; } .mn-elige .pg-fila-ico { width: 56px; height: 56px; font-size: 1.4rem; flex: none; } .mn-elige h2 { margin: 0 0 4px; font-size: 1.25rem; color: var(--color-text); } .mn-elige p { margin: 0; color: var(--color-text-muted); line-height: 1.5; }
.mn-migas { font-size: .88rem; color: var(--color-text-muted); } .mn-migas a { color: #2563eb; text-decoration: none; font-weight: 700; } .mn-migas a:hover { text-decoration: underline; } .mn-migas b { color: var(--color-text); }
.mn-area-chip.activo { background: #fff7ed; border-color: var(--color-primary); } .mn-ind-lista a.activo { background: color-mix(in srgb, var(--color-primary) 12%, transparent); font-weight: 700; }
/* Manual: indice con color por area */
.mn-ind-grupo { border: 1px solid transparent; transition: background .15s, border-color .15s; } .mn-ind-grupo:hover { border-color: color-mix(in srgb, var(--mc) 30%, transparent); } .mn-ind-grupo.abierto { background: color-mix(in srgb, var(--mc) 9%, var(--color-surface)); border-color: color-mix(in srgb, var(--mc) 35%, transparent); }
.mn-ind-ico { flex: none; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--mc), color-mix(in srgb, var(--mc) 65%, #fff)); box-shadow: 0 2px 6px color-mix(in srgb, var(--mc) 35%, transparent); } .mn-ind-ico i { width: auto !important; color: #fff !important; }
.mn-ind-nom { flex: 1; } .mn-ind-grupo.abierto .mn-ind-nom { color: var(--mc); }
.mn-ind-grupo.abierto em { background: var(--mc) !important; color: #fff !important; }
.mn-ind-lista { margin: 0 0 6px 20px; padding-left: 10px !important; border-left: 3px solid color-mix(in srgb, var(--mc) 45%, transparent); }
.mn-ind-lista a:hover { background: color-mix(in srgb, var(--mc) 12%, transparent) !important; } .mn-ind-lista a .mn-num { background: color-mix(in srgb, var(--mc) 18%, transparent); color: var(--mc); }
.mn-ind-lista a.activo { background: color-mix(in srgb, var(--mc) 16%, transparent) !important; color: var(--mc); font-weight: 800; border-radius: 10px; }
.mn-area-chip { border-color: color-mix(in srgb, var(--mc) 35%, var(--color-border)); } .mn-area-chip:hover { background: color-mix(in srgb, var(--mc) 10%, var(--color-surface)); border-color: var(--mc); } .mn-area-chip.activo { background: color-mix(in srgb, var(--mc) 14%, var(--color-surface)); border-color: var(--mc); color: var(--mc); }
.mn-indice { border-top: 4px solid var(--color-primary); }
/* Manual: indice mas ancho y con el icono de tamaño fijo */
.mn-wrap { grid-template-columns: 330px minmax(0, 1fr); } @media (max-width: 1100px) { .mn-wrap { grid-template-columns: 290px minmax(0, 1fr); } } @media (max-width: 900px) { .mn-wrap { grid-template-columns: 1fr; } }
.mn-indice .mn-ind-area span.mn-ind-ico { flex: none; width: 32px; height: 32px; } .mn-indice .mn-ind-area span.mn-ind-nom { flex: 1; min-width: 0; }
.mn-ind-lista { margin-left: 24px; } .mn-ind-lista a { padding: 8px 8px; font-size: .88rem; }
.mp-nap.mufa { background: #f59e0b; width: 28px; height: 28px; border-radius: 50%; }
.mp-puntos-bt { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .mp-punto { display: flex; align-items: center; gap: 8px; } .mp-punto > span:nth-child(2) { flex: 1; min-width: 0; } .mp-punto .pg-btn { padding: 5px 9px; font-size: .75rem; flex: none; }
.np-info { background: rgba(37,99,235,.07); border: 1px solid rgba(37,99,235,.25); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; } .np-info > b { color: var(--color-text); } .np-info > b i { color: #2563eb; } .np-info small { color: var(--color-text-muted); line-height: 1.45; } .np-info .pg-chip { align-self: flex-start; }
.np-info-grande { font-size: 1.7rem; font-weight: 800; color: var(--color-text); } .np-info-grande small { font-size: .8rem; font-weight: 600; }
.np-tabla { width: 100%; border-collapse: collapse; font-size: .85rem; } .np-tabla th { text-align: left; font-size: .72rem; text-transform: uppercase; color: var(--color-text-muted); padding: 4px 8px; border-bottom: 1px solid var(--color-border); } .np-tabla td { padding: 6px 8px; border-bottom: 1px solid var(--color-border); } .np-mal { color: #dc2626; font-weight: 800; } .np-ojo { color: #d97706; font-weight: 800; }
.np-tres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; } .np-tres > div { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; } .np-tres small { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; } .np-tres b { font-size: 1.25rem; color: var(--color-text); } .np-tres em { font-style: normal; font-size: .7rem; color: var(--color-text-muted); }
/* Mapa: vistas (todo / fibra / enlaces) y colores de linea */
.mp-vistas { display: inline-flex; gap: 0; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 14px; padding: 3px; margin-right: 10px; } .mp-vista { border: 0; background: none; padding: 7px 14px; border-radius: 11px; font-weight: 700; font-size: .84rem; color: var(--color-text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; } .mp-vista:hover { color: var(--color-text); } .mp-vista.activa { background: #7c3aed; color: #fff; box-shadow: 0 3px 10px rgba(124,58,237,.35); }
.mp-vista-txt { margin: 0 0 10px; padding: 8px 14px; border-radius: 12px; background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.25); color: var(--color-text); font-size: .86rem; }
.mp-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px solid rgba(15,23,42,.55); box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.np-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; } .np-chip { border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .84rem; cursor: pointer; color: var(--color-text); } .np-chip:hover { border-color: var(--color-primary); color: var(--color-primary); } .np-mini { width: 70px; padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); }
.np-grid-pots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 6px; } .np-pto { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; font-weight: 700; color: var(--color-text-muted); } .np-pto input { padding: 7px 9px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-size: .9rem; }
.np-mapa { height: 260px; border-radius: 16px; border: 1px solid var(--color-border); overflow: hidden; z-index: 0; } .np-enlace { background: rgba(124,58,237,.05); border: 1px solid rgba(124,58,237,.2); border-radius: 16px; padding: 14px; } .np-enlace > label { color: var(--color-text); font-weight: 800; } .np-enlace > label i { color: #7c3aed; }
.np-chips input.np-mini { width: 84px !important; flex: none; padding: 6px 10px; }
.np-tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--color-border); overflow-x: auto; scrollbar-width: none; } .np-tabs::-webkit-scrollbar { display: none; }
.np-tab { border: 0; background: none; padding: 10px 14px; font-weight: 700; font-size: .88rem; color: var(--color-text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; } .np-tab:hover { color: var(--color-text); } .np-tab.activa { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.np-ok { font-style: normal; background: #16a34a; color: #fff; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .6rem; }
.np-pane[hidden] { display: none; }

/* Splitters de una caja */
.spl-diag { overflow-x: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 10px; margin-bottom: 12px; }
.spl-nuevo { background: rgba(22,163,74,.06); border: 1px solid rgba(22,163,74,.25); border-radius: 16px; padding: 12px 14px; margin: 10px 0; } .spl-nuevo > b { display: block; margin-bottom: 8px; color: var(--color-text); }
.spl-fila { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .spl-fila label { display: flex; flex-direction: column; gap: 3px; font-size: .76rem; font-weight: 700; color: var(--color-text-muted); } .spl-fila select, .spl-fila input { padding: 7px 9px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font-size: .86rem; min-width: 110px; }
.spl-card { border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 14px; margin: 10px 0; background: var(--color-surface); } .spl-cab { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 8px; } .spl-in { color: var(--color-text-muted); font-size: .82rem; }
.spl-sals { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; } .spl-sal { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--color-bg); font-size: .86rem; } .spl-pot { font-weight: 800; min-width: 80px; } .spl-sal select { padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-size: .82rem; } .spl-dest { color: #6d28d9; font-weight: 700; }

/* Asistente para agregar un terminal */
form.modo-wiz .np-tabs, form.modo-wiz .np-pane, form.modo-wiz .pg-modal-pie { display: none !important; } .npw[hidden] { display: none; } .npw-volver { text-align: right; margin: 0 0 10px; display: none; } form:not(.modo-wiz) .npw-volver { display: block; } .npw-volver a { font-size: .86rem; font-weight: 700; color: #7c3aed; text-decoration: none; }
.npw-prog { display: flex; gap: 4px; margin-bottom: 18px; } .npw-punto { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: .7rem; color: var(--color-text-muted); } .npw-punto b { width: 28px; height: 28px; border-radius: 50%; background: var(--color-bg); border: 2px solid var(--color-border); display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; z-index: 1; } .npw-punto em { font-style: normal; font-weight: 700; text-align: center; line-height: 1.1; } .npw-punto::before { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--color-border); } .npw-punto:first-child::before { display: none; }
.npw-punto.act b { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 20%, transparent); } .npw-punto.act em { color: var(--color-primary); } .npw-punto.hecho b { background: #16a34a; border-color: #16a34a; color: #fff; } .npw-punto.hecho::before, .npw-punto.act::before { background: #16a34a; }
.npw-t { margin: 0 0 6px; font-size: 1.35rem; color: var(--color-text); } .npw-s { margin: 0 0 14px; color: var(--color-text-muted); font-size: .93rem; line-height: 1.45; }
.npw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; } .npw-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; border: 2px solid var(--color-border); background: var(--color-surface); cursor: pointer; transition: transform .1s, border-color .1s, box-shadow .1s; } .npw-card:hover { border-color: #fdba74; transform: translateY(-2px); } .npw-card.sel { border-color: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.18); background: rgba(249,115,22,.05); }
.npw-ico { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; } .npw-card b { color: var(--color-text); font-size: 1rem; } .npw-card small { color: var(--color-text-muted); line-height: 1.35; }
.npw-l { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--color-text); margin-bottom: 14px; } .npw-in { width: 100%; padding: 13px 14px; font-size: 1.05rem; border: 2px solid var(--color-border); border-radius: 14px; background: var(--color-surface); color: var(--color-text); } .npw-in:focus { outline: none; border-color: var(--color-primary); }
.npw-aviso { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35); color: #b91c1c; font-weight: 700; font-size: .9rem; }
.npw-mapa { height: 280px; border-radius: 16px; border: 1px solid var(--color-border); overflow: hidden; margin-top: 10px; z-index: 0; } .npw-mapa-bt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0; }
.npw-lista { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin-top: 10px; padding-right: 4px; } .npw-fila { display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 14px; border: 2px solid var(--color-border); border-radius: 14px; background: var(--color-surface); cursor: pointer; color: var(--color-text); } .npw-fila:hover { border-color: #fdba74; } .npw-fila.sel { border-color: #f97316; background: rgba(249,115,22,.07); } .npw-fila i { width: 24px; text-align: center; color: #6366f1; } .npw-fila span { display: flex; flex-direction: column; } .npw-fila small { color: var(--color-text-muted); }
.npw-sub { margin-top: 16px; } .npw-sub > b { display: block; margin-bottom: 8px; color: var(--color-text); } .npw-chips { display: flex; flex-wrap: wrap; gap: 8px; } .npw-chip { padding: 10px 16px; border-radius: 999px; border: 2px solid var(--color-border); background: var(--color-surface); font-weight: 700; cursor: pointer; color: var(--color-text); font-size: .92rem; } .npw-chip:hover { border-color: #fdba74; } .npw-chip.sel { background: #f97316; border-color: #f97316; color: #fff; }
.npw-pots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 8px; } .npw-pots label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--color-text-muted); } .npw-pots input { padding: 10px; border: 2px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text); font-size: 1rem; }
.npw-res { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; } .npw-res li { padding: 12px 16px; border-radius: 14px; background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.25); line-height: 1.45; color: var(--color-text); }
.npw-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; } .npw-grande { padding: 14px 26px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: #fff; font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: 0 8px 20px color-mix(in srgb, var(--color-primary) 35%, transparent); display: inline-flex; align-items: center; gap: 10px; } .npw-grande:hover { filter: brightness(1.05); } .npw-grande:disabled { opacity: .6; cursor: wait; }
.npw-av { text-align: center; margin-top: 14px; } .npw-av a { font-size: .82rem; color: var(--color-text-muted); text-decoration: none; }
@media (max-width: 560px) { .npw-punto em { display: none; } .npw-t { font-size: 1.15rem; } }

.npw-total { margin: 16px 0 6px; padding: 11px 14px; border-radius: 14px; background: rgba(99,102,241,.09); border: 1px solid rgba(99,102,241,.3); color: var(--color-text); line-height: 1.45; } .npw-total i { color: #6366f1; margin-right: 6px; } .npw-div { margin-top: 12px; padding: 10px 12px; border-left: 4px solid #6366f1; background: rgba(99,102,241,.05); border-radius: 0 12px 12px 0; } .npw-l small { font-weight: 600; color: var(--color-text-muted); }

.npw-metodos { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } .npw-metodos .npw-card { padding: 14px; }

.dep-caja { margin-top: 10px; border: 1px solid var(--color-border, #e2e8f0); border-radius: 14px; background: var(--color-surface, #fff); } .dep-caja > summary { cursor: pointer; padding: 11px 14px; font-weight: 800; } .dep-caja[open] > summary { border-bottom: 1px solid var(--color-border, #e2e8f0); } .dep-caja .spl-diag { margin: 8px; }

/* Fotos de la red */
.fr-subir { display: grid; gap: 8px; margin-bottom: 12px; } .fr-subir input.fr-nota { width: 100%; padding: 9px 12px; border: 1px solid var(--color-border, #e2e8f0); border-radius: 12px; background: var(--color-surface, #fff); color: var(--color-text); } .fr-elegir { justify-self: start; cursor: pointer; } .fr-msg { color: var(--color-text-muted); }
.fr-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; } .fr-foto { position: relative; margin: 0; border: 1px solid var(--color-border, #e2e8f0); border-radius: 14px; overflow: hidden; background: var(--color-surface, #fff); cursor: zoom-in; } .fr-foto img { display: block; width: 100%; height: 110px; object-fit: cover; } .fr-foto figcaption { padding: 6px 8px; font-size: 12px; line-height: 1.3; word-break: break-word; } .fr-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(15,23,42,.72); color: #fff; cursor: pointer; } .fr-x:hover { background: #ef4444; }
.fr-vacio { grid-column: 1 / -1; padding: 16px; border-radius: 14px; background: rgba(99,102,241,.07); color: var(--color-text-muted); line-height: 1.45; }
dialog.fr-grande { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; } dialog.fr-grande::backdrop { background: rgba(15,23,42,.82); } dialog.fr-grande img { display: block; max-width: 96vw; max-height: 84vh; margin: 0 auto; border-radius: 12px; } dialog.fr-grande .fr-pie { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(15,23,42,.8); color: #fff; font-size: 13px; }

.mp-nap.switch { background: #0d9488; border-radius: 8px; } .mp-nap.conv { background: var(--color-primary); width: 26px; height: 26px; border-radius: 8px; font-size: .75rem; }

.dr-card { padding: 12px; } .dr-barra { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; } .dr-lienzo { overflow: auto; max-height: 72vh; border: 1px solid var(--color-border, #e2e8f0); border-radius: 14px; background: #fff; padding: 8px; } .dr-zoom { min-width: 100%; } .dr-zoom svg { display: block; } .dr-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--color-text-muted); } .dr-leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.dr-vacio { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 40px 16px; color: #475569; } .dr-vacio i { font-size: 2.4rem; color: #94a3b8; } .dr-sin { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 4px 2px; }
@media print { .dr-barra, .ms-tabs, .pg-ayuda, #drSinCard { display: none !important; } .dr-lienzo { max-height: none; overflow: visible; border: 0; } }

.cv-mapa { height: 66vh; min-height: 420px; width: 100%; background: #0f172a; z-index: 1; } .cv-radio { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-muted); } .cv-radio input { width: 130px; } .cv-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; font-size: 12.5px; color: var(--color-text-muted); } .cv-leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; } .cv-leyenda i.borde { background: transparent; border: 2px dashed #94a3b8; }
.cv-lado { display: grid; gap: 12px; } .cv-zona { padding: 10px 4px; border-top: 1px solid var(--color-border, #e2e8f0); } .cv-zona:first-child { border-top: 0; } .cv-zona-cab { display: flex; align-items: center; gap: 8px; } .cv-pto { width: 12px; height: 12px; border-radius: 50%; display: inline-block; } .cv-zona small { display: block; color: var(--color-text-muted); margin: 2px 0 6px 20px; } .cv-zona-bt { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 20px; }
.leaflet-tooltip.cv-etq { background: rgba(255,255,255,.92); border: 2px solid #16a34a; border-radius: 10px; color: #0f172a; font-size: 12px; font-weight: 700; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); pointer-events: none; } .leaflet-tooltip.cv-etq.no { border-color: #dc2626; } .leaflet-tooltip.cv-etq::before { display: none; }
.cv-vertice { width: 22px; height: 22px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); cursor: grab; }

/* Manual: mas facil de leer (texto mas grande, pasos con aire y la etiqueta del paso en negrita simple) */
.mn-pasos { gap: 16px; } .mn-pasos li { font-size: 1.02rem; line-height: 1.7; } .mn-pasos li::before { width: 30px; height: 30px; font-size: .9rem; }
.mn-pasos li > span > b:first-child { background: none; padding: 0; color: #c2410c; font-weight: 800; }
.mn-intro { font-size: 1.02rem; line-height: 1.6; } .mn-tip { line-height: 1.6; }

/* Panel del staff (gestionwifi.pro/staff) */
.sf-app { min-height: 100vh; display: flex; flex-direction: column; background: var(--color-bg, #f1f5f9); } .sf-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 22px; background: var(--color-surface, #fff); border-bottom: 1px solid var(--color-border, #e2e8f0); position: sticky; top: 0; z-index: 20; }
.sf-badge { background: #7c3aed; color: #fff; border-radius: 6px; padding: 1px 7px; font-size: .62rem; letter-spacing: .06em; vertical-align: middle; } .sf-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; } .sf-nav a { padding: 8px 14px; border-radius: 12px; color: var(--color-text); text-decoration: none; font-weight: 700; font-size: .92rem; } .sf-nav a:hover { background: rgba(124,58,237,.08); } .sf-nav a.act { background: rgba(124,58,237,.14); color: #6d28d9; }
.sf-user { display: flex; align-items: center; gap: 12px; font-weight: 700; } .sf-user small { color: var(--color-text-muted); font-weight: 600; }
.sf-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; } .sf-pie { text-align: center; color: var(--color-text-muted); font-size: .85rem; padding: 14px; }
.sf-login { max-width: 430px; margin: 8vh auto 0; } .sf-login .card { padding: 26px; } .sf-emp { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--color-border, #e2e8f0); } .sf-emp:first-child { border-top: 0; } .sf-emp-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .sf-emp small { color: var(--color-text-muted); display: block; } .sf-emp .sf-bt { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) { .sf-emp { grid-template-columns: 1fr; } .sf-emp .sf-bt { justify-content: flex-start; } }
.sf-tabla { width: 100%; border-collapse: collapse; } .sf-tabla th, .sf-tabla td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--color-border, #e2e8f0); font-size: .92rem; vertical-align: top; } .sf-tabla th { color: var(--color-text-muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }

.sf-emp-card { padding: 18px; height: 100%; } .sf-metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; } .sf-metricas > div { background: rgba(100,116,139,.08); border-radius: 12px; padding: 8px 10px; } .sf-metricas small, .sf-ultimo small { display: block; color: var(--color-text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; } .sf-ultimo { background: rgba(100,116,139,.08); border-radius: 12px; padding: 8px 10px; } .form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid .span-3 { grid-column: 1 / -1; }
@media (max-width: 720px) { .sf-metricas, .form-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }

/* Panel del staff: menu lateral con hamburguesa */
.sf-app.con-menu .sf-main { margin-left: 250px; max-width: none; transition: margin-left .2s; } .sf-app.con-menu .sf-pie { margin-left: 250px; transition: margin-left .2s; }
.sf-app.con-menu.menu-cerrado .sf-main, .sf-app.con-menu.menu-cerrado .sf-pie { margin-left: 0; }
.sf-app.con-menu .sf-main > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.sf-ham { width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(124,58,237,.1); display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; flex: none; } .sf-ham span { width: 20px; height: 2.5px; background: #6d28d9; border-radius: 2px; display: block; }
.sf-top { flex-wrap: nowrap; } .sf-top .kx5-brand { flex: 1; } .sf-user { margin-left: auto; }
.sf-side { position: fixed; top: 66px; left: 0; bottom: 0; width: 250px; background: var(--color-surface, #fff); border-right: 1px solid var(--color-border, #e2e8f0); padding: 14px 12px; display: flex; flex-direction: column; overflow-y: auto; z-index: 15; transition: transform .2s; }
.sf-app.menu-cerrado .sf-side { transform: translateX(-100%); }
.sf-side .sf-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sf-side .sf-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--color-text); text-decoration: none; font-weight: 700; font-size: .95rem; } .sf-side .sf-nav a:hover { background: rgba(124,58,237,.08); } .sf-side .sf-nav a.act { background: rgba(124,58,237,.14); color: #6d28d9; }
.sf-side .ico { width: 34px; height: 34px; border-radius: 11px; background: rgba(100,116,139,.1); display: inline-flex; align-items: center; justify-content: center; flex: none; } .sf-side a.act .ico { background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff; }
.sf-sec { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 800; color: var(--color-text-muted); margin: 14px 8px 4px; }
.sf-side-pie { text-align: center; font-size: .78rem; color: var(--color-text-muted); padding-top: 10px; }
.sf-fondo { display: none; }
@media (max-width: 900px) {
  .sf-app.con-menu .sf-main, .sf-app.con-menu .sf-pie { margin-left: 0; }
  .sf-side { transform: translateX(-100%); box-shadow: 0 0 40px rgba(15,23,42,.25); top: 0; padding-top: 70px; z-index: 40; width: 270px; }
  .sf-app.menu-abierto .sf-side { transform: translateX(0); }
  .sf-app.menu-abierto .sf-fondo { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 30; }
  .sf-top { position: sticky; z-index: 50; } .sf-user-n { display: none; }
}
.sf-app.con-menu .sf-main { width: calc(100% - 250px); box-sizing: border-box; } .sf-app.con-menu.menu-cerrado .sf-main { width: 100%; } .sf-app.con-menu .sf-pie { width: calc(100% - 250px); } .sf-app.con-menu.menu-cerrado .sf-pie { width: 100%; }
@media (max-width: 900px) { .sf-app.con-menu .sf-main, .sf-app.con-menu .sf-pie { width: 100%; } }

/* ---- Herramientas del Mikrotik: Sincronizar IPs ---- */
.ips { display: grid; gap: 16px; }
.ips h2, .ips h3 { margin: 0; letter-spacing: -.01em; }
.ips-intro { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #eff6ff, #f5f3ff); border: 1px solid #dbe5ff; }
.ips-intro h2 { font-size: 1.25rem; } .ips-intro p { margin: 4px 0 10px; color: #475569; font-size: .92rem; line-height: 1.45; }
.ips-reglas { display: flex; flex-wrap: wrap; gap: 8px; }
.ips-reglas span { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e0e7ff; color: #3b4a6b; border-radius: 999px; padding: 5px 12px; font-size: .78rem; font-weight: 700; }
.ips-reglas i { color: #6366f1; }
.ips-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; }
.ips-ico.azul { background: #dbeafe; color: #2563eb; } .ips-ico.verde { background: #dcfce7; color: #16a34a; } .ips-ico.ambar { background: #fef3c7; color: #d97706; }
.ips-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ips-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 16px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 6px 20px rgba(15, 23, 42, .05); overflow: hidden; }
.ips-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #94a3b8; }
.ips-card.azul::before { background: linear-gradient(90deg, #3b82f6, #6366f1); } .ips-card.verde::before { background: linear-gradient(90deg, #22c55e, #14b8a6); } .ips-card.ambar::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.ips-card h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; } .ips-card h3 i { font-size: .8rem; color: #94a3b8; }
.ips-card p { margin: 0; color: #64748b; font-size: .9rem; line-height: 1.45; flex: 1; }
.ips-card.ancho { flex-direction: row; align-items: center; gap: 16px; } .ips-card-txt { flex: 1; min-width: 0; } .ips-card-txt p { margin-top: 3px; }
.ips-bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font-weight: 800; font-size: .88rem; padding: 10px 18px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #2563eb, #6366f1); box-shadow: 0 6px 14px rgba(79, 70, 229, .25); transition: transform .15s, box-shadow .15s; align-self: flex-start; }
.ips-card.verde .ips-bt { background: linear-gradient(135deg, #16a34a, #0d9488); box-shadow: 0 6px 14px rgba(13, 148, 136, .25); }
.ips-card.ambar .ips-bt { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 6px 14px rgba(249, 115, 22, .25); }
.ips-bt:hover { transform: translateY(-1px); } .ips-bt:disabled { opacity: .6; cursor: wait; } .ips-bt.grande { padding: 12px 22px; font-size: .95rem; background: linear-gradient(135deg, #ea580c, #f97316); box-shadow: 0 8px 18px rgba(234, 88, 12, .3); }
.ips-panel { padding: 18px; border-radius: 16px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
.ips-panel-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; } .ips-panel-cab h3 { font-size: 1.05rem; } .ips-panel-cab small { color: #64748b; display: block; margin-top: 2px; }
.ips-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ips-tile { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; background: #f1f5f9; }
.ips-tile b { font-size: 1.6rem; line-height: 1.1; } .ips-tile span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.ips-tile.ambar { background: #fef3c7; color: #b45309; } .ips-tile.verde { background: #dcfce7; color: #15803d; } .ips-tile.azul { background: #dbeafe; color: #1d4ed8; } .ips-tile.gris { background: #f1f5f9; color: #475569; }
.ips-buscar { max-width: 300px; margin-bottom: 10px; }
.ips-tabla { overflow-x: auto; border: 1px solid var(--color-border, #e2e8f0); border-radius: 12px; }
.ips-tabla table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ips-tabla th { text-align: left; background: #f8fafc; color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; white-space: nowrap; }
.ips-tabla td { padding: 10px 12px; border-top: 1px solid #eef2f7; vertical-align: middle; }
.ips-tabla td small { display: block; color: #94a3b8; font-size: .75rem; margin-top: 1px; } .ips-tabla td .ips-motivo { color: #b45309; margin-top: 4px; max-width: 280px; }
.ips-tabla tr.ips-gris { opacity: .75; } .ips-mid { width: 28px; text-align: center; padding: 0 !important; }
.ips-ip { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f1f5f9; padding: 3px 8px; border-radius: 8px; font-size: .82rem; color: #0f172a; }
.ips-vacio { color: #94a3b8; font-style: italic; font-size: .8rem; } .ips-flecha { color: #94a3b8; font-size: .75rem; }
.ips-aplicar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px dashed #dbe2ea; }
.ips-aplicar small { color: #64748b; max-width: 460px; }
.ips-ok { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: #ecfdf5; color: #047857; font-weight: 700; } .ips-ok i { font-size: 1.2rem; }
.ips-nota { margin: 0; color: #64748b; font-size: .9rem; }
.ips-hist { border-radius: 16px; border: 1px solid var(--color-border, #e2e8f0); background: var(--color-surface, #fff); }
.ips-hist summary { cursor: pointer; padding: 14px 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; list-style: none; } .ips-hist summary::-webkit-details-marker { display: none; }
.ips-hist summary::after { content: "\f078"; font-family: "Font Awesome 6 Free", "Font Awesome 7 Free"; font-weight: 900; margin-left: auto; color: #94a3b8; font-size: .75rem; transition: transform .2s; } .ips-hist[open] summary::after { transform: rotate(180deg); }
.ips-hist > div { padding: 0 14px 14px; }
@media (max-width: 760px) {
    .ips-dos { grid-template-columns: 1fr; } .ips-card.ancho { flex-direction: column; align-items: flex-start; } .ips-intro { flex-direction: column; }
    .ips-tabla table, .ips-tabla tbody, .ips-tabla tr, .ips-tabla td { display: block; } .ips-tabla thead { display: none; }
    .ips-tabla tr { padding: 10px 12px; border-top: 1px solid #eef2f7; } .ips-tabla td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 10px; } .ips-tabla td::before { content: attr(data-label); color: #94a3b8; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
    .ips-mid { display: none !important; }
}

/* ---- Pagina Mikrotiks (rediseno) ---- */
.mkc-cab { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-radius: 20px; margin-bottom: 16px; color: #fff; background: linear-gradient(120deg, #1e3a8a 0%, #4f46e5 55%, #7c3aed 100%); box-shadow: 0 14px 34px rgba(79, 70, 229, .28); position: relative; overflow: hidden; }
.mkc-cab::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.mkc-cab-ico { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255, 255, 255, .18); backdrop-filter: blur(4px); position: relative; z-index: 1; }
.mkc-cab-txt { flex: 1; min-width: 220px; position: relative; z-index: 1; } .mkc-cab-txt h1 { margin: 0; font-size: 1.55rem; letter-spacing: -.02em; color: #fff; } .mkc-cab-txt p { margin: 4px 0 0; opacity: .88; font-size: .92rem; max-width: 560px; }
.mkc-cab-bt { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.mkc-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.mkc-res { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.mkc-res > span { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; } .mkc-res b { display: block; font-size: 1.5rem; line-height: 1.1; } .mkc-res small { color: #64748b; font-weight: 700; font-size: .76rem; }
.mkc-res.indigo > span { background: #e0e7ff; color: #4f46e5; } .mkc-res.verde > span { background: #dcfce7; color: #16a34a; } .mkc-res.azul > span { background: #dbeafe; color: #2563eb; }
.mkc-vacio { text-align: center; padding: 46px 20px; border-radius: 20px; background: var(--color-surface, #fff); border: 2px dashed #cbd5e1; }
.mkc-vacio > span { width: 70px; height: 70px; border-radius: 22px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 1.8rem; background: #e0e7ff; color: #4f46e5; } .mkc-vacio h3 { margin: 0 0 6px; } .mkc-vacio p { margin: 0 auto 16px; color: #64748b; max-width: 420px; }

.mk-grid.mkc-grid { grid-template-columns: repeat(auto-fill, minmax(min(390px, 100%), 1fr)); gap: 18px; }
.mk-card.mkc { padding: 0; gap: 0; overflow: hidden; border-radius: 20px; box-shadow: 0 10px 28px rgba(15, 23, 42, .08); transition: transform .2s, box-shadow .2s; }
.mk-card.mkc:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(15, 23, 42, .12); }
.mkc-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: #fff; background: linear-gradient(120deg, #2563eb, #4f46e5); }
.mk-card.mk-inactivo { opacity: 1; } .mk-card.mk-inactivo .mkc-top { background: linear-gradient(120deg, #64748b, #94a3b8); }
.mkc-ico { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; background: rgba(255, 255, 255, .2); }
.mkc-id { flex: 1; min-width: 0; } .mkc-id h3 { margin: 0; font-size: 1.05rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkc-ip { display: inline-block; margin-top: 3px; font-size: .76rem; background: rgba(255, 255, 255, .18); color: #fff; padding: 2px 8px; border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mkc-pill { flex: none; font-size: .72rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .22); } .mkc-pill.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .3); } .mkc-pill.off { background: rgba(15, 23, 42, .35); }
.mkc-cuerpo { padding: 16px 18px; display: grid; gap: 14px; }
.mkc-linea { display: flex; align-items: center; gap: 9px; font-size: .86rem; font-weight: 700; color: #475569; }
.mkc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mkc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: #f1f5f9; color: #475569; max-width: 100%; }
.mkc-chip b { font-weight: 800; } .mkc-chip.ambar { background: #fef3c7; color: #92400e; } .mkc-chip.azul { background: #dbeafe; color: #1d4ed8; } .mkc-chip.verde { background: #dcfce7; color: #166534; }
.mkc-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mkc-cifras > div { position: relative; padding: 12px 12px 10px; border-radius: 14px; background: #f8fafc; border: 1px solid #eef2f7; display: flex; flex-direction: column; }
.mkc-cifras > div > span { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: .8rem; margin-bottom: 6px; }
.mkc-cifras span.azul { background: #dbeafe; color: #2563eb; } .mkc-cifras span.morado { background: #ede9fe; color: #7c3aed; } .mkc-cifras span.verde { background: #dcfce7; color: #16a34a; }
.mkc-cifras b { font-size: 1.35rem; line-height: 1; } .mkc-cifras small { color: #64748b; font-size: .72rem; font-weight: 700; margin-top: 3px; }
.mkc-estado { min-height: 0 !important; }
.mkc-espera { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; color: #64748b; font-size: .84rem; } .mkc-espera i { color: #94a3b8; font-size: 1.1rem; }
.mkc-live { border-radius: 14px; border: 1px solid #e2e8f0; padding: 12px 14px; background: linear-gradient(180deg, #fff, #f8fafc); }
.mkc-live-cab { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; } .mkc-live-cab b { font-size: .95rem; } .mkc-live-cab span { color: #64748b; font-size: .78rem; font-weight: 600; }
.mkc-medidor { display: grid; grid-template-columns: 62px 1fr 42px; gap: 10px; align-items: center; margin-bottom: 7px; font-size: .78rem; } .mkc-medidor label { color: #64748b; font-weight: 800; text-transform: uppercase; font-size: .68rem; letter-spacing: .04em; } .mkc-medidor b { text-align: right; }
.mkc-barra { height: 9px; border-radius: 99px; background: #e2e8f0; overflow: hidden; } .mkc-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #84cc16); }
.mkc-barra.medio i { background: linear-gradient(90deg, #f59e0b, #f97316); } .mkc-barra.alto i { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.mkc-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; } .mkc-mini div { background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 8px 10px; } .mkc-mini span { display: block; color: #94a3b8; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; } .mkc-mini b { font-size: .95rem; }
.mkc-acc { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 16px; border-top: 1px solid #eef2f7; background: #fafbfd; margin-top: auto; }
.mkc-acc form { margin: 0; margin-left: auto; }
.mkc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dbe2ea; background: #fff; color: #334155; font-weight: 700; font-size: .8rem; padding: 8px 13px; border-radius: 11px; cursor: pointer; text-decoration: none; transition: all .15s; }
.mkc-btn:hover { background: #f1f5f9; transform: translateY(-1px); } .mkc-btn:disabled { opacity: .55; cursor: progress; }
.mkc-btn.primario { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border: 0; box-shadow: 0 6px 14px rgba(79, 70, 229, .28); } .mkc-btn.primario:hover { background: linear-gradient(135deg, #4338ca, #6d28d9); }
.mkc-btn.peligro { color: #dc2626; border-color: #fecaca; background: #fff5f5; } .mkc-btn.peligro:hover { background: #fee2e2; } .mkc-btn.icono { padding: 8px 11px; }
.mkc-btn.naranja { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; border: 0; box-shadow: 0 8px 18px rgba(234, 88, 12, .35); }
.mkc-cab .mkc-btn:not(.naranja) { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); } .mkc-cab .mkc-btn:not(.naranja):hover { background: rgba(255, 255, 255, .26); }
@media (max-width: 560px) { .mkc-cab { padding: 16px; } .mkc-cab-bt { width: 100%; } .mkc-cab-bt .mkc-btn { flex: 1; } .mkc-cifras { grid-template-columns: repeat(3, 1fr); } }

/* ---- Herramientas del Mikrotik: menu amigable ---- */
.mkh { display: grid; gap: 4px; }
.mkh-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; border-radius: 22px; margin-bottom: 8px; color: #fff; background: linear-gradient(120deg, #0891b2 0%, #2563eb 55%, #6366f1 100%); box-shadow: 0 14px 34px rgba(37, 99, 235, .28); position: relative; overflow: hidden; }
.mkh-hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.mkh-hero-ico { flex: none; width: 62px; height: 62px; border-radius: 19px; display: grid; place-items: center; font-size: 1.7rem; background: rgba(255, 255, 255, .2); position: relative; z-index: 1; }
.mkh-hero-txt { flex: 1; min-width: 240px; position: relative; z-index: 1; } .mkh-hero-txt h1 { margin: 0; font-size: 1.5rem; color: #fff; letter-spacing: -.02em; } .mkh-hero-txt p { margin: 5px 0 10px; opacity: .92; font-size: .95rem; }
.mkh-estado { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 9px; background: rgba(255, 255, 255, .16); padding: 7px 14px; border-radius: 999px; font-size: .82rem; }
.mkh-estado code { background: rgba(255, 255, 255, .18); padding: 2px 8px; border-radius: 8px; font-size: .74rem; color: #fff; }
.mkh-volver { position: relative; z-index: 1; color: #fff; text-decoration: none; font-weight: 800; font-size: .84rem; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); padding: 9px 15px; border-radius: 12px; } .mkh-volver:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.mkh-seccion { display: flex; align-items: center; gap: 10px; margin: 22px 0 2px; font-size: 1.15rem; letter-spacing: -.01em; }
.mkh-seccion span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; color: #fff; background: linear-gradient(135deg, #2563eb, #6366f1); }
.mkh-sub { margin: 0 0 12px 38px; color: #64748b; font-size: .88rem; }
.mkh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.mkh-card { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: 18px; text-decoration: none; color: inherit; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 6px 18px rgba(15, 23, 42, .05); transition: transform .15s, box-shadow .15s, border-color .15s; }
.mkh-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 23, 42, .12); border-color: #c7d2fe; color: inherit; }
.mkh-card-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.3rem; }
.mkh-card.azul .mkh-card-ico, .mkh-tit-ico.azul { background: #dbeafe; color: #2563eb; } .mkh-card.verde .mkh-card-ico, .mkh-tit-ico.verde { background: #dcfce7; color: #16a34a; } .mkh-card.morado .mkh-card-ico, .mkh-tit-ico.morado { background: #ede9fe; color: #7c3aed; }
.mkh-card.cian .mkh-card-ico, .mkh-tit-ico.cian { background: #cffafe; color: #0891b2; } .mkh-card.ambar .mkh-card-ico, .mkh-tit-ico.ambar { background: #fef3c7; color: #d97706; } .mkh-card.rojo .mkh-card-ico, .mkh-tit-ico.rojo { background: #fee2e2; color: #dc2626; }
.mkh-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .mkh-card-txt b { font-size: 1rem; } .mkh-card-txt small { color: #64748b; font-size: .8rem; line-height: 1.35; }
.mkh-card-flecha { color: #cbd5e1; font-size: .8rem; transition: transform .15s, color .15s; } .mkh-card:hover .mkh-card-flecha { transform: translateX(3px); color: #6366f1; }
.mkh-card.rojo:hover { border-color: #fecaca; }
.mkh-barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 12px; } .mkh-barra h2 { margin: 0; font-size: 1.25rem; display: flex; align-items: center; gap: 12px; }
.mkh-tit-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem; }
.mkh-atras { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #dbe2ea; background: #fff; color: #334155; font-weight: 800; font-size: .84rem; padding: 9px 15px; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 10px rgba(15, 23, 42, .05); } .mkh-atras:hover { background: #f1f5f9; }
.mkh-ayuda { border-radius: 18px; margin-bottom: 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-left: 5px solid #6366f1; }
.mkh-ayuda.azul { background: #eff6ff; border-color: #dbeafe; border-left-color: #3b82f6; } .mkh-ayuda.verde { background: #f0fdf4; border-color: #dcfce7; border-left-color: #22c55e; } .mkh-ayuda.morado { background: #f5f3ff; border-color: #ede9fe; border-left-color: #8b5cf6; }
.mkh-ayuda.cian { background: #ecfeff; border-color: #cffafe; border-left-color: #06b6d4; } .mkh-ayuda.ambar { background: #fffbeb; border-color: #fef3c7; border-left-color: #f59e0b; } .mkh-ayuda.rojo { background: #fef2f2; border-color: #fee2e2; border-left-color: #ef4444; }
.mkh-ayuda summary { cursor: pointer; padding: 13px 18px; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 10px; } .mkh-ayuda summary::-webkit-details-marker { display: none; } .mkh-ayuda summary i { color: #f59e0b; }
.mkh-ayuda-cuerpo { padding: 0 18px 16px; } .mkh-ayuda-cuerpo p { margin: 0 0 12px; color: #334155; font-size: .95rem; line-height: 1.5; }
.mkh-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .mkh-pasos li { display: flex; align-items: flex-start; gap: 12px; background: rgba(255, 255, 255, .8); border-radius: 12px; padding: 9px 12px; font-size: .9rem; line-height: 1.4; }
.mkh-pasos li > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #fff; background: #6366f1; }
.mkh-ayuda.azul .mkh-pasos span { background: #3b82f6; } .mkh-ayuda.verde .mkh-pasos span { background: #22c55e; } .mkh-ayuda.rojo .mkh-pasos span { background: #ef4444; } .mkh-ayuda.ambar .mkh-pasos span { background: #f59e0b; } .mkh-ayuda.cian .mkh-pasos span { background: #06b6d4; }
@media (max-width: 640px) { .mkh-hero { padding: 18px; } .mkh-sub { margin-left: 0; } .mkh-volver { width: 100%; text-align: center; } }

/* Herramientas del Mikrotik: pestañas con icono (en lugar del menu de tarjetas) */
.mkh-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; margin: 4px 0 14px; border-radius: 18px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.mkh-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 12px; font-weight: 700; font-size: .86rem; text-decoration: none; color: #475569; background: #f1f5f9; border: 1px solid transparent; transition: all .15s; }
.mkh-tab i { font-size: .9rem; color: #94a3b8; }
.mkh-tab:hover { background: #e8eefc; color: #1e3a8a; } .mkh-tab:hover i { color: #4f46e5; }
.mkh-tab.active { color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 6px 14px rgba(79, 70, 229, .3); } .mkh-tab.active i { color: #fff; }
.mkh-tab.rojo.active { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 6px 14px rgba(220, 38, 38, .3); }
.mkh-tabs-sep { width: 1px; height: 26px; background: #e2e8f0; margin: 0 4px; }
@media (max-width: 640px) { .mkh-tabs { flex-wrap: nowrap; overflow-x: auto; } .mkh-tab { flex: none; } .mkh-tabs-sep { flex: none; } }

.mkh-filtro { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e2e8f0; }
.mkh-filtro .mk-check { margin: 0; }
.mkh-avanzado { margin-top: 16px; border: 1px dashed #cbd5e1; border-radius: 14px; } .mkh-avanzado summary { cursor: pointer; padding: 12px 16px; font-weight: 800; color: #475569; } .mkh-avanzado > div { padding: 0 16px 14px; }
.mkh-cmd { display: inline-block; background: #0f172a; color: #e2e8f0; padding: 8px 12px; border-radius: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; word-break: break-all; }

/* Pasarelas de pago: secciones contraidas */
.pas-sec { margin-top: 14px; border-radius: 18px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 6px 18px rgba(15, 23, 42, .05); overflow: hidden; }
.pas-sec[open] { border-color: #c7d2fe; box-shadow: 0 10px 26px rgba(79, 70, 229, .1); }
.pas-sec.mp[open] { border-color: #bae6fd; }
.pas-sec summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; } .pas-sec summary::-webkit-details-marker { display: none; }
.pas-sec summary:hover { background: #f8fafc; }
.pas-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; } .pas-ico.verde { background: #dcfce7; color: #16a34a; } .pas-ico.azul { background: #e0f2fe; color: #009ee3; }
.pas-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .pas-tit b { font-size: 1.05rem; } .pas-tit small { color: #64748b; font-size: .82rem; line-height: 1.35; }
.pas-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pas-flecha { color: #94a3b8; font-size: .85rem; transition: transform .2s; } .pas-sec[open] .pas-flecha { transform: rotate(180deg); }
.pas-cuerpo { padding: 4px 18px 18px; border-top: 1px dashed #e2e8f0; padding-top: 16px; }
.pas-hr { border: 0; border-top: 1px dashed #e2e8f0; margin: 18px 0; }
@media (max-width: 640px) { .pas-sec summary { flex-wrap: wrap; } .pas-chips { justify-content: flex-start; width: 100%; } }

/* Historial de pagos con Banxico */
.pas-hist-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pas-hist-buscar { display: flex; gap: 6px; align-items: center; margin: 0; } .pas-hist-buscar input[type=text] { min-width: 240px; padding: 8px 12px; border-radius: 10px; border: 1px solid #dbe2ea; font-size: .86rem; }
.pas-hist-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pas-hist-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .82rem; color: #475569; background: #f1f5f9; } .pas-hist-tabs a b { background: #fff; border-radius: 99px; padding: 1px 8px; font-size: .74rem; }
.pas-hist-tabs a.act { color: #fff; background: linear-gradient(135deg, #16a34a, #0d9488); } .pas-hist-tabs a.act b { color: #0d9488; }
.pas-pag { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: .84rem; color: #64748b; } .pas-pag .off { opacity: .4; pointer-events: none; }

/* ---- Tema y colores (tema.php) ---- */
.tm-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
@media (max-width: 991px) { .tm-grid { grid-template-columns: 1fr; } }
.tm-sec { background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); border-radius: 18px; padding: 18px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.tm-sec h3 { font-size: 1rem; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.tm-num { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; color: #fff; background: var(--color-primary); }
.tm-sub { margin: 0 0 10px; font-size: .84rem; color: var(--color-text-muted, #64748b); }
.tm-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tm-preset { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--color-border, #e2e8f0); background: var(--color-bg, #f8fafc); cursor: pointer; font-weight: 700; font-size: .8rem; color: inherit; text-align: left; }
.tm-preset i { width: 30px; height: 30px; border-radius: 10px; flex: none; }
.tm-preset:hover { border-color: var(--color-primary); }
.tm-preset.on { border-color: var(--color-primary); background: var(--color-primary-soft); }
.tm-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.tm-pick label { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--color-border, #e2e8f0); border-radius: 14px; background: var(--color-bg, #f8fafc); cursor: pointer; margin: 0; }
.tm-pick input[type=color] { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.tm-pick span { display: flex; flex-direction: column; line-height: 1.2; } .tm-pick small { color: var(--color-text-muted, #64748b); font-family: monospace; text-transform: uppercase; }
.tm-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.tm-dot { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--color-border, #cbd5e1); cursor: pointer; transition: transform .12s; }
.tm-dot:hover { transform: scale(1.1); } .tm-dot.on { box-shadow: 0 0 0 3px var(--color-text, #0f172a); }
.tm-acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.tm-sticky { position: sticky; top: 84px; }

.tm-prev { --a1: #8b5cf6; --a2: #3b82f6; --a3: #22d3ee; --p: #ff7a29; --p2: #ffa564; display: grid; grid-template-columns: 38% 1fr; gap: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--color-border, #e2e8f0); min-height: 300px;
    background: radial-gradient(420px 260px at 0% 0%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 62%), radial-gradient(380px 240px at 100% 0%, color-mix(in srgb, var(--a3) 16%, transparent), transparent 62%), var(--color-bg, #f6f7fb); }
.tm-prev-side { margin: 10px; padding: 10px; border-radius: 16px; background: radial-gradient(120% 45% at 0% 0%, color-mix(in srgb, var(--a1) 20%, transparent), transparent 60%), radial-gradient(90% 40% at 100% 100%, color-mix(in srgb, var(--a3) 14%, transparent), transparent 62%), linear-gradient(180deg, #fff, color-mix(in srgb, var(--a1) 4%, #fff)); border: 1px solid color-mix(in srgb, var(--a1) 12%, #fff); color: #4b5578; font-size: .72rem; font-weight: 600; }
.tm-prev-busca { padding: 8px 10px; border-radius: 11px; background: color-mix(in srgb, var(--a1) 6%, #fff); border: 1px solid color-mix(in srgb, var(--a1) 14%, #fff); color: #7c85a8; margin-bottom: 8px; white-space: nowrap; overflow: hidden; }
.tm-prev-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 12px; margin-bottom: 3px; }
.tm-prev-item i { width: 24px; height: 24px; border-radius: 9px; display: grid; place-items: center; font-size: .66rem; background: color-mix(in srgb, var(--a1) 7%, #fff); border: 1px solid color-mix(in srgb, var(--a1) 11%, #fff); color: color-mix(in srgb, var(--a1) 70%, #3b4270); }
.tm-prev-item.on { color: #1c2146; background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 16%, transparent), color-mix(in srgb, var(--a2) 7%, transparent)); }
.tm-prev-item.on i { background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; border-color: transparent; box-shadow: 0 6px 12px -5px color-mix(in srgb, var(--a1) 75%, transparent); }
.tm-prev-main { padding: 10px 12px 12px 2px; min-width: 0; }
.tm-prev-top { height: 28px; border-radius: 10px; background: color-mix(in srgb, #fff 68%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--a1) 13%, transparent); margin-bottom: 10px; }
.tm-prev-titulo { font-weight: 800; font-size: 1rem; margin-bottom: 8px; background: linear-gradient(90deg, #1c2146 0%, #1c2146 55%, color-mix(in srgb, var(--a1) 80%, #1c2146) 130%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tm-prev-card { background: #fff; border: 1px solid color-mix(in srgb, var(--a1) 10%, #fff); border-radius: 14px; padding: 10px; box-shadow: 0 14px 28px -22px color-mix(in srgb, var(--a1) 40%, transparent); color: #1c2146; }
.tm-prev-kpis { display: flex; gap: 8px; margin-bottom: 10px; }
.tm-prev-kpis span { flex: 1; font-size: .62rem; color: #64748b; padding: 7px 8px; border-radius: 11px; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 9%, transparent), color-mix(in srgb, var(--a3) 7%, transparent) 70%), #fff; border: 1px solid #eef0f8; }
.tm-prev-kpis b { display: block; font-size: .95rem; color: #1c2146; }
.tm-prev-tabs { display: flex; gap: 14px; border-bottom: 1px solid #e8ebf8; margin-bottom: 10px; font-size: .7rem; font-weight: 700; color: #94a3b8; }
.tm-prev-tabs span { padding: 0 0 6px; } .tm-prev-tabs .on { color: color-mix(in srgb, var(--a1) 75%, #1c2146); border-bottom: 2px solid var(--a1); }
.tm-prev-btns { display: flex; align-items: center; gap: 8px; }
.tm-prev-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; color: #fff; font-weight: 700; font-size: .7rem; background: linear-gradient(135deg, var(--p), var(--p2)); box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--p) 70%, transparent); }
.tm-prev-chip { padding: 4px 10px; border-radius: 999px; font-size: .65rem; font-weight: 800; color: var(--p); background: color-mix(in srgb, var(--p) 13%, transparent); }
.tm-dot-cristal { background: linear-gradient(135deg, #fff, #e8ecfb); color: #64748b; display: inline-grid; place-items: center; font-size: .8rem; }
.tm-prev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; font-size: .62rem; color: #7c85a8; }
.tm-prev-bus { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--a1) 6%, #fff); border: 1px solid color-mix(in srgb, var(--a1) 16%, #e2e8f0); }
.tm-prev-av { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .5rem; font-weight: 800; color: #fff; background: var(--p); }
.tm-prev.tm-barra .tm-prev-top { background: linear-gradient(100deg, var(--b1), var(--b2)); border-bottom-color: transparent; }
.tm-prev.tm-barra-osc .tm-prev-top { color: rgba(255, 255, 255, .85); }
.tm-prev.tm-barra-osc .tm-prev-bus { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .25); }

/* ---- Script de conexion remota (conexion_remota.php) ---- */
.cr-sec { background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); border-radius: 18px; padding: 18px; margin-top: 14px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.cr-sec h3 { font-size: 1.02rem; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.cr-num { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; color: #fff; background: var(--color-primary); flex: none; }
.cr-sub { margin: 0 0 10px; font-size: .84rem; color: var(--color-text-muted, #64748b); }
.cr-form { display: grid; gap: 12px; }
.cr-form-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; }
.cr-form label { display: grid; gap: 5px; font-weight: 700; font-size: .84rem; margin: 0; }
.cr-form input, .cr-form select { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--color-border, #dbe2ea); background: var(--color-bg, #fff); color: inherit; font: inherit; font-weight: 500; }
.cr-form small { font-weight: 500; color: var(--color-text-muted, #64748b); font-size: .76rem; }
.cr-avanzado summary { cursor: pointer; font-weight: 700; font-size: .84rem; color: var(--color-text-muted, #64748b); }
.cr-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cr-msg { font-size: .85rem; }
.cr-lista { display: grid; gap: 10px; }
.cr-fila { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--color-border, #e2e8f0); background: var(--color-bg, #f8fafc); flex-wrap: wrap; }
.cr-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #06b6d4, #3b82f6); flex: none; }
.cr-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.3; } .cr-info small { color: var(--color-text-muted, #64748b); font-size: .78rem; }
.cr-estado { font-size: .76rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); color: var(--color-text-muted, #64748b); white-space: nowrap; }
.cr-estado.ok { color: #047857; background: rgba(16, 185, 129, .12); border-color: transparent; }
.cr-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-cargando { opacity: .6; cursor: wait; }
.cr-paso { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--color-border, #e2e8f0); }
.cr-paso h4 { font-size: .95rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0 0 6px; } .cr-paso h4 small { font-weight: 600; color: var(--color-text-muted, #64748b); }
.cr-codigo { width: 100%; margin-top: 8px; padding: 12px; border-radius: 12px; border: 1px solid #1e293b; background: #0f172a; color: #e2e8f0; font-family: ui-monospace, Consolas, monospace; font-size: .76rem; line-height: 1.5; resize: vertical; white-space: pre; overflow: auto; }
.cr-check { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; margin-bottom: 8px; }
.solo-chr .cr-paso + .cr-paso, .solo-chr #crAplicarRouter { display: none; }
.cr-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4000; max-width: min(560px, 92vw); padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: .88rem; color: #fff; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .5); }
.cr-toast.ok { background: #059669; } .cr-toast.mal { background: #dc2626; } .cr-toast[hidden] { display: none; }
.cr-peq { font-weight: 600; color: var(--color-text-muted, #64748b); font-size: .78rem; }
.cr-aviso { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; font-size: .86rem; background: rgba(245, 158, 11, .14); color: #92400e; border: 1px solid rgba(245, 158, 11, .3); }
.cr-tabla { overflow-x: auto; border: 1px solid var(--color-border, #e2e8f0); border-radius: 14px; }
.cr-tabla table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.cr-tabla th { text-align: left; padding: 9px 12px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted, #64748b); background: var(--color-bg, #f8fafc); }
.cr-tabla td { padding: 9px 12px; border-top: 1px solid var(--color-border, #e2e8f0); }
.cr-tabla code { font-size: .8rem; }
.cr-estado.mal { color: #b91c1c; background: rgba(239, 68, 68, .12); border-color: transparent; }
.cr-pasos { margin: 10px 0; padding-left: 20px; font-size: .86rem; display: grid; gap: 4px; }
.cr-sel { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--color-border, #dbe2ea); background: var(--color-bg, #fff); color: inherit; font: inherit; min-width: 220px; }
.cr-chr { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--color-border, #e2e8f0); background: var(--color-bg, #f8fafc); display: grid; gap: 10px; }
.cr-chr-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cr-chr-cab .cr-info b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-sel-mini { min-width: 0; width: 110px; padding: 5px 8px; font-size: .78rem; border-radius: 10px; }
.cr-wb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--color-text-muted, #64748b); } .cr-wb[hidden] { display: none; } .cr-wb code { font-size: .78rem; }
.cr-copiar { border: 0; background: none; cursor: pointer; color: var(--color-primary); padding: 0 4px; }
.cr-puertos { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--color-bg, #f8fafc); border: 1px solid var(--color-border, #e2e8f0); }
.cr-puertos b { font-size: 1rem; } .cr-puertos label { display: grid; gap: 4px; font-weight: 700; font-size: .82rem; margin: 0; }
.cr-inline { display: inline-flex; gap: 6px; } .cr-inline input { width: 110px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--color-border, #dbe2ea); background: var(--color-bg, #fff); color: inherit; }
/* Distintivos de conexion remota en la tarjeta del Mikrotik */
.mkc-vpn { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 5px; padding: 2px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .4); vertical-align: middle; }
.mkc-chip.winbox { background: linear-gradient(135deg, #ede9fe, #cffafe); color: #4c1d95; border: 1px solid #c4b5fd; }
.mkc-chip.winbox b { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; }
.mkc-copiar { border: 0; background: rgba(76, 29, 149, .1); color: #4c1d95; border-radius: 8px; padding: 1px 7px; cursor: pointer; font-size: .72rem; }
.mkc-copiar:hover { background: rgba(76, 29, 149, .2); }
/* Winbox remoto en la franja de arriba de la tarjeta */
.mkc-wb-top { display: flex; align-items: center; gap: 7px; margin-top: 6px; width: fit-content; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #fff; background: rgba(15, 23, 42, .32); border: 1px solid rgba(255, 255, 255, .35); }
.mkc-wb-top b { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkc-wb-top .mkc-copiar { background: rgba(255, 255, 255, .22); color: #fff; } .mkc-wb-top .mkc-copiar:hover { background: rgba(255, 255, 255, .35); }
/* Winbox remoto: si la direccion no cabe se corta con "..." (no empuja ni descuadra la tarjeta) */
.mkc-wb-top { min-width: 0; overflow: hidden; }
.mkc-wb-top > i, .mkc-wb-top .mkc-copiar, .mkc-wb-top .mkc-wb-et { flex: none; }
.mkc-wb-top b { flex: 0 1 auto; min-width: 0; }
/* ---- Mi empresa y configuracion inicial ---- */
.kx5-brand-logo { height: 34px; max-width: 150px; width: auto; object-fit: contain; border-radius: 8px; flex: none; }
.kx5-sidebar-brand .kx5-brand-logo { height: 30px; margin-right: 8px; }
.ini-pasos { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.ini-paso { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 18px; background: var(--color-surface, #fff); border: 2px solid var(--color-border, #e2e8f0); text-decoration: none; color: inherit; min-width: 240px; }
.ini-paso.activo { border-color: var(--color-primary); box-shadow: 0 10px 24px -14px var(--color-primary); }
.ini-paso-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; background: var(--color-bg, #f1f5f9); color: var(--color-text-muted, #64748b); flex: none; }
.ini-paso.activo .ini-paso-num { background: var(--color-primary); color: #fff; }
.ini-paso.hecho .ini-paso-num { background: #16a34a; color: #fff; }
.ini-paso-txt { display: flex; flex-direction: column; line-height: 1.25; } .ini-paso-txt b { font-size: 1rem; } .ini-paso-txt small { color: var(--color-text-muted, #64748b); }
.ini-linea { flex: 1; min-width: 24px; height: 4px; border-radius: 4px; background: var(--color-border, #e2e8f0); } .ini-linea.llena { background: #16a34a; }
.ini-intro { display: flex; gap: 16px; padding: 18px 20px; border-radius: 20px; margin-bottom: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 10%, var(--color-surface, #fff)), var(--color-surface, #fff)); border: 1px solid var(--color-border, #e2e8f0); }
.ini-intro h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; } .ini-intro p { margin: 0 0 8px; font-size: .95rem; } .ini-intro ul { margin: 0; padding-left: 18px; font-size: .88rem; color: var(--color-text-muted, #64748b); }
.ini-intro-ico { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, #3b82f6, #6366f1); } .ini-intro-ico.morado { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.ini-form { display: grid; gap: 14px; }
.ini-bloque { background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); border-radius: 20px; padding: 18px 20px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.ini-bloque h3 { margin: 0 0 10px; font-size: 1.08rem; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ini-num { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .85rem; color: #fff; background: var(--color-primary); flex: none; }
.ini-opc { font-weight: 600; color: var(--color-text-muted, #64748b); font-size: .8rem; }
.ini-ayuda { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; font-size: .88rem; background: color-mix(in srgb, #f59e0b 10%, transparent); border: 1px dashed rgba(245, 158, 11, .5); }
.ini-ayuda i { color: #d97706; margin-right: 4px; }
.ini-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ini-campo { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; margin: 0; }
.ini-campo input, .ini-campo select { padding: 13px 14px; border-radius: 14px; border: 2px solid var(--color-border, #dbe2ea); background: var(--color-bg, #fff); color: inherit; font: inherit; font-weight: 500; font-size: 1rem; }
.ini-campo input:focus, .ini-campo select:focus { outline: 0; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent); }
.ini-req { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: #ef4444; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.ini-peq { font-weight: 500; color: var(--color-text-muted, #64748b); font-size: .78rem; }
.ini-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.ini-logo { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 16px; border: 1px solid var(--color-border, #e2e8f0); background: var(--color-bg, #f8fafc); }
.ini-logo small { color: var(--color-text-muted, #64748b); font-size: .8rem; }
.ini-logo input[type=file] { font-size: .8rem; width: 100%; }
.ini-logo-vista { height: 110px; border-radius: 14px; display: grid; place-items: center; text-align: center; background: repeating-conic-gradient(#e9edf3 0% 25%, #fff 0% 50%) 50% / 16px 16px; border: 1px solid var(--color-border, #e2e8f0); color: #94a3b8; font-size: .8rem; overflow: hidden; }
.ini-logo-vista img { max-width: 100%; max-height: 100%; object-fit: contain; } .ini-logo-vista i { font-size: 1.6rem; }
.ini-quitar { display: flex; gap: 6px; align-items: center; font-size: .8rem; margin: 0; color: #b91c1c; font-weight: 600; }
.ini-acciones { display: flex; justify-content: flex-end; }
.ini-grande { padding: 13px 26px; font-size: 1.02rem; font-weight: 800; border-radius: 14px; }
.ini-exito { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; font-weight: 600; background: rgba(16, 185, 129, .12); color: #047857; border: 1px solid rgba(16, 185, 129, .35); }
.ini-final { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 4px; padding: 18px 20px; border-radius: 20px; background: linear-gradient(135deg, rgba(16, 185, 129, .1), transparent), var(--color-surface, #fff); border: 1px solid rgba(16, 185, 129, .35); }
.ini-final h3 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; } .ini-final p { margin: 0; font-size: .9rem; color: var(--color-text-muted, #64748b); }
.ini-final-bt { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ini-inicio { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 16px 20px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 55%, #7c3aed)); box-shadow: 0 14px 30px -18px var(--color-primary); }
.ini-inicio b { font-size: 1.05rem; } .ini-inicio span { flex: 1; min-width: 220px; opacity: .95; font-size: .9rem; }
.ini-inicio a { background: #fff; color: #0f172a; font-weight: 800; padding: 10px 18px; border-radius: 12px; text-decoration: none; }.ini-et { display: block; } .ini-req { display: inline-block; }
.ini-fila { align-items: start; }
/* ---- Asistente de configuracion inicial (varios pasos) ---- */
.ini-barra { margin: 12px 0 8px; } .ini-barra-txt { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 6px; } .ini-barra-txt span { color: var(--color-text-muted, #64748b); }
.ini-barra-fondo { height: 10px; border-radius: 999px; background: var(--color-border, #e2e8f0); overflow: hidden; } .ini-barra-lleno { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--color-primary), #16a34a); transition: width .4s; }
.ini-nav { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 12px; margin-bottom: 4px; }
.ini-nav-p { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 66px; padding: 8px 6px; border-radius: 14px; text-decoration: none; color: inherit; border: 2px solid transparent; flex: none; }
.ini-nav-p small { font-size: .7rem; font-weight: 700; color: var(--color-text-muted, #64748b); text-align: center; }
.ini-nav-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--color-surface, #f1f5f9); border: 2px solid var(--color-border, #e2e8f0); color: var(--color-text-muted, #64748b); }
.ini-nav-p.activo { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); } .ini-nav-p.activo .ini-nav-n { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.ini-nav-p.hecho .ini-nav-n { background: #16a34a; border-color: #16a34a; color: #fff; } .ini-nav-p.omitido .ini-nav-n { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ini-intro-ico.verde { background: linear-gradient(135deg, #10b981, #059669); } .ini-intro-ico.azul { background: linear-gradient(135deg, #0ea5e9, #2563eb); } .ini-intro-ico.ambar { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ini-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ini-op { background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.ini-op h3 { margin: 0; font-size: 1.1rem; font-weight: 800; } .ini-op h3 i { color: var(--color-primary); margin-right: 6px; } .ini-op p { margin: 0; font-size: .92rem; } .ini-op .btn { margin-top: auto; align-self: flex-start; }
.ini-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 14px; font-size: .88rem; } .ini-lista i { width: 20px; color: var(--color-primary); }
.ini-omitir-linea { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; border: 1px dashed var(--color-border, #cbd5e1); font-size: .9rem; margin-bottom: 14px; }
.ini-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ini-tarea { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 20px; background: var(--color-surface, #fff); border: 2px solid var(--color-border, #e2e8f0); margin-bottom: 14px; }
.ini-tarea.hecho { border-color: rgba(22, 163, 74, .45); } .ini-tarea.omitido { border-color: rgba(245, 158, 11, .5); } .ini-tarea-info { flex: 1; min-width: 240px; }
.ini-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.ini-resumen { display: grid; gap: 8px; margin-bottom: 14px; }
.ini-res-fila { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); text-decoration: none; color: inherit; }
.ini-res-fila b { flex: 1; } .ini-res-fila > i { color: var(--color-text-muted, #94a3b8); }
.ini-res-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--color-bg, #f1f5f9); color: #64748b; flex: none; } .ini-res-ico.hecho { background: #dcfce7; color: #15803d; } .ini-res-ico.omitido { background: #fef3c7; color: #b45309; }
.ini-volver { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 16px; border-radius: 16px; background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface, #fff)); border: 1px solid color-mix(in srgb, var(--color-primary) 40%, transparent); font-size: .9rem; }
.ini-volver > i { color: var(--color-primary); font-size: 1.2rem; } .ini-volver span { flex: 1; min-width: 200px; } .ini-volver a { background: var(--color-primary); color: #fff; font-weight: 800; padding: 8px 16px; border-radius: 12px; text-decoration: none; }/* ---- Logo de la empresa centrado sobre el menu lateral (escritorio) ---- */
@media (min-width: 992px) {
    .kx5-topbar-left .kx5-brand:has(.kx5-brand-logo) { width: calc(var(--kx-sidebar-w) - 12px); justify-content: center; flex: none; }
    html.gw-rail .kx5-topbar-left .kx5-brand:has(.kx5-brand-logo) { width: 76px; }
    .kx5-topbar-left .kx5-brand-logo { max-width: 100%; height: 40px; }
}
/* Planes: formulario guiado paso a paso */
.pl2-paso { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--color-border); }
.pl2-paso:last-of-type { border-bottom: 0; }
.pl2-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#a78bfa,#6d28d9); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(109,40,217,.3); }
.pl2-cuerpo { flex: 1; min-width: 0; }
.pl2-cuerpo h4 { margin: 4px 0 8px; font-size: 1.02rem; }
.pl2-ayuda { margin: 0 0 10px; font-size: .85rem; color: var(--color-text-muted); }
.pl2-tag { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: rgba(109,40,217,.12); color: #6d28d9; font-size: .68rem; font-weight: 700; vertical-align: middle; }
.pl2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pl2-chip { border: 2px solid var(--color-border); background: var(--color-surface); border-radius: 999px; padding: 7px 16px; font-weight: 800; cursor: pointer; font-family: inherit; font-size: .88rem; color: inherit; }
.pl2-chip:hover { border-color: #8b5cf6; background: rgba(139,92,246,.1); color: #6d28d9; }
.pl2-vel { display: flex; }
.pl2-vel input { border-radius: 10px 0 0 10px !important; }
.pl2-vel select { min-width: 74px; padding: 0 10px; border: 1px solid var(--color-border); border-left: 0; border-radius: 0 10px 10px 0; background: rgba(100,116,139,.12); font-weight: 700; font-family: inherit; color: inherit; }
.pl2-resumen { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #166534; font-size: .86rem; }
.pl2-resumen .fa-solid { margin-top: 3px; }
.pl2-perfil { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pl2-perfil input { flex: 1; min-width: 180px; }
.pl2-nota { display: block; margin-top: 8px; font-size: .78rem; color: var(--color-text-muted); }
.pl2-mas { margin: 10px 0 14px; border: 1px solid var(--color-border); border-radius: 14px; padding: 4px 16px 4px; background: var(--color-surface); }
.pl2-mas > summary { cursor: pointer; padding: 12px 0; font-weight: 800; list-style: none; }
.pl2-mas > summary::-webkit-details-marker { display: none; }
.pl2-mas > summary span { font-weight: 400; color: var(--color-text-muted); font-size: .8rem; }
.pl2-mas[open] > summary { border-bottom: 1px solid var(--color-border); margin-bottom: 12px; }
.pl2-listo { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #166534; font-size: .88rem; }
.pl2-listo .fa-solid { font-size: 1.4rem; color: #22c55e; }
.pl2-card { margin-bottom: 14px; padding: 14px 16px 4px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.pl2-card h5 { margin: 0 0 6px; font-size: .98rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl2-card h5 .fa-solid { color: #6d28d9; }
.pl2-card > p { margin: 0 0 12px; font-size: .84rem; color: var(--color-text-muted); }
.pl-form select { font-family: inherit; }
:root[data-theme="dark"] .pl2-tag { background: rgba(167,139,250,.18); color: #c4b5fd; }
:root[data-theme="dark"] .pl2-resumen, :root[data-theme="dark"] .pl2-listo { background: rgba(34,197,94,.14); color: #86efac; }
:root[data-theme="dark"] .pl2-card h5 .fa-solid { color: #c4b5fd; }
:root[data-theme="dark"] .pl2-chip:hover { color: #c4b5fd; }
@media (max-width: 640px) { .pl2-paso { gap: 10px; } .pl2-num { width: 28px; height: 28px; font-size: .85rem; } }
.pl2-real { margin-bottom: 14px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(109,40,217,.09), rgba(59,130,246,.09)); border: 1px solid rgba(109,40,217,.28); }
.pl2-real h5 { margin: 0 0 4px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.pl2-real h5 .fa-solid { color: #6d28d9; }
.pl2-real > p { margin: 0 0 10px; font-size: .82rem; color: var(--color-text-muted); }
.pl2-real-datos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pl2-dato { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .82rem; background: var(--color-surface); border: 1px solid var(--color-border); }
.pl2-dato.baja { color: #15803d; } .pl2-dato.sube { color: #1d4ed8; } .pl2-dato.gar { color: #6d28d9; } .pl2-dato.turbo { color: #b45309; }
.pl2-real-codigo small { display: block; margin-bottom: 4px; font-size: .74rem; color: var(--color-text-muted); }
.pl2-real-codigo > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pl2-real-codigo code { flex: 1; min-width: 200px; padding: 9px 12px; border-radius: 10px; background: #0f172a; color: #a7f3d0; font-size: .86rem; word-break: break-all; }
:root[data-theme="dark"] .pl2-real h5 .fa-solid { color: #c4b5fd; }
:root[data-theme="dark"] .pl2-dato.baja { color: #4ade80; } :root[data-theme="dark"] .pl2-dato.sube { color: #60a5fa; } :root[data-theme="dark"] .pl2-dato.gar { color: #c4b5fd; } :root[data-theme="dark"] .pl2-dato.turbo { color: #fbbf24; }
.pl2-push { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(109,40,217,.3); background: rgba(109,40,217,.06); cursor: pointer; }
.pl2-push input { width: 20px; height: 20px; margin-top: 3px; accent-color: #6d28d9; flex: none; }
.pl2-push small { display: block; margin-top: 2px; font-size: .78rem; color: var(--color-text-muted); font-weight: 400; }
.pl2-prog { padding: 20px 22px 8px; overflow-y: auto; }
.pl2-prog h4 { margin: 0 0 14px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.pl2-prog ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl2-prog li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); font-size: .9rem; }
.pl2-prog li.ok { border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.08); } .pl2-prog li.ok .fa-solid { color: #22c55e; }
.pl2-prog li.mal { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.08); } .pl2-prog li.mal .fa-solid { color: #ef4444; }
.pl2-prog li.trabajando .fa-solid { color: #6d28d9; }
.pl2-prog li.info .fa-solid { color: #3b82f6; }
.pl2-prog .fx-modal-pie { padding: 8px 0 14px; }
:root[data-theme="dark"] .pl2-push input { accent-color: #a78bfa; }
.pl-tipo-op { position: relative; }
#srvManual .pl2-paso:first-of-type { border-top: 1px dashed var(--color-border); }
.mz-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mz-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.3; background: rgba(100,116,139,.12); color: var(--color-text-muted); }
.mz-pill .fa-solid { font-size: .68rem; opacity: .8; }
.mz-pill.plan { background: rgba(59,130,246,.12); color: #1d4ed8; }
.mz-pill.srv { background: rgba(139,92,246,.13); color: #6d28d9; }
.mz-pill.aviso { background: rgba(245,158,11,.16); color: #b45309; }
:root[data-theme="dark"] .mz-pill.plan { color: #93c5fd; } :root[data-theme="dark"] .mz-pill.srv { color: #c4b5fd; } :root[data-theme="dark"] .mz-pill.aviso { color: #fcd34d; }
/* Cambios masivos: las pestañas van en dos filas de tres */
#masivoTabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow: visible; }
#masivoTabs .ms-tab { min-width: 0; border: 1px solid transparent; border-radius: 16px; }
#masivoTabs .ms-tab:hover { border-color: var(--color-border); }
#masivoTabs .ms-tab.active { border-color: var(--ms-c); }
#masivoTabs .ms-tab-txt small { white-space: normal; }
@media (max-width: 820px) { #masivoTabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { #masivoTabs { grid-template-columns: 1fr; } }
/* Selector de NAP con buscador */
.nap-cb { position: relative; }
.nap-cb-input { width: 100%; min-height: 42px; padding: 8px 36px 8px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); color: inherit; font-family: inherit; }
.nap-cb-input:focus { outline: 2px solid #3b82f6; outline-offset: 1px; }
.nap-cb-x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--color-text-muted); }
.nap-cb-x:hover { background: rgba(100,116,139,.15); }
.nap-cb-lista { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 340px; overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; box-shadow: 0 14px 34px rgba(15,23,42,.18); }
.nap-cb-cab { position: sticky; top: 0; padding: 8px 12px; font-size: .74rem; color: var(--color-text-muted); background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.nap-cb-op { padding: 9px 12px; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-bottom: 1px solid rgba(100,116,139,.1); }
.nap-cb-op b { font-size: .92rem; }
.nap-cb-op small { color: var(--color-text-muted); font-size: .76rem; flex-basis: 100%; }
.nap-cb-op:hover, .nap-cb-op.act { background: rgba(59,130,246,.1); }
.nap-cb-op.llena { opacity: .55; }
.nap-cb-tag { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(34,197,94,.16); color: #15803d; }
.nap-cb-vacio { padding: 10px 12px; font-size: .8rem; color: var(--color-text-muted); }
/* Caja de puertos (NAP) */
.nap-caja { box-sizing: border-box; width: 100%; margin-top: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); max-width: 420px; overflow: hidden; }
.nap-caja-cab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: .78rem; color: var(--color-text-muted); }
.nap-caja-cab span { margin-right: 4px; }
.nap-tam { border: 1px solid var(--color-border); background: none; border-radius: 8px; padding: 3px 12px; font-weight: 700; cursor: pointer; font-family: inherit; color: inherit; }
.nap-tam.act { background: #2563eb; border-color: #2563eb; color: #fff; }
.nap-puertos { display: grid; gap: 6px; }
.nap-p { box-sizing: border-box; min-width: 0; width: 100%; padding: 0; aspect-ratio: 1; min-height: 32px; border-radius: 9px; border: 2px solid transparent; font-weight: 800; font-size: .9rem; font-family: inherit; cursor: pointer; }
.nap-p.libre { background: rgba(34,197,94,.16); color: #15803d; border-color: rgba(34,197,94,.45); }
.nap-p.libre:hover { background: rgba(34,197,94,.3); }
.nap-p.mio { background: #2563eb; color: #fff; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(37,99,235,.25); }
.nap-p.ocupado { background: rgba(239,68,68,.14); color: #b91c1c; border-color: rgba(239,68,68,.3); cursor: not-allowed; text-decoration: line-through; }
.nap-p.nada { background: transparent; border: 2px dashed var(--color-border); color: var(--color-text-muted); cursor: not-allowed; opacity: .5; }
.nap-leyenda { margin-top: 8px; font-size: .72rem; color: var(--color-text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.nap-leyenda i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.nap-leyenda i.libre { background: rgba(34,197,94,.45); } .nap-leyenda i.mio { background: #2563eb; } .nap-leyenda i.ocupado { background: rgba(239,68,68,.45); }
/* Estado del servicio (arriba de los botones) */
.sv-estado { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--sv-c, var(--color-border)); background: color-mix(in srgb, var(--sv-c, #94a3b8) 10%, transparent); }
.sv-estado-ico { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; background: var(--sv-c, #94a3b8); flex: none; }
.sv-estado small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.sv-estado b { font-size: 1.25rem; color: var(--sv-c, inherit); }
.sv-estado-txt { color: var(--color-text-muted); font-size: .88rem; flex: 1; min-width: 200px; }
.sv-estado-verde { --sv-c: #16a34a; } .sv-estado-ambar { --sv-c: #d97706; } .sv-estado-rojo { --sv-c: #dc2626; } .sv-estado-azul { --sv-c: #2563eb; } .sv-estado-gris { --sv-c: #64748b; }
.sv-encabezado-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -4px 0 14px; font-size: .88rem; }
.sv-estado-pildora { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: .95rem; border: 1.5px solid var(--sv-c, var(--color-border)); background: color-mix(in srgb, var(--sv-c, #94a3b8) 12%, transparent); color: var(--color-text); box-shadow: 0 4px 12px rgba(15,23,42,.06); }
.sv-estado-pildora .fa-solid { color: var(--sv-c, #64748b); font-size: 1.1rem; }
.badge.badge-sin-conexion { background: #dc2626 !important; color: #fff !important; font-weight: 700; }
.sv-estado-pildora.sv-falla { background: #dc2626; border-color: #b91c1c; color: #fff; box-shadow: 0 0 0 0 rgba(220,38,38,.55); animation: sv-falla-pulso 1.8s infinite; }
.sv-estado-pildora.sv-falla b, .sv-estado-pildora.sv-falla .fa-solid { color: #fff; }
@keyframes sv-falla-pulso { 70% { box-shadow: 0 0 0 10px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
.sv-estado-pildora.sv-estado-rojo:not(.sv-falla) { background: color-mix(in srgb, #dc2626 22%, transparent); }
.sv-estado-pildora b { color: var(--sv-c, inherit); font-size: 1.02rem; }
/* Portal: "¿Con que deseas hacer tu pago?" en filas anchas para poder explicar cada opcion */
#viaPago { grid-template-columns: 1fr; }
#viaPago .pay-method-option { flex-direction: row; align-items: flex-start; text-align: left; gap: 14px; padding: 14px 16px; }
#viaPago .pay-method-option .portal-quick-circle { flex: none; }
#viaPago .pay-method-label { font-size: 1rem; line-height: 1.35; }
#viaPago .pay-method-label small { margin-top: 3px; font-size: .84rem; line-height: 1.45; }
.mp-fila small { display: block; }
.mp-fila small.mp-pulsa { font-style: italic; opacity: .75; margin-top: 2px; }
/* Mapa: asignar NAP a un cliente (verde = con puertos libres, roja = llena) */
.mp-nap.asig-libre { background: #16a34a; box-shadow: 0 0 0 4px rgba(34,197,94,.38); cursor: pointer; }
.mp-nap.asig-llena { background: #dc2626; box-shadow: 0 0 0 4px rgba(239,68,68,.38); }
.mp-nap.asig-otra { opacity: .35; }
.mp-cupo { position: absolute; top: -9px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #0f172a; color: #fff; font-size: .62rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff; }

/* ===== Organizador de red: racks y equipos ===== */
.rk-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .rk-layout { grid-template-columns: 1fr; } }
.rk-card { padding: 14px; overflow-x: auto; }
.rk-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rk-cuerpo { display: flex; border: 3px solid #334155; border-radius: 12px; background: #1e293b; padding: 6px 6px 6px 0; min-width: 420px; }
.rk-nums { width: 30px; flex: 0 0 30px; color: #94a3b8; font-size: .68rem; font-weight: 700; text-align: center; }
.rk-nums div { display: flex; align-items: center; justify-content: center; border-bottom: 1px solid transparent; }
.rk-area { position: relative; flex: 1; cursor: copy; background: repeating-linear-gradient(to bottom, #273449 0, #273449 calc(var(--h) - 1px), #0f172a calc(var(--h) - 1px), #0f172a var(--h)); border-radius: 6px; }
.rk-eq { position: absolute; left: 2px; right: 2px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 6px; color: #fff; cursor: grab; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 92%, #fff), var(--c)); box-shadow: 0 2px 6px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.25); border: 1px solid rgba(0,0,0,.35); transition: filter .12s; }
.rk-eq:hover { filter: brightness(1.12); }
.rk-eq.moviendo { opacity: .35; }
.rk-eq-ico { width: 24px; text-align: center; font-size: .95rem; flex: 0 0 24px; opacity: .95; }
.rk-eq-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
.rk-eq-txt b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-eq-txt small { font-size: .68rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pts { display: flex; flex-wrap: wrap; gap: 2px; max-width: 46%; justify-content: flex-end; }
.rk-pts i, .rk-leyenda i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.35); }
.rk-pts i.on, .rk-leyenda i.on { background: #22c55e; border-color: #bbf7d0; box-shadow: 0 0 4px #22c55e; }
.rk-sombra { position: absolute; left: 2px; right: 2px; border: 2px dashed #fbbf24; border-radius: 6px; background: rgba(251,191,36,.18); pointer-events: none; }
.rk-leyenda { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: .8rem; color: var(--color-text-muted); }
.rk-leyenda i { margin-right: 4px; background: #cbd5e1; border-color: #94a3b8; }
.rk-leyenda i.on { background: #22c55e; border-color: #16a34a; }
.rk-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 560px; overflow-y: auto; }
.rk-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); cursor: pointer; color: var(--color-text); }
.rk-item:hover { border-color: #a78bfa; background: var(--color-bg); }
.rk-item-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 34px; }
.rk-item-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rk-item-txt b { font-size: .9rem; } .rk-item-txt small { font-size: .74rem; color: var(--color-text-muted); }
.rk-pt { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--color-bg); border: 1px solid var(--color-border); font-size: .75rem; font-weight: 700; }

/* ===== Sectorial: datos de la antena y su cobertura ===== */
.ant-panel { border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ant-cab { display: flex; align-items: center; gap: 12px; } .ant-cab small { display: block; color: var(--color-text-muted); font-size: .8rem; }
.ant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } @media (max-width: 640px) { .ant-grid { grid-template-columns: 1fr; } }
.ant-vista { display: flex; align-items: center; gap: 14px; }
:root[data-theme="dark"] .ant-panel { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.3); }
.mp-sect-lbl { background: rgba(255,255,255,.92); border: 1px solid #16a34a; color: #166534; border-radius: 8px; padding: 2px 7px; font-size: .72rem; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.2); transform: translate(-50%, -50%); width: max-content; }

/* ===== Analizador de enlace (mapa) ===== */
#modalEnlace { width: min(1180px, 96vw); max-width: none; }
.enl-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.7fr) minmax(220px, .8fr); gap: 12px; align-items: start; }
@media (max-width: 980px) { .enl-grid { grid-template-columns: 1fr; } }
.enl-lado, .enl-centro { display: flex; flex-direction: column; gap: 10px; }
.enl-card { border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 14px; background: var(--color-surface); }
.enl-tit { font-weight: 800; display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; } .enl-tit small { font-weight: 600; font-size: .75rem; color: var(--color-text-muted); }
.enl-kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--color-border); font-size: .85rem; }
.enl-kv label, .enl-tri label, .enl-sen label, .enl-cap label { color: var(--color-text-muted); font-size: .78rem; margin: 0; }
.enl-kv input, .enl-tri input { width: 74px; text-align: right; border: 1px solid var(--color-border); border-radius: 8px; padding: 3px 6px; background: var(--color-bg); color: var(--color-text); font-weight: 700; }
.enl-tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; } .enl-tri > div { display: flex; flex-direction: column; gap: 4px; align-items: center; } .enl-tri b { font-size: 1.1rem; }
.enl-sen { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; } .enl-sen b { font-size: 1.5rem; color: #2563eb; }
.enl-cap { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; } .enl-cap b { font-size: 1.3rem; }
.enl-perfil { padding: 8px; } .enl-svg { width: 100%; height: auto; display: block; }
.enl-leyenda { display: flex; gap: 12px; flex-wrap: wrap; font-size: .72rem; color: var(--color-text-muted); margin-top: 4px; } .enl-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.enl-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.enl-avisos { display: flex; flex-direction: column; gap: 6px; } .enl-avisos > div { background: #fef3c7; color: #92400e; border-radius: 10px; padding: 7px 10px; font-size: .82rem; }
.enl-cargando { text-align: center; padding: 60px 10px; color: var(--color-text-muted); font-weight: 700; }
.enl-dock { margin-top: 14px; padding: 12px 14px; }
.enl-dock-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; } .enl-dock-cab > b { font-size: 1.05rem; }
.enl-acc { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.enl-sel { min-width: 200px; max-width: 320px; border: 1px solid var(--color-border); border-radius: 12px; padding: 7px 10px; background: var(--color-bg); color: var(--color-text); font-weight: 600; }
.enl-tri span { white-space: nowrap; } .enl-kv span { text-align: right; }
.mp-lbl { background: rgba(255,255,255,.92); border: 1px solid #94a3b8; color: #334155; border-radius: 6px; padding: 1px 6px; font-size: .68rem; font-weight: 800; white-space: nowrap; transform: translateX(-50%); width: max-content; box-shadow: 0 1px 4px rgba(0,0,0,.25); pointer-events: none; }
.mp-zoom-lejos .mp-lbl, .mp-zoom-lejos .mp-sect-lbl { display: none; }

/* ===== Servicio: panel "Datos del servicio" rediseñado ===== */
.sd-wrap { display: flex; flex-direction: column; gap: 14px; }
.sd-resumen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } @media (max-width: 900px) { .sd-resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sd-tile { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); }
.sd-tile > i { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--color-primary) 12%, transparent); color: var(--color-primary); }
.sd-tile span { font-size: .72rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; } .sd-tile b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-tile.ok > i { background: #dcfce7; color: #16a34a; } .sd-tile.espera > i { background: #fef3c7; color: #b45309; }
.sd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; } @media (max-width: 980px) { .sd-grid { grid-template-columns: 1fr; } }
.sd-ancha { grid-column: 1 / -1; }
.sd-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 22px; padding: 18px 20px; }
.sd-card > header, .sd-mas > summary { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; } .sd-card h4 { margin: 0; font-size: 1.05rem; } .sd-card header p, .sd-mas summary p { margin: 2px 0 0; font-size: .82rem; color: var(--color-text-muted); }
.sd-ico { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; font-size: 1rem; }
.sd-ico.azul { background: linear-gradient(135deg, #3b82f6, #6366f1); } .sd-ico.cian { background: linear-gradient(135deg, #06b6d4, #3b82f6); } .sd-ico.morado { background: linear-gradient(135deg, #8b5cf6, #6d28d9); } .sd-ico.gris { background: linear-gradient(135deg, #94a3b8, #64748b); }
.sd-estados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sd-estado { margin: 0; cursor: pointer; } .sd-estado input { position: absolute; opacity: 0; pointer-events: none; }
.sd-estado > span { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; padding: 9px 11px; border: 2px solid var(--color-border); border-radius: 14px; background: var(--color-surface); transition: border-color .12s, background .12s; }
.sd-estado > span > i { grid-row: 1 / 3; align-self: center; font-size: 1.1rem; color: var(--color-text-muted); } .sd-estado b { font-size: .88rem; } .sd-estado small { font-size: .7rem; color: var(--color-text-muted); }
.sd-estado.verde input:checked + span { border-color: #22c55e; background: #f0fdf4; } .sd-estado.verde input:checked + span > i { color: #16a34a; }
.sd-estado.azul input:checked + span { border-color: #3b82f6; background: #eff6ff; } .sd-estado.azul input:checked + span > i { color: #2563eb; }
.sd-estado.ambar input:checked + span { border-color: #f59e0b; background: #fffbeb; } .sd-estado.ambar input:checked + span > i { color: #d97706; }
.sd-estado.rojo input:checked + span { border-color: #ef4444; background: #fef2f2; } .sd-estado.rojo input:checked + span > i { color: #dc2626; }
.sd-vinculado { border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 16px; padding: 14px; } .sd-v-cab { display: flex; gap: 10px; align-items: center; } .sd-v-cab > i { font-size: 1.5rem; color: #16a34a; } .sd-v-cab small { display: block; color: var(--color-text-muted); }
.sd-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0; } .sd-datos div { min-width: 0; } .sd-datos dt { font-size: .7rem; text-transform: uppercase; color: var(--color-text-muted); font-weight: 700; } .sd-datos dd { margin: 0; font-weight: 700; word-break: break-all; }
.sd-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-espera { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #fffbeb; border: 1px solid #fde68a; margin-bottom: 12px; } .sd-espera > i { font-size: 1.4rem; color: #d97706; } .sd-espera small { display: block; color: var(--color-text-muted); }
.sd-consulta { display: flex; gap: 10px; flex-wrap: wrap; } .sd-consulta input { flex: 1; min-width: 180px; }
.sd-auto { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--color-primary) 6%, transparent); }
.sd-mas { padding: 0; } .sd-mas > summary { cursor: pointer; list-style: none; padding: 18px 20px; margin: 0; } .sd-mas > summary::-webkit-details-marker { display: none; } .sd-mas > summary > div { flex: 1; } .sd-mas[open] > summary { border-bottom: 1px solid var(--color-border); } .sd-mas > .form-grid { padding: 0 20px 18px; } .sd-flecha { transition: transform .15s; color: var(--color-text-muted); } .sd-mas[open] .sd-flecha { transform: rotate(180deg); }
:root[data-theme="dark"] .sd-vinculado { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.3); } :root[data-theme="dark"] .sd-espera { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
:root[data-theme="dark"] .sd-estado.verde input:checked + span, :root[data-theme="dark"] .sd-estado.azul input:checked + span, :root[data-theme="dark"] .sd-estado.ambar input:checked + span, :root[data-theme="dark"] .sd-estado.rojo input:checked + span { background: color-mix(in srgb, var(--color-surface) 85%, currentColor 15%); }
.sd-sub { margin-top: 16px; padding: 14px 16px 6px; border: 1px solid var(--color-border); border-radius: 18px; background: color-mix(in srgb, var(--color-bg) 55%, transparent); }
.sd-sub h5 { margin: 0 0 12px; font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); display: flex; gap: 8px; align-items: center; }
.sd-g2, .sd-g3 { display: grid; gap: 14px 16px; align-items: start; } .sd-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sd-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .sd-g2, .sd-g3 { grid-template-columns: 1fr; } }
.sd-g2 .field-hint, .sd-g3 .field-hint { display: block; min-height: 2.8em; }
.sd-wrap { margin-bottom: 22px; }
.sd-card .field { margin-bottom: 14px; } .sd-card .field:last-child, .sd-sub .field { margin-bottom: 8px; }

/* Servicios: tarjeta con alerta de potencia optica */
.sv-card.alerta { border: 2px solid #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.12); }
.sv-card.alerta:hover { border-color: #ea580c; }
.kx-row-alerta { display: flex; gap: 9px; align-items: flex-start; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: .82rem; line-height: 1.35; }
.kx-row-alerta > i { margin-top: 2px; color: #f97316; }
.kx-row-alerta a { font-weight: 800; color: #c2410c; white-space: nowrap; }
:root[data-theme="dark"] .kx-row-alerta { background: rgba(249,115,22,.12); border-color: rgba(249,115,22,.35); color: #fdba74; } :root[data-theme="dark"] .kx-row-alerta a { color: #fb923c; }

/* Tarjeta del enlace (antena del cliente <-> sectorial) en Antenas de clientes, al estilo del Design Center */
.lk-panel { flex: 0 0 100%; display: grid; grid-template-columns: 1fr 1.05fr 1fr; gap: 12px; margin-top: 2px; }
.lk-lado, .lk-centro { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lk-card { border: 1px solid var(--color-border); border-radius: 16px; padding: 12px 14px; background: rgba(148,163,184,.08); }
.lk-ident { display: grid; grid-template-columns: 1fr 84px; gap: 8px 12px; align-items: start; }
.lk-f1 { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lk-f2, .lk-f3 { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; }
.lk-f2 { grid-template-columns: 1fr 1fr; }
.lk-f3 { grid-template-columns: 1fr 1fr 1.3fr; }
.lk-img { align-self: center; justify-self: center; width: 76px; height: 76px; }
.lk-img svg { width: 100%; height: 100%; }
.lk-lado.inv .lk-ident { grid-template-columns: 84px 1fr; }
.lk-lado.inv .lk-img { grid-column: 1; grid-row: 1; }
.lk-lado.inv .lk-f1 { grid-column: 2; grid-row: 1; }
.lk-campo { min-width: 0; }
.lk-campo label { display: block; font-size: .74rem; color: var(--color-text-muted); margin-bottom: 2px; }
.lk-in { background: rgba(148,163,184,.18); border-radius: 10px; padding: 7px 10px; font-size: .86rem; color: var(--color-text); font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.lk-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lk-dato label { display: block; font-size: .74rem; color: var(--color-text-muted); }
.lk-dato b { font-size: 1.1rem; color: var(--color-text); overflow-wrap: anywhere; }
.lk-sig-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .84rem; color: var(--color-text-muted); }
.lk-sig-cab b { font-size: 1.2rem; color: var(--color-text); white-space: nowrap; }
.lk-sig-bar { height: 7px; border-radius: 999px; background: rgba(148,163,184,.25); overflow: hidden; margin: 6px 0 5px; }
.lk-sig-bar i { display: block; height: 100%; border-radius: 999px; }
.lk-segs { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.lk-seg { text-align: center; font-size: .66rem; color: var(--color-text-muted); padding-top: 8px; position: relative; }
.lk-seg::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(148,163,184,.3); }
.lk-seg.on { color: var(--color-text); font-weight: 700; }
.lk-seg.on::before { background: var(--c); }
.lk-capa-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .9rem; color: var(--color-text); flex-wrap: wrap; }
.lk-capa-cab i { color: #f59e0b; }
.lk-capa-cab b { font-size: 1.15rem; }
.lk-capa-cab small { font-size: .7rem; color: var(--color-text-muted); }
.lk-capa-bar { height: 7px; border-radius: 999px; background: #7cc4f0; overflow: hidden; margin: 8px 0 5px; }
.lk-capa-bar i { display: block; height: 100%; background: #006fff; border-radius: 999px; }
.lk-capa-pie { display: flex; justify-content: space-between; font-size: .72rem; color: var(--color-text-muted); }
.lk-viz { border-radius: 16px; padding: 12px 16px 10px; background: linear-gradient(180deg, rgba(0,111,255,.10), rgba(0,111,255,.18)); border: 1px solid rgba(0,111,255,.2); display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: center; }
.lk-dist { display: flex; align-items: center; gap: 8px; color: var(--color-text); }
.lk-dist s { flex: 1; height: 1px; background: var(--color-text-muted); text-decoration: none; position: relative; }
.lk-dist s:first-child::before, .lk-dist s:last-child::after { content: ''; position: absolute; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--color-text-muted); border-left: 1px solid var(--color-text-muted); }
.lk-dist s:first-child::before { left: 0; transform: rotate(-45deg); }
.lk-dist s:last-child::after { right: 0; transform: rotate(135deg); }
.lk-dist b { font-size: .9rem; }
.lk-linea { display: flex; align-items: center; }
.lk-linea .pt { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #f59e0b; background: var(--color-surface); flex: none; box-sizing: border-box; }
.lk-linea .ln { flex: 1; height: 3px; background: #f59e0b; }
.lk-etq { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; color: var(--color-text-muted); }
.lk-etq span { max-width: 48%; overflow-wrap: anywhere; }
.lk-etq span:last-child { text-align: right; }
.lk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 4px; }
.lk-stats .lk-dato b { font-size: .9rem; }
:root[data-theme="dark"] .lk-img svg circle:first-child { fill: #1e293b; }
@media (max-width: 1100px) { .lk-panel { grid-template-columns: 1fr; } }
.lk-img img { width: 100%; height: 100%; object-fit: contain; }
.lk-lado:not(.inv) .lk-img img { transform: scaleX(-1); }
.lk-f2:has(.mac) { grid-template-columns: 1fr 1.5fr; }
.lk-campo.mac .lk-in { white-space: nowrap; font-size: .8rem; letter-spacing: -.1px; }

/* Version compacta de la tarjeta del enlace */
.lk-fila { padding: 10px 14px; gap: 8px 10px; }
.lk-fila > .pg-fila-ico { width: 32px; height: 32px; font-size: .9rem; border-radius: 10px; }
.lk-fila .pg-fila-info { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 120px; }
.lk-fila .pg-fila-info b { font-size: .95rem; }
.lk-fila .lk-oc { display: none; }
.lk-fila .lk-diag { flex-basis: 100%; }
.lk-panel { gap: 10px; }
.lk-lado, .lk-centro { gap: 8px; }
.lk-card { padding: 10px 12px; }
.lk-ident { grid-template-columns: 1fr 60px; gap: 6px 10px; align-items: center; }
.lk-lado.inv .lk-ident { grid-template-columns: 60px 1fr; }
.lk-img { width: 56px; height: 56px; }
.lk-f1 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lk-f3 { grid-template-columns: 2fr 1fr 1fr; }
.lk-in { padding: 5px 9px; }
.lk-sig-bar { margin: 5px 0 4px; }
.lk-viz { flex: none; padding: 8px 14px 8px; gap: 6px; }
.lk-chips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.lk-chips span { background: rgba(0,111,255,.14); color: var(--color-text); border-radius: 999px; padding: 2px 10px; font-size: .74rem; font-weight: 700; }
.lk-etq span { display: flex; flex-direction: column; line-height: 1.25; }
.lk-etq span b { color: var(--color-text); font-size: .76rem; }
.lk-etq span:last-child { align-items: flex-end; }
.lk-acc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 0; width: auto; }
.lk-acc .pg-inline { display: inline-flex; }
@media (max-width: 1100px) { .lk-f1 { grid-template-columns: 1fr; } }

/* Analizador de enlace del mapa con el mismo diseño de la tarjeta */
.lk-in.lk-num { display: flex; align-items: center; gap: 6px; }
.lk-in input { width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; color: inherit; padding: 0; outline: none; }
.lk-in.lk-num small { color: var(--color-text-muted); font-weight: 600; }
.lk-in:focus-within { box-shadow: 0 0 0 2px rgba(0,111,255,.35); }
.lk-nota { grid-column: 1 / -1; font-size: .74rem; color: var(--color-text-muted); }
.lk-datos .lk-dato .lk-in { margin-top: 2px; }
@media (min-width: 1101px) { .lk-panel.enl-lk { grid-template-columns: minmax(270px, .85fr) minmax(340px, 1.6fr) minmax(270px, .85fr); align-items: start; } }.lk-in.lk-num input[type="number"] { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; height: auto !important; min-height: 0 !important; width: 100% !important; font: inherit !important; color: inherit !important; text-align: left; -moz-appearance: textfield; }
.lk-in.lk-num input::-webkit-outer-spin-button, .lk-in.lk-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lk-in.lk-num small { white-space: nowrap; flex: none; }
.lk-panel.enl-lk .lk-f3 { grid-template-columns: 1fr 1fr; }
.lk-panel.enl-lk .lk-f3 > :first-child { grid-column: 1 / -1; }

/* Boton ambar con mas cuerpo y mejor contraste con el texto blanco */
.fx2-btn.ambar { background: linear-gradient(135deg, #f0a010, #d97706); box-shadow: 0 2px 6px rgba(217, 119, 6, .35); text-shadow: 0 1px 1px rgba(120, 53, 15, .3); }
.fx2-btn.guinda { background: linear-gradient(135deg, #be123c, #9f1239); box-shadow: 0 2px 6px rgba(159, 18, 57, .3); }

/* Ventana de avance al suspender / activar servicios */
.pg-est { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); animation: pgEstIn .18s ease-out; }
.pg-est.salir { opacity: 0; transition: opacity .2s; }
@keyframes pgEstIn { from { opacity: 0; } to { opacity: 1; } }
.pg-est-caja { width: min(440px, 100%); max-height: 88vh; overflow: auto; background: var(--color-surface); border-radius: 22px; padding: 24px 24px 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pg-est-ico { font-size: 2.6rem; color: #3b82f6; line-height: 1; }
.pg-est-ico.ok { color: #16a34a; } .pg-est-ico.aviso { color: #d97706; } .pg-est-ico.error { color: #dc2626; }
.pg-est-tit { margin: 4px 0 0; font-size: 1.2rem; font-weight: 800; color: var(--color-text); }
.pg-est-cli { color: var(--color-text-muted); font-weight: 600; min-height: 1.2em; overflow-wrap: anywhere; }
.pg-est-pasos { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.pg-est-pasos li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: rgba(148, 163, 184, .12); font-size: .9rem; color: var(--color-text); }
.pg-est-pasos li i { margin-top: 2px; } .pg-est-pasos li.on i { color: #3b82f6; } .pg-est-pasos li.ok i { color: #16a34a; } .pg-est-pasos li.aviso { background: rgba(245, 158, 11, .14); } .pg-est-pasos li.aviso i { color: #d97706; } .pg-est-pasos li.error { background: rgba(239, 68, 68, .12); } .pg-est-pasos li.error i { color: #dc2626; }
.pg-est-barra { width: 100%; height: 7px; border-radius: 999px; background: rgba(148, 163, 184, .25); overflow: hidden; margin-top: 8px; } .pg-est-barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3b82f6, #10b981); transition: width .25s; }
.pg-est-cuenta { font-size: .82rem; color: var(--color-text-muted); font-weight: 600; }
.pg-est-lista { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; max-height: 150px; overflow: auto; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.pg-est-lista li { display: grid; grid-template-columns: 18px 1fr; gap: 0 8px; font-size: .8rem; } .pg-est-lista li small { grid-column: 2; color: var(--color-text-muted); } .pg-est-lista li.ok i { color: #16a34a; } .pg-est-lista li.aviso i { color: #d97706; } .pg-est-lista li.error i { color: #dc2626; }
.pg-est-listo { margin-top: 10px; border: 0; border-radius: 12px; padding: 9px 26px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3b82f6, #6366f1); cursor: pointer; }

/* Consulta del modem (ONU) en el servicio */
.md-busca { align-items: stretch; }
.md-campo { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-bg); }
.md-campo:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
.md-campo i { color: var(--color-text-muted); }
.md-campo input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 12px 0 !important; font-weight: 600; color: var(--color-text) !important; letter-spacing: .02em; outline: none; }
.md-btn-consultar { display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; min-height: 46px; border: 0; border-radius: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #0ea5e9, #3b82f6); box-shadow: 0 6px 14px rgba(59, 130, 246, .3); cursor: pointer; }
.md-btn-consultar:hover { filter: brightness(1.07); } .md-btn-consultar:disabled { opacity: .6; cursor: progress; }
.pl2-nota .fa-circle-info { margin-right: 4px; }
.md-cargando { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 16px; background: rgba(59, 130, 246, .08); color: var(--color-text-muted); font-weight: 600; }
.md-res { border: 1px solid var(--color-border); border-radius: 20px; overflow: hidden; background: var(--color-surface); box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
.md-cab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(99, 102, 241, .1)); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.md-cab-ico { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; background: linear-gradient(135deg, #0ea5e9, #6366f1); flex: none; }
.md-cab-txt { flex: 1; min-width: 140px; display: flex; flex-direction: column; } .md-cab-txt b { font-size: 1.08rem; color: var(--color-text); } .md-cab-txt small { color: var(--color-text-muted); }
.md-estado { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: .82rem; } .md-estado i { font-size: .55rem; }
.md-estado.on { color: #15803d; background: rgba(34, 197, 94, .16); } .md-estado.off { color: #b45309; background: rgba(245, 158, 11, .18); }
.md-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px 16px; }
.md-tile { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--color-border); background: rgba(148, 163, 184, .07); min-width: 0; }
.md-tile-ico { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; background: linear-gradient(135deg, #94a3b8, #64748b); }
.md-tile.ok { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .3); } .md-tile.ok .md-tile-ico { background: linear-gradient(135deg, #10b981, #22c55e); }
.md-tile.aviso { background: rgba(239, 68, 68, .07); border-color: rgba(239, 68, 68, .35); } .md-tile.aviso .md-tile-ico { background: linear-gradient(135deg, #f97316, #ef4444); }
.md-tile.espera { background: rgba(245, 158, 11, .09); border-color: rgba(245, 158, 11, .35); } .md-tile.espera .md-tile-ico { background: linear-gradient(135deg, #f59e0b, #d97706); }
.md-tile-cuerpo { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.md-tile-cuerpo small { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-muted); }
.md-tile-cuerpo b { font-size: 1.02rem; color: var(--color-text); overflow-wrap: anywhere; } .md-tile-cuerpo b em { font-style: normal; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 4px; color: #15803d; background: rgba(34, 197, 94, .16); }
.md-tile-cuerpo p { margin: 0; font-size: .82rem; color: var(--color-text-muted); line-height: 1.4; overflow-wrap: anywhere; }
.md-tile-cuerpo code { background: rgba(148, 163, 184, .2); padding: 1px 7px; border-radius: 7px; font-weight: 700; color: var(--color-text); }
.md-alerta { color: #b91c1c; font-weight: 700; }
.md-pie { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px 16px; }
.md-pie small { flex: 1; min-width: 200px; color: var(--color-text-muted); font-size: .8rem; }
.md-btn-usar { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 22px; font-weight: 800; color: #fff; cursor: pointer; background: linear-gradient(135deg, #3b82f6, #6366f1); box-shadow: 0 8px 18px rgba(79, 70, 229, .3); }
.md-btn-usar:hover { filter: brightness(1.07); } .md-btn-usar:disabled { background: #94a3b8; box-shadow: none; cursor: default; }
.md-listo { display: flex; gap: 10px; align-items: flex-start; margin: 0 16px 16px; padding: 12px 14px; border-radius: 14px; background: rgba(34, 197, 94, .12); color: #166534; font-size: .88rem; } .md-listo i { margin-top: 2px; font-size: 1.05rem; }
.md-error { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(239, 68, 68, .09); border: 1px solid rgba(239, 68, 68, .35); color: #b91c1c; font-weight: 600; }
.md-sub { margin: 0 0 8px; color: var(--color-text-muted); font-weight: 600; }
.md-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.md-op { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); color: var(--color-text); cursor: pointer; } .md-op:hover { border-color: #3b82f6; background: rgba(59, 130, 246, .07); }
.md-op i { color: #3b82f6; } .md-op span { display: flex; flex-direction: column; } .md-op small { color: var(--color-text-muted); }
@media (max-width: 640px) { .md-tiles { grid-template-columns: 1fr; } .md-btn-consultar { width: 100%; justify-content: center; } }.hrr-uptime { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.hrr-uptime > div { border: 1px solid var(--color-border); border-radius: 14px; padding: 8px 12px; background: rgba(148, 163, 184, .08); display: flex; flex-direction: column; }
.hrr-uptime small { color: var(--color-text-muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; } .hrr-uptime b { font-size: 1.15rem; color: var(--color-text); }
/* Clientes: los 4 botones de cada tarjeta son solo iconos (el texto sale al poner el puntero) y se reparten el ancho por igual */
.ct-ops .pg-btn.ct-icono { flex: 1 1 0; min-width: 0; justify-content: center; padding: 11px 0; font-size: 1.05rem; }

/* Herramientas del Mikrotik en modo oscuro: sus colores claros fijos dejaban texto claro sobre fondo claro */
:root[data-theme="dark"] .mkh-ayuda { background: rgba(255,255,255,.04); border-color: var(--color-border); }
:root[data-theme="dark"] .mkh-ayuda.azul { background: rgba(59,130,246,.12); }
:root[data-theme="dark"] .mkh-ayuda.verde { background: rgba(34,197,94,.12); }
:root[data-theme="dark"] .mkh-ayuda.morado { background: rgba(139,92,246,.14); }
:root[data-theme="dark"] .mkh-ayuda.cian { background: rgba(6,182,212,.12); }
:root[data-theme="dark"] .mkh-ayuda.ambar { background: rgba(245,158,11,.12); }
:root[data-theme="dark"] .mkh-ayuda.rojo { background: rgba(239,68,68,.12); }
:root[data-theme="dark"] .mkh-ayuda summary { color: var(--color-text); }
:root[data-theme="dark"] .mkh-ayuda-cuerpo p { color: var(--color-text); }
:root[data-theme="dark"] .mkh-pasos li { background: rgba(255,255,255,.07); color: var(--color-text); }
:root[data-theme="dark"] .mkh-sub, :root[data-theme="dark"] .mkh-card-txt small { color: var(--color-text-muted); }
:root[data-theme="dark"] .mkh-card:hover { border-color: rgba(129,140,248,.6); }
:root[data-theme="dark"] .mkh-card.rojo:hover { border-color: rgba(248,113,113,.6); }
:root[data-theme="dark"] .mkh-card.azul .mkh-card-ico, :root[data-theme="dark"] .mkh-tit-ico.azul { background: rgba(59,130,246,.22); color: #93c5fd; }
:root[data-theme="dark"] .mkh-card.verde .mkh-card-ico, :root[data-theme="dark"] .mkh-tit-ico.verde { background: rgba(34,197,94,.22); color: #86efac; }
:root[data-theme="dark"] .mkh-card.morado .mkh-card-ico, :root[data-theme="dark"] .mkh-tit-ico.morado { background: rgba(139,92,246,.24); color: #c4b5fd; }
:root[data-theme="dark"] .mkh-card.cian .mkh-card-ico, :root[data-theme="dark"] .mkh-tit-ico.cian { background: rgba(6,182,212,.22); color: #67e8f9; }
:root[data-theme="dark"] .mkh-card.ambar .mkh-card-ico, :root[data-theme="dark"] .mkh-tit-ico.ambar { background: rgba(245,158,11,.22); color: #fcd34d; }
:root[data-theme="dark"] .mkh-card.rojo .mkh-card-ico, :root[data-theme="dark"] .mkh-tit-ico.rojo { background: rgba(239,68,68,.22); color: #fca5a5; }
:root[data-theme="dark"] .mkh-atras { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
:root[data-theme="dark"] .mkh-atras:hover { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] .mkh-tab { color: var(--color-text-muted); background: rgba(255,255,255,.06); }
:root[data-theme="dark"] .mkh-tab i { color: var(--color-text-muted); }
:root[data-theme="dark"] .mkh-tab:hover { background: rgba(255,255,255,.13); color: var(--color-text); }
:root[data-theme="dark"] .mkh-tab:hover i { color: #a5b4fc; }
:root[data-theme="dark"] .mkh-tab.active, :root[data-theme="dark"] .mkh-tab.active i { color: #fff; }
:root[data-theme="dark"] .mkh-tabs-sep { background: var(--color-border); }
:root[data-theme="dark"] .mkh-filtro { background: rgba(255,255,255,.04); border-color: var(--color-border); }
:root[data-theme="dark"] .mkh-avanzado { border-color: var(--color-border); }
:root[data-theme="dark"] .mkh-avanzado summary { color: var(--color-text-muted); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mkh-ayuda { background: rgba(255,255,255,.04); border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkh-ayuda.azul { background: rgba(59,130,246,.12); }
    :root:not([data-theme="light"]) .mkh-ayuda.verde { background: rgba(34,197,94,.12); }
    :root:not([data-theme="light"]) .mkh-ayuda.morado { background: rgba(139,92,246,.14); }
    :root:not([data-theme="light"]) .mkh-ayuda.cian { background: rgba(6,182,212,.12); }
    :root:not([data-theme="light"]) .mkh-ayuda.ambar { background: rgba(245,158,11,.12); }
    :root:not([data-theme="light"]) .mkh-ayuda.rojo { background: rgba(239,68,68,.12); }
    :root:not([data-theme="light"]) .mkh-ayuda summary { color: var(--color-text); }
    :root:not([data-theme="light"]) .mkh-ayuda-cuerpo p { color: var(--color-text); }
    :root:not([data-theme="light"]) .mkh-pasos li { background: rgba(255,255,255,.07); color: var(--color-text); }
    :root:not([data-theme="light"]) .mkh-sub, :root:not([data-theme="light"]) .mkh-card-txt small { color: var(--color-text-muted); }
    :root:not([data-theme="light"]) .mkh-card:hover { border-color: rgba(129,140,248,.6); }
    :root:not([data-theme="light"]) .mkh-card.rojo:hover { border-color: rgba(248,113,113,.6); }
    :root:not([data-theme="light"]) .mkh-card.azul .mkh-card-ico, :root:not([data-theme="light"]) .mkh-tit-ico.azul { background: rgba(59,130,246,.22); color: #93c5fd; }
    :root:not([data-theme="light"]) .mkh-card.verde .mkh-card-ico, :root:not([data-theme="light"]) .mkh-tit-ico.verde { background: rgba(34,197,94,.22); color: #86efac; }
    :root:not([data-theme="light"]) .mkh-card.morado .mkh-card-ico, :root:not([data-theme="light"]) .mkh-tit-ico.morado { background: rgba(139,92,246,.24); color: #c4b5fd; }
    :root:not([data-theme="light"]) .mkh-card.cian .mkh-card-ico, :root:not([data-theme="light"]) .mkh-tit-ico.cian { background: rgba(6,182,212,.22); color: #67e8f9; }
    :root:not([data-theme="light"]) .mkh-card.ambar .mkh-card-ico, :root:not([data-theme="light"]) .mkh-tit-ico.ambar { background: rgba(245,158,11,.22); color: #fcd34d; }
    :root:not([data-theme="light"]) .mkh-card.rojo .mkh-card-ico, :root:not([data-theme="light"]) .mkh-tit-ico.rojo { background: rgba(239,68,68,.22); color: #fca5a5; }
    :root:not([data-theme="light"]) .mkh-atras { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkh-atras:hover { background: rgba(255,255,255,.08); }
    :root:not([data-theme="light"]) .mkh-tab { color: var(--color-text-muted); background: rgba(255,255,255,.06); }
    :root:not([data-theme="light"]) .mkh-tab i { color: var(--color-text-muted); }
    :root:not([data-theme="light"]) .mkh-tab:hover { background: rgba(255,255,255,.13); color: var(--color-text); }
    :root:not([data-theme="light"]) .mkh-tab:hover i { color: #a5b4fc; }
    :root:not([data-theme="light"]) .mkh-tab.active, :root:not([data-theme="light"]) .mkh-tab.active i { color: #fff; }
    :root:not([data-theme="light"]) .mkh-tabs-sep { background: var(--color-border); }
    :root:not([data-theme="light"]) .mkh-filtro { background: rgba(255,255,255,.04); border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkh-avanzado { border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkh-avanzado summary { color: var(--color-text-muted); }
}
:root[data-theme="dark"] .mkh-tab.active { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
:root[data-theme="dark"] .mkh-tab.rojo.active { background: linear-gradient(135deg, #ef4444, #dc2626); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mkh-tab.active { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
    :root:not([data-theme="light"]) .mkh-tab.rojo.active { background: linear-gradient(135deg, #ef4444, #dc2626); }
}

/* Fichas de colores con texto oscuro fijo: en modo oscuro quedaban ilegibles */
:root[data-theme="dark"] .ct-chip.ok { color: #86efac; }
:root[data-theme="dark"] .ct-chip.mal { color: #fcd34d; }
:root[data-theme="dark"] .ct-chip.sin { color: #cbd5e1; }
:root[data-theme="dark"] .ct-chip.cancel { color: #fca5a5; }
:root[data-theme="dark"] .ct-chip.favor { color: #6ee7b7; }
:root[data-theme="dark"] .ct-chip.portal { color: #a5b4fc; }
:root[data-theme="dark"] .cr-aviso { color: #fcd34d; }
:root[data-theme="dark"] .mkc-espera { background: rgba(255,255,255,.04); border-color: var(--color-border); color: var(--color-text-muted); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ct-chip.ok { color: #86efac; }
    :root:not([data-theme="light"]) .ct-chip.mal { color: #fcd34d; }
    :root:not([data-theme="light"]) .ct-chip.sin { color: #cbd5e1; }
    :root:not([data-theme="light"]) .ct-chip.cancel { color: #fca5a5; }
    :root:not([data-theme="light"]) .ct-chip.favor { color: #6ee7b7; }
    :root:not([data-theme="light"]) .ct-chip.portal { color: #a5b4fc; }
    :root:not([data-theme="light"]) .cr-aviso { color: #fcd34d; }
    :root:not([data-theme="light"]) .mkc-espera { background: rgba(255,255,255,.04); border-color: var(--color-border); color: var(--color-text-muted); }
}

/* Tarjetas de Mikrotiks en modo oscuro */
:root[data-theme="dark"] .mkc-linea { color: var(--color-text-muted); }
:root[data-theme="dark"] .mkc-res small, :root[data-theme="dark"] .mkc-cifras small, :root[data-theme="dark"] .mkc-live-cab span, :root[data-theme="dark"] .mkc-medidor label, :root[data-theme="dark"] .mkc-mini span { color: var(--color-text-muted); }
:root[data-theme="dark"] .mkc-res.indigo > span { background: rgba(99,102,241,.24); color: #a5b4fc; }
:root[data-theme="dark"] .mkc-res.verde > span, :root[data-theme="dark"] .mkc-cifras span.verde { background: rgba(34,197,94,.22); color: #86efac; }
:root[data-theme="dark"] .mkc-res.azul > span, :root[data-theme="dark"] .mkc-cifras span.azul { background: rgba(59,130,246,.22); color: #93c5fd; }
:root[data-theme="dark"] .mkc-cifras span.morado { background: rgba(139,92,246,.24); color: #c4b5fd; }
:root[data-theme="dark"] .mkc-vacio { border-color: var(--color-border); }
:root[data-theme="dark"] .mkc-vacio p { color: var(--color-text-muted); }
:root[data-theme="dark"] .mkc-chip { background: rgba(255,255,255,.07); color: var(--color-text); }
:root[data-theme="dark"] .mkc-chip.ambar { background: rgba(245,158,11,.18); color: #fcd34d; }
:root[data-theme="dark"] .mkc-chip.azul { background: rgba(59,130,246,.2); color: #93c5fd; }
:root[data-theme="dark"] .mkc-chip.verde { background: rgba(34,197,94,.18); color: #86efac; }
:root[data-theme="dark"] .mkc-cifras > div { background: rgba(255,255,255,.04); border-color: var(--color-border); }
:root[data-theme="dark"] .mkc-live { background: rgba(255,255,255,.03); border-color: var(--color-border); }
:root[data-theme="dark"] .mkc-barra { background: rgba(255,255,255,.1); }
:root[data-theme="dark"] .mkc-mini div { background: rgba(255,255,255,.04); border-color: var(--color-border); }
:root[data-theme="dark"] .mkc-acc { background: rgba(255,255,255,.02); border-top-color: var(--color-border); }
:root[data-theme="dark"] .mkc-btn { background: rgba(255,255,255,.07); border-color: var(--color-border); color: var(--color-text); }
:root[data-theme="dark"] .mkc-btn:hover { background: rgba(255,255,255,.14); }
:root[data-theme="dark"] .mkc-btn.peligro { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: #fca5a5; }
:root[data-theme="dark"] .mkc-btn.peligro:hover { background: rgba(239,68,68,.22); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mkc-linea { color: var(--color-text-muted); }
    :root:not([data-theme="light"]) .mkc-res small, :root:not([data-theme="light"]) .mkc-cifras small, :root:not([data-theme="light"]) .mkc-live-cab span, :root:not([data-theme="light"]) .mkc-medidor label, :root:not([data-theme="light"]) .mkc-mini span { color: var(--color-text-muted); }
    :root:not([data-theme="light"]) .mkc-res.indigo > span { background: rgba(99,102,241,.24); color: #a5b4fc; }
    :root:not([data-theme="light"]) .mkc-res.verde > span, :root:not([data-theme="light"]) .mkc-cifras span.verde { background: rgba(34,197,94,.22); color: #86efac; }
    :root:not([data-theme="light"]) .mkc-res.azul > span, :root:not([data-theme="light"]) .mkc-cifras span.azul { background: rgba(59,130,246,.22); color: #93c5fd; }
    :root:not([data-theme="light"]) .mkc-cifras span.morado { background: rgba(139,92,246,.24); color: #c4b5fd; }
    :root:not([data-theme="light"]) .mkc-vacio { border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkc-vacio p { color: var(--color-text-muted); }
    :root:not([data-theme="light"]) .mkc-chip { background: rgba(255,255,255,.07); color: var(--color-text); }
    :root:not([data-theme="light"]) .mkc-chip.ambar { background: rgba(245,158,11,.18); color: #fcd34d; }
    :root:not([data-theme="light"]) .mkc-chip.azul { background: rgba(59,130,246,.2); color: #93c5fd; }
    :root:not([data-theme="light"]) .mkc-chip.verde { background: rgba(34,197,94,.18); color: #86efac; }
    :root:not([data-theme="light"]) .mkc-cifras > div { background: rgba(255,255,255,.04); border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkc-live { background: rgba(255,255,255,.03); border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkc-barra { background: rgba(255,255,255,.1); }
    :root:not([data-theme="light"]) .mkc-mini div { background: rgba(255,255,255,.04); border-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkc-acc { background: rgba(255,255,255,.02); border-top-color: var(--color-border); }
    :root:not([data-theme="light"]) .mkc-btn { background: rgba(255,255,255,.07); border-color: var(--color-border); color: var(--color-text); }
    :root:not([data-theme="light"]) .mkc-btn:hover { background: rgba(255,255,255,.14); }
    :root:not([data-theme="light"]) .mkc-btn.peligro { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: #fca5a5; }
    :root:not([data-theme="light"]) .mkc-btn.peligro:hover { background: rgba(239,68,68,.22); }
}
:root[data-theme="dark"] .mkc-btn.primario { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
:root[data-theme="dark"] .mkc-btn.naranja { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mkc-btn.primario { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
    :root:not([data-theme="light"]) .mkc-btn.naranja { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
}
:root[data-theme="dark"] .mkc-btn.primario:hover { background: linear-gradient(135deg, #4338ca, #6d28d9); }
:root[data-theme="dark"] .mkc-cab .mkc-btn:not(.naranja) { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mkc-btn.primario:hover { background: linear-gradient(135deg, #4338ca, #6d28d9); }
    :root:not([data-theme="light"]) .mkc-cab .mkc-btn:not(.naranja) { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
}
.ini-usar { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; font-weight: 600; margin: 6px 0 0; cursor: pointer; }

/* Logo de la marca en modo oscuro: version oscura del SVG, o todo en blanco, segun lo elegido en Mi empresa */
.logo-oscuro { display: none; }
:root[data-theme="dark"] .logo-claro { display: none; }
:root[data-theme="dark"] .logo-oscuro { display: revert; }
:root[data-theme="dark"] .logo-blanco-oscuro { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .logo-claro { display: none; }
    :root:not([data-theme="light"]) .logo-oscuro { display: revert; }
    :root:not([data-theme="light"]) .logo-blanco-oscuro { filter: brightness(0) invert(1); }
}
.ini-modo { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.ini-modo label { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; flex: 1 1 260px; font-weight: 600; font-size: .9rem; }
.ini-modo label small { display: block; font-weight: 400; color: var(--color-text-muted); margin-top: 2px; }
.ini-modo label:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }
.ini-oscuro { margin-top: 14px; padding: 14px; border: 1px dashed var(--color-border); border-radius: 14px; }
.ini-oscuro > b { display: block; margin-bottom: 8px; }
.ini-oscuro label.ini-op { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: .9rem; font-weight: 600; cursor: pointer; }
.ini-oscuro label.ini-op small { display: block; font-weight: 400; color: var(--color-text-muted); }
.ini-prueba { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ini-prueba div { flex: 1 1 200px; min-height: 70px; border-radius: 12px; display: grid; place-items: center; padding: 10px; border: 1px solid var(--color-border); }
.ini-prueba .clara { background: #ffffff; } .ini-prueba .oscura { background: #0f172a; }
.ini-prueba img { max-width: 100%; max-height: 54px; }

.hm-ciclo { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 9px 13px; border-radius: 12px; background: var(--color-primary-soft); color: var(--color-text); text-decoration: none; font-size: .86rem; line-height: 1.35; }
.hm-ciclo i { color: var(--color-primary); }
.hm-ciclo:hover { color: var(--color-text); filter: brightness(1.05); }

a.gw-usuario { text-decoration: none; color: inherit; }
a.gw-usuario:hover { color: inherit; filter: brightness(1.08); }

.pl-logo { margin: 4px 0 14px; max-width: 230px; max-height: 96px; width: auto; height: auto; vertical-align: middle; }

/* Mapa: ventanitas (popups) en modo oscuro */
:root[data-theme="dark"] .leaflet-popup-content-wrapper, :root[data-theme="dark"] .leaflet-popup-tip { background: var(--color-surface, #1a1d2e); color: var(--color-text, #e2e8f0); }
:root[data-theme="dark"] .mp-pop { color: var(--color-text, #e2e8f0); } :root[data-theme="dark"] .mp-pop-sub { color: #94a3b8; }
:root[data-theme="dark"] .mp-pop-bt .pg-btn { color: var(--color-text, #e2e8f0); }
:root[data-theme="dark"] .mp-pop-bt .pg-btn.azul { color: #93c5fd; }
:root[data-theme="dark"] .leaflet-container a.leaflet-popup-close-button { color: #94a3b8; }

/* ===== Celular: cliente y servicio que no se descuadren ===== */
.kx5-content, .kx5-main { min-width: 0; max-width: 100%; }
.card, .pg-fila, .pg-fila-info, .sv-conexion, .sv-con-cab > * { min-width: 0; }
.card pre, .card code, .card .field span, .card .field-hint, .pg-fila-info b, .pg-fila-info small { overflow-wrap: anywhere; }
.card img, .card video, .card svg { max-width: 100%; }
@media (max-width: 700px) {
    html, body { overflow-x: hidden; }
    .kx5-content { padding-left: 12px; padding-right: 12px; }
    .card { padding: 14px; border-radius: 14px; }
    .card h2 { font-size: 1.05rem; }
    /* cabeceras con chip y boton: se acomodan en varias lineas */
    .sv-con-cab, .cf-hero, .card > .btn-row, .page-header, .card-cabecera { flex-wrap: wrap; gap: 8px; }
    .sv-con-cab .pg-btn, .sv-con-cab .btn { width: 100%; justify-content: center; }
    .btn-row > .btn, .btn-row > .pg-btn, .btn-row > a { flex: 1 1 auto; justify-content: center; }
    /* formularios a una columna */
    .form-grid, .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr !important; }
    .field input, .field select, .field textarea, .field .ui-cliente-picker { max-width: 100%; }
    /* tablas: se deslizan de lado dentro de su tarjeta en vez de ensanchar la pantalla */
    .card .np-tabla, .card table.table, .card table.tabla, .card .tabla-scroll { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    /* pestañas: una tira que se desliza */
    .ms-tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .ms-tabs::-webkit-scrollbar { display: none; }
    /* filas con icono + texto + botones */
    .pg-fila { flex-wrap: wrap; }
    .pg-fila .pg-acc { width: 100%; margin-left: 0; }
    .pg-fila .pg-acc .pg-btn, .pg-fila .pg-acc .pg-inline { flex: 1 1 45%; justify-content: center; }
    /* tarjetas de dato en dos columnas, sin pasarse */
    .stat-cards, .stat-cards.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cfs-det, .cfs-datos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .disp-barra .disp-estado { min-width: 0; flex: 1 1 100%; }
    .lk-panel { grid-template-columns: minmax(0, 1fr); }
    .lk-stats { flex-wrap: wrap; }
}
@media (max-width: 420px) {
    .stat-cards, .stat-cards.compact, .cfs-det, .cfs-datos { grid-template-columns: minmax(0, 1fr); }
    .wz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
