/* public/css/form-shell.css — v5.15.1 modern form shell.
   Scope: create/edit pages that opt in with .fs-page (quotations + projects
   in this release). Everything is token-driven from style.css; nothing here
   leaks into screens that don't use the fs-* classes. */

/* ── Page frame ─────────────────────────────────────────────────────────── */
.fs-page{max-width:1400px;margin:0 auto;padding:0 var(--sp-3) var(--sp-4);}
.fs-page .fs-title{font-size:var(--fs-title);font-weight:600;color:var(--text1);letter-spacing:-.2px;}

/* ── Sticky action bar ──────────────────────────────────────────────────── */
.fs-sticky-actions{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);
  padding:14px var(--sp-1);margin:0 calc(-1 * var(--sp-1)) var(--sp-3);
  background:var(--bg);border-bottom:1px solid var(--border);
}
.fs-sticky-actions .fs-actions-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}

/* ── Two-column grid: work area + sidebar ───────────────────────────────── */
.fs-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:var(--sp-3);align-items:start;}
@media (max-width:1100px){
  .fs-grid{grid-template-columns:minmax(0,1fr);}
  .fs-sidebar{order:-1;}   /* header facts first when stacked */
}

/* ── Cards + section rhythm ─────────────────────────────────────────────── */
.fs-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow);
  padding:var(--sp-3);margin-bottom:var(--sp-3);
}
.fs-section{margin-bottom:var(--sp-3);}
.fs-section:last-child{margin-bottom:0;}
.fs-section-head{
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);
  font-size:var(--fs-section);font-weight:600;color:var(--text1);
  padding-bottom:10px;margin-bottom:var(--sp-2);border-bottom:1px solid var(--border);
}

/* ── Fields (scoped: inputs elsewhere in the app are untouched) ─────────── */
.fs-page label{display:block;font-size:var(--fs-label);font-weight:600;color:var(--text2);
  text-transform:none;letter-spacing:0;margin-bottom:5px;}
.fs-page input[type="text"],.fs-page input[type="number"],.fs-page input[type="date"],
.fs-page select,.fs-page textarea{
  width:100%;min-height:var(--input-h);padding:8px 11px;
  border:1px solid var(--border2);border-radius:var(--input-radius);
  font-size:var(--fs-body);background:var(--surface);color:var(--text1);
  transition:border-color .12s, box-shadow .12s;
}
.fs-page textarea{min-height:76px;resize:vertical;}
.fs-page input:focus,.fs-page select:focus,.fs-page textarea:focus{
  outline:none;border-color:var(--accent);box-shadow:var(--focus-ring);
}
.fs-field{margin-bottom:var(--sp-2);}
.fs-field:last-child{margin-bottom:0;}
.fs-row{display:flex;gap:var(--sp-2);}
.fs-row > *{flex:1;min-width:0;}

/* ── Sidebar totals card ────────────────────────────────────────────────── */
.fs-totals{position:sticky;top:72px;}
.fs-totals .fs-totals-body{font-size:var(--fs-body);}
