/* Form container and field layout. */
.sarus-form { display: grid; gap: 14px; }
.sarus-form-field { display: grid; gap: 5px; min-width: 0; margin-bottom: 14px; }
.sarus-form-label { color: var(--sarus-muted); font-size: 12px; font-weight: 650; }
.sarus-form-help { margin: 0; color: var(--sarus-muted); font-size: 12px; }
.sarus-form-grid { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sarus-form-grid > .sarus-form-full { grid-column: 1 / -1; }
/* Checkbox and radio rows. */
.sarus-form-check { display: flex; align-items: flex-start; gap: 8px; color: var(--sarus-text); cursor: pointer; }
.sarus-form-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--sarus-primary); }
/* Form validation messages. */
.sarus-form-error { border: 1px solid #8f333b; padding: 10px 12px; background: #481d22; color: #ffb4b4; }
.sarus-form-success { border: 1px solid #2fb344; padding: 10px 12px; background: #173d24; color: #8ce99a; }
/* Shared dialog frame, body, and footer. */
.sarus-dialog-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .52); }
.sarus-dialog { width: min(100%, 640px); max-height: 92vh; overflow: auto; border: 1px solid var(--sarus-border); background: var(--sarus-panel); box-shadow: var(--sarus-shadow); }
.sarus-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--sarus-border); padding: 18px 20px; }
.sarus-dialog-body { padding: 18px 20px; }
.sarus-dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--sarus-border); padding: 14px 20px; }
/* ADM dialog: shared error/info/success dialog used by PLATTS and legacy admin shells. */
body.adm-dlg-open { overflow: hidden !important; }
.adm-dlg-backdrop { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, 0.48); }
.adm-dlg-backdrop[hidden] { display: none; }
.adm-dlg { --adm-dlg-accent: #206bc4; --adm-dlg-accent-strong: #1a5eae; width: min(570px, calc(100vw - 48px)); max-height: min(780px, calc(100vh - 80px)); display: flex; flex-direction: column; background: #1f2a3a; border: 1px solid #1f2a3a; border-radius: 0; color: #fff; box-shadow: 0 18px 44px rgba(15, 23, 42, 0.34); }
.adm-dlg--wide { width: min(980px, calc(100vw - 48px)); }
.adm-dlg--error { --adm-dlg-accent: #ff4d4f; --adm-dlg-accent-strong: #e13f41; }
.adm-dlg--info { --adm-dlg-accent: #3b82f6; --adm-dlg-accent-strong: #2563eb; }
.adm-dlg--success { --adm-dlg-accent: #2fb344; --adm-dlg-accent-strong: #26963a; }
.adm-dlg-head, .adm-dlg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm-dlg-head { padding: 20px 20px 8px; }
.adm-dlg-head-copy { min-width: 0; }
.adm-dlg-caption { margin: 0; font-size: 18px; font-weight: 650; color: #fff; }
.adm-dlg-subtitle { margin: 6px 0 0; font-size: 13px; color: #94a3b8; }
.adm-dlg-close { width: 30px; height: 30px; border: 0; background: transparent; color: #94a3b8; font-size: 22px; line-height: 1; cursor: pointer; }
.adm-dlg-close:hover { color: #fff; }
.adm-dlg-body { padding: 36px 28px 28px; overflow: auto; }
.adm-dlg-message-row { display: flex; align-items: center; gap: 14px; }
.adm-dlg-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 2px solid var(--adm-dlg-accent); border-radius: 999px; color: var(--adm-dlg-accent); font-size: 22px; line-height: 1; font-weight: 700; }
.adm-dlg-message { margin: 0; font-size: 16px; line-height: 1.45; color: #fff; white-space: pre-line; }
.adm-dlg-foot { padding: 18px 28px 20px; border-top: 1px solid #344052; background: #1f2a3a; }
.adm-dlg-foot-left, .adm-dlg-foot-right { display: flex; align-items: center; gap: 10px; }
.adm-dlg-btn { min-width: 96px; min-height: 40px; border: 1px solid #344052; background: transparent; color: #fff; padding: 8px 18px; font-size: 16px; cursor: pointer; }
.adm-dlg-btn:hover { background: #263449; }
.adm-dlg-btn--primary { border-color: var(--adm-dlg-accent-strong); background: var(--adm-dlg-accent-strong); }
.adm-dlg-btn--primary:hover { background: var(--adm-dlg-accent); }
.adm-dlg-details { padding: 0 28px 22px; }
.adm-dlg-details[hidden] { display: none; }
.adm-dlg-section { display: grid; gap: 6px; margin-top: 14px; }
.adm-dlg-section-label { font-size: 13px; color: #cbd5e1; }
.adm-dlg-section-box { width: 100%; min-height: 120px; resize: vertical; border: 1px solid #344052; background: #111827; color: #e2e8f0; padding: 10px; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.4; }
/* Responsive form collapse. */
@media (max-width: 760px) { .sarus-form-grid { grid-template-columns: 1fr; } .sarus-form-grid > .sarus-form-full { grid-column: auto; } }
