/* =====================================================================
   TEMA MODERNO — se carga después de tickets.css y se aplica a todas las pantallas
   ===================================================================== */
:root {
    --fondo: #f5f5f8;
    --tarjeta: #ffffff;
    --borde: #ececf1;
    --texto: #1f2330;
    --texto-suave: #6b7080;
    --radio: 16px;
    --radio-chico: 10px;
    --sombra: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
    --sombra-hover: 0 10px 30px rgba(16, 24, 40, .12);
    --anillo: 0 0 0 4px rgba(155, 28, 46, .14);
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--bordo-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Menú: fijo arriba con efecto vidrio ---------- */
.navbar-tickets {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient(90deg, rgba(61, 7, 16, .96), rgba(109, 15, 26, .94));
    backdrop-filter: saturate(160%) blur(10px);
    box-shadow: 0 4px 20px rgba(61, 7, 16, .25);
    padding: 10px 0;
}
.navbar-tickets .nav-link {
    border-radius: 10px;
    padding: 7px 12px !important;
    margin: 0 2px;
    color: rgba(255, 255, 255, .72);
    transition: background .15s, color .15s;
}
.navbar-tickets .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.navbar-tickets .nav-link.active { color: #fff; background: rgba(255, 255, 255, .16); border-bottom: 0; }

/* Menú principal: íconos, una sola línea y desplegables */
.menu-principal .nav-link { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 500; }
.menu-principal .nav-link i { font-size: 1rem; opacity: .85; }
.menu-principal .nav-link.active i { opacity: 1; }
.menu-principal .dropdown-toggle::after { margin-left: 2px; vertical-align: middle; border-top-width: .32em; }

.menu-desplegable {
    min-width: 280px; padding: 8px; margin-top: 10px !important;
    border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 16px 40px rgba(16, 24, 40, .18);
    animation: aparecer .18s ease both;
}
.menu-desplegable .dropdown-header { font-size: .66rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; color: #9aa0ad; padding: 8px 10px 4px; }
.menu-desplegable .dropdown-divider { margin: 6px 4px; border-color: var(--borde); }
.item-menu { display: flex !important; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--texto); white-space: normal; }
.item-menu:hover, .item-menu:focus { background: #f6f6f9; color: var(--texto); }
.item-menu.active, .item-menu:active { background: #fbeef0; color: var(--bordo); }
.item-menu-icono {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f3f3f6; color: var(--bordo); font-size: 1rem;
}
.item-menu.active .item-menu-icono { background: var(--bordo); color: #fff; }
.item-menu-detalle { display: block; color: var(--texto-suave); font-size: .76rem; line-height: 1.2; }
.item-salir { color: #b42332; }
.item-salir .item-menu-icono { background: #fde4e6; color: #b42332; }
.item-salir:hover { background: #fdf0f1; color: #b42332; }

/* Botón del usuario (foto + nombre + flecha) */
button.menu-perfil { border: 0; background: transparent; cursor: pointer; }
.menu-perfil-nombre { font-size: .9rem; font-weight: 600; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.menu-perfil-flecha { font-size: .7rem; opacity: .7; transition: transform .2s; }
.menu-perfil[aria-expanded="true"] .menu-perfil-flecha { transform: rotate(180deg); }
.menu-usuario { min-width: 290px; }
.menu-usuario-cabecera { display: flex; align-items: center; gap: 12px; padding: 8px 10px 6px; }
.menu-usuario-cabecera strong { display: block; line-height: 1.2; }
.menu-usuario-cabecera small { display: block; color: var(--texto-suave); font-size: .78rem; }
.avatar-40 { width: 40px; height: 40px; font-size: .9rem; }

/* Celular / tablet: menú vertical cómodo de tocar */
@media (max-width: 991px) {
    .menu-principal { padding-top: 10px; }
    .menu-principal .nav-link { padding: 10px 12px !important; }
    .menu-desplegable { box-shadow: none; border: 0; background: rgba(255, 255, 255, .06); margin-top: 4px !important; }
    .menu-desplegable .dropdown-header { color: rgba(255, 255, 255, .5); }
    .menu-principal .item-menu { color: #fff; }
    .menu-principal .item-menu:hover, .menu-principal .item-menu.active { background: rgba(255, 255, 255, .1); color: #fff; }
    .menu-principal .item-menu-detalle { color: rgba(255, 255, 255, .55); }
    .menu-principal .item-menu-icono { background: rgba(255, 255, 255, .1); color: #ffccd3; }
    .usuario-menu { flex-direction: row !important; align-items: center !important; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 8px; }
}

/* ---------- Títulos de página ---------- */
.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.page-title::before {
    content: "";
    width: 6px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--bordo-light), var(--bordo));
    flex-shrink: 0;
}
.page-title.mb-0, .page-title.mb-1 { margin-bottom: 0; }
.encabezado-pagina { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.encabezado-pagina .page-title { margin-bottom: 0; }
.subtitulo { color: var(--texto-suave); font-size: .95rem; margin: 4px 0 0 18px; }

/* ---------- Tarjetas ---------- */
.panel-box, .auth-card, .stat-card, .mensaje {
    background: var(--tarjeta);
    border-radius: var(--radio);
    border: 1px solid var(--borde);
    box-shadow: var(--sombra);
}
.panel-box { padding: 22px 24px; }
.panel-box h2.h5, .panel-box h2.h6 { font-weight: 700; }
.auth-card { padding: 36px; border-top: 0; position: relative; overflow: hidden; }
.auth-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--bordo-dark), var(--bordo-light), #e0566b);
}
.auth-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.3px; }
.stat-card { border-left: 0; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--bordo); }
.stat-card.stat-critico::before { background: #dc3545; }
a.stat-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }

.form-section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: .72rem; letter-spacing: 1.2px; margin: 22px 0 10px;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--borde); }

/* ---------- Formularios ---------- */
.form-control, .form-select {
    border-radius: var(--radio-chico);
    border-color: #e1e2e8;
    background-color: #fbfbfd;
    padding-top: .55rem;
    padding-bottom: .55rem;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-control-sm, .form-select-sm { padding-top: .38rem; padding-bottom: .38rem; border-radius: 9px; }
.form-control:hover, .form-select:hover { border-color: #cfd1da; }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: var(--bordo-light); box-shadow: var(--anillo); }
.form-label { font-weight: 600; font-size: .88rem; color: #3b3f4c; }
.form-label.small { font-size: .8rem; }
.form-check-input:checked { background-color: var(--bordo); border-color: var(--bordo); }
.form-check-input:focus { box-shadow: var(--anillo); border-color: var(--bordo-light); }

/* ---------- Botones ---------- */
.btn { border-radius: var(--radio-chico); font-weight: 600; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-bordo {
    background: linear-gradient(135deg, var(--bordo), var(--bordo-light));
    border: 0;
    box-shadow: 0 4px 12px rgba(109, 15, 26, .25);
}
.btn-bordo:hover, .btn-bordo:focus { background: linear-gradient(135deg, #7d1220, #b0213a); box-shadow: 0 6px 18px rgba(109, 15, 26, .35); }
.btn-outline-secondary { border-color: #dcdde3; color: #3b3f4c; background: #fff; }
.btn-outline-secondary:hover { background: #f3f3f6; border-color: #cfd1da; color: #1f2330; }
.btn-secondary { background: #eceef2; border-color: #eceef2; color: #3b3f4c; }
.btn-secondary:hover { background: #e1e3e9; border-color: #e1e3e9; color: #1f2330; }
.btn-sm { border-radius: 8px; }

/* ---------- Pestañas tipo segmento ---------- */
.nav-pills {
    display: inline-flex; flex-wrap: wrap; gap: 4px;
    background: #ebebf0; padding: 4px; border-radius: 12px;
}
.nav-pills .nav-link { color: #4a4f5c; border-radius: 9px; padding: 7px 14px; font-weight: 600; font-size: .9rem; }
.nav-pills .nav-link:hover { background: rgba(255, 255, 255, .6); }
.nav-pills .nav-link.active { background: #fff; color: var(--bordo); box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }
.nav-pills .nav-link .badge { background: #dcdce3 !important; color: #4a4f5c !important; }
.nav-pills .nav-link.active .badge { background: var(--bordo) !important; color: #fff !important; }

/* ---------- Tablas ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .8px;
    color: var(--texto-suave); font-weight: 700;
    border-bottom: 1px solid var(--borde); padding-top: 10px; padding-bottom: 10px;
}
.table > tbody > tr > td { border-bottom-color: #f1f1f5; padding-top: 12px; padding-bottom: 12px; }
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #faf6f7; }

/* ---------- Etiquetas en colores suaves ---------- */
.badge { font-weight: 600; border-radius: 20px; padding: .38em .75em; letter-spacing: .2px; }
.badge.text-bg-primary   { background: #e3edff !important; color: #1d4ed8 !important; }
.badge.text-bg-info      { background: #dff6fb !important; color: #0e7490 !important; }
.badge.text-bg-warning   { background: #fff3d1 !important; color: #92600a !important; }
.badge.text-bg-success   { background: #def7e8 !important; color: #15803d !important; }
.badge.text-bg-secondary { background: #eceef2 !important; color: #4b5060 !important; }
.badge.text-bg-danger    { background: #fde4e6 !important; color: #b42332 !important; }
.badge.text-bg-dark      { background: #f3e5e8 !important; color: var(--bordo) !important; }
.badge.text-bg-light     { background: #fff !important; color: #4b5060 !important; }
.widget-badge { background: #dc3545 !important; color: #fff !important; }

/* ---------- Avisos ---------- */
.alert { border-radius: 12px; border: 0; border-left: 4px solid; box-shadow: var(--sombra); }
.alert-success { background: #ecfbf2; color: #146c3b; border-left-color: #22c55e; }
.alert-danger  { background: #fdeef0; color: #a11d2c; border-left-color: #ef4444; }
.alert-warning { background: #fff8e6; color: #7a5300; border-left-color: #f59e0b; }
.alert-info    { background: #eaf6ff; color: #0b5687; border-left-color: #0ea5e9; }
.alert-secondary { background: #f1f2f5; color: #4b5060; border-left-color: #9ca3af; }

/* ---------- Conversación ---------- */
.mensaje { border-left: 4px solid #d6d8de; padding: 18px 20px; }
.mensaje-soporte { border-left-color: var(--bordo); }
.mensaje-interno { background: #fffbf2; border-left-color: #f59e0b; }

/* ---------- Estados vacíos ---------- */
.estado-vacio { text-align: center; padding: 36px 16px; color: var(--texto-suave); }
.estado-vacio-icono {
    width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--bordo);
    background: linear-gradient(135deg, #fbeef0, #f6e1e5);
}
.estado-vacio h3 { font-size: 1.05rem; font-weight: 700; color: var(--texto); margin-bottom: 4px; }
.estado-vacio p { margin-bottom: 14px; }

/* ---------- Listado de tickets ---------- */
.barra-filtros { padding: 16px 18px; }
.barra-filtros .form-label { margin-bottom: 4px; }
.buscador { position: relative; }
.buscador .bi-search { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9aa0ad; pointer-events: none; }
.buscador .form-control { padding-left: 36px; }

.lista-tickets .fila-ticket > td:first-child { border-left: 4px solid transparent; }
.lista-tickets .prio-critica > td:first-child { border-left-color: #ef4444; }
.lista-tickets .prio-alta > td:first-child { border-left-color: #f59e0b; }
.lista-tickets .prio-media > td:first-child { border-left-color: #38bdf8; }
.lista-tickets .prio-baja > td:first-child { border-left-color: #cbd5e1; }
.codigo-ticket {
    font-family: Consolas, "Courier New", monospace; font-size: .8rem; font-weight: 700;
    background: #f3f3f6; color: #3b3f4c; padding: 3px 8px; border-radius: 6px; text-decoration: none; white-space: nowrap;
}
.codigo-ticket:hover { background: var(--bordo); color: #fff; }
.asunto-ticket { font-weight: 600; color: var(--texto); text-decoration: none; }
.asunto-ticket:hover { color: var(--bordo); }
.tecnico-mini { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .88rem; }
.tiempo { color: var(--texto-suave); font-size: .82rem; white-space: nowrap; }
.avatar-24 { width: 24px; height: 24px; font-size: .62rem; }

/* ---------- Pie ---------- */
.footer-tickets { background: transparent; color: #9aa0ad; border-top: 1px solid var(--borde); }
.footer-tickets a { color: var(--bordo-light); }

/* ---------- KPIs (tarjetas de indicadores) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.kpi {
    --k1: var(--bordo); --k2: var(--bordo-light);
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: 14px;
    background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio);
    box-shadow: var(--sombra); padding: 18px 20px;
    transition: transform .2s, box-shadow .2s;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
/* Halo de color en la esquina */
.kpi::after {
    content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%;
    background: radial-gradient(circle, var(--k2) 0%, transparent 70%); opacity: .13; pointer-events: none;
}
.kpi-icono {
    width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
    background: linear-gradient(135deg, var(--k1), var(--k2));
    box-shadow: 0 6px 14px color-mix(in srgb, var(--k1) 30%, transparent);
}
.kpi-cuerpo { min-width: 0; flex: 1; }
.kpi-etiqueta { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--texto-suave); }
.kpi-numero { font-size: 1.9rem; font-weight: 800; line-height: 1.15; color: var(--texto); margin: 2px 0 6px; letter-spacing: -.5px; }
.kpi-numero small { font-size: .85rem; font-weight: 600; color: var(--texto-suave); letter-spacing: 0; }
.kpi-extra { font-size: .8rem; color: var(--texto-suave); }
.kpi-extra i { color: var(--k1); }
.kpi-progreso { height: 7px; border-radius: 5px; background: #eeeef3; overflow: hidden; margin-top: 8px; }
.kpi-progreso span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--k1), var(--k2)); }
.kpi-progreso span.vacio { opacity: 0; }

.kpi-bordo { --k1: #6d0f1a; --k2: #c2283d; }
.kpi-ambar { --k1: #b45309; --k2: #f59e0b; }
.kpi-azul  { --k1: #1d4ed8; --k2: #60a5fa; }
.kpi-verde { --k1: #15803d; --k2: #4ade80; }
.kpi-violeta { --k1: #6d28d9; --k2: #a78bfa; }
.kpi-rojo  { --k1: #b91c1c; --k2: #f87171; }

/* Selector de mes: botón deshabilitado más sutil */
.selector-mes .btn.disabled { opacity: .35; }

/* ---------- Tareas (bitácora mensual) ---------- */
.selector-mes { display: flex; align-items: center; gap: 8px; }
.mes-actual {
    min-width: 170px; text-align: center; font-weight: 700;
    background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-chico);
    padding: 7px 14px; box-shadow: var(--sombra);
}
.mes-actual i { color: var(--bordo); }

.segmento { display: flex; background: #ebebf0; padding: 4px; border-radius: 12px; gap: 4px; }
.segmento label {
    flex: 1; text-align: center; cursor: pointer; padding: 7px 6px; border-radius: 9px;
    font-size: .85rem; font-weight: 600; color: #4a4f5c; white-space: nowrap;
}
.segmento label:hover { background: rgba(255, 255, 255, .6); }
.segmento .btn-check:checked + label { background: #fff; color: var(--bordo); box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }
.segmento .btn-check:focus-visible + label { outline: 2px solid var(--bordo-light); }

@media (min-width: 992px) { .form-tarea { position: sticky; top: 90px; } }

.dia-tareas + .dia-tareas { margin-top: 18px; }
.dia-cabecera {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--borde);
}
.dia-numero {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bordo), var(--bordo-light)); color: #fff; font-size: .95rem;
}
.tarea { padding: 12px 14px; border-radius: 12px; background: #fafafc; border: 1px solid #f0f0f4; margin-bottom: 8px; }
.tarea:hover { border-color: #e4e4ea; background: #fff; }
.tarea-cabecera { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.tarea-texto { color: #2b2f3a; font-size: .95rem; overflow-wrap: anywhere; }

.fila-tecnico {
    display: flex; align-items: center; gap: 10px; padding: 10px 8px;
    border-radius: 10px; color: var(--texto); text-decoration: none;
}
.fila-tecnico:hover { background: #faf6f7; color: var(--texto); }
.fila-tecnico + .fila-tecnico { border-top: 1px solid #f1f1f5; }

.fila-resumen { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-top: 10px; }
.fila-resumen .text-truncate { flex: 1; min-width: 0; }
.barra-mini { height: 6px; border-radius: 4px; background: #f0f0f4; overflow: hidden; margin-top: 4px; }
.barra-mini span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--bordo), var(--bordo-light)); }

/* ---------- Animación suave al cargar ---------- */
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
    main > * { animation: aparecer .35s ease both; }
}

/* Ícono chico de dispositivo en listas */
.red-icono-chico { width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; }

/* Acceso remoto: opciones en varias filas si no entran; contraseña compacta en el inventario */
.segmento-acceso { flex-wrap: wrap; }
.segmento-acceso label { flex: 1 1 auto; }
.clave-inline { max-width: 220px; }
.clave-inline .form-control { background: #fff; }

/* Inventario: contraseña compacta en la tabla */
.tabla-inventario .clave-inline { width: 190px; flex-wrap: nowrap; }

/* Mantenimiento / acciones peligrosas */
.icono-peligro { --k1: #b91c1c; --k2: #f87171; }
.zona-mantenimiento {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-radius: var(--radio); border: 1px dashed #f1c2c7; background: #fffafa;
}

/* KPIs: colores extra, tarjetas que son enlaces y grilla de 6 */
.kpi-celeste { --k1: #0e7490; --k2: #22d3ee; }
.kpi-gris { --k1: #4b5563; --k2: #9ca3af; }
a.kpi { color: var(--texto); text-decoration: none; }
a.kpi:hover { color: var(--texto); }
a.kpi:hover .kpi-numero { color: var(--k1); }
@media (min-width: 1200px) { .kpis-6 { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 768px) and (max-width: 1199px) { .kpis-6 { grid-template-columns: repeat(3, 1fr); } }
.kpis-6 .kpi { flex-direction: column; gap: 10px; }
.kpi-alerta { border-color: #fecaca; }
.kpi-alerta .kpi-numero { color: #b91c1c; }
.kpi-alerta .kpi-icono { animation: latido 1.8s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .kpi-alerta .kpi-icono { animation: none; } }

/* ---------- Campanita de notificaciones ---------- */
.btn-campana {
    position: relative;
    width: 40px; height: 40px; border-radius: 12px; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.15rem;
    transition: background .15s;
}
.btn-campana:hover, .btn-campana[aria-expanded="true"] { background: rgba(255, 255, 255, .18); }
.btn-campana.con-avisos i { animation: campaneo 2.5s ease-in-out 1; transform-origin: top center; }
@keyframes campaneo { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) { .btn-campana.con-avisos i { animation: none; } }
.campana-numero {
    position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--bordo);
}

.panel-campana {
    width: 380px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden;
    border: 1px solid var(--borde); border-radius: 16px; box-shadow: 0 16px 40px rgba(16, 24, 40, .18);
}
.panel-campana { max-height: 75vh; overflow-y: auto; }
.campana-cabecera {
    position: sticky; top: 0; z-index: 1;
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--borde);
}
.campana-cabecera .btn-link { font-size: .8rem; text-decoration: none; }
.campana-seccion {
    padding: 10px 16px 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: 1px;
    font-weight: 700; color: var(--texto-suave);
}
.campana-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px;
    color: var(--texto); text-decoration: none; position: relative;
}
.campana-item:hover { background: #f7f7fa; color: var(--texto); }
.campana-item.no-leida { background: #fdf4f5; }
.campana-item.no-leida:hover { background: #fbeaed; }
.campana-icono {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.campana-texto { display: flex; flex-direction: column; min-width: 0; font-size: .86rem; line-height: 1.3; }
.campana-texto strong { font-weight: 600; }
.campana-item.no-leida .campana-texto strong { font-weight: 800; }
.campana-detalle { color: var(--texto-suave); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campana-tiempo { color: #9aa0ad; font-size: .74rem; margin-top: 2px; }
.punto-no-leida { position: absolute; right: 14px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--bordo-light); }
.campana-vacio { padding: 14px 16px; color: var(--texto-suave); font-size: .86rem; }
.campana-pie {
    display: block; text-align: center; padding: 12px; font-size: .85rem; font-weight: 600;
    border-top: 1px solid var(--borde); text-decoration: none; background: #fafafc;
}
.campana-pie:hover { background: #f3f3f6; }

/* Tonos de los íconos */
.tono-azul    { background: #e3edff; color: #1d4ed8; }
.tono-celeste { background: #dff6fb; color: #0e7490; }
.tono-ambar   { background: #fff3d1; color: #92600a; }
.tono-verde   { background: #def7e8; color: #15803d; }
.tono-violeta { background: #ede9fe; color: #6d28d9; }
.tono-gris    { background: #eceef2; color: #4b5060; }
.tono-rojo    { background: #fde4e6; color: #b42332; }
.tono-bordo   { background: #f6e1e5; color: var(--bordo); }

/* Página de notificaciones */
.notif-fila { display: flex; align-items: center; border-bottom: 1px solid #f1f1f5; }
.notif-fila:last-child { border-bottom: 0; }
.notif-fila.no-leida { background: #fdf4f5; }
.notif-fila .campana-item { background: transparent; }
.notif-fila .campana-detalle { white-space: normal; }

/* Número automático de tarea (TT0001) */
.numero-tarea {
    display: flex; align-items: center; gap: 2px; height: calc(100% - 26px); min-height: 42px;
    padding: 0 12px; border-radius: var(--radio-chico); border: 1px dashed #d6d8de;
    background: #f3f3f6; font-family: Consolas, "Courier New", monospace; font-weight: 700; color: var(--bordo);
}
.numero-tarea i { color: #9aa0ad; }
.codigo-tarea {
    font-family: Consolas, "Courier New", monospace; font-size: .78rem; font-weight: 700;
    background: #f6e1e5; color: var(--bordo); padding: 3px 8px; border-radius: 6px;
}

/* Botón chico de eliminar en listas */
.btn-eliminar-fila { margin-left: 6px; color: #c0c4cc; font-size: .85rem; text-decoration: none; }
.btn-eliminar-fila:hover { color: #dc3545; }

/* ---------- Noticias (panel) ---------- */
.grilla-noticias { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tarjeta-noticia {
    display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--texto);
    background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra);
    transition: transform .2s, box-shadow .2s;
}
.tarjeta-noticia:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); color: var(--texto); }
.tarjeta-noticia-imagen {
    position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #f3e5e8, #fbeef0);
    display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--bordo);
}
.tarjeta-noticia-imagen img { width: 100%; height: 100%; object-fit: cover; }
.estado-noticia { position: absolute; top: 10px; left: 10px; }
.tarjeta-noticia-cuerpo { padding: 14px 16px 16px; }

.galeria-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.galeria-item { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #f3f3f6; border: 2px solid transparent; }
.galeria-item.es-portada { border-color: var(--bordo-light); }
.galeria-item.nueva { border: 2px dashed #cfd1da; }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; }
.etiqueta-portada { position: absolute; left: 6px; bottom: 6px; font-size: .68rem; }
.galeria-acciones { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.galeria-item:hover .galeria-acciones, .galeria-item:focus-within .galeria-acciones { opacity: 1; }
@media (hover: none) { .galeria-acciones { opacity: 1; } }

.zona-subida {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px;
    border: 2px dashed #d6d8de; border-radius: 14px; background: #fafafc; text-align: center; cursor: pointer;
    transition: border-color .2s, background .2s;
}
.zona-subida i { font-size: 2rem; color: var(--bordo); }
.zona-subida:hover, .zona-subida.arrastrando { border-color: var(--bordo-light); background: #fdf4f5; }
.zona-subida input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.btn-instagram {
    color: #fff; border: 0;
    background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
    box-shadow: 0 4px 14px rgba(220, 39, 67, .3);
}
.btn-instagram:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 6px 18px rgba(220, 39, 67, .4); }
.text-instagram { color: #dc2743; }

.paso-ig { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 12px; }
.paso-ig span {
    width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: .85rem; background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
}
.ig-imagenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ig-recorte { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; margin-bottom: 6px; background: #f3f3f6; }
.ig-recorte img { width: 100%; height: 100%; object-fit: cover; }
.texto-ig { font-size: .9rem; background: #fff !important; }

.ig-previa { border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; background: #fff; max-width: 340px; margin: 0 auto; }
.ig-previa-cabecera { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: .85rem; }
.ig-avatar {
    width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .75rem; background: var(--bordo);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc2743;
}
.ig-previa-imagen { aspect-ratio: 4 / 5; background: #f3f3f6; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #c0c4cc; }
.ig-previa-imagen img { width: 100%; height: 100%; object-fit: cover; }
.ig-previa-iconos { display: flex; gap: 14px; padding: 10px 12px 4px; font-size: 1.2rem; }
.ig-previa-texto { padding: 0 12px 12px; font-size: .85rem; }

/* ---------- Presupuestos ---------- */
.tabla-items { min-width: 820px; }
.tabla-items th { font-weight: 600; border-bottom-width: 1px; white-space: nowrap; }
.tabla-items td { padding: 6px 4px; }
.tabla-items .col-desc { min-width: 240px; }
.tabla-items .col-num { width: 80px; }
.tabla-items .col-dinero { width: 120px; }
.tabla-items .col-margen { width: 100px; }
.tabla-items .col-iva { width: 95px; }
.tabla-items .i-precio { color: var(--texto-suave); font-size: .9rem; }
.columna-fija { position: sticky; top: 84px; }
.etiqueta-cot { flex: 1 1 auto; font-size: .82rem; }
.fila-cotizacion .i-cot { max-width: 120px; }
.totales-presupuesto dl > div, .totales-presupuesto #t-iva-lineas > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.totales-presupuesto dt { font-weight: 500; color: var(--texto-suave); }
.totales-presupuesto dd { margin: 0; font-weight: 600; text-align: right; }
.totales-presupuesto .t-total { border-top: 2px solid rgba(109, 15, 26, .25); margin-top: 4px; padding-top: 8px; font-size: 1.15rem; }
.totales-presupuesto .t-total dt, .totales-presupuesto .t-total dd { color: #6d0f1a; font-weight: 700; }
.totales-presupuesto .t-conversion dd { color: var(--texto-suave); }
.totales-presupuesto .t-interno { border-top: 1px dashed rgba(0, 0, 0, .12); font-size: .9rem; }
.totales-presupuesto .t-interno:first-of-type, .totales-presupuesto .t-conversion + .t-interno { margin-top: 6px; }
@media (max-width: 1199px) { .columna-fija { position: static; } }
.page-title .badge { font-size: .8rem; vertical-align: middle; font-weight: 600; }

/* ---------- Verificación en dos pasos ---------- */
.icono-2fa { display: inline-flex; width: 56px; height: 56px; border-radius: 16px; align-items: center; justify-content: center; font-size: 1.7rem; color: #fff; background: linear-gradient(135deg, #6d0f1a, #b0213a); box-shadow: 0 8px 20px rgba(109, 15, 26, .3); }
.codigo-2fa { letter-spacing: .4em; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.qr-2fa { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--borde); border-radius: 12px; }
.qr-2fa img { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
.clave-2fa { font-size: .95rem; letter-spacing: 1px; word-break: break-all; }
.codigos-respaldo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.codigos-respaldo code { background: #fff; border: 1px dashed #c9a227; border-radius: 6px; padding: 4px 8px; text-align: center; font-size: .95rem; color: #333; }

/* ---------- Avisos al celular ---------- */
.lista-dispositivos li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--borde); }

/* ---------- Encuesta de satisfacción ---------- */
.estrellas-ver { color: #f5a524; white-space: nowrap; }
.estrellas-ver .bi-star { color: #d6d6dc; }
.estrellas-elegir { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.estrellas-elegir input { position: absolute; opacity: 0; pointer-events: none; }
.estrellas-elegir label { font-size: 2rem; color: #d6d6dc; cursor: pointer; transition: transform .1s, color .1s; line-height: 1; }
.estrellas-elegir label:hover, .estrellas-elegir label:hover ~ label, .estrellas-elegir input:checked ~ label { color: #f5a524; }
.estrellas-elegir label:hover { transform: scale(1.15); }
.estrellas-elegir input:focus-visible + label { outline: 2px solid #6d0f1a; outline-offset: 2px; border-radius: 4px; }
.encuesta { border-left: 4px solid #f5a524; }
.calificacion-hecha { border-left: 4px solid #f5a524; }
.satisfaccion-total { text-align: center; padding: 10px; border-radius: 14px; background: #fff8e8; }
.satisfaccion-numero { font-size: 3rem; font-weight: 800; color: #b7791f; line-height: 1; }
.lista-calificaciones li { padding: 6px 0; border-top: 1px dashed var(--borde); }

/* ---------- Demoras y respaldo ---------- */
.etiqueta-sla { width: 90px; justify-content: center; background: #fff; }
.chips-conteo { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-conteo span { font-size: .8rem; padding: 4px 10px; border-radius: 20px; background: #f4f4f6; color: #555; }
.lista-respaldos li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--borde); }

/* ---------- Estado del sistema ---------- */
.lista-chequeos li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--borde); }
.lista-chequeos li:first-child { border-top: 0; }
.lista-chequeos > li > .bi { font-size: 1.1rem; margin-top: 1px; }
.lista-chequeos .solucion { margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: #fff8e6; color: #6b4d00; }
.log-smtp { max-height: 260px; overflow: auto; background: #1e1e24; color: #d4f7d4; padding: 10px; border-radius: 8px; font-size: .75rem; white-space: pre-wrap; margin-top: 8px; }

/* ---------- Ajuste de la foto de perfil ---------- */
.editor-foto canvas { width: 220px; height: 220px; border-radius: 14px; background: #2b2b30; cursor: grab; touch-action: none; display: block; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.editor-foto canvas:active { cursor: grabbing; }
.editor-foto-controles { display: flex; align-items: center; gap: 8px; width: 220px; margin: 10px 0 6px; color: var(--texto-suave); }
