/* Logo ZIGU - centrado vertical en drawer/sidebar (base) */
.mud-drawer-header.zigu-drawer-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Forzar que MudBlazor no agregue padding extra */
.mud-drawer-header.zigu-drawer-logo::before,
.mud-drawer-header.zigu-drawer-logo::after {
    display: none !important;
}

.mud-drawer .mud-drawer-header.zigu-drawer-logo {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.mud-drawer-header.zigu-drawer-logo img,
.mud-drawer-header.zigu-drawer-logo .mud-image,
.mud-drawer-header.zigu-drawer-logo .mud-image img {
    display: block !important;
    vertical-align: middle;
    margin: 0 auto !important;
}

/* Modo expandido - logo completo */
.zigu-drawer-logo.expanded {
    min-height: 56px !important;
    height: 56px !important;
}

/* Wrapper para centrado vertical del logo expandido */
.zigu-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    line-height: 0;
}

.zigu-logo-wrapper .mud-image,
.zigu-logo-wrapper img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100%;
    height: auto;
}

/* Modo mini/collapsed del drawer */
.zigu-drawer-logo.mini {
    min-height: 56px !important;
    height: 56px !important;
}

.zigu-logo-icon-mini {
    width: 28px;
    height: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zigu-logo-icon-mini img {
    height: 28px;
    width: 28px;
    object-fit: cover;
    object-position: left center;
}

/* Responsivo - pantallas pequeñas */
@media only screen and (max-width: 960px) {
    .zigu-drawer-logo.expanded {
        min-height: 52px !important;
        height: 52px !important;
    }
    
    .zigu-logo-wrapper .mud-image,
    .zigu-logo-wrapper img {
        max-height: 32px;
    }
}

/*Action Buttons*/
.actionBox {

    opacity: 0.9;
    position: fixed;
    right: -7px;
    transform: translateY(-65px);
    border: solid 1px #dedede;
    border-radius: 10px;
    z-index: 1;
    padding-left: 15px;
    padding-right: 16px;
}


/*File Upload*/
.mud-input-control.mud-file-upload {
    align-items: flex-end;
}

.mud-file-upload label {
    padding: 10px 20px;
}

    .mud-file-upload label svg {
        height: 150px;
        width: 150px;
    }

.file-upload-form span svg {
    height: 25px;
    width: 25px;
}

/*Tables*/
.checkTableEnabled {
    background-color: #5ec35e;
    color: white !important;
    border-radius: 5px;
    height: 25px;
    width: 25px;
}

.checkTableDisabled {
    color: #e1e1e1 !important;
    border-radius: 5px;
    height: 25px;
    width: 25px;
    border: 1px solid #e1e1e1;
}


.mud-table {
    padding: 0 32px;
}

    .mud-table .mud-toolbar .mud-input-control {
        align-items: flex-end;
    }

        .mud-table .mud-toolbar .mud-input-control .mud-input-control-input-container {
            max-width: 300px;
        }


            .mud-table .mud-toolbar .mud-input-control .mud-input-control-input-container .mud-input-underline::before {
                border: none;
            }

            .mud-table .mud-toolbar .mud-input-control .mud-input-control-input-container .mud-input-underline::after {
                padding: 5px 10px;
            }

    .mud-table .mud-table-head .mud-table-cell {
        border: none;
    }

    .mud-table .mud-table-cell {
        font-weight: 600;
    }

    .mud-table .mud-table-body .mud-table-cell button {
        min-width: 35px;
        border-radius: 10px;
        opacity: 0.8;
    }

    .mud-table .mud-table-cell .column-header {
        text-transform: uppercase;
        color: #858585;
    }

    .mud-table .mud-table-pagination .mud-toolbar {
        border: none;
    }

        .mud-table .mud-table-pagination .mud-toolbar p {
            font-weight: 500;
            color: #858585;
        }

        .mud-table .mud-table-pagination .mud-toolbar button {
            border: 1px solid #e0e0e0;
            padding: 2px;
            border-radius: 10px;
        }

/*Progress Circle*/
.ct-circle {
    border: 1px solid #e1e1e1;
    border-radius: 10px;    
    padding: 15px;
}

    .ct-circle .circleProgress {
        position: static;
        height: 40px;
    }

    .ct-circle .circleValue {
        font-size: 28px;
        font-weight: bold;
        position: absolute;
    }

    .ct-circle .title {
        margin-top: 10px;
        overflow: hidden;
        text-wrap: nowrap;
        text-overflow: ellipsis;
        width: 100%;
        text-align: center;
    }

    .ct-circle .subInfo {
        position: absolute;
        transform: translateY(78px);
        font-weight: 600;
    }

/*Scheduler*/

/* Calendario sin scroll - se expande automáticamente */
.rz-scheduler {
    height: auto !important;
    min-height: 600px !important;
    max-height: none !important;
    overflow: visible !important;
}

.rz-scheduler .rz-scheduler-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
}

.rz-scheduler .rz-scheduler-content > div {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.rz-scheduler-view {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.radzen-table-height {
    height: auto !important;
    min-height: 600px !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Forzar que todas las tablas internas del scheduler no tengan scroll */
.rz-scheduler table,
.rz-scheduler .rz-view-container,
.rz-scheduler .rz-slots-container {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* ========================================
   CALENDAR EVENT CARD - Estilos optimizados
   Colores del tema MudBlazor:
   - Primary: #7C4DFF (DeepPurple.Accent3)
   - Secondary: #FF4081 (Pink Accent2)
   ======================================== */

.rz-event-content {
    border: 1px solid #7C4DFF !important;
    background-color: #f5f3ff !important;
    border-radius: 8px !important;
    padding: 4px 6px !important;
    font-family: 'Roboto', sans-serif !important;
    display: block !important;
    overflow: hidden !important;
}

/* Cita abierta desde reporte: fade-in + pulso (patrón MudBlazor: clase en tr, estilos en > td) */
.appointment-from-report-cell,
.appointment-from-report-row > td,
.appointment-from-report-row > .mud-table-cell,
.appointment-from-report-row td {
    position: relative !important;
    overflow: hidden !important;
    border-left: 2px solid transparent !important;
    background: transparent !important;
    animation: appointment-from-report-fade-and-pulse 2.8s ease-in-out 0.4s 1 forwards !important;
}
.appointment-from-report-cell:first-child,
.appointment-from-report-row > td:first-child,
.appointment-from-report-row > .mud-table-cell:first-child,
.appointment-from-report-row td:first-child {
    border-left-width: 2px !important;
}
.appointment-from-report-cell:not(:first-child),
.appointment-from-report-row > td:not(:first-child),
.appointment-from-report-row > .mud-table-cell:not(:first-child),
.appointment-from-report-row td:not(:first-child) {
    border-left: none !important;
}
@keyframes appointment-from-report-fade-and-pulse {
    0% {
        border-left-color: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        opacity: 0.6 !important;
    }
    28% {
        border-left-color: #7C4DFF !important;
        background-color: rgba(124, 77, 255, 0.1) !important;
        box-shadow: inset 0 0 0 2px rgba(124, 77, 255, 0.18) !important;
        opacity: 1 !important;
    }
    52% {
        border-left-color: #7C4DFF !important;
        background-color: rgba(124, 77, 255, 0.25) !important;
        box-shadow: inset 0 0 0 2px rgba(124, 77, 255, 0.4) !important;
        opacity: 1 !important;
    }
    100% {
        border-left-color: #7C4DFF !important;
        background-color: rgba(124, 77, 255, 0.07) !important;
        box-shadow: inset 0 0 0 2px rgba(124, 77, 255, 0.15) !important;
        opacity: 1 !important;
    }
}

.rz-event-content .event-card {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

/* Header: Título + Categoría */
.rz-event-content .event-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
}

.rz-event-content .event-title {
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #1a1a1a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    line-height: 1.3 !important;
}

.rz-event-content .event-category {
    background-color: #7C4DFF !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    padding: 3px 10px !important;
    border-radius: 16px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
}

/* Instructor */
.rz-event-content .event-instructor {
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #555555 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
}

/* Footer: Stats + Horarios */
.rz-event-content .event-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 6px !important;
    width: 100% !important;
}

.rz-event-content .event-stats {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.rz-event-content .event-stats .mud-icon-root {
    width: 20px !important;
    height: 20px !important;
}

.rz-event-content .stat-primary {
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #7C4DFF !important;
    margin-right: 8px !important;
}

.rz-event-content .stat-secondary {
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #FF4081 !important;
}

.rz-event-content .event-time {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #666666 !important;
    line-height: 1.4 !important;
}

.rz-event-content .event-time span {
    display: block !important;
}

.rz-tooltip-content {
    background-color: white !important;
    border: 1px solid #5e35f9;
    border-radius: 10px;
}

.rz-tooltip-stack {
    min-width: 250px;
    max-width: 300px;
    width: 100%;
}

/* ========================================
   CALENDAR TOOLTIP - Optimizado con HTML puro
   ======================================== */
.calendar-tooltip {
    padding: 10px 12px;
    min-width: 250px;
    max-width: 300px;
    font-family: 'Roboto', sans-serif;
}

.calendar-tooltip .tt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.calendar-tooltip .tt-title {
    font-size: 14px;
    font-weight: 600;
    color: #212121;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-tooltip .tt-category {
    background-color: #7C4DFF;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.calendar-tooltip .tt-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.calendar-tooltip .tt-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.calendar-tooltip .tt-icon-success { color: #4caf50; }
.calendar-tooltip .tt-icon-secondary { color: #FF4081; }
.calendar-tooltip .tt-icon-primary { color: #7C4DFF; }

.calendar-tooltip .tt-text {
    font-size: 12px;
    color: #616161;
}

.calendar-tooltip .tt-text strong {
    font-weight: 600;
}

.calendar-tooltip .tt-spacer {
    flex: 1;
}

.calendar-tooltip .tt-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 8px;
}

.calendar-tooltip .tt-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.calendar-tooltip .tt-stat-value {
    display: flex;
    align-items: center;
    gap: 2px;
}

.calendar-tooltip .tt-stat-value svg {
    width: 22px;
    height: 22px;
}

.calendar-tooltip .tt-stat-value span {
    font-size: 14px;
    font-weight: 700;
}

.calendar-tooltip .tt-stat-label {
    font-size: 11px;
    margin-top: 2px;
}

.calendar-tooltip .tt-stat-primary .tt-stat-value svg,
.calendar-tooltip .tt-stat-primary .tt-stat-value span,
.calendar-tooltip .tt-stat-primary .tt-stat-label { color: #7C4DFF; }

.calendar-tooltip .tt-stat-success .tt-stat-value svg,
.calendar-tooltip .tt-stat-success .tt-stat-value span,
.calendar-tooltip .tt-stat-success .tt-stat-label { color: #4caf50; }

.calendar-tooltip .tt-stat-secondary .tt-stat-value svg,
.calendar-tooltip .tt-stat-secondary .tt-stat-value span,
.calendar-tooltip .tt-stat-secondary .tt-stat-label { color: #FF4081; }


.rz-view-header .rz-slot-header {
    font-weight: bold;
    color: #ff4081;
}

.rz-slot-hours .rz-slot-header {
    font-weight: bold;
    color: #6e6e6e;
    font-size: 11px !important; /* Tamaño ajustado */
}

.rz-scheduler-nav {
    padding: 12px 12px 6px 12px;
}

.rz-scheduler-nav .rz-scheduler-nav-title {
    font-size: 13px !important;
}

.rz-scheduler .rz-view-header .rz-slot-header {
    font-size: 11px !important;
}


.rz-scheduler-nav-views .rz-button.rz-primary {
    color: #aa9cff;
}

    .rz-scheduler-nav-views .rz-button.rz-primary.rz-state-active {
        background-color: rgb(236 233 255);
        color: #5942f3;
    }

.rz-year-view .rz-slot .rz-slot-title.rz-has-appointments {
    background: #5e35f9;
}

.rz-scheduler-nav-views .rz-button.rz-primary:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.rz-scheduler-nav-views .rz-button.rz-primary:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.rz-scheduler-nav .rz-scheduler-nav-title {
    color: #6e6e6e;
}

.rz-button.rz-today {
    color: #6e6e6e;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}


/*Menu*/
.mud-nav-link .mud-nav-link-expand-icon {
    margin-left: -4px;
    font-size: 1.3rem;
}

/*Tables*/
.table-multi-select .mud-table-body .mud-table-cell-checkbox {
    pointer-events: none;
}

    .table-multi-select .mud-table-body .mud-table-cell-checkbox svg {
        font-size: 1.8rem;
        fill: #5ec35e;
    }

.table-multi-select .mud-table-container {
    overflow-y: hidden;
}


.emptyListIcon {
    font-size: 6rem;
    color: #b5b5b5;
    margin-top: 24px;
}


/* Drawer interno "Agendar Clientes": sin estirar, solo altura del contenido (evitar espacio en blanco) */
.drawer-agendar.mud-drawer {
    height: fit-content !important;
    max-height: 100vh;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}
.drawer-agendar.mud-drawer .drawer-content-animated {
    flex: 0 0 auto !important;
    height: fit-content !important;
}

/* Drawer con scroll interno - Fix para Mac/Edge y diferentes DPI */
.drawerFull.mud-drawer {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.drawerFull.mud-drawer > .mud-drawer-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    box-sizing: border-box;
}

.mud-drawer-content {
    width: 100%;
}

/* Asegurar que el contenido del drawer no se desborde */
.drawerFull .mud-nav-content {
    overflow-y: auto;
    max-height: calc(100vh - 80px); /* Restar altura del header */
}

/*Dealing Mobile Views*/
@media only screen and (max-width: 600px) {

    .drawerFull.mud-drawer.mud-drawer-temporary.mud-drawer-pos-right.mud-drawer--open {

        width: 95% !important;
    }
    /* Your styles for extra small devices go here */
}

.drawer-layout-full-height {
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.drawer-layout-full-height > .mud-grid-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.drawer-layout-full-height .mud-form {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.drawer-layout-full-height .mud-grid {
    flex: 1 !important;
    overflow: hidden !important;
}

.drawer-layout-full-height .mud-grid-item {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.drawer-layout-full-height .mud-table {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.drawer-layout-full-height .mud-table-container {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}
/* ---------- Menús y desplegables de las grillas (PopoverClass="zg-pop") ----------
   Viven fuera del árbol de la vista (MudPopoverProvider), por eso no entran en el CSS
   aislado de Customers/Index.razor.css. Misma fuente y tamaño que la grilla. */

.mud-popover.zg-pop {
    margin-top: 6px;
    padding: 8px;
    min-width: 200px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .05) !important;
    background: var(--mud-palette-surface);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.zg-pop .mud-list {
    padding: 0 !important;
}

.zg-pop .mud-list-item,
.zg-pop .mud-menu-item {
    min-height: 36px;
    padding: 0 10px 0 32px !important;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 400;
    color: var(--mud-palette-text-primary);
    position: relative;
}

/* Ítems de menú (MudMenuItem se dibuja como mud-list-item con ícono): sin la sangría del
   check de los select; ícono y texto parten en la misma vertical que la etiqueta. */
.zg-pop .mud-menu-item,
.zg-pop .mud-list-item:has(> .mud-list-item-icon) {
    min-height: 42px;
    padding: 0 14px !important;
    border-radius: 8px;
}

.zg-pop .mud-list-item:has(> .mud-list-item-icon) .mud-list-item-text p,
.zg-pop .mud-list-item:has(> .mud-list-item-icon) .mud-typography {
    font-size: 15px !important;
}

.zg-pop .mud-list-item .mud-typography,
.zg-pop .mud-menu-item .mud-typography,
.zg-pop .mud-list-item-text p,
.zg-pop .mud-menu-item-text {
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: inherit;
    letter-spacing: 0;
}

.zg-pop .mud-list-item:hover,
.zg-pop .mud-menu-item:hover {
    background: var(--mud-palette-background-gray) !important;
}

.zg-pop .mud-menu-item .mud-icon-root,
.zg-pop .mud-list-item-icon .mud-icon-root {
    font-size: 20px !important;
    color: var(--mud-palette-text-secondary);
}

.zg-pop .mud-menu-item-icon,
.zg-pop .mud-list-item-icon {
    min-width: 34px !important;
    margin-right: 0 !important;
}

/* Opción elegida del select: fondo suave y check a la izquierda. */
.zg-pop .mud-selected-item {
    background: var(--mud-palette-background-gray) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 500;
}

.zg-pop .mud-selected-item::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    background: var(--mud-palette-primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Sin width:auto el separador mide 100% más el margen y el menú muestra scroll horizontal
   (en Windows o con mouse, donde la barra no se oculta). */
/* Select de varias opciones: la casilla ya marca la elección, sin el ✓ suelto ni la sangría. */
.zg-pop-multi .mud-list-item {
    padding: 0 12px !important;
}
.zg-pop-multi .mud-selected-item::before {
    display: none;
}
.zg-pop-multi .mud-selected-item .mud-icon-root {
    color: var(--mud-palette-primary) !important;
}

.zg-pop .mud-divider {
    margin: 6px 4px;
    width: auto;
}

.zg-pop-label {
    padding: 6px 12px 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

.zg-pop .zg-pop-danger,
.zg-pop .zg-pop-danger .mud-icon-root {
    color: var(--mud-palette-error) !important;
}

/* ---------- Diálogos de las grillas (Class="zg-dialog") ----------
   app.css deja 1rem en ~11 px, y los zp-* de partners.css miden en rem: dentro de estos
   diálogos salían en 8-9 px. Aquí van en px, a la par de la grilla. */

.zg-dialog,
.zg-dialog .mud-typography,
.zg-dialog .mud-button-label {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.zg-dialog .mud-dialog-title .mud-typography-h6 { font-size: 19px !important; font-weight: 600; }
.zg-dialog .mud-dialog-content { font-size: 14px; }
.zg-dialog .mud-typography-body1 { font-size: 15px !important; }
.zg-dialog .mud-typography-body2 { font-size: 14px !important; }
.zg-dialog .zp-section-title { font-size: 16px; }
.zg-dialog .zp-metric-value { font-size: 26px; }
.zg-dialog .zp-metric-label { font-size: 13px; }
.zg-dialog .zp-badge { font-size: 13px; }
.zg-dialog .zp-notice,
.zg-dialog .zp-prosa,
.zg-dialog .zp-muted { font-size: 14px; }
.zg-dialog .nt-pill { font-size: 14px !important; }
.zg-dialog .mud-input,
.zg-dialog .mud-input-slot,
.zg-dialog .mud-input-label { font-size: 14px !important; }
.zg-dialog table { font-size: 14px; }
.zg-dialog .mud-simple-table table * tr td { font-size: 14px !important; }
.zg-dialog .mud-simple-table table * tr th { font-size: 13px !important; font-weight: 500; color: var(--mud-palette-text-secondary); }
.zg-dialog .mud-dialog-actions .mud-button-root { text-transform: none; font-size: 14px !important; font-weight: 500; }

/* ---------- Switch del sistema (todos los MudSwitch) ----------
   Pastilla de 40×22 con perilla blanca adentro: gris apagado, color del switch prendido.
   Reemplaza al de Material (riel delgado translúcido con perilla que sobresale y halo
   al pasar el mouse). La referencia está en src/docs/referencias/2026-11-14-grilla-referencia-columnas.png. */

.mud-switch-span {
    width: 40px !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 6px !important;
    overflow: visible !important;
    flex: none;
}

.mud-switch-track {
    position: absolute;
    inset: 0;
    width: 40px !important;
    height: 22px !important;
    border-radius: 999px !important;
    opacity: 1 !important;
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 16%, transparent) !important;
    transition: background-color .18s ease;
}

.mud-switch-base {
    top: 2px !important;
    left: 2px !important;
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    transform: none;
    transition: transform .18s ease !important;
}

.mud-switch-base:hover,
.mud-switch-base:focus-visible {
    background-color: transparent !important;
}

.mud-switch-base.mud-checked {
    transform: translateX(18px) !important;
}

.mud-switch-base .mud-switch-button {
    width: 18px;
    height: 18px;
}

.mud-switch-base [class*="mud-switch-thumb"] {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background-color: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .25), 0 1px 1px rgba(15, 23, 42, .08) !important;
}

/* Prendido: el riel toma el color del switch (Primary por defecto), sin transparencia. */
.mud-switch-base.mud-checked + .mud-switch-track {
    background-color: currentColor !important;
}

.mud-switch-base.mud-checked.mud-primary-text + .mud-switch-track,
.mud-switch-base.mud-checked.mud-default-text + .mud-switch-track { background-color: var(--mud-palette-primary) !important; }
.mud-switch-base.mud-checked.mud-secondary-text + .mud-switch-track { background-color: var(--mud-palette-secondary) !important; }
.mud-switch-base.mud-checked.mud-tertiary-text + .mud-switch-track { background-color: var(--mud-palette-tertiary) !important; }
.mud-switch-base.mud-checked.mud-info-text + .mud-switch-track { background-color: var(--mud-palette-info) !important; }
.mud-switch-base.mud-checked.mud-success-text + .mud-switch-track { background-color: var(--mud-palette-success) !important; }
.mud-switch-base.mud-checked.mud-warning-text + .mud-switch-track { background-color: var(--mud-palette-warning) !important; }
.mud-switch-base.mud-checked.mud-error-text + .mud-switch-track { background-color: var(--mud-palette-error) !important; }

.mud-switch-base.mud-switch-disabled [class*="mud-switch-thumb"] {
    box-shadow: none !important;
}

.mud-switch:has(.mud-switch-disabled) .mud-switch-span {
    opacity: .5;
}

.mud-switch-base:focus-visible + .mud-switch-track {
    outline: 2px solid color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
    outline-offset: 2px;
}

.mud-switch .mud-typography,
.mud-switch > .mud-switch-label {
    font-size: 14px;
}

/* Checkbox global: cuadro de 18 px con borde gris fino y esquinas redondeadas; marcado,
   relleno con el color primario y el ticket blanco. Se esconde el ícono SVG de MudBlazor y
   el cuadro se dibuja sobre el propio botón, así todos los MudCheckBox del sistema calzan. */
.mud-checkbox > .mud-button-root {
    position: relative;
    width: 18px;
    height: 18px;
    padding: 0 !important;
    margin: 9px !important;
    box-sizing: border-box;
    border: 1.5px solid #d4d4d8;
    border-radius: 5px;
    background: #fff;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}

.mud-checkbox > .mud-button-root > svg {
    display: none;
}

.mud-checkbox > .mud-button-root:hover {
    background: #fff;
    border-color: #a1a1aa;
}

.mud-checkbox > .mud-button-root:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
}

.mud-checkbox > .mud-button-root.mud-checkbox-true,
.mud-checkbox > .mud-button-root.mud-checkbox-null {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
}

.mud-checkbox > .mud-button-root.mud-checkbox-true::before,
.mud-checkbox > .mud-button-root.mud-checkbox-null::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
}

.mud-checkbox > .mud-button-root.mud-checkbox-true::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.mud-checkbox > .mud-button-root.mud-checkbox-null::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8h7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8h7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.mud-checkbox > .mud-button-root.mud-disabled {
    opacity: .5;
}

.mud-checkbox .mud-typography {
    font-size: 14px;
}

/* Sin la onda del ripple: el cuadro ya cambia de color al marcar. */
.mud-checkbox > .mud-button-root::after {
    display: none;
}

/* ── Cajones flotantes ─────────────────────────────────────────────────────────
   Todos los MudDrawer temporales (ficha, clase del calendario, sucursales, historial…)
   flotan separados 12px del borde, con esquinas redondeadas y sombra, como el diálogo
   lateral de Notificaciones. El menú lateral no es temporal y no cambia.
   Referencia: src/docs/referencias/2026-11-15-drawer-flotante-referencia.png */
.mud-drawer.mud-drawer-temporary {
    top: 12px !important;
    height: calc(100vh - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    max-width: calc(100vw - 24px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .25), 0 0 0 1px rgba(15, 23, 42, .06) !important;
}

.mud-drawer.mud-drawer-temporary.mud-drawer-pos-right.mud-drawer--open { right: 12px; }
.mud-drawer.mud-drawer-temporary.mud-drawer-pos-left.mud-drawer--open { left: 12px; }

/* Cerrado se esconde también la sombra. */
.mud-drawer.mud-drawer-temporary.mud-drawer-pos-right.mud-drawer--closed {
    right: calc(-1 * var(--mud-drawer-width, var(--mud-drawer-width-right)) - 64px);
}
.mud-drawer.mud-drawer-temporary.mud-drawer-pos-left.mud-drawer--closed {
    left: calc(-1 * var(--mud-drawer-width, var(--mud-drawer-width-left)) - 64px);
}

/* El contenido usa el alto del cajón, no el de la ventana (si no, el fondo queda cortado). */
.mud-drawer.mud-drawer-temporary > .mud-drawer-content {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}
.mud-drawer-temporary .drawer-layout-full-height { height: 100% !important; }
.mud-drawer-temporary.drawer-agendar { height: fit-content !important; }

/* Acciones de arriba del cajón de la clase (mensaje, configurar, eliminar, cerrar): más grandes.
   Selector largo a propósito: app.css fija los íconos de los botones grandes con 4 clases. */
.class-drawer-actions .mud-icon-button.mud-button-root.mud-icon-button-size-large .mud-icon-root {
    font-size: 36px !important;
}
@media (max-height: 820px) {
    .class-drawer-actions .mud-icon-button.mud-button-root.mud-icon-button-size-large .mud-icon-root {
        font-size: 26px !important;
    }
}

/* Lo de atrás se desenfoca, como en la referencia. */
.mud-overlay.mud-overlay-drawer { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* En celular no hay espacio para flotar: de borde a borde. */
@media (max-width: 600px) {
    .mud-drawer.mud-drawer-temporary {
        top: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        max-width: 100vw;
        border-radius: 0;
    }
    .mud-drawer.mud-drawer-temporary.mud-drawer-pos-right.mud-drawer--open { right: 0; }
    .mud-drawer.mud-drawer-temporary.mud-drawer-pos-left.mud-drawer--open { left: 0; }
}

/* Selectores de Estado y Categoría en las tarjetas de la izquierda de las pantallas de edición:
   sin ancho propio quedaban del tamaño del texto elegido ("FitMe") y el desplegable cortaba
   los nombres en dos o tres líneas. Ahora ocupan el ancho de su tarjeta. */
.mud-input-control.card-select {
    align-self: stretch;
    width: 100%;
    min-width: 220px;
}
