:root {
  color-scheme: light;
  --ink: #171a1d;
  --ink-soft: #4c545c;
  --line: #d8dde1;
  --line-strong: #b9c1c7;
  --paper: #ffffff;
  --canvas: #edf0f2;
  --mint: #0b846b;
  --mint-soft: #dff3ec;
  --cyan: #137c99;
  --cyan-soft: #dff1f6;
  --amber: #b86a00;
  --amber-soft: #fff0d4;
  --red: #c93c34;
  --red-soft: #fde5e2;
  --violet: #7651a8;
  --violet-soft: #eee6f7;
  --shadow: 0 10px 30px rgba(20, 25, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.board-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 78px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: var(--ink);
  border-bottom: 4px solid var(--mint);
}

.brand-block,
.topbar-status,
.table-heading,
.table-meta,
.dialog-head {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--mint);
  border-radius: 6px;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.eyebrow {
  margin: 0 0 3px;
  color: #8fe0c8;
  font-size: 10px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.topbar-status {
  flex: 0 0 auto;
  gap: 10px;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 12px;
  color: #c9d1d6;
  border-right: 1px solid #43484c;
  font-size: 12px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #41d0a3;
  box-shadow: 0 0 0 3px rgba(65, 208, 163, 0.16);
}

.connection.error .connection-dot {
  background: #ff6b62;
  box-shadow: 0 0 0 3px rgba(255, 107, 98, 0.16);
}

.clock {
  min-width: 150px;
  color: #f6f8f9;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.icon-button:hover:not(:disabled) {
  color: var(--mint);
  border-color: var(--mint);
}

.icon-button.dark {
  color: #d6dadd;
  background: #292d30;
  border-color: #40464a;
}

.icon-button.dark:hover {
  color: #fff;
  border-color: #7b858b;
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.icon-button.loading svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.control-band {
  padding: 12px 24px;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(170px, 0.9fr) minmax(220px, 1fr) minmax(280px, 1.6fr);
  gap: 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.field-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group > span {
  color: #69737a;
  font-size: 11px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  color: var(--ink);
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
}

select:focus,
input:focus {
  background: #fff;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(11, 132, 107, 0.1);
}

.input-with-icon {
  position: relative;
}

.input-with-icon > svg {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 17px;
  height: 17px;
  color: #778188;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 35px;
}

.search-field input {
  padding-right: 36px;
}

.clear-search {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 27px;
  height: 27px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #778188;
  background: transparent;
  border: 0;
}

.clear-search svg {
  width: 15px;
  height: 15px;
}

.segmented {
  display: grid;
  padding: 3px;
  background: #edf0f2;
  border-radius: 6px;
}

.segmented.compact {
  height: 36px;
  grid-template-columns: repeat(2, 1fr);
}

.segmented button {
  padding: 0 10px;
  color: #5f686e;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 25, 28, 0.12);
}

.kpi-band {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr 0.9fr 0.9fr;
  background: #f9fafb;
  border-bottom: 1px solid var(--line-strong);
}

.kpi-item {
  min-width: 0;
  min-height: 92px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--line);
}

.kpi-item:last-child {
  border-right: 0;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.kpi-icon.plan { color: var(--cyan); background: var(--cyan-soft); }
.kpi-icon.output { color: var(--mint); background: var(--mint-soft); }
.kpi-icon.rate { color: var(--violet); background: var(--violet-soft); }
.kpi-icon.orders { color: var(--amber); background: var(--amber-soft); }
.kpi-icon.urgent { color: var(--red); background: var(--red-soft); }

.kpi-item p {
  margin-bottom: 4px;
  color: #667077;
  font-size: 12px;
  font-weight: 700;
}

.kpi-item strong {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-item .unit {
  margin-left: 5px;
  color: #69737a;
  font-size: 12px;
}

.completion-content {
  min-width: 0;
  flex: 1;
}

.progress-track,
.mini-progress {
  display: block;
  width: 100%;
  overflow: hidden;
  appearance: none;
  background: #dfe4e7;
  border: 0;
  border-radius: 2px;
}

.progress-track {
  height: 5px;
  margin-top: 10px;
}

progress::-webkit-progress-bar {
  background: #dfe4e7;
  border-radius: 2px;
}

progress::-webkit-progress-value {
  background: var(--mint);
  border-radius: 2px;
}

progress::-moz-progress-bar {
  background: var(--mint);
  border-radius: 2px;
}

.urgent-kpi strong {
  color: var(--red);
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  padding: 12px 24px 0;
  gap: 8px;
}

.day-tab {
  min-width: 0;
  min-height: 68px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "name date" "meta meta";
  align-items: center;
  column-gap: 8px;
  color: var(--ink-soft);
  text-align: left;
  background: #e3e7ea;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.day-tab:hover {
  color: var(--ink);
  background: #f1f3f5;
}

.day-tab.active {
  position: relative;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.day-tab.active::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 4px;
  background: var(--mint);
  border-radius: 6px 6px 0 0;
}

.day-name { grid-area: name; font-size: 12px; font-weight: 700; }
.day-date { grid-area: date; overflow-wrap: anywhere; font-size: 16px; }
.day-meta { grid-area: meta; margin-top: 4px; color: #748088; font-size: 11px; }
.day-tab.unscheduled .day-date { display: flex; justify-content: flex-end; color: #899299; }

.table-section {
  min-height: 0;
  margin: 0 24px 24px;
  display: flex;
  flex: 1;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.table-heading {
  min-height: 62px;
  padding: 10px 16px;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.table-heading h2 {
  margin-bottom: 3px;
  font-size: 16px;
}

.table-heading p,
.table-meta {
  margin-bottom: 0;
  color: #6d777d;
  font-size: 11px;
}

.table-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.auto-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auto-refresh svg {
  width: 14px;
  height: 14px;
}

.table-scroll {
  position: relative;
  min-height: 300px;
  flex: 1;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1520px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.col-urgent { width: 56px; }
.col-date { width: 106px; }
.col-bill { width: 150px; }
.col-code { width: 118px; }
.col-name { width: 190px; }
.col-workshop { width: 88px; }
.col-number { width: 94px; }
.col-progress { width: 132px; }
.col-contract { width: 130px; }
.col-remark { width: 330px; }
.col-action { width: 52px; }

th,
td {
  padding: 10px 10px;
  border-right: 1px solid #e4e8ea;
  border-bottom: 1px solid #e4e8ea;
  vertical-align: middle;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: #455057;
  text-align: left;
  background: #f0f3f4;
  border-bottom-color: var(--line-strong);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  height: 52px;
  color: #293036;
  background: #fff;
  font-size: 12px;
}

tbody tr:nth-child(even) td {
  background: #fbfcfc;
}

tbody tr:hover td {
  background: #f2f8f6;
}

tbody tr.is-urgent td {
  background: #fff8f7;
}

tbody tr.is-urgent:hover td {
  background: #ffefed;
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-center {
  text-align: center;
}

.cell-strong {
  color: #172126;
  font-weight: 700;
}

.cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-clamp {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.urgent-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.urgent-badge {
  color: #a92822;
  background: var(--red-soft);
  border: 1px solid #f4bbb6;
}

.normal-mark {
  color: #a5adb2;
}

.status-a { color: #08715b; background: var(--mint-soft); }
.status-b { color: #916000; background: var(--amber-soft); }
.status-c { color: #5c656b; background: #e8ecee; }
.status-d { color: #62418c; background: var(--violet-soft); }
.status-unknown { color: #5c656b; background: #e8ecee; }

.progress-cell {
  display: grid;
  grid-template-columns: minmax(50px, 1fr) 40px;
  align-items: center;
  gap: 8px;
}

.mini-progress {
  height: 6px;
}

.progress-value {
  text-align: right;
  color: #58636a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.detail-button {
  margin: auto;
}

.empty-state {
  position: absolute;
  inset: 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #8a949a;
  background: #fff;
}

.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
}

.empty-state strong {
  color: #4d575d;
  font-size: 14px;
}

.empty-state span {
  font-size: 12px;
}

.table-footer {
  min-height: 50px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #68737a;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination .icon-button {
  width: 32px;
  height: 32px;
}

.detail-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: 0 24px 70px rgba(14, 18, 20, 0.28);
}

.detail-dialog::backdrop {
  background: rgba(17, 21, 23, 0.62);
}

.dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 72px;
  padding: 14px 18px;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.dialog-head .eyebrow {
  color: var(--mint);
}

.dialog-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.dialog-body {
  max-height: calc(100vh - 114px);
  padding: 18px;
  overflow: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.detail-item {
  min-height: 76px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-item.wide {
  grid-column: 1 / -1;
}

.detail-item dt {
  margin-bottom: 6px;
  color: #758087;
  font-size: 11px;
  font-weight: 700;
}

.detail-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 14px;
  color: #fff;
  background: #343a3e;
  border-left: 4px solid var(--mint);
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.toast.error {
  border-left-color: #ff6259;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 1900px) {
  html,
  body { font-size: 15px; }
  .topbar { min-height: 88px; padding-right: 32px; padding-left: 32px; }
  h1 { font-size: 28px; }
  .control-band { padding-right: 32px; padding-left: 32px; }
  .kpi-item { min-height: 104px; padding-right: 28px; padding-left: 28px; }
  .kpi-item strong { font-size: 32px; }
  .day-tabs { padding-right: 32px; padding-left: 32px; }
  .table-section { margin-right: 32px; margin-left: 32px; }
  table { min-width: 1660px; }
  th, td { padding-right: 12px; padding-left: 12px; }
}

@media (min-width: 3000px) and (min-height: 1600px) {
  html,
  body {
    height: 100%;
    font-size: 21px;
    overflow: hidden;
  }

  .board-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  svg {
    width: 28px;
    height: 28px;
  }

  .topbar {
    position: relative;
    min-height: 142px;
    padding: 24px 56px;
    gap: 42px;
    border-bottom-width: 6px;
  }

  .brand-block {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 24px;
  }

  .control-band,
  .table-heading,
  .day-tab.unscheduled {
    display: none;
  }

  .day-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-mark {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-radius: 8px;
  }

  .brand-mark svg {
    width: 42px;
    height: 42px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 16px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.3;
  }

  .topbar-status {
    margin-left: auto;
    gap: 18px;
  }

  .connection {
    gap: 12px;
    padding-right: 22px;
    font-size: 20px;
  }

  .connection-dot {
    width: 13px;
    height: 13px;
    box-shadow: 0 0 0 5px rgba(65, 208, 163, 0.16);
  }

  .clock {
    min-width: 250px;
    font-size: 22px;
  }

  .icon-button {
    width: 54px;
    height: 54px;
    border-radius: 7px;
  }

  .control-band {
    padding: 20px 56px 22px;
    grid-template-columns: minmax(280px, 0.8fr) minmax(310px, 0.9fr) minmax(390px, 1fr) minmax(560px, 1.65fr);
    gap: 22px;
  }

  .field-group {
    gap: 9px;
  }

  .field-group > span {
    font-size: 17px;
  }

  select,
  input {
    height: 58px;
    padding: 0 18px;
    border-radius: 7px;
    font-size: 21px;
  }

  .input-with-icon > svg {
    top: 15px;
    left: 16px;
    width: 27px;
    height: 27px;
  }

  .input-with-icon input {
    padding-left: 54px;
  }

  .search-field input {
    padding-right: 56px;
  }

  .clear-search {
    top: 7px;
    right: 7px;
    width: 44px;
    height: 44px;
  }

  .clear-search svg {
    width: 24px;
    height: 24px;
  }

  .segmented {
    padding: 5px;
    border-radius: 8px;
  }

  .segmented.compact {
    height: 58px;
  }

  .segmented button {
    padding: 0 18px;
    border-radius: 6px;
    font-size: 20px;
  }

  .kpi-item {
    min-height: 166px;
    padding: 28px 46px;
    gap: 24px;
  }

  .kpi-icon {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
    border-radius: 8px;
  }

  .kpi-icon svg {
    width: 34px;
    height: 34px;
  }

  .kpi-item p {
    margin-bottom: 8px;
    font-size: 19px;
  }

  .kpi-item strong {
    font-size: 48px;
  }

  .kpi-item .unit {
    margin-left: 9px;
    font-size: 19px;
  }

  .progress-track {
    height: 9px;
    margin-top: 18px;
  }

  .day-tabs {
    padding: 20px 56px 0;
    gap: 14px;
  }

  .day-tab {
    min-height: 112px;
    padding: 17px 24px;
    column-gap: 14px;
    border-radius: 8px 8px 0 0;
  }

  .day-tab.active::before {
    height: 6px;
    border-radius: 8px 8px 0 0;
  }

  .day-name {
    font-size: 20px;
  }

  .day-date {
    font-size: 27px;
  }

  .day-meta {
    margin-top: 7px;
    font-size: 18px;
  }

  .table-section {
    margin: 0 56px 42px;
    border-width: 2px;
  }

  .table-heading {
    min-height: 100px;
    padding: 16px 26px;
    gap: 38px;
  }

  .table-heading h2 {
    margin-bottom: 5px;
    font-size: 28px;
  }

  .table-heading p,
  .table-meta {
    font-size: 17px;
  }

  .table-meta {
    gap: 20px;
  }

  .auto-refresh {
    gap: 8px;
  }

  .auto-refresh svg {
    width: 22px;
    height: 22px;
  }

  .table-scroll {
    min-height: 620px;
  }

  table {
    min-width: 3300px;
  }

  .col-urgent { width: 92px; }
  .col-date { width: 176px; }
  .col-bill { width: 270px; }
  .col-code { width: 205px; }
  .col-name { width: 370px; }
  .col-workshop { width: 160px; }
  .col-number { width: 155px; }
  .col-progress { width: 235px; }
  .col-contract { width: 225px; }
  .col-remark { width: 585px; }
  .col-action { width: 86px; }

  th,
  td {
    padding: 15px 17px;
  }

  th {
    font-size: 18px;
  }

  td {
    height: 88px;
    font-size: 20px;
  }

  .cell-clamp {
    line-height: 1.5;
  }

  .urgent-badge,
  .status-badge {
    min-height: 38px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 17px;
  }

  .progress-cell {
    grid-template-columns: minmax(90px, 1fr) 64px;
    gap: 13px;
  }

  .mini-progress {
    height: 9px;
  }

  .progress-value {
    font-size: 17px;
  }

  .detail-button {
    width: 48px;
    height: 48px;
  }

  .empty-state {
    min-height: 620px;
    gap: 12px;
  }

  .empty-state svg {
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
  }

  .empty-state strong {
    font-size: 23px;
  }

  .empty-state span {
    font-size: 19px;
  }

  .table-footer {
    min-height: 76px;
    padding: 11px 24px;
    gap: 24px;
    font-size: 19px;
  }

  .pagination {
    gap: 16px;
  }

  .pagination .icon-button {
    width: 50px;
    height: 50px;
  }

  .detail-dialog {
    width: min(1400px, calc(100vw - 100px));
    max-height: calc(100vh - 100px);
    border-radius: 10px;
  }

  .dialog-head {
    min-height: 116px;
    padding: 22px 30px;
    gap: 32px;
  }

  .dialog-head h2 {
    font-size: 34px;
  }

  .dialog-body {
    max-height: calc(100vh - 172px);
    padding: 30px;
  }

  .detail-item {
    min-height: 122px;
    padding: 20px;
  }

  .detail-item dt {
    margin-bottom: 10px;
    font-size: 18px;
  }

  .detail-item dd {
    font-size: 22px;
  }

  .toast {
    right: 34px;
    bottom: 34px;
    max-width: min(720px, calc(100vw - 68px));
    padding: 18px 24px;
    border-left-width: 7px;
    border-radius: 8px;
    font-size: 20px;
  }
}

html.kiosk-mode,
html.kiosk-mode body {
  height: 100%;
  overflow: hidden;
}

html.kiosk-mode .board-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

html.kiosk-mode .topbar {
  position: relative;
  min-height: clamp(82px, 7.4vh, 142px);
}

html.kiosk-mode .brand-block {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

html.kiosk-mode .topbar-status {
  margin-left: auto;
}

html.kiosk-mode .control-band,
html.kiosk-mode .table-heading,
html.kiosk-mode .day-tab.unscheduled {
  display: none;
}

html.kiosk-mode .day-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html.kiosk-mode .table-section {
  min-height: 0;
}

html.kiosk-mode .table-scroll {
  min-height: 0;
}

html.kiosk-mode td {
  height: clamp(52px, 5.8vh, 72px);
  padding-top: 7px;
  padding-bottom: 7px;
}

@media (min-width: 1200px) and (max-width: 2999px) {
  html.kiosk-mode h1 {
    font-size: clamp(28px, 2vw, 38px);
  }

  html.kiosk-mode .brand-mark {
    width: clamp(48px, 4vw, 64px);
    height: clamp(48px, 4vw, 64px);
    flex-basis: clamp(48px, 4vw, 64px);
  }

  html.kiosk-mode .brand-mark svg {
    width: clamp(28px, 2.4vw, 38px);
    height: clamp(28px, 2.4vw, 38px);
  }

  html.kiosk-mode .kpi-item {
    min-height: clamp(110px, 14vh, 150px);
    padding: clamp(18px, 2vh, 28px) clamp(24px, 2.2vw, 40px);
  }

  html.kiosk-mode .kpi-item strong {
    font-size: clamp(34px, 3vw, 46px);
  }

  html.kiosk-mode .day-tabs {
    padding-top: clamp(12px, 1.5vh, 20px);
  }

  html.kiosk-mode .day-tab {
    min-height: clamp(82px, 10vh, 108px);
  }

  html.kiosk-mode .day-date {
    font-size: clamp(19px, 1.6vw, 26px);
  }

  html.kiosk-mode th {
    font-size: clamp(13px, 1vw, 17px);
  }

  html.kiosk-mode td {
    font-size: clamp(15px, 1.15vw, 20px);
  }
}

@media (max-width: 1100px) {
  .topbar { align-items: flex-start; }
  .topbar-status { flex-wrap: wrap; justify-content: flex-end; }
  .connection { display: none; }
  .clock { min-width: 120px; }
  .control-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-item:nth-child(2) { border-right: 0; }
  .completion-kpi { grid-column: span 2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .day-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-tab { border-radius: 5px; border-bottom: 1px solid transparent; }
  .day-tab.active { border-bottom-color: var(--line); }
}

@media (max-width: 680px) {
  .topbar { min-height: 70px; padding: 11px 14px; }
  .brand-mark { display: none; }
  .eyebrow { display: none; }
  h1 { font-size: 18px; }
  .clock { display: none; }
  .control-band { padding: 10px 14px; grid-template-columns: 1fr; }
  .kpi-band { grid-template-columns: 1fr 1fr; }
  .kpi-item { min-height: 78px; padding: 12px; gap: 9px; }
  .kpi-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .kpi-item strong { font-size: 22px; }
  .completion-kpi { grid-column: span 2; }
  .urgent-kpi { border-top: 1px solid var(--line); }
  .day-tabs { padding: 10px 14px 0; grid-template-columns: 1fr 1fr; }
  .day-tab { min-height: 62px; padding: 9px 10px; }
  .day-date { font-size: 14px; }
  .table-section { margin: 0 14px 14px; }
  .table-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .table-meta { justify-content: flex-start; }
  .auto-refresh { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item.wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
