.g-dlg { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--g-line, #e5e7eb); border-radius: var(--g-radius, 6px); background: var(--g-surface, #fff); color: var(--g-ink, #1A1A1A); direction: rtl; text-align: start; font-family: inherit; box-shadow: none; }
.g-dlg::backdrop { background: rgba(17, 24, 39, .45); }
.g-dlg.is-closing { opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .15s ease, transform .15s ease; }
.g-dlg.is-closing::backdrop { opacity: 0; transition: opacity .15s ease; }
.g-dlg__box { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.g-dlg__icon { display: grid; place-items: center; align-self: center; width: 48px; height: 48px; border-radius: var(--g-radius, 6px); background: var(--g-accent-tint, #E8F0F2); color: var(--g-accent, #1F4E5F); }
.g-dlg__icon svg { width: 24px; height: 24px; }
.g-dlg--danger .g-dlg__icon { background: var(--g-neg-tint, #fef2f2); color: var(--g-neg, #b91c1c); }
.g-dlg--warning .g-dlg__icon { background: var(--g-attn-tint, #fffbeb); color: var(--g-attn, #b45309); }
.g-dlg--success .g-dlg__icon { background: var(--g-pos-tint, #ecfdf5); color: var(--g-pos, #047857); }
.g-dlg__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; text-align: center; color: inherit; }
.g-dlg__msg { margin: 0; font-size: 15px; line-height: 1.6; text-align: center; color: var(--g-ink-2, #4b5563); overflow-wrap: anywhere; }
.g-dlg__pre { white-space: pre-line; }
.g-dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-dlg__head .g-dlg__title { text-align: start; }
.g-dlg__x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--g-radius-sm, 4px); background: none; color: var(--g-ink-3, #6b7280); cursor: pointer; }
.g-dlg__x:hover { background: var(--g-bg, #FAF9F7); color: var(--g-ink, #1A1A1A); }
.g-dlg__x svg { width: 18px; height: 18px; }
.g-dlg__field { display: flex; flex-direction: column; gap: 6px; }
.g-dlg__field .g-input { width: 100%; }
.g-dlg__field textarea.g-input { resize: none; }
.g-dlg__label { font-size: 14px; font-weight: 600; color: var(--g-ink-2, #4b5563); }
.g-dlg__hint, .g-dlg__count { margin: 0; font-size: 12px; color: var(--g-ink-3, #6b7280); }
.g-dlg__count { text-align: end; }
.g-dlg__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.g-dlg__tags[hidden] { display: none; }
.g-dlg__tag .g-tag-remove { display: grid; place-items: center; width: 18px; height: 18px; border: 0; background: none; color: inherit; cursor: pointer; }
.g-dlg__tag svg { width: 12px; height: 12px; }
.g-dlg__actions { display: flex; gap: 12px; margin-top: 4px; }
.g-dlg__actions .g-btn { flex: 1; justify-content: center; min-height: 40px; }
.g-dlg__actions .g-btn:disabled { opacity: .5; cursor: not-allowed; }
.g-dlg :focus-visible { outline: 2px solid var(--g-accent, #1F4E5F); outline-offset: 2px; }
[data-theme="dark"] .g-dlg { background: #1e1e1e; border-color: #333; color: #fafafa; }
[data-theme="dark"] .g-dlg__msg, [data-theme="dark"] .g-dlg__label { color: #a3a3a3; }
@media (prefers-reduced-motion: reduce) { .g-dlg.is-closing, .g-dlg.is-closing::backdrop { transition: none; } }
