/* --- TOKENS DE DISEÑO DE PALETA DE COLORES --- */
:root {
    --input-bg: #f8fafc;
    --table-header-bg: #f1f5f9;
    --table-header-color: #475569;
    --table-row-hover: #f8fafc;
    --sidebar-profile-bg: #f8fafc;
    --sidebar-profile-hover: #f1f5f9;
    --sidebar-profile-border: #e2e8f0;
    --gradient-banner: linear-gradient(135deg, #15803d 0%, #047857 100%);
}

html.theme-cherry {
    --gradient-banner: linear-gradient(135deg, #c21a30 0%, #ea580c 100%);
}

/* Modo oscuro general (Pizarra/Oscuro original) */
.mud-dark {
    --input-bg: #1e293b;
    --table-header-bg: #1e293b;
    --table-header-color: #94a3b8;
    --table-row-hover: #1e293b;
    --sidebar-profile-bg: #1e293b;
    --sidebar-profile-hover: #334155;
    --sidebar-profile-border: #334155;
}

/* Modo oscuro cherry/terracota */
.theme-cherry.mud-dark {
    --input-bg: #1c1616;
    --table-header-bg: #1c1616;
    --table-header-color: #b5a8a6;
    --table-row-hover: #1c1616;
    --sidebar-profile-bg: #1c1616;
    --sidebar-profile-hover: #2f2524;
    --sidebar-profile-border: #2f2524;
}

html, body {
    font-family: 'Outfit', 'Roboto', sans-serif;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.mud-main-content {
    min-height: calc(100vh - 64px);
    background-color: var(--mud-palette-background);
}

/* --- ESTILO PARA COMPONENTES DE ENTRADA (CUSTOM INPUTS) --- */
.radius-fondo-personalizado .mud-input-slot {
    background-color: var(--input-bg) !important;
    border-radius: 8px !important;
}

.radius-fondo-personalizado .mud-input-slot input,
.radius-fondo-personalizado .mud-input-slot textarea {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 500 !important;
}

.radius-fondo-personalizado .mud-input-adornment.mud-input-adornment-end {
    background-color: var(--input-bg) !important;
}

.radius-fondo-personalizado .mud-input-control-input-container {
    background-color: var(--input-bg) !important;
    border-radius: 8px !important;
}

.radius-fondo-personalizado.mud-select > .mud-input-control > .mud-input-control-input-container {
    background-color: var(--input-bg) !important;
    border-radius: 8px !important;
}

/* Modificaciones de bordes para inputs */
.radius-fondo-personalizado .mud-input-root,
.radius-fondo-personalizado .mud-input-control,
.radius-fondo-personalizado fieldset {
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out !important;
}

.radius-fondo-personalizado .mud-input-root-outlined.mud-input-root-focused fieldset {
    border-width: 2px !important;
    border-color: var(--mud-palette-primary) !important;
}

/* MudSelect */
.radius-fondo-personalizado .mud-select,
.radius-fondo-personalizado .mud-input-root {
    border-radius: 8px !important;
}

/* MudDatePicker */
.radius-fondo-personalizado .mud-input-root {
    border-radius: 8px !important;
}

/* --- ESTILOS DE TABLAS MODERNAS --- */
.mud-table-root {
    border-radius: 12px !important;
    overflow: hidden;
}

.mud-table-header-cell {
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-color) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px !important;
}

.mud-table-cell {
    padding: 12px 16px !important;
    font-size: 0.875rem !important;
    color: var(--mud-palette-text-primary) !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
}

.mud-table-row {
    transition: background-color 0.2s ease;
}

.mud-table-row:hover {
    background-color: var(--table-row-hover) !important;
}

/* Reducir tamaño de Table si es compacta, pero manteniendo legibilidad */
.compact-table .mud-table-cell,
.compact-table .mud-table-header-cell {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
}

.compact-table .mud-table {
    font-size: 0.8rem !important;
}

/* Reducir tamaño de inputs compactos */
.compact-input .mud-input-root {
    height: 32px !important;
    min-height: 32px !important;
    font-size: 0.8rem !important;
}

.compact-input input {
    padding: 4px 8px !important;
}

/* MudChip mini */
.chip-mini {
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
    height: 22px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* Adornment sizes */
.adornment-small .mud-input-adornment .mud-icon-root,
.adornment-small .mud-input-adornment .mud-input-adornment-text {
    font-size: 14px;
}

.adornment-medium .mud-input-adornment .mud-icon-root,
.adornment-medium .mud-input-adornment .mud-icon-root,
.adornment-medium .mud-input-adornment .mud-input-adornment-text {
    font-size: 18px;
}

.adornment-large .mud-input-adornment .mud-icon-root,
.adornment-large .mud-input-adornment .mud-input-adornment-text {
    font-size: 22px;
}

/* --- MEJORAS ADICIONALES DE UI --- */
.gradient-banner {
    background: var(--gradient-banner) !important;
    color: white;
}

.hover-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.sidebar-profile {
    background-color: var(--sidebar-profile-bg);
    border-radius: 12px;
    border: 1px solid var(--sidebar-profile-border);
    transition: background-color 0.2s;
}

.sidebar-profile:hover {
    background-color: var(--sidebar-profile-hover);
}

/* SweetAlert2 above MudDialog */
.swal2-container {
    z-index: 99999 !important;
}
.swal2-popup {
    z-index: 99999 !important;
}

/* SweetAlert2 buttons custom styling */
.swal2-confirm.swal2-styled {
    background-color: var(--mud-palette-primary) !important;
    color: white !important;
    border-radius: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.swal2-cancel.swal2-styled {
    background-color: var(--mud-palette-background-grey, #f1f5f9) !important;
    color: var(--mud-palette-text-secondary, #475569) !important;
    border: 1px solid var(--mud-palette-divider, #e2e8f0) !important;
    border-radius: 8px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}