/* Shared dialog + form styling for admin/account screens.
   Served at /css/siimple-forms.css. Paired with /js/siimple-forms.js — the
   markup those two agree on is the sf-* prefix, nothing else. */

/* ── dialog ──────────────────────────────────────────────────────────────── */
/* Hidden via a class, never inline display:none — the platform strips elements
   carrying that inline style before the page is served. */
.sf-dialog{position:fixed;inset:0;z-index:900;display:flex;align-items:flex-start;
  justify-content:center;background:rgba(16,24,40,.45);padding:40px 16px;overflow:auto}
.sf-dialog.sf-hidden{display:none}
.sf-dialog-box{background:#fff;border-radius:12px;width:100%;max-width:560px;
  box-shadow:0 20px 44px rgba(16,24,40,.18);overflow:hidden}
.sf-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:18px 22px;border-bottom:1px solid #eef1f5}
.sf-dialog-head h3{margin:0;font-size:16px;color:#101828}
.sf-dialog-x{background:none;border:0;font-size:22px;line-height:1;color:#98a2b3;
  cursor:pointer;padding:0 4px}
.sf-dialog-x:hover{color:#475467}
.sf-dialog-body{padding:22px}
.sf-loading{padding:30px 0;text-align:center;color:#98a2b3;font-size:14px}

/* ── banner ──────────────────────────────────────────────────────────────── */
.sf-note{margin:0 0 16px;padding:11px 13px;border-radius:8px;font-size:13px;line-height:1.55}
.sf-note.sf-hidden{display:none}
.sf-note.sf-err{border:1px solid #f3c4c4;background:#fff5f5;color:#8c1d18}
.sf-note.sf-ok{border:1px solid #b6e0c2;background:#f2fbf5;color:#12683a}

/* ── fields ──────────────────────────────────────────────────────────────── */
.sf-field{margin:0 0 18px}
.sf-label{display:block;font-size:13px;font-weight:600;color:#344054;margin:0 0 6px}
.sf-field input[type=text],.sf-field input[type=email],.sf-field input[type=url],
.sf-field input[type=password],.sf-field textarea,.sf-field select{
  width:100%;box-sizing:border-box;font:inherit;font-size:14px;color:#101828;
  border:1px solid #d0d5dd;border-radius:8px;padding:10px 12px;background:#fff}
.sf-field textarea{min-height:96px;resize:vertical;line-height:1.6}
.sf-field input:focus,.sf-field textarea:focus,.sf-field select:focus{
  outline:0;border-color:#155eef;box-shadow:0 0 0 3px rgba(21,94,239,.12)}
.sf-field select option:first-child{text-transform:capitalize}
.sf-help{font-size:12px;color:#667085;margin:6px 0 0;line-height:1.5}
.sf-two{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
@media (max-width:560px){.sf-two{grid-template-columns:1fr}}

/* OSelectList wraps its <select> in a div; display:contents keeps that wrapper
   out of the layout so the select fills the field like every other control. */
.sf-select{display:contents}

/* ── per-field validation ────────────────────────────────────────────────── */
.sf-fielderr{color:#b42318;font-size:13px;margin:6px 0 0;line-height:1.45}
.sf-field.sf-invalid input,.sf-field.sf-invalid textarea,.sf-field.sf-invalid select{
  border-color:#f3c4c4}
.sf-field.sf-invalid input:focus,.sf-field.sf-invalid textarea:focus,
.sf-field.sf-invalid select:focus{box-shadow:0 0 0 3px rgba(217,45,32,.12)}

/* ── actions ─────────────────────────────────────────────────────────────── */
.sf-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:22px 0 0}
.sf-actions .sf-right{display:flex;gap:10px;margin-left:auto}
.sf-btn{font:inherit;font-size:14px;font-weight:600;cursor:pointer;border-radius:8px;
  padding:9px 18px;border:1px solid #d0d5dd;background:#fff;color:#344054}
.sf-btn:hover{background:#f9fafb}
.sf-btn[disabled]{opacity:.6;cursor:default}
.sf-btn-primary{background:#155eef;border-color:#155eef;color:#fff}
.sf-btn-primary:hover{background:#1049c4}
.sf-btn-danger{background:#fff;border-color:#f3c4c4;color:#b42318;font-weight:400}
.sf-btn-danger:hover{background:#fff5f5}
