/* ========================================================================== */
/* CLIENTE ACCESO MODAL - Modal de Alta/Actualización de Clientes            */
/* ========================================================================== */

/* Overlay del modal con efecto glassmorphism */
.cliente-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15000;
    animation: fadeInOverlay 0.3s ease-out;
    padding: 1rem;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

/* Container del modal con efecto de entrada */
.cliente-modal-container {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 95%;
    max-width: 580px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideInModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

@keyframes slideInModal {
    from {
        transform: translateY(-60px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Efecto de brillo sutil en el borde superior */
.cliente-modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 116, 0, 0.5), rgba(0, 180, 255, 0.5), transparent);
}

/* ========================================================================== */
/* HEADER DEL MODAL                                                          */
/* ========================================================================== */

.cliente-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #F07400, #00b4ff);
    position: relative;
    overflow: hidden;
}

/* Efecto de onda decorativa en el header */
.cliente-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cliente-modal-header::after {
    content: '';
    position: absolute;
    bottom: -70%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.header-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.header-icon-wrapper svg {
    width: 26px;
    height: 26px;
    stroke: white;
}

.cliente-modal-title {
    flex: 1;
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.cliente-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    z-index: 1;
}

.cliente-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
    transition: transform 0.3s ease;
}

.cliente-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cliente-modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* ========================================================================== */
/* BODY DEL MODAL                                                            */
/* ========================================================================== */

.cliente-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-primary);
}

/* ========================================================================== */
/* SECCIONES                                                                 */
/* ========================================================================== */

.cliente-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: visible;
    transition: all 0.3s ease;
}

.cliente-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header de sección */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.08), rgba(0, 180, 255, 0.08));
    border-bottom: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
}

.section-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F07400, #00b4ff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(240, 116, 0, 0.25);
}

.section-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.section-header > span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

/* Contador de accesos */
.accesos-counter {
    display: flex;
    align-items: baseline;
    gap: 2px;
    background: var(--bg-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.counter-value {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #F07400, #00b4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Contenido de sección */
.section-content {
    padding: 1rem 1.25rem;
    border-radius: 0 0 16px 16px;
    background: var(--bg-secondary);
}

/* ========================================================================== */
/* INPUT DE NOMBRE                                                           */
/* ========================================================================== */

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    transition: stroke 0.3s ease;
    pointer-events: none;
}

.cliente-input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.cliente-input::placeholder {
    color: var(--text-secondary);
    text-transform: none;
    font-weight: 400;
    letter-spacing: normal;
}

.cliente-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(240, 116, 0, 0.15);
}

.cliente-input:focus + svg,
.input-wrapper:focus-within svg {
    stroke: var(--primary-color);
}

/* Input en modo readonly (edición de cliente) */
.cliente-input.readonly,
.cliente-input[readonly] {
    cursor: not-allowed;
}

/* Modo claro */
:root.light-mode .cliente-input,
.light-mode .cliente-input {
    background: #ffffff;
    border-color: #d0d0d0;
}

:root.light-mode .cliente-input:focus,
.light-mode .cliente-input:focus {
    border-color: var(--primary-color);
}

/* ========================================================================== */
/* FECHAS GRID                                                               */
/* ========================================================================== */

.fechas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.fecha-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.fecha-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Toggle Indefinido - Ocupa toda la fila */
.indefinido-toggle {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

/* ========================================================================== */
/* FECHA PICKER PERSONALIZADO                                                */
/* ========================================================================== */

.fecha-picker-wrapper {
    position: relative;
}

.fecha-picker-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.fecha-picker-btn:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.05), rgba(0, 180, 255, 0.05));
}

.fecha-picker-btn:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(240, 116, 0, 0.15);
}

.fecha-picker-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.fecha-picker-btn svg:first-child {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.fecha-display {
    flex: 1;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
}

.fecha-display.indefinido {
    font-style: italic;
    color: var(--text-secondary);
}

.chevron-icon {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.chevron-icon.rotated {
    transform: rotate(180deg);
}

/* Modo claro */
:root.light-mode .fecha-picker-btn,
.light-mode .fecha-picker-btn {
    background: #ffffff;
    border-color: #d0d0d0;
}

/* ========================================================================== */
/* MINI CALENDARIO DROPDOWN                                                  */
/* ========================================================================== */

.fecha-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 100;
    animation: dropdownSlide 0.25s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mini-calendar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.mini-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #F07400, #00b4ff);
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

.mes-anio {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mini-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0.75rem 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mini-calendar-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.25rem;
}

/* Domingo */
.mini-calendar-weekdays span:last-child {
    color: var(--primary-color);
}

.mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 0.75rem;
}

.dia-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid transparent;
}

.dia-btn:hover:not(.empty):not(.disabled):not(.selected) {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.15), rgba(0, 180, 255, 0.15));
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.dia-btn.empty {
    background: transparent;
    cursor: default;
}

.dia-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dia-btn.selected {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    color: white;
    font-weight: 700;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(240, 116, 0, 0.35);
}

/* ========================================================================== */
/* TOGGLE SWITCH (INDEFINIDO)                                                */
/* ========================================================================== */

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.toggle-container:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.05), rgba(0, 180, 255, 0.05));
}

.toggle-switch {
    width: 52px;
    height: 28px;
    background: var(--bg-primary);
    border-radius: 14px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.toggle-switch.active {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    border-color: transparent;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.infinity-icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    animation: pulse-infinity 2s ease-in-out infinite;
}

@keyframes pulse-infinity {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Modo claro */
:root.light-mode .toggle-container,
.light-mode .toggle-container {
    background: #ffffff;
}

/* ========================================================================== */
/* GRID DE ACCESOS                                                           */
/* ========================================================================== */

.accesos-grid-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    padding-bottom: 0.5rem;
}

.acceso-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.acceso-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.acceso-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.acceso-item:hover::before {
    opacity: 1;
}

.acceso-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.15), rgba(0, 180, 255, 0.15));
}

.acceso-item.active::before {
    opacity: 1;
}

.acceso-icon {
    width: 30px;
    height: 30px;
    background: var(--bg-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.acceso-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    transition: stroke 0.3s ease;
}

.acceso-item.active .acceso-icon {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    box-shadow: 0 3px 10px rgba(240, 116, 0, 0.3);
}

.acceso-item.active .acceso-icon svg {
    stroke: white;
}

.acceso-name {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

/* Toggle mini dentro de cada acceso */
.acceso-toggle {
    width: 34px;
    height: 18px;
    background: var(--bg-primary);
    border-radius: 9px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 1;
}

.acceso-toggle.active {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    border-color: transparent;
}

.acceso-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.acceso-toggle.active .acceso-toggle-slider {
    transform: translateX(16px);
}

/* Modo claro */
:root.light-mode .acceso-item,
.light-mode .acceso-item {
    background: #ffffff;
}

:root.light-mode .acceso-item.active,
.light-mode .acceso-item.active {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.12), rgba(0, 180, 255, 0.12));
}

/* ========================================================================== */
/* FOOTER DEL MODAL                                                          */
/* ========================================================================== */

.cliente-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Botón Cancelar */
.btn-cancel {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-cancel svg {
    stroke: var(--text-secondary);
}

.btn-cancel:hover {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-cancel:hover svg {
    stroke: #dc3545;
}

.btn-cancel:active {
    transform: scale(0.98);
}

/* Botón Aceptar/Crear */
.btn-accept {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 116, 0, 0.3);
}

.btn-accept svg {
    stroke: white;
}

.btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 116, 0, 0.4);
}

.btn-accept:active {
    transform: translateY(0);
}

.btn-accept:disabled {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: rgba(255, 255, 255, 0.6);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-accept:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-accept:disabled svg {
    stroke: rgba(255, 255, 255, 0.6);
}

/* ========================================================================== */
/* RESPONSIVE                                                                */
/* ========================================================================== */

@media (max-width: 768px) {
    .cliente-modal-overlay {
        padding: 0.5rem;
    }

    .cliente-modal-container {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px;
    }

    .cliente-modal-body {
        flex: 1;
        overflow-y: auto;
    }

    .cliente-modal-header {
        padding: 1rem 1.25rem;
    }

    .header-icon-wrapper {
        width: 42px;
        height: 42px;
    }

    .header-icon-wrapper svg {
        width: 22px;
        height: 22px;
    }

    .cliente-modal-title {
        font-size: 1.15rem;
    }

    .cliente-modal-body {
        padding: 1rem;
        gap: 1rem;
    }

    .section-content {
        padding: 1rem;
    }

    .fechas-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .accesos-grid-modal {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .acceso-item {
        padding: 0.55rem 0.65rem;
    }

    .acceso-name {
        font-size: 0.7rem;
    }

    .acceso-icon {
        width: 26px;
        height: 26px;
    }

    .acceso-icon svg {
        width: 14px;
        height: 14px;
    }

    .cliente-modal-footer {
        padding: 0.65rem 1rem;
        gap: 0.75rem;
    }

    .modal-btn {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cliente-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .cliente-modal-container {
        max-height: 100vh;
        border-radius: 20px 20px 0 0;
        animation: slideUpModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .cliente-modal-body {
        flex: 1;
        overflow-y: auto;
    }

    @keyframes slideUpModal {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .cliente-modal-header {
        padding: 1rem;
    }

    .header-icon-wrapper {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .header-icon-wrapper svg {
        width: 20px;
        height: 20px;
    }

    .cliente-modal-title {
        font-size: 1.05rem;
    }

    .cliente-modal-close {
        width: 34px;
        height: 34px;
    }

    .cliente-modal-close svg {
        width: 18px;
        height: 18px;
    }

    .section-header {
        padding: 0.75rem 1rem;
    }

    .section-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .section-icon svg {
        width: 18px;
        height: 18px;
    }

    .section-header > span {
        font-size: 0.9rem;
    }

    .accesos-counter {
        padding: 0.25rem 0.6rem;
    }

    .counter-value {
        font-size: 1rem;
    }

    .counter-label {
        font-size: 0.75rem;
    }

    .section-content {
        padding: 0.85rem;
    }

    .cliente-input {
        padding: 0.8rem 0.9rem 0.8rem 2.75rem;
        font-size: 0.95rem;
    }

    .input-wrapper svg {
        left: 12px;
        width: 18px;
        height: 18px;
    }

    .fecha-picker-btn {
        padding: 0.75rem 0.85rem;
    }

    .fecha-picker-btn svg:first-child {
        width: 18px;
        height: 18px;
    }

    .fecha-display {
        font-size: 0.9rem;
    }

    .toggle-container {
        padding: 0.65rem 0.85rem;
    }

    .toggle-switch {
        width: 48px;
        height: 26px;
    }

    .toggle-slider {
        width: 18px;
        height: 18px;
    }

    .toggle-switch.active .toggle-slider {
        transform: translateX(22px);
    }

    .toggle-label {
        font-size: 0.9rem;
    }

    .accesos-grid-modal {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .acceso-item {
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }

    .acceso-icon {
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }

    .acceso-icon svg {
        width: 12px;
        height: 12px;
    }

    .acceso-name {
        font-size: 0.65rem;
    }

    .acceso-toggle {
        width: 30px;
        height: 16px;
    }

    .acceso-toggle-slider {
        width: 10px;
        height: 10px;
    }

    .acceso-toggle.active .acceso-toggle-slider {
        transform: translateX(14px);
    }

    .cliente-modal-footer {
        padding: 0.6rem 1rem;
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .modal-btn {
        width: 100%;
        padding: 0.5rem;
    }

    /* Mini calendario ajustes */
    .mini-calendar-header {
        padding: 0.75rem 0.85rem;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .mes-anio {
        font-size: 0.9rem;
    }

    .mini-calendar-weekdays {
        padding: 0.6rem 0.6rem 0.4rem;
    }

    .mini-calendar-weekdays span {
        font-size: 0.7rem;
    }

    .mini-calendar-days {
        padding: 0.6rem;
        gap: 3px;
    }

    .dia-btn {
        font-size: 0.8rem;
        border-radius: 6px;
    }
}

/* ========================================================================== */
/* iOS SPECIFIC FIXES                                                        */
/* ========================================================================== */

@supports (-webkit-touch-callout: none) {
    .cliente-modal-body {
        -webkit-overflow-scrolling: touch;
    }

    .cliente-modal-container {
        max-height: -webkit-fill-available;
    }

    .cliente-input,
    .fecha-picker-btn,
    .toggle-container,
    .acceso-item,
    .modal-btn,
    .dia-btn,
    .nav-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}
