/* ==========================================================================
   Mesa de Servicio - Estilos Personalizados (Tonos Azules, Sombras y Transparencias)
   ========================================================================== */

:root {
    --primary-blue: #1d4ed8;
    --primary-blue-hover: #1e40af;
    --secondary-blue: #0284c7;
    --deep-navy: #0b192c;
    --dark-blue-card: rgba(15, 23, 42, 0.75);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-subtle: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-border-blue: rgba(56, 189, 248, 0.25);
    --card-shadow: 0 12px 35px -8px rgba(13, 59, 102, 0.18), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 20px 45px -10px rgba(29, 78, 216, 0.28), 0 8px 15px -4px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 8px 24px rgba(14, 165, 233, 0.12);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.8) 0%, rgba(240, 249, 255, 0.6) 40%, rgba(219, 234, 254, 0.8) 90%),
                linear-gradient(135deg, #f0f7ff 0%, #e0eefd 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1e293b;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Navbar con transparencia y tono azul */
.navbar-custom {
    background: rgba(11, 25, 44, 0.88) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 20px rgba(11, 25, 44, 0.15);
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: 0.5px;
}

.navbar-custom .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 0.5rem 0.9rem !important;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #ffffff !important;
    background: rgba(56, 189, 248, 0.15);
}

/* Tarjetas Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.glass-card-header {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(2, 132, 199, 0.05) 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1.25rem 1.25rem 0 0 !important;
    padding: 1.25rem 1.5rem;
}

/* Banner Principal */
.hero-banner {
    background: linear-gradient(135deg, #0f274a 0%, #1e40af 50%, #0369a1 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(15, 39, 74, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Botones con gradientes y sombras azules */
.btn-primary-custom {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35);
    transition: all 0.25s ease;
    border-radius: 0.65rem;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #1e40af 0%, #0369a1 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.45);
}

.btn-outline-custom {
    color: #1d4ed8;
    border: 1.5px solid #2563eb;
    background: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    border-radius: 0.65rem;
    transition: all 0.25s ease;
}

.btn-outline-custom:hover {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.25);
}

/* Tarjetas de Estadísticas */
.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(2, 132, 199, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Badges de Estados */
.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    padding: 0.4em 0.85em;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    line-height: 1.2;
    text-align: center;
}

.badge-status-abierto {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status-proceso {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-status-resuelto {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status-cerrado {
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Controles de Formulario Glassmórficos */
.form-control-custom, .form-select-custom {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.form-control-custom:focus, .form-select-custom:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background: #ffffff !important;
}

/* Tabla traslúcida */
.table-glass {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(239, 246, 255, 0.6);
}

.table-glass th {
    background: rgba(241, 245, 249, 0.8);
    font-weight: 600;
    color: #334155;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    border-bottom: 2px solid #e2e8f0;
}

/* Burbujas de Respuestas de Conversación */
.chat-bubble {
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.chat-bubble-agent {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(219, 234, 254, 0.8) 100%);
    border-left: 4px solid #2563eb;
    margin-left: 2rem;
}

.chat-bubble-client {
    background: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #0284c7;
    margin-right: 2rem;
}

@keyframes chatFadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-bubble-new {
    animation: chatFadeIn 0.35s ease-out forwards;
}

/* Footer elegante */
.footer-custom {
    background: rgba(11, 25, 44, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    color: #94a3b8;
    padding: 1.75rem 0;
    font-size: 0.88rem;
}

/* Modales y Backdrop (Garantiza interacción y clic en Chrome/Firefox) */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1055 !important;
}

