/*
 * ============================================
 * ARCHIVO CSS MAESTRO - EL MOLINO DE GUARO
 * ============================================
 *
 * ÚNICO archivo CSS para TODA la aplicación
 * Fusiona todos los estilos anteriores
 * Optimizado sin duplicados
 *
 * Última actualización: 2025-01-23
 * ============================================
 */

/* ============================================
   IMPORTACIONES Y VARIABLES GLOBALES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Colores principales */
    --primary: #2B5A3E;
    --primary-dark: #1e3d2b;
    --primary-light: #4a7c59;
    --accent: #D4A574;
    --accent-dark: #b8935f;
    --accent-light: #e8c49a;
    --warning: #FFC107;
    --mantenimiento: #FFD54F;
    --error: #ef4444;
    --success: #10b981;
    --info: #3b82f6;

    /* Colores de superficie */
    --surface: #ffffff;
    --surface-light: #f8f9fa;
    --surface-dark: #f1f5f9;
    --surface-gray: #f9f9f9;
    --surface-hover: #f0f8f0;

    /* Colores de texto */
    --text: #000000;
    --text-light: #666666;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Colores de borde */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Espaciado */
    --spacing-xs: 2px;
    --spacing-sm: 5px;
    --spacing-md: 8px;
    --spacing-lg: 12px;
    --spacing-xl: 20px;

    /* Border radius */
    --radius: 12px;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 12px;

    /* Sombras */
    --shadow: rgba(15, 23, 42, 0.08);
    --shadow-lg: rgba(15, 23, 42, 0.15);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Transiciones */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET Y BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--surface-light);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-transform: uppercase;
}

/* Excluir elementos específicos de las mayúsculas */
input,
textarea,
select,
option,
.no-uppercase,
code,
pre,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
.p-input,
.p-select,
.p-textarea {
    text-transform: none;
}

/* ============================================
   CONTENEDORES PRINCIPALES
   ============================================ */

.container,
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--surface);
    box-shadow: 0 4px 20px var(--shadow);
    overflow: hidden;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    margin: var(--spacing-xl) auto;
    padding: 24px;
    max-width: 1200px;
    box-shadow: 0 8px 25px var(--shadow);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ============================================
   CALENDARIOS - COMPONENTE PRINCIPAL
   ============================================ */

.calendario-plantilla,
.calendario {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    font-family: 'Inter', sans-serif;
}

.calendario-header,
.navegacion-calendario {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
}

.mes-año {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Selector de listados y leyenda */
.listados-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    margin-bottom: 20px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 20px;
}

.selector-grupo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.listados-selector label {
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    margin: 0;
}

.select-listados {
    max-width: 280px;
    min-width: 200px;
    flex-shrink: 0;
}

/* Leyenda de colores */
.leyenda-colores {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.color-box.mantenimiento {
    background-color: #FFD54F;
}

.color-box.cita-molienda {
    background-color: #E8F5E8;
}

.nav-mes,
.btn-nav {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: var(--spacing-sm) 15px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: var(--text);
    text-decoration: none;
    display: inline-block;
}

.nav-mes:hover:not(:disabled),
.btn-nav:hover {
    background: var(--border);
}

.nav-mes:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Días de la semana */
.dias-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--primary);
}

.dia-semana {
    text-align: center;
    font-weight: 500;
    color: var(--text-white);
    padding: var(--spacing-lg);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid de días */
.dias-mes {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    padding: 1px;
}

/* Días individuales */
.dia {
    background: var(--surface);
    height: 130px;
    min-height: 130px;
    padding: var(--spacing-md);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.dia:hover {
    background: var(--surface-hover);
    transform: scale(1.02);
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.dia.vacio {
    background: var(--surface-gray);
    cursor: default;
}

.dia.vacio:hover {
    background: var(--surface-gray);
    transform: none;
    box-shadow: none;
}

.dia.hoy {
    background: #e8f5e8;
    border: 2px solid var(--primary);
}

.dia.seleccionado {
    border: 2px solid var(--error) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3) !important;
}

.dia.pasado {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed !important;
    opacity: 0.5;
}

.dia.pasado .numero-dia {
    color: #9ca3af;
}

.dia.pasado:hover {
    transform: none;
    box-shadow: none;
}

/* Estilos para eventos en modal del día */
.evento-item {
    transition: all 0.2s ease !important;
}

.evento-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    border-color: #007bff !important;
}

.evento-item p {
    margin: 5px 0;
}

.evento-item p:last-child {
    margin-bottom: 0;
}

.dia.con-citas {
    background: var(--surface);
}

/* Header de cada día */
.dia-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.numero-dia {
    font-weight: 500;
    color: var(--text);
    font-size: 1rem;
}

.contador-reservas {
    background: var(--primary);
    color: var(--text-white);
    font-size: 0.65rem;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   EVENTOS Y CITAS EN CALENDARIOS
   ============================================ */

.eventos-dia,
.citas-dia {
    font-size: 0.75rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    max-height: calc(100% - 25px);

    /* Scroll personalizado */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.citas-dia::-webkit-scrollbar {
    width: 3px;
}

.citas-dia::-webkit-scrollbar-track {
    background: transparent;
}

.citas-dia::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.citas-dia::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.evento-mini,
.cita-mini {
    background: #e8f5e8;
    border-left: 3px solid var(--primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    margin: var(--spacing-xs) 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 42px;
    margin-bottom: 2px;
}

.evento-mini:hover,
.cita-mini:hover {
    background: #d4edda;
    transform: translateX(2px);
}

.evento-mini.mantenimiento {
    background: var(--mantenimiento);
    color: #000000;
    border-left-color: var(--warning);
    font-weight: 600;
}

.evento-mini.mantenimiento .hora,
.evento-mini.mantenimiento .cliente {
    color: #000000 !important;
    text-shadow: none !important;
}

.evento-mini .hora,
.cita-mini .hora {
    font-weight: 700;
    color: #000000;
    margin-right: 4px;
    display: block;
    width: 100%;
    font-size: 11px;
    margin-bottom: 2px;
    text-shadow: none;
    line-height: 1.1;
}

.evento-mini .cliente,
.cita-mini .cliente {
    text-transform: uppercase;
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    color: #000000;
    text-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
}

.mas-eventos,
.mas-citas {
    text-align: center;
    color: var(--primary);
    font-weight: 400;
    margin-top: var(--spacing-xs);
    font-size: 0.7rem;
}

/* Estados de citas */
.cita-mini.estado-confirmada,
.estado-confirmada {
    border-left-color: var(--success);
}

.cita-mini.estado-pendiente,
.estado-pendiente {
    border-left-color: var(--warning);
    background: var(--mantenimiento);
    color: #000000;
    border: 1px solid var(--mantenimiento);
    font-weight: 600;
}

.cita-mini.estado-cancelada,
.estado-cancelada {
    border-left-color: var(--error);
    opacity: 0.6;
}

.cita-mini.estado-completada,
.estado-completada {
    border-left-color: var(--info);
}

.estado-programada {
    color: var(--success);
    font-weight: bold;
}

/* ============================================
   MODALES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--surface);
    margin: 5% auto;
    border-radius: var(--radius) !important;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(180deg, #fbfbfb 0%, #f0f0f0 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);
}

.modal-header h3,
.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.close,
.cerrar {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
    border: 0.5px solid rgba(0,0,0,0.15);
    color: transparent;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover,
.cerrar:hover {
    background: #ff3b30;
}

.close:before,
.cerrar:before {
    content: "×";
    position: absolute;
    color: rgba(0,0,0,0.5);
    font-size: 16px;
    line-height: 11px;
    width: 100%;
    text-align: center;
    font-weight: 500;
}

/* Componentes específicos de modales */
.detalle-cita {
    max-height: 70vh;
    overflow-y: auto;
}

.info-grupo {
    background: var(--surface-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.info-grupo h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
}

.info-grupo p {
    margin: 8px 0;
    line-height: 1.4;
}

/* Modal de error de validacion */
.mensaje-error-validacion {
    background: #fee2e2;
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 20px;
    color: #991b1b;
}

.mensaje-error-validacion p {
    color: #991b1b;
    font-size: 15px;
}

.mensaje-error-validacion ul {
    color: #991b1b;
    font-size: 14px;
    line-height: 1.8;
}

.mensaje-error-validacion li {
    color: #991b1b;
}

#modalErrorValidacion .modal-header {
    background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
    border-bottom: 2px solid #dc2626;
}

#modalErrorValidacion .modal-header h3 {
    color: #991b1b;
    font-weight: 700;
}

#modalErrorValidacion .btn-close {
    background: #dc2626;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

#modalErrorValidacion .btn-close:hover {
    background: #b91c1c;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-container h2 {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
}

.seccion-formulario {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.seccion-formulario:last-of-type {
    border-bottom: none;
}

.seccion-formulario h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row-triple .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea,
.p-input,
.p-select,
.p-textarea,
input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.p-input:focus,
.p-select:focus,
.p-textarea:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 90, 62, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Formulario de mantenimiento compacto */
#formMantenimiento .form-group {
    margin-bottom: 8px;
}

#formMantenimiento .form-group label {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 600;
    display: block;
    color: var(--primary);
}

#formMantenimiento .p-input,
#formMantenimiento .p-select,
#formMantenimiento .p-textarea,
#formMantenimiento input,
#formMantenimiento select,
#formMantenimiento textarea {
    padding: 6px 10px !important;
    font-size: 12px !important;
    height: 32px !important;
    line-height: 1.2 !important;
}

#formMantenimiento .p-textarea,
#formMantenimiento textarea {
    height: auto !important;
    min-height: 60px !important;
    resize: vertical !important;
}

#formMantenimiento .modal-actions {
    margin-top: 15px !important;
    padding-top: 10px !important;
}

#formMantenimiento .modal-actions .p-btn,
#formMantenimiento .modal-actions .btn-primary,
#formMantenimiento .modal-actions .btn-secondary {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* Estilos específicos */
#hora_cita {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

#hora_cita:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 100, 54, 0.1);
}

#hora_cita option:disabled {
    color: #ccc;
    background-color: #f5f5f5;
}

/* ============================================
   BOTONES
   ============================================ */

.btn-primary,
.p-btn-primary,
.btn-nav {
    background: var(--primary) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-white) !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.btn-primary:hover,
.p-btn-primary:hover,
.btn-nav:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-secondary,
.p-btn-secondary {
    background: #8E8E93 !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-white) !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.btn-secondary:hover,
.p-btn-secondary:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

/* Botón CERRAR para modales mejorado */
.btn-close {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    height: fit-content !important;
    display: inline-block !important;
}

.btn-close:hover {
    background: #5a6268 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Mejorar header de modales */
.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 24px 16px !important;
    border-bottom: 1px solid #e9ecef !important;
}

.modal-header h3,
.modal-header h2 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
}

/* Ocultar el símbolo & times; viejo */
.close {
    display: none !important;
}

.btn-success {
    background: var(--success) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-white) !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
}

.btn-success:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-danger {
    background: var(--error) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-white) !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
}

.btn-danger:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-warning {
    background: var(--warning) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    color: var(--text) !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: var(--transition) !important;
    cursor: pointer !important;
}

.btn-warning:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

/* ============================================
   MENSAJES
   ============================================ */

.mensaje-exito {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid #a7f3d0;
    font-family: 'Inter', sans-serif;
}

.mensaje-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    font-family: 'Inter', sans-serif;
}

/* ============================================
   REPORTES Y TABS
   ============================================ */

.tabs-container {
    margin-bottom: 20px;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 20px;
}

.tab-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    color: #666;
    transition: var(--transition);
    margin-right: 2px;
    font-family: 'Inter', sans-serif;
}

.tab-button.active {
    background: var(--primary);
    color: var(--text-white);
    border-bottom: 2px solid var(--primary);
}

.tab-button:hover:not(.active) {
    background: rgba(52, 100, 54, 0.1);
    color: var(--primary);
}

.tab-content {
    display: none;
    padding: 20px;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tab-content.active {
    display: block;
}

/* Tablas */
.tabla-reportes,
.clientes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Inter', sans-serif;
}

.tabla-reportes th,
.tabla-reportes td,
.clientes-table th,
.clientes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.tabla-reportes th,
.clientes-table th {
    background: var(--surface-light);
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.tabla-reportes tr:hover,
.clientes-table tr:hover {
    background: var(--surface-light);
}

/* ============================================
   INFORMACIÓN Y GRIDS
   ============================================ */

.info-grid {
    display: grid;
    gap: 0.75rem;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--surface-light);
}

.info-row.highlight {
    background: #fff9e6;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
}

.info-row label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-row span {
    color: var(--text);
    font-weight: 500;
}

.fecha-destacada {
    color: #C1A20A !important;
    font-weight: 600 !important;
}

.cantidad {
    color: var(--success) !important;
    font-weight: 600 !important;
}

.si {
    color: var(--success) !important;
    font-weight: 600 !important;
}

.no {
    color: #6c757d !important;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .calendario-plantilla,
    .calendario {
        border-radius: 0;
        margin: 0;
    }

    .calendario-header,
    .navegacion-calendario {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }

    .mes-año {
        font-size: 1.25rem;
    }

    .listados-selector {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 16px;
    }

    .selector-grupo {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .select-listados {
        width: 100%;
        max-width: none;
    }

    .leyenda-colores {
        width: 100%;
        justify-content: flex-start;
        gap: 16px;
    }

    .leyenda-item {
        font-size: 11px;
    }

    .color-box {
        width: 12px;
        height: 12px;
    }

    .nav-mes {
        font-size: 1.5rem;
        padding: var(--spacing-xs) var(--spacing-lg);
    }

    .dias-semana .dia-semana {
        padding: var(--spacing-md);
        font-size: 0.8rem;
    }

    .dia {
        height: 100px;
        min-height: 100px;
        padding: var(--spacing-sm);
    }

    .numero-dia {
        font-size: 0.9rem;
        font-weight: 500;
    }

    .contador-reservas {
        font-size: 0.6rem;
        padding: 1px 4px;
        font-weight: 500;
    }

    .evento-mini,
    .cita-mini {
        font-size: 0.65rem;
        padding: 1px 3px;
        min-height: 36px;
    }

    .evento-mini .hora,
    .cita-mini .hora {
        font-size: 10px;
    }

    .evento-mini .cliente,
    .cita-mini .cliente {
        font-size: 10px;
    }

    .form-container {
        margin: var(--spacing-lg);
        padding: 16px;
        max-width: calc(100% - 32px);
    }

    .form-row,
    .form-row-triple {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .info-row label {
        font-size: 0.75rem;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .main-container,
    .container {
        margin: 10px;
        padding: 16px;
        max-width: calc(100% - 20px);
    }
}

@media (max-width: 480px) {
    .calendario-header,
    .navegacion-calendario {
        padding: var(--spacing-lg);
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .mes-año {
        font-size: 1.1rem;
    }

    .nav-mes {
        font-size: 1.3rem;
    }

    .dia {
        height: 80px;
        padding: 4px;
    }

    .numero-dia {
        font-size: 0.8rem;
    }

    .evento-mini,
    .cita-mini {
        font-size: 0.6rem;
        margin: 1px 0;
    }

    .main-container,
    .container {
        margin: 5px;
        padding: 12px;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */

.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

.bg-white {
    background-color: var(--surface) !important;
}

.text-white {
    color: var(--text-white) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Estadísticas y cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Búsqueda */
.search-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
}

/* Filtros de reportes */
.reporte-filters {
    background: var(--surface-light);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary);
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA NUEVA_CITA.PHP
   ============================================ */

.form-row-4-columnas {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 15px !important;
}

@media (max-width: 768px) {
    .form-row-4-columnas {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .form-row-4-columnas {
        grid-template-columns: 1fr !important;
    }
}

/* Estilos para la leyenda de horas ocupadas */
.leyenda-horas {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #856404;
    text-align: center;
}

#contador-horas-ocupadas {
    color: #d63031;
    font-weight: bold;
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA EDITARMANTENIMIENTO.PHP
   ============================================ */

.seccion-formulario {
    margin-bottom: 30px;
}

.seccion-formulario h3 {
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.dia.seleccionado {
    background-color: #e3f2fd !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Marcar fecha de cita en edición */
.dia.cita-actual-editando {
    background-color: #ffebee !important;
    border: 3px solid #d32f2f !important;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.4);
}

/* Marcar fecha de mantenimiento en edición */
.dia.mantenimiento-actual-editando {
    background-color: #ffebee !important;
    border: 3px solid #d32f2f !important;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.4);
}

/* Header mejorado para páginas de edición */
.page-header-container {
    background: linear-gradient(135deg, var(--primary) 0%, #2d5a3f 100%);
    color: white;
    margin: -30px -30px 30px -30px;
    padding: 30px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.page-icon {
    font-size: 48px;
    opacity: 0.9;
    min-width: 60px;
}

.page-title-section {
    flex: 1;
    text-align: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

.page-actions {
    min-width: 200px;
    display: flex;
    justify-content: flex-end;
}

.btn-header-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-header-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .page-icon {
        font-size: 36px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .page-actions {
        min-width: auto;
        justify-content: center;
    }
}

/* ============================================
   ESTILOS PARA PAGINA DE LLAMADAS
   ============================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #346436;
}

.page-header h1 {
    margin: 0;
    color: #346436;
    font-size: 2.2em;
    font-weight: bold;
}

.total-llamadas {
    background: #346436;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(52, 100, 54, 0.3);
}

.filtros-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filtros-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filtro-grupo label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.filtro-grupo input,
.filtro-grupo select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filtro-acciones {
    display: flex;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.tabla-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabla-llamadas {
    width: 100%;
    border-collapse: collapse;
}

.tabla-llamadas th {
    background: #346436;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.tabla-llamadas td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.fila-llamada.exitosa {
    background: #f8fff8;
}

.fila-llamada.no-exitosa {
    background: #fff8f8;
}

.estado-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.estado-badge.exitosa {
    background: #d4edda;
    color: #155724;
}

.estado-badge.no-exitosa {
    background: #f8d7da;
    color: #721c24;
}

.herramienta-badge {
    background: #d1ecf1;
    color: #0c5460;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.sin-herramienta {
    color: #6c757d;
    font-style: italic;
}

.btn-ver-detalle {
    background: #346436;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
}

.btn-ver-detalle:hover {
    background: #2d5530;
}

.mensaje-vacio {
    text-align: center;
    padding: 40px;
    color: #666;
}

.modal-content-ampliado {
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-content-ampliado .modal-header {
    flex-shrink: 0;
}

.modal-content-ampliado .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
    padding: 20px;
}

/* Acciones del modal de llamada */
.modal-content-ampliado .acciones-llamada {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 20px;
    border-top: 2px solid #e9ecef;
    margin: 15px -20px -20px -20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    z-index: 10;
}

.transcripcion-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
}

.info-llamada {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .page-header h1 {
        font-size: 1.8em;
    }

    .total-llamadas {
        align-self: center;
    }

    .filtros-form {
        flex-direction: column;
    }

    .filtro-grupo {
        min-width: 100%;
    }

    .tabla-llamadas {
        font-size: 0.9em;
    }

    .tabla-llamadas th,
    .tabla-llamadas td {
        padding: 8px;
    }
}

/* ============================================
   ESTILOS DEL HEADER Y NAVEGACION
   ============================================ */

/* Integración de Puppertino - Estilos Globales */
:root {
    --primary-col-ac: #346436;
    --p-input-bd: #d1d1d6;
    --primary: #346436;
    --secondary: #5856D6;
    --success: #34C759;
    --danger: #FF3B30;
    --warning: #C1A20A;
}

body {
    background: #346436 !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Header unificado */
.p-nav-bar {
    background: #346436 !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.2);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-content, .p-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    width: auto;
}

/* Menu principal unificado */
.menu-principal {
    display: flex;
    gap: 16px;
    align-items: center;
}

.menu-principal .menu-item {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    border-radius: 8px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.menu-principal .menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.menu-principal .menu-item.activo {
    background: #C1A20A !important;
    border-color: #C1A20A !important;
    color: white !important;
}

.btn-mantenimiento {
    background: #C1A20A !important;
    color: white !important;
    border: 1px solid #C1A20A !important;
}

.btn-mantenimiento:hover {
    background: #D4B523 !important;
    border-color: #D4B523 !important;
    transform: translateY(-1px);
}

.btn-logout {
    background: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
}

.btn-logout:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    transform: translateY(-1px);
}

/* Container principal */
.main-container, .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    margin: 20px auto;
    padding: 24px;
    max-width: 1200px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Botones Puppertino unificados */
.btn-primary, .p-btn-primary {
    background: var(--primary) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-primary:hover, .p-btn-primary:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-secondary, .p-btn-secondary {
    background: #8E8E93 !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-secondary:hover, .p-btn-secondary:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-success {
    background: var(--success) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-success:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-danger {
    background: var(--danger) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-danger:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-warning {
    background: var(--warning) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-warning:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

.btn-nav {
    background: var(--primary) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-nav:hover {
    background: var(--primary) !important;
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Inputs y forms unificados */
.p-input, .p-select, .p-textarea, input, select, textarea {
    background: white !important;
    border: 1px solid #d1d1d6 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
    font-family: inherit !important;
}

.p-input:focus, .p-select:focus, .p-textarea:focus, input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(52, 100, 54, 0.1), inset 0 1px 2px rgba(0,0,0,0.05) !important;
}

/* Modales unificados */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 12px !important;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 600px;
    width: 90%;
}

.modal-header {
    background: linear-gradient(180deg, #fbfbfb 0%, #f0f0f0 100%);
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3, .modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.close {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
    border: 0.5px solid rgba(0,0,0,0.15);
    color: transparent;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background: #ff3b30;
}

.close:before {
    content: "×";
    position: absolute;
    color: rgba(0,0,0,0.5);
    font-size: 16px;
    line-height: 11px;
    width: 100%;
    text-align: center;
    font-weight: 500;
}

/* Estilos para el select del menú */
.menu-select-container {
    display: flex;
    align-items: center;
    margin-left: 30px;
}

.menu-select {
    background: white;
    color: #333;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    min-width: 280px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu-select:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.menu-select:focus {
    outline: none;
    border-color: #FFD54F;
    box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.2);
}

.menu-select option {
    padding: 10px;
    background: white;
    color: #333;
    font-weight: 500;
}

.menu-select option[selected] {
    background: #e8f5e9;
    font-weight: 700;
}

/* Responsive para header */
@media (max-width: 768px) {
    .header-content, .p-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 10px;
    }

    .menu-principal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .menu-principal .menu-item,
    .menu-button.btn-mantenimiento {
        padding: 6px 12px;
        font-size: 13px;
    }

    .main-container, .container {
        margin: 10px;
        padding: 16px;
        max-width: calc(100% - 20px);
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .menu-select-container {
        margin-left: 0;
        margin-top: 10px;
    }

    .menu-select {
        min-width: 250px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .menu-principal {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    .menu-principal .menu-item,
    .menu-button.btn-mantenimiento {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .main-container, .container {
        margin: 5px;
        padding: 12px;
    }
}

/* === ESTILOS PARA MODAL DE CONFIRMACIÓN DE ELIMINACIÓN === */
#modalConfirmarEliminacion {
    z-index: 10000;
}

#modalConfirmarEliminacion .modal-content {
    border: 2px solid #d73925;
    box-shadow: 0 8px 25px rgba(215, 57, 37, 0.3);
}

#modalConfirmarEliminacion .modal-header {
    background-color: #d73925;
    color: white;
    border-bottom: 2px solid #b02a1a;
}

#modalConfirmarEliminacion .modal-header h3 {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#modalConfirmarEliminacion .btn-close {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 18px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
}

#modalConfirmarEliminacion .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#modalConfirmarEliminacion .p-btn-danger {
    background-color: #d73925;
    border-color: #d73925;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#modalConfirmarEliminacion .p-btn-danger:hover {
    background-color: #b02a1a;
    border-color: #b02a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 57, 37, 0.4);
}

#modalConfirmarEliminacion .modal-actions {
    gap: 15px;
    padding: 20px;
    justify-content: center;
}

/* Estilos para modal de éxito */
#modalNotificacion.exito .modal-header {
    background-color: #28a745;
    color: white;
}

#modalNotificacion.exito .p-btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

#modalNotificacion.exito .p-btn-primary:hover {
    background-color: #218838;
    border-color: #218838;
}

/* === ESTILOS PARA HISTORIAL DE ELIMINADAS === */
.tabla-eliminadas {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tabla-eliminadas th {
    background-color: #2c3e50;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.tabla-eliminadas td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.tabla-eliminadas tr:hover {
    background-color: #f8f9fa;
}

.cliente-nombre {
    font-weight: 600;
    color: #2c3e50;
}

.telefono {
    font-family: monospace;
    color: #495057;
}

.fecha-cita, .hora-cita, .fecha-eliminacion {
    color: #6c757d;
    font-size: 14px;
}

.kilogramos {
    text-align: right;
    font-weight: 600;
    color: #28a745;
}

.motivo-eliminacion {
    color: #dc3545;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
}

.tipo-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tipo-badge.citas {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tipo-badge.molienda {
    background-color: #fff3e0;
    color: #f57c00;
}

.select-accion {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 12px;
    cursor: pointer;
}

.select-accion:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.filtros-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filtros-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filtro-grupo label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.filtro-grupo input,
.filtro-grupo select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.filtro-acciones {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Responsive para móviles */
/* ===========================================
   REGISTROS ELIMINADOS - TABLA COMPACTA
   =========================================== */

.tabla-eliminados-container {
    margin-top: 24px;
}

.mensaje-vacio {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.icono-vacio {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.mensaje-vacio h3 {
    color: #666;
    font-size: 18px;
    margin-bottom: 8px;
}

.mensaje-vacio p {
    color: #888;
    font-size: 14px;
}

.tabla-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.tabla-eliminados-compacta {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.3;
}

.tabla-eliminados-compacta thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.tabla-eliminados-compacta th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #dee2e6;
}

.tabla-eliminados-compacta th:last-child {
    border-right: none;
}

.tabla-eliminados-compacta tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.tabla-eliminados-compacta tbody tr:hover {
    background: #f8f9fa;
}

.tabla-eliminados-compacta tbody tr:last-child {
    border-bottom: none;
}

.tabla-eliminados-compacta td {
    padding: 10px 8px;
    vertical-align: middle;
    border-right: 1px solid #f1f3f4;
}

.tabla-eliminados-compacta td:last-child {
    border-right: none;
}

/* Columnas específicas */
.col-tipo {
    width: 60px;
    text-align: center;
}

.col-cliente {
    width: 200px;
    min-width: 150px;
}

.col-telefono {
    width: 120px;
}

.col-fecha-cita {
    width: 90px;
}

.col-hora {
    width: 70px;
}

.col-kg {
    width: 80px;
    text-align: right;
}

.col-eliminacion {
    width: 90px;
}

.col-acciones {
    width: 100px;
    text-align: center;
}

/* Badges de tipo */
.badge-tipo {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tipo.citas {
    background: var(--primary);
    color: white;
}

.badge-tipo.molienda {
    background: #FFD54F;
    color: #000;
}

/* Contenido de celdas */
.cliente-nombre {
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.telefono {
    color: #666;
    font-family: monospace;
}

.fecha {
    color: var(--primary);
    font-weight: 500;
}

.hora {
    color: #FF6B35;
    font-weight: 500;
    font-family: monospace;
}

.kilogramos {
    color: #28A745;
    font-weight: 600;
}

.fecha-eliminacion {
    color: #dc3545;
    font-size: 11px;
    font-weight: 500;
}

/* Select de acciones */
.select-acciones {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 11px;
    cursor: pointer;
    width: 90px;
    transition: all 0.2s ease;
}

.select-acciones:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,102,204,0.1);
}

.select-acciones:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,102,204,0.2);
}

/* Responsive para tabla */
@media (max-width: 768px) {
    .tabla-eliminados-compacta {
        font-size: 12px;
    }

    .tabla-eliminados-compacta th,
    .tabla-eliminados-compacta td {
        padding: 8px 6px;
    }

    .col-cliente {
        width: 140px;
        min-width: 120px;
    }

    .col-telefono {
        width: 100px;
    }

    .filtros-form {
        grid-template-columns: 1fr;
    }

    .filtro-acciones {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .tabla-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabla-eliminados-compacta {
        min-width: 600px;
        font-size: 11px;
    }

    .tabla-eliminados-compacta th,
    .tabla-eliminados-compacta td {
        padding: 6px 4px;
    }

    .col-cliente {
        width: 120px;
        min-width: 100px;
    }

    .cliente-nombre {
        font-size: 11px;
        line-height: 1.1;
    }
}

/* ============================================
   ESTILOS MODAL DETALLE COMPACTO
   ============================================ */

.modal-content-detalle {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header-detalle {
    background: linear-gradient(135deg, #346436 0%, #2d5530 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #4a7c59;
}

.modal-header-detalle h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cerrar-modal {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cerrar-modal:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.detalle-compacto {
    padding: 25px;
}

/* FORMATO ULTRA COMPACTO PARA MODAL */
.detalle-ultra-compacto {
    padding: 15px;
}

.info-principal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 4px solid #346436;
}

.cliente-info {
    flex: 1;
}

.nombre-tipo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.tipo-badge-cita {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tipo-badge-molienda {
    background: #fff3e0;
    color: #f57c00;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nombre-tipo strong {
    font-size: 16px;
    color: #212529;
}

.telefono {
    color: #6c757d;
    font-size: 14px;
}

.cita-info {
    text-align: right;
}

.fecha-hora {
    margin-bottom: 5px;
}

.fecha {
    display: block;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.hora {
    display: block;
    color: #6c757d;
    font-size: 13px;
}

.kg-valor {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
}

.eliminacion-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.eliminado-por {
    color: #856404;
}

.eliminado-cuando {
    color: #6c757d;
    font-size: 12px;
}

.motivo-compacto,
.observaciones-compacto {
    background: #f1f3f4;
    border-left: 3px solid #6c757d;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 0 4px 4px 0;
}

.acciones-compactas {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.detalle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detalle-seccion {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px;
    border-left: 4px solid #346436;
}

.detalle-seccion h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: #346436;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.campo-grupo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.campo-grupo:last-child {
    border-bottom: none;
}

.etiqueta {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 80px;
}

.valor {
    color: #212529;
    font-weight: 500;
    font-size: 14px;
    text-align: right;
}

.tipo-cita {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.tipo-molienda {
    background: #fff3e0;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.detalle-seccion-completa {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detalle-seccion-completa h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: #346436;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #346436;
    padding-bottom: 8px;
}

.motivo-texto,
.observaciones-texto {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    border-left: 4px solid #6c757d;
}

.acciones-detalle {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

@media (max-width: 768px) {
    .modal-content-detalle {
        max-width: 95vw;
        margin: 10px;
    }

    .modal-header-detalle {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .detalle-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .detalle-compacto {
        padding: 20px 15px;
    }

    .campo-grupo {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .valor {
        text-align: left;
        font-weight: 600;
    }

    .acciones-detalle {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================
   ESTILOS PARA DETALLE COMPACTO DE CITA
   ============================================ */

.cita-compacta {
    max-width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
}

.info-lineas {
    background: var(--surface);
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0;
}

.linea-dato {
    display: flex;
    padding: 6px 15px;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
    min-height: 28px;
}

.linea-dato:last-child {
    border-bottom: none;
}

.linea-dato.observaciones {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 15px;
    background: #fafafa;
}

.etiqueta {
    width: 140px;
    flex-shrink: 0;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    padding-right: 10px;
}

.dato {
    flex: 1;
    color: #000;
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.3;
}

.dato.destacado {
    font-weight: 700;
    color: #2B5A3E;
    font-size: 0.9rem;
}

.dato.pendiente {
    color: #999;
    font-style: italic;
    font-size: 0.8rem;
}

.dato.estado-pendiente {
    color: #856404;
    font-weight: 600;
}

.dato.estado-confirmada {
    color: #155724;
    font-weight: 600;
}

.dato.estado-cancelada {
    color: #721c24;
    font-weight: 600;
}

.dato.estado-completada {
    color: #0c5460;
    font-weight: 600;
}

.link-contacto {
    color: #2B5A3E;
    text-decoration: none;
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 2px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.link-contacto:hover {
    background: #f0f8f0;
    border-color: #2B5A3E;
    text-decoration: none;
}

.observaciones-texto {
    margin-top: 4px;
    font-style: italic;
    color: #555;
    line-height: 1.4;
    font-size: 0.8rem;
}

.separador {
    height: 1px;
    background: #e0e0e0;
    margin: 3px 0;
}

.acciones-compactas {
    padding: 12px 15px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-accion-compacto {
    padding: 6px 14px;
    border: 1px solid #ccc;
    background: var(--surface);
    color: #333;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 140px;
}

.btn-accion-compacto.btn-transferir {
    border-color: #2B5A3E;
    color: #2B5A3E;
}

.btn-accion-compacto.btn-transferir:hover {
    background: #2B5A3E;
    color: white;
}

.btn-accion-compacto.btn-eliminar {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-accion-compacto.btn-eliminar:hover {
    background: #dc3545;
    color: white;
}

/* ============================================
   ESTILOS PARA DETALLE COMPACTO DE MANTENIMIENTO
   ============================================ */

.mantenimiento-compacto {
    max-width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
}

/* ============================================
   ESTILOS PARA EVENTOS COMPACTOS DEL DÍA
   ============================================ */

.evento-item-compacto {
    background: var(--surface);
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.evento-item-compacto:hover {
    border-color: #2B5A3E;
    box-shadow: 0 1px 3px rgba(43, 90, 62, 0.1);
}

.evento-lineas {
    padding: 0;
}

.linea-evento {
    display: flex;
    padding: 6px 15px;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
    min-height: 28px;
}

.linea-evento:last-child {
    border-bottom: none;
}

.linea-evento.click-info {
    background: #f8f9fa;
    padding: 4px 15px;
}

.etiqueta-evento {
    width: 140px;
    font-weight: 600;
    color: #555;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    line-height: 1.3;
}

.dato-evento {
    flex: 1;
    color: #333;
    font-weight: 400;
    line-height: 1.3;
    word-break: break-word;
}

.dato-evento.destacado {
    font-weight: 600;
    color: #2B5A3E;
}

.dato-evento-small {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .cita-compacta {
        font-size: 0.8rem;
    }

    .linea-dato {
        padding: 5px 12px;
        min-height: 26px;
    }

    .etiqueta {
        width: 110px;
        font-size: 0.7rem;
        padding-right: 8px;
    }

    .dato {
        font-size: 0.8rem;
    }

    .dato.destacado {
        font-size: 0.85rem;
    }

    .acciones-compactas {
        flex-direction: column;
        padding: 10px 12px;
        gap: 8px;
    }

    .btn-accion-compacto {
        width: 100%;
        min-width: auto;
        font-size: 0.7rem;
        padding: 8px 12px;
    }
}

/* ============================================
   ESTILOS PARA MODAL EVENTOS DEL DÍA COMPACTA
   ============================================ */

.eventos-dia-compacto {
    max-width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
}

.sin-eventos {
    text-align: center;
    padding: 40px 20px;
}

.mensaje-vacio {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.evento-item-compacto {
    background: var(--surface);
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.evento-item-compacto:hover {
    border-color: #2B5A3E;
    box-shadow: 0 2px 4px rgba(43, 90, 62, 0.1);
}

.evento-item-compacto:last-child {
    margin-bottom: 0;
}

.evento-lineas {
    padding: 0;
}

.linea-evento {
    display: flex;
    padding: 5px 15px;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
    min-height: 26px;
}

.linea-evento:last-child {
    border-bottom: none;
}

.etiqueta-evento {
    width: 100px;
    flex-shrink: 0;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    padding-right: 10px;
}

.dato-evento {
    flex: 1;
    color: #000;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.3;
}

.dato-evento.destacado {
    font-weight: 700;
    color: #2B5A3E;
    font-size: 0.85rem;
}

.dato-evento.estado-pendiente {
    color: #856404;
    font-weight: 600;
}

.dato-evento.estado-confirmada {
    color: #155724;
    font-weight: 600;
}

.dato-evento.estado-cancelada {
    color: #721c24;
    font-weight: 600;
}

.dato-evento.estado-completada {
    color: #0c5460;
    font-weight: 600;
}

.link-tel-evento {
    color: #2B5A3E;
    text-decoration: none;
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 2px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.link-tel-evento:hover {
    background: #f0f8f0;
    border-color: #2B5A3E;
    text-decoration: none;
}

.observaciones-evento {
    margin-top: 2px;
    font-style: italic;
    color: #555;
    line-height: 1.4;
    font-size: 0.75rem;
}

.separador-evento {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

/* Responsive para eventos del día */
@media (max-width: 768px) {
    .eventos-dia-compacto {
        font-size: 0.8rem;
    }

    .linea-evento {
        padding: 4px 12px;
        min-height: 24px;
    }

    .etiqueta-evento {
        width: 85px;
        font-size: 0.65rem;
        padding-right: 8px;
    }

    .dato-evento {
        font-size: 0.75rem;
    }

    .dato-evento.destacado {
        font-size: 0.8rem;
    }

    .mensaje-vacio {
        font-size: 0.85rem;
        padding: 30px 15px;
    }
}

/* ================================================================
   ESTILOS DE PAGINACIÓN
   ================================================================ */

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.btn-paginacion {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-paginacion:hover {
    background: #004080;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
    text-decoration: none;
    color: white;
}

.numeros-pagina {
    display: flex;
    align-items: center;
    gap: 5px;
}

.numero-pagina {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    border: 1px solid #ddd;
    background: white;
    transition: all 0.2s ease;
}

.numero-pagina:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.numero-pagina.activa {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.3);
}

.puntos {
    color: #666;
    font-weight: bold;
    padding: 0 5px;
    font-size: 16px;
}

/* Responsive para paginación */
@media (max-width: 768px) {
    .paginacion {
        flex-wrap: wrap;
        gap: 8px;
        margin: 20px 0;
        padding: 15px 0;
    }

    .btn-paginacion {
        padding: 6px 12px;
        font-size: 13px;
    }

    .numero-pagina {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .numeros-pagina {
        gap: 3px;
    }
}

/* ============================================
   ESTILOS DE LA PÁGINA DE LOGIN
   ============================================ */

/* Solo para la página de login - aplicar estos estilos cuando existe .login-container */
body:has(.login-container) {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #356535 0%, #2a5a2a 100%) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-card {
    background: white;
    border-radius: 16px;
    border: 3px solid #C1A20A;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, #356535 0%, #2a5a2a 100%);
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: #C1A20A;
}

.logo-main {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 400;
}

.login-body {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #356535;
    background: white;
    box-shadow: 0 0 0 4px rgba(53, 101, 53, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.password-container {
    position: relative;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #356535 0%, #2a5a2a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(193, 162, 10, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(53, 101, 53, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c33;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #28a745;
    animation: slideDown 0.5s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-footer {
    padding: 20px 30px;
    background: #f8f8f8;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.footer-text {
    color: #666;
    font-size: 13px;
}

.accent-line {
    width: 60px;
    height: 4px;
    background: #C1A20A;
    margin: 20px auto;
    border-radius: 2px;
}

@media (max-width: 480px) {
    .login-header {
        padding: 30px 20px;
    }

    .login-body {
        padding: 30px 20px;
    }

    .logo-main {
        width: 150px;
        height: 150px;
    }
}
