/* DrBestand 0.78.0 — canonical SystemFormComposition contract. */
.system-form{
  --system-form-border:var(--erp-ui-border,var(--line,#cfdae5));
  --system-form-border-strong:var(--erp-ui-border-strong,#b9c9d8);
  --system-form-surface:var(--erp-ui-surface,#fff);
  --system-form-surface-muted:var(--erp-ui-surface-muted,#f6f9fb);
  --system-form-text:var(--erp-ui-text,var(--text,#082c58));
  --system-form-muted:var(--erp-ui-muted,var(--muted,#607487));
  --system-form-radius:var(--erp-ui-radius-md,13px);
  --system-form-field-radius:var(--erp-ui-radius-sm,9px);
  --system-form-field-shadow:var(--erp-ui-field-shadow,0 1px 2px rgba(5,35,72,.045));
  display:grid;
  gap:16px;
  min-width:0;
}
.system-form[hidden],
.system-form [hidden],
.system-form__section[hidden],
.system-form__actions[hidden]{display:none!important}

.system-form label:has(>.label),
.system-form .system-form__field{
  display:grid;
  align-content:start;
  gap:6px;
  min-width:0;
}
.system-form .label{
  margin:0;
  color:#53697d;
  font-size:10px;
  font-weight:900;
  letter-spacing:.045em;
  line-height:1.3;
  text-transform:uppercase;
}
.system-form .hint,
.system-form .help-text{color:var(--system-form-muted)}
.system-form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="color"]):not([type="range"])),
.system-form select,
.system-form textarea{
  width:100%;
  min-height:43px;
  padding:9px 11px;
  border:1px solid var(--system-form-border-strong);
  border-radius:var(--system-form-field-radius);
  background:#fff;
  color:#102f54;
  box-shadow:var(--system-form-field-shadow);
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.system-form textarea{min-height:104px;resize:vertical;line-height:1.5}
.system-form input:focus,
.system-form select:focus,
.system-form textarea:focus{
  border-color:var(--brand-accent,#08a88a);
  outline:0;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-accent,#08a88a) 14%,transparent),var(--system-form-field-shadow);
}
.system-form input[readonly],
.system-form textarea[readonly],
.system-form select:disabled,
.system-form input:disabled{
  border-color:#dce4ea;
  background:#f1f5f7;
  color:#667989;
  box-shadow:none;
}

.system-form__grid{display:grid;gap:12px;min-width:0}
.system-form__grid--1{grid-template-columns:1fr}
.system-form__grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.system-form__grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.system-form__grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
.system-form__field--wide{grid-column:1/-1}

.system-form--record .system-form__section{
  display:grid;
  gap:12px;
  min-width:0;
  padding:18px;
  border:1px solid var(--system-form-border);
  border-radius:var(--system-form-radius);
  background:var(--system-form-surface-muted);
}
.system-form--record .system-form__section>.erp-section-heading,
.system-form--record .system-form__section>.system-form__section-head{
  padding-bottom:10px;
  border-bottom:1px solid var(--system-form-border);
}
.system-form--record .system-form__section h3{color:var(--system-form-text)}

.system-form--settings>.system-form__section{
  display:grid;
  gap:12px;
  min-width:0;
  margin-top:2px;
  padding-top:16px;
  border-top:1px solid var(--system-form-border);
}
.system-form--settings>.system-form__section:first-of-type,
.system-form--settings>.system-form__section--first{
  margin-top:0;
  padding-top:0;
  border-top:0;
}
.system-form--settings>.system-form__section>h3{margin:0}

.system-form--compact{gap:12px}
.system-form--compact>button:last-child,
.system-form--compact>.button:last-child{justify-self:start}

.system-form__actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  width:100%;
  margin-top:2px;
  padding-top:14px;
  border-top:1px solid var(--system-form-border);
}
.system-form__actions--start{justify-content:flex-start}
.system-form__actions--end{justify-content:flex-end}
.system-form__actions--split{justify-content:space-between}

.system-form .erp-checkbox{
  min-height:43px;
  padding:9px 10px;
  border:1px solid var(--system-form-border);
  border-radius:var(--system-form-field-radius);
  background:#fff;
  box-shadow:var(--system-form-field-shadow);
}
.system-form .erp-checkbox:has(input:checked){
  border-color:color-mix(in srgb,var(--brand-accent,#08a88a) 55%,#b9c9d8);
  background:color-mix(in srgb,var(--brand-accent,#08a88a) 7%,#fff);
}

.system-form .system-form__check{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}
.system-form .system-form__check>input[type="checkbox"],
.system-form .system-form__check>input[type="radio"]{flex:0 0 auto;margin-top:1px}

body.erp-pref-visual-executive .system-form--record .system-form__section{
  background:linear-gradient(145deg,#fff 0%,#f5f9fb 100%);
  box-shadow:0 8px 22px rgba(5,35,72,.055);
}
body.erp-pref-visual-precision .system-form--record .system-form__section{box-shadow:none}
body.erp-pref-visual-precision .system-form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="color"]):not([type="range"])),
body.erp-pref-visual-precision .system-form select{min-height:40px;border-radius:7px}
body.erp-pref-visual-precision .system-form .label{letter-spacing:.07em}
body.erp-pref-visual-minimal .system-form--record .system-form__section{
  padding:14px 0;
  border:0;
  border-top:1px solid var(--system-form-border);
  border-radius:0;
  background:transparent;
}
body.erp-pref-visual-minimal .system-form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="color"]):not([type="range"]):not([readonly]):not(:disabled)),
body.erp-pref-visual-minimal .system-form select:not(:disabled),
body.erp-pref-visual-minimal .system-form textarea:not([readonly]){border-color:#d9e1e7;background:#fff;box-shadow:none}

@media(max-width:900px){
  .system-form__grid--4,.system-form__grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .system-form__grid--4,.system-form__grid--3,.system-form__grid--2{grid-template-columns:1fr}
  .system-form__field--wide{grid-column:auto}
  .system-form__actions{align-items:stretch}
  .system-form__actions>.button,.system-form__actions>button{flex:1 1 auto}
}
@media(prefers-reduced-motion:reduce){
  .system-form input,.system-form select,.system-form textarea{transition:none}
}
