﻿:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #1b2430;
  --muted: #637083;
  --line: #d8e0ea;
  --primary: #1266a8;
  --primary-dark: #0d4f84;
  --success: #147a55;
  --danger: #b42318;
  --warning: #9a6700;
  --radius: 8px;
  --device-map-image: url("../assets/device-map-zh.png?v=20260629-zh-map-ruler-data");
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

html[lang="en"] {
  --device-map-image: url("../assets/device-map-en.png?v=20260629-zh-map-ruler-data");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  background:
    linear-gradient(90deg, rgba(18,102,168,.92), rgba(18,102,168,.62)),
    url("../assets/control-room.jpg");
  background-size: cover;
  background-position: center;
}

.auth-panel {
  min-height: 100vh;
  background: rgba(255,255,255,.96);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,.5);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.auth-title {
  margin: 0 0 24px;
  font-size: 26px;
}

.auth-tools {
  position: fixed;
  top: 18px;
  right: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
}

.password-control {
  position: relative;
}

.password-control .input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  color: var(--primary);
  background: var(--surface-2);
  font-size: 16px;
  line-height: 1;
  transform: translateY(-50%);
}

.password-control input::-ms-reveal,
.password-control input::-ms-clear {
  display: none;
}

.password-toggle:focus-visible,
.icon-button:focus-visible,
.small-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.textarea {
  resize: vertical;
  min-height: 88px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.primary-button,
.secondary-button,
.small-button,
.icon-button,
.danger-button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 38px;
  padding: 8px 14px;
  background: #fff;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  color: var(--primary);
  border-color: var(--line);
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.small-button,
.icon-button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--line);
  white-space: nowrap;
}

.link-button {
  border: 0;
  color: var(--primary);
  background: transparent;
  padding: 0;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: #17212f;
  color: #eef5ff;
  padding: 18px 14px;
  z-index: 20;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: none;
  background: rgba(15, 23, 42, .42);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 18px;
}

.brand-text {
  font-size: 16px;
  font-weight: 700;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav a {
  border-radius: var(--radius);
  padding: 11px 12px;
  color: #c8d6e5;
}

.nav a.active,
.nav a:hover {
  background: #253448;
  color: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 62px;
  margin-left: 236px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar .icon-button {
  margin-right: auto;
  display: none;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
}

.topbar-user > span:first-child {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
}

.app-main {
  margin-left: 236px;
  padding: 22px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: 22px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar .input {
  max-width: 320px;
}

.stats-grid,
.detail-grid,
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.connection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
  gap: 12px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.detail-metric > div:last-child {
  margin-top: 4px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.metric-value {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
}

.status-panel .metric-value {
  font-size: 22px;
}

.status-advice,
.subtle-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.inline-note {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--warning);
  background: #fff7df;
  font-size: 12px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.flow-step {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--muted);
  background: #f8fafc;
}

.flow-step span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
}

.flow-step strong {
  color: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.flow-step.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef7ff;
}

.flow-step.done {
  border-color: #b9e4d2;
  color: var(--success);
  background: #f0fbf6;
}

.flow-step.active span {
  color: #fff;
  background: var(--primary);
}

.flow-step.done span {
  color: #fff;
  background: var(--success);
}

.section-head,
.data-card-head,
.remote-command-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.data-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}

.data-title {
  color: var(--text);
  font-weight: 700;
}

.data-code {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.freshness {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--success);
  background: #e6f5ef;
  font-size: 12px;
  white-space: nowrap;
}

.freshness.stale,
.stale-text {
  color: var(--warning);
  background: #fff7df;
}

.telemetry-health {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 16px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.telemetry-health-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.telemetry-health-item strong {
  color: var(--text);
  font-size: 13px;
}

.telemetry-health-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.telemetry-health.is-live .telemetry-health-dot {
  background: var(--success);
}

.telemetry-health.is-delayed .telemetry-health-dot {
  background: var(--warning);
}

.telemetry-health.is-interrupted .telemetry-health-dot {
  background: var(--danger);
}

.telemetry-health.is-delayed .telemetry-health-primary strong {
  color: var(--warning);
}

.telemetry-health.is-interrupted .telemetry-health-primary strong {
  color: var(--danger);
}

.remote-command-card {
  border: 1px solid #b9e4d2;
  border-radius: var(--radius);
  padding: 14px;
  background: #f0fbf6;
}

.remote-command-value {
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}

.notice-panel {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  color: var(--text);
  background: #eaf4fb;
}

.notice-panel p {
  margin: 0;
  white-space: pre-line;
}

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.test-data-table {
  min-width: 920px;
}

.test-data-payload {
  width: 52%;
}

.test-data-payload pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #334155;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.test-data-refresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.test-data-refresh::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px #e6f5ef;
}

.test-send-grid {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(150px, .5fr) minmax(280px, 1.8fr) auto;
  align-items: end;
  gap: 10px;
}

.test-send-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.test-send-field textarea {
  min-height: 42px;
  max-height: 160px;
  resize: vertical;
}

@media (max-width: 1000px) {
  .test-send-grid {
    grid-template-columns: 1fr;
  }
}

.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
}

.status.online {
  color: var(--success);
  background: #e6f5ef;
}

.status.offline {
  color: var(--muted);
  background: var(--surface-2);
}

.status.waiting {
  color: #805500;
  background: #fff4ce;
}

.status.interrupted {
  color: var(--danger);
  background: #fcebea;
}

.status.disabled,
.status.danger {
  color: var(--danger);
  background: #fcebea;
}

.device-visual {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #dce6ee, #aab8c4);
  border: 1px solid #9cabb8;
}

.device-screen {
  position: absolute;
  inset: 58px 16% auto 16%;
  height: 78px;
  display: grid;
  place-items: center;
  color: #b7ffcf;
  background: #111820;
  border: 4px solid #26323f;
  font-size: 30px;
  font-weight: 700;
}

.device-map {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 1280 / 720;
  background: #fff var(--device-map-image) center / contain no-repeat;
}

.device-map-value {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  color: #9cffb0;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 8px rgba(156, 255, 176, .42);
}

.device-map-value[data-field="dd1"] {
  left: 17.2%;
  top: 67.9%;
  width: 11.5%;
  height: 7.0%;
}

.device-map-value[data-field="lachizhi"] {
  left: 17.2%;
  top: 37.4%;
  width: 11.5%;
  height: 7.0%;
}

.device-map-value[data-field="lunzhao"] {
  left: 36.3%;
  top: 6.1%;
  width: 11.4%;
  height: 7.1%;
}

.device-map-value[data-field="inlight"] {
  left: 72.4%;
  top: 38.6%;
  width: 11.4%;
  height: 7.1%;
}

.device-map-value[data-field="outlight"] {
  left: 72.4%;
  top: 52.6%;
  width: 11.4%;
  height: 7.1%;
}

.device-map-value[data-field="inside"] {
  left: 72.4%;
  top: 66.4%;
  width: 11.4%;
  height: 7.1%;
}

.device-map-value[data-field="outside"] {
  left: 72.4%;
  top: 80.5%;
  width: 11.4%;
  height: 7.1%;
}

.modal {
  border: 0;
  border-radius: var(--radius);
  width: min(560px, calc(100vw - 28px));
  padding: 0;
}

.modal::backdrop {
  background: rgba(15,23,42,.42);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal-body {
  padding: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: #1f2937;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: var(--success);
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .auth-page {
    grid-template-columns: 1fr;
    background: var(--bg);
  }

  .auth-panel {
    min-height: 100vh;
    padding: 34px 22px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .18s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .topbar,
  .app-main {
    margin-left: 0;
  }

  .topbar {
    gap: 6px;
    padding: 0 10px;
  }

  .topbar .icon-button {
    display: inline-grid;
    place-items: center;
  }

  .app-main {
    padding: 16px;
  }

  .page-head {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .page-head .secondary-button,
  .page-head .primary-button {
    width: auto;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .input,
  .toolbar .select,
  .toolbar button {
    width: 100%;
    max-width: none;
  }

  .connection-layout {
    grid-template-columns: 1fr;
  }

  .telemetry-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .telemetry-health {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: auto;
    grid-template-columns: 26px 1fr;
    align-items: center;
  }

  .device-map-panel {
    padding: 0;
    overflow: hidden;
  }

  .device-map {
    max-width: 1280px;
    aspect-ratio: 1280 / 860;
    background-image: var(--device-map-image);
    background-size: 116% auto;
    background-position: center;
  }

  .device-map-value {
    font-size: clamp(13px, 3.8vw, 18px);
    text-shadow: 0 0 5px rgba(156, 255, 176, .38);
  }

  .device-map-value[data-field="dd1"] {
    left: 12.0%;
    top: 67.4%;
    width: 13.3%;
    height: 6.8%;
  }

  .device-map-value[data-field="lachizhi"] {
    left: 12.0%;
    top: 37.8%;
    width: 13.3%;
    height: 6.8%;
  }

  .device-map-value[data-field="lunzhao"] {
    left: 34.1%;
    top: 7.4%;
    width: 13.2%;
    height: 6.9%;
  }

  .device-map-value[data-field="inlight"] {
    left: 76.0%;
    top: 38.9%;
    width: 13.2%;
    height: 6.9%;
  }

  .device-map-value[data-field="outlight"] {
    left: 76.0%;
    top: 52.5%;
    width: 13.2%;
    height: 6.9%;
  }

  .device-map-value[data-field="inside"] {
    left: 76.0%;
    top: 65.9%;
    width: 13.2%;
    height: 6.9%;
  }

  .device-map-value[data-field="outside"] {
    left: 76.0%;
    top: 79.6%;
    width: 13.2%;
    height: 6.9%;
  }

  .topbar-user {
    gap: 6px;
  }

  .topbar-user > span:first-child {
    max-width: 72px;
  }

  .detail-grid,
  .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .detail-metric {
    min-height: 82px;
    padding: 12px;
  }

  .detail-metric-deviceUniqueCode,
  .detail-metric-factoryName,
  .detail-metric-lastOnlineTime {
    grid-column: 1 / -1;
  }

  .data-card {
    min-height: 104px;
    padding: 12px;
  }

  .data-card .metric-value {
    font-size: 22px;
  }

  .dashboard-table {
    min-width: 0;
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: 10px 8px;
  }

  .dashboard-table .optional-mobile {
    display: none;
  }
}

@media (max-width: 360px) {
  .role-pill {
    display: none;
  }

  .topbar-user > span:first-child {
    max-width: 76px;
  }
}

/* Water-cut module. Kept separate from generic device/test-data styles. */
.watercut-page { max-width: 1560px; margin-right: auto; }
.watercut-page .page-title { font-size: 26px; }
.watercut-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.watercut-toolbar .field { min-width: min(320px, 100%); }
.watercut-device-select { min-width: 280px; }
.watercut-connection { display: inline-flex; align-items: center; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.watercut-connection::before { content: ''; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #94a3b8; }
.watercut-connection.live { color: var(--success); border-color: #b9e4d2; background: #f0fbf6; }
.watercut-connection.live::before { background: var(--success); }
.watercut-live-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(180px, .55fr)); gap: 12px; margin-bottom: 14px; }
.watercut-main-reading { min-height: 146px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; color: #fff; border-radius: var(--radius); background: linear-gradient(130deg, #075985, #1266a8 58%, #0e7490); }
.watercut-main-reading .metric-label { color: rgba(255,255,255,.76); font-size: 15px; }
.watercut-main-reading .reading-value { font-size: clamp(42px, 4.5vw, 66px); font-weight: 700; line-height: 1; letter-spacing: -1px; }
.watercut-main-reading .reading-value small { font-size: .38em; font-weight: 600; letter-spacing: 0; }
.watercut-main-reading .reading-time { color: rgba(255,255,255,.8); font-size: 14px; }
.watercut-secondary-reading { min-height: 146px; }
.watercut-secondary-reading .metric-value { font-size: 32px; }
.watercut-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(330px, .9fr); gap: 14px; }
.watercut-chart-panel { padding: 18px 18px 12px; }
.watercut-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.watercut-chart-head .section-title { margin: 0; font-size: 18px; }
.watercut-history-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.watercut-history-toolbar .watercut-device-select { min-width: 250px; }
.watercut-date-field { min-width: 260px; }
.watercut-date-row { display: flex; align-items: center; gap: 7px; }
.watercut-date-row .input { min-width: 0; flex: 1; }
.watercut-date-row .secondary-button { min-height: 42px; padding-inline: 13px; white-space: nowrap; }
.watercut-periods { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.watercut-period { min-height: 34px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; }
.watercut-period[aria-pressed="true"] { color: #fff; border-color: var(--primary); background: var(--primary); }
.watercut-chart-wrap { position: relative; min-height: 350px; }
.watercut-chart { width: 100%; height: 350px; display: block; overflow: visible; }
.watercut-chart .grid { stroke: #dbe4ec; stroke-width: 1; }
.watercut-chart .axis-label { fill: #637083; font: 12px Arial, "Microsoft YaHei", sans-serif; }
.watercut-chart .line { fill: none; stroke: #0f7cae; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.watercut-chart .area { fill: url(#watercutArea); opacity: .25; }
.watercut-chart .empty { fill: #637083; font: 14px Arial, "Microsoft YaHei", sans-serif; }
.watercut-chart-note { min-height: 22px; margin: 4px 2px 0; color: var(--muted); font-size: 13px; }
.watercut-side { display: grid; align-content: start; gap: 14px; }
.watercut-device-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.watercut-device-id { margin-top: 4px; color: var(--muted); font: 12px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.calibration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calibration-value { min-width: 0; padding: 10px; border-radius: var(--radius); background: var(--surface-2); }
.calibration-value-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.calibration-edit-button { min-height: 32px; padding: 4px 7px; font-size: 12px; }
.calibration-value span { display: block; color: var(--muted); font-size: 12px; }
.calibration-value strong { display: block; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.watercut-command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.watercut-command-grid .primary-button, .watercut-command-grid .secondary-button, .watercut-command-grid .danger-button { min-height: 44px; padding: 8px; }
.command-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.watercut-dialog-field { display: grid; gap: 7px; color: var(--muted); }
.watercut-dialog-field + .watercut-dialog-field { margin-top: 12px; }
@media (max-width: 1120px) { .watercut-layout { grid-template-columns: 1fr; } .watercut-live-grid { grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(150px, .65fr)); } }
@media (max-width: 700px) { .watercut-page .page-title { font-size: 23px; } .watercut-live-grid { grid-template-columns: 1fr 1fr; } .watercut-main-reading { grid-column: 1 / -1; min-height: 132px; } .watercut-history-toolbar .watercut-device-select, .watercut-date-field { min-width: 100%; width: 100%; } .watercut-chart-wrap, .watercut-chart { min-height: 290px; height: 290px; } }
