html:has(dialog[open]){scrollbar-gutter:stable;overflow:hidden}.app-modal{overscroll-behavior:contain;scrollbar-width:thin;color:#334155;width:min(512px,100% - 32px);max-width:none;max-height:calc(100dvh - 48px);font-family:var(--font-body), sans-serif;background:#fff;border:1px solid #e2e8f0;border-radius:8px;margin:auto;padding:0;font-size:14px;line-height:1.65;animation:.18s ease-out app-modal-enter;position:fixed;inset:0;overflow-y:auto;box-shadow:0 24px 72px #0f172a33}.app-modal::backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#0f172a80}.app-modal[open]{border-radius:4px;flex-direction:column;display:flex;overflow:hidden}.app-modal-wide{width:min(672px,100% - 32px)}.app-modal-header{z-index:2;background:#fff;border-bottom:1px solid #e2e8f0;justify-content:space-between;align-items:center;gap:16px;padding:18px 20px;display:flex;position:sticky;top:0}.app-modal-header h2{min-width:0;font-family:var(--font-heading), sans-serif;overflow-wrap:anywhere;letter-spacing:0;font-size:16px;font-weight:600;line-height:1.5}.app-modal-close{color:#64748b;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.app-modal-close:hover{color:#0f172a;background:#f1f5f9}.app-modal-close:disabled{opacity:.4;cursor:wait}.app-modal-header{flex-shrink:0}.app-modal-body{overscroll-behavior:contain;min-height:0;padding:20px;overflow-y:auto}.app-modal-body>*+*{margin-top:16px}.app-modal :is(button,input,textarea):focus-visible{outline:2px solid var(--web-accent,#ea580c);outline-offset:3px}.app-dialog-context{align-items:flex-start;gap:14px;display:flex}.app-dialog-symbol{border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.app-dialog-danger{color:#b91c1c;background:#fef2f2}.app-dialog-warning{color:#b45309;background:#fffbeb}.app-dialog-info{color:#1d4ed8;background:#eff6ff}.app-dialog-description{overflow-wrap:anywhere;color:#475569;min-width:0;margin:0;padding-top:3px}.app-dialog-field{gap:7px;margin-top:20px;display:grid}.app-dialog-field>span{color:#334155;font-size:13px;font-weight:600}.app-dialog-field :is(input,textarea){color:#0f172a;width:100%;font:inherit;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:10px 12px}.app-dialog-field textarea{resize:vertical;min-height:92px;max-height:220px}.app-dialog-field small{color:#64748b;font-size:12px}.app-dialog-actions{border-top:1px solid #e2e8f0;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:20px;display:flex}.app-dialog-actions .btn{min-height:42px;box-shadow:none;background-image:none;border-radius:6px}.app-dialog-actions .btn:hover{transform:none}.app-dialog-actions .btn-danger{color:#fff;background:#b91c1c}.app-dialog-actions .btn-danger:hover{background:#991b1b}.app-dialog-actions .app-dialog-warning-button{color:#fff;background:#b45309}.app-dialog-actions .app-dialog-warning-button:hover{background:#92400e}.app-dialog-actions .app-dialog-info-button{background:var(--web-accent,#ea580c);color:var(--web-accent-text,#fff)}.app-dialog-actions .app-dialog-info-button:hover{filter:brightness(.92)}.app-dialog-error{color:#991b1b;overflow-wrap:anywhere;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;margin-top:16px;padding:10px 12px}@keyframes app-modal-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media (max-width:639px){.app-modal{width:calc(100% - 32px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.app-modal-header{gap:12px;padding:12px 16px}.app-modal-close{border:1px solid #e2e8f0;width:44px;height:44px}.app-modal-body{padding:16px}.app-modal-body :is(input,select,textarea){min-width:0;max-width:100%;font-size:16px}.app-dialog-context{gap:10px}.app-dialog-actions{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.app-dialog-actions .btn{white-space:normal;overflow-wrap:anywhere;width:100%;min-width:0;padding-inline:10px}}@media (max-width:359px){.app-dialog-actions{grid-template-columns:minmax(0,1fr)}.app-dialog-actions>:last-child{grid-row:1}}@media (prefers-reduced-motion:reduce){.app-modal{animation:none}}
