@font-face {
  font-family: Plex;
  src: url("/plex-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("/plex-semibold.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
:root {
  --ink: #e7eeec;
  --muted: #a8b5b0;
  --brand: #74c6a7;
  --brand-dark: #91d7bc;
  --wash: #101416;
  --line: #303a3e;
  --rail: #0c1012;
  --surface: #181e21;
  --amber: #e4bd78;
  --danger: #f19b9b;
  --radius: 12px;
  font:
    15px/1.5 Plex,
    sans-serif;
  color: var(--ink);
  background: var(--wash);
  font-synthesis: none;
  color-scheme: dark;
  accent-color: var(--brand);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
input,
select,
textarea {
  caret-color: var(--brand);
}
button {
  color: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #74c6a7;
}
::selection {
  background: #355f4d;
  color: #0c1012;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #46554e var(--wash);
}
[hidden] {
  display: none !important;
}
a {
  color: var(--brand);
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.015em;
  font-weight: 600;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
p {
  color: var(--muted);
}
svg.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--rail);
  color: #d4dfd9;
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 18px;
  z-index: 30;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
  letter-spacing: -0.035em;
  font-weight: 600;
  padding: 0 8px;
}
.brand-mark {
  width: 36px;
  height: 39px;
  border-radius: 10px;
  background: #80c5ad;
  color: var(--rail);
  font-size: 35px;
  font-weight: 600;
  font-style: italic;
  display: grid;
  place-content: center;
  line-height: 1;
}
.brand-sub {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #a8b5b0;
  margin-top: 1px;
}
.workspace-name {
  font-size: 11px;
  color: #a8b5b0;
  border-bottom: 1px solid #2b3538;
  padding: 30px 9px 22px;
}
.connection-dot,
.status-dot,
.sim-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #80c5ad;
  margin-right: 8px;
  vertical-align: middle;
}
.sidebar nav {
  padding-top: 21px;
  display: grid;
  gap: 5px;
}
.nav-link {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 7px;
  color: #bac8c1;
  text-decoration: none;
  font-size: 14px;
}
.nav-link:hover {
  background: #1b2526;
  color: var(--ink);
}
.nav-link.active {
  background: #25372f;
  color: var(--ink);
}
.nav-link.active svg {
  color: #a6dfc6;
}
.nav-tag {
  margin-left: auto;
  font-size: 11px;
  border: 1px solid #657a6f;
  border-radius: 4px;
  padding: 0 4px;
  color: #c3d3cc;
}
.nav-rule {
  height: 1px;
  background: #2b3538;
  margin: 17px 12px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 60px;
}
.simulation-note {
  padding: 15px 12px;
  border: 1px solid #303a3e;
  border-radius: 9px;
  margin-bottom: 20px;
  font-size: 11px;
}
.simulation-note strong {
  font-size: 11px;
  color: #d6e7dd;
  font-weight: 600;
}
.simulation-note p {
  color: #a8b5b0;
  margin: 7px 0 0 14px;
  font-size: 11px;
  line-height: 1.6;
}
.sim-dot {
  background: #e4bd78;
  width: 5px;
  height: 5px;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 19px;
  border-top: 1px solid #2b3538;
}
.avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: #2b4035;
  color: #d2e7d9;
  border-radius: 50%;
  font-size: 11px;
}
.user-block strong {
  display: block;
  font-size: 12px;
  color: #e1ebe5;
}
.user-block div {
  min-width: 0;
  flex: 1;
}
.user-block div > span {
  display: block;
  font-size: 11px;
  color: #a8b5b0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-block .icon-button {
  color: #bcd2c5;
  width: 28px;
  min-width: 28px;
}
.main-shell {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  gap: 16px;
}
.site-picker {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.site-picker svg {
  color: var(--brand);
}
select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 30px 8px 12px;
  background: var(--surface);
  color: var(--ink);
  max-width: 100%;
}
.site-picker select {
  border: 0;
  font-weight: 600;
  font-size: 13px;
  padding-left: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  white-space: nowrap;
}
.topbar-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  padding: 4px 8px;
  white-space: nowrap;
}
.amber {
  background: #332b1e;
  color: var(--amber);
}
.green {
  background: #203b2f;
  color: #9cdbb9;
}
.gray {
  background: #293136;
  color: #bcc9c1;
}
.red {
  background: #402727;
  color: #f0b0b0;
}
.status-dot {
  margin-right: 5px;
  background: #74c6a7;
  width: 5px;
  height: 5px;
}
.offline .status-dot {
  background: #e4bd78;
}
.offline {
  color: #e4bd78;
}
#main {
  width: 100%;
  max-width: 1550px;
  margin: 0 auto;
  padding: 34px 38px 30px;
  flex: 1;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}
.page-head p {
  font-size: 12px;
  margin-top: 8px;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.manual-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.manual-label svg {
  width: 15px;
  height: 15px;
}
.button,
.primary,
.secondary,
.text-button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  padding: 9px 14px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
}
.primary {
  background: var(--brand);
  color: #102019;
  border-color: var(--brand);
}
.primary:hover {
  background: var(--brand-dark);
}
.secondary:hover,
.button:hover {
  background: #283531;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 7px 0;
}
.text-button:hover {
  text-decoration: underline;
}
.icon-button {
  background: transparent;
  border: 0;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 36px;
  min-width: 34px;
  border-radius: 7px;
}
.icon-button:hover {
  background: #465f4c40;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.section-title h2 {
  font-size: 13px;
  letter-spacing: 0;
}
.section-title small {
  color: var(--muted);
  font-size: 11px;
}
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.equipment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
}
.equipment-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.equipment-card-head svg {
  width: 21px;
  height: 21px;
  color: var(--muted);
}
.equipment-card-head h3 {
  font-size: 13px;
}
.equipment-card-head .detail-link {
  margin-left: auto;
  color: #a8b5b0;
}
.detail-link svg {
  width: 15px;
  height: 15px;
}
.equipment-meta {
  margin: 4px 0 22px 31px;
  color: var(--muted);
  font-size: 11px;
}
.equipment-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.state-text {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.state-text::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a8b5b0;
}
.equipment-card[data-on="true"] .state-text {
  color: var(--brand);
}
.equipment-card[data-on="true"] .state-text::before {
  background: var(--brand);
}
.switch {
  border: 0;
  background: #50605b;
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 30px;
  flex-shrink: 0;
  position: relative;
  transition: background 0.18s ease-out;
}
.switch::after {
  content: "";
  display: block;
  background: #edf5f0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 2px 3px #00000040;
  transition: transform 0.18s ease-out;
}
.switch[aria-checked="true"] {
  background: var(--brand);
}
.switch[aria-checked="true"]::after {
  transform: translateX(18px);
}
.equipment-foot {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  border-top: 1px solid #303a3e;
  padding-top: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.equipment-foot svg {
  width: 12px;
  height: 12px;
}
.temperature-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
}
.panel-heading h2 {
  font-size: 16px;
}
.panel-heading p {
  font-size: 11px;
  margin-top: 3px;
}
.range-buttons,
.segmented {
  display: flex;
  background: #111719;
  padding: 3px;
  border: 1px solid #303a3e;
  border-radius: 7px;
}
.range-buttons button,
.segmented button {
  border: 0;
  background: none;
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 600;
  min-height: 29px;
}
.range-buttons button.active,
.segmented button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 2px 4px #00000020;
}

.chart-area {
  min-width: 0;
  padding: 0 12px 0 9px;
  position: relative;
}
.chart-toolbar {
  padding: 2px 13px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chart-toolbar select {
  font-size: 11px;
  padding: 6px 22px 6px 9px;
}
.chart-toolbar .segmented {
  background: var(--surface);
  padding: 0;
  border: 0;
}
.chart-toolbar .segmented button {
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
}
.chart-toolbar .segmented button.active {
  background: #253c31;
  box-shadow: none;
}
.segmented svg {
  width: 13px;
  height: 13px;
}
.chart-wrapper {
  position: relative;
  min-height: 320px;
}
.plot {
  height: 320px;
  width: 100%;
}
.chart-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.chart-readout {
  font-size: 11px;
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  margin: 2px 14px 10px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #1f2a26;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
  color: #bfd6c9;
}
.chart-readout strong {
  color: var(--ink);
}
.inspect-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 12px;
  font-size: 11px;
  color: var(--muted);
}
.inspect-slider input {
  flex: 1;
  min-width: 0;
  height: 18px;
}

.sensor-reading {
  padding: 13px 0;
  border-bottom: 1px solid #303a3e;
}
.sensor-reading:last-of-type {
  border: 0;
}
.sensor-name {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.series-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--series, #74c6a7);
  display: inline-block;
  flex-shrink: 0;
}
.sensor-value {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 4px 0 3px;
}
.sensor-value small {
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.sensor-reading > small {
  font-size: 11px;
  color: var(--muted);
}
.chart-foot {
  padding: 12px 23px;
  background: #151b1d;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.chart-foot svg {
  width: 13px;
  height: 13px;
  margin-right: 5px;
}

.activity-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 23px;
}
.activity-panel .section-title {
  margin-bottom: 4px;
}
.activity-panel .section-title h2 {
  font-size: 14px;
}
.event {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid #303a3e;
  font-size: 11px;
}
.event:last-child {
  border: 0;
}
.event > svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.event-main {
  flex: 1;
}
.event-main small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.event-time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.empty {
  padding: 32px 14px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.empty svg {
  display: block;
  margin: 0 auto 10px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  color: #a8b5b0;
  font-size: 11px;
  padding: 17px 38px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.notice {
  padding: 13px 16px;
  border: 1px solid #6b5632;
  background: #30291e;
  color: #ebca90;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notice svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.notice.info {
  background: #1e322a;
  color: #b2d9c3;
  border-color: #3c5f4e;
}
.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 22px;
}
.content-panel > p {
  font-size: 12px;
  margin-top: 7px;
  max-width: 72ch;
}
.detail-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
}
.equipment-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.equipment-list a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid transparent;
}
.equipment-list a.active {
  background: #25392f;
  border-color: #456e57;
  color: var(--brand);
}
.equipment-list a:hover {
  background: #26312c;
}
.equipment-list small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 25px;
}
.detail-title h2 {
  font-size: 24px;
}
.detail-state {
  display: flex;
  align-items: center;
  gap: 15px;
}
.property-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  margin: 0;
}
.property {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.property dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.property dd {
  font-size: 13px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.detail-note {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
}
.detail-note p {
  font-size: 12px;
  margin-top: 6px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: #20272b;
}
td,
th {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td:first-child {
  font-weight: 600;
}
.sensor-table-value {
  font-size: 21px;
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tabs button {
  border: 0;
  background: none;
  border-bottom: 2px solid transparent;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--brand);
  border-color: var(--brand);
  font-weight: 600;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
input,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #52605c;
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  margin-top: 7px;
}
input::placeholder {
  color: #a8b5b0;
}
label > select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin: 22px 0;
}
.form-wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 25px;
  flex-wrap: wrap;
}
.form-actions small {
  font-size: 11px;
  color: var(--muted);
}
.step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 110px 110px 36px;
  gap: 12px;
  align-items: end;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.step-number {
  font-size: 12px;
  color: var(--brand);
  background: #263e30;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  align-self: center;
}
.step label {
  font-size: 11px;
}
.step input,
.step select {
  font-size: 12px;
  width: 100%;
  padding: 9px;
}
.step-condition {
  grid-column: 2/5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.step-condition select {
  width: auto;
  max-width: 180px;
  margin: 0;
  padding: 6px;
  font-size: 11px;
}
.step-condition input {
  width: 80px;
  margin: 0;
  padding: 6px;
}
.step .icon-button {
  align-self: center;
}
.automation-heading {
  margin-top: 25px;
}
.system-flow {
  display: grid;
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  align-items: center;
  gap: 14px;
  padding: 28px 0;
}
.flow-node {
  padding: 20px;
  background: #20292a;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
}
.flow-node svg {
  display: block;
  margin: 0 auto 10px;
  color: var(--brand);
}
.flow-node small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.flow-arrow {
  text-align: center;
  color: var(--brand);
}
.system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.system-grid .content-panel {
  margin-bottom: 0;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: calc(50% + 80px);
  transform: translateX(-50%);
  max-width: min(500px, 90vw);
  padding: 13px 18px;
  background: #244935;
  color: var(--ink);
  border-radius: 9px;
  box-shadow: 0 8px 25px #00000055;
  z-index: 100;
  font-size: 12px;
}
.toast.is-error {
  background: #6b3030;
}
.error {
  color: var(--danger);
  font-size: 12px;
}
.mobile-only {
  display: none;
}
.sr-only {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}
.login-story {
  background: var(--rail);
  padding: 45px 55px;
  display: flex;
  flex-direction: column;
  color: #e6f2e9;
}
.login-story .brand {
  padding: 0;
}
.login-pitch {
  margin: auto 0;
  padding: 70px 0;
}
.login-pitch h1 {
  font-size: clamp(40px, 4.7vw, 72px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #e4f1e6;
}
.login-pitch p {
  color: #b5c8bb;
  font-size: 17px;
  margin-top: 26px;
  line-height: 1.8;
}
.login-trace {
  display: flex;
  gap: 8px;
  height: 90px;
  align-items: center;
  max-width: 340px;
  margin-top: 55px;
}
.login-trace span {
  width: 15px;
  background: #82bea0;
  height: 30%;
  border-radius: 3px;
}
.login-trace span:nth-child(3n) {
  height: 65%;
  background: #4e9473;
}
.login-trace span:nth-child(2n) {
  height: 90%;
}
.login-trace span:nth-child(4n) {
  height: 45%;
}
.login-foot {
  font-size: 12px;
  color: #a8b5b0;
}
.login-main {
  display: grid;
  place-items: center;
  background: #141a1d;
  padding: 40px;
}
.login-main form {
  width: 100%;
  max-width: 350px;
}
.login-main h2 {
  font-size: 32px;
  margin: 22px 0 8px;
  letter-spacing: -0.03em;
}
.login-main form > p {
  font-size: 13px;
  margin-bottom: 30px;
}
.login-main label {
  margin-top: 20px;
}
.login-main input {
  padding: 12px;
}
.login-main .primary {
  width: 100%;
  justify-content: space-between;
  font-size: 14px;
  padding: 12px 16px;
  margin: 15px 0 20px;
}
.login-main #login-error {
  margin: 14px 0 0;
  min-height: 18px;
}
.login-main .login-note {
  font-size: 12px;
  line-height: 1.8;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.chart-area .modebar {
  display: none !important;
}
@media (min-width: 1600px) {
  #main {
    padding-top: 43px;
  }
  .plot {
    height: 380px;
  }
  .chart-wrapper {
    min-height: 380px;
  }
  .equipment-card {
    padding: 24px;
  }
  .equipment-meta {
    margin-bottom: 26px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  #main {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }

  .head-actions {
    gap: 10px;
  }
  .manual-label {
    display: none;
  }
  .equipment-card {
    padding: 17px;
  }
  .equipment-grid {
    gap: 12px;
  }
}
@media (max-width: 850px) {
  .workspace {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    width: 238px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-shell {
    min-height: 100dvh;
  }
  .mobile-only {
    display: inline-grid;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
    gap: 10px;
  }
  .topbar .site-picker {
    margin-right: auto;
  }
  .site-picker select {
    font-size: 12px;
    max-width: 210px;
  }
  .topbar-right {
    gap: 9px;
  }
  .topbar-divider {
    display: none;
  }
  #mobile-scrim {
    position: fixed;
    inset: 0;
    background: #080d10cc;
    z-index: 25;
  }
  .toast {
    left: 50%;
  }
  #main {
    padding: 25px 22px;
  }
  .sidebar-bottom {
    padding-top: 25px;
  }
  .equipment-card-head h3 {
    font-size: 12px;
  }
  .equipment-card-head {
    gap: 7px;
  }
  .equipment-meta {
    margin-left: 28px;
  }
  .detail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  h1 {
    font-size: 27px;
  }
}
@media (max-width: 600px) {
  .topbar {
    padding: 0 12px;
  }
  .topbar-right {
    font-size: 11px;
  }
  .topbar-right .badge {
    font-size: 11px;
    padding: 3px 5px;
  }
  .site-picker {
    gap: 3px;
  }
  .site-picker > span {
    display: none;
  }
  .site-picker select {
    max-width: 175px;
    font-size: 11px;
  }
  .topbar-right {
    gap: 6px;
  }
  #main {
    padding: 23px 16px 20px;
  }
  .page-head {
    align-items: flex-start;
    margin-bottom: 23px;
    gap: 10px;
  }
  h1 {
    font-size: 25px;
  }
  .page-head p {
    font-size: 11px;
    max-width: 36ch;
    line-height: 1.7;
    margin-top: 7px;
  }
  .head-actions .button {
    font-size: 0;
    width: 36px;
    height: 36px;
    padding: 0;
  }
  .head-actions .button svg {
    width: 16px;
  }
  .section-title {
    margin-bottom: 10px;
  }
  .section-title small {
    font-size: 11px;
  }
  .equipment-grid {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 25px;
  }
  .equipment-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    position: relative;
    padding: 15px 17px;
  }
  .equipment-card-head {
    grid-column: 1;
    grid-row: 1;
    gap: 10px;
  }
  .equipment-card-head h3 {
    font-size: 13px;
  }
  .equipment-meta {
    grid-row: 2;
    grid-column: 1;
    margin: 4px 0 0 31px;
  }
  .equipment-bottom {
    grid-column: 2;
    grid-row: 1/3;
    gap: 15px;
  }
  .state-text {
    font-size: 13px;
    min-width: 44px;
  }
  .state-text::before {
    width: 5px;
    height: 5px;
  }
  .equipment-foot,
  .equipment-card .detail-link {
    display: none;
  }
  .switch {
    width: 42px;
    height: 24px;
  }
  .panel-heading {
    align-items: flex-start;
    padding: 19px 16px 12px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .panel-heading h2 {
    font-size: 15px;
  }
  .panel-heading p {
    font-size: 11px;
  }
  .range-buttons button {
    padding: 4px 10px;
  }

  .sensor-reading {
    border: 0;
    padding: 0;
  }
  .sensor-value {
    font-size: 25px;
    margin-top: 7px;
  }
  .sensor-name {
    font-size: 11px;
    gap: 5px;
  }
  .sensor-value small {
    font-size: 12px;
  }
  .sensor-reading > small {
    font-size: 11px;
  }
  .chart-area {
    padding: 0 3px;
  }
  .chart-toolbar {
    padding: 0 11px 8px;
  }
  .plot {
    height: 285px;
  }
  .chart-wrapper {
    min-height: 285px;
  }
  .chart-foot {
    padding: 12px 15px;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
  }
  .chart-readout {
    font-size: 11px;
    margin: 3px 12px 10px;
    gap: 7px;
  }
  .inspect-slider {
    margin: 0 15px 12px;
    font-size: 11px;
  }

  .activity-panel {
    padding: 18px;
  }
  .event-time {
    font-size: 11px;
  }
  .app-footer {
    padding: 15px 16px;
    gap: 12px;
    font-size: 11px;
  }
  .app-footer span:last-child {
    text-align: right;
  }
  .content-panel {
    padding: 18px;
  }
  .detail-layout {
    display: block;
  }
  .equipment-list {
    flex-direction: column;
    margin-bottom: 20px;
    gap: 6px;
  }
  .equipment-list a {
    padding: 10px;
    white-space: nowrap;
    min-width: 130px;
    font-size: 11px;
    gap: 8px;
  }
  .equipment-list small {
    font-size: 11px;
  }
  .equipment-list svg {
    width: 16px;
  }
  .detail-title h2 {
    font-size: 21px;
  }
  .detail-state {
    gap: 8px;
  }
  .property-grid {
    gap: 0 20px;
  }
  .property dd {
    font-size: 12px;
  }
  .system-grid {
    grid-template-columns: 1fr;
  }
  .system-flow {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 22px 0;
  }
  .flow-node {
    padding: 16px;
  }
  .flow-arrow {
    transform: rotate(90deg);
    height: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .form-grid > label:first-child {
    grid-column: 1/-1;
  }
  .step {
    grid-template-columns: 25px minmax(0, 1fr) minmax(0, 1fr) 34px;
    gap: 10px;
  }
  .step > label:first-of-type {
    grid-column: 2/4;
  }
  .step > label:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
  }
  .step .step-delay {
    grid-column: 3;
    grid-row: 2;
  }
  .step-condition {
    grid-column: 2/4;
  }
  .step .remove-step {
    grid-column: 4;
    grid-row: 1;
  }
  .step-number {
    align-self: start;
    margin-top: 24px;
  }
  .step-condition input {
    width: 70px;
  }
  .step-condition select {
    max-width: 155px;
  }
  .form-actions .primary {
    width: 100%;
  }
  .notice {
    font-size: 11px;
    padding: 12px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px;
  }
  .login-pitch {
    padding: 35px 0 10px;
  }
  .login-pitch h1 {
    font-size: 35px;
  }
  .login-pitch p,
  .login-trace,
  .login-foot {
    display: none;
  }
  .login-main {
    padding: 30px 25px 50px;
    place-items: start center;
  }
  .login-main h2 {
    font-size: 27px;
  }
  .login-story .brand {
    font-size: 21px;
  }
  .login-story .brand-mark {
    height: 32px;
    width: 30px;
    font-size: 29px;
  }
  .login-main .login-note {
    margin-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Overview reading order: controls, live values, history, activity. */
.sensor-values {
  margin-bottom: 26px;
}
.sensor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.sensor-grid .sensor-reading {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px 22px;
}
.sensor-grid .sensor-value {
  margin: 8px 0 3px;
  font-size: 32px;
}
.overview-activity {
  margin-top: 26px;
}
.alarm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.alarm-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.alarm-group {
  margin-top: 24px;
}
.alarm-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.alarm-group-heading small {
  font-size: 12px;
  color: var(--muted);
}
.alarm-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.alarm-item-main {
  flex: 1;
  min-width: 0;
}
.alarm-item h3 {
  overflow-wrap: anywhere;
  font-size: 14px;
}
.alarm-item p {
  font-size: 12px;
  margin-top: 4px;
}
.alarm-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.danger-link {
  color: var(--danger);
}
.alarm-delete-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}
.alarm-form {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 26px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.alarm-explanation {
  font-size: 12px;
  line-height: 1.7;
  max-width: 75ch;
  margin-top: 12px;
}
.alarm-popups {
  position: fixed;
  right: 24px;
  top: 88px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(370px, calc(100vw - 32px));
  pointer-events: none;
}
.alarm-popup {
  pointer-events: auto;
  background: #26392f;
  border: 1px solid #719b81;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 30px #00000055;
}
.alarm-popup-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.alarm-popup-title strong {
  flex: 1;
  font-size: 14px;
}
.alarm-popup p {
  color: #d0e0d4;
  font-size: 13px;
  line-height: 1.6;
}
.alarm-popup small {
  display: block;
  color: #c2d4c8;
  margin-top: 8px;
  font-size: 11px;
}
@media (max-width: 600px) {
  .sensor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .sensor-grid .sensor-reading {
    padding: 13px 10px;
  }
  .sensor-grid .sensor-name {
    align-items: start;
    font-size: 11px;
    gap: 5px;
    line-height: 1.4;
    min-height: 30px;
  }
  .sensor-grid .series-dot {
    margin-top: 4px;
  }
  .sensor-grid .sensor-value {
    font-size: 25px;
    white-space: nowrap;
  }
  .sensor-grid .sensor-fresh {
    display: block;
    line-height: 1.5;
  }
  .sensor-values {
    margin-bottom: 23px;
  }
  .alarm-item {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .alarm-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .alarm-popups {
    top: 76px;
    right: 16px;
  }
  .alarm-toolbar-actions .button {
    font-size: 12px;
  }
  .equipment-list a {
    min-width: 0;
    white-space: normal;
    min-height: 54px;
  }
  .equipment-list {
    gap: 5px;
  }
  .equipment-list a span {
    flex: 1;
  }
}

/* Shared dropdown: hidden native form model, fully themed visible control. */
select.custom-select-source {
  display: none !important;
}
.custom-select {
  display: block;
  position: relative;
  min-width: 0;
  margin-top: 7px;
  max-width: 100%;
}
.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #52605c;
  border-radius: 7px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.select-trigger:hover {
  border-color: #789488;
  background: #20292a;
}
.select-trigger[aria-expanded="true"] {
  border-color: var(--brand);
}
.select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.select-chevron {
  width: 15px !important;
  height: 15px !important;
  color: var(--muted);
}
.select-trigger[aria-expanded="true"] .select-chevron {
  transform: rotate(180deg);
}
.select-menu {
  position: fixed;
  z-index: 120;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  background: #20282b;
  border: 1px solid #52605c;
  border-radius: 8px;
  box-shadow: 0 8px 25px #00000055;
  max-width: calc(100vw - 24px);
}
.select-menu [role="option"] {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  font:
    400 13px/1.5 Plex,
    sans-serif;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.select-menu [role="option"]:hover,
.select-menu [role="option"].highlighted {
  background: #32443a;
}
.select-menu [role="option"][aria-selected="true"] {
  color: #a6dfc6;
  font-weight: 600;
}
.site-picker .custom-select {
  margin: 0;
  max-width: 300px;
  min-width: 0;
}
.site-picker .select-trigger {
  font-size: 13px;
  font-weight: 600;
  border-color: transparent;
  background: transparent;
  padding-left: 0;
}
.chart-toolbar .custom-select {
  margin: 0;
  max-width: 240px;
  font-size: 11px;
}
.chart-toolbar .select-trigger {
  font-size: 11px;
  min-height: 32px;
  padding: 6px 9px;
}
.step .custom-select {
  font-size: 12px;
}
.step-condition .custom-select {
  display: inline-block;
  margin: 0;
  max-width: 180px;
  font-size: 11px;
  flex: 0 1 auto;
}
.step-condition .select-trigger {
  font-size: 11px;
  min-height: 32px;
  padding: 6px 8px;
}
.sequence-run-panel {
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
}
.sequence-run-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.sequence-run-heading h2 {
  font-size: 17px;
}
.sequence-run-message {
  margin: 12px 0;
  font-size: 13px;
  color: var(--ink);
}
.sequence-run-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}
.sequence-run-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sequence-run-steps li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.sequence-run-steps li .badge {
  margin-left: auto;
}
.sequence-run-log {
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
}
.sequence-run-log p {
  padding: 4px 0;
}
.sequence-lock-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 15px;
  background: #24382e;
  border: 1px solid #476954;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 20px;
}
.sequence-lock-banner a {
  margin-left: auto;
  white-space: nowrap;
}
.locked-equipment {
  font-size: 11px;
  color: #d8c28e;
  margin-top: 5px;
}
.simulator-panel {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.simulator-panel > p {
  font-size: 12px;
  margin: 6px 0 15px;
  max-width: 70ch;
}
.simulator-fields {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 130px auto auto;
  gap: 12px;
  align-items: end;
}
.simulator-fields .custom-select {
  width: 100%;
}
.simulator-fields button {
  min-height: 40px;
}
fieldset.sequence-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.sequence-start-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.sequence-start-help {
  font-size: 12px;
  max-width: 75ch;
  margin-top: 10px;
}
@media (max-width: 600px) {
  .site-picker .custom-select {
    max-width: 175px;
  }
  .site-picker .select-trigger {
    font-size: 11px;
    gap: 5px;
  }
  .chart-toolbar .custom-select {
    max-width: 190px;
  }
  .sequence-run-panel {
    padding: 17px;
  }
  .sequence-lock-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .simulator-fields {
    grid-template-columns: 1fr 1fr;
  }
  .simulator-fields button {
    width: 100%;
  }
  .sequence-run-steps li {
    flex-wrap: wrap;
  }
  .sequence-run-steps li .badge {
    margin-left: 0;
  }
  .sequence-run-heading .secondary {
    font-size: 11px;
  }
}

.device-settings-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
fieldset.device-settings-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.device-bus-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  align-items: start;
}
.device-entry {
  display: grid;
  grid-template-columns: 150px minmax(150px, 2fr) minmax(115px, 1fr) 110px 82px;
  gap: 14px;
  align-items: end;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.device-entry:first-child {
  margin-top: 20px;
}
.device-entry.sensor-entry {
  grid-template-columns: 150px minmax(160px, 2fr) minmax(130px, 1fr) 100px;
}
.device-entry label {
  font-size: 11px;
  min-width: 0;
}
.device-entry input,
.device-entry .select-trigger {
  font-size: 13px;
  min-height: 39px;
}
.device-entry input[readonly] {
  color: var(--muted);
  background: #151b1d;
}
.device-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 39px;
}
.device-settings-fields .section-title {
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.device-settings-fields .section-title h2 {
  font-size: 17px;
}
.device-settings-fields .section-title p {
  font-size: 12px;
  margin-top: 6px;
  max-width: 70ch;
}
.device-settings-fields .section-title .text-button {
  font-size: 12px;
}
.device-validate-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 25px;
}
.device-validate-actions p {
  font-size: 12px;
  max-width: 65ch;
}
#device-config-error:empty {
  display: none;
}
#device-config-error {
  margin: 15px 0;
  font-size: 13px;
  line-height: 1.7;
}
.device-review {
  border-color: #476954;
}
.device-review td {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 40ch;
  vertical-align: top;
}
.device-review > p {
  font-size: 12px;
  margin-bottom: 18px;
}
.device-review-stale {
  font-size: 12px;
  margin: 20px 0;
  color: var(--muted);
}
.device-change-history > p {
  margin-bottom: 16px;
}
.device-history-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.device-history-row strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.device-history-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.device-history-row p {
  margin-top: 7px;
  max-width: 70ch;
  font-size: 12px;
}
@media (max-width: 1150px) {
  .device-entry {
    grid-template-columns: 120px minmax(130px, 2fr) minmax(100px, 1fr) 90px 70px;
    gap: 10px;
  }
  .device-entry.sensor-entry {
    grid-template-columns: 120px minmax(130px, 2fr) minmax(110px, 1fr) 90px;
  }
  .device-bus-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .device-entry,
  .device-entry.sensor-entry {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .device-entry > label:first-child {
    grid-column: 1;
  }
  .device-entry > label:nth-child(2) {
    grid-column: 2;
  }
  .device-entry-actions {
    grid-column: 1/-1;
    justify-content: space-between;
  }
  .device-entry.sensor-entry > .device-entry-actions {
    grid-column: 2;
  }
  .device-settings-fields .section-title .text-button {
    font-size: 12px;
  }
  .device-review table {
    font-size: 11px;
  }
  .device-review th,
  .device-review td {
    padding: 12px 8px;
  }
  .device-history-row {
    font-size: 11px;
  }
}
@media (max-width: 380px) {
  .device-bus-grid {
    grid-template-columns: 1fr;
  }
  .device-entry,
  .device-entry.sensor-entry {
    grid-template-columns: 1fr;
  }
  .device-entry > label:nth-child(2),
  .device-entry.sensor-entry > .device-entry-actions {
    grid-column: 1;
  }
  .device-entry-actions {
    grid-column: 1;
  }
}
.table-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
  white-space: normal;
  max-width: 40ch;
}
.relay-table-control {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.relay-table-control .state-text {
  font-size: 13px;
  white-space: nowrap;
}
.asset-relays {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 16px;
}
@media (max-width: 600px) {
  .asset-relays {
    grid-template-columns: 1fr;
  }
  .equipment-grid.asset-relays {
    display: flex;
  }
}
.device-entry.with-device,
.device-entry.sensor-entry.with-device {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.device-entry.with-device .device-entry-actions {
  grid-column: 1/-1;
}
.transport-entry {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.transport-entry > small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}
@media (max-width: 700px) {
  .device-entry.with-device,
  .device-entry.sensor-entry.with-device {
    grid-template-columns: 1fr 1fr;
  }
  .device-entry.with-device .device-entry-actions {
    grid-column: 1/-1;
  }
  .transport-entry .device-bus-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.asset-relay-list .event .state-text {
  font-size: 13px;
  white-space: nowrap;
  min-width: 70px;
}
.asset-relay-list .event-main {
  min-width: 0;
}
.asset-relay-list h3 {
  font-size: 13px;
}
.user-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; margin-top:24px; }
.user-form-grid small { color:var(--muted); font-size:12px; font-weight:400; }
.user-plants { border:0; padding:0; margin:0; min-width:0; }
.user-plants legend { font-size:13px; margin-bottom:10px; }
.user-plants label { display:flex; align-items:center; gap:10px; margin:8px 0; }
.user-plants input { width:18px; height:18px; margin:0; accent-color:var(--brand); }
.user-directory { margin-top:24px; }
.user-row { display:flex; flex-wrap:wrap; align-items:center; gap:20px; padding:22px 0; border-bottom:1px solid var(--line); }
.user-row:last-child { border-bottom:0; padding-bottom:0; }
.user-info { flex:1; min-width:180px; overflow-wrap:anywhere; }
.user-info h3 { margin:0 0 5px; font-size:16px; }
.user-info p { margin:0 0 4px; color:var(--muted); }
.user-info small { color:var(--muted); }
.user-access { display:flex; gap:10px; align-items:center; font-size:13px; }
.user-actions { display:flex; gap:8px; flex-wrap:wrap; }
.user-reset-form { flex-basis:100%; max-width:540px; }
@media (max-width:600px) { .user-form-grid { grid-template-columns:1fr; } .user-row { align-items:flex-start; gap:14px; } .user-info,.user-actions { flex-basis:100%; } .user-actions button { flex:1; } }
