/**
 * Hora — escritorio: modal reloj. Móvil/tablet: sin cambios.
 */
.msab-time-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.msab-time-native[type="time"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding-right: 2.75rem !important;
    cursor: pointer;
    caret-color: transparent;
}

.msab-time-open {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--msab-time-icon, #2c5aa0);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.msab-time-open:hover {
    background: var(--msab-time-icon-bg, rgba(44, 90, 160, 0.1));
}

.msab-time-open:focus-visible {
    outline: 2px solid var(--msab-time-icon, #2c5aa0);
    outline-offset: 2px;
}

.msab-time-wrap--admin { --msab-time-icon: #2c5aa0; --msab-time-icon-bg: rgba(44, 90, 160, 0.1); }
.msab-time-wrap--emp { --msab-time-icon: #34d399; --msab-time-icon-bg: rgba(52, 211, 153, 0.14); }
.msab-time-wrap--public { --msab-time-icon: #D4AF37; --msab-time-icon-bg: rgba(212, 175, 55, 0.16); }

/* ── Modal reloj (solo escritorio) ── */
.msab-clock-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.msab-clock-modal.is-open {
    display: flex;
}

.msab-clock-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.msab-clock-modal__panel {
    position: relative;
    width: min(100%, 320px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    padding: 20px 18px 16px;
    box-sizing: border-box;
    animation: msab-clock-in 0.2s ease;
}

@keyframes msab-clock-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.msab-clock-modal__digital {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--msab-clock-accent, #2c5aa0);
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.msab-clock-modal__sep {
    opacity: 0.55;
    margin: 0 2px;
}

.msab-clock-modal__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.msab-clock-modal__tab {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: #475569;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.msab-clock-modal__tab.is-active {
    background: var(--msab-clock-accent, #2c5aa0);
    border-color: var(--msab-clock-accent, #2c5aa0);
    color: #fff;
}

.msab-clock-modal__hint {
    margin: 0 0 10px;
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.msab-clock-modal__fine {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 0 0 12px;
}

.msab-clock-modal__fine-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.msab-clock-modal__fine-btn:hover {
    background: var(--msab-clock-accent-soft, #eef2ff);
    border-color: var(--msab-clock-accent, #2c5aa0);
}

.msab-clock-modal__dial {
    width: 100%;
    aspect-ratio: 1;
    max-height: 260px;
    margin: 0 auto 10px;
    position: relative;
}

.msab-clock-modal__face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #eef2ff 100%);
    border: 2px solid #e2e8f0;
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.85);
}

.msab-clock-modal__hand {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 34%;
    background: var(--msab-clock-accent, #2c5aa0);
    border-radius: 3px;
    transform-origin: 50% 100%;
    transform: translate(-50%, -100%) rotate(0deg);
    opacity: 0.75;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.msab-clock-modal__hub {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--msab-clock-accent, #2c5aa0);
    pointer-events: none;
}

.msab-clock-modal__num {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 2.1rem;
    height: 2.1rem;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    transition: transform 0.12s, background 0.12s, color 0.12s;
    padding: 0;
    line-height: 1;
}

.msab-clock-modal__num:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background: var(--msab-clock-accent-soft, #eef2ff);
}

.msab-clock-modal__num.is-selected {
    background: var(--msab-clock-accent, #2c5aa0);
    color: #fff;
    transform: translate(-50%, -50%) scale(1.12);
}

.msab-clock-modal__actions {
    display: flex;
    gap: 10px;
}

.msab-clock-modal__btn {
    flex: 1;
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
}

.msab-clock-modal__btn--ghost {
    background: #f1f5f9;
    color: #475569;
}

.msab-clock-modal__btn--ok {
    background: var(--msab-clock-accent, #2c5aa0);
    color: #fff;
}

.msab-clock-modal--admin { --msab-clock-accent: #2c5aa0; --msab-clock-accent-soft: #eef2ff; }
.msab-clock-modal--emp { --msab-clock-accent: #34d399; --msab-clock-accent-soft: rgba(52, 211, 153, 0.15); }
.msab-clock-modal--public { --msab-clock-accent: #D4AF37; --msab-clock-accent-soft: #fffbeb; }
.msab-clock-modal--public .msab-clock-modal__btn--ok { color: #1c1303; }

body.msab-clock-modal-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .msab-time-open { display: none; }
    .msab-time-native[type="time"] {
        padding-right: inherit !important;
        min-height: inherit;
    }
    .msab-clock-modal { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .msab-clock-modal__panel { animation: none; }
    .msab-clock-modal__hand { transition: none; }
}
