/* ==========================================================================
   BS® — Unified typography
   One type scale for the whole program (loaded last, overrides older rules).
   SF Pro faces available: 400 Regular · 500/600 Medium · 700+ Bold.
   Scale:  page title 30 · card title 19 · modal title 20 · section 16
           body/table 13 · small 12 · labels/badges 11 · table head 10.5
           KPI value 24 · KPI label 11
   Weights: 400 text · 600 emphasis/titles/numbers (Medium) · 700 only for logo
   ========================================================================== */

:root{
  --t-font:"SF Pro Display","BS SF Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --t-text:#1d1d1f;
  --t-muted:#7b8794;
}

/* Base ------------------------------------------------------------------- */
:is(#t#t#t#t#t#t#t#t, html) body{
  font-family:var(--t-font)!important;
  font-size:14px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}
:is(#t#t#t#t#t#t#t#t, html) body :is(input,select,textarea,button){font-family:var(--t-font)!important}

/* Page header ------------------------------------------------------------- */
:is(#t#t#t#t#t#t#t#t, html) body #page-title{font-size:30px!important;font-weight:600!important;letter-spacing:-.02em!important;line-height:1.15!important}
:is(#t#t#t#t#t#t#t#t, html) body #page-subtitle{font-size:13px!important;font-weight:400!important;letter-spacing:0!important}

/* Titles ------------------------------------------------------------------ */
:is(#t#t#t#t#t#t#t#t, html) body .view h2{font-size:19px!important;font-weight:600!important;letter-spacing:-.01em!important;line-height:1.25!important}
:is(#t#t#t#t#t#t#t#t, html) body .view h3{font-size:16px!important;font-weight:600!important;letter-spacing:-.005em!important}
:is(#t#t#t#t#t#t#t#t, html) body .modal h2{font-size:20px!important;font-weight:600!important;letter-spacing:-.01em!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) .panel-head p{font-size:13px!important;font-weight:400!important;letter-spacing:0!important}

/* Tables ------------------------------------------------------------------ */
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) th,
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) th .sort-button{font-size:10.5px!important;font-weight:600!important;text-transform:uppercase!important;letter-spacing:.05em!important;line-height:1.45!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) td{font-size:13px!important;font-weight:400!important;letter-spacing:0!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) td :is(strong,b,.invoice-link){font-size:13px!important;font-weight:600!important;letter-spacing:0!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) :is(td.mono,td .mono,.mono){font-variant-numeric:tabular-nums!important;letter-spacing:0!important}

/* Secondary text ------------------------------------------------------------ */
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) :is(small,.table-sub,.agreement-last-payment,.agreement-eur){font-size:12px!important;font-weight:400!important;letter-spacing:0!important}

/* Badges & chips ------------------------------------------------------------- */
:is(#t#t#t#t#t#t#t#t, html) body :is(.badge,.document-badge,.erp-badge,.entity-kind-badge,.control-status-chip){font-size:11px!important;font-weight:600!important;letter-spacing:.01em!important}
:is(#t#t#t#t#t#t#t#t, html) body .control-status-chip span{font-size:inherit!important;font-weight:inherit!important}

/* KPI cards (core + ERP) ------------------------------------------------------ */
:is(#t#t#t#t#t#t#t#t, html) body .kpi > div > span{font-size:11px!important;font-weight:600!important;text-transform:uppercase!important;letter-spacing:.06em!important;line-height:1.45!important;overflow:visible!important}
:is(#t#t#t#t#t#t#t#t, html) body .kpi > div > strong{font-size:24px!important;font-weight:600!important;letter-spacing:-.02em!important;line-height:1.15!important;font-variant-numeric:tabular-nums}
:is(#t#t#t#t#t#t#t#t, html) body .kpi > div > small{font-size:12px!important;font-weight:400!important;letter-spacing:0!important}

/* Small stat blocks (company cards, project cards, quick stats, material control) */
:is(#t#t#t#t#t#t#t#t, html) body :is(.supplier-stats,.project-quick-stats,.erp-project-stats) > div > span{font-size:10.5px!important;font-weight:600!important;text-transform:uppercase!important;letter-spacing:.05em!important;line-height:1.45!important;overflow:visible!important}
:is(#t#t#t#t#t#t#t#t, html) body .supplier-stats > div > strong{font-size:16px!important;font-weight:600!important;letter-spacing:-.01em!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.project-quick-stats,.erp-project-stats) > div > strong{font-weight:600!important;letter-spacing:-.01em!important}
:is(#t#t#t#t#t#t#t#t, html) body .material-graph-stats > div > strong{font-size:20px!important;font-weight:600!important;letter-spacing:-.01em!important}
:is(#t#t#t#t#t#t#t#t, html) body .material-graph-stats > div > span:not(.stat-icon){font-size:12px!important;font-weight:400!important;letter-spacing:0!important}
:is(#t#t#t#t#t#t#t#t, html) body #material-control-total{font-weight:600!important;letter-spacing:-.03em!important}

/* Forms & buttons -------------------------------------------------------------- */
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) :is(input,select,textarea){font-size:13.5px!important;font-weight:400!important;letter-spacing:0!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) label:not(.linked-picker-row):not(.search):not(.btn):not(.check-row):not(.permission-check):not(.scan-remove):not(.erp-field-check){font-size:12px!important;font-weight:600!important;letter-spacing:0!important}
:is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) label :is(input,select,textarea){font-size:13.5px!important;font-weight:400!important}
:is(#t#t#t#t#t#t#t#t, html) body .btn{font-size:13px!important;font-weight:600!important;letter-spacing:0!important}

/* Sidebar --------------------------------------------------------------------- */
:is(#t#t#t#t#t#t#t#t, html) body .nav-item{font-size:14px!important;font-weight:500!important;letter-spacing:0!important}

/* Empty states ---------------------------------------------------------------- */
:is(#t#t#t#t#t#t#t#t, html) body .empty-state strong{font-size:16px!important;font-weight:600!important}
:is(#t#t#t#t#t#t#t#t, html) body .empty-state span{font-size:13px!important;font-weight:400!important}

/* Small screens ----------------------------------------------------------------- */
@media (max-width:760px){
  :is(#t#t#t#t#t#t#t#t, html) body #page-title{font-size:23px!important}
  :is(#t#t#t#t#t#t#t#t, html) body .view h2{font-size:17px!important}
  :is(#t#t#t#t#t#t#t#t, html) body .kpi > div > strong{font-size:20px!important}
  :is(#t#t#t#t#t#t#t#t, html) body :is(.view,.modal) :is(input,select,textarea){font-size:16px!important}
}
:is(#t#t#t#t#t#t#t#t, html) body .kpi .decimal-part{font-weight:inherit!important}
:is(#t#t#t#t#t#t#t#t, html) body .project-toolbar > div > strong{font-size:16px!important;font-weight:600!important;letter-spacing:-.005em!important}
:is(#t#t#t#t#t#t#t#t, html) body .project-toolbar > div > span{font-size:12px!important;font-weight:400!important}

/* Project portfolio cards: stat labels must fit inside their tiles */
:is(#t#t#t#t#t#t#t#t, html) body .erp-project-card{container-type:inline-size}
:is(#t#t#t#t#t#t#t#t, html) body .erp-project-stats > div > span{font-size:9.5px!important;letter-spacing:.03em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
@container (max-width: 306px){
  :is(#t#t#t#t#t#t#t#t, html) body .erp-project-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
:is(#t#t#t#t#t#t#t#t, html) body .erp-project-stats.stats-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}
