/* ═══════════════════════════════════════════════════════════════
   DMH · CSS · MODAIS (casca genérica dmh-modal-*)
   ─────────────────────────────────────────────────────────────
   Overlay e caixa dos modais; o conteúdo é montado pela view no
   slot .dmh-modal-body via DMH.tmpl. Visão igual ao modal do SCAD.
   Consome: tokens de css/tokens.css.
   Expoe: .dmh-modal-overlay/.open, .dmh-modal-box, header, body,
          footer, botão fechar.
   ═══════════════════════════════════════════════════════════════ */

.dmh-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 14000;
    background: rgba(8, 18, 12, .6);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.dmh-modal-overlay.open {
    display: flex;
}

.dmh-modal-box {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 30, 15, .4);
    overflow: hidden;
    animation: dmhModalIn .32s cubic-bezier(.34, 1.26, .64, 1);
}

@keyframes dmhModalIn {
    from { opacity: 0; transform: translateY(26px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.dmh-modal-header {
    position: relative;
    padding: 20px 24px 18px;
    background: linear-gradient(135deg, var(--g), var(--g2));
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.dmh-modal-header::after {
    content: '';
    position: absolute;
    top: -70px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
    pointer-events: none;
}

.dmh-modal-header h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--disp);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.dmh-modal-header p {
    position: relative;
    z-index: 1;
    margin: 6px 0 0;
    font-size: 12px;
    opacity: .85;
}

.dmh-modal-x {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
}

.dmh-modal-x:hover { background: rgba(255, 255, 255, .24); }

.dmh-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    flex: 1;
}

.dmh-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}
