/* ==================================================
   EXALAB OFICINA VIRTUAL — Modern Clinical UI
   Palette: Navy #102f5b | Emerald #32e7ba | Blue #2374e7
   ================================================== */

*, *::before, *::after {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* ===== Sidebar / Drawer ===== */
.exalab-drawer {
    border-right: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 2px 0 8px rgba(0,0,0,0.02) !important;
}

.exalab-drawer .mud-nav-link {
    border-radius: 8px;
    margin: 4px 16px;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s ease;
}

.exalab-drawer .mud-nav-link:hover {
    background-color: #f8fafc;
    color: #3ba8dd;
}

.exalab-drawer .mud-nav-link.active {
    background-color: rgba(59, 168, 221, 0.1) !important;
    color: #3ba8dd !important;
    font-weight: 600;
}

.exalab-drawer .mud-nav-link .mud-nav-link-icon {
    color: #94a3b8;
    transition: color 0.2s;
}

.exalab-drawer .mud-nav-link:hover .mud-nav-link-icon,
.exalab-drawer .mud-nav-link.active .mud-nav-link-icon {
    color: #3ba8dd !important;
}

/* ===== AppBar ===== */
.exalab-appbar {
    background-color: #ffffff !important;
    color: #334155 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    height: 70px !important;
}

/* ===== Main Content Area ===== */
.exalab-main-content {
    background-color: #f2f6fd !important;
    min-height: 100vh;
}

/* ===== Cards — Modern Clinical ===== */
.mud-card {
    border-radius: 16px !important;
    border: none !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(16, 47, 91, 0.08), 0 1px 2px rgba(0,0,0,0.02) !important;
}

.mud-card-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
}

.mud-card-content {
    padding: 24px !important;
}

/* ===== Buttons ===== */
.mud-button-root {
    border-radius: 50px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    padding: 8px 16px !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.mud-button-root:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px);
}

.mud-button-filled.mud-button-primary {
    background-color: #2374e7 !important;
    color: #ffffff !important;
}

.mud-button-filled.mud-button-secondary {
    background-color: #32e7ba !important;
    color: #ffffff !important;
}

.mud-button-filled.mud-button-info {
    background-color: #102f5b !important;
    color: #ffffff !important;
}

/* ===== DataGrid / Table — Estilo Minimalista (Corregido) ===== */
.mud-table-container {
    border-radius: 0 !important;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: none !important;
    border: 1px solid #e2e8f0;
}

.mud-table .mud-table-head .mud-table-cell {
    background-color: #cffafe !important;
    color: #155e75 !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #a5f3fc !important;
    padding: 8px 16px !important;
}

/* Header sort labels compact */
.mud-table .mud-table-head .mud-table-cell .mud-table-sort-label {
    padding: 0 !important;
    margin: 0 !important;
}

    .mud-table .mud-table-head .mud-table-cell .mud-icon-root {
        fill: #94a3b8 !important;
    }

.mud-table .mud-table-head .mud-input-root {
    margin-top: 4px;
    background-color: #f8fafc; 
}
/* ===== Inputs / Form Controls ===== */
.mud-input-control > .mud-input-root-outlined {
    background-color: #f8fafc !important;
    border-radius: 12px !important;
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.mud-input-outlined-border {
    border-color: #e2e8f0 !important;
}

.mud-input-control > .mud-input-root-outlined:focus-within {
    box-shadow: 0 0 0 3px rgba(35, 116, 231, 0.15) !important;
    background-color: #ffffff !important;
}

.mud-input-control > .mud-input-root-outlined:focus-within .mud-input-outlined-border {
    border-color: #2374e7 !important;
    border-width: 1px !important; /* Keep it subtle */
}

/* Labels for inputs */
.mud-input-label-outlined {
    color: #64748b !important;
    background-color: #ffffff !important;
    padding: 0 4px !important;
}

.mud-input-label-outlined.mud-input-label-inputcontrol {
    font-size: 0.9rem !important;
}

/* ===== Chips ===== */
.mud-chip {
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    padding: 0 10px !important;
}

/* ===== Dialog ===== */
.mud-dialog {
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.mud-dialog .mud-dialog-title {
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
}

/* ===== Divider ===== */
.mud-divider {
    border-color: #e2e8f0 !important;
}

/* ===== Snackbar ===== */
.mud-snackbar {
    border-radius: 8px !important;
}

/* ===== DataGrid / Table Overrides ===== */
.mud-table-head .mud-table-cell {
    background-color: #cffafe !important;
    color: #155e75 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}
.mud-table-head .mud-table-cell:first-child {
    border-top-left-radius: 0 !important;
}
.mud-table-head .mud-table-cell:last-child {
    border-top-right-radius: 0 !important;
}

/* Evitar sombra abajo de la tabla */
.mud-table-container {
    box-shadow: none !important;
}

/* Quitar radius inferior del paginador */
.mud-table-pagination {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Smaller Table buttons */
.exalab-table-btn {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    height: auto !important;
    min-width: auto !important;
}
.exalab-table-btn .mud-icon-root {
    font-size: 1rem !important;
    margin-right: 4px !important;
}

/* ===== Scrollbar Custom ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* ===== Transitions ===== */
.mud-nav-link,
.mud-button-root,
.mud-chip,
.mud-card,
.mud-table-row {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Toolbar ButtonGroup (joined buttons) ===== */
.cabecera-toolbar .mud-button-group-root {
    gap: 0 !important;
}

.cabecera-toolbar .mud-button-group-root > .mud-button-root {
    border-radius: 0 !important;
    margin: 0 !important;
}

.cabecera-toolbar .mud-button-group-root > .mud-button-root:first-child {
    border-top-left-radius: 4px !important;
    border-bottom-left-radius: 4px !important;
}

.cabecera-toolbar .mud-button-group-root > .mud-button-root:last-child {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

.cabecera-toolbar .mud-button-group-root > .mud-button-root + .mud-button-root {
    border-left: none !important;
}
