:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-soft: #eef3f2;
  --ink: #17201f;
  --muted: #64716e;
  --line: #d9e1df;
  --green: #0f766e;
  --green-dark: #0b5d57;
  --amber: #c47a12;
  --red: #b42318;
  --blue: #2563eb;
  --charcoal: #25302e;
  --shadow: 0 14px 34px rgba(28, 42, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: #17201f;
  color: #f8fbfa;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #2dd4bf;
  color: #112120;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.15;
}

.brand span {
  color: #a9b8b5;
  font-size: 13px;
  margin-top: 3px;
}

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

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #d7e2df;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-note span,
.eyebrow {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-note span {
  color: #a9b8b5;
}

.sidebar-note strong {
  font-size: 15px;
}

.main {
  padding: 26px;
  min-width: 0;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.topbar-actions,
.panel-header,
.segmented {
  display: flex;
  align-items: center;
}

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

.primary-button,
.ghost-button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

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

.ghost-button {
  background: var(--surface);
  color: var(--ink);
}

.filter-band {
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  box-shadow: var(--shadow);
}

.login-panel {
  max-width: 620px;
  margin: 8vh auto 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 22px;
  background: rgba(23, 32, 31, 0.42);
  display: grid;
  place-items: center;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(23, 32, 31, 0.22);
  display: grid;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

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

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 138px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 16px;
}

.metric-card .value {
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.metric-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.delta {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-dark);
  background: #dff7ef;
  font-weight: 700;
}

.delta.warn {
  color: var(--amber);
  background: #fff2d9;
}

.delta.danger {
  color: var(--red);
  background: #ffe4df;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}

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

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

.overview-link-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  text-align: left;
  box-shadow: var(--shadow);
}

.overview-link-card:hover {
  border-color: var(--green);
  background: #f3fbf8;
}

.overview-link-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 800;
}

.overview-link-card strong,
.overview-link-card small {
  display: block;
}

.overview-link-card small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.overview-insights,
.insight-list {
  min-width: 0;
}

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

.insight-row {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fbfdfc;
}

.insight-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.insight-row strong {
  text-align: right;
}

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

.chart-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel {
  padding: 16px;
}

.panel-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header.compact {
  margin-bottom: 10px;
}

.segmented {
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

canvas {
  width: 100%;
  max-width: 100%;
  display: block;
}

.status-bars {
  display: grid;
  gap: 14px;
}

.status-row {
  display: grid;
  gap: 7px;
}

.status-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar-fill.warning {
  background: var(--amber);
}

.bar-fill.critical {
  background: var(--red);
}

.bar-fill.offline {
  background: var(--muted);
}

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

/* CURSOR: only rows that really open something look clickable. */
tbody tr.clickable-row {
  cursor: pointer;
}

tbody tr.clickable-row:hover {
  background: #f8fbfa;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.status-pill.normal {
  color: var(--green-dark);
  background: #dff7ef;
}

.status-pill.warning {
  color: var(--amber);
  background: #fff2d9;
}

.status-pill.critical {
  color: var(--red);
  background: #ffe4df;
}

.status-pill.offline {
  color: #475569;
  background: #e5e7eb;
}

.readings-panel {
  min-width: 0;
}

.gps-button {
  min-width: 82px;
  justify-content: center;
}

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

.reading-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
  display: grid;
  gap: 10px;
}

.reading-card.warning {
  border-color: rgba(196, 122, 18, 0.45);
  background: #fffaf0;
}

.reading-card.critical {
  border-color: rgba(180, 35, 24, 0.45);
  background: #fff7f5;
}

.reading-card.offline {
  background: #f1f3f4;
}

.reading-head,
.reading-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reading-head h3 {
  margin-bottom: 0;
}

.reading-head strong {
  min-width: max-content;
  font-size: 24px;
  line-height: 1.1;
  text-align: right;
}

.reading-meta {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.mini-chart {
  width: 100%;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.range-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.range-controls button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.detail-range button {
  min-width: 92px;
  min-height: 48px;
  padding: 6px 9px;
  display: grid;
  gap: 2px;
  text-align: center;
}

.detail-range button strong,
.detail-range button span {
  display: block;
}

.detail-range button strong {
  color: inherit;
  font-size: 13px;
  line-height: 1.1;
}

.detail-range button span {
  font-size: 11px;
}

.range-controls button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

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

.detail-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.detail-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.detail-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.container-cards {
  display: grid;
  gap: 10px;
}

.container-card {
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
  text-align: left;
}

.container-card.active,
.container-card:hover {
  border-color: var(--green);
  background: #f3fbf8;
}

.card-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.muted {
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.selected-container-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.selected-container-line span,
.selected-container-line strong {
  font: inherit;
  color: inherit;
}

.selected-container-line strong {
  font-weight: 700;
}

.communication-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700 !important;
}

.communication-chip.receiving { background: #e8f7ef; border-color: #75b891; color: #165b35; }
.communication-chip.stopped { background: #fff0ed; border-color: #dc8174; color: #9b261d; }
.communication-chip.waiting { background: #fff8e7; border-color: #cfaa55; color: #6d4b00; }
.communication-chip.neutral { background: #f2f4f7; color: #4a5563; }
.communication-state.stopped { border-top-color: #c63d31; }

.compact-equipment-status {
  margin-bottom: 0;
  justify-content: flex-end;
}

.container-visual {
  min-height: 126px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 32, 31, 0.78), rgba(23, 32, 31, 0.1)),
    repeating-linear-gradient(90deg, #2f3f3c 0 18px, #263532 18px 21px);
  color: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
}

.gps-visual {
  cursor: pointer;
}

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

.detail-tab-body {
  display: grid;
  gap: 16px;
}

.detail-tab-body + .detail-tab-body {
  margin-top: 24px;
}

.tab-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

[hidden] { display: none !important; }

.destination-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.destination-card { color: inherit; text-decoration: none; }
.destination-card:hover { border-color: var(--accent); }
.page-section-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.section-tab { padding: 10px 18px; background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.section-tab.active { background: #e2efe9; border-color: #287159; font-weight: 700; }
.page-tools { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.reading-group { margin: 0 0 24px; }
.container-history { margin: 0 0 28px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.history-heading h2 { margin: 0 0 12px; }
.history-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.history-controls button { border: 1px solid var(--line); background: white; border-radius: 6px; padding: 8px 12px; cursor: pointer; }
.history-controls button[aria-pressed="true"] { background: #e2efe9; border-color: #287159; font-weight: 700; }
.history-picker { margin-top: 14px; }
.history-picker summary { cursor: pointer; font-weight: 600; }
.history-picker > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; padding: 12px 0; }
.history-picker label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.history-picker input { width: auto; }
.history-series { border-top: 1px solid var(--line); padding: 12px 0; }
.history-series h3 { margin: 0; font-size: 14px; }
.history-series svg { width: 100%; display: block; touch-action: pan-y; }
.history-series svg text { fill: var(--muted); font-size: 11px; }
.history-series small { color: var(--muted); }
.history-grid { stroke: #e6ece9; stroke-width: 1; }
.history-average { stroke: currentColor; stroke-width: 1.15; }
.history-extrema { stroke: #6fa79f; stroke-width: 5; opacity: .6; }
.history-point { fill: #0f766e; }
.history-alarm { fill: #b42318; }
.history-cursor { stroke: #425a68; stroke-width: 1; stroke-dasharray: 3 3; }
.history-value, .history-cursor-readout, .history-range { font-size: 12px; min-height: 18px; }
.history-inspect { display: grid; gap: 5px; }
.history-inspect input { width: 100%; }
.history-plots { min-height: 450px; }
.history-status { min-height: 20px; margin: 8px 0; font-size: 12px; color: var(--muted); }
.history-chart-scroll { overflow-x: auto; }
.history-chart-scroll svg { display: block; width: 100%; min-width: 0; height: 375px; touch-action: pan-y; }
.history-chart-scroll svg.history-motion-chart { height: 430px; }
.history-chart-scroll svg text { fill: #425466; font-size: 11px; }
.history-motion-baseline { stroke: #c8d2d8; stroke-width: 1; }
.history-motion-label { font-weight: 700; }
.history-motion-empty { fill: #7b8992 !important; }
.history-motion-gyro { fill: #2d78b7; opacity: .82; }
.history-motion-vibration { fill: #c95d56; }
.history-motion-hit { fill: transparent; cursor: pointer; pointer-events: all; }
[data-motion-event]:focus .history-motion-gyro,
[data-motion-event]:focus .history-motion-vibration { stroke: #102f44; stroke-width: 2; }
.motion-event-detail { margin: 12px 0 0; padding: 14px; border: 1px solid #d9e1e7; border-radius: 8px; background: #f8fafb; }
.motion-event-detail[hidden] { display: none; }
.motion-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.motion-detail-heading div { display: grid; gap: 3px; }
.motion-detail-heading span { color: var(--muted); font-size: 12px; }
.motion-detail-heading button { min-width: 36px; min-height: 36px; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.motion-detail-legend { display: flex; gap: 18px; margin: 8px 0 2px; font-size: 12px; font-weight: 700; }
.motion-event-detail svg { display: block; width: 100%; height: 180px; }
.motion-zero { stroke: #9aa7af; stroke-width: 1; stroke-dasharray: 3 3; }
.motion-x { color: #0072b2; }
.motion-y { color: #d55e00; }
.motion-velocity { color: #c95d56; }
.motion-x path, .motion-y path { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.motion-x circle, .motion-y circle { fill: currentColor; }
.motion-y path { stroke-dasharray: 5 4; }
.motion-velocity path { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.motion-velocity circle { fill: currentColor; }
.history-recovery { fill: #16834a; }
.history-event-key { display: inline-flex; align-items: center; gap: 5px; color: #425466; font-size: 12px; }
.history-alarm-key { color: #b42318; }
.history-recovery-key { color: #16834a; }
.motion-peak { color: #263746; font-size: 14px; }
.history-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 8px; min-height: 30px; }
.history-legend-item { display: inline-flex; align-items: center; gap: 6px; text-align: left; padding: 4px 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; cursor: pointer; }
.history-legend-item[aria-pressed="false"] { opacity: .5; }
.history-motion-key { display: inline-flex; align-items: center; gap: 5px; color: #425466; font-size: 12px; }
.motion-key-gyro { width: 14px; height: 7px; border-radius: 999px; background: #2d78b7; }
.motion-key-vibration { margin-left: 5px; color: #c95d56; font-size: 11px; line-height: 1; }
.history-swatch { display: inline-block; flex: 0 0 18px; width: 18px; height: 2px; background: currentColor; }
.history-line-dashed .history-average { stroke-dasharray: 5 4; }
.history-line-dashed .history-swatch { background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px); }
.history-area-fill { stroke: none; }
.history-area-blue { color: #2d78b7; }
.history-area-blue .history-area-fill { fill: rgba(69, 145, 207, .2); }
.history-area-red { color: #c95d56; }
.history-area-red .history-area-fill { fill: rgba(214, 91, 82, .2); }
.history-area-blue .history-swatch,
.history-area-red .history-swatch { height: 8px; border-bottom: 2px solid currentColor; }
.history-area-blue .history-swatch { background: rgba(69, 145, 207, .2); }
.history-area-red .history-swatch { background: rgba(214, 91, 82, .2); }
.history-value { display: block; }
.history-color-0 { color: #0072b2; }
.history-color-1 { color: #d55e00; }
.history-color-2 { color: #009e73; }
.history-color-3 { color: #8e44ad; }
.history-color-4 { color: #b8860b; }
.history-color-5 { color: #cc3377; }
.history-color-6 { color: #332288; }
.history-color-7 { color: #555555; }
.history-help { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.history-tooltip { position: fixed; z-index: 1000; width: 280px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: hidden; pointer-events: none; padding: 10px 12px; border: 1px solid #d9e1e7; border-radius: 8px; background: rgba(255,255,255,.98); box-shadow: 0 4px 20px #10203026; font-size: 12px; color: #253443; }
.history-tooltip[hidden], .history-cursor.is-hidden { display: none; }
.history-tooltip .history-cursor-readout { margin: 0 0 6px; font-size: 11px; }
.history-tooltip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid #edf0f2; }
.history-tooltip-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.history-tooltip .history-value { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; min-height: 0; margin: 0; }
.history-inspect { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.detail-panel, #containerDetail, .detail-tab-body, .container-history, .history-plots, .history-chart-scroll { min-width: 0; max-width: 100%; }
.detail-tab-body { grid-template-columns: minmax(0, 1fr); }
.history-presets { display: flex; gap: 4px; }
.history-date-range { display: flex; flex-wrap: wrap; gap: 10px; }
.history-date-range label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.history-date-range input { min-width: 0; width: 155px; padding: 7px; }
.history-date-range input[type="datetime-local"] { width: 210px; }
.history-navigation { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 12px; }
.history-navigation button { width: 44px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font-size: 20px; }
.history-navigation span { color: var(--muted); font-size: 11px; }
.reading-group h3 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 15px; }
.reading-group h3 small { color: var(--muted); font-weight: 400; }
.data-tile { overflow-wrap: anywhere; }
.nav-item[aria-current="page"] { border-left: 4px solid #287159; font-weight: 700; }

.data-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.data-tile {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
  display: grid;
  align-content: start;
  gap: 7px;
}

.data-tile strong {
  font-size: 21px;
  line-height: 1.15;
}

.data-tile small {
  color: var(--muted);
  line-height: 1.35;
}

.compact-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 10px;
}

.compact-stat-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.compact-stat-grid span,
.compact-data-table small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-stat-grid strong {
  font-size: 18px;
  line-height: 1.15;
}

.data-source-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f7f5;
  font-size: 12px;
  font-weight: 700;
}

.integration-summary {
  margin-bottom: 16px;
}

.integration-stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.integration-stats strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.integration-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.compact-data-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.compact-data-table > div {
  min-height: 42px;
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.compact-data-table > div:last-child {
  border-bottom: 0;
}

.compact-data-table > div:first-child {
  background: #f8fbfa;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.area-sensor-table > div {
  grid-template-columns: minmax(90px, 0.8fr) minmax(80px, 0.7fr) minmax(70px, 0.7fr) minmax(130px, 0.9fr) minmax(180px, 1.4fr);
}

.unit-settings-table {
  max-width: 640px;
}

.unit-settings-table > div {
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 0.8fr);
}

.unit-data-settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}

.unit-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.split-data-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
}

.split-data-grid h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.mini-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
}

button.mini-metric {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

button.mini-metric:hover,
button.mini-metric.active {
  border-color: var(--green);
  background: #f3fbf8;
}

button.location-metric {
  cursor: pointer;
}

.mini-metric strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
}

.trend-context {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.trend-context span {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.chart-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.chart-caption {
  min-height: 38px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

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

.chart-readout {
  min-height: 42px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 13px;
}

.chart-readout strong {
  color: var(--ink);
  font-size: 16px;
}

.chart-hover-tooltip {
  position: absolute;
  z-index: 3;
  top: 92px;
  transform: translateX(-50%);
  min-width: 104px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 8px;
  padding: 7px 9px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 31, 0.18);
  pointer-events: none;
  font-size: 12px;
}

.chart-hover-tooltip span,
.chart-hover-tooltip strong {
  display: block;
}

.chart-hover-tooltip span {
  color: var(--muted);
}

.chart-hover-tooltip strong {
  margin-top: 2px;
  color: var(--ink);
}

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

.alert-item {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 5px;
  background: #fff;
}

.alert-item.warning {
  border-left-color: var(--amber);
}

.alert-item.critical {
  border-left-color: var(--red);
}

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

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  align-items: start;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfc;
  display: grid;
  gap: 14px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-page-nav {
  grid-column: 1 / -1;
  padding: 10px;
}

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

.admin-subnav button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.admin-subnav button.active,
.admin-subnav button:hover {
  border-color: var(--green);
  background: #f3fbf8;
  color: var(--ink);
}

.admin-hero {
  grid-template-columns: 1fr;
  align-items: center;
}

.admin-summary-card {
  grid-column: 1;
}

.admin-directory-card {
  grid-column: 1 / -1;
}

.admin-create-card {
  grid-column: 2;
  grid-row: auto;
  position: sticky;
  top: 20px;
}

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

.admin-summary-grid div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  align-content: center;
  gap: 4px;
}

.admin-summary-grid strong {
  font-size: 25px;
  line-height: 1;
}

.admin-summary-grid span {
  color: var(--muted);
  font-size: 13px;
}
.warehouse-operation-summary { margin-top: 18px; }

.muted-card {
  background: #f3f5f5;
}

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

.legacy-function-grid div,
.workflow-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.legacy-function-grid strong,
.legacy-function-grid span {
  display: block;
}

.legacy-function-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

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

.admin-form .primary-button,
.admin-form .ghost-button {
  justify-content: center;
}

.admin-card textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.admin-feedback {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}

.admin-feedback.success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.admin-feedback.error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.admin-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table > div {
  display: grid;
  grid-template-columns: 1fr 1fr 92px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.admin-data-table > button,
.admin-data-table > .data-row {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 96px 132px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.admin-data-table > button:hover,
.admin-data-table > button.selected,
.admin-data-table > .data-row:hover,
.admin-data-table > .data-row.selected {
  background: #f3fbf8;
}

.admin-data-table > button.selected,
.admin-data-table > .data-row.selected {
  box-shadow: inset 4px 0 0 var(--green);
}

.admin-data-table > button span,
.admin-data-table > .data-row span {
  min-width: 0;
}

.admin-data-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-table.asset-table > div {
  grid-template-columns: 1.2fr 1fr 1fr 96px 132px;
}

.admin-table.owner-table > div,
.admin-table.user-table > div,
.admin-table.audit-table > div {
  grid-template-columns: 1.2fr 1fr 1fr 96px 132px;
}

.admin-table > div:first-child {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table > div:last-child {
  border-bottom: 0;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-list-head,
.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-toolbar {
  align-items: end;
}

.admin-toolbar label {
  flex: 1 1 320px;
}

.admin-count {
  min-width: 132px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  display: grid;
  align-content: center;
  text-align: right;
}

.admin-count strong,
.admin-count span {
  display: block;
}

.admin-count span {
  color: var(--muted);
  font-size: 12px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.icon-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.icon-action:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.icon-action.good {
  color: var(--green);
}

.icon-action.danger {
  color: var(--red);
}

.row-actions em {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.permission-matrix {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.permission-matrix > div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(3, 76px);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.permission-matrix.seat-matrix > div {
  grid-template-columns: minmax(150px, 1fr) 80px 80px 110px minmax(150px, 1fr) 130px;
}

.permission-matrix > div:first-child {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  text-transform: uppercase;
}

.permission-matrix > div:last-child {
  border-bottom: 0;
}

.permission-matrix span:not(:first-child),
.permission-matrix strong:not(:first-child) {
  text-align: center;
}

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

.workflow-list div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workflow-list span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

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

.access-list label {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
}

.access-list input {
  width: 16px;
  min-height: 16px;
}

.model-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.model-card code {
  display: inline-block;
  margin-bottom: 10px;
  border-radius: 6px;
  padding: 4px 7px;
  background: #e6efed;
  color: var(--green-dark);
}

.model-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px 12px;
  font-size: 13px;
}

.model-grid span:nth-child(odd) {
  color: var(--muted);
  font-weight: 700;
}

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

  .brand div:not(.brand-mark),
  .nav-item span:last-child,
  .sidebar-note {
    display: none;
  }

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

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

  .filter-band,
  .summary-grid,
  .content-grid,
  .reading-grid,
  .overview-link-grid,
  .admin-grid,
  .detail-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary-card,
  .admin-directory-card,
  .admin-create-card {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .admin-create-card {
    position: static;
  }

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

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

  .sidebar {
    position: fixed;
    z-index: 10;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 64px;
    padding: 8px 10px;
    flex-direction: row;
    justify-content: center;
  }

  .brand {
    display: none;
  }

  .nav-list {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .nav-item {
    min-height: 48px;
  }

  .icon {
    width: 32px;
    height: 32px;
  }

  .main {
    padding: 18px 14px 82px;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .primary-button,
  .ghost-button {
    flex: 1;
    justify-content: center;
  }

  h1 {
    font-size: 26px;
  }

  .filter-band,
  .summary-grid,
  .overview-link-grid,
  .content-grid,
  .detail-metrics,
  .detail-toolbar,
  .detail-tabs,
  .data-tile-grid,
  .data-tile-grid.compact,
  .split-data-grid,
  .detail-hero,
  .reading-grid,
  .fleet-chart-grid,
  .admin-grid,
  .admin-hero,
  .admin-summary-grid,
  .legacy-function-grid,
  .admin-form,
  .access-list,
  .metric-model {
    grid-template-columns: 1fr;
  }

  .list-panel {
    display: none;
  }

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

  .panel {
    padding: 14px;
  }

  .panel-header {
    align-items: flex-start;
    display: grid;
  }

  .detail-range {
    width: 100%;
  }

  .detail-range button {
    min-width: 0;
  }

  .trend-context span {
    display: block;
    margin: 5px 0 0;
    padding-left: 0;
    border-left: 0;
  }

  .chart-caption {
    display: grid;
  }

  .chart-readout {
    display: grid;
  }

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

  .admin-summary-card,
  .admin-directory-card,
  .admin-create-card {
    grid-column: 1;
    grid-row: auto;
  }

  .admin-list-head,
  .admin-toolbar {
    display: grid;
  }

  .admin-count {
    text-align: left;
  }

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

  .admin-table > div,
  .admin-data-table > button,
  .admin-data-table > .data-row,
  .admin-table.asset-table > div,
  .admin-table.owner-table > div,
  .admin-table.user-table > div,
  .admin-table.audit-table > div {
    min-width: 760px;
  }

  .permission-matrix {
    overflow-x: auto;
  }

  .permission-matrix > div {
    min-width: 430px;
  }

  .permission-matrix.seat-matrix > div {
    min-width: 760px;
  }
}

@media (max-width: 720px) {
  .main, .view, .detail-layout, .detail-panel, #containerDetail, .filter-band, .filter-band label { min-width: 0; max-width: 100%; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .filter-band select { width: 100%; min-width: 0; text-overflow: ellipsis; font-size: 16px; }
  .detail-tabs { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
  .detail-tabs button { font-size: 12px; padding: 6px 2px; min-height: 44px; overflow-wrap: anywhere; }
  .container-history { padding: 10px; margin-bottom: 16px; }
  .history-heading h2 { font-size: 19px; margin-bottom: 10px; }
  .history-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .history-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .history-controls button { min-width: 0; min-height: 40px; padding: 6px 8px; color: var(--ink); }
  .history-date-range { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
  .history-date-range label { display: grid; grid-template-columns: 36px minmax(0,1fr); }
  .history-date-range input, .history-date-range input[type="datetime-local"] { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; }
  .history-picker label { min-height: 36px; overflow-wrap: anywhere; }
  .history-chart-scroll { width: 100%; overflow: hidden; }
  .history-chart-scroll svg { height: 300px; }
  .history-chart-scroll svg.history-motion-chart { height: 355px; }
  .history-chart-scroll svg text { font-size: 10px; }
  .history-plots { min-height: 390px; }
  .history-legend { gap: 2px 10px; }
  .history-legend-item { font-size: 11px; max-width: 100%; overflow-wrap: anywhere; min-height: 30px; }
  .history-range { font-size: 11px; overflow-wrap: anywhere; }
  .selected-container-line { font-size: 12px; gap: 4px 8px; overflow-wrap: anywhere; }
  .data-tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar { height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* 2026-09-14 local UI review: preserve full data, make scope and controls explicit. */
.preview-notice { grid-column: 1 / -1; border: 1px solid #996a19; border-left-width: 4px; border-radius: 8px; padding: 12px 16px; background: #fff8e7; color: #65470f; font-size: 14px; line-height: 1.6; }
.preview-notice.normal { border-color: var(--green); background: #effaf6; color: var(--green-dark); }
.preview-notice.warning { border-color: var(--amber); background: #fff8e7; color: #65470f; }
.preview-notice.critical { border-color: var(--red); background: #fff1ef; color: #7a271a; }
.preview-notice.neutral { border-color: var(--line); background: #f8faf9; color: var(--muted); }
.latest-readings { min-width: 0; }
.latest-readings > h2 { font-size: 18px; margin: 8px 0 16px; }
.latest-readings .reading-group { margin-bottom: 12px; }
.history-series-label { color: #253443; overflow-wrap: anywhere; }
.history-legend-item[aria-pressed="false"] { opacity: 1; text-decoration: line-through; }
.history-legend-item[aria-pressed="false"] .history-swatch { opacity: .45; }
.history-legend-item { min-height: 44px; padding: 6px; border-radius: 6px; }
.history-picker summary { min-height: 44px; padding: 10px 0; }
.history-picker label { min-height: 44px; }
.history-picker label:has(input:disabled) { color: #595f65; }
.history-four-scales svg { min-width: 660px; }
.history-two-scales svg { min-width: 400px; }
.history-chart-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.history-chart-scroll svg { touch-action: pan-x pan-y; }
.history-navigation { flex-wrap: wrap; }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.history-navigation .history-actions button { width: auto; height: auto; min-height: 44px; padding: 8px 12px; font-size: 14px; }
.container-history.history-expanded .history-chart-scroll svg { min-width: 990px; }
.history-tooltip-close { display: none; }
:where(button, a, input, select, summary, [tabindex]):focus-visible { outline: 3px solid #155e9a; outline-offset: 3px; }
@media (max-width: 720px) {
  .nav-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .nav-item { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 3px 2px; }
  .nav-item span:last-child { display: block; font-size: 11px; line-height: 1.2; }
  .nav-item .icon { height: 22px; width: 26px; font-size: 18px; }
  .topbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .topbar-actions button { width: 100%; min-width: 0; min-height: 44px; white-space: normal; word-break: keep-all; overflow-wrap: normal; }
  .filter-band { grid-template-columns: minmax(0, 1fr); }
  .history-date-range label { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .history-legend { gap: 2px 8px; }
  .history-legend-item { min-height: 44px; font-size: 12px; max-width: 100%; }
  /* In-flow readouts must not retain the desktop tooltip's overlay layer. */
  .history-tooltip { position: relative; z-index: auto; inset: auto; width: 100%; max-width: 100%; max-height: none; overflow: visible; pointer-events: auto; box-shadow: none; margin: 12px 0; padding-top: 16px; }
  .history-tooltip .history-cursor-readout { padding-right: 42px; }
  .history-tooltip-close { display: block; position: absolute; top: 0; right: 0; min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 20px; }
  .history-tooltip-name { min-width: 0; }
  .history-tooltip .history-value { white-space: normal; text-align: right; }
  .history-inspect { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 13px; margin-top: 12px; }
  .history-inspect input { min-height: 44px; }
  .history-controls { gap: 8px; }
  .history-controls button { min-height: 44px; }
  .history-date-range input { min-height: 44px; }
  .history-picker { margin-top: 6px; }
  .history-navigation { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; margin-top: 2px; }
  .history-navigation > span { text-align: center; }
  .history-navigation > button { min-height: 44px; }
  .history-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: 0; gap: 6px; }
  .history-navigation .history-actions button { min-width: 0; padding: 6px; overflow-wrap: anywhere; }
  /* Keep status space stable across refresh; reduce surrounding whitespace. */
  .history-status { margin: 2px 0; }
  .history-range { margin: 2px 0 6px; }
  .history-tooltip, .history-inspect { scroll-margin-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

.home-attention { grid-column: 1 / -1; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; color: #425466; background: white; line-height: 1.6; }
.home-attention.needs-review { border-left: 4px solid #996a19; background: #fff8e7; color: #65470f; }
.home-dashboard { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.home-metric { min-width: 0; min-height: 112px; display: grid; align-content: center; gap: 5px; padding: 18px; background: white; }
.home-metric span, .home-metric small { color: var(--muted); font-size: 13px; }
.home-metric strong { font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; }
.home-movement-note { grid-column: 1 / -1; margin: -8px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .home-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-metric { min-height: 96px; padding: 14px; }
  .home-metric strong { font-size: 24px; }
}

/* Compact content-first reading tiles; no wider-column workaround. */
.reading-group .data-tile { min-width: 0; min-height: 0; padding: 10px; gap: 5px; grid-template-columns: minmax(0, 1fr); }
/* Constrain the inner track as well as the outer tile. Permit CJK punctuation
   to wrap inside compact values instead of hanging beyond the line box. */
.reading-group .data-tile > * { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-break: anywhere; }
.reading-group .data-tile strong { font-size: 18px; line-height: 1.4; }
.reading-group .data-tile .reading-state-label,
.reading-group .data-tile .reading-state-context { display: block; }
.reading-group .data-tile .reading-state-context { font-size: .75em; font-weight: 400; color: var(--muted); }
.location-map-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.history-inspect-options { margin-top: 12px; }
.history-inspect-options summary { cursor: pointer; font-size: 13px; min-height: 44px; display: list-item; align-content: center; }
/* Business inventory, separate from telemetry state and sample management. */
.asset-register { display: grid; gap: 18px; grid-column: 1 / -1; min-width: 0; }
.asset-register .admin-card { min-width: 0; grid-template-columns: minmax(0, 1fr); }
/* The directory is a grid item wrapping scrollable tables. Its automatic
   minimum must not propagate the tables' 660px minimum to the page. */
.asset-register .admin-card > * { min-width: 0; }
.asset-register fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.asset-register .admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.asset-register label, .asset-register input, .asset-register select { min-width: 0; max-width: 100%; }
.asset-register-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.asset-register table { min-width: 660px; width: 100%; }
.asset-register td { overflow-wrap: anywhere; }
.asset-register td small { display: block; }
.asset-register caption { text-align: left; padding: 12px 0; }
.asset-register .table-wrap { margin-top: 14px; }
.asset-register-unlinked-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.asset-register-unlinked-item { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.asset-register-unlinked-item strong, .asset-register-unlinked-item small { display: block; overflow-wrap: anywhere; }
.asset-register-unlinked-badge { color: var(--muted); font-size: 13px; }
.asset-register-unlinked-item .asset-register-actions { align-items: center; flex-wrap: wrap; }

.warehouse-readings-table { min-width: 860px; }
.warehouse-readings-table small { display: block; margin-top: 3px; color: var(--muted); }
.warehouse-group-grid { display: grid; gap: 14px; }
.warehouse-group-grid .detail-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.warehouse-overview-section { margin-top: 18px; }
.warehouse-entity-grid, .warehouse-value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.warehouse-entity-card { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 14px; text-align: left; display: grid; gap: 8px; cursor: pointer; }
.warehouse-entity-card:hover, .warehouse-entity-card.selected { border-color: var(--blue); background: var(--blue-pale); }
.warehouse-entity-card strong { font-size: 15px; }
.warehouse-entity-card small { color: var(--muted); }
.warehouse-equipment-summary { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.warehouse-equipment-summary > div { min-width: 130px; flex: 1 1 130px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 3px; }
.warehouse-equipment-summary > div strong { font-size: 24px; }
.warehouse-equipment-summary > div span { color: var(--muted); }
.warehouse-equipment-summary > button { align-self: center; }
.warehouse-entity-card > span:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.warehouse-card-values { display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
.warehouse-card-values > span { display: flex; justify-content: space-between; gap: 8px; }
.warehouse-card-values strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.warehouse-detail { margin-top: 16px; scroll-margin-top: 16px; }
.warehouse-selected-detail { margin-bottom: 20px; }
.warehouse-room-scopes { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 12px; margin-bottom: 12px; }
.warehouse-room-scopes button { flex: 0 0 auto; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #fff; color: var(--ink); cursor: pointer; }
.warehouse-room-scopes button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-pale); font-weight: 700; }
.warehouse-scope-title { margin: 0 0 12px; font-size: 16px; }
.warehouse-value-grid { margin-bottom: 18px; }
.warehouse-value-card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: #fff; display: grid; gap: 5px; }
.warehouse-value-card span { color: var(--muted); font-size: 13px; }
.warehouse-value-card strong { font-size: 22px; overflow-wrap: anywhere; }
.warehouse-measurement-group + .warehouse-measurement-group { margin-top: 20px; }
.warehouse-measurement-group > h3,
.warehouse-equipment-group > h3 { margin: 0 0 10px; }
.warehouse-equipment-group + .warehouse-equipment-group,
#warehouseLiquidVolume + #equipmentPanel > .warehouse-equipment-group:first-child,
#overviewRooms > .warehouse-entity-grid + .warehouse-equipment-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.warehouse-alarm-list { display: grid; gap: 10px; }
.warehouse-alarm-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 8px; }
.warehouse-alarm-card > div { display: grid; gap: 4px; min-width: 0; }
.warehouse-alarm-card > div span,
.warehouse-alarm-card time { color: var(--muted); }
.warehouse-ingestion { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 8px; background: #fff; }
.warehouse-ingestion.receiving { border-left-color: var(--green); }
.warehouse-ingestion.delayed { border-left-color: var(--amber); }
.warehouse-ingestion.stopped { border-left-color: var(--red); }
.warehouse-ingestion > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.warehouse-ingestion > div span:not(.status-pill) { color: var(--muted); }
@media (max-width: 720px) {
  .warehouse-entity-grid, .warehouse-value-grid { grid-template-columns: minmax(0, 1fr); }
  .warehouse-equipment-summary > button { width: 100%; min-height: 44px; }
  .warehouse-entity-card { min-height: 72px; }
  .warehouse-ingestion, .warehouse-ingestion > div { align-items: flex-start; flex-direction: column; gap: 6px; }
  .warehouse-readings-table { min-width: 0; }
  .warehouse-readings-table thead { display: none; }
  .warehouse-readings-table tbody, .warehouse-readings-table tr, .warehouse-readings-table td { display: block; width: 100%; }
  .warehouse-readings-table tr { cursor: default; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  .warehouse-readings-table td { display: grid; grid-template-columns: minmax(92px, .7fr) minmax(0, 1.3fr); gap: 10px; padding: 8px 0; overflow-wrap: anywhere; }
  .warehouse-readings-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  .warehouse-readings-table td:last-child { border-bottom: 0; }
}
.customer-login { width: min(440px, calc(100% - 32px)); margin: 48px auto; }
.customer-login form { display: grid; gap: 12px; }
.customer-login input { width: 100%; min-width: 0; }
.customer-login #loginSession { display: grid; gap: 16px; }
.customer-login [hidden] { display: none !important; }
.customer-login .panel-header { flex-wrap: wrap; gap: 12px; }
.maintenance-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.communication-readings > .maintenance-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.maintenance-section h3 { margin: 0 0 10px; }
.maintenance-section p { margin: 6px 0 12px; }
.maintenance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.maintenance-entry { min-width: 0; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.maintenance-entry span, .maintenance-report small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.maintenance-entry strong, .maintenance-report strong { font-size: 14px; overflow-wrap: anywhere; }
.maintenance-reports { display: grid; gap: 8px; margin: 0; padding-left: 24px; }
.maintenance-report { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.maintenance-report time, .maintenance-report strong, .maintenance-report small { display: block; }

/* Warehouse monitoring uses three content sizes. The page title is the only
   intentional exception. */
.warehouse-page .main,
.warehouse-page .main button,
.warehouse-page .main input,
.warehouse-page .main select,
.warehouse-page .main label,
.warehouse-page .main p,
.warehouse-page .main span,
.warehouse-page .main strong,
.warehouse-page .main small,
.warehouse-page .main summary,
.warehouse-page .main time { font-size: 16px; }
.warehouse-page .main h1 { font-size: 32px; }
.warehouse-page .main h2,
.warehouse-page .main h3,
.warehouse-page .main .metric-card .value,
.warehouse-page .main .warehouse-equipment-summary > div strong { font-size: 22px; }
.warehouse-page .main .eyebrow,
.warehouse-page .main .meta,
.warehouse-page .main small,
.warehouse-page .main .history-help,
.warehouse-page .main .history-status,
.warehouse-page .main .history-range,
.warehouse-page .main .history-legend-item,
.warehouse-page .main .history-tooltip,
.warehouse-page .main .history-tooltip *,
.warehouse-page .main .warehouse-card-values,
.warehouse-page .main .warehouse-card-values *,
.warehouse-page .main .warehouse-value-card > span { font-size: 13px; }
/* Tile numbers: one size (18px, regular weight) on every warehouse tile, clickable or not; labels stay 13px. */
.warehouse-page .main .warehouse-value-card strong,
.warehouse-page .main .warehouse-card-values strong { font-size: 18px; font-weight: 400; }
.warehouse-page .main .warehouse-card-values strong { white-space: normal; overflow-wrap: anywhere; }
.warehouse-page .main .warehouse-card-values > span > strong { text-align: right; }
.warehouse-page .main .history-chart-scroll svg text { font-size: 13px; }

/* Warehouse power usage bars: square legend swatch (bars, not lines). */
.history-swatch.history-swatch-bar { width: 12px; flex-basis: 12px; height: 12px; border-radius: 2px; }
/* Power usage readout: keep each item (e.g. 大冷蔵庫 52.9 kWh) on one line; same size as the status text. */
.warehouse-page .main .energy-readout-item { white-space: nowrap; font-size: inherit; }
/* 設備電力: two tiles per row (one meter per row: kW | 30-day kWh), same tile/gap as the other equipment; one column on phones. */
.warehouse-value-grid.warehouse-value-grid-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .warehouse-value-grid.warehouse-value-grid-pairs { grid-template-columns: minmax(0, 1fr); } }

/* 2026-10-22 UI cleanup mockup (Dan). Numbers = items in the review list. */
/* [2] Header: icon buttons with tooltips/aria-labels; text kept for screen readers only. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 10px; }
.icon-button .button-icon { width: 22px; height: 22px; display: block; }
.icon-button:hover { border-color: var(--blue); background: var(--blue-pale); }
.topbar-icon-actions { display: flex; flex-wrap: nowrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 720px) {
  .topbar:has(.topbar-icon-actions) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .topbar-icon-actions { display: flex; grid-template-columns: none; }
  .topbar-icon-actions button.icon-button { flex: 0 0 44px; width: 44px; }
}

/* [11] Clickable cards: raised + chevron + hover; static tiles stay flat (like the value tiles). */
.warehouse-entity-card { position: relative; padding-right: 34px; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.card-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; line-height: 1; }
.warehouse-page .main .card-chevron { font-size: 22px; }
.warehouse-entity-card:hover .card-chevron { color: var(--blue); }
.warehouse-entity-card.warehouse-static-card { cursor: default; box-shadow: none; padding-right: 14px; background: #fff; }
.warehouse-entity-card.warehouse-static-card:hover { border-color: var(--line); background: #fff; }
.warehouse-static-card .warehouse-state-value.on { color: var(--green-dark); }
.warehouse-static-card .warehouse-state-value.off { color: var(--muted); }
/* [3] Alarm history on phones: one card per event, with 発生/解除 date-time on every row. */
@media (max-width: 720px) {
  .warehouse-alarm-history { min-width: 0; width: 100%; }
  .warehouse-alarm-history thead { display: none; }
  .warehouse-alarm-history tbody, .warehouse-alarm-history tr, .warehouse-alarm-history td { display: block; width: 100%; }
  .warehouse-alarm-history tr { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; background: #fff; }
  .warehouse-alarm-history td { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 0; overflow-wrap: anywhere; }
  .warehouse-alarm-history td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 700; }
}
/* [6] Date pickers: never wider than the card (iOS date inputs keep an intrinsic width otherwise). */
@media (max-width: 720px) {
  .history-date-range input { box-sizing: border-box; display: block; -webkit-appearance: none; appearance: none; min-width: 0; }
}
/* [5] A hidden page eyebrow stays hidden (.eyebrow sets display). */
.eyebrow[hidden] { display: none; }

/* SERIES PICKER (container): grouped list, colour swatch per selected item, no inner scroll. */
.history-picker-group { border: 0; margin: 10px 0 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 12px; }
.history-picker-group > legend { grid-column: 1 / -1; padding: 0; margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.history-picker-group label { min-width: 0; overflow-wrap: anywhere; cursor: pointer; }
.history-picker-swatch { flex: 0 0 18px; opacity: 1; }
.history-picker-swatch:not([class*="history-color-"]) { background: transparent; }
.history-picker > .history-picker-footer { display: flex; padding: 0; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: flex-end; margin: 10px 0 4px; }
.history-picker-footer button { width: auto; flex: 0 0 auto; border: 1px solid var(--line); background: white; border-radius: 6px; padding: 8px 12px; min-height: 44px; cursor: pointer; color: var(--ink); }
.history-limit-note { margin: 0 auto 0 0; font-size: 13px; color: var(--amber, #8a5a00); font-weight: 600; }
@media (max-width: 720px) { .history-picker-group { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; } .history-picker-group label { font-size: 13px; gap: 6px; } }
/* EQUIPMENT TILES: max 4 per row on desktop, 2 on the phone; tiles never stretch to full width. */
.warehouse-value-grid.warehouse-value-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 4px; }
.warehouse-value-grid.warehouse-value-tiles.warehouse-value-grid-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.warehouse-state-tile { cursor: default; }
.warehouse-state-tile .warehouse-state-value.on { color: var(--green-dark); }
.warehouse-state-tile .warehouse-state-value.off { color: var(--muted); }
@media (max-width: 720px) {
  .warehouse-value-grid.warehouse-value-tiles, .warehouse-value-grid.warehouse-value-tiles.warehouse-value-grid-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .warehouse-value-tiles .warehouse-value-card { padding: 10px 12px; }
}

/* Hold then drag within a graph to inspect points on touch screens. */
.history-chart-scroll svg { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.history-legend-item[data-history-event][aria-pressed="false"] { opacity: .4; }

/* 総液量: tiles and graph reuse the standard entity cards and 履歴グラフ card. */
#warehouseLiquidVolume [hidden] { display: none !important; }

/* v9: admin pages in the left navigation, clear read-only fields, on-page confirmation. */
.nav-list > .nav-item:not(.nav-admin) + .nav-item.nav-admin:not([hidden]) { margin-top: 14px; position: relative; }
.nav-list > .nav-item:not(.nav-admin) + .nav-item.nav-admin:not([hidden])::before { content: ""; position: absolute; left: 8px; right: 8px; top: -8px; border-top: 1px solid rgba(255,255,255,.18); }
.asset-register-form input[readonly], .asset-register-form select:disabled, .asset-register select:disabled {
  background: #eef1f3; color: #4b5560; border-style: dashed; cursor: not-allowed; }
.asset-lock-note { margin: 10px 0 0; }
.inline-confirm { margin-top: 12px; padding: 12px 14px; border: 1px solid #996a19; border-left-width: 4px; border-radius: 8px; background: #fff8e7; color: #3d2b08; }
.inline-confirm p { margin: 0; line-height: 1.6; }
.inline-confirm .asset-register-actions { margin-top: 10px; }
.inline-confirm button { min-height: 44px; }
td .inline-confirm { min-width: 220px; }
[data-asset-feedback] .admin-feedback { margin-top: 12px; }
@media (max-width: 720px) {
  .nav-list { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; grid-auto-columns: minmax(60px, 1fr); }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-list > .nav-item:not(.nav-admin) + .nav-item.nav-admin:not([hidden]) { margin-top: 0; }
  .nav-list > .nav-item:not(.nav-admin) + .nav-item.nav-admin:not([hidden])::before { left: -4px; right: auto; top: 8px; bottom: 8px; border-top: 0; border-left: 1px solid rgba(255,255,255,.25); }
}

/* v10: tap-friendly single-choice buttons instead of native <select> pickers (admin pages). */
.choice-field { display: grid; gap: 6px; min-width: 0; }
.choice-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.segmented.choice-group { flex-wrap: wrap; align-items: stretch; gap: 6px; padding: 4px; }
.segmented.choice-group button { min-height: 44px; padding: 8px 14px; font-size: 15px; line-height: 1.35; text-align: left;
  color: var(--ink); background: transparent; border: 1px solid transparent; cursor: pointer; touch-action: manipulation; }
.segmented.choice-group button.active { background: #ffffff; border-color: #287159; color: #1f5a46; font-weight: 700; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08); }
.segmented.choice-group button.active::before { content: "✓ "; }
.segmented.choice-group button:disabled { cursor: not-allowed; color: #7a8590; }
.segmented.choice-group button.active:disabled { color: #4b5560; border-style: dashed; border-color: #8a949e; }
.segmented.choice-list { flex-direction: column; }
.segmented.choice-list button { width: 100%; }
.admin-form .choice-field { grid-column: 1 / -1; }

/* v12: role model — multi-select asset picker (全資産 first), allowance line, view-only lists. */
.segmented.choice-multi button::before { content: "☐ "; }
.segmented.choice-multi button.active::before { content: "☑ "; }
.segmented.choice-multi button.choice-all { font-weight: 700; border-bottom: 2px solid #c9d3cf; }
.segmented.choice-multi button:disabled:not(.choice-all) { opacity: 0.55; }
.quota-line { display: grid; gap: 2px; margin: 6px 0 0; }
.quota-line small { color: #8a4b0f; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* v13: Dan's user actions — delete is visually distinct but not loud. */
.ghost-button.danger-button { color: #b42318; border-color: rgba(180, 35, 24, .35); }
.ghost-button.danger-button:hover:not(:disabled) { background: rgba(180, 35, 24, .08); }

/* v14 備考 (Dan only): full-width field, wrapped text in the users list; text size unchanged. */
.admin-note-field { grid-column: 1 / -1; }
.admin-note-cell { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 8rem; }
