:root {
  --blue: #1e7bff;
  --blue-deep: #0e66e8;
  --green: #43c417;
  --orange: #ffad16;
  --red: #ff4d55;
  --text: #111318;
  --muted: #60646c;
  --subtle: #8a8e96;
  --line: #e2ebf6;
  --line-strong: #d4deea;
  --page: #f5f7f9;
  --card: #ffffff;
  --shadow: 0 2px 7px rgba(20, 40, 70, 0.08);
  --topbar: 64px;
  --left-rail-width: 128px;
  --left-rail-dark: 54px;
  --assistant-width: clamp(340px, 28vw, 430px);
  --page-gutter: clamp(14px, 1.2vw, 24px);
  --section-gap: 28px;
  --font-page-title: 22px;
  --font-section-title: 20px;
  --font-card-title: 18px;
  --font-body: 14px;
  --font-label: 12px;
  --font-metric: clamp(34px, 2.3vw, 42px);
  --font-device-metric: 21px;
  --weight-title: 800;
  --weight-strong: 760;
  --weight-medium: 600;
  --weight-regular: 500;
  --diagnose-button-width: 54px;
  --expand-action-size: 30px;
  --inverter-action-gap: 10px;
  --strings-panel-padding-x: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--left-rail-width) minmax(0, 1fr) var(--assistant-width);
  align-items: start;
}

.left-rail {
  position: sticky;
  top: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: var(--left-rail-dark) 1fr;
  align-self: start;
  width: var(--left-rail-width);
  height: 100vh;
}

.left-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: -12px;
  width: 12px;
  height: 100%;
  background: linear-gradient(90deg, rgba(77, 103, 134, 0.22), rgba(77, 103, 134, 0.08) 44%, rgba(77, 103, 134, 0));
  pointer-events: none;
}

.left-rail-dark {
  height: 100%;
  background: #071e34;
}

.left-rail-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(240, 247, 255, 0.86) 100%),
    #f4f8fd;
  border-right: 1px solid #d9e5f1;
}

.rail-profile {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 30px 0 28px;
  border-top: 0;
  background: transparent;
}

.rail-operator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(199, 214, 232, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  color: #627388;
  box-shadow: 0 10px 22px rgba(28, 54, 84, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.rail-operator:hover {
  border-color: rgba(30, 123, 255, 0.32);
  color: #1e7bff;
  box-shadow: 0 12px 26px rgba(30, 123, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.operator-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.operator-avatar svg {
  width: 24px;
  height: 24px;
}

.operator-status {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #43c417;
  box-shadow: 0 0 0 2px rgba(67, 196, 23, 0.16);
}

.workspace-column {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--topbar);
  padding: 0 var(--page-gutter);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(19, 34, 56, 0.08);
}

.board-title {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #202124;
  font-weight: var(--weight-title);
  font-size: var(--font-page-title);
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.selector-group {
  display: inline-flex;
  align-items: stretch;
  flex: 0 1 auto;
  height: 42px;
  min-width: 0;
  border: 1px solid #d7deea;
  border-radius: 6px;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}

.selector-group::-webkit-scrollbar {
  display: none;
}

.selector-item {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 150px;
  min-width: 136px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #202124;
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  white-space: nowrap;
}

.selector-item + .selector-item {
  border-left: 1px solid #d7deea;
}

.selector-item.wide {
  width: 252px;
  min-width: 222px;
}

.selector-item:hover,
.selector-item.active {
  background: #f7f9fc;
  color: var(--text);
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.72;
}

.assistant-panel {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 26px 26px 20px;
  border-left: 1px solid #e2e8f2;
  background: #f8fafe;
  overflow: hidden;
}

.assistant-suggestion {
  padding: 16px;
  border: 1px solid #dce7ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #eaf2ff 0%, #f1f0ff 100%);
}

.assistant-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: #202a3a;
  font-size: 15px;
}

.assistant-title-row strong {
  font-weight: var(--weight-title);
}

.assistant-orb,
.assistant-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b95ff, #8d7cff);
  color: #fff;
  font-size: 12px;
  font-weight: var(--weight-title);
  box-shadow: 0 6px 16px rgba(60, 120, 255, 0.25);
}

.assistant-close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7b8291;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.assistant-close:hover {
  background: rgba(255, 255, 255, 0.76);
  color: #1d2636;
}

.assistant-prompts {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.assistant-prompts h2 {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8edf6;
  color: #252b38;
  font-size: 14px;
  font-weight: var(--weight-title);
}

.assistant-prompts button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #657085;
  font-size: 13px;
  font-weight: var(--weight-medium);
  text-align: left;
  cursor: pointer;
}

.assistant-prompts button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #78a5ff;
  transform: rotate(45deg);
}

.assistant-prompts button:hover {
  color: var(--blue);
}

.assistant-spacer {
  flex: 1;
  min-height: 0;
}

.assistant-input {
  padding: 14px;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(44, 64, 98, 0.08);
}

.assistant-input textarea {
  display: block;
  width: 100%;
  min-height: 66px;
  resize: none;
  border: 0;
  outline: 0;
  color: #303744;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.assistant-input textarea::placeholder {
  color: #a5adba;
}

.assistant-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.assistant-tools button {
  min-height: 28px;
  border: 1px solid #bfd4ff;
  border-radius: 6px;
  background: #f7fbff;
  color: #3c74ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.assistant-tools button:not(.assistant-send) {
  padding: 0 10px;
}

.assistant-send {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #8ea8ff, #9b7cff);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(110, 116, 255, 0.34);
}

.page {
  padding: 32px var(--page-gutter) 40px;
}

.station-page {
  padding-top: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.status-board {
  margin: 0 0 var(--section-gap);
  padding: 20px clamp(14px, 1.2vw, 22px) 16px;
  overflow-x: hidden;
}

.station-page .status-board {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0;
  color: #555860;
  font-size: var(--font-label);
  font-weight: var(--weight-medium);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.status-board .legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.status-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 12px;
}

.status-board-title {
  margin: 0;
  color: #343b49;
  font-size: 14px;
  font-weight: var(--weight-title);
  white-space: nowrap;
}

.status-board-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.status-board-head .legend {
  flex: 0 0 auto;
}

.data-date-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  overflow: visible;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
  color: #4f5968;
  font-size: 12px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(12, 23, 38, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.data-date-control:hover {
  border-color: #4096ff;
}

.data-date-control:focus-within {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.12);
}

.data-date-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.data-date-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  min-height: 30px;
  padding: 0 32px 0 11px;
}

.data-date-value {
  color: #202633;
  font-weight: var(--weight-strong);
  line-height: 30px;
}

.date-control-icon {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  color: #596579;
  pointer-events: none;
}

.data-date-note {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 11px 0 0;
  color: #667085;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.data-date-control[data-current="true"] .data-date-note {
  color: #1677ff;
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 266px;
  padding: 12px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(19, 36, 64, 0.16);
}

.date-picker-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  margin-bottom: 10px;
}

.date-picker-head strong {
  color: #1f2633;
  font-size: 13px;
  font-weight: var(--weight-title);
  text-align: center;
}

.date-picker-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.date-picker-nav:hover:not(:disabled) {
  background: #f0f6ff;
  color: #1677ff;
}

.date-picker-nav:disabled {
  color: #c1c7d0;
  cursor: not-allowed;
}

.date-picker-weekdays,
.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-picker-weekdays {
  margin-bottom: 5px;
  color: #7f8794;
  font-size: 12px;
  font-weight: var(--weight-medium);
  text-align: center;
}

.date-picker-weekdays span {
  height: 24px;
  line-height: 24px;
}

.date-picker-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #303744;
  font-size: 12px;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.date-picker-day:hover:not(:disabled) {
  border-color: #91caff;
  background: #f0f7ff;
  color: #1677ff;
}

.date-picker-day.selected {
  border-color: #1677ff;
  background: #1677ff;
  color: #ffffff;
  font-weight: var(--weight-title);
}

.date-picker-day:disabled {
  color: #c5cad3;
  cursor: not-allowed;
}

.date-picker-day.blank {
  pointer-events: none;
}

.date-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1f6;
  color: #7a8290;
  font-size: 11px;
}

.date-picker-foot button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #c9ddff;
  border-radius: 5px;
  background: #f7fbff;
  color: #1677ff;
  font-size: 12px;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: minmax(76px, 7%) repeat(31, minmax(9px, 1fr));
  gap: 8px clamp(3px, 0.4vw, 7px);
  align-items: center;
  width: 100%;
  min-width: 0;
}

.day-header {
  color: #888b90;
  font-size: 12px;
  font-weight: var(--weight-medium);
  text-align: center;
}

.month-axis {
  color: #7b828d;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.month-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid #e0e5ec;
  border-radius: 4px;
  background: #f7f9fc;
  color: #585b60;
  font-size: 12px;
  font-weight: var(--weight-medium);
  text-align: center;
  white-space: nowrap;
}

.day-cell {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.day-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 40, 70, 0.16);
}

.day-cell.is-disabled {
  cursor: default;
}

.day-cell.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.day-cell-blank,
.day-cell-blank:hover {
  background: transparent;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.day-cell.selected {
  outline: 2px solid rgba(45, 98, 240, 0.65);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(45, 98, 240, 0.12);
}

.status-healthy {
  background: var(--green);
}

.status-warning {
  background: var(--orange);
}

.status-abnormal {
  background: var(--red);
}

.status-empty {
  background: #edf1f6;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 0 0 var(--section-gap);
}

.station-page .metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
}

.metric-card {
  min-height: 140px;
  padding: 26px 30px;
}

.metric-label {
  margin-bottom: 12px;
  color: #5d6067;
  font-size: 16px;
  font-weight: var(--weight-medium);
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: #0b0d12;
  font-size: var(--font-metric);
  font-weight: var(--weight-title);
  letter-spacing: 0;
}

.metric-value .unit {
  color: #8b8e94;
  font-size: 14px;
  font-weight: var(--weight-medium);
}

.metric-value.red {
  color: var(--red);
}

.metric-value.orange {
  color: var(--orange);
}

.metric-value.blue {
  color: var(--blue);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 20px;
}

.section-title {
  display: flex;
  align-items: center;
  margin: 0;
  color: #101318;
  font-size: var(--font-section-title);
  font-weight: var(--weight-title);
}

.section-title::before {
  content: "";
  display: block;
  width: 6px;
  height: 34px;
  margin-right: 9px;
  background: var(--blue);
}

.list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.area-row,
.station-row {
  display: grid;
  align-items: center;
  min-height: 132px;
  padding: 22px 28px;
}

.area-row {
  grid-template-columns: 72px minmax(0, 1fr) 48px;
  column-gap: 24px;
}

.station-row {
  grid-template-columns: 72px minmax(0, 1fr) 48px;
  column-gap: 22px;
}

.asset-sequence {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #eaf4ff;
  color: #1f6fe5;
  font-size: 18px;
  font-weight: var(--weight-title);
  line-height: 1;
}

.row-title {
  margin: 0 0 12px;
  font-size: var(--font-card-title);
  font-weight: var(--weight-title);
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  color: #5c6068;
  font-size: 14px;
  font-weight: var(--weight-regular);
}

.row-meta strong {
  color: #16191f;
  font-size: 15px;
  font-weight: var(--weight-strong);
}

.todo-count,
.device-count {
  text-align: center;
}

.count-label {
  margin-bottom: 4px;
  color: #8a8e95;
  font-size: 13px;
  font-weight: var(--weight-medium);
}

.count-number {
  color: var(--orange);
  font-size: 24px;
  font-weight: var(--weight-title);
}

.count-number.red {
  color: var(--red);
}

.count-number.black {
  color: #101318;
}

.primary-action,
.ghost-action,
.danger-action,
.neutral-action,
.success-action,
.soft-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  background: #fff;
  color: #111318;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.primary-action,
.ghost-action,
.neutral-action {
  border: 1px solid #d7d7d7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.primary-action:hover,
.ghost-action:hover,
.neutral-action:hover {
  border-color: #bfc9d7;
  background: #fbfcff;
}

.row-enter-action {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1f6fe5;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.row-enter-action:hover {
  background: #edf5ff;
  color: var(--blue-deep);
  transform: translateX(1px);
}

.row-enter-action svg {
  width: 24px;
  height: 24px;
}

.danger-action {
  border: 1px solid #ff858a;
  color: var(--red);
  background: #fff;
}

.danger-action:hover {
  background: #fff6f6;
}

.soft-action {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  color: #555960;
  background: #fff;
}

.blue-fill,
.green-fill {
  border: 0;
  color: #fff;
  box-shadow: none;
}

.blue-fill {
  background: var(--blue);
}

.blue-fill:hover {
  background: var(--blue-deep);
}

.green-fill {
  background: var(--green);
}

.green-fill:hover {
  background: #37ad0f;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.tag::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.tag.green {
  border: 1px solid #7ee35a;
  background: #fbfff8;
  color: var(--green);
}

.tag.orange {
  border: 1px solid #ffd37c;
  background: #fffdf7;
  color: var(--orange);
}

.tag.red {
  border: 1px solid #ff9ea3;
  background: #fff8f8;
  color: var(--red);
}

.station-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.diagnostic-action-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.batch-export-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #d9e9ff;
  border-radius: 8px;
  background: #f7fbff;
}

.batch-export-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 4px;
  color: #5f6d80;
  font-size: 13px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.station-export-action {
  border-color: #b8d3ff;
  background: #f7fbff;
  color: #1f6fe5;
  box-shadow: 0 2px 6px rgba(31, 111, 229, 0.08);
}

.station-export-action.active {
  border-color: #8eb7f5;
  background: #eef6ff;
  color: #0e66e8;
}

.station-export-action:hover {
  border-color: #8eb7f5;
  background: #f1f7ff;
  color: #0e66e8;
}

.batch-cancel-action {
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid #cfdced;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
  color: #5d6878;
  font-size: 13px;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.batch-cancel-action:hover {
  border-color: #adc7eb;
  color: #1f6fe5;
}

.diagnostic-stack {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  width: 100%;
  min-width: 0;
}

.inverter-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.inverter-card {
  min-width: 0;
  border: 1px solid #dce6f3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 40, 70, 0.05);
  padding: 16px 20px 18px;
}

.inverter-card.expanded {
  border-color: #dce6f3;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(20, 40, 70, 0.07);
}

.inverter-card-head {
  display: grid;
  grid-template-columns: minmax(318px, 1.35fr) minmax(0, 4fr) minmax(42px, auto);
  align-items: center;
  gap: 16px;
}

.inverter-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inverter-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 40px;
  cursor: pointer;
}

.inverter-select input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.inverter-select span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid #b8c7d9;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.inverter-select span::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.inverter-select input:checked + span {
  border-color: #2d7cff;
  background: #2d7cff;
  box-shadow: 0 0 0 3px rgba(45, 124, 255, 0.12);
}

.inverter-select input:checked + span::after {
  opacity: 1;
}

.inverter-select:hover span {
  border-color: #2d7cff;
}

.inverter-sequence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #eaf4ff;
  color: #1f6fe5;
  box-shadow: none;
}

.inverter-sequence span {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.inverter-copy {
  min-width: 0;
}

.inverter-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inverter-title {
  margin: 0;
  color: #151820;
  font-size: 16px;
  font-weight: var(--weight-title);
  white-space: nowrap;
}

.inverter-model {
  margin-top: 6px;
  color: #696f7a;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.inverter-specs {
  display: block;
  margin-top: 7px;
  color: #697282;
  font-size: 12px;
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 3px;
  border: 1px solid #7ee35a;
  color: var(--green);
  background: #fbfff8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-tag.warning {
  border-color: #ffc98a;
  color: var(--orange);
  background: #fff8ef;
}

.mini-tag.abnormal {
  border-color: #ffb6bb;
  color: var(--red);
  background: #fff3f4;
}

.inverter-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  align-items: center;
  min-width: 0;
}

.device-metric {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid #e3e9f1;
}

.device-metric:first-child {
  border-left: 0;
}

.device-metric-label {
  margin-bottom: 5px;
  color: #646b78;
  font-size: 12px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.device-metric-value {
  color: #101318;
  font-size: var(--font-device-metric);
  font-weight: var(--weight-title);
  line-height: 1;
  white-space: nowrap;
}

.device-metric-value.red {
  color: #d72f36;
}

.device-metric-value .unit {
  color: #555b66;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.inverter-actions {
  display: grid;
  grid-template-columns: var(--diagnose-button-width) var(--expand-action-size);
  align-items: center;
  justify-items: end;
  justify-self: end;
  column-gap: var(--inverter-action-gap);
  min-width: 0;
}

.inverter-diagnose-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--diagnose-button-width);
  height: 30px;
  min-width: var(--diagnose-button-width);
  padding: 0 12px;
  border: 1px solid #d5e1f0;
  border-radius: 6px;
  background: #f9fbff;
  color: #566478;
  font-size: 12px;
  font-weight: var(--weight-medium);
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.inverter-diagnose-button:hover {
  border-color: #adc7eb;
  background: #f4f8ff;
  color: #1f6fe5;
  box-shadow: 0 3px 8px rgba(31, 111, 229, 0.08);
}

.analysis-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--expand-action-size);
  height: var(--expand-action-size);
  min-width: var(--expand-action-size);
  min-height: var(--expand-action-size);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #2d62f0;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.analysis-button:hover {
  background: transparent;
  color: #174fe2;
}

.analysis-button.expanded {
  background: transparent;
  color: #2d62f0;
  box-shadow: none;
}

.button-chevron {
  width: 9px;
  height: 9px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease;
}

.analysis-button.expanded .button-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.inverter-timeline {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4ebf4;
}

.time-labels {
  display: grid;
  grid-template-columns: repeat(var(--time-columns, 12), minmax(0, 1fr));
  margin-bottom: 9px;
  color: #979da6;
  font-size: 11px;
  font-weight: var(--weight-regular);
}

.time-labels span {
  text-align: center;
}

.time-labels span:first-child {
  text-align: left;
}

.time-labels span:last-child {
  text-align: right;
}

.bar-strip {
  display: grid;
  grid-template-columns: repeat(var(--timeline-points, 144), minmax(2px, 1fr));
  gap: 2px;
  height: 19px;
}

.segment {
  min-width: 0;
  border-radius: 1px;
  background: #edf0f4;
}

.segment.status-healthy {
  background: var(--green);
}

.segment.status-warning {
  background: var(--orange);
}

.segment.status-abnormal {
  background: var(--red);
}

.strings-panel {
  min-width: 0;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f7fbff;
}

.strings-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px 13px;
  border-bottom: 1px solid #e1edf8;
  background: #f4f9ff;
}

.strings-panel-title {
  margin: 0;
  color: #202633;
  font-size: 15px;
  font-weight: var(--weight-title);
}

.inline-legend {
  display: flex;
  gap: 16px;
  color: #5c6068;
  font-size: 13px;
  font-weight: var(--weight-medium);
}

.inline-legend.compact {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.inline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-legend .legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.station-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  align-items: stretch;
  gap: 16px;
  margin: 0 0 16px;
  min-width: 0;
}

.station-rcd-card,
.target-stat-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px 22px 20px;
  min-width: 0;
  overflow: hidden;
}

.station-rcd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.station-rcd-head h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  font-weight: var(--weight-title);
  line-height: 1.25;
}

.station-rcd-body {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 2.5vw, 30px);
}

.station-rcd-donut,
.target-stat-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 33, 55, 0.04);
}

.station-rcd-donut {
  background: conic-gradient(
    var(--green) 0 var(--healthy-end),
    var(--orange) var(--healthy-end) var(--warning-end),
    var(--red) var(--warning-end) 100%
  );
}

.target-stat-donut {
  background: conic-gradient(
    var(--green) 0 var(--qualified-end),
    var(--orange) var(--qualified-end) var(--alarm-end),
    var(--red) var(--alarm-end) 100%
  );
}

.station-rcd-donut::after,
.target-stat-donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(216, 226, 240, 0.7);
}

.station-rcd-total {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.station-rcd-total strong {
  color: #1d2636;
  font-size: 36px;
  font-weight: 850;
  line-height: 1;
}

.station-rcd-total span {
  color: #6b7280;
  font-size: 12px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.target-stat-total {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.target-stat-total strong {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #1d2636;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.target-stat-total strong span {
  color: #8a93a1;
  font-size: 10px;
  font-weight: var(--weight-medium);
}

.target-stat-total em {
  color: #6b7280;
  font-size: 10px;
  font-style: normal;
  font-weight: var(--weight-medium);
  line-height: 1;
  white-space: nowrap;
}

.station-rcd-list {
  display: grid;
  gap: 14px;
}

.station-rcd-row {
  display: grid;
  grid-template-columns: minmax(142px, 1fr) 64px 58px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

.station-rcd-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #485468;
  font-size: 15px;
  font-weight: var(--weight-strong);
  white-space: nowrap;
}

.station-rcd-label i {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.station-rcd-label em {
  color: #5e6876;
  font-style: normal;
  font-weight: var(--weight-medium);
}

.station-rcd-row strong {
  justify-self: end;
  color: #1d2636;
  font-size: 24px;
  font-weight: var(--weight-title);
  line-height: 1;
}

.station-rcd-row strong span {
  margin-left: 4px;
  color: #8a93a1;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.station-rcd-row b {
  justify-self: end;
  font-size: 24px;
  font-weight: var(--weight-title);
  line-height: 1;
}

.station-rcd-row.healthy .station-rcd-label i {
  background: var(--green);
}

.station-rcd-row.warning .station-rcd-label i {
  background: var(--orange);
}

.station-rcd-row.abnormal .station-rcd-label i {
  background: var(--red);
}

.station-rcd-row.healthy b {
  color: var(--green);
}

.station-rcd-row.warning b {
  color: var(--orange);
}

.station-rcd-row.abnormal b {
  color: var(--red);
}

.target-stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.target-stat-head h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  font-weight: var(--weight-title);
  line-height: 1.25;
}

.target-stat-body {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.target-stat-donut {
  width: 112px;
  height: 112px;
}

.target-stat-donut::after {
  inset: 29px;
}

.target-stat-list {
  display: grid;
  gap: 14px;
}

.target-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.target-stat-row strong {
  justify-self: end;
  color: #1d2636;
  font-size: 24px;
  font-weight: var(--weight-title);
  line-height: 1;
}

.target-stat-row .station-rcd-label {
  gap: 7px;
  font-size: 13px;
}

.target-stat-row.healthy .station-rcd-label i {
  background: var(--green);
}

.target-stat-row.warning .station-rcd-label i {
  background: var(--orange);
}

.target-stat-row.abnormal .station-rcd-label i {
  background: var(--red);
}

.strings-panel-list {
  display: grid;
  gap: 0;
  padding: 10px var(--strings-panel-padding-x) 16px;
}

.string-row {
  padding: 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.string-row + .string-row {
  margin-top: 12px;
  border-top: 1px solid #e3edf8;
}

.string-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) var(--diagnose-button-width);
  align-items: center;
  column-gap: 24px;
  min-height: 42px;
  padding: 0 max(0px, calc(var(--expand-action-size) + var(--inverter-action-gap) - var(--strings-panel-padding-x))) 8px 0;
  border-bottom: 0;
  color: #515763;
  font-size: 12px;
  font-weight: var(--weight-medium);
}

.string-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #101318;
  font-size: 14px;
  font-weight: var(--weight-strong);
}

.string-name::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--green);
}

.string-row.warning .string-name::before {
  background: var(--orange);
}

.string-row.abnormal .string-name::before {
  background: var(--red);
}

.string-diagnose-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 3;
  justify-self: end;
  width: var(--diagnose-button-width);
  height: 26px;
  min-width: var(--diagnose-button-width);
  padding: 0 9px;
  border: 1px solid #dbe6f4;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
  color: #617083;
  font-size: 12px;
  font-weight: var(--weight-medium);
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.string-diagnose-button:hover {
  border-color: #b8cdec;
  background: #f7fbff;
  color: #1f6fe5;
}

.string-bars {
  padding: 0 0 10px;
}

.inverter-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 2px 4px 0;
  color: #6b7280;
  font-size: 12px;
}

.inverter-pagination button {
  min-width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.inverter-pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.inverter-pagination button.active {
  background: #e7ecff;
  color: #2d62f0;
  font-weight: 700;
}

.inverter-pagination .page-size {
  min-width: 92px;
  border-color: #d9dee8;
  background: #ffffff;
  color: #3f4652;
}

.drawer-layer {
  position: fixed;
  top: var(--topbar);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.drawer {
  position: relative;
  width: min(560px, 38vw);
  min-width: 420px;
  height: 100%;
  padding: 24px 22px;
  background: #f4f4f4;
  box-shadow: -14px 0 28px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
}

.work-order-card {
  width: 100%;
  display: block;
  padding: 20px 22px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  color: #31343b;
  text-align: left;
  cursor: pointer;
}

.work-order-card + .work-order-card {
  margin-top: 18px;
}

.work-order-card:hover {
  border-color: #c8d9ef;
  box-shadow: 0 8px 22px rgba(20, 40, 70, 0.1);
}

.work-order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.work-order-title {
  color: #111318;
  font-size: 16px;
  font-weight: var(--weight-title);
}

.order-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid #d5d8de;
  color: #33363d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-badge.progress {
  border-color: #6eb2ff;
  background: #eef7ff;
  color: var(--blue);
}

.order-badge.closed {
  background: #f5f5f5;
  color: #5d6068;
}

.work-order-lines {
  display: grid;
  gap: 8px;
  color: #555961;
  font-size: 14px;
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.52);
}

.modal {
  width: min(680px, calc(100vw - 40px));
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 30px;
  border-bottom: 1px solid #eceef2;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: var(--weight-title);
}

.close-button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #8a8d93;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 28px 30px 26px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  row-gap: 16px;
  column-gap: 18px;
  margin-bottom: 28px;
  color: #555960;
  font-size: 15px;
  font-weight: var(--weight-regular);
}

.detail-label {
  color: #8c9098;
  font-weight: var(--weight-medium);
}

.detail-value strong {
  color: #111318;
  font-weight: var(--weight-strong);
}

.status-text.pending {
  color: #111318;
  font-weight: var(--weight-strong);
}

.status-text.progress {
  color: var(--blue);
  font-weight: var(--weight-strong);
}

.status-text.closed {
  color: #555960;
  font-weight: var(--weight-strong);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid #eceef2;
}

.threshold-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
}

.threshold-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: var(--weight-medium);
}

.threshold-row input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d7dce4;
  border-radius: 8px;
  font-size: 15px;
  font-weight: var(--weight-medium);
  text-align: right;
}

.toast-root,
#toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #101318;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: var(--weight-medium);
}

@media (max-width: 1500px) {
  :root {
    --diagnose-button-width: 52px;
    --expand-action-size: 36px;
  }

  .topbar {
    gap: 10px;
  }

  .board-title {
    font-size: 21px;
  }

  .selector-group {
    height: 38px;
  }

  .selector-item {
    width: 116px;
    min-width: 110px;
    padding: 0 10px;
    font-size: 14px;
  }

  .selector-item.wide {
    width: 192px;
    min-width: 176px;
  }

  .calendar-grid {
    grid-template-columns: minmax(74px, 7%) repeat(31, minmax(8px, 1fr));
    gap: 7px clamp(3px, 0.35vw, 6px);
    min-width: 0;
  }

  .day-header {
    font-size: 11px;
  }

  .month-label {
    min-height: 34px;
    font-size: 12px;
  }

  .day-cell {
    height: 34px;
  }

  .inverter-card-head {
    grid-template-columns: minmax(278px, 1fr) minmax(0, 3.2fr) minmax(38px, auto);
    gap: 12px;
  }

  .inverter-main {
    gap: 10px;
  }

  .inverter-sequence {
    flex-basis: 38px;
    width: 38px;
    height: 36px;
  }

  .inverter-sequence span {
    font-size: 14px;
  }

  .inverter-title {
    font-size: 16px;
  }

  .inverter-model,
  .inverter-specs {
    font-size: 12px;
  }

  .inverter-metrics {
    grid-template-columns: repeat(5, minmax(66px, 1fr));
  }

  .device-metric {
    padding: 0 8px;
  }

  .device-metric-label {
    font-size: 11px;
  }

  .device-metric-value {
    font-size: 20px;
  }

  .device-metric-value .unit {
    font-size: 11px;
  }

  .analysis-button {
    width: 36px;
    min-width: 36px;
    min-height: 32px;
  }

  .inverter-diagnose-button {
    min-width: 52px;
    padding: 0 10px;
  }

  .station-summary-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
  }

  .station-rcd-body {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }

  .station-rcd-list {
    width: 100%;
  }

  .station-rcd-donut,
  .target-stat-donut {
    width: 122px;
    height: 122px;
  }

  .station-rcd-donut::after,
  .target-stat-donut::after {
    inset: 31px;
  }

  .station-rcd-total strong {
    font-size: 32px;
  }

  .station-rcd-row {
    grid-template-columns: minmax(0, 1fr) 48px 44px;
    gap: 8px;
    min-height: 32px;
  }

  .station-rcd-label {
    gap: 8px;
    font-size: 13px;
  }

  .station-rcd-row strong,
  .station-rcd-row b {
    font-size: 20px;
  }

  .target-stat-head {
    display: grid;
    gap: 10px;
  }

  .target-stat-body {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
  }

  .target-stat-donut {
    width: 104px;
    height: 104px;
  }

  .target-stat-donut::after {
    inset: 27px;
  }

  .target-stat-row {
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 6px;
    min-height: 32px;
  }

  .target-stat-row strong {
    font-size: 20px;
  }
}

@media (max-width: 1100px) {
  .topbar {
    gap: 16px;
  }

  .board-title {
    font-size: 21px;
  }

  .selector-group {
    height: 40px;
  }

  .selector-item {
    font-size: 14px;
    padding: 0 12px;
    width: 138px;
    min-width: 126px;
  }

  .selector-item.wide {
    width: 220px;
    min-width: 196px;
  }

  .calendar-grid {
    grid-template-columns: minmax(72px, 8%) repeat(31, minmax(7px, 1fr));
    gap: 6px 3px;
    min-width: 0;
  }

  .day-header {
    font-size: 10px;
  }

  .day-cell {
    height: 32px;
  }

  .metrics {
    gap: 18px;
  }

  .metric-card {
    padding: 22px 24px;
  }

  .metric-value {
    font-size: 34px;
  }

  .area-row,
  .station-row {
    grid-template-columns: 72px 1fr;
    row-gap: 16px;
  }

  .inverter-card-head {
    grid-template-columns: minmax(248px, 1fr) minmax(0, 3fr) minmax(38px, auto);
    gap: 12px;
  }

  .device-metric {
    padding: 0 7px;
  }

  .todo-count,
  .device-count {
    text-align: left;
  }

  .drawer {
    width: min(500px, 58vw);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: var(--left-rail-width) minmax(0, 1fr);
  }

  .assistant-panel {
    grid-column: 1 / -1;
  }

  .assistant-panel {
    position: relative;
    height: auto;
    min-height: 620px;
    border-top: 1px solid #e2e8f2;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar: auto;
    --left-rail-width: 86px;
    --left-rail-dark: 36px;
    --diagnose-button-width: 54px;
    --expand-action-size: 38px;
  }

  .rail-profile {
    padding: 22px 0;
  }

  .rail-operator {
    width: 38px;
    height: 38px;
  }

  .operator-avatar {
    width: 24px;
    height: 24px;
  }

  .operator-avatar svg {
    width: 20px;
    height: 20px;
  }

  .operator-status {
    right: 3px;
    bottom: 3px;
    width: 9px;
    height: 9px;
  }

  .topbar {
    min-height: 64px;
    padding: 10px 14px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .board-title {
    font-size: 21px;
  }

  .selector-group {
    order: 3;
    flex-basis: 100%;
    height: 42px;
  }

  .selector-item {
    padding: 0 10px;
    font-size: 14px;
    width: 154px;
    min-width: 142px;
  }

  .selector-item.wide {
    width: 218px;
    min-width: 204px;
  }

  .assistant-panel {
    min-height: 560px;
    padding: 18px 14px;
  }

  .assistant-suggestion {
    padding: 12px;
  }

  .assistant-tools {
    flex-wrap: wrap;
  }

  .page {
    padding-top: 18px;
  }

  .status-board {
    margin: 0 0 20px;
    padding: 22px 14px 22px;
    border-radius: 0;
  }

  .calendar-grid {
    grid-template-columns: minmax(68px, 8%) repeat(31, minmax(7px, 1fr));
    gap: 6px 3px;
    min-width: 0;
  }

  .status-board-head {
    flex-wrap: wrap;
  }

  .status-board-tools {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .data-date-control {
    max-width: 100%;
  }

  .data-date-field {
    padding-left: 10px;
  }

  .data-date-note {
    padding-right: 9px;
  }

  .status-board-head .legend {
    justify-content: flex-start;
  }

  .metrics {
    grid-template-columns: 1fr;
    margin: 0 0 22px;
  }

  .section-head,
  .list {
    margin-left: 0;
    margin-right: 0;
  }

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

  .station-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .area-row,
  .station-row {
    padding: 18px;
  }

  .asset-sequence {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .row-title {
    font-size: 18px;
  }

  .row-meta {
    font-size: 14px;
  }

  .primary-action,
  .ghost-action,
  .danger-action,
  .neutral-action {
    min-height: 46px;
    font-size: 14px;
  }

  .inverter-card {
    padding: 16px 18px;
  }

  .inverter-card-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .inverter-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }

  .device-metric {
    border-left: 0;
    padding: 0;
  }

  .inverter-actions {
    justify-self: start;
  }

  .analysis-button {
    width: 38px;
    min-width: 38px;
  }

  .string-meta {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding: 14px 18px;
  }

  .station-rcd-card,
  .target-stat-card {
    padding: 16px 18px 18px;
  }

  .station-summary-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .station-rcd-body {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 18px;
  }

  .station-rcd-donut,
  .target-stat-donut {
    width: 116px;
    height: 116px;
  }

  .station-rcd-donut::after,
  .target-stat-donut::after {
    inset: 30px;
  }

  .station-rcd-row {
    grid-template-columns: minmax(0, 1fr) 56px 46px;
    gap: 10px;
    min-height: 32px;
  }

  .station-rcd-label {
    gap: 7px;
    font-size: 13px;
  }

  .station-rcd-row strong,
  .station-rcd-row b {
    font-size: 18px;
  }

  .target-stat-head {
    align-items: center;
  }

  .target-stat-body {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 18px;
  }

  .target-stat-row {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .target-stat-row strong {
    font-size: 18px;
  }

  .string-diagnose-button {
    grid-column: auto;
    justify-self: start;
  }

  .strings-panel-head,
  .inverter-pagination {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .drawer {
    width: 100%;
    min-width: 0;
  }

  .detail-grid {
    grid-template-columns: 78px 1fr;
    font-size: 15px;
  }

  .modal-head {
    min-height: 70px;
    padding: 0 22px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-body {
    padding: 24px 22px 22px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .station-rcd-body,
  .target-stat-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .station-rcd-row {
    grid-template-columns: minmax(0, 1fr) 58px 48px;
  }

  .target-stat-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
