/* ==========================================================================
   PALETA DE COLORES Y VARIABLES
   ========================================================================== */
:root {
    --primary-dark: #4f617d;/*#1e293b;*/
    --accent-blue: #38bdf8;
    --bg-body: #f8f9fa;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
}

/* --- RESET & BASE --- */
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-main);
    margin: 0;
}

/* Color principal para Navbar y Modales */
.bg-dark, 
.navbar-dark.bg-dark {
    background-color: #1e293b !important;
    border: none !important;
}

/* ==========================================================================
   ESTILOS DEL LOGIN (index.php)
   ========================================================================== */
.login-page {
    background-color: var(--primary-dark) !important;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-card {
    background: var(--white) !important;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    width: 90%;
    margin: auto;
    padding: 2rem;
    max-width: 400px;
    color: var(--primary-dark);
    border-radius: 20px;
    border: 1px solid var(--border-color) !important;
}

/* Contenedor y cuadritos del PIN */
#pin-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* Ajuste para los inputs del PIN */
.pin-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.pin-input {
    /*width: 60px;*/
    width: 100%;
    max-width: 60px;
    aspect-ratio: 1/1;
    height: 60px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-dark) !important;
    border-radius: 12px !important;
    border: 2px solid #cbd5e1 !important;
    background-color: #f1f5f9 !important;
    transition: all 0.2s;
}

.pin-input:focus {
    border-color: var(--accent-blue) !important;
    background-color: var(--white) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   ESTILOS DEL DASHBOARD (dashboard.php)
   ========================================================================== */
.dashboard-body {
    background-color: var(--bg-body) !important;
    min-height: 100vh;
    margin: 0;
}

.card-custom { 
    border: none; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.03); 
    background: var(--white);
}

/* ==========================================================================
   COMPONENTES DE LA BITÁCORA Y MODAL
   ========================================================================== */

/* Burbujas de Chat / Respuestas */
.bitacora-item {
    border-radius: 18px !important;
    border: 1px solid #edf2f7 !important;
    background: #ffffff;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

/* Estilo para los mensajes de la bitácora */
.bitacora-registro {
    border: 1px solid rgba(0, 0, 0, 0.08) !important; /* Borde muy sutil, casi imperceptible */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}

/* Efecto al pasar el mouse - un ligero realce para feedback visual */
.bitacora-registro:hover {
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Estilo para las burbujas de chat (si usas ese diseño) */
.chat-bubble {
    border-color: rgba(0, 0, 0, 0.05) !important;
    background-color: #f8f9fa; /* Fondo gris muy claro para diferenciar */
}


/* Hitos de Cambio de Estado (Sutiles) */
.status-milestone {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.status-tag {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Línea de tiempo y Modal */
.modal-content { 
    border-radius: 24px; 
    border: none; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.timeline-container { 
    border-left: 2px solid var(--border-color); 
    margin-left: 15px; 
    padding-left: 25px; 
    position: relative; 
}

.dot-indicator { 
    position: absolute; 
    left: -32px; 
    top: 18px; 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    background: var(--primary-dark); 
    border: 2px solid var(--white); 
    z-index: 2; 
}

/* ==========================================================================
   BOTONES Y UTILIDADES
   ========================================================================== */
.btn-dark {
    background-color: var(--primary-dark) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 0.7rem 1.5rem;
    font-weight: bold;
    border-radius: 50px !important;
    transition: all 0.3s ease;
}

.btn-dark:hover {
    background-color: #334155 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.info-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
}
/* Estilos para los inputs del PIN */
.pin-input-pro {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 300;
    color: #1A2B49;
    border: 1px solid #949494;
    border-radius: 12px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.pin-input-pro:focus {
    outline: none;
    border-color: #1A2B49;
    background-color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Efecto focus para el correo */
/* 1. ESTADO BASE: Color de la línea sin posicionarse */
.form-control-pro-line {
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 12px 0;
    width: 100%;
    /* Fuentes y Estilo */
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2rem; /* Un poco más grande como pediste */
    font-weight: 400;
    color: #1A2B49; /* El azul de tu logo */
    text-align: center; /* Centra el texto al escribir */
    text-transform: lowercase; /* Fuerza las minúsculas */
    
    outline: none;
    background: transparent;
    transition: all 0.3s ease;
}

/* Estado al hacer clic */
.form-control-pro-line:focus {
    border-bottom: 2px solid #1A2B49;
}

/* Centrar y aclarar el Placeholder */
.form-control-pro-line::placeholder {
    color: #636669;
    text-align: center;
    font-weight: 300;
    font-size: 1.1rem; /* Un pelito más chico que el texto real */
    text-transform: none; /* Para que el ejemplo pueda tener mayúsculas si quieres */
}

/* Soporte para otros navegadores */
.form-control-pro-line::-webkit-input-placeholder { text-align: center; }
.form-control-pro-line::-moz-placeholder { text-align: center; }

/* Hover para el botón */
.btn:hover {
    background-color: #0f172a !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}
.ticket-label-light {
    display: block;
    text-align: center;
    color: #636669; /* Gris suave para reducir el peso visual */
    font-weight: 200 !important;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    
    /* Estos dos comandos son clave para que la letra se vea delgada en Mac y Windows */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor de enlaces */
.login-links a {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    text-decoration: none;
}

/* Efecto para "Registrarse" - Solo color y línea inferior */
.link-registro {
    color: #212529; /* Color oscuro inicial */
    opacity: 0.8;
}

.link-registro:hover {
    opacity: 1;
    color: #0d6efd !important; /* Cambia a azul sin mover el texto */
}

/* Línea animada que aparece desde el centro */
.link-registro::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -1px;
    left: 50%;
    background-color: #0d6efd;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.link-registro:hover::after {
    width: 100%;
}

/* Efecto para "Olvidó su contraseña" - Cambio sutil de gris a oscuro */
.link-olvido {
    color: #6c757d;
    opacity: 0.7;
}

.link-olvido:hover {
    opacity: 1;
    color: #212529 !important;
    text-decoration: underline !important;
}

/* Efecto para el botón de Nuevo Ticket */
.btn-dark.rounded-pill {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid transparent;
}

.btn-dark.rounded-pill:hover {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #212529 !important;
    transform: translateY(-2px); /* Eleva el botón sutilmente sin deformar el texto */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Estilo base para el select moderno */
.form-select.custom-select-phantom {
    appearance: none; /* Quita la flecha nativa de Windows */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    border: 1px solid #dee2e6 !important;
    border-radius: 12px !important; /* Más redondeado como tus botones */
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}

/* Efecto al hacer foco (clic) */
.form-select.custom-select-phantom:focus {
    border-color: #212529 !important;
    box-shadow: 0 0 0 0.25 resilience rgba(33, 37, 41, 0.05) !important;
    background-color: #fff !important;
}

/* Estilo para las opciones dentro del desplegable */
.form-select.custom-select-phantom option {
    padding: 10px;
    background-color: #fff;
}

/* Contenedor del grupo de estados */
.status-picker {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.03);
}

/* Estilo base para cada opción de estado */
.status-option {
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: white;
    color: #6c757d;
}

/* Variaciones de color para el estado ACTIVO */
.status-option.active.opt-abierto {
    background: rgba(13, 202, 240, 0.1) !important;
    color: #087990 !important;
    border-color: #0dcaf0 !important;
}

.status-option.active.opt-proceso {
    background: rgba(255, 193, 7, 0.1) !important;
    color: #997404 !important;
    border-color: #ffc107 !important;
}

.status-option.active.opt-revision {
    background: rgba(111, 66, 193, 0.1) !important;
    color: #5928e3 !important;
    border-color: #6f42c1 !important;
}

.status-option.active.opt-cerrado {
    background: rgba(25, 135, 84, 0.1) !important;
    color: #146c43 !important;
    border-color: #198754 !important;
}

/* Efecto hover suave para los inactivos */
.status-option:not(.active):hover {
    background: #eee;
    transform: translateY(-1px);
}

/* Limpieza del header del modal */
.modal-header-phantom {
    background: #ffffff !important; /* Adiós al azul sólido */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important; /* Línea muy fina */
    padding: 1.5rem 2rem !important;
    border-radius: 20px 20px 0 0 !important; /* Mantiene la redondez del modal */
}

/* Este es el contenedor principal */
.modal-title-phantom {
    color: #1e293b !important;
    font-size: 1.25rem !important;
    line-height: 1.2 !important; /* Vital para las 2 líneas */
    width: 100%;
}

/* Estilo para la etiqueta superior (Número) */
.ticket-label-small {
    font-weight: 300;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Asegura que salte de línea */
    margin-bottom: 2px;
}

/* Estilo para el asunto principal (Título) */
.ticket-subject-bold {
    font-weight: 700;
    letter-spacing: -0.5px;
    display: block;
}

/* Ajuste del botón de cerrar (la X) */
.btn-close-phantom {
    filter: brightness(0) saturate(100%) invert(45%) sepia(12%) saturate(840%) hue-rotate(174deg) brightness(94%) contrast(91%); /* Color suave para la X */
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-close-phantom:hover {
    opacity: 1;
}

/* Badges para el tipo de servicio en la lista */
.badge-servicio {
    font-size: 0.7rem;
    padding: 4px 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-soporte {
    background-color: #e0e7ff; /* Azul suave */
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.bg-adicional {
    background-color: #fef3c7; /* Naranja suave */
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Estética minimalista para Phanticket */
.card-register {
    max-width: 480px;
    width: 100%;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.logo-phantom { font-weight: 800; letter-spacing: -1px; color: #1e293b; }
.logo-phantom span { font-weight: 200; }


.pin-field {
    width: 55px;
    height: 70px;
    text-align: center;
    font-size: 1.8rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s;
}

.pin-field:focus {
    border-color: #1e293b;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 41, 59, 0.1);
}

/* Para navegadores modernos (Chrome, Safari, Edge, Firefox) */
.form-control::placeholder {
    color: #b3bdc9 !important; /* Un gris más claro (Slate 400) */
    font-size: 0.9rem !important; /* Más pequeño que el texto normal */
    font-weight: 400;
}

/* Específico para tu input de nombre si quieres ser más preciso */
input[name="nombre"]::placeholder {
    opacity: 0.9; /* Le da un toque más suave/grisáceo */
}

/* Estilo para que el botón de adjuntos se vea bien al pasar el mouse */
.btn-archivo-descarga:hover {
    background-color: #0d6efd !important; /* El azul de Bootstrap */
    color: white !important;               /* Texto blanco */
    border-color: #0a58ca !important;
}

/* También cambiamos el color del icono al hacer hover */
.btn-archivo-descarga:hover i {
    color: white !important;
}

.badge.rounded-pill {
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Efecto Hover Premium para las filas de la tabla */
tbody tr {
    transition: all 0.2s ease-in-out;
}
tbody tr:hover {
    background-color: #f8fafc !important; /* Un gris muy elegante y sutil */
    transform: scale(1.005); /* Se agranda un 0.5% */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Sombra ligera */
    z-index: 10;
    position: relative;
    cursor: pointer;
}

/* =========================================
           EFECTO SCROLL MAGNÉTICO (SNAP)
           ========================================= */
        html {
            /* Activa el magnetismo vertical en toda la página */
            scroll-snap-type: y mandatory;
            scroll-behavior: smooth;
        }

        /* Le decimos al navegador qué secciones deben "imantar" hacia el borde superior */
        .hero-section, 
        .ecosystem-block, 
        #evd, 
        #demo {
            scroll-snap-align: start;
            scroll-snap-stop: always; /* Obliga a frenar en cada bloque, para que no se salten ninguno si giran la rueda muy fuerte */
        }

        /* El footer, como es pequeño, lo imantamos hacia el final */
        footer {
            scroll-snap-align: end;
        }