/* Native <dialog> forms: change password, stock movement. Uses tokens from theme.css. */
.sm-safe-dialog {
    border: 0;
    border-radius: var(--r-lg, 10px);
    padding: 1.4rem 1.5rem 1.5rem;
    width: min(92vw, 460px);
    max-height: 90vh;
    max-height: 90dvh;
    overflow: auto;
    color: var(--ink, #1d1b18);
    background: var(--surface, #fff);
    font-family: var(--font-ui, system-ui, sans-serif);
    box-shadow: var(--shadow-pop, 0 12px 32px rgba(0, 0, 0, .2));
}
.sm-safe-dialog[open] { animation: sm-dialog-in .28s var(--ease-out, ease-out); }
.sm-safe-dialog::backdrop { background: rgb(29 27 24 / 52%); }
.sm-safe-dialog h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.sm-safe-dialog label { display: block; margin: .85rem 0 .3rem; font-size: .88rem; font-weight: 600; }
.sm-safe-dialog input, .sm-safe-dialog select {
    width: 100%; min-height: 44px; padding: .6rem .75rem;
    border: 1px solid var(--rule-strong, #c9c3b8); border-radius: var(--r, 6px);
    background: var(--surface, #fff); font: inherit; font-size: 1rem;
}
.sm-safe-dialog input:hover, .sm-safe-dialog select:hover { border-color: var(--ink-3, #6f695f); }
.sm-safe-dialog p[role="status"] { margin: .9rem 0 0; min-height: 1.3em; font-size: .9rem; color: var(--ink-2, #57524a); }
.sm-safe-dialog form > div:last-child, .sm-safe-dialog form { display: block; }
.sm-safe-dialog button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: .55rem 1.1rem; margin-top: 1rem;
    border: 1px solid var(--rule-strong, #c9c3b8); border-radius: var(--r, 6px);
    background: var(--surface, #fff); color: var(--ink, #1d1b18);
    font: inherit; font-weight: 600; cursor: pointer;
}
.sm-safe-dialog button:hover { border-color: var(--ink, #1d1b18); }
.sm-safe-dialog button[type=submit] { background: var(--ink, #1d1b18); color: #fff; border-color: var(--ink, #1d1b18); }
.sm-safe-dialog button[type=submit]:hover { background: var(--ink-hover, #3a362f); }
.sm-safe-dialog :focus-visible, .sm-account-open:focus-visible { outline: 2px solid var(--ink, #1d1b18); outline-offset: 2px; }
.sm-safe-dialog button:disabled { opacity: .55; cursor: wait; }
@keyframes sm-dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
