/* Configuración General y Tipografía Oficial */
@import url('https://googleapis.com');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #eef2f3; /* Fondo gris claro suave para resaltar la tarjeta */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Contenedor Principal de la Tarjeta */
.main-container {
    width: 100%;
    max-width: 950px;
    padding: 20px;
}

.login-card {
    background: #fbf6ee; /* Color beige claro del fondo izquierdo */
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    min-height: 550px;
}

/* --- PANEL IZQUIERDO (Formulario) --- */
.left-panel {
    flex: 1.2;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Logotipo Institucional */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
}

.logo-img {
    width: 100px;
    height: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-top {
    font-size: 10px;
    font-weight: 600;
    color: #636363;
    letter-spacing: 1px;
}

.logo-bottom {
    font-size: 20px;
    font-weight: 700;
    color: #a47c3c; /* Color dorado del texto */
    letter-spacing: 1px;
}

/* Títulos del Formulario */
.left-panel h2 {
    color: #5c1424; /* Color guinda institucional */
    font-size: 28px;
    font-weight: 700;
    margin-top: 20px;
    text-align: center;
}

.subtitle {
    color: #a47c3c;
    font-size: 14px;
    margin-bottom: 25px;
    text-align: center;
}

#loginForm {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Campos de entrada con icono */
.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #636363;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1.5px solid #cccccc;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: #5c1424;
}

/* Enlace Olvidaste Contraseña */
.forgot-password {
    color: #5c1424;
    font-size: 13px;
    text-decoration: underline;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Botón Iniciar Sesión (Guinda) */
.btn-primary {
    background: #5c1424;
    color: #ffffff;
    border: none;
    padding: 12px 0;
    width: 80%;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(92, 20, 36, 0.3);
}

.btn-primary:hover {
    background: #440e1a;
    transform: translateY(-2px);
}

/* Pie de la tarjeta */
.card-footer {
    font-size: 11px;
    color: #636363;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 20px;
}

/* --- PANEL DERECHO (Bienvenida Guinda con curva) --- */
.right-panel {
    flex: 1;
    background: #5c1424; /* Fondo guinda */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    /* Efecto de curva ovalada del lado izquierdo del panel guinda */
    border-top-left-radius: 100% 50%;
    border-bottom-left-radius: 100% 50%;
}

.welcome-content {
    text-align: center;
    color: #ffffff;
    max-width: 280px;
    z-index: 2;
}

.welcome-content h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.welcome-content p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Botón Registrarse (Dorado/Transparente) "BOTON ELIMINADO"*/
/*  AJUSTE MUNICIPAL: Estilo optimizado para el texto institucional de bienvenida */
.welcome-content p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 0; /* Eliminamos el espacio inferior que dejaba el botón */
    opacity: 0.85;
    letter-spacing: 0.5px;
}


/* Responsivo para celulares (Corregido a @media) */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
    }
    .right-panel {
        border-radius: 0;
        padding: 60px 20px;
    }
}


/* ==========================================================================
   MÓDULO DE MANTENIMIENTO: BANDEJA DE TICKETS Y PANEL DE EDICIÓN
   ========================================================================== */

/* Contenedor General del Panel */
/* Correcciones e Integración del Módulo de Bandeja de Entrada */
.maint-panel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
    width: 100%;
}

.ticket-inbox-section {
    background: #ffffff;
    border: 1px solid #eaecf4;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.ticket-card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #eaecf4;
    border-left: 5px solid #5c1424; /* El color guinda oficial de Calnali */
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.ticket-card-item:hover {
    background-color: #fcfbf9;
    transform: translateX(3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.status-badge-due {
    background-color: #dc4c64;
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
}

.status-badge-normal {
    background-color: #2c9faf;
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
}

.tool-btn-c {
    padding: 8px 16px;
    border: 1px solid #cccccc;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
}

.tool-btn-c:hover {
    filter: brightness(0.9);
}

/* ==========================================================================
   CONFIGURACIÓN DE IMPRESIÓN PDF: UNA SOLA HOJA EN FORMATO HORIZONTAL
   ========================================================================== */
   @media print {
    /* 1. Forzar hoja tamaño Carta en orientación Horizontal y márgenes mínimos */
    @page {
        size: letter landscape;
        margin: 6mm;
    }

    /* 2. Ocultar menú lateral, barra superior, filtros, botones y pie de página */
    .sidebar,
    .toggle-menu-movil,
    .top-bar,
    .filtros-grid,
    #btnLimpiarFiltros,
    #btnExportarExcel,
    #btnImprimirPDF,
    .main-footer {
        display: none !important;
    }

    /* 3. Limpiar contenedores para aprovechar el 100% del ancho de la hoja */
    body,
    html,
    .dashboard-container,
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        display: block !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 4. Quitar scroll horizontal móvil de la tabla para que no se corte */
    .table-container {
        width: 100% !important;
        overflow: visible !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* 5. Ajustar el ancho y compactar filas para que todo quepa en 1 sola hoja */
    .main-table,
    table {
        width: 100% !important;
        min-width: 100% !important;
        border-collapse: collapse !important;
        font-size: 7.5px !important;
    }

    th,
    td {
        padding: 2.5px 4px !important;
        line-height: 1.1 !important;
        word-wrap: break-word !important;
    }

    /* Evitar que una fila se parta a la mitad */
    tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}
