/* PlusERP Form Design System
   Visual-only shared form language derived from the approved New Account workspace.
   No field structure, workflow state, or application behavior is defined here. */

:where(.plus-form-workspace,.company-settings-workspace,.new-account-workspace){
  --erp-form-canvas:#f5f8fc;
  --erp-form-surface:#fff;
  --erp-form-text:#0b1f40;
  --erp-form-text-strong:#071a36;
  --erp-form-text-subtle:#294568;
  --erp-form-text-muted:#536c8f;
  --erp-form-border:#dbe4f0;
  --erp-form-border-strong:#cbd8e9;
  --erp-form-primary:#1760e8;
  --erp-form-danger:#dc2626;
  --erp-form-success:#0a914d;
  --erp-form-warning:#8c5900;
  --erp-form-control-height:42px;
  --erp-form-radius:9px;
  --erp-form-card-shadow:0 3px 12px rgba(15,38,71,.055);
  color:var(--erp-form-text);
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:13px;
  line-height:1.4;
}

:where(.plus-form-workspace,.company-settings-workspace){
  min-width:0;
  background:var(--erp-form-canvas);
}

/* Page/form headers */
:where(.plus-form-workspace,.company-settings-workspace) > :where(.panel-head,.plus-form-header){
  border-color:var(--erp-form-border);
  border-radius:10px;
  background:var(--erp-form-surface);
  box-shadow:var(--erp-form-card-shadow);
}

:where(.plus-form-workspace,.company-settings-workspace) > :where(.panel-head,.plus-form-header) h2{
  margin:0;
  color:var(--erp-form-text-strong);
  font-size:21px;
  font-weight:720;
  line-height:1.15;
  letter-spacing:-.012em;
}

:where(.plus-form-workspace,.company-settings-workspace) > :where(.panel-head,.plus-form-header) .hint{
  color:var(--erp-form-text-muted);
  font-size:12.5px;
  font-weight:450;
  line-height:1.35;
}

/* Standard cards and sections */
:where(.plus-form-workspace:not(.inline-workspace-invoice),.company-settings-workspace)
  :where(.panel,.form-section,.form-card,.company-settings-card,.customer-form-section,.line-editor,.subgrid,.template-box){
  min-width:0;
  border:1px solid var(--erp-form-border);
  border-radius:var(--erp-form-radius);
  background:var(--erp-form-surface);
  box-shadow:var(--erp-form-card-shadow);
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(.company-settings-card-head,.form-section-head,.section-head){
  color:var(--erp-form-text-strong);
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(.company-settings-card-head,.form-section-head,.section-head) h3{
  margin:0;
  color:var(--erp-form-text-strong);
  font-size:16px;
  font-weight:720;
  line-height:1.2;
  letter-spacing:-.006em;
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(.company-settings-card-head,.form-section-head,.section-head) :where(span,p,small){
  color:var(--erp-form-text-muted);
  font-size:12px;
  font-weight:500;
  line-height:1.35;
}

/* Labels and controls */
:where(.plus-form-workspace,.company-settings-workspace) label{
  min-width:0;
  color:var(--erp-form-text-subtle);
  font-size:12.5px;
  font-weight:650;
  line-height:1.3;
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--erp-form-border-strong);
  border-radius:7px;
  background:#fff;
  color:#102848;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:13.5px;
  font-weight:500;
  line-height:1.35;
  outline:0;
}

:where(.plus-form-workspace:not(.inline-workspace-invoice),.company-settings-workspace)
  :where(input:not([type="checkbox"]):not([type="radio"]),select){
  min-height:var(--erp-form-control-height);
}

:where(.plus-form-workspace,.company-settings-workspace) textarea{
  min-height:76px;
  padding:10px 12px;
  resize:vertical;
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{
  border-color:var(--erp-form-primary);
  box-shadow:0 0 0 3px rgba(37,99,235,.11);
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(input:not([type="checkbox"]):not([type="radio"]),textarea)::placeholder{
  color:#8191a7;
  font-weight:400;
  opacity:1;
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(input[readonly],select[disabled],input[disabled],textarea[disabled]){
  color:#5b6e88;
  background:#f1f4f8;
  opacity:1;
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(input,select,textarea):invalid:not(:placeholder-shown),
:where(.plus-form-workspace,.company-settings-workspace) .field-error{
  border-color:#e53e3e;
}

:where(.plus-form-workspace,.company-settings-workspace)
  :where(input,select,textarea):invalid:not(:placeholder-shown):focus,
:where(.plus-form-workspace,.company-settings-workspace) .field-error:focus{
  box-shadow:0 0 0 3px rgba(229,62,62,.1);
}

:where(.plus-form-workspace,.company-settings-workspace) :where(input[type="checkbox"],input[type="radio"]){
  accent-color:var(--erp-form-primary);
}

/* Supporting information and state treatments */
:where(.plus-form-workspace,.company-settings-workspace)
  :where(.form-info,.info-strip,.help-strip,.transaction-readiness-inline){
  border-left:3px solid #2878f0;
  border-radius:5px;
  background:#edf5ff;
  color:#35567f;
  font-size:12px;
  font-weight:500;
}

:where(.plus-form-workspace,.company-settings-workspace) :where(.hint,.field-hint,small){
  color:var(--erp-form-text-muted);
}

:where(.plus-form-workspace,.company-settings-workspace) :where(.badge,.status-badge){
  font-size:11.5px;
  font-weight:650;
  letter-spacing:0;
}

/* Standard action area; invoice keeps its approved specialized action treatment. */
:where(.plus-form-workspace:not(.inline-workspace-invoice),.company-settings-workspace) .form-actions{
  border-color:var(--erp-form-border);
  border-radius:10px 10px 0 0;
  background:rgba(255,255,255,.97);
  box-shadow:0 -6px 18px rgba(15,38,71,.065);
}

:where(.plus-form-workspace,.company-settings-workspace) .form-actions .btn{
  min-height:40px;
  font-size:13px;
  font-weight:650;
  letter-spacing:0;
}

/* Accessibility and predictable keyboard navigation */
:where(.plus-form-workspace,.company-settings-workspace)
  :where(button,input,select,textarea,a):focus-visible{
  outline:3px solid rgba(23,96,232,.22);
  outline-offset:2px;
}

@media(max-width:767px){
  :where(.plus-form-workspace,.company-settings-workspace)
    > :where(.panel-head,.plus-form-header) h2{
    font-size:20px;
  }
  :where(.plus-form-workspace:not(.inline-workspace-invoice),.company-settings-workspace)
    .form-actions{
    position:static;
  }
}

@media(prefers-reduced-motion:reduce){
  :where(.plus-form-workspace,.company-settings-workspace) *{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
  }
}
