/* Custom CSS for SIGEJ - Palette: Azul Marino (#0B1F3A), Dorado (#C9A227), Marfil (#F5F1E8), Gris Oscuro (#333333) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-family-sans-serif: 'Outfit', sans-serif;

    /* Official System Color Palette */
    --color-navy: #0B1F3A;             /* Azul marino (principal) */
    --color-navy-dark: #071324;
    --color-navy-light: #162e54;
    --color-gold: #C9A227;             /* Dorado (detalles) */
    --color-gold-hover: #b38e1e;
    --color-gold-subtle: rgba(201, 162, 39, 0.15);
    --color-ivory: #F5F1E8;            /* Marfil (fondos) */
    --color-ivory-dark: #eae4d5;
    --color-text-dark: #333333;        /* Gris oscuro (texto) */
    --color-text-muted: #555555;

    --primary-gradient: linear-gradient(135deg, #0B1F3A 0%, #162e54 100%);
    --gold-gradient: linear-gradient(135deg, #C9A227 0%, #dfb738 100%);
    --secondary-gradient: linear-gradient(135deg, #C9A227 0%, #b38e1e 100%);
    --bg-gradient: linear-gradient(180deg, #F5F1E8 0%, #ede7dc 100%);
    --card-shadow: 0 10px 15px -3px rgba(11, 31, 58, 0.05), 0 4px 6px -2px rgba(11, 31, 58, 0.03);
    --hover-shadow: 0 20px 25px -5px rgba(11, 31, 58, 0.12), 0 10px 10px -5px rgba(11, 31, 58, 0.05);
    --sidebar-width: 280px;
}

[data-theme="dark"] {
    --bg-gradient: linear-gradient(180deg, #071324 0%, #0B1F3A 100%);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    body {
        background: #071324;
        color: #F5F1E8;
    }
    .card {
        background-color: rgba(11, 31, 58, 0.75);
        border-color: rgba(201, 162, 39, 0.2);
        color: #F5F1E8;
    }
    .table {
        color: #F5F1E8;
        border-color: rgba(201, 162, 39, 0.15);
    }
    .table th, .table td {
        background-color: transparent !important;
        border-color: rgba(201, 162, 39, 0.15) !important;
        color: #e2e8f0 !important;
    }
    .text-muted {
        color: #a0aec0 !important;
    }
    .sidebar {
        background-color: #071324 !important;
        border-right: 1px solid rgba(201, 162, 39, 0.15) !important;
    }
    .navbar {
        background-color: rgba(11, 31, 58, 0.95) !important;
        border-bottom: 1px solid rgba(201, 162, 39, 0.15) !important;
    }
    .modal-content {
        background-color: #0B1F3A;
        color: #F5F1E8;
        border-color: rgba(201, 162, 39, 0.25);
    }
    .form-control, .form-select {
        background-color: #071324;
        border-color: rgba(201, 162, 39, 0.25);
        color: #F5F1E8;
    }
    .form-control:focus, .form-select:focus {
        background-color: #071324;
        color: #F5F1E8;
        border-color: #C9A227;
        box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
    }
    .list-group-item {
        background-color: rgba(11, 31, 58, 0.5);
        border-color: rgba(201, 162, 39, 0.15);
        color: #e2e8f0;
    }
    .breadcrumb-item a {
        color: #C9A227;
    }
}

body {
    font-family: var(--font-family-sans-serif);
    background: var(--bg-gradient);
    color: var(--color-text-dark);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   Bootstrap Global Overrides - Navy (#0B1F3A) & Gold (#C9A227) (No Purple)
   ========================================================================== */

.bg-primary {
    background-color: #0B1F3A !important;
    color: #ffffff !important;
}

.text-primary {
    color: #0B1F3A !important;
}

.border-primary {
    border-color: #0B1F3A !important;
}

.bg-primary-subtle {
    background-color: rgba(11, 31, 58, 0.08) !important;
    color: #0B1F3A !important;
}

.text-primary-subtle {
    color: #0B1F3A !important;
}

.btn-primary {
    background-color: #0B1F3A !important;
    border-color: #0B1F3A !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #162e54 !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #0B1F3A !important;
    border-color: #0B1F3A !important;
}

.btn-outline-primary:hover {
    background-color: #0B1F3A !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}

/* Links & Breadcrumbs in Official Palette */
a {
    color: #0B1F3A;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #C9A227;
}

.btn-link {
    color: #0B1F3A !important;
}

.btn-link:hover {
    color: #C9A227 !important;
}

.breadcrumb-item a {
    color: #0B1F3A !important;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #C9A227 !important;
}

.breadcrumb-item.active {
    color: #C9A227 !important;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #C9A227 !important;
}

/* Elimination of Purple - convert to Gold (#C9A227) & Navy (#0B1F3A) */
.bg-purple, [style*="#6f42c1"], [style*="#6366f1"] {
    background-color: #C9A227 !important;
    color: #0B1F3A !important;
    font-weight: 600;
}

.text-purple {
    color: #C9A227 !important;
}

.badge-gold {
    background-color: #C9A227 !important;
    color: #0B1F3A !important;
    font-weight: 600;
}

.text-gold {
    color: #C9A227 !important;
}

.bg-gold {
    background-color: #C9A227 !important;
    color: #0B1F3A !important;
}

.border-gold {
    border-color: #C9A227 !important;
}

/* Form focus rings in gold */
.form-control:focus, .form-select:focus {
    border-color: #C9A227;
    box-shadow: 0 0 0 0.25rem rgba(201, 162, 39, 0.25);
}

.form-check-input:checked {
    background-color: #C9A227;
    border-color: #C9A227;
}

/* Nav tabs active in Navy and Gold */
.nav-tabs .nav-link.active {
    color: #0B1F3A;
    border-bottom: 2px solid #C9A227;
}

/* Glassmorphism card styles */
.card {
    border-radius: 16px;
    border: 1px solid rgba(201, 162, 39, 0.18);
    box-shadow: var(--card-shadow);
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

/* Sidebar Custom Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: #ffffff;
    border-right: 1px solid #e5dfd3;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding-top: 1.5rem;
    transition: all 0.3s ease;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all 0.3s ease;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0B1F3A !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.sidebar-brand i {
    color: #C9A227;
}

.sidebar .nav-link {
    color: #555555;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 8px;
    margin: 0.2rem 1rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: #0B1F3A !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(11, 31, 58, 0.25);
    border-left: 4px solid #C9A227;
}

.sidebar .nav-link:hover i, .sidebar .nav-link.active i {
    color: #C9A227;
}

/* ==========================================================================
   Status Badges & Global Palette Enforcement
   ========================================================================== */
.badge-custom-verde, .badge-custom-amarillo, .badge-custom-naranja, .badge-custom-rojo {
    font-weight: 600;
}
.badge-custom-verde {
    background-color: #0B1F3A !important;
    color: #ffffff !important;
}
.badge-custom-amarillo {
    background-color: #C9A227 !important;
    color: #0B1F3A !important;
}
.badge-custom-naranja {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border: 1px solid #C9A227 !important;
}
.badge-custom-rojo {
    background-color: #0B1F3A !important;
    color: #C9A227 !important;
    border: 1px solid #C9A227 !important;
}

/* Fallback enforcement for bootstrap badges: strictly Navy, Gold, Ivory */
.badge {
    font-family: var(--font-family-sans-serif);
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 50rem;
    padding: 0.45em 0.85em;
}

.badge.bg-success {
    background-color: #0B1F3A !important;
    color: #ffffff !important;
    font-weight: 600;
}
.badge.bg-danger {
    background-color: #C9A227 !important;
    color: #0B1F3A !important;
    font-weight: 700;
}
.badge.bg-warning {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border: 1px solid #C9A227 !important;
    font-weight: 600;
}
.badge.bg-info {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border: 1px solid rgba(11, 31, 58, 0.25) !important;
    font-weight: 600;
}
.badge.bg-secondary {
    background-color: #F5F1E8 !important;
    color: #333333 !important;
    border: 1px solid rgba(201, 162, 39, 0.3) !important;
    font-weight: 600;
}
.badge.bg-light, .badge.bg-light.text-dark {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border: 1px solid rgba(201, 162, 39, 0.35) !important;
    font-weight: 600;
}

/* ==========================================================================
   Global Text Color Enforcement (High Contrast & Zero Non-Palette Colors)
   ========================================================================== */
.text-success {
    color: #0B1F3A !important;
}
.text-danger {
    color: #0B1F3A !important;
}
.text-warning {
    color: #C9A227 !important;
}
.text-info {
    color: #0B1F3A !important;
}
.text-secondary {
    color: #555555 !important;
}
.text-muted {
    color: #555555 !important;
}
.text-dark {
    color: #0B1F3A !important;
}

/* Sidebar and Navbar Logout styling */
.logout-link, .nav-link.text-danger, .dropdown-item.text-danger {
    color: #555555 !important;
    transition: all 0.2s ease;
}
.logout-link:hover, .nav-link.text-danger:hover, .dropdown-item.text-danger:hover {
    color: #0B1F3A !important;
    background-color: #F5F1E8 !important;
}
.logout-link i, .nav-link.text-danger i, .dropdown-item.text-danger i {
    color: #C9A227 !important;
}

/* Global Background Subtle & Light Overrides */
.bg-success-subtle, .bg-danger-subtle, .bg-warning-subtle, .bg-info-subtle, .bg-secondary-subtle {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border: 1px solid rgba(201, 162, 39, 0.3) !important;
    font-weight: 600;
}
.bg-light {
    background-color: #F5F1E8 !important;
}
.bg-dark {
    background-color: #0B1F3A !important;
    color: #ffffff !important;
}

/* Fallback enforcement for buttons: strictly Navy, Gold, and Ivory */
.btn-success {
    background-color: #C9A227 !important;
    border-color: #C9A227 !important;
    color: #0B1F3A !important;
    font-weight: 600;
}
.btn-success:hover, .btn-success:focus {
    background-color: #b38e1e !important;
    border-color: #b38e1e !important;
    color: #ffffff !important;
}
.btn-danger {
    background-color: #0B1F3A !important;
    border-color: #0B1F3A !important;
    color: #ffffff !important;
}
.btn-danger:hover, .btn-danger:focus {
    background-color: #162e54 !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}
.btn-warning {
    background-color: #C9A227 !important;
    border-color: #C9A227 !important;
    color: #0B1F3A !important;
    font-weight: 600;
}
.btn-warning:hover, .btn-warning:focus {
    background-color: #b38e1e !important;
    border-color: #b38e1e !important;
    color: #ffffff !important;
}
.btn-info {
    background-color: #0B1F3A !important;
    border-color: #0B1F3A !important;
    color: #C9A227 !important;
    font-weight: 600;
}
.btn-info:hover, .btn-info:focus {
    background-color: #162e54 !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}
.btn-secondary {
    background-color: #0B1F3A !important;
    border-color: #0B1F3A !important;
    color: #F5F1E8 !important;
    font-weight: 600;
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: #162e54 !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}
.btn-outline-secondary {
    background-color: #F5F1E8 !important;
    border: 1px solid rgba(201, 162, 39, 0.45) !important;
    color: #0B1F3A !important;
    font-weight: 600;
}
.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: #0B1F3A !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}
.btn-outline-danger {
    border-color: #0B1F3A !important;
    color: #0B1F3A !important;
}
.btn-outline-danger:hover {
    background-color: #0B1F3A !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}
.btn-outline-success {
    border-color: #C9A227 !important;
    color: #0B1F3A !important;
    background-color: #F5F1E8 !important;
}
.btn-outline-success:hover {
    background-color: #C9A227 !important;
    color: #0B1F3A !important;
}

/* Fallback enforcement for alerts */
.alert-success, .alert-danger, .alert-warning, .alert-info {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border: 1px solid rgba(201, 162, 39, 0.4) !important;
    font-weight: 500;
}

/* Border Utilities */
.border-danger, .border-success, .border-warning, .border-info {
    border-color: rgba(201, 162, 39, 0.35) !important;
}

/* Tables header styling */
.table thead.table-light, .table thead:not(.bg-primary) {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    border-bottom: 2px solid #C9A227 !important;
}
.table thead.table-light th, .table thead:not(.bg-primary) th {
    background-color: #F5F1E8 !important;
    color: #0B1F3A !important;
    font-weight: 700;
}

/* Form Controls */
.form-control, .form-select {
    border-color: rgba(201, 162, 39, 0.3);
    color: #333333;
}
.form-control:focus, .form-select:focus {
    border-color: #C9A227;
    box-shadow: 0 0 0 0.25rem rgba(201, 162, 39, 0.25);
    color: #333333;
}
.form-label {
    color: #0B1F3A;
    font-weight: 600;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: #0B1F3A !important;
    border-color: #C9A227 !important;
    color: #ffffff !important;
}
.pagination .page-link {
    color: #0B1F3A !important;
}

/* Interactive animations */
.btn-primary-gradient {
    background: linear-gradient(135deg, #0B1F3A 0%, #162e54 100%);
    border: 1px solid #C9A227;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(11, 31, 58, 0.25);
    transition: all 0.3s ease;
}
.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #C9A227 0%, #dfb738 100%);
    border-color: #C9A227;
    color: #0B1F3A;
    box-shadow: 0 6px 15px rgba(201, 162, 39, 0.35);
    transform: translateY(-2px);
}

.btn-secondary-gradient {
    background: var(--secondary-gradient);
    border: none;
    color: #0B1F3A;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(201, 162, 39, 0.2);
    transition: all 0.3s ease;
}
.btn-secondary-gradient:hover {
    box-shadow: 0 6px 15px rgba(201, 162, 39, 0.4);
    transform: translateY(-2px);
}

/* Timeline of case history */
.timeline {
    border-left: 2px solid #e5dfd3;
    padding-left: 1.5rem;
    position: relative;
}
.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.timeline-item::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #C9A227;
    border-radius: 50%;
    position: absolute;
    left: -22px;
    top: 6px;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 25px rgba(0,0,0,0.1);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .col-6 {
        width: 100%;
    }
    .main-content {
        padding: 0.75rem;
    }
    .navbar {
        padding: 0.75rem !important;
    }
    h2.fw-bold {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Gemini AI Copilot & Widget Styles - Navy (#0B1F3A) & Gold (#C9A227)
   ========================================================================== */

/* Floating Action Button (FAB) */
.gemini-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1040;
    background: linear-gradient(135deg, #0B1F3A 0%, #162e54 60%, #C9A227 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite, fabPulse 3s infinite;
    color: #ffffff !important;
    border: 1px solid #C9A227;
    border-radius: 50px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.45);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gemini-fab:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 35px rgba(201, 162, 39, 0.45);
    color: #ffffff;
}

.gemini-fab .fab-icon {
    font-size: 1.25rem;
    color: #C9A227;
    animation: sparkleSpin 4s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 10px 25px rgba(11, 31, 58, 0.4); }
    50% { box-shadow: 0 10px 35px rgba(201, 162, 39, 0.4); }
}

@keyframes sparkleSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Gemini Offcanvas Chat Drawer */
.gemini-chat-drawer {
    width: 440px !important;
    max-width: 95vw;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.15);
    border: none;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .gemini-chat-drawer {
    background: #071324;
    color: #F5F1E8;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.5);
}

.gemini-chat-header {
    background: linear-gradient(135deg, #0B1F3A 0%, #162e54 100%);
    color: #ffffff;
    padding: 1.15rem 1.25rem;
    border-top-left-radius: 20px;
    border-bottom: 2px solid #C9A227;
}

.gemini-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
    background: #F5F1E8;
}

[data-theme="dark"] .gemini-chat-messages {
    background: #071324;
}

/* Chat message bubbles */
.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 88%;
    animation: fadeInMsg 0.25s ease-out;
}

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

.chat-msg.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg.ai-msg {
    align-self: flex-start;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.chat-msg.user-msg .chat-avatar {
    background: #0B1F3A;
    color: #C9A227;
}

.chat-msg.ai-msg .chat-avatar {
    background: #C9A227;
    color: #0B1F3A;
}

.chat-bubble {
    padding: 0.85rem 1.05rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg.user-msg .chat-bubble {
    background: #0B1F3A;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-msg.ai-msg .chat-bubble {
    background: #ffffff;
    color: #333333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(201, 162, 39, 0.2);
}

[data-theme="dark"] .chat-msg.ai-msg .chat-bubble {
    background: #0B1F3A;
    color: #F5F1E8;
    border-color: rgba(201, 162, 39, 0.2);
}

/* Markdown formatting inside AI responses */
.chat-bubble h1, .chat-bubble h2, .chat-bubble h3, .chat-bubble h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    color: #0B1F3A;
}

[data-theme="dark"] .chat-bubble h1, 
[data-theme="dark"] .chat-bubble h2, 
[data-theme="dark"] .chat-bubble h3, 
[data-theme="dark"] .chat-bubble h4 {
    color: #C9A227;
}

.chat-bubble p {
    margin-bottom: 0.5rem;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble ul, .chat-bubble ol {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.chat-bubble li {
    margin-bottom: 0.25rem;
}

.chat-bubble code {
    background: rgba(11, 31, 58, 0.08);
    color: #0B1F3A;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

[data-theme="dark"] .chat-bubble code {
    background: rgba(201, 162, 39, 0.15);
    color: #C9A227;
}

.chat-bubble pre {
    background: #071324;
    color: #F5F1E8;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    overflow-x: auto;
    margin: 0.5rem 0;
    border: 1px solid rgba(201, 162, 39, 0.2);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #C9A227;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Quick prompt chips */
.quick-chips-container {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0.65rem 1rem;
    background: #eae4d5;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    white-space: nowrap;
    scrollbar-width: none;
}

.quick-chips-container::-webkit-scrollbar {
    display: none;
}

[data-theme="dark"] .quick-chips-container {
    background: rgba(7, 19, 36, 0.8);
    border-bottom-color: rgba(201, 162, 39, 0.15);
}

.quick-chip {
    font-size: 0.76rem;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-chip:hover {
    background: #0B1F3A;
    color: #ffffff;
    border-color: #C9A227;
    transform: translateY(-1px);
}

[data-theme="dark"] .quick-chip {
    background: #0B1F3A;
    border-color: rgba(201, 162, 39, 0.2);
    color: #F5F1E8;
}

/* Gemini Case Card in Expediente Show */
.ai-glass-card {
    border: 1px solid rgba(201, 162, 39, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 241, 232, 0.65));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .ai-glass-card {
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.9), rgba(7, 19, 36, 0.95));
    border-color: rgba(201, 162, 39, 0.3);
}

.ai-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0B1F3A, #C9A227, #0B1F3A);
}

.ai-output-box {
    background: #ffffff;
    border: 1px solid #e5dfd3;
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.65;
    max-height: 600px;
    overflow-y: auto;
}

[data-theme="dark"] .ai-output-box {
    background: #071324;
    border-color: rgba(201, 162, 39, 0.2);
    color: #F5F1E8;
}

.ai-output-box h1, .ai-output-box h2, .ai-output-box h3, .ai-output-box h4 {
    color: #0B1F3A;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .ai-output-box h1, 
[data-theme="dark"] .ai-output-box h2, 
[data-theme="dark"] .ai-output-box h3, 
[data-theme="dark"] .ai-output-box h4 {
    color: #C9A227;
}

.ai-output-box pre {
    background: #071324;
    color: #F5F1E8;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid rgba(201, 162, 39, 0.2);
}
@ m e d i a   p r i n t   {   . m a i n - c o n t e n t   {   m a r g i n - l e f t :   0   ! i m p o r t a n t ;   p a d d i n g :   0   ! i m p o r t a n t ;   }   b o d y   {   b a c k g r o u n d :   # f f f   ! i m p o r t a n t ;   }   }  
 