/* Shared workspace chrome. Business states, technician colours and printable
   reports keep their own styles; module colours are inherited by UI controls. */
@media screen {
 :root {
  --workspace-accent:#245cb9;
  --workspace-soft:#e5eeff;
  --workspace-line:#bdcfee;
 }
 :is([data-workspace=home],[data-nav-section=home]) {
  --workspace-accent:#245cb9;--workspace-soft:#e5eeff;--workspace-line:#bdcfee;
 }
 :is([data-workspace=jobs],[data-nav-section=jobs],[data-nav-section=services],[data-nav-section=requests]) {
  --workspace-accent:#08777b;--workspace-soft:#e0f3f2;--workspace-line:#acd9d7;
 }
 :is([data-workspace=planning],[data-nav-section=planning]) {
  --workspace-accent:#5946b3;--workspace-soft:#ece9ff;--workspace-line:#c9bff0;
 }
 :is([data-workspace=clients],[data-workspace=sites],[data-nav-section=clients],[data-nav-section=sites],[data-nav-section=equipment]) {
  --workspace-accent:#245cb9;--workspace-soft:#e5eeff;--workspace-line:#bdcfee;
 }
 :is([data-workspace=articles],[data-nav-section=articles]) {
  --workspace-accent:#925b13;--workspace-soft:#fff0d5;--workspace-line:#e5cd9e;
 }
 :is([data-workspace=stock],[data-workspace=inventories],[data-nav-section=stock],[data-nav-section=inventories],[data-nav-section=locations],[data-nav-section=vehicles]) {
  --workspace-accent:#7c42a9;--workspace-soft:#f1e5ff;--workspace-line:#d8bfe9;
 }
 :is([data-workspace=sales],[data-nav-section=sales]) {
  --workspace-accent:#5946b3;--workspace-soft:#ece9ff;--workspace-line:#c9bff0;
 }
 :is([data-workspace=purchases],[data-nav-section=purchases]) {
  --workspace-accent:#925b13;--workspace-soft:#fff0d5;--workspace-line:#e5cd9e;
 }
 :is([data-workspace=suppliers],[data-nav-section=suppliers]) {
  --workspace-accent:#08777b;--workspace-soft:#e0f3f2;--workspace-line:#acd9d7;
 }
 :is([data-workspace=contracts],[data-nav-section=contracts]) {
  --workspace-accent:#7c42a9;--workspace-soft:#f1e5ff;--workspace-line:#d8bfe9;
 }
 :is([data-workspace=finance],[data-nav-section=finance],[data-nav-section=accounting],[data-nav-section=einvoice]) {
  --workspace-accent:#26734e;--workspace-soft:#e5f4eb;--workspace-line:#b9dbc7;
 }
 :is([data-workspace=statistics],[data-nav-section=statistics]) {
  --workspace-accent:#176e8c;--workspace-soft:#e3f2f8;--workspace-line:#b8d8e5;
 }
 :is([data-workspace=settings],[data-nav-section=settings],[data-nav-section=users],[data-nav-section=templates]) {
  --workspace-accent:#354964;--workspace-soft:#e8edf4;--workspace-line:#c5d0df;
 }
 :is([data-workspace=sync],[data-nav-section=sync]) {
  --workspace-accent:#3c617b;--workspace-soft:#e6eff5;--workspace-line:#bfd3e1;
 }

 /* Navigation is deliberately compact enough to retain its existing scroll area. */
 .shell[data-workspace] {background:#f3f5fa;grid-template-columns:216px minmax(0,1fr)}
 .shell[data-workspace] .sidebar {border-right-color:#dce3ee;gap:20px;padding-inline:11px}
 .sidebar>.brand {font-weight:750;letter-spacing:1.35px;color:#23416c}
 .sidebar>.company-brand {display:flex;flex-direction:column;gap:7px;padding:9px 10px 8px;border:1px solid #e0e6ef;border-radius:12px;background:#fff}
 .company-brand-image {display:flex;align-items:center;justify-content:center;width:100%;height:62px}
 .sidebar>.company-brand img {display:block;width:100%;height:100%;object-fit:contain}
 .company-brand-caption {font-size:10px;font-weight:650;letter-spacing:2px;color:#607086}
 .company-brand:focus-visible {outline:3px solid var(--workspace-accent);outline-offset:3px}
 .company-mobile-logo {display:none}
 .nav-link[data-nav-section] {padding:7px 9px;gap:10px;min-height:42px;color:#3c4e65;font-weight:600;border:1px solid transparent;border-radius:10px}
 .nav-link[data-nav-section] .nav-icon {width:29px;height:29px;border-radius:8px;color:var(--workspace-accent);background:var(--workspace-soft)}
 .nav-link[data-nav-section] .nav-icon .ui-icon {width:17px;height:17px}
 .nav-link[data-nav-section]:hover {background:var(--workspace-soft);color:var(--workspace-accent)}
 .nav-link[data-nav-section].active {background:var(--workspace-accent);border-color:var(--workspace-accent);color:#fff;font-weight:700;box-shadow:0 3px 8px #24395012}
 .nav-link[data-nav-section].active .nav-icon {background:#ffffff21;color:#fff}
 .nav-link[data-nav-section].active::before {display:none}
 .nav-link[data-nav-section]:focus-visible {outline:3px solid var(--workspace-accent);outline-offset:2px}
 .sidebar-bottom {border-top-color:#dce3ee}
 .shell[data-workspace] .topbar {border-bottom:2px solid var(--workspace-line);box-shadow:0 2px 7px #24395004}
 .company-name {color:#354964;font-weight:650}
 .shell[data-workspace] .user-avatar {color:var(--workspace-accent);background:var(--workspace-soft);border-color:var(--workspace-line);font-weight:750}

 /* The heading icon is decorative; the real h1 and actions keep their semantics. */
 .shell[data-workspace] .page-heading {padding:20px 22px;background:#fff;border:1px solid #dce3ee;border-left:5px solid var(--workspace-accent);border-radius:14px;box-shadow:0 3px 12px #24395004;gap:18px}
 .workspace-heading-copy {display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:14px;align-items:center;min-width:0}
 .workspace-heading-icon {display:grid;place-items:center;grid-column:1;grid-row:1 / span 2;width:44px;height:46px;border-radius:12px;color:var(--workspace-accent);background:var(--workspace-soft)}
 .workspace-heading-icon .ui-icon {width:25px;height:25px}
 .workspace-heading-copy>h1 {grid-column:2;margin:0;font-size:27px;font-weight:750;line-height:1.25;letter-spacing:-.7px;overflow-wrap:break-word}
 .workspace-heading-copy>p {grid-column:2;margin:5px 0 0;color:#52647b;line-height:1.55}
 .page-heading>.actions {flex-shrink:0;max-width:100%}
 .page-heading>.actions .btn {font-weight:650}

 /* Low-specificity surfaces allow specialised article and statistics layouts to win. */
 :where(.shell[data-workspace],#modal-host[data-workspace]) .panel:where(:not(.danger-zone)) {border-color:#dce3ee;border-radius:14px;box-shadow:0 3px 12px #24395005}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .panel-title h2 {font-weight:700;letter-spacing:-.3px;color:#243950}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .panel-title {align-items:center;flex-wrap:wrap}
 :where(.shell[data-workspace],#modal-host[data-workspace]) details.panel>summary {font-weight:700;color:var(--workspace-accent)}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .definition dt {font-weight:600;color:#52647b}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .definition dd {line-height:1.6}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .empty {line-height:1.65}

 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .btn {border-radius:9px;font-weight:600}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .btn.primary {background:var(--workspace-accent);border-color:var(--workspace-accent);color:#fff;box-shadow:0 2px 5px #24395013}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .btn.primary:hover:not(:disabled):not([aria-disabled=true]) {background:var(--workspace-accent);border-color:var(--workspace-accent);box-shadow:inset 0 0 0 100px #00000012,0 2px 5px #24395013}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .btn.soft {color:var(--workspace-accent);background:var(--workspace-soft);border-color:var(--workspace-line)}
 .btn.danger[data-action="site-remove"] {background:#b4374e;border-color:#b4374e;color:#fff;font-weight:700}
 .btn.danger[data-action="site-remove"]:hover {background:#96283d;border-color:#96283d;color:#fff}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) :is(.btn,.icon-btn):focus-visible {outline:3px solid var(--workspace-accent);outline-offset:3px}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .icon-btn:hover {background:var(--workspace-soft);color:var(--workspace-accent)}

 /* Natural-width tabs wrap labels rather than clipping them into equal columns. */
 :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.tabs,.field-subnav,.article-tabs,.notification-tabs,.form-workspace-tabs,.statistics-segment) {flex-wrap:wrap;min-width:0;max-width:100%;gap:7px}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .tabs {padding:9px;border:1px solid #dce3ee;border-radius:12px;background:#fff}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .tabs a {display:inline-flex;align-items:center;justify-content:center;min-height:38px;max-width:100%;padding:8px 12px;font-weight:600;line-height:1.4;color:#4c5e75;background:#f4f6fa;border-color:transparent;white-space:normal;overflow-wrap:break-word;text-align:center}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .tabs a:hover {background:var(--workspace-soft);color:var(--workspace-accent);text-decoration:none}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .tabs a.active {background:var(--workspace-accent);color:#fff;border-color:var(--workspace-accent);font-weight:700}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .field-subnav .active {background:var(--workspace-accent);border-color:var(--workspace-accent);color:#fff}
 :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.article-tabs,.form-workspace-tabs) [role=tab] {max-width:100%;white-space:normal;overflow-wrap:break-word;line-height:1.4;font-weight:600;border:1px solid #dce3ee;border-radius:9px;background:#f4f6fa;color:#4c5e75}
 :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.article-tabs,.form-workspace-tabs) [aria-selected=true] {color:var(--workspace-accent);background:var(--workspace-soft);border-color:var(--workspace-line);font-weight:700;box-shadow:inset 0 -2px 0 var(--workspace-accent)}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .form-workspace-tabs {overflow-x:hidden;overflow-y:auto;max-height:28dvh;align-content:flex-start}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-segment {background:var(--workspace-soft);border:1px solid var(--workspace-line);padding:4px}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-segment .btn {white-space:normal;overflow-wrap:break-word;max-width:100%;font-weight:600}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-segment .btn[aria-pressed=true] {background:var(--workspace-accent);color:#fff;border-color:var(--workspace-accent);box-shadow:none}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .job-jumps {flex-wrap:wrap;gap:7px}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .job-jumps .btn {flex:1 1 auto;max-width:none;color:var(--workspace-accent);background:var(--workspace-soft);border-color:var(--workspace-line)}

 /* No table geometry or financial status colours are changed. */
 :where(.shell[data-workspace],#modal-host[data-workspace]) .table-wrap {border-radius:10px;max-width:100%}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .table-wrap>table:not(.statistics-table)>thead>tr>th {color:var(--workspace-accent);background:var(--workspace-soft);font-weight:700;border-bottom-color:var(--workspace-line)}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .table-wrap>table:not(.statistics-table)>tbody>tr:hover {background:#f6f8fc}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .table-wrap>table:not(.statistics-table)>tbody>tr>td>a:first-child {font-weight:650}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .stat {border-radius:14px;box-shadow:0 3px 12px #24395005}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .stat:not(.green):not(.orange):not(.purple) {border-top-color:var(--workspace-accent)}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .stat strong {font-weight:750}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .stat>.muted {font-weight:600}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-report-heading h2 {font-weight:750}
 :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.statistics-section-heading,.statistics-ranking>header) h2 {font-weight:700}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-mini {border-left-color:var(--workspace-accent);border-radius:12px}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-mini strong {font-weight:700}

 /* Forms retain their existing scrolling body and visible save actions. */
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .field {font-weight:600}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .field :is(input,select,textarea) {font-weight:400}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) .field :is(small,.muted) {font-weight:400}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) :is(input,select,textarea):focus-visible {outline:2px solid var(--workspace-accent);outline-offset:2px}
 :where(.shell[data-workspace],#modal-host[data-workspace],.login) :is(input[type=checkbox],input[type=radio]) {accent-color:var(--workspace-accent)}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .search input {background:#fff;border-color:#cbd6e4;border-radius:10px}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .dialog {border-top:4px solid var(--workspace-accent);box-shadow:0 22px 70px #1f355633}
 :where(.shell[data-workspace],#modal-host[data-workspace]) .dialog-heading h2 {font-weight:750;color:#243950}
 :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.form-workspace-panel,.form-workspace-body)>h3 {font-weight:700;color:var(--workspace-accent);padding:8px 0;border-bottom:1px solid var(--workspace-line)}

 /* Planning colour marks belong to technicians; only its surrounding toolbar changes. */
 .shell[data-workspace] .calendar-toolbar {padding:13px 15px;border:1px solid var(--workspace-line);background:#fff;border-radius:12px;gap:12px}
 .shell[data-workspace] .calendar-toolbar strong {font-weight:700;color:var(--workspace-accent)}
 .shell[data-workspace] .calendar-legend {padding:4px 2px 8px}
 .shell[data-workspace] .calendar-legend-title {font-weight:700}

 .panel.login {border:1px solid #d4dfed;border-top:5px solid #245cb9;box-shadow:0 14px 44px #2030470d;border-radius:18px;background:#fff}
 .login .brand {font-weight:750;letter-spacing:1.4px;color:#23416c}
 .login h1 {font-size:26px;font-weight:750;letter-spacing:-.65px}
 .login>.muted {color:#52647b}
 .login .field input:not([type=checkbox]):not([type=radio]) {border-color:#cbd6e4;background:#f8faff;border-radius:10px}
 .login .btn.primary {min-height:46px;font-weight:700}
 .password-login-link {font-weight:600}

 @media (min-width:721px) and (max-height:780px) {
  .shell[data-workspace] .sidebar {gap:14px;padding-block:17px 10px}
  .sidebar nav .nav-link[data-nav-section] {min-height:36px;padding-block:3px}
  .nav-link[data-nav-section] .nav-icon {width:25px;height:25px}
 }
 @media (min-width:721px) and (max-width:1100px) {
  .shell[data-workspace] .sidebar {padding-inline:9px}
  .nav-link[data-nav-section] {gap:9px;font-size:12px}
  .shell[data-workspace] .page-heading {flex-wrap:wrap}
 }
 @media (max-width:720px) {
  .shell[data-workspace] {display:block}
  .shell[data-workspace] .sidebar {width:244px;gap:14px;padding-inline:11px}
  .sidebar>.company-brand {display:none}
  .company-mobile-logo {display:flex;align-items:center;justify-content:center;min-width:0;width:94px;height:44px;padding:3px;border-radius:7px;background:#fff}
  .company-mobile-logo img {display:block;width:100%;height:100%;object-fit:contain}
  .company-mobile-logo:focus-visible {outline:3px solid var(--workspace-accent);outline-offset:2px}
  .company-name-with-logo {display:none}
  .nav-link[data-nav-section] {min-height:46px;padding:7px 10px;font-size:14px}
  .shell[data-workspace] .page-heading {padding:17px 15px;border-left-width:4px;gap:14px}
  .workspace-heading-copy {grid-template-columns:37px minmax(0,1fr);column-gap:11px}
  .workspace-heading-icon {width:37px;height:41px;border-radius:10px}
  .workspace-heading-icon .ui-icon {width:22px;height:22px}
  .workspace-heading-copy>h1 {font-size:23px;letter-spacing:-.5px}
  .workspace-heading-copy>p {font-size:12px;line-height:1.5}
  .page-heading>.actions {gap:8px;align-items:stretch}
  .page-heading>.actions .btn {flex:1 1 auto;min-height:44px}
  :where(.shell[data-workspace],#modal-host[data-workspace]) .tabs {padding:7px;gap:6px}
  :where(.shell[data-workspace],#modal-host[data-workspace]) .tabs a {min-height:44px;padding:8px 10px;font-size:12px}
  :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.field-subnav,.notification-tabs)>button,
  :where(.shell[data-workspace],#modal-host[data-workspace]) .field-subnav>a {min-height:44px;max-width:100%}
  :where(.shell[data-workspace],#modal-host[data-workspace]) :is(.article-tabs,.form-workspace-tabs) [role=tab] {min-height:44px}
  :where(.shell[data-workspace],#modal-host[data-workspace]) .statistics-segment .btn {min-height:44px}
  :where(.shell[data-workspace],#modal-host[data-workspace]) .job-jumps {gap:6px}
  .shell[data-workspace] .calendar-toolbar {padding:12px;align-items:stretch}
  .shell[data-workspace] .calendar-toolbar>.actions {flex-wrap:wrap;max-width:100%}
  .panel.login {margin:5vh 14px;padding:24px;max-width:none}
  .login h1 {font-size:24px}
 }
 @media (prefers-reduced-motion:reduce) {
  .nav-link[data-nav-section],:where(.shell[data-workspace],#modal-host[data-workspace],.login) .btn {transition:none}
 }
}
@media print {
 .workspace-heading-icon {display:none!important}
}
