/*
  Application-wide readable typography.

  This is deliberately loaded after every feature stylesheet so the operational
  screens share one legible type scale. It applies only on screen: document
  prints retain their own calibrated layouts.
*/
@media screen {
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  body { font-size:15px; line-height:1.5; color:#17212b; }

  /* Make important business values easy to spot across every workflow. */
  :is(b,strong) { color:#080a0c; font-weight:800; }
  :is(.history-line > b,.contract-list-number,.acc-number) {
    color:#050607 !important;
    font-size:15px !important;
    font-weight:800 !important;
    font-variant-numeric:tabular-nums;
  }
  .history-line > strong {
    color:#080a0c !important;
    font-size:15px !important;
    font-weight:800 !important;
    font-variant-numeric:tabular-nums;
  }
  :is(.summary strong,.contract-value,.payment-history-total strong,.lc-totals b,
      .quote-total strong,.revenue-summary strong,#reports-view #period-summary strong,
      .approval-total>b,.approval-total>span b,#accounting-view .acc-kpi>strong) {
    color:#050607 !important;
    font-weight:800 !important;
    font-variant-numeric:tabular-nums;
  }
  :is(.summary strong,.contract-value,.lc-totals b,#accounting-view .acc-kpi>strong) {
    font-size:20px !important;
  }
  :is(.revenue-summary strong,#reports-view #period-summary strong,.approval-total>b,.approval-total>span b) {
    font-size:18px !important;
  }
  .payment-history-total strong { font-size:18px !important; }
  .quote-total span b { color:#050607 !important; font-size:14px !important; font-weight:800 !important; }
  .quote-total strong { font-size:17px !important; }
  .quote-total strong b { font-size:20px !important; }
  .contract-financial-status { color:#252b30 !important; font-size:12px !important; }
  .contract-customer-name { color:#17212b !important; font-weight:700; }
  .lc-history > b,.contract-item-content li > b { color:#050607 !important; font-size:15px !important; font-weight:800 !important; }
  #accounting-view .acc-number a { color:#050607 !important; font-weight:800; text-decoration-color:#899198; }
  #accounting-view .acc-table td.num { color:#101214; font-size:14px !important; font-weight:700; font-variant-numeric:tabular-nums; }
  :is(table,.stock-card-table,.approval-table) td { color:#20252a; }

  /* Text entry and actions must remain readable in every workflow. */
  :is(input,select,textarea) { font-size:14px !important; line-height:1.4; }
  :is(button,.button,.history-action,.text-button,.delivery-slip-button) { font-size:13px !important; line-height:1.35; }

  /* Data-heavy grids use a smaller, but still readable, scale. */
  :is(table, .history-line, .quote-result, .cart-line, .stock-card-table, .approval-table) :is(td,th),
  .history-line,.quote-result,.cart-line { line-height:1.45; }
  :is(table,.stock-card-table,.approval-table) td { font-size:13px !important; }
  :is(table,.stock-card-table,.approval-table) th { font-size:11px !important; line-height:1.35; }
  .compact-table td,.compact-table td :is(strong,b),.compact-table .stock { font-size:12px !important; }
  .compact-table th { font-size:10px !important; }
  .compact-table .tag,.tag { font-size:10px !important; }

  /* Labels and supporting data should never fall below a readable size. */
  :is(label,.muted,.intro,.eyebrow,.result-note,.history-line small,.payment-print-head small,
      .summary span,.summary small,.steps small,.steps b,.user-card p,.user-card footer,
      .role-access-details small,.contract-customer-name small) {
    font-size:12px !important;
    line-height:1.45;
  }
  .view .quote-form label,.modal label,.login-panel label { font-size:12px !important; }
  .view .quote-history h3,.cart-card h3 { font-size:15px !important; }
  .summary strong { font-size:20px !important; }

  /* Navigation stays compact, while remaining usable at normal zoom. */
  .sidebar .nav-link,.sidebar .sales-menu-toggle { font-size:12px !important; }
  .sidebar .sales-submenu button { font-size:11px !important; }
  .sidebar .nav-bilingual>span { font-size:12px !important; }
  .sidebar .nav-bilingual>small { font-size:10px !important; }

  /* Sidebar labels are the primary way to move through the application.
     Keep both languages solid white and legible; inactive navigation must not
     fade into the dark background. */
  .sidebar .brand { font-size:25px !important; color:#fff !important; }
  .sidebar .nav-link,.sidebar .sales-menu-toggle {
    color:#fff !important;
    font-size:15px !important;
    font-weight:800 !important;
  }
  .sidebar .nav-bilingual>span {
    color:#fff !important;
    font-size:15px !important;
    font-weight:800 !important;
    letter-spacing:.01em;
  }
  .sidebar .nav-bilingual>small {
    color:#fff !important;
    font-size:13px !important;
    font-weight:700 !important;
    opacity:1 !important;
  }
  .sidebar .sales-submenu button {
    color:#fff !important;
    font-size:13px !important;
    font-weight:750 !important;
  }
  .sidebar .sales-submenu .nav-bilingual>span { font-size:13px !important; }
  .sidebar .sales-submenu .nav-bilingual>small { font-size:11.5px !important; }

  /* Dialogs, search and safety controls sit outside the main view. */
  .modal,.action-safety-dialog,#gs-dialog,.login-panel { font-size:14px; }
  .action-safety-dialog :is(td,th),#gs-dialog :is(td,th) { font-size:13px !important; }
  #global-search .gs-label,#gs-dialog label,.safety-level,.safety-expiry { font-size:12px !important; }
}

@media screen and (max-width:850px) {
  body { font-size:14px; }
  :is(input,select,textarea) { font-size:14px !important; }
  :is(button,.button,.history-action,.text-button) { font-size:12px !important; }
  :is(table,.stock-card-table,.approval-table) td { font-size:12px !important; }
  :is(table,.stock-card-table,.approval-table) th { font-size:10px !important; }
  :is(.history-line > b,.contract-list-number,.acc-number,.history-line > strong) { font-size:14px !important; }
  :is(.summary strong,.contract-value,.lc-totals b,#accounting-view .acc-kpi>strong) { font-size:18px !important; }
  .quote-total strong b { font-size:19px !important; }
}
