@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --surface-dark: #1e1e3f;/* Adjusted to match the template's feel */
    --primary-blue: #1976d2;
    --primary-blue-hover: #1b6ec2;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-blue: #64b5f6; /* User's header blue */
    --glass-bg: rgba(26, 26, 46, 0.95); /* #1a1a2e with opacity */
    --glass-border: rgba(255, 255, 255, 0.05);
}

html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark) !important;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--accent-blue);
}

.mud-layout {
    background-color: var(--bg-dark) !important;
}

/* Glassmorphism Classes - Premium Style */
.glass-panel {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.section-header {
    background: #1976d2;
    color: white !important;
    padding: 6px 16px;
    border-radius: 2px;
    font-weight: 500 !important;
    display: inline-flex;
    align-items: center;
}

.font-bold {
    font-weight: 700 !important;
}

.dashed-box {
    border: 1px dashed rgba(144, 202, 249, 0.2) !important;
    border-radius: 8px;
    padding: 16px;
    background: rgba(25, 118, 210, 0.03);
}

.mud-paper {
    background-color: var(--surface-dark) !important;
    color: var(--text-primary) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #1e2a3a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* MudBlazor Overrides for Dark Theme */
.mud-input-outlined.mud-input-underline:before {
    border-color: rgba(144, 202, 249, 0.2) !important;
}

.mud-input-label-outlined {
    background-color: var(--surface-dark) !important;
    padding: 0 8px !important;
    color: var(--text-secondary) !important;
}

.mud-input-slot {
    color: var(--text-primary) !important;
}

.mud-table {
    background-color: var(--surface-dark) !important;
    color: var(--text-primary) !important;
}

.mud-table-cell {
    color: var(--text-primary) !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

.mud-drawer {
    background-color: var(--surface-dark) !important;
}

.mud-nav-link {
    color: var(--text-secondary) !important;
}

.mud-nav-link.active {
    color: var(--text-primary) !important;
    background-color: rgba(144, 202, 249, 0.1) !important;
}

.mud-appbar {
    background-color: var(--surface-dark) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* --- MEJORAS DE VISIBILIDAD MUDTABLE (Surgical Fix) --- */
.mud-table-head .mud-table-cell {
    background-color: #1e1e3f !important; /* Surface Dark */
    color: #ffffff !important;
    font-weight: 700 !important;
}

.mud-table-pagination {
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
}

.mud-table-pagination .mud-icon-button {
    color: #ffffff !important;
}

.mud-table-pagination .mud-select-input {
    color: #ffffff !important;
}

.mud-table-pagination .mud-icon-root.mud-svg-icon {
    fill: #ffffff !important;
}

/* Filtros Alto Contraste */
.white-inputs .mud-input-label, 
.white-inputs .mud-input-slot {
    color: white !important;
}
.white-inputs .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.3) !important;
}
.white-text { color: white !important; }
.shadow-glow { box-shadow: 0 0 15px rgba(89, 74, 226, 0.3); }
.border-white-10 { border: 1px solid rgba(255,255,255,0.1) !important; }

/* --- ESTILOS PREMIUM PARA SELECTOR DE FECHAS (MudDatePicker) --- */

/* Contenedor del Popover (Calendario desplegable) */
.mud-picker-inline-paper {
    background: rgba(15, 23, 42, 0.95) !important; /* Deep dark blue semi-transparent */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    overflow: hidden;
}

/* El "Cabezón" (Encabezado del Picker) - Lo hacemos más elegante y compacto */
.mud-picker-toolbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    padding: 12px 20px !important;
    min-height: 80px !important; /* Reducido de los ~120px por defecto */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mud-picker-toolbar .mud-typography {
    color: white !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Título del año en el encabezado */
.mud-picker-toolbar .mud-picker-toolbar-title {
    opacity: 0.7;
    font-size: 0.85rem !important;
}

/* Título de la fecha seleccionada */
.mud-picker-toolbar .mud-picker-toolbar-text {
    font-size: 1.25rem !important;
    margin-top: 4px;
}

/* Navegación del Calendario (Mes anterior/siguiente) */
.mud-picker-calendar-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 8px !important;
}

.mud-picker-calendar-header .mud-typography {
    color: #f8fafc !important;
    font-weight: 600 !important;
}

.mud-picker-calendar-header .mud-icon-button {
    color: #94a3b8 !important;
}

.mud-picker-calendar-header .mud-icon-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
}

/* Días del Calendario */
.mud-day {
    color: #cbd5e1 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease;
}

.mud-day:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    color: white !important;
}

/* Día seleccionado */
.mud-selected {
    background: #2563eb !important; /* Azul Glomedical */
    color: white !important;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
    font-weight: 700 !important;
}

/* Día actual (Hoy) */
.mud-current {
    color: #3b82f6 !important;
    font-weight: 700 !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Nombres de los días (Dom, Lun...) */
.mud-day-label {
    color: #64748b !important;
    font-weight: 500 !important;
    text-transform: lowercase;
}

/* --- FOOTER PREMIUM & DISCRETO --- */
.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    width: 100%;
}

.footer-divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    margin-bottom: 0.8rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(148, 163, 184, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-link:hover {
    color: rgba(148, 163, 184, 1) !important;
    transform: translateY(-2px);
}

.footer-brand {
    font-weight: 700;
    color: rgba(59, 130, 246, 0.5);
    transition: color 0.3s;
}

.footer-link:hover .footer-brand {
    color: #3b82f6;
}
