/* IMPORTACIÓN Y VARIABLES (UNIFICADAS) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/*===================================
 INICIO ROOT -VARIABLES Y BODY
==================================== */ 

:root {
    /* Fondos y Superficies */
    --bg-obsidian: #222222;       /* El negro profundo de base */
    --card-bg: #1e1e1e;          /* Un gris azulado muy oscuro para las tarjetas */
    --border-light: rgba(255, 255, 255, 0.05);
    
    /* Colores de Texto */
    --text-main: #ffffff;        /* Blanco puro para títulos */
    --text-dim: rgba(255, 255, 255, 0.6); /* Blanco traslúcido para subtítulos */
    
    /* Marca Dinámica (Se actualizará por JS, pero aquí dejamos el default) */
    --brand-color: var(--brand-color);      /* Color de marca por defecto */
    --brand-glow: var(--brand-color);
}
body {
    background-color: var(--bg-obsidian);
    color: var(--text-main);
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
}

/*------------------------------------ */

.metric-card, .okr-master-card, .seccion-bitacora {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-light); /* AQUÍ ESTÁ EL TRUCO */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Un toque extra: que el borde brille un poquito más cuando pasas el mouse */
.metric-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}


/*=====================================
 EL HEADER (ESTRUCTURA Y LOGOTIPO)
====================================== */

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-logo {
    position: relative; /* Para que la mancha sepa dónde ubicarse */
}
.header-logo::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -40px;
    width: 250px;
    height: 150px;
    background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1; /* Se queda detrás del texto */
    opacity: 0.6;
    pointer-events: none; /* No estorba los clics */
}

/* Nombre de la Empresa: Corregido y Unificado */
#client-company-name {
    color: var(--text-main) !important;
    font-size: 1.7rem;
    font-weight: 800; 
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    
    /* LA MAGIA PARA UNA SOLA LÍNEA */
    white-space: nowrap !important;
    display: block;

    /* SOMBRA REFORZADA */
    text-shadow: 0 0 12px var(--brand-glow), 
                 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* Subtítulo: Discreto y profesional */
#client-project-subtitle {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
    opacity: 0.7;
    white-space: nowrap; /* También el subtítulo en una línea */
}

/*=========================================================
El TELON - SINCRONYZANDO DATA CENTER
==========================================================*/

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

/* Esta clase forzará la desaparición */
.hidden-screen {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}


/*========================================================
 CONTROLES SUPERIORES (DASHBOARD ACTIVO)
=========================================================*/

.dashboard-controls {
    /* Quitamos el flex forzado para que el JS controle la visibilidad */
    display: flex; 
    gap: 12px;
    padding-right: 20px; 
    align-items: center;
    justify-content: flex-end;
    margin-top: 20px; /* Para que bajen un poco y no tapen el nombre de la empresa */
    margin-bottom: 20px;
    align-items: center;
    width: 100%;
}

/* ----------------botones ---------- */

.btn-control {
    align-self: flex-end; 
    display: inline-flex;
    align-items: center;
    gap: 8px;
    
    /* GRADIENTE: Crea el efecto de superficie curva/salida */
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    
    color: #ffffff;
    
    /* BORDE: Un borde superior más claro simula el reflejo de la luz en el canto */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.5); /* Sombra en el borde inferior */

    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    
    /* SOMBRA: Le da elevación sobre el fondo #222 */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.5), 
        0 2px 4px -1px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05); /* Brillo interno superior */
    
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* EFECTO AL PRESIONAR: Se "hunde" físicamente */
.btn-control:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%); /* Invierte el gradiente */
}

/* Mantenemos tu hover de iluminación de marca */
.btn-control:hover {
    border-color: var(--brand-color);
    box-shadow: 0 0 15px -5px var(--brand-color), 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}

/*=======================================================
BOTONES DE INGRESO AL DASHBOARD Y DEMO
=========================================================*/

.btn-header-group {
    display: flex !important; /* Fuerza el modo fila */
    gap: 10px;               /* Espacio pequeño entre ellos */
    align-items: center;
    justify-content: flex-end; /* Los pega a la derecha del header */
}

.btn-header-group .btn-primary-glow {
    flex: 1;                 /* Hace que ambos midan lo mismo */
    min-width: 200px;        /* Evita que se encojan demasiado */
    white-space: nowrap;     /* Evita que el texto se rompa en dos líneas */
    justify-content: center; /* Centra el icono y texto dentro del botón */
}



/*========================================================
 CONFIGURACION DE LA LANDING PAGE - VENTAS 
=========================================================*/

.sales-landing {
    grid-column: 1 / -1;
    position: relative;
    min-height: 80vh; /* Ocupa casi toda la pantalla */
    display: flex;
    align-items: flex-start; /* Empuja el contenido hacia ARRIBA */
    justify-content: center;
    padding-top: 60px; /* Margen de seguridad con el header */
    background: transparent;
    border: none;
    overflow: visible;
}

.landing-background-glow {
    position: absolute;
    top: 40%; /* Centrada respecto al contenido superior */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    border-radius: 50%;
}

.landing-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* EL BADGE (SISTEMA EN ESPERA) */
.status-badge {
    padding: 12px 28px !important; /* Aquí le das el aire que faltaba */
    border: 1px solid;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.2);
}

.sales-landing h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 900;
}

.sales-landing p {
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* LAS PILLS DE FEATURES */
.feature-pills {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.feature-pills span {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #fff;
}

/* EL BOTÓN PREMIUM ROBUSTO */
.btn-upgrade-premium {
    padding: 24px 60px !important; /* Mucho más aire interior */
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    border-radius: 4px !important;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    color: #000 !important;
}

.btn-upgrade-premium:hover {
    transform: translateY(-5px) scale(1.02);
    filter: brightness(1.1);
}
.value-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
    text-align: left;
}

.value-item {
    display: flex;
    gap: 15px;
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.value-item i { font-size: 1.5rem; margin-top: 5px; }
.value-item h3 { font-size: 0.9rem; margin: 0 0 5px 0; color: #fff; }
.value-item p { font-size: 0.8rem; color: #aaa; margin: 0; line-height: 1.3; }

.price-info { margin-bottom: 20px; }
.old-price { text-decoration: line-through; color: #666; margin-right: 10px; font-size: 1.2rem; }
.new-price { font-size: 2rem; font-weight: 800; color: #fff; }
.offer-tag { padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; margin-left: 10px; vertical-align: middle; }



/*================================================= 
BOTON DE ACCESO (CENTRO DE MANDO) - CIERRE HEADER
==================================================*/

/* Contenedor de la acción derecha */
.header-actions {
    display: flex;
    align-items: center;
    padding-right: 80px;
}

/* El botón "Tu Centro de Mando" */
.btn-primary-glow {
    background-color: #ffffff; /* Blanco puro para destacar */
    color: #000000;            /* Texto negro para legibilidad máxima */
    padding: 10px 22px;
    border-radius: 6px !important;       /* Forma de píldora, más orgánica y amigable */
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;          /* Un poco más de peso para que se lea bien en pequeño */
    letter-spacing: 1px;       /* Espaciado para un look de marca de lujo */
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #ffffff;
    box-shadow: 0 0px 15px var(--brand-glow); /* Sombra base para despegarlo del fondo */
    outline: 1px solid var(--brand-color); /* Un borde fino del color de marca */
    outline-offset: 2px; /* Separado del botón */
    text-transform: uppercase;
}

/* El icono del astronauta */
.btn-primary-glow i {
    font-size: 0.9rem;
    transition: transform 0.4s ease;
}

/* HOVER: El efecto de "Espillar" (Brillo de Marca) */
.btn-primary-glow:hover {
    animation: none;
    background-color: #ffffff;
    transform: scale(1.05); /* Se agranda ligeramente hacia el usuario */
    color: #000000;
    /* Aquí aplicamos el resplandor sutil del color de marca del cliente */
    box-shadow: 0 0 40px var(--brand-glow), 
                0 0 20px var(--brand-glow) !important;
}

/* Animación del astronauta al pasar el mouse */
.btn-primary-glow:hover i {
    transform: rotate(-15deg) scale(1.2); /* El astronauta se inclina y crece */

}
/* Animacion  de la respiracion */

animation: breathing-glow 4s infinite ease-in-out;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
} 


/*animacion de respiracion en rojo */

@keyframes breathing-glow {
    0% {
        box-shadow: 0 0 10px var(--brand-glow), 0 0 5px var(--brand-glow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px var(--brand-glow), 0 0 15px var(--brand-glow);
        transform: scale(1.02); /* Un pulso casi imperceptible pero orgánico */
    }
    100% {
        box-shadow: 0 0 10px var(--brand-glow), 0 0 5px var(--brand-glow);
        transform: scale(1);
    }
}


/*============================================================
CONTENEDOR - FILA UNO LAS TRES TARJETAS 
==============================================================*/

/* EL CONTENEDOR MAESTRO (Aseguramos las bases) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* El estándar de 2 columnas para el resto */
    gap: 25px;
    padding: 30px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* TRUCO PARA LA FILA 1: Forzamos a que las 3 tarjetas vivan en una línea arriba */
#card-1, #card-2, #card-3 {
    grid-column: span 2; /* Ocupan un espacio normal */
}

/* Estilo Profesional de las Tarjetas de KPI */
.dashboard-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 1px solid var(--brand-color) !important; /* El toque de marca */
    border-radius: 12px;
    padding: 20px 25px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: inset 4px 0 10px -4px var(--brand-glow);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--brand-glow);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Estilos para el contenido que inyectará el JS */
.card-label {
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.card-value {
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.card-trend {
    font-size: 0.75rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.card-icon{
color: var(--brand-color) !important;
}

/*==========================================================
CONTENEDOR FILA 2-  DISEÑO DE TARJETAS DE GRÁFICOS 
============================================================*/

#status-distribution-card, 
#tech-usage-card {
    grid-column: span 3; /* Cada uno ocupa una columna del grid de 2 */
    min-height: 420px;    /* Espacio suficiente para que la gráfica respire */
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--brand-color);
    border-radius: 12px;
    padding: 25px;
}

/* Títulos de los Gráficos */
.chart-title {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Contenedor del Canvas */
.chart-wrapper {
    flex-grow: 1; /* Hace que el gráfico ocupe todo el espacio disponible */
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ajuste para el canvas de Chart.js */
canvas {
    max-width: 100% !important;
    max-height: 100% !important;
}

/*======================================================
CONTENEDOR 3 -FILA 3 DISEÑO OKR Y LOGS SISTEMA 
========================================================*/

/* DISEÑO OKR (Fila 3 - Columna 1) */
.okr-master-card {
    grid-column: span 4;
    background: var(--card-bg);
    border-left: 4px solid var(--brand-color);
    border-radius: 12px;
    padding: 25px;
}

.okr-badge {
    background: transparent;
    border: 1px solid var(--brand-color); /* Solo el borde para que sea elegante */
    color: var(--brand-color);
    padding: 2px 10px;
    font-size: 0.65rem;
    letter-spacing: 1px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 10px;
}

.okr-main-title {
    font-size: 1.1rem;
    margin-top: 10px;
    color: var(--text-main);
}

.kr-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kr-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 8px;
}

.kr-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    transition: width 1s ease-in-out;
    background: var(--brand-color) !important;
    box-shadow: 0 0 10px var(--brand-glow) !important;
}
.kr-percentage{ 
    color: var(--brand-color) !important;
}
.okr-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 20px 0;
}

/*chat */

/* Contenedor Principal */
.okr-notes-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
}

/* Área de Texto */
/* 1. Área de Texto (Textarea) */
.okr-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.03); /* Más sutil */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

/* El foco ahora usa el color del cliente, no el azul de antes */
.okr-textarea:focus {
    border-color: var(--brand-color);
}

/* 2. Botón Unificado (.btn-control) */
.btn-control {
    align-self: flex-end; 
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a; /* Fondo Obsidian */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover: El botón cobra vida con el color de marca */
.btn-control:hover {
    background: #252525;
    border-color: var(--brand-color);
    box-shadow: 0 0 15px -5px var(--brand-color);
    transform: translateY(-2px);
}

/* 3. Historial (Bitácora) */
.seccion-bitacora {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 10px;
    padding-top: 15px;
}

/* 3. Historial (Bitácora) */
.seccion-bitacora {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 20px;
    padding: 20px 15px; /* Añadimos aire a los lados y arriba */
    background: rgba(0, 0, 0, 0.1); /* Un fondo ligeramente más oscuro para diferenciarlo */
    border-radius: 0 0 12px 12px;
}

.titulo-historial {
    font-size: 10px;
    color: #888888; 
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 15px;
    display: block;
    padding-left: 5px; /* Alineación suave con las notas */
}

/* Contenedor del Chat con Scroll */
.contenedor-chat {
    max-height: 220px; 
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 10px; /* Espacio para que el scroll no tape el texto */
}

/* Recuperamos el Scrollbar Minimalista */
.contenedor-chat::-webkit-scrollbar {
    width: 4px;
}

.contenedor-chat::-webkit-scrollbar-track {
    background: transparent;
}

.contenedor-chat::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.contenedor-chat::-webkit-scrollbar-thumb:hover {
    background: var(--brand-color); /* El scroll brilla con el color de marca al tocarlo */
}

/* Cada mensaje del historial */
.nota-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--brand-color);
    padding: 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 4px;
}

.nota-texto {
    margin: 0;
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.5;
    padding-left: 2px;
}





/*===============================================
 DISEÑO PULSO DE SISTEMA (Fila 3 - Columna 2) 
============================================== */
.system-pulse-card {
    grid-column: span 2;   
    /* Fondo neutral profundo (sin rastro de azul) */
    background: linear-gradient(145deg, #1e1e1e, #161616);
    
    /* El borde de marca es el único que da color */
    border-left: 4px solid var(--brand-color); 
    
    /* Layout limpio */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    padding: 20px;
    border-radius: 0 12px 12px 0; /* Redondeamos solo la derecha por el borde de marca */
    
    /* Efecto de profundidad sutil */
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

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

.pulse-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-color);
    border-radius: 50%;
    /* Un resplandor más suave usando la variable */
    box-shadow: 0 0 12px var(--brand-glow); 
    animation: pulse-blink 2s infinite;
}

.pulse-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-main); /* Texto principal para seriedad */
    text-transform: uppercase;
}

.pulse-date {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: 'monospace';
}

.pulse-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.pulse-item {
    background: rgba(255, 255, 255, 0.02); /* Fondo muy sutil */
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
}

.pulse-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.pulse-value {
    font-family: 'Courier New', monospace;
    color: var(--brand-color); /* Los datos técnicos resaltan en el color de marca */
    font-size: 0.95rem;
    font-weight: bold;
    
}

/* Consola de Logs con estilo "Dark Terminal" */
.system-logs {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.system-logs code {
    display: block;
    color: var(--text-dim); /* Texto base en gris */
    font-size: 0.65rem;
    font-family: 'monospace';
    line-height: 1.6;
}

/* Resaltamos la parte dinámica de los logs en el color del cliente */
.system-logs code span {
    color: var(--brand-color);
    opacity: 0.9;
}

@keyframes pulse-blink {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; box-shadow: 0 0 18px var(--brand-glow); }
    100% { transform: scale(1); opacity: 1; }
}

/*=========================================================
BOTON DE INYECCION MODAL - FORMULARIO DINAMICO
===========================================================*/

/* MODAL DE INYECCIÓN - Estilo Tech-Premium */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Fondo oscuro profundo */
    backdrop-filter: blur(8px);      /* Efecto de desenfoque muy moderno */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--brand-color); /* Identidad de marca */
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.2rem;
    align-items: center;
    gap: 10px;
    display: flex;
    justify-content: space-between; /* Esto empuja la X al extremo */
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
    margin-bottom: 20px;
}

/* El botón de enviar con el color del cliente */
.btn-submit-data {
    width: 100%;
    padding: 14px;
    background: var(--brand-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-submit-data:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px var(--brand-glow);
}
.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.form-group {
    margin-bottom: 15px;
    padding: 0 10px; /* Margen interno para que no peguen al borde */
}

input.dato-crudo {
    width: 100%; /* Que ocupe el ancho disponible con el padding del padre */
    box-sizing: border-box; /* Crucial para que no se salga del borde */
}

/* --------------------------------------  */
/* --- 15. DISEÑO RESPONSIVO UNIFICADO --- */
/* --------------------------------------  */

/* TABLETS: De 3 columnas pasamos a 2 */
@media (max-width: 1024px) {
    .dashboard-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    #status-distribution-card, #tech-usage-card { 
        grid-column: span 2; 
    }
}

/* MÓVILES (Unificamos 768px y 600px) */
@media (max-width: 768px) {
    /* Header: Pasamos de horizontal a vertical */
    .header-container {
        flex-direction: column;
        gap: 15px;
        height: auto;
        text-align: center;
    }

    .login-btn-header {
        width: 100%;
        justify-content: center;
    }

    /* Grid: Todo a una sola columna */
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }

    .dashboard-card {
        grid-column: span 1 !important;
        padding: 20px;
    }

    /* Ajustes de tamaño para legibilidad */
    .metric-value { 
        font-size: 1.8rem; 
    }
    
    .chart-wrapper { 
        height: 250px !important; 
    }
}


