.holly-modal-root {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.holly-modal-root.active {
    display: flex;
}

.holly-modal-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(122, 24, 29, 0.18), transparent 42%),
        rgba(3, 2, 2, 0.76);
    backdrop-filter: blur(14px);
    animation: hollyModalFadeIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.holly-modal {
    position: relative;
    width: min(520px, 95vw);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(28, 23, 23, 0.96), rgba(10, 6, 6, 0.98)),
        #100b0b;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.62),
        0 0 50px rgba(122, 24, 29, 0.18);
    color: #f8f1ec;
    padding: 28px;
    animation: hollyModalScaleIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.holly-modal-root.closing .holly-modal-overlay {
    animation: hollyModalFadeOut 200ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

/* SPEC_FLICKER_MODAL_AGENDAMENTO_GERAL - usada quando um content modal
   nasce substituindo outro que acabou de ser pausado (escondido na hora,
   sem fade-out próprio) - seja abrindo por cima (openContentModal) ou
   retomando o que ficou pausado (resumePausedContentModal). Sem isso, o
   overlay/painel novo nasce a 0% de opacidade e leva 240ms pra cobrir a
   tela de novo, expondo o que estiver atrás (a "pisca" relatada). Só afeta
   esse mount específico - modais de verdade (openModal/openMenuModal) e a
   primeira abertura de um content modal continuam animando normalmente. */
.holly-modal-root.sem-animacao-entrada .holly-modal-overlay,
.holly-modal-root.sem-animacao-entrada .holly-modal {
    animation: none;
}

.holly-modal-root.closing .holly-modal {
    animation: hollyModalScaleOut 200ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.holly-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(248, 241, 236, 0.76);
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.holly-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.holly-modal-close svg,
.holly-modal-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.holly-modal-head {
    display: flex;
    gap: 18px;
    padding-right: 42px;
}

.holly-modal-icon {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--holly-modal-accent, #8c1d22);
    background: rgba(var(--holly-modal-rgb, 140, 29, 34), 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(var(--holly-modal-rgb, 140, 29, 34), 0.28),
        0 0 28px rgba(var(--holly-modal-rgb, 140, 29, 34), 0.3);
}

.holly-modal-icon svg {
    width: 28px;
    height: 28px;
}

.holly-modal-title {
    margin: 2px 0 8px;
    font-size: 1.35rem;
    line-height: 1.18;
    letter-spacing: 0;
    color: #ffffff;
}

.holly-modal-message {
    margin: 0;
    color: rgba(248, 241, 236, 0.76);
    line-height: 1.55;
    white-space: pre-line;
}

.holly-modal-details {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.holly-modal-detail {
    display: grid;
    grid-template-columns: minmax(98px, 0.45fr) 1fr;
    gap: 12px;
    align-items: start;
}

.holly-modal-detail span {
    color: rgba(248, 241, 236, 0.52);
    font-size: 0.78rem;
    line-height: 1.3;
}

.holly-modal-detail strong {
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.holly-modal-footer-note {
    margin: 18px 0 0;
    color: rgba(248, 241, 236, 0.58);
    font-size: 0.9rem;
    line-height: 1.45;
}

.holly-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.holly-modal-button {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.holly-modal-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.86);
    outline-offset: 3px;
}

.holly-modal-button:hover {
    transform: translateY(-1px);
}

.holly-modal-button.secondary {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(248, 241, 236, 0.82);
}

.holly-modal-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.holly-modal-button.primary {
    background: var(--holly-modal-accent, #8c1d22);
    color: var(--holly-modal-button-text, #ffffff);
    box-shadow: 0 14px 36px rgba(var(--holly-modal-rgb, 140, 29, 34), 0.36);
}

.holly-modal-button.primary:hover {
    box-shadow: 0 18px 46px rgba(var(--holly-modal-rgb, 140, 29, 34), 0.46);
    filter: brightness(1.06);
}

.holly-modal--confirm {
    --holly-modal-accent: #8f1f24;
    --holly-modal-rgb: 143, 31, 36;
    --holly-modal-button-text: #ffffff;
}

.holly-modal--success {
    --holly-modal-accent: #17a765;
    --holly-modal-rgb: 23, 167, 101;
    --holly-modal-button-text: #ffffff;
}

.holly-modal--warning {
    --holly-modal-accent: #f0c045;
    --holly-modal-rgb: 240, 192, 69;
    --holly-modal-button-text: #201407;
}

.holly-modal--information {
    --holly-modal-accent: #d7b58a;
    --holly-modal-rgb: 215, 181, 138;
    --holly-modal-button-text: #1a1110;
}

.holly-modal--error {
    --holly-modal-accent: #b3353b;
    --holly-modal-rgb: 179, 53, 59;
    --holly-modal-button-text: #ffffff;
}

@keyframes hollyModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hollyModalFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes hollyModalScaleIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes hollyModalScaleOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
}

.holly-modal--content .holly-modal-title {
    padding-right: 42px;
}

.holly-modal-content-slot {
    margin-top: 14px;
}

.holly-modal-menu-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.holly-modal-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: #f8f1ec;
    font: inherit;
    font-weight: 700;
    text-align: left;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.holly-modal-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.holly-modal-menu-item.danger {
    color: #ffb4b4;
    border-color: rgba(255, 138, 138, 0.22);
}

.holly-modal-menu-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(248, 241, 236, 0.78);
}

.holly-modal-menu-item.danger .holly-modal-menu-icon {
    color: #ffb4b4;
}

/* SPEC_AGENDAMENTOS_REORGANIZACAO_E_FILTRO_BARBEIRO, Correção 4 - variante
   pro seletor de barbeiro (HollyModal.menu com foto/logo no lugar de um
   ícone svg de traço). Mesma paleta dourado/vinho do resto do admin
   (Sprint XLI), não uma cor nova. */
.holly-modal-menu-icon--avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--wine-3), var(--wine));
    border: 1px solid rgba(255, 211, 107, .35);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.holly-modal-menu-icon--avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.holly-modal-menu-icon svg {
    width: clamp(18px, 5vw, 24px);
    height: clamp(18px, 5vw, 24px);
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 560px) {
    .holly-modal-root {
        padding: 14px;
    }

    .holly-modal {
        width: 95vw;
        padding: 24px 20px 20px;
        border-radius: 24px;
    }

    .holly-modal-head {
        gap: 14px;
        padding-right: 32px;
    }

    .holly-modal-icon {
        width: 50px;
        height: 50px;
    }

    .holly-modal-title {
        font-size: 1.18rem;
    }

    .holly-modal-detail {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .holly-modal-actions {
        flex-direction: column-reverse;
    }

    .holly-modal-button {
        width: 100%;
    }
}
