:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  --ink: #172033;
  --muted: #68758a;
  --line: #dce3ec;
  --panel: #ffffff;
  --page: #f3f6fa;
  --navy: #123a62;
  --blue: #2167d5;
  --casing: #18a566;
  --casing-soft: #e4f5ec;
  --complete: #e34b4b;
  --complete-soft: #fde8e8;
  --remaining: #aab4c2;
  --shadow: 0 10px 28px rgba(24, 43, 68, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--ink); }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
.app-header {
  height: 78px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(112deg, #0e3155 0%, #174c78 68%, #1e6387 100%); color: #fff;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: .01em; }
.brand p { margin: 0; font-size: 12px; color: #cbdceb; }
.brand-mark { width: 36px; height: 36px; display: flex; gap: 3px; align-items: flex-end; padding: 7px; border-radius: 9px; background: rgba(255,255,255,.12); }
.brand-mark span { flex: 1; border-radius: 2px 2px 0 0; background: #fff; }
.brand-mark span:nth-child(1) { height: 13px; opacity: .65; }.brand-mark span:nth-child(2) { height: 21px; }.brand-mark span:nth-child(3) { height: 17px; opacity: .82; }
.source-state { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.09); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 0 4px rgba(255,209,102,.14); }
.source-state.live .pulse { background: #46dc94; box-shadow: 0 0 0 4px rgba(70,220,148,.14); }
.source-state.demo .pulse { background: #ffd166; }
.source-state.error .pulse { background: #ff7777; }
.view-tabs { height: 54px; display: flex; align-items: stretch; padding: 0 30px; gap: 28px; background: #fff; border-bottom: 1px solid var(--line); }
.view-tab { position: relative; padding: 0 4px; border: 0; background: none; color: #6b778b; font-weight: 700; cursor: pointer; }
.view-tab:hover { color: var(--blue); }
.view-tab.active { color: var(--blue); }
.view-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--blue); border-radius: 3px 3px 0 0; }
.filter-bar { min-height: 70px; display: flex; align-items: center; gap: 12px; padding: 11px 30px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 3px 12px rgba(26,46,72,.04); }
.filter-bar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.filter-bar input { height: 38px; border: 1px solid #cfd8e5; border-radius: 7px; padding: 0 10px; background: #fff; color: var(--ink); outline: none; }
.filter-bar input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(33,103,213,.11); }
.date-arrow { color: #9aa5b4; }
.primary-button, .icon-button { height: 38px; border: 0; border-radius: 7px; cursor: pointer; font-weight: 700; }
.primary-button { padding: 0 18px; background: var(--blue); color: #fff; }.primary-button:hover { background: #1857ba; }
.icon-button { width: 38px; background: #eef3f9; color: #3b5877; font-size: 20px; }.icon-button:hover { background: #e2ebf5; }
.filter-spacer { flex: 1; }
.search-label input { width: 190px; }
main { padding: 24px 30px 38px; }
.view-panel { display: none; }.view-panel.active { display: block; }
.headline-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.headline-card { min-height: 134px; position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.headline-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #8ea0b5; }
.headline-card > span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.headline-card strong { display: block; margin: 8px 0 2px; font-size: 32px; line-height: 1; }
.headline-card small { color: var(--muted); font-size: 12px; }
.total-card::before { background: var(--blue); }.casing-card::before { background: var(--casing); }.complete-card::before { background: var(--complete); }.remaining-card::before { background: var(--remaining); }
.mini-progress { position: absolute; left: 20px; right: 20px; bottom: 17px; height: 5px; border-radius: 8px; background: #edf1f5; overflow: hidden; }
.mini-progress i { display: block; width: 0; height: 100%; border-radius: inherit; transition: width .35s ease; }.casing-card i { background: var(--casing); }.complete-card i { background: var(--complete); }.remaining-card i { background: var(--remaining); }
.pc-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(290px, .85fr); gap: 18px; margin-bottom: 18px; }
.panel-card { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-bottom: 1px solid #e5ebf2; }
.panel-heading h2 { margin: 0 0 4px; font-size: 16px; }.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-heading > span { color: var(--muted); font-size: 12px; }
.total-pill { padding: 6px 10px; background: #e7effa; color: #285583 !important; border-radius: 999px; font-weight: 750; }
.summary-table-wrap { padding: 16px 20px 22px; }
table { border-collapse: collapse; width: 100%; }
.summary-table { table-layout: fixed; border: 1px solid #cbd5e0; }
.summary-table th, .summary-table td { border: 1px solid #cbd5e0; padding: 11px 10px; text-align: center; font-size: 13px; }
.summary-table thead th { background: #2e771b; color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.summary-table thead th:first-child { width: 34%; }.summary-table tbody th { font-weight: 750; }
.summary-table small { font-size: 11px; }.casing-row { background: #e5f2df; }.casing-remaining-row { background: #d0e6c8; }.complete-row { background: #dbe8fb; }.remaining-row { background: #f0f1f3; }
.distribution-card { padding-bottom: 12px; }
.status-donut { --casing-angle: 0deg; --complete-angle: 0deg; width: 154px; height: 154px; margin: 22px auto 18px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--complete) 0 var(--complete-angle), var(--casing) var(--complete-angle) calc(var(--complete-angle) + var(--casing-angle)), #d9e0e8 0); }
.status-donut::before { content: ""; grid-area: 1/1; width: 104px; height: 104px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #e6ebf1; }
.status-donut > div { grid-area: 1/1; z-index: 1; text-align: center; }.status-donut strong { display: block; font-size: 27px; }.status-donut span { color: var(--muted); font-size: 11px; }
.legend-list { padding: 0 22px; }.legend-list > div { display: grid; grid-template-columns: 15px 1fr auto; gap: 9px; align-items: center; padding: 8px 0; border-top: 1px solid #edf1f5; font-size: 12px; }.legend-list strong { font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }.dot.casing { background: var(--casing); }.dot.complete { background: var(--complete); }.dot.remaining { background: #c6ced8; border: 1px solid #99a4b2; }
.register-wrap { max-height: 420px; overflow: auto; }.register-table { min-width: 720px; }.register-table th, .register-table td { padding: 10px 16px; border-bottom: 1px solid #e8edf3; text-align: left; font-size: 12px; }.register-table thead th { position: sticky; top: 0; z-index: 1; background: #f4f7fb; color: #4d5b70; text-transform: uppercase; letter-spacing: .03em; }.register-table tbody tr:hover { background: #f7faff; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; }.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }.status-chip.casing { background: var(--casing-soft); color: #0c7748; }.status-chip.casing::before { background: var(--casing); }.status-chip.complete { background: var(--complete-soft); color: #b62d2d; }.status-chip.complete::before { background: var(--complete); }.status-chip.remaining { background: #edf1f5; color: #657184; }.status-chip.remaining::before { background: #aab4c2; }
.canvas-panel { min-height: calc(100vh - 264px); padding: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.canvas-toolbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line); }.canvas-toolbar strong { display: block; font-size: 14px; }.canvas-toolbar span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.canvas-actions { display: flex; gap: 5px; }.canvas-actions button { min-width: 38px; height: 32px; padding: 0 10px; border: 1px solid #d4dce7; border-radius: 6px; background: #f8fafc; cursor: pointer; font-weight: 700; }.canvas-actions button:hover { border-color: #9ab2d0; background: #eef4fb; }
.canvas-search { width: 150px; height: 32px; padding: 0 10px; border: 1px solid #d4dce7; border-radius: 6px; outline: none; text-transform: uppercase; }
.canvas-search:focus { border-color: #6e9fda; box-shadow: 0 0 0 2px rgba(33,103,213,.1); }
.canvas-actions button.active { border-color: #6e9fda; background: #e3effc; color: #1758a9; }
.canvas-stage { position: relative; height: calc(100vh - 326px); min-height: 500px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #fff 0, #f8fafc 62%, #edf2f7 100%); }.model-stage { background: linear-gradient(#f8fbff 0 66%, #eef2f6 66% 100%); }
canvas { width: 100%; height: 100%; display: block; touch-action: none; }.canvas-tip { display: none; position: absolute; z-index: 3; min-width: 190px; max-width: 265px; padding: 10px 12px; border: 1px solid #c9d3df; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 10px 24px rgba(22,38,58,.18); pointer-events: none; font-size: 12px; line-height: 1.55; }.canvas-tip strong { font-size: 13px; }
.canvas-legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 16px; padding: 9px 12px; border: 1px solid rgba(203,213,224,.9); border-radius: 8px; background: rgba(255,255,255,.9); color: #556276; font-size: 11px; box-shadow: 0 5px 16px rgba(23,42,65,.09); }.canvas-legend span { display: flex; align-items: center; gap: 6px; }
@media (max-width: 980px) { .headline-grid { grid-template-columns: repeat(2, 1fr); }.pc-grid { grid-template-columns: 1fr; }.distribution-card { display: grid; grid-template-columns: auto 1fr; align-items: center; }.distribution-card .panel-heading { grid-column: 1/-1; }.status-donut { margin: 20px 26px; }.legend-list { padding-right: 28px; }.search-label span { display: none; } }
@media (max-width: 680px) { .app-header { height: auto; min-height: 74px; padding: 12px 16px; }.brand p { display: none; }.source-state { padding: 7px 9px; }.view-tabs { padding: 0 16px; gap: 22px; }.filter-bar { padding: 10px 16px; flex-wrap: wrap; }.filter-bar label { flex: 1; min-width: 135px; align-items: flex-start; flex-direction: column; gap: 4px; }.filter-bar input { width: 100%; }.date-arrow, .filter-spacer { display: none; }.search-label { flex-basis: 100% !important; }.search-label input { width: 100%; }.primary-button, .icon-button { align-self: flex-end; } main { padding: 16px; }.headline-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.headline-card { min-height: 120px; padding: 16px; }.headline-card strong { font-size: 27px; }.mini-progress { left: 16px; right: 16px; }.summary-table-wrap { padding: 10px; overflow-x: auto; }.summary-table { min-width: 620px; }.distribution-card { display: block; }.canvas-stage { min-height: 430px; height: calc(100vh - 390px); }.canvas-legend { flex-wrap: wrap; gap: 7px 12px; right: 16px; }.canvas-toolbar span { display: none; } }

/* TFL 2602 management dashboard frame */
body { background: #eeeeef; }
.app-header {
  height: 72px; padding: 0 28px; background: #fff; color: #1e2938;
  border-bottom: 1px solid #d8dadd;
}
.brand-mark { background: #eef5fc; }
.brand-mark span { background: #2d83cf; }
.brand h1 { font-size: 20px; font-weight: 600; text-transform: uppercase; }
.brand p { color: #7b8491; }
.source-state { color: #516071; border-color: #d8e0e8; background: #f7f9fb; }
.view-tabs { height: 76px; justify-content: center; gap: 42px; padding: 0; background: #fff; }
.view-tabs { position: relative; }
.view-tab { font-weight: 500; }
.view-tab.active::after { height: 2px; }
.print-dashboard-button {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  height: 38px; padding: 0 15px; border: 1px solid #1f6fbb; border-radius: 5px;
  background: #2167b2; color: #fff; font-weight: 700; cursor: pointer;
}
.print-dashboard-button:hover { background: #174f8b; }
main { max-width: 1260px; margin: 0 auto; padding: 22px 30px 42px; }
.dashboard-shell {
  min-height: 720px; padding: 18px 46px 34px; background: #fff;
  border: 1px solid #d7d9dc; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.dashboard-title {
  height: 50px; display: grid; place-items: center; margin-bottom: 28px;
  background: #245983; color: #ffd329; font-size: 22px; font-weight: 750;
}
.management-overview { display: grid; grid-template-columns: .78fr 1.12fr 1.12fr; gap: 12px; align-items: end; margin-bottom: 28px; }
.completion-gauge-card { min-height: 126px; display: grid; place-items: end center; }
.completion-gauge {
  --completion-angle: 0deg; position: relative; width: 232px; height: 116px; overflow: hidden;
}
.completion-gauge::before {
  content: ""; position: absolute; left: 0; top: 0; width: 232px; height: 232px; border-radius: 50%;
  background: conic-gradient(from 270deg, #2696e8 0 var(--completion-angle), #d3f1f5 var(--completion-angle) 180deg, transparent 180deg 360deg);
}
.completion-gauge::after {
  content: ""; position: absolute; left: 30px; top: 30px; width: 172px; height: 172px; border-radius: 50%; background: #fff;
}
.completion-gauge > div { position: absolute; z-index: 1; left: 0; right: 0; bottom: 3px; text-align: center; }
.completion-gauge span { display: block; color: #7b7f85; font-size: 13px; }
.completion-gauge strong { display: block; margin-top: 2px; font-size: 27px; font-weight: 500; color: #3e4248; }
.management-summary { min-height: 112px; padding: 10px 8px 0; background: #acd4f3; color: #111; }
.management-summary p { margin: 0 0 14px; font-size: 19px; }
.management-summary p strong { font-weight: 500; }
.management-summary > span { display: block; margin-bottom: 2px; font-size: 17px; }
.management-value { display: inline-grid; place-items: center; width: 65%; height: 38px; margin-left: 35%; border: 1px solid #ccd7e5; border-radius: 4px; background: #edf3fc; font-size: 22px; font-weight: 500; color: #39404b; }
.management-summary > small { margin-left: 6px; color: #536171; }
.filter-bar {
  min-height: 66px; margin: 0 0 24px; padding: 0; gap: 14px; background: transparent; border: 0; box-shadow: none;
}
.filter-bar label { font-size: 13px; }
.range-field { min-width: 440px; height: 54px; justify-content: space-between; padding: 0 15px; border: 1px solid #d4d9df; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,.12); }
.range-field > span { display: flex; align-items: center; gap: 8px; }
.range-field i { font-style: normal; color: #e24636; }
.range-field input { width: 140px; border: 0; color: #e83a2e; font-size: 15px; }
.equipment-field { min-width: 150px; height: 54px; display: flex; flex-direction: column; justify-content: center; padding: 0 16px; border: 1px solid #d4d9df; border-radius: 5px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.12); }
.equipment-field span { color: #7b8491; font-size: 11px; }
.equipment-field strong { margin-top: 3px; font-size: 15px; }
.search-label { height: 54px; padding: 5px 12px; border: 1px solid #d4d9df; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,.12); }
.search-label { display: flex !important; flex-direction: column; align-items: flex-start !important; justify-content: center; gap: 1px !important; }
.search-label input { width: 165px; height: 28px; padding: 0; border: 0; font-weight: 650; }
.primary-button, .icon-button { height: 54px; border-radius: 5px; }
.daily-kpi-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 24px; padding: 13px 38px 18px; background: #f2f3f4; }
.daily-kpi-strip article { position: relative; text-align: center; }
.daily-kpi-strip span { display: block; margin-bottom: 5px; color: #ef3d34; font-size: 16px; }
.daily-kpi-strip strong { display: inline-grid; place-items: center; width: 75%; height: 38px; border: 1px solid #d1dae7; border-radius: 4px; background: #edf3fc; font-size: 17px; font-weight: 500; }
.daily-kpi-strip small { display: block; margin-top: 5px; color: #697586; }
.daily-kpi-strip i { display: block; width: 0; max-width: 75%; height: 3px; margin: 5px auto 0; background: var(--casing); transition: width .35s ease; }
.daily-kpi-strip article:nth-child(2) i { background: var(--complete); }
.daily-kpi-strip .volume-bar { width: 75%; background: #2b82cc; }
.pc-grid { grid-template-columns: minmax(0, 2fr) minmax(270px, .72fr); gap: 16px; margin-bottom: 20px; }
.panel-card { border-radius: 0; box-shadow: none; }
.panel-heading { min-height: 58px; padding: 12px 16px; }
.register-card .panel-heading { color: #fff; background: #245983; border: 0; }
.register-card .panel-heading h2 { color: #ffd329; }
.register-card .panel-heading p, .register-card .panel-heading > span { color: #e5eef6; }
.register-wrap { max-height: 350px; }
.register-table { min-width: 920px; }
.register-table thead th { background: #245983; color: #fff; text-align: center; }
.register-table td { text-align: center; }
.register-table tbody tr { border-left: 6px solid var(--remaining); }
.register-table tbody tr.progress-casing { border-left-color: var(--casing); background: #f0faf5; }
.register-table tbody tr.progress-complete { border-left-color: var(--complete); background: #fff3f3; }
.register-table tbody tr:hover { filter: brightness(.985); }
.empty-row { height: 72px; color: #7b8491; text-align: center !important; }
.canvas-panel { min-height: calc(100vh - 198px); }
.canvas-stage { height: calc(100vh - 260px); }
@media (max-width: 1050px) {
  .management-overview { grid-template-columns: 1fr 1fr; }
  .completion-gauge-card { grid-row: span 2; }
  .range-field { min-width: 0; flex: 1 1 100%; }
  .filter-bar { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  main { padding: 12px; }
  .dashboard-shell { padding: 12px; }
  .dashboard-title { font-size: 18px; }
  .management-overview { grid-template-columns: 1fr; }
  .completion-gauge-card { grid-row: auto; }
  .range-field { height: auto; min-height: 70px; flex-direction: column; align-items: stretch !important; }
  .range-field > span { width: 100%; }
  .range-field input { width: 45%; }
  .daily-kpi-strip { grid-template-columns: 1fr; padding: 15px; }
  .print-dashboard-button { position: static; transform: none; padding: 0 10px; font-size: 11px; }
}

@page { size: A4 landscape; margin: 8mm; }
@media print {
  html, body { width: 100%; height: auto; margin: 0; background: #fff !important; }
  .app-header, .view-tabs { display: none !important; }
  main { width: 100%; max-width: none; margin: 0; padding: 0; }
  body.print-all-views .view-panel {
    display: block !important; width: 100%; margin: 0; break-after: page; page-break-after: always;
  }
  body.print-all-views .view-panel:last-child { break-after: auto; page-break-after: auto; }
  body.print-all-views #view-pc { zoom: .69; }
  body.print-all-views .dashboard-shell {
    min-height: 0; padding: 10px 20px 14px; border: 0; box-shadow: none;
  }
  body.print-all-views .dashboard-title { margin-bottom: 12px; }
  body.print-all-views .management-overview { margin-bottom: 10px; }
  body.print-all-views .filter-bar { margin-bottom: 10px; }
  body.print-all-views .daily-kpi-strip { margin-bottom: 10px; }
  body.print-all-views .pc-grid { margin-bottom: 10px; }
  body.print-all-views .register-wrap { max-height: none; overflow: visible; }
  body.print-all-views .canvas-panel {
    height: 190mm; min-height: 190mm; border: 0; box-shadow: none;
  }
  body.print-all-views .canvas-toolbar { height: 16mm; }
  body.print-all-views .canvas-actions { display: none; }
  body.print-all-views .canvas-stage { height: 174mm; min-height: 174mm; }
  body.print-all-views canvas { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
