:root {
  color-scheme: light;
  --ink: #24231f;
  --ink-soft: #584c44;
  --muted: #746f68;
  --line: #e8e7e1;
  --canvas: #f6f6f3;
  --surface: #ffffff;
  --navy: #1a3d28;
  --blue: #008a05;
  --teal: #1b3e2a;
  --mint: #dcbf7d;
  --amber: #a7803e;
  --coral: #b03034;
  --violet: #584c44;
  --shadow: 0 10px 30px rgba(26, 61, 40, 0.045);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 226px; padding: 26px 17px 18px; background: var(--navy); color: #e8f1f5; }
.brand { display: flex; align-items: center; gap: 12px; padding: 3px 6px 0; }
.brand-logo { display: block; width: 38px; height: 40px; flex: none; padding: 3px; border-radius: 8px; background: #fff; object-fit: contain; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 15px; letter-spacing: -.045em; }
.brand-copy strong span { color: #dcbf7d; }
.brand-copy small { color: #d4cec0; font-size: 10px; letter-spacing: .035em; }
.sidebar-rule { height: 1px; margin: 29px 5px 24px; background: rgba(225,238,245,.13); }
.nav-caption { margin: 0 9px 10px; color: #8da1af; font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 11px; border: 1px solid transparent; border-radius: 8px; color: #d5dfd6; font-size: 12px; font-weight: 560; transition: background .18s ease, color .18s ease; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.105); color: #fff; }
.nav-link.active { border-color: rgba(220,191,125,.14); box-shadow: inset 2px 0 #dcbf7d; }
.nav-icon { display: inline-grid; width: 17px; place-items: center; color: #dcbf7d; font-size: 15px; }
.sidebar-bottom { display: grid; gap: 15px; margin-top: auto; padding: 13px 4px 0; }
.privacy-mark { display: flex; align-items: flex-start; gap: 9px; padding: 12px 10px; border: 1px solid rgba(255,255,255,.11); border-radius: 8px; color: #a9bbc6; font-size: 10px; line-height: 1.55; }
.privacy-mark strong { color: #e5efed; font-size: 10px; font-weight: 600; }
.privacy-dot, .live-dot { flex: none; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #76bd68; box-shadow: 0 0 0 3px rgba(118,189,104,.13); }
.help-link { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border: 0; background: transparent; color: #d5dfd6; text-align: left; font-size: 11px; }
.help-link:hover { color: #fff; }
.help-icon { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font-size: 10px; }
.main-content { min-height: 100vh; margin-left: 226px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 34px; border-bottom: 1px solid #e8ecef; background: rgba(255,255,255,.94); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #7a8994; font-size: 11px; }
.breadcrumb strong { color: #263b4e; font-weight: 650; }
.breadcrumb-slash { color: #b3bdc5; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e7ecee; border-radius: 100px; color: #566a77; font-size: 10px; font-weight: 560; }
.source-pill .live-dot { width: 6px; height: 6px; margin: 0; box-shadow: none; }
.page-wrap { max-width: 1450px; margin: 0 auto; padding: 29px 34px 36px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.eyebrow, .panel-kicker { margin: 0 0 8px; color: #7c8a95; font-size: 9px; font-weight: 780; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #008a05; }
.eyebrow-line { width: 28px; height: 1px; background: #b4d6ac; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; color: #172b3e; font-size: clamp(24px, 2.2vw, 31px); font-weight: 680; letter-spacing: -.055em; line-height: 1.1; }
.page-subtitle { margin: 0; color: #75838e; font-size: 12px; }
.update-label { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid #e5eaed; border-radius: 8px; background: #fff; color: #788791; font-size: 9px; line-height: 1.55; }
.update-label strong { color: #33495b; font-size: 10px; font-weight: 650; }
.update-icon { color: #008a05; font-size: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 6px; font-size: 10px; font-weight: 670; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { border: 1px solid #008a05; background: #008a05; color: #fff; box-shadow: 0 3px 8px rgba(0,138,5,.15); }
.button-primary:hover { border-color: #1b3e2a; background: #1b3e2a; }
.button-outline { border: 1px solid #dce4e8; background: #fff; color: #405666; }
.button-outline:hover, .button-quiet:hover { border-color: #b9c9cf; background: #f7f9fa; }
.button-quiet { border: 1px solid transparent; background: transparent; color: #657783; }
.button-icon { color: inherit; font-size: 14px; line-height: 1; }
.filters-panel { margin-bottom: 17px; padding: 15px 17px 11px; border: 1px solid #e5eaed; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.filter-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #435866; font-size: 10px; }
.filter-symbol { color: #008a05; font-size: 18px; line-height: 10px; }
.filters-grid { display: grid; grid-template-columns: minmax(130px, .82fr) minmax(130px, .82fr) minmax(160px, 1.3fr) minmax(165px, 1.3fr) minmax(140px, 1fr) auto; gap: 10px; align-items: end; }
.filter-field { display: grid; gap: 5px; color: #788791; font-size: 9px; font-weight: 590; }
.filter-field input, .filter-field select, .search-field input { width: 100%; min-height: 32px; padding: 0 9px; border: 1px solid #e0e7ea; border-radius: 5px; outline: none; background: #fff; color: #354b5d; font-size: 10px; }
.filter-field input:focus, .filter-field select:focus, .search-field input:focus { border-color: #70b773; box-shadow: 0 0 0 3px rgba(0,138,5,.1); }
.filter-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #f0f2f3; color: #788792; font-size: 9px; }
.filter-foot #table-summary { color: #1b3e2a; font-weight: 600; }
.scope-note { text-align: right; }
.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card { position: relative; min-width: 0; min-height: 125px; padding: 14px 15px 12px; overflow: hidden; border: 1px solid #e7ecee; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.metric-card::after { position: absolute; right: -21px; bottom: -39px; width: 94px; height: 94px; border: 1px solid rgba(0,138,5,.07); border-radius: 50%; content: ""; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { color: #70808b; font-size: 9px; font-weight: 640; }
.metric-icon { display: grid; width: 25px; height: 25px; flex: none; place-items: center; border-radius: 7px; font-size: 13px; }
.icon-blue { color: #008a05; background: #edf6ec; }
.icon-amber { color: #927032; background: #f8f3e8; }
.icon-green { color: #1b3e2a; background: #edf4ee; }
.icon-violet { color: #584c44; background: #f3f1ef; }
.icon-teal { color: #1b3e2a; background: #edf4ee; }
.metric-value { margin: 9px 0 3px; color: #1d3447; font-size: 29px; font-weight: 690; letter-spacing: -.055em; line-height: 1; }
.metric-value-time { font-size: 24px; letter-spacing: -.04em; }
.metric-foot { color: #84919a; font-size: 9px; }
.metric-subfoot { position: relative; z-index: 1; margin-top: 6px; color: #1b3e2a; font-size: 8px; font-weight: 650; }
.insight-grid, .work-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 14px; margin-bottom: 14px; }
.panel { min-width: 0; padding: 17px 18px 14px; border: 1px solid #e5eaed; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading h2, .dialog-heading h2 { margin: 0; color: #21394c; font-size: 14px; font-weight: 680; letter-spacing: -.025em; }
.panel-kicker { margin-bottom: 5px; font-size: 8px; }
.panel-total { flex: none; padding: 5px 8px; border: 1px solid #e8edef; border-radius: 5px; color: #75848e; font-size: 9px; font-weight: 600; }
.target-pill { padding: 5px 8px; border: 1px solid #e8edef; border-radius: 5px; background: #fafcfc; color: #647984; font-size: 9px; }
.bar-chart { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(112px, 1.15fr) minmax(60px, 2fr) 27px; align-items: center; gap: 10px; }
.bar-label { overflow: hidden; color: #516573; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; overflow: hidden; border-radius: 10px; background: #f0f3f4; }
.bar-fill { height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, #79c36c, #008a05); transition: width .3s ease; }
.bar-count { color: #3c5261; text-align: right; font-size: 9px; font-weight: 700; }
.sla-summary { display: flex; align-items: flex-end; justify-content: space-between; margin: 17px 2px 12px; }
.sla-number { color: #1b3e2a; font-size: 34px; font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.sla-caption { display: block; margin-top: 5px; color: #71818c; font-size: 9px; }
.sla-count { display: grid; gap: 2px; color: #8a969e; text-align: right; font-size: 9px; }
.sla-count strong { color: #344a5a; font-size: 17px; font-weight: 680; }
.sla-track { height: 9px; overflow: hidden; border-radius: 10px; background: #f3e5e4; }
.sla-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #76bd68, #008a05); transition: width .35s ease; }
.sla-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; }
.legend-item { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; color: #788791; font-size: 9px; }
.legend-item strong { color: #394f5e; font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-within { background: #008a05; }
.dot-over { background: #b03034; }
.panel-note { margin: 11px 0 0; color: #8c989f; font-size: 8px; line-height: 1.5; }
.technician-bars { display: grid; gap: 12px; }
.technician-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(52px, 1.8fr) 30px; align-items: center; gap: 10px; }
.technician-name { overflow: hidden; color: #4f6270; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.technician-row .bar-fill { background: linear-gradient(90deg, #e6d5aa, #a7803e); }
.technician-row .bar-track { height: 6px; }
.team-panel { padding-bottom: 10px; }
.table-scroll { width: 100%; overflow: auto; }
.compact-scroll { max-height: 236px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 9px; text-align: left; }
.data-table thead th { position: sticky; z-index: 1; top: 0; padding: 9px 9px; border-bottom: 1px solid #e7ecee; background: #fafbfb; color: #85929b; font-size: 8px; font-weight: 700; letter-spacing: .045em; white-space: nowrap; }
.data-table tbody td { padding: 9px 9px; border-bottom: 1px solid #f0f2f3; color: #536775; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfc; }
.team-table { min-width: 495px; }
.team-table thead th, .team-table tbody td { padding: 8px 7px; }
.team-table tbody td:first-child { max-width: 135px; overflow: hidden; color: #30485b; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.team-table tbody td:not(:first-child) { white-space: nowrap; }
.active-cases-panel, .all-cases-panel { margin-bottom: 14px; }
.active-cases-panel .panel-heading { margin-bottom: 9px; }
.active-cases-panel .data-table { min-width: 760px; }
.full-table-scroll { max-height: 465px; border-bottom: 1px solid #eef1f2; }
.full-table { min-width: 910px; }
.full-table thead th { top: 0; }
.full-table tbody td:first-child { color: #2c6178; font-weight: 700; }
.table-heading { align-items: flex-end; margin-bottom: 12px; }
.panel-caption { margin: 5px 0 0; color: #85919a; font-size: 9px; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.search-field { display: flex; align-items: center; gap: 5px; min-width: 180px; padding-left: 8px; border: 1px solid #e0e7ea; border-radius: 5px; color: #84919a; }
.search-field:focus-within { border-color: #71b5a8; box-shadow: 0 0 0 3px rgba(93,174,158,.11); }
.search-field input { min-height: 31px; padding-left: 0; border: 0; box-shadow: none !important; font-size: 9px; }
.search-field span { font-size: 16px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; background: #f0f3f5; color: #5a6b77; font-size: 8px; font-weight: 650; white-space: nowrap; }
.status-badge::before { width: 5px; height: 5px; border-radius: 50%; background: #98a6af; content: ""; }
.status-pending { background: #f8f3e8; color: #846729; }
.status-pending::before { background: #a7803e; }
.status-assigned { background: #edf6ec; color: #23642a; }
.status-assigned::before, .status-new::before { background: #008a05; }
.status-with-user { background: #f2efec; color: #584c44; }
.status-with-user::before { background: #8a796d; }
.status-closed { background: #edf4ee; color: #1b3e2a; }
.status-closed::before { background: #1b3e2a; }
.status-rejected { background: #f9eeee; color: #9c2d31; }
.status-rejected::before { background: #b03034; }
.status-new { background: #edf6ec; color: #23642a; }
.elapsed-current { color: #927032 !important; font-weight: 650; white-space: nowrap; }
.time-muted { color: #9aa5ac !important; }
.table-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 9px; color: #84919a; font-size: 8px; }
.empty-state { padding: 18px 10px; color: #8b979f; text-align: center; font-size: 10px; }
.hidden { display: none !important; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; padding: 7px 2px 0; color: #82909a; font-size: 8px; }
.page-footer > span:first-child { display: flex; align-items: center; gap: 7px; color: #5c6f7c; font-weight: 620; }
.footer-mark { display: inline-grid; width: 19px; height: 19px; place-items: center; border-radius: 5px; background: #edf4ee; color: #1b3e2a; font-size: 7px; font-weight: 800; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.help-dialog { width: min(560px, calc(100% - 28px)); max-height: min(700px, calc(100vh - 32px)); padding: 23px; border: 1px solid #e2e8eb; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 25px 80px rgba(13,31,45,.22); }
.help-dialog::backdrop { background: rgba(12,29,43,.45); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-heading h2 { font-size: 19px; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #e5eaed; border-radius: 6px; background: #fff; color: #6b7b85; font-size: 19px; }
.dialog-intro { margin: 13px 0 16px; color: #6e7e89; font-size: 11px; line-height: 1.6; }
.update-steps { display: grid; gap: 12px; margin: 0; padding-left: 22px; color: #008a05; }
.update-steps li { padding-left: 3px; }
.update-steps strong { display: block; color: #31485a; font-size: 10px; }
.update-steps span { display: block; margin-top: 3px; color: #788791; font-size: 9px; line-height: 1.55; }
.update-steps code { color: #1b3e2a; font-size: 9px; }
.update-steps em { color: #506a75; font-style: normal; font-weight: 650; }
.privacy-callout { display: flex; gap: 10px; margin-top: 16px; padding: 11px; border: 1px solid #dce9d9; border-radius: 7px; background: #f4f8f2; color: #536b51; font-size: 9px; line-height: 1.55; }
.privacy-lock { color: #1b3e2a; font-size: 15px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog-footnote { margin: 11px 0 0; color: #89959c; font-size: 8px; text-align: right; }
.toast { position: fixed; right: 23px; bottom: 20px; z-index: 20; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; transform: translateY(14px); border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: #1b3e2a; color: #fff; box-shadow: 0 10px 30px rgba(26,61,40,.18); font-size: 10px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1180px) {
  .page-wrap { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters-grid .button { align-self: end; }
}
@media (max-width: 850px) {
  .sidebar { width: 70px; align-items: center; padding: 18px 8px; }
  .brand { padding: 0; }
  .brand-copy, .sidebar-rule, .nav-caption, .nav-link:not(.active) { display: none; }
  .main-nav { width: 100%; margin-top: 27px; }
  .nav-link { justify-content: center; padding: 11px 5px; font-size: 0; }
  .nav-icon { font-size: 16px; }
  .sidebar-bottom { width: 100%; padding: 0; }
  .privacy-mark { justify-content: center; padding: 9px 4px; }
  .privacy-mark > span:last-child { display: none; }
  .help-link { justify-content: center; padding: 6px; font-size: 0; }
  .help-icon { font-size: 10px; }
  .main-content { margin-left: 70px; }
  .insight-grid, .work-grid { grid-template-columns: 1fr; }
  .source-pill { display: none; }
}
@media (max-width: 620px) {
  .topbar { min-height: 55px; padding: 0 14px; }
  .topbar-right { gap: 6px; }
  .button { min-height: 32px; padding: 0 9px; font-size: 9px; }
  .topbar .button-icon { display: none; }
  .page-wrap { padding: 22px 12px 26px; }
  .page-heading { align-items: flex-start; gap: 10px; }
  .update-label { max-width: 126px; padding: 7px; font-size: 8px; }
  .update-label strong { font-size: 8px; }
  h1 { font-size: 24px; }
  .page-subtitle { max-width: 245px; font-size: 10px; line-height: 1.5; }
  .filters-panel { padding: 12px 11px 9px; }
  .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .filters-grid .button { grid-column: span 2; }
  .filter-foot { flex-direction: column; gap: 4px; }
  .scope-note { text-align: left; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 112px; padding: 11px; }
  .metric-card:last-child { grid-column: span 2; }
  .metric-value { font-size: 26px; }
  .metric-value-time { font-size: 22px; }
  .metric-label { font-size: 8px; }
  .panel { padding: 14px 12px 12px; }
  .panel-heading { margin-bottom: 13px; }
  .panel-heading h2 { font-size: 13px; }
  .bar-row { grid-template-columns: minmax(96px, 1fr) minmax(50px, 1.4fr) 23px; gap: 7px; }
  .bar-label, .bar-count, .technician-name { font-size: 8px; }
  .sla-number { font-size: 30px; }
  .table-heading { align-items: flex-start; flex-direction: column; }
  .table-actions { width: 100%; }
  .search-field { flex: 1; min-width: 0; }
  .page-footer { flex-direction: column; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}
