:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #172033;
  background: #eef3f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #172033;
  --muted: #667085;
  --line: #d8e1ea;
  --panel: #ffffff;
  --panel-strong: #f8fafc;
  --blue: #0069a8;
  --cyan: #0588a8;
  --teal: #138a72;
  --green: #15803d;
  --amber: #bd8b00;
  --yellow: #f2d72f;
  --red: #dc2626;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #eef3f6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.glyph {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.45em;
  height: 1.45em;
  place-items: center;
  font-weight: 800;
  line-height: 1;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  color: #e5edf6;
  background: #102b3c;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 0;
}

.brand span,
.domain-card span {
  display: block;
  color: #a8b7cc;
  font-size: 13px;
  line-height: 1.5;
}

.brand > div:last-child span {
  color: #f2d72f;
  font-size: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid #f2d72f;
  border-radius: 8px;
  color: #0069a8;
  background: #ffffff;
  box-shadow: 7px 7px 0 #f2d72f;
  font-size: 22px;
  font-weight: 900;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(242, 215, 47, 0.4);
  color: #ffffff;
  background: rgba(0, 105, 168, 0.42);
}

.domain-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.domain-card strong {
  display: block;
  margin: 6px 0;
  color: #ffffff;
  font-size: 16px;
  word-break: break-word;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

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

.topbar h1 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

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

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.status-pill,
.device-badge,
.result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.ready {
  color: #065f46;
  background: #dcfce7;
}

.status-pill.pending {
  color: #594a00;
  background: #fff8c5;
}

.source-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border-left: 4px solid var(--yellow);
  color: #314158;
  background: #ffffff;
}

.source-banner small {
  color: var(--muted);
  white-space: nowrap;
}

.source-banner.error {
  border-color: var(--red);
  color: #991b1b;
  background: #fff7f7;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 136px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card::before {
  width: 4px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--yellow);
  content: "";
}

.metric-card > div {
  margin-right: auto;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.metric-card.green .glyph {
  color: var(--green);
}

.metric-card.amber .glyph {
  color: var(--amber);
}

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

.metric-card.cyan .glyph {
  color: var(--cyan);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.38fr) minmax(300px, 0.84fr);
  gap: 16px;
  align-items: start;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.device-panel,
.detail-panel,
.control-panel,
.alerts-panel {
  padding: 18px;
}

.right-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-heading.compact {
  align-items: center;
  margin: 8px 0 12px;
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.panel-heading h3 {
  font-size: 18px;
}

.panel-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.device-panel .panel-heading {
  align-items: stretch;
  flex-direction: column;
}

.device-panel .search-box {
  width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
}

.device-list {
  display: grid;
  gap: 8px;
}

.device-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.device-row.selected {
  border-left: 4px solid var(--blue);
  background: #eef8fd;
}

.device-row strong,
.device-row small {
  display: block;
}

.device-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.status-dot.online,
.device-badge.online {
  color: #065f46;
  background: #dcfce7;
}

.status-dot.warning,
.device-badge.warning {
  color: #92400e;
  background: #fef3c7;
}

.status-dot.offline,
.device-badge.offline {
  color: #991b1b;
  background: #fee2e2;
}

.status-dot.unknown,
.device-badge.unknown {
  color: #475569;
  background: #e2e8f0;
}

.status-dot.unknown {
  background: #94a3b8;
}

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

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

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

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-header h2 {
  margin: 4px 0;
  font-size: 28px;
}

.detail-header span {
  color: var(--muted);
  font-size: 14px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.telemetry-tile {
  display: grid;
  gap: 6px;
  min-height: 106px;
  padding: 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.telemetry-tile:last-child {
  border-right: 0;
}

.telemetry-tile .glyph {
  color: var(--cyan);
}

.telemetry-tile.alert {
  border-color: rgba(189, 139, 0, 0.45);
  background: #fffbeb;
}

.telemetry-tile span {
  color: var(--muted);
  font-size: 14px;
}

.telemetry-tile strong {
  font-size: 20px;
}

.telemetry-tile:last-child strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.chart-panel {
  padding-top: 2px;
}

.sync-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.trend-chart {
  display: block;
  width: 100%;
  min-height: 220px;
}

.chart-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #f7fafc;
}

.chart-empty strong {
  color: var(--ink);
}

.chart-empty span {
  max-width: 460px;
  line-height: 1.6;
}

.chart-legend text {
  fill: #475569;
  font-size: 13px;
}

.control-panel {
  display: grid;
  gap: 16px;
}

.lock-indicator {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 100%;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 180ms ease;
}

.switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  content: "";
  transition: transform 180ms ease;
}

.switch input:checked + span {
  background: var(--teal);
}

.switch input:checked + span::after {
  transform: translateX(22px);
}

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

.command-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
}

.command-button.success {
  background: var(--green);
}

.command-button.danger {
  background: var(--red);
}

.command-button.warning {
  background: var(--amber);
}

.command-button.neutral,
.primary-button {
  background: var(--blue);
}

.range-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.range-control span {
  color: var(--muted);
}

.range-control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--teal);
}

.alert-list {
  display: grid;
  gap: 10px;
}

.alert-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-left: 4px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.alert-item strong,
.alert-item span {
  display: block;
}

.alert-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.alert-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.alert-item.level-高,
.alert-item.severity-high {
  border-left-color: var(--red);
}

.alert-item.level-中,
.alert-item.severity-medium {
  border-left-color: var(--amber);
}

.alert-item.level-低 {
  border-left-color: var(--cyan);
}

.history-section,
.settings-section {
  margin-top: 16px;
  padding: 18px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.result {
  min-height: 28px;
  padding: 0 10px;
  font-size: 13px;
}

.result-成功,
.result-本地记录 {
  color: #065f46;
  background: #dcfce7;
}

.result-发送中 {
  color: #1d4ed8;
  background: #dbeafe;
}

.result-失败 {
  color: #991b1b;
  background: #fee2e2;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #ffffff;
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  grid-column: 1 / -1;
}

.settings-actions span {
  color: var(--muted);
  font-size: 14px;
}

.mapping-grid {
  display: grid;
}

.mapping-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.mapping-row code {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.mapping-row strong,
.mapping-row span {
  display: block;
}

.mapping-row div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mapping-state {
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  color: #14532d;
  background: #f0fdf4;
}

.empty-row {
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  color: #064e3b;
  background: #ccfbf1;
  box-shadow: var(--shadow);
}

.topbar-language-select,
.login-language-select,
.settings-language-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topbar-language-select select,
.login-language-select select,
.settings-language-select select {
  min-height: 38px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.device-focus-grid {
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.6fr);
}

.remote-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(320px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.alerts-page .alerts-panel {
  min-height: 420px;
}

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

.setting-block {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 148px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.setting-block > span,
.setting-block small {
  color: var(--muted);
  font-size: 13px;
}

.setting-block strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
}

.language-setting .settings-language-select {
  justify-content: flex-start;
}

.language-setting .settings-language-select > span {
  display: none;
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  gap: 28px;
  background: #102b3c;
}

.brand-dark {
  color: #ffffff;
}

.brand-dark > div:last-child span {
  color: var(--yellow);
}

.loading-line {
  width: 210px;
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.loading-line span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--yellow);
  animation: loading-slide 1.1s ease-in-out infinite alternate;
}

@keyframes loading-slide {
  from { transform: translateX(0); }
  to { transform: translateX(138px); }
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
  min-height: 100vh;
  background: #ffffff;
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 46px;
  color: #ffffff;
  background: #102b3c;
}

.login-brand-copy {
  max-width: 640px;
  padding: 72px 0;
}

.login-brand-copy p {
  margin: 0 0 18px;
  color: #b8c7d6;
  font-size: 15px;
  font-weight: 700;
}

.login-brand-copy h1 {
  margin: 0 0 20px;
  max-width: 640px;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-brand-copy > span {
  color: var(--yellow);
  font-size: 18px;
  font-weight: 800;
}

.login-band {
  display: grid;
  gap: 8px;
  width: 100%;
}

.login-band span:first-child {
  width: 76%;
  height: 10px;
  margin-left: auto;
  background: #0069a8;
}

.login-band span:last-child {
  width: 100%;
  height: 5px;
  background: var(--yellow);
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 34px 56px;
}

.login-toolbar {
  display: flex;
  justify-content: flex-end;
}

.login-form {
  display: grid;
  align-content: center;
  width: min(100%, 460px);
  min-height: calc(100vh - 106px);
  margin: 0 auto;
}

.login-form h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-subtitle {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.6;
}

.login-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  outline: 0;
  background: #ffffff;
}

.login-field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(5, 136, 168, 0.12);
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.login-error {
  margin: -2px 0 12px;
  padding: 11px 12px;
  border-left: 4px solid var(--red);
  color: #991b1b;
  background: #fef2f2;
  font-size: 14px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.security-note .glyph {
  color: var(--green);
}

html[dir="rtl"] .nav-item,
html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] .device-row {
  text-align: right;
}

html[dir="rtl"] .device-row.selected {
  border-right: 4px solid var(--blue);
  border-left: 0;
}

html[dir="rtl"] .source-banner,
html[dir="rtl"] .privacy-note,
html[dir="rtl"] .login-error {
  border-right: 4px solid var(--yellow);
  border-left: 0;
}

html[dir="rtl"] .source-banner.error,
html[dir="rtl"] .login-error {
  border-right-color: var(--red);
}

html[dir="rtl"] .privacy-note {
  border-right-color: var(--green);
}

html[dir="rtl"] .alert-item {
  border-right: 4px solid var(--line);
  border-left: 0;
}

html[dir="rtl"] .alert-item.severity-high {
  border-right-color: var(--red);
}

html[dir="rtl"] .alert-item.severity-medium {
  border-right-color: var(--amber);
}

html[dir="rtl"] .login-band span:first-child {
  margin-right: auto;
  margin-left: 0;
}

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

  .sidebar {
    align-items: center;
    padding: 22px 12px;
  }

  .brand div:last-child,
  .nav-item span,
  .domain-card {
    display: none;
  }

  .nav-item {
    justify-content: center;
    width: 46px;
    padding: 0;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

  .alerts-panel {
    grid-column: auto;
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .telemetry-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device-focus-grid {
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  }

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

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    padding: 12px;
  }

  .brand {
    margin-bottom: 10px;
  }

  .brand div:last-child {
    display: block;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(6, minmax(44px, 1fr));
    gap: 6px;
  }

  .nav-item {
    flex-direction: column;
    gap: 3px;
    width: 100%;
    min-height: 54px;
    font-size: 12px;
  }

  .nav-item span {
    display: inline;
  }

  .workspace {
    padding: 18px 14px 26px;
  }

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

  .topbar h1 {
    font-size: 28px;
  }

  .source-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-banner small {
    white-space: normal;
  }

  .summary-grid,
  .main-grid,
  .telemetry-grid,
  .settings-grid,
  .remote-layout,
  .settings-summary-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .mapping-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .telemetry-tile {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panel-heading,
  .detail-header {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .trend-chart {
    min-height: 170px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-language-select > span {
    display: none;
  }

  .logout-button span {
    display: none;
  }

  .login-shell {
    display: block;
  }

  .login-brand-panel {
    min-height: 240px;
    padding: 20px;
  }

  .login-brand-copy {
    padding: 30px 0 20px;
  }

  .login-brand-copy h1 {
    font-size: 30px;
  }

  .login-form-panel {
    padding: 22px 20px 34px;
  }

  .login-form {
    min-height: auto;
    padding: 26px 0 10px;
  }

  .login-form h2 {
    font-size: 28px;
  }

  .login-subtitle {
    margin-bottom: 20px;
  }

  .login-field {
    margin-bottom: 12px;
  }

  .login-field input {
    min-height: 44px;
  }

  .security-note {
    margin-top: 12px;
  }
}
