/* Falcon shared type scale and control sizes (standing rule in CLAUDE.md). Loaded last, so it wins over one-off sizes
   in the older style sheets. Every screen uses these: change a size here and it changes everywhere.
   (Pages are scaled together by --app-text-zoom on desktop; these values are before that scaling.) */
:root{
  --fs-field:13px;          /* field text: dropdown values, inputs, textareas, checkbox / list labels, chips, buttons, table cells */
  --fs-label:12px;          /* labels above controls, hints, helper / small notes */
  --fs-heading:14px;        /* section / box headings */
  --fw-heading:500;
  --ctl-h:32px;             /* inputs, dropdowns, date pickers, searchable pickers */
  --ctl-pad:5px 9px;
  --row-h:28px;             /* checkbox list rows */
  --chip-h:28px;            /* chips */
  --fg-secondary:#6b7280;
}

/* Field text: 13px everywhere. (":not(#_)" only raises priority over the older app-wide 12px rule.) */
#content input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]):not(#_),
#content select:not(#_),
#content textarea:not(#_),
#content button:not(#_),
#content .btn:not(#_),
#content a.primary:not(#_),
#content a.secondary:not(#_),
#content table td:not(#_),
#content .check-option:not(#_),
#content .check-row:not(#_),
#content .cb-row:not(#_),
#content .chip:not(#_),
.modal input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not(#_),
.modal select:not(#_),
.modal textarea:not(#_),
.modal button:not(#_),
.confirm-box button:not(#_),
.confirm-box input:not(#_),
.confirm-box textarea:not(#_){font-size:var(--fs-field)!important}
#content input::placeholder,#content textarea::placeholder,.modal input::placeholder{font-size:var(--fs-field)!important;letter-spacing:normal!important;text-transform:none!important;font-weight:400!important}

/* Controls in forms, toolbars and filters: 32px high, same padding. (Controls inside table cells keep their compact row heights.) */
#content .form-group>input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),
#content .form-group>select,#content .form-group .falcon-fabric-btn,#content .form-group .lbl-colour-row>input:not([type=color]),
#content .falcon-table-toolbar input[type=search],#content .falcon-table-toolbar select,#content .falcon-table-tools select,
#content .art-toolbar input[type=search],#content .g-add-row input,
.modal .form-group>input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),.modal .form-group>select{
  height:var(--ctl-h)!important;min-height:var(--ctl-h)!important;padding:var(--ctl-pad)!important;box-sizing:border-box!important;line-height:1.3!important}
/* Code boxes: the same text size as any field, no letter-spaced look. */
#content .falcon-code-input,#content .falcon-code-input::placeholder{font-size:var(--fs-field)!important;letter-spacing:.3px!important;font-weight:600!important;text-align:left!important}
#content .falcon-code-input::placeholder{font-weight:400!important;letter-spacing:normal!important}

/* Labels, hints and small notes: 12px, secondary grey. (Size headings in the PO items grid are labels too.) */
#content #po-lines-table .po-sz:not(#_){font-size:var(--fs-label)!important}
#content .form-group>label,#content .form-group>small,#content small,#content .muted,#content .g-hint,
.modal .form-group>label,.modal small{font-size:var(--fs-label)!important}
#content .form-group>label,.modal .form-group>label{color:var(--fg-secondary)!important;font-weight:500!important}

/* Section / box headings: 14px, weight 500. (Page titles unchanged.) */
#content .falcon-form-section>h4:not(#_),#content .panel-head h3:not(#_),#content .g-box>h4:not(#_),#content fieldset>legend:not(#_){font-size:var(--fs-heading)!important;font-weight:var(--fw-heading)!important}

/* Checkbox list rows 28px min; chips 28px. */
#content .check-option,#content .cb-row,#content .check-row{min-height:var(--row-h)}
#content .chip{height:var(--chip-h)}

/* Sidebar menu text follows the same scale. */
.sidebar .nav-label,.sidebar .falcon-user-links a,.sidebar .falcon-user-links button{font-size:calc(var(--fs-field) * var(--app-text-zoom,1))!important}
.sidebar .user-switch small{font-size:calc(var(--fs-label) * var(--app-text-zoom,1))!important}

@media (prefers-color-scheme: dark){ :root{ --fg-secondary:#9ca3af } }
body.dark-theme{ --fg-secondary:#9ca3af }

/* Wash care selection group rule ("Washing temperature · choose 1") is a label, not a heading. */
#content .g-box .wc-set>legend:not(#_){font-size:var(--fs-label)!important;font-weight:500!important;color:var(--fg-secondary)!important}
