/* --- PALETA CORPORATIVA: INDUSTRIAL SLATE & EMERALD (DM SoftWorks) --- */
:root {
    --bg-sidebar: #111827;          /* Grafito profundo */
    --bg-sidebar-accent: #1f2937;   /* Gris pizarra oscuro */
    --text-sidebar: #9ca3af;
    --text-sidebar-hover: #f9fafb;
    --bg-main: #f3f4f6;             /* Gris técnico claro */
    --primary-color: #0d9488;       /* Verde Petróleo / Teal Industrial */
    --primary-hover: #0f766e;
    --accent-gold: #d97706;         /* Ámbar corporativo para edición/alertas */
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: #1f2937;
}

/* --- BARRA LATERAL (SIDEBAR) --- */
.sidebar {
    width: 265px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.brand-badge {
    display: inline-block;
    background: rgba(13, 148, 136, 0.2);
    color: #2dd4bf;
    border: 1px solid #0d9488;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sidebar-header h2 {
    font-size: 1.05rem;
    color: white;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    flex-grow: 1;
    padding: 18px;
    overflow-y: auto;
}

.menu-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #6b7280;
    letter-spacing: 0.8px;
}

.menu-btn {
    width: 100%;
    background: transparent;
    color: var(--text-sidebar);
    border: 1px solid transparent;
    padding: 11px 14px;
    margin-bottom: 6px;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.menu-btn i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu-btn:hover {
    background-color: var(--bg-sidebar-accent);
    color: var(--text-sidebar-hover);
}

.menu-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #0b0f19;
}

.branding {
    text-align: center;
    margin-bottom: 12px;
    color: #9ca3af;
    font-size: 0.78rem;
}

.branding strong {
    color: #2dd4bf;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.logout-btn {
    width: 100%;
    background: transparent;
    color: var(--text-sidebar);
    border: 1px solid var(--border-color);
    padding: 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
}

.logout-btn:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* --- CONTENIDO PRINCIPAL Y MEMBRETE DEL CLIENTE --- */
.main-content {
    flex-grow: 1;
    padding: 25px 30px;
    width: calc(100% - 265px);
    overflow-y: auto;
}

.client-header {
    background: white;
    border-radius: 8px;
    padding: 15px 22px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary-color);
    flex-wrap: wrap;
    gap: 15px;
}

.client-info-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 3px;
    background: #fff;
}

.client-logo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    background: #f0fdfa;
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.client-texts h1 {
    font-size: 1.2rem;
    color: #111827;
    font-weight: 800;
}

.client-texts p {
    font-size: 0.88rem;
    color: #4b5563;
    font-weight: 600;
}

.client-meta {
    text-align: right;
    font-size: 0.78rem;
    color: #6b7280;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: var(--bg-sidebar);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1001;
}

/* --- TARJETAS Y FORMULARIOS --- */
.header-seccion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 10px;
}

.header-seccion h2 {
    font-size: 1.35rem;
    color: #111827;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.card h3 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
}

.form-group input, .form-group select {
    padding: 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
}

.form-group input[readonly], .form-group input:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* --- SELECTOR MULTI-TÉCNICO (CHIPS) --- */
.multi-tech-box {
    grid-column: 1 / -1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 6px;
}

.multi-tech-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.multi-tech-controls select {
    flex-grow: 1;
    min-width: 220px;
    padding: 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.tech-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 32px;
    align-items: center;
}

.tech-chip {
    background-color: #ccfbf1;
    color: #115e59;
    border: 1px solid #99f6e4;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tech-chip button {
    background: none;
    border: none;
    color: #0f766e;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.tech-chip button:hover {
    color: #dc2626;
}

/* --- BARRA DE FILTROS --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.filter-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- BOTONES --- */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s;
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #4b5563;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    height: 38px;
}

.btn-secondary:hover {
    background-color: #374151;
}

.btn-small {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 9px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-edit-ot {
    background-color: #f59e0b;
    color: white;
    border: none;
    padding: 6px 9px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-edit-ot:hover {
    background-color: #d97706;
}

.btn-update {
    background-color: #0284c7;
    color: white;
    border: none;
    padding: 6px 9px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 6px 9px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-group {
    display: flex;
    gap: 4px;
}

/* --- TABLAS --- */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
    font-size: 0.86rem;
}

.table th, .table td {
    padding: 10px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table th {
    background-color: #f9fafb;
    font-size: 0.78rem;
    color: #4b5563;
    text-transform: uppercase;
    font-weight: 700;
}

.table tbody tr:hover {
    background-color: #f0fdfa;
}

/* --- ETIQUETAS (BADGES) --- */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-align: center;
    display: inline-block;
    min-width: 72px;
}

.badge-alta { background-color: #dc2626; }
.badge-media { background-color: #d97706; }
.badge-baja { background-color: #059669; }

.badge-espera { background-color: #6b7280; }
.badge-iniciada { background-color: #2563eb; }
.badge-culminada { background-color: #0d9488; }

.tech-mini-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    margin: 2px 2px 2px 0;
}

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content {
        width: 100%;
        padding: 60px 15px 20px 15px;
    }
    .client-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .client-meta {
        text-align: left;
    }
}
/* =========================================================
   ETAPA 3: ESTILOS DE CALENDARIOS (DIARIO, SEMANAL, MENSUAL)
   ========================================================= */

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 18px;
}

.cal-nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cal-title-badge {
    background: #111827;
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    min-width: 210px;
    text-align: center;
}

/* --- MATRIZ SEMANAL --- */
.weekly-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
    table-layout: fixed;
}

.weekly-table th, .weekly-table td {
    border: 1px solid #e5e7eb;
    padding: 8px;
    vertical-align: top;
}

.weekly-table thead th {
    background-color: #1f2937;
    color: #ffffff;
    text-align: center;
    font-size: 0.8rem;
    padding: 10px 6px;
}

.weekly-table thead th.col-tecnico {
    width: 170px;
    background-color: #111827;
    text-align: left;
    padding-left: 12px;
}

.weekly-table thead th.today-col {
    background-color: var(--primary-color);
}

.weekly-tech-cell {
    background-color: #f9fafb;
    font-weight: 700;
    color: #111827;
    font-size: 0.88rem;
}

.weekly-tech-cell small {
    display: block;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.75rem;
    margin-top: 3px;
}

.weekly-day-cell {
    background-color: #ffffff;
    min-height: 90px;
    transition: background-color 0.15s;
}

.weekly-day-cell.today-cell {
    background-color: #f0fdfa;
}

/* --- TARJETAS INTERNAS DEL CALENDARIO --- */
.cal-item {
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.78rem;
    line-height: 1.25;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    word-wrap: break-word;
}

.cal-item:last-child {
    margin-bottom: 0;
}

/* Actividad / OT */
.cal-ot {
    background-color: #e0f2fe;
    border-left: 4px solid #0284c7;
    color: #0c4a6e;
}

.cal-ot.ot-alta {
    background-color: #fee2e2;
    border-left-color: #dc2626;
    color: #7f1d1d;
}

.cal-ot.ot-culminada {
    background-color: #ccfbf1;
    border-left-color: #0d9488;
    color: #115e59;
}

/* Día Libre */
.cal-libre {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    font-weight: 700;
    text-align: center;
    padding: 5px;
}

/* Cumpleaños y Aniversarios */
.cal-festivo {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    color: #92400e;
    font-weight: 700;
    text-align: center;
}

/* Falta / Permiso / Reposo */
.cal-ausencia {
    background-color: #ffedd5;
    border-left: 4px solid #ea580c;
    color: #9a3412;
    font-weight: 600;
}

/* Alerta de Choque */
.cal-choque-badge {
    display: block;
    background-color: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 5px;
}

/* --- CUADRÍCULA MENSUAL --- */
.monthly-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(135px, 1fr));
    border-top: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    min-width: 950px;
}

.monthly-header {
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 10px 5px;
    font-size: 0.8rem;
    font-weight: 700;
    border-right: 1px solid #374151;
    border-bottom: 1px solid #e5e7eb;
}

.monthly-cell {
    min-height: 120px;
    background: white;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.monthly-cell.empty-cell {
    background-color: #f9fafb;
}

.monthly-cell.today-cell {
    background-color: #f0fdfa;
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

.monthly-day-number {
    font-weight: 800;
    font-size: 0.88rem;
    color: #374151;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monthly-events-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
}

/* Leyenda de colores */
.cal-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #4b5563;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
/* =========================================================
   ETAPA 4: ESTILOS DE RESUMEN DE EJECUCIÓN Y ESTADÍSTICAS
   ========================================================= */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-card.kpi-culminadas { border-left-color: #0d9488; }
.kpi-card.kpi-iniciadas  { border-left-color: #2563eb; }
.kpi-card.kpi-espera     { border-left-color: #d97706; }
.kpi-card.kpi-efectividad{ border-left-color: #111827; background: #f8fafc; }

.kpi-info span {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-info strong {
    font-size: 1.65rem;
    color: #111827;
    font-weight: 800;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.resumen-two-cols {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.disc-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.88rem;
}

.disc-list-item:last-child {
    border-bottom: none;
}

@media (max-width: 992px) {
    .resumen-two-cols {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   ETAPA 5: BARRA DE BOTONES DE EXPORTACIÓN Y LIENZO OFICIAL
   ========================================================= */

.export-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-export {
    border: none;
    padding: 8px 13px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.btn-export:hover {
    opacity: 0.92;
}

.btn-export:active {
    transform: scale(0.98);
}

.btn-export-img {
    background-color: #2563eb; /* Azul para Imagen WhatsApp */
}

.btn-export-pdf {
    background-color: #dc2626; /* Rojo corporativo para PDF */
}

.btn-export-excel {
    background-color: #15803d; /* Verde Excel */
}

/* Lienzo temporal de alta resolución para capturar Imagen y PDF */
.export-stage-wrapper {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1320px;
    background-color: #ffffff;
    padding: 30px;
    color: #111827;
    z-index: -1;
}

.export-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.export-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.export-banner-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px;
}

.export-banner-title h1 {
    font-size: 1.35rem;
    color: #111827;
    font-weight: 800;
    margin-bottom: 2px;
}

.export-banner-title p {
    font-size: 0.95rem;
    color: #0d9488;
    font-weight: 700;
}

.export-banner-right {
    text-align: right;
}

.export-banner-right h2 {
    font-size: 1.1rem;
    color: #1f2937;
    text-transform: uppercase;
}

.export-banner-right span {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
}

.export-banner-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #d1d5db;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
}
/* =========================================================
   ETAPA 6: LOGIN, PERFIL DE USUARIO Y ESTADO DE LA NUBE
   ========================================================= */

.login-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #111827 50%, #134e4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.login-overlay.hidden {
    display: none;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 30px 28px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.45);
    border-top: 5px solid var(--primary-color);
    text-align: center;
}

.login-brand-top {
    display: inline-block;
    background: #f0fdfa;
    color: var(--primary-color);
    border: 1px solid #99f6e4;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.login-client-box {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.login-client-box img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 8px;
}

.login-client-box h1 {
    font-size: 1.2rem;
    color: #111827;
    font-weight: 800;
}

.login-client-box p {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
}

.login-form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.btn-eye {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.95rem;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    margin-top: 2px;
}

.remember-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary-color);
}

.btn-login-submit {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 0.95rem;
    margin-top: 6px;
}

.login-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Pastilla de usuario activo en la barra lateral */
.active-user-pill {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #e5e7eb;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-user-pill i {
    color: #2dd4bf;
    font-size: 1.1rem;
}

.cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cloud-online {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.cloud-local {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}
/* =========================================================
   ETAPA 7: ESTILOS PARA CONTRATISTAS / PROVEEDORES Y ÁREAS
   ========================================================= */

.contractor-box {
    grid-column: 1 / -1;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    padding: 12px 14px;
    border-radius: 6px;
}

.contractor-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 700;
    margin: 2px 2px 2px 0;
}

.badge-modalidad-interno {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-block;
}

.badge-modalidad-proveedor {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-block;
}

.building-label {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #0f766e;
    background: #f0fdfa;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #99f6e4;
    margin-bottom: 3px;
}
/* =========================================================
   ETAPA 8: TABLERO ILUSTRATIVO DE EQUIPOS Y RESERVORIOS
   ========================================================= */

.reservoir-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.res-summary-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border-left: 5px solid #2dd4bf;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.res-summary-card.water-card { border-left-color: #38bdf8; }
.res-summary-card.diesel-card { border-left-color: #f59e0b; }

.res-summary-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    font-weight: 700;
}

.res-summary-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.res-summary-main strong {
    font-size: 1.7rem;
    font-weight: 800;
    color: #ffffff;
}

.res-summary-main span {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.res-summary-delta {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

/* Cuadrícula de Tarjetas de Equipos */
.scada-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin: 22px 0 12px 0;
    padding: 8px 14px;
    background: #e2e8f0;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scada-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    margin-bottom: 15px;
}

.scada-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: opacity 0.2s, border-color 0.2s;
    position: relative;
}

.scada-card.excluded-report {
    opacity: 0.55;
    background: #f9fafb;
    border-style: dashed;
}

.scada-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}

.scada-card-title h4 {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 800;
}

.scada-card-title small {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

.scada-check-include {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #4b5563;
    cursor: pointer;
    font-weight: 700;
    user-select: none;
}

.scada-check-include input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary-color);
}

/* Cilindro Ilustrativo de Tanques */
.scada-visual-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tank-cylinder {
    width: 68px;
    height: 115px;
    background: #f1f5f9;
    border: 2px solid #94a3b8;
    border-radius: 14px / 8px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.tank-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    transition: height 0.4s ease, background 0.3s ease;
}

.liquid-oxy { background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%); }
.liquid-water { background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%); }
.liquid-diesel { background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%); }
.liquid-low { background: linear-gradient(180deg, #f87171 0%, #dc2626 100%) !important; }
.liquid-warn { background: linear-gradient(180deg, #fbbf24 0%, #ea580c 100%) !important; }

.tank-percent-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.88rem;
    color: #0f172a;
    text-shadow: 0 0 4px rgba(255,255,255,0.9);
    z-index: 2;
}

.tank-metrics {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
}

.tank-metrics .metric-big {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.tank-metrics .metric-sub {
    color: #4b5563;
    font-size: 0.78rem;
}

.delta-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    background: #f3f4f6;
    color: #374151;
    width: fit-content;
    margin-top: 2px;
}

.delta-pill.delta-down { background: #fee2e2; color: #991b1b; }
.delta-pill.delta-up   { background: #dcfce7; color: #166534; }

/* Display Ilustrativo de Temperatura (Quirófanos / Salas de Parto) */
.temp-visual-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    color: #38bdf8;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #334155;
}

.temp-visual-box.temp-alert {
    color: #f87171;
    border-color: #dc2626;
}

.temp-big-value {
    font-size: 1.65rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
}

/* Indicador LED de Equipos (Calderas, Plantas, Compresores) */
.equip-status-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.85rem;
}

.led-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.led-green  { background: #10b981; box-shadow: 0 0 8px #10b981; }
.led-blue   { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.led-amber  { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.led-red    { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.led-gray   { background: #9ca3af; }

/* Inputs compactos dentro de la tarjeta SCADA */
.scada-inputs-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.scada-inputs-row label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #4b5563;
    display: block;
    margin-bottom: 2px;
}

.scada-inputs-row input, .scada-inputs-row select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.84rem;
    font-weight: 600;
}

.btn-delete-custom-eq {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 6px;
}

.btn-delete-custom-eq:hover {
    color: #dc2626;
}
/* =========================================================
   ETAPA 9: GENERADOR DE COMUNICADO A GERENCIA Y MÉDICOS
   ========================================================= */

.boletin-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

.boletin-selector-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-height: 82vh;
    overflow-y: auto;
}

.boletin-selector-group {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.boletin-selector-group h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    color: #0f766e;
    margin-bottom: 8px;
    font-weight: 800;
}

.boletin-check-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #374151;
    padding: 5px 4px;
    border-radius: 4px;
    cursor: pointer;
}

.boletin-check-item:hover {
    background: #f0fdfa;
}

.boletin-check-item input {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

/* Hoja de Vista Previa estilo Correo Oficial */
.email-preview-sheet {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 32px 38px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    color: #111827;
    font-family: Calibri, 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
}

.email-section-heading {
    font-weight: 700;
    text-decoration: underline;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #111827;
    font-size: 1.02rem;
}

.email-building-list {
    margin-left: 22px;
    margin-bottom: 12px;
}

.email-area-list {
    margin-left: 26px;
    list-style-type: circle;
}

.email-area-list li {
    margin-bottom: 6px;
}

.email-provider-sublist {
    margin-left: 26px;
    list-style-type: square;
    margin-top: 2px;
}

.email-notes-list {
    margin-left: 24px;
    margin-top: 6px;
}

.email-notes-list li {
    margin-bottom: 6px;
}

@media (max-width: 1024px) {
    .boletin-layout {
        grid-template-columns: 1fr;
    }
    .boletin-selector-panel {
        max-height: none;
    }
}