/* V0.70.2 — compact ASIC command center, separated workspaces and annual market view. */
#detailModal { max-width: none; }
#detailModal .asic-status-card {
  width: min(1120px, calc(100vw - 32px));
  height: min(820px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.asic-status-titlebar {
  flex: 0 0 auto;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e3e9f0;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.asic-status-identity,
.asic-status-title-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.asic-status-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: #0871dc;
  background: #eaf4ff;
  font-size: 19px;
}
.asic-status-identity h3 {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 22px;
}
.asic-status-identity p {
  max-width: 650px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asic-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.asic-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.asic-status-pill.online { color: #188542; background: #eaf8ef; }
.asic-status-pill.problem { color: #d83932; background: #fff0f0; }
.asic-status-pill.offline { color: #697586; background: #eef1f5; }
.asic-status-close {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px;
  border-radius: 10px !important;
  color: #4c596a !important;
  background: #f4f7fa !important;
}
.asic-native-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 8px 18px 0;
  border-bottom: 1px solid #dfe6ee;
  background: #f3f6f9;
}
.asic-native-tabs button {
  min-height: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px 8px 0 0;
  color: #697586;
  background: transparent;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.asic-native-tabs button:hover { color: #0871dc; background: #e7f2fd; }
.asic-native-tabs button.active {
  color: #0871dc;
  background: var(--panel);
  box-shadow: inset 0 2px #1680e8;
  font-weight: 800;
}
.asic-native-body {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 15px 18px 4px;
}
.asic-native-section { margin: 0 0 14px; }
.asic-native-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.asic-native-section-head h4 { margin: 0 0 2px; font-size: 16px; }
.asic-native-section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.asic-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f8fafc;
}
.asic-summary-item {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid #e3e9f0;
}
.asic-summary-item:nth-child(4n) { border-right: 0; }
.asic-summary-item:nth-child(n+5) { border-top: 1px solid #e3e9f0; }
.asic-summary-item small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}
.asic-summary-item b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asic-summary-item.history-launch { cursor: pointer; }
.asic-summary-item.history-launch:hover { background: #edf6ff; }
.asic-summary-item.history-launch:hover b { color: #0871dc; }
.asic-history-link {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(0,113,227,.24);
  border-radius: 9px;
  color: #0871dc;
  background: #eef6ff;
  font-size: 12px;
  font-weight: 800;
}
.asic-history-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.asic-history-link { display:inline-flex; align-items:center; justify-content:center; gap:7px; box-shadow:0 5px 14px rgba(8,113,220,.08); }
.asic-history-link span { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:6px; background:rgba(8,113,220,.10); transition:transform .22s ease, background-color .22s ease; }
.asic-history-link:hover { border-color:rgba(0,113,227,.42); background:#e3f1ff; box-shadow:0 9px 20px rgba(8,113,220,.14); }
.asic-history-link:hover span { transform:scale(1.12) rotate(-5deg); background:rgba(8,113,220,.16); }
.asic-native-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
}
.asic-native-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.asic-native-table th {
  padding: 8px 10px;
  color: #687587;
  background: #f3f6f9;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}
.asic-native-table td {
  padding: 9px 10px;
  border-top: 1px solid #e6ebf1;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.asic-pools-table { min-width: 560px; }
.asic-pool-priority {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #0871dc;
  background: #eaf4ff;
  font-weight: 800;
}
.asic-pool-url { max-width: 390px; overflow: hidden; text-overflow: ellipsis; }
.asic-pool-state { color: var(--muted); }
.asic-pool-state.alive { color: #188542; font-weight: 800; }
.asic-chip-state { color: #188542; font-weight: 800; letter-spacing: .06em; }
.asic-chip-state.problem { color: #d83932; }
.asic-chip-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}
.asic-chip-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid #28a653;
  border-radius: 50%;
  background: #eaf8ef;
  box-shadow: inset 0 0 0 2px #fff;
}
.asic-chip-dots i.bad {
  border-color: #e4453e;
  background: #ff5b55;
}
.asic-boards-table tr.warm td { background: #fffbef; }
.asic-boards-table tr.hot td,
.asic-boards-table tr.problem td { background: #fff1f1; }
.asic-native-empty {
  padding: 16px;
  border: 1px dashed #cfd9e5;
  border-radius: 12px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}
.asic-config-strip {
  display: grid;
  grid-template-columns: minmax(150px, .35fr) minmax(260px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f8fafc;
}
.asic-config-strip span { padding-right: 14px; border-right: 1px solid #dfe6ee; }
.asic-config-strip small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.asic-config-strip p { margin: 0; color: var(--muted); font-size: 12px; }
.asic-inline-pool-editor {
  overflow: hidden;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f8fafc;
}
.asic-inline-pool-head,
.asic-inline-pool-row {
  display: grid;
  grid-template-columns: 34px minmax(260px, 1.55fr) minmax(180px, 1fr) minmax(90px, .42fr);
  align-items: center;
  gap: 9px;
}
.asic-inline-pool-head {
  padding: 8px 10px;
  color: #687587;
  background: #f3f6f9;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.asic-inline-pool-row {
  padding: 8px 10px;
  border-top: 1px solid #e3e9f0;
}
.asic-inline-pool-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  color: #0871dc;
  background: #eaf4ff;
  font-size: 12px;
}
.asic-inline-pool-row label { min-width: 0; }
.asic-inline-pool-row label > span { display: none; }
.asic-inline-pool-row input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ced8e4;
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-size: 12px;
}
.asic-inline-pool-row input:focus {
  border-color: #1680e8;
  outline: 3px solid rgba(22,128,232,.12);
}
.asic-inline-config-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
}
.asic-inline-config-footer span { color: var(--muted); font-size: 12px; }
.asic-inline-config-footer button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.asic-profile-controls {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(280px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f8fafc;
}
.asic-profile-controls label > span,
.asic-manual-frequencies label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.asic-profile-controls select,
.asic-manual-frequencies select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ced8e4;
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-size: 12px;
}
.asic-profile-controls p { margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.asic-profile-controls button { min-height: 38px; padding: 0 16px; border-radius: 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.asic-manual-frequencies {
  display: none;
  grid-template-columns: repeat(9, minmax(70px, 1fr));
  gap: 7px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f8fafc;
}
.asic-manual-frequencies.visible { display: grid; }
.asic-profile-status { padding: 8px 2px 0; color: var(--muted); font-size: 12px; }
.asic-fans-strip {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(130px, 1fr)) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f8fafc;
  font-variant-numeric: tabular-nums;
}
.asic-fans-strip > strong { min-width: 42px; }
.asic-fans-strip > span {
  padding-left: 11px;
  border-left: 1px solid #dfe6ee;
}
.asic-fans-strip small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; }
.asic-fans-strip em {
  padding: 6px 10px;
  border-radius: 8px;
  color: #8b6500;
  background: #fff4d5;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
#detailModal .asic-status-actions {
  flex: 0 0 auto;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 13px 18px 16px;
  border-top: 1px solid #dfe6ee;
  background: rgba(248,250,252,.97);
  backdrop-filter: blur(14px);
}
#detailModal .asic-status-actions button {
  height: 40px;
  min-width: 0;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
#detailModal .asic-status-actions #detailStopBtn,
#detailModal .asic-status-actions #detailStartBtn,
#detailModal .asic-status-actions #detailRebootBtn { grid-column: auto; }

html[data-theme="dark"] .asic-status-titlebar {
  border-color: #344150;
  background: rgba(23,30,39,.97);
}
html[data-theme="dark"] .asic-status-mark { color: #78baff; background: #1b3550; }
html[data-theme="dark"] .asic-status-pill.online { color: #57dc80; background: #173425; }
html[data-theme="dark"] .asic-status-pill.problem { color: #ff807a; background: #382023; }
html[data-theme="dark"] .asic-status-pill.offline { color: #a7b2c1; background: #2b3440; }
html[data-theme="dark"] .asic-status-close { color: #d8e0ea !important; background: #202a36 !important; }
html[data-theme="dark"] .asic-native-tabs { border-color: #344150; background: #1d2631; }
html[data-theme="dark"] .asic-native-tabs button { color: #9ca9b8; }
html[data-theme="dark"] .asic-native-tabs button:hover { color: #82bfff; background: #1b3550; }
html[data-theme="dark"] .asic-native-tabs button.active { color: #82bfff; background: #171e27; box-shadow: inset 0 2px #5aa8f5; }
html[data-theme="dark"] .asic-summary-grid,
html[data-theme="dark"] .asic-native-table-wrap,
html[data-theme="dark"] .asic-fans-strip,
html[data-theme="dark"] .asic-native-empty { border-color: #344150; background: #1d2631; }
html[data-theme="dark"] .asic-summary-item { border-color: #344150; }
html[data-theme="dark"] .asic-summary-item.history-launch:hover { background: #1b3550; }
html[data-theme="dark"] .asic-summary-item.history-launch:hover b { color: #82bfff; }
html[data-theme="dark"] .asic-history-link { border-color: #315f8e; color: #82bfff; background: #1b3550; }
html[data-theme="dark"] .asic-native-table th { color: #a0adbc; background: #202a36; }
html[data-theme="dark"] .asic-native-table td { border-color: #303b48; }
html[data-theme="dark"] .asic-pool-priority { color: #82bfff; background: #1b3550; }
html[data-theme="dark"] .asic-chip-dots i { border-color: #54d77d; background: #173425; box-shadow: inset 0 0 0 2px #1d2631; }
html[data-theme="dark"] .asic-chip-dots i.bad { border-color: #ff7e78; background: #df4540; }
html[data-theme="dark"] .asic-boards-table tr.warm td { background: #342d1e; }
html[data-theme="dark"] .asic-boards-table tr.hot td,
html[data-theme="dark"] .asic-boards-table tr.problem td { background: #382124; }
html[data-theme="dark"] .asic-fans-strip > span { border-color: #344150; }
html[data-theme="dark"] .asic-fans-strip em { color: #ffd77e; background: #382d16; }
html[data-theme="dark"] .asic-config-strip { border-color: #344150; background: #1d2631; }
html[data-theme="dark"] .asic-config-strip span { border-color: #344150; }
html[data-theme="dark"] .asic-inline-pool-editor { border-color: #344150; background: #1d2631; }
html[data-theme="dark"] .asic-inline-pool-head { color: #a0adbc; background: #202a36; }
html[data-theme="dark"] .asic-inline-pool-row { border-color: #344150; }
html[data-theme="dark"] .asic-inline-pool-number { color: #82bfff; background: #1b3550; }
html[data-theme="dark"] .asic-inline-pool-row input { border-color: #435164; background: #171e27; }
html[data-theme="dark"] .asic-profile-controls,
html[data-theme="dark"] .asic-manual-frequencies { border-color: #344150; background: #1d2631; }
html[data-theme="dark"] .asic-profile-controls select,
html[data-theme="dark"] .asic-manual-frequencies select { border-color: #435164; background: #171e27; }
html[data-theme="dark"] #detailModal .asic-status-actions { border-color: #344150; background: rgba(29,38,49,.97); }

@media (max-width: 900px) {
  .asic-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asic-summary-item:nth-child(2n) { border-right: 0; }
  .asic-summary-item:nth-child(n+3) { border-top: 1px solid #e3e9f0; }
  html[data-theme="dark"] .asic-summary-item:nth-child(n+3) { border-color: #344150; }
  #detailModal .asic-status-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  #detailModal .asic-status-card { width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: calc(100vh - 16px); border-radius: 15px; }
  .asic-status-titlebar { align-items: flex-start; padding: 13px 12px; }
  .asic-status-title-actions { gap: 6px; }
  .asic-status-identity { align-items: flex-start; }
  .asic-status-mark { display: none; }
  .asic-status-identity h3 { font-size: 19px; }
  .asic-status-identity p { max-width: 54vw; white-space: normal; }
  .asic-status-pill { min-height: 32px; padding: 0 8px; }
  .asic-native-tabs { overflow: hidden; padding-left: 8px; padding-right: 8px; }
  .asic-native-tabs button { padding: 8px 7px; font-size: 11px; }
  .asic-native-body { padding: 12px 10px 2px; }
  .asic-native-section-head { align-items: flex-start; }
  .asic-history-link { max-width: 120px; }
  .asic-fans-strip { grid-template-columns: auto repeat(2, 1fr); }
  .asic-fans-strip em { grid-column: 1 / -1; text-align: center; }
  .asic-config-strip { grid-template-columns: 1fr; }
  .asic-config-strip span { padding-right: 0; padding-bottom: 10px; border-right: 0; border-bottom: 1px solid #dfe6ee; }
  .asic-inline-pool-head { display: none; }
  .asic-inline-pool-row { grid-template-columns: 28px 1fr; align-items: start; }
  .asic-inline-pool-row label { grid-column: 2; }
  .asic-inline-pool-row label > span { display: block; margin: 0 0 3px; color: var(--muted); font-size: 10px; }
  .asic-inline-config-footer { align-items: stretch; flex-direction: column; }
  .asic-profile-controls { grid-template-columns: 1fr; align-items: stretch; }
  .asic-manual-frequencies { grid-template-columns: repeat(3, minmax(70px, 1fr)); }
  html[data-theme="dark"] .asic-config-strip span { border-color: #344150; }
  #detailModal .asic-status-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
}

/* Compact navigation and one continuous application header. */
@media (min-width: 921px) {
  .shell { grid-template-columns: 196px minmax(0, 1fr); }
  body.sidebar-collapsed .shell { grid-template-columns: 66px minmax(0, 1fr); }
  .sidebar {
    padding: 0 10px 14px;
  }
  .sidebar > .brand {
    min-height: 72px;
    height: 72px;
    margin: 0 -10px;
    padding: 0 12px;
    gap: 9px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .sidebar > .brand .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .sidebar > .brand strong {
    font-size: 16px;
    white-space: nowrap;
  }
  .side-nav {
    gap: 4px;
    margin-top: 12px;
    padding: 6px;
    border-radius: 14px;
  }
  .side-nav button {
    min-height: 40px;
    padding: 0 8px;
    gap: 8px;
  }
  .side-nav button > span {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
  }
  .side-nav button b { font-size: 14px; }
  .next-check { left: 10px; right: 10px; bottom: 14px; }
  .topbar { min-height: 72px; height: 72px; }
  body.sidebar-collapsed .sidebar > .brand { justify-content: center; }
  body.sidebar-collapsed .sidebar > .brand .brand-mark { display: none; }
  body.sidebar-collapsed .sidebar-menu-toggle { margin: 0; }
}

.sidebar-menu-toggle {
  position: relative;
  display: grid;
  place-content: center;
  gap: 4px;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.sidebar-menu-toggle:hover {
  color: #0871dc;
  background: #eaf4ff;
  transform: translateY(-1px);
}
.sidebar-menu-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
  transform-origin: center;
  transition: width .24s ease, transform .24s ease;
}
.sidebar-menu-toggle:hover span:nth-child(1) { transform: translateX(2px); }
.sidebar-menu-toggle:hover span:nth-child(2) { width: 12px; }
.sidebar-menu-toggle:hover span:nth-child(3) { transform: translateX(-2px); }
body.sidebar-collapsed .sidebar-menu-toggle span:nth-child(1) { width: 10px; transform: translate(4px, 2px) rotate(35deg); }
body.sidebar-collapsed .sidebar-menu-toggle span:nth-child(2) { width: 17px; }
body.sidebar-collapsed .sidebar-menu-toggle span:nth-child(3) { width: 10px; transform: translate(4px, -2px) rotate(-35deg); }

.nav-svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-fan,
.nav-clock-hand,
.nav-gear {
  transform-box: fill-box;
  transform-origin: center;
}
.side-nav button:hover .nav-fan { animation: nav-spin .72s linear infinite; }
.side-nav button:hover .nav-fan-right { animation-direction: reverse; }
.side-nav button:hover .nav-clock-hand { animation: nav-clock 1.05s cubic-bezier(.4,0,.2,1) infinite; }
.side-nav button:hover .nav-gear { animation: nav-spin 1.4s linear infinite; }
.side-nav button:hover .nav-home-door { animation: nav-door .8s ease-in-out infinite alternate; }
.side-nav button:hover .nav-event-dot { animation: nav-pulse .9s ease-in-out infinite; }
.side-nav button:hover .nav-event-dot.dot-two { animation-delay: .12s; }
.side-nav button:hover .nav-event-dot.dot-three { animation-delay: .24s; }
@keyframes nav-spin { to { transform: rotate(360deg); } }
@keyframes nav-clock { to { transform: rotate(360deg); } }
@keyframes nav-door { to { transform: translateY(-2px); } }
@keyframes nav-pulse { 50% { opacity: .25; transform: scale(.7); } }

.market-ranges button { min-width: 68px; padding-inline: 12px; }
.market-metric-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.market-metric-value strong { white-space: nowrap; }
.market-value-divider {
  color: var(--muted);
  font-size: 19px;
  font-style: normal;
  font-weight: 750;
  line-height: 1;
}
.market-dual-summary .market-metric b {
  display: inline;
  min-height: 0;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.market-dual-summary .market-metric b.positive { color: #209447; }
.market-dual-summary .market-metric b.negative { color: #df3e38; }

@media (max-width: 1180px) {
  .market-dual-summary .market-metric b { font-size: 16px; }
  .market-value-divider { font-size: 17px; }
}

html[data-theme="dark"] .sidebar-menu-toggle:hover { color: #82bfff; background: #1b3550; }

@media (prefers-reduced-motion: reduce) {
  .side-nav button:hover .nav-fan,
  .side-nav button:hover .nav-clock-hand,
  .side-nav button:hover .nav-gear,
  .side-nav button:hover .nav-home-door,
  .side-nav button:hover .nav-event-dot { animation: none; }
  .sidebar-menu-toggle,
  .sidebar-menu-toggle span { transition: none; }
}

/* V0.72 pools/workers workspace and mixed rack layouts. */
.pool-workspace { display: none; overflow: hidden; }
.pool-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(8,113,220,.055), transparent 48%);
}
.pool-workspace-head > div:first-child > span { color:#0871dc; font-size:10px; font-weight:850; letter-spacing:.14em; }
.pool-workspace-head h1 { margin:4px 0 3px; font-size:25px; line-height:1.1; }
.pool-workspace-head p { margin:0; color:var(--muted); font-size:12px; }
.pool-workspace-stat { display:grid; min-width:100px; padding:9px 13px; border:1px solid rgba(8,113,220,.18); border-radius:12px; color:#0871dc; background:rgba(8,113,220,.06); text-align:right; }
.pool-workspace-stat b { font-size:18px; }.pool-workspace-stat span { font-size:10px; font-weight:750; text-transform:uppercase; }
.pool-workspace-toolbar {
  position: sticky;
  top: 72px;
  z-index: 30;
  display: grid;
  grid-template-columns:minmax(250px,1.4fr) minmax(180px,.7fr) auto auto auto auto;
  align-items:end;
  gap:8px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96);
  box-shadow:0 9px 22px rgba(15,23,42,.06);
  backdrop-filter:blur(14px) saturate(155%);
}
.pool-workspace-toolbar .search { min-width:0; }
.pool-scope { display:grid; gap:5px; }
.pool-scope > span { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.pool-scope select { min-height:38px; border:1px solid var(--line); border-radius:10px; padding:0 10px; background:var(--panel); color:var(--text); }
.pool-selected-counter { display:grid; min-width:66px; padding:5px 10px; border:1px solid var(--line); border-radius:10px; text-align:center; }
.pool-selected-counter b { color:#0871dc; font-size:17px; }.pool-selected-counter span { color:var(--muted); font-size:9px; }
.pool-workspace-toolbar button { min-height:38px; padding:8px 12px; white-space:nowrap; }
.pool-workspace-note { margin:0; padding:9px 16px; color:var(--muted); font-size:11px; border-bottom:1px solid var(--line); background:var(--panel-soft,#f8fafc); }
.pool-workspace-table-wrap { max-height:calc(100vh - 275px); min-height:430px; overflow:auto; }
.pool-workspace-table { min-width:980px; }
.pool-workspace-table thead th { position:sticky; top:0; z-index:3; background:#f7f9fc; }
.pool-workspace-table td { vertical-align:middle; }
.pool-workspace-table td:nth-child(2) { min-width:170px; }
.pool-workspace-table td:nth-child(2) small { display:block; margin-top:3px; color:var(--muted); }
.pool-workspace-urls { display:grid; gap:4px; min-width:310px; }
.pool-workspace-url { display:flex; align-items:center; gap:7px; min-width:0; }
.pool-workspace-url b { display:grid; place-items:center; flex:0 0 19px; width:19px; height:19px; border-radius:6px; color:#0871dc; background:#eaf4ff; font-size:10px; }
.pool-workspace-url { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.rack-config-list { display:grid; gap:9px; max-height:min(52vh,480px); overflow:auto; padding:2px; }
.rack-config-row { display:grid; grid-template-columns:30px minmax(130px,.55fr) minmax(260px,1fr) 38px; align-items:end; gap:9px; padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--panel-soft,#f8fafc); }
.rack-config-row label { display:grid; gap:5px; }.rack-config-row label > span { color:var(--muted); font-size:10px; font-weight:750; }
.rack-config-row input { min-height:38px; width:100%; border:1px solid var(--line); border-radius:9px; padding:0 10px; color:var(--text); background:var(--panel); }
.rack-config-index { display:grid; place-items:center; width:28px; height:38px; border-radius:9px; color:#0871dc; background:#eaf4ff; font-weight:850; }
.rack-remove-btn { width:38px; height:38px; padding:0; color:#df3e38; font-size:19px; }
.rack-add-btn { margin-top:10px; }
.farm-map .shelf-row { grid-template-columns:26px repeat(var(--slots-per-shelf), minmax(58px,1fr)) !important; }

/* V0.72.1: every rack occupies only the width of its widest real shelf. */
.farm-map .rack-card {
  width: calc(
    var(--farm-row-label) +
    (var(--rack-columns, 5) * var(--farm-slot-size)) +
    (var(--rack-columns, 5) * var(--farm-slot-gap)) +
    34px
  ) !important;
  min-width: calc(
    var(--farm-row-label) +
    (var(--rack-columns, 5) * var(--farm-slot-size)) +
    (var(--rack-columns, 5) * var(--farm-slot-gap)) +
    34px
  ) !important;
  max-width: calc(
    var(--farm-row-label) +
    (var(--rack-columns, 5) * var(--farm-slot-size)) +
    (var(--rack-columns, 5) * var(--farm-slot-gap)) +
    34px
  ) !important;
}

html[data-theme="dark"] .pool-workspace-head { border-color:#344150; background:linear-gradient(135deg,rgba(90,168,245,.10),transparent 48%); }
html[data-theme="dark"] .pool-workspace-toolbar { background:rgba(18,24,32,.96); }
html[data-theme="dark"] .pool-workspace-note,
html[data-theme="dark"] .rack-config-row { background:#171e27; }
html[data-theme="dark"] .pool-workspace-table thead th { background:#202a36; }
html[data-theme="dark"] .pool-workspace-url b,
html[data-theme="dark"] .rack-config-index { color:#82bfff; background:#1b3550; }

@media (max-width:1200px) {
  .pool-workspace-toolbar { grid-template-columns:1fr 1fr auto; }
  .pool-workspace-toolbar button { width:100%; }
}
@media (max-width:760px) {
  .pool-workspace-head { align-items:flex-start; padding:17px 15px 14px; }
  .pool-workspace-head h1 { font-size:21px; }.pool-workspace-head p { display:none; }
  .pool-workspace-toolbar { position:static; grid-template-columns:1fr; }
  .pool-workspace-table-wrap { max-height:none; min-height:0; }
  .rack-config-row { grid-template-columns:30px 1fr 38px; }
  .rack-shelves-field { grid-column:2 / -1; }
}

/* V0.73: profile timeline scheduler and visible pool target selection. */
.schedule-title-row > div:first-child { display:grid; gap:3px; }
.schedule-title-row h2 { margin:0; }
.schedule-title-row p { margin:0; color:var(--muted); font-size:12px; }
.schedule-rows {
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  padding:18px 26px !important;
}
.profile-schedule-rule {
  display:grid;
  grid-template-columns:36px 56px minmax(130px,.45fr) minmax(210px,.75fr) minmax(390px,1.6fr) 38px;
  align-items:end;
  gap:10px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel-soft,#f8fafc);
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.profile-schedule-rule:hover { border-color:rgba(8,113,220,.32); box-shadow:0 10px 25px rgba(15,23,42,.06); transform:translateY(-1px); }
.profile-rule-enabled { align-self:center; display:grid; place-items:center; cursor:pointer; }
.profile-rule-enabled input { position:absolute; opacity:0; pointer-events:none; }
.profile-rule-enabled span { position:relative; width:34px; height:20px; border-radius:99px; background:#cbd5e1; transition:background .2s ease; }
.profile-rule-enabled span::after { content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.18); transition:transform .2s ease; }
.profile-rule-enabled input:checked + span { background:#24b55a; }
.profile-rule-enabled input:checked + span::after { transform:translateX(14px); }
.profile-rule-number { display:grid; gap:2px; align-self:center; }
.profile-rule-number small,.profile-schedule-rule label > span,.profile-rule-days > span { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.profile-rule-number b { font-size:21px; color:#0871dc; }
.profile-rule-time,.profile-rule-profile { display:grid; gap:5px; }
.profile-schedule-rule input[type="time"],.profile-schedule-rule select { width:100%; min-height:40px; border:1px solid var(--line); border-radius:10px; padding:0 11px; color:var(--text); background:var(--panel); font:inherit; }
.profile-rule-days { display:grid; gap:5px; }
.profile-rule-days > div { display:grid; grid-template-columns:repeat(7,minmax(38px,1fr)); gap:5px; }
.profile-day { display:grid; place-items:center; min-height:40px; border:1px solid var(--line); border-radius:10px; color:var(--muted); background:var(--panel); cursor:pointer; transition:.18s ease; }
.profile-day input { position:absolute; opacity:0; pointer-events:none; }
.profile-day b { font-size:12px; }
.profile-day.active { border-color:rgba(8,113,220,.5); color:#0871dc; background:#eaf4ff; box-shadow:inset 0 0 0 1px rgba(8,113,220,.08); }
.profile-rule-remove { width:38px; min-width:38px; height:40px; padding:0; color:#df3e38; border-color:rgba(223,62,56,.22); background:rgba(223,62,56,.05); font-size:20px; }
.profile-schedule-empty { display:flex; align-items:center; justify-content:center; gap:12px; min-height:92px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); background:var(--panel-soft,#f8fafc); }
.profile-schedule-empty > span { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; color:#0871dc; background:#eaf4ff; font-size:24px; }
.profile-schedule-empty div { display:grid; gap:3px; }.profile-schedule-empty small { color:var(--muted); }

.pool-workspace-selection { padding:10px 16px; border-bottom:1px solid var(--line); background:var(--panel); }
.pool-selection-empty,.pool-selection-scope { display:flex; align-items:center; gap:10px; min-height:43px; padding:8px 12px; border:1px dashed var(--line); border-radius:11px; color:var(--muted); background:var(--panel-soft,#f8fafc); }
.pool-selection-empty > span { display:grid; place-items:center; width:27px; height:27px; border-radius:8px; color:#0871dc; background:#eaf4ff; font-weight:900; }
.pool-selection-empty > div,.pool-selection-scope { font-size:12px; }.pool-selection-empty b,.pool-selection-empty small { display:block; }.pool-selection-empty small,.pool-selection-scope span { color:var(--muted); }
.pool-selection-scope { justify-content:center; gap:8px; border-style:solid; }
.pool-selection-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.pool-selection-head > div { display:flex; align-items:baseline; gap:8px; }.pool-selection-head span { color:var(--muted); font-size:11px; }
.pool-selection-head button { min-height:29px; padding:4px 10px; font-size:11px; }
.pool-selection-chips { display:flex; gap:7px; overflow-x:auto; padding:1px 0 4px; scrollbar-width:thin; }
.pool-selection-chip { display:flex; align-items:center; gap:10px; flex:0 0 auto; min-width:150px; min-height:48px; padding:7px 9px 7px 11px; border:1px solid rgba(8,113,220,.22); border-radius:11px; color:var(--text); background:rgba(8,113,220,.055); text-align:left; }
.pool-selection-chip span { display:grid; gap:1px; min-width:0; }.pool-selection-chip b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }.pool-selection-chip small { color:var(--muted); font-size:10px; }.pool-selection-chip i { margin-left:auto; color:var(--muted); font-size:17px; font-style:normal; }
.pool-selection-chip:hover { border-color:rgba(223,62,56,.4); background:rgba(223,62,56,.05); }.pool-selection-chip:hover i { color:#df3e38; }
.pool-workspace-table tr.pool-row-selected td { background:rgba(8,113,220,.045); }

html[data-theme="dark"] .profile-schedule-rule,
html[data-theme="dark"] .profile-schedule-empty,
html[data-theme="dark"] .pool-selection-empty { background:#171e27; }
html[data-theme="dark"] .profile-day.active { color:#82bfff; background:#1b3550; }
html[data-theme="dark"] .profile-schedule-empty > span,
html[data-theme="dark"] .pool-selection-empty > span { color:#82bfff; background:#1b3550; }
html[data-theme="dark"] .pool-selection-chip { background:rgba(90,168,245,.09); }
html[data-theme="dark"] .pool-workspace-table tr.pool-row-selected td { background:rgba(90,168,245,.07); }

@media (max-width:1250px) {
  .profile-schedule-rule { grid-template-columns:36px 50px minmax(120px,.5fr) minmax(190px,.8fr) 38px; }
  .profile-rule-days { grid-column:3 / 5; }.profile-rule-remove { grid-column:5; grid-row:1; }
}
@media (max-width:760px) {
  .schedule-rows { padding:12px !important; }
  .profile-schedule-rule { grid-template-columns:36px 46px 1fr 38px; align-items:end; }
  .profile-rule-time { grid-column:3; }.profile-rule-profile { grid-column:2 / 5; }.profile-rule-days { grid-column:1 / 5; }
  .profile-rule-remove { grid-column:4; grid-row:1; }
  .pool-selection-head > div { display:grid; gap:2px; }
}

/* V0.74.6: compact schedule targets and one coherent surface in both themes. */
body[data-view="schedule"] .schedule-panel {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--panel);
  box-shadow:0 12px 34px rgba(15,23,42,.07);
}
body[data-view="schedule"] .schedule-panel .panel-head {
  padding:20px 24px 14px;
  border-bottom:1px solid var(--line);
}
body[data-view="schedule"] .schedule-toolbar { padding:16px 24px 14px; }
body[data-view="schedule"] .schedule-rows { padding:0 24px 16px !important; }
body[data-view="schedule"] .schedule-targets {
  margin:0 24px 24px;
  padding:16px;
  border-color:var(--line);
  background:var(--panel-soft,#f7f9fc);
}
body[data-view="schedule"] .schedule-selected-asics {
  margin-bottom:12px;
  padding:10px 12px;
  border-color:var(--line);
  background:var(--panel);
}
body[data-view="schedule"] .schedule-selected-title { margin-bottom:8px; }
body[data-view="schedule"] .schedule-selected-title b { font-size:13px; }
body[data-view="schedule"] .schedule-selected-list {
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  overflow-x:auto;
  padding:1px 0 5px;
  scrollbar-width:thin;
}
body[data-view="schedule"] .schedule-selected-chip {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:4px 5px 4px 10px;
  border-radius:9px;
  font-size:12px;
}
body[data-view="schedule"] .schedule-selected-chip b { white-space:nowrap; }
body[data-view="schedule"] .schedule-selected-chip i {
  width:23px;
  height:23px;
  border-radius:6px;
  font-size:15px;
}
body[data-view="schedule"] .schedule-search {
  height:42px;
  margin-bottom:10px;
  border-color:var(--line);
  background:var(--panel);
  color:var(--text);
}
body[data-view="schedule"] .schedule-asic-list {
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:7px;
  max-height:340px;
}
body[data-view="schedule"] .schedule-asic-list label {
  min-height:58px;
  border-color:var(--line);
  background:var(--panel);
}

html[data-theme="dark"] body[data-view="schedule"] .schedule-panel {
  border-color:#303b49;
  background:#151b23 !important;
  box-shadow:0 18px 50px rgba(0,0,0,.28);
}
html[data-theme="dark"] body[data-view="schedule"] .schedule-panel .panel-head,
html[data-theme="dark"] body[data-view="schedule"] .schedule-targets {
  border-color:#303b49;
  background:#1a222c !important;
}
html[data-theme="dark"] body[data-view="schedule"] .schedule-selected-asics,
html[data-theme="dark"] body[data-view="schedule"] .schedule-asic-list label,
html[data-theme="dark"] body[data-view="schedule"] .schedule-search,
html[data-theme="dark"] body[data-view="schedule"] .schedule-toolbar input:not([type="checkbox"]),
html[data-theme="dark"] body[data-view="schedule"] .profile-schedule-rule input[type="time"],
html[data-theme="dark"] body[data-view="schedule"] .profile-schedule-rule select,
html[data-theme="dark"] body[data-view="schedule"] .profile-day {
  border-color:#344150 !important;
  background:#131920 !important;
  color:#e8eef6 !important;
}
html[data-theme="dark"] body[data-view="schedule"] .profile-schedule-rule,
html[data-theme="dark"] body[data-view="schedule"] .profile-schedule-empty {
  border-color:#344150;
  background:#1d2631 !important;
}
html[data-theme="dark"] body[data-view="schedule"] .schedule-selected-chip {
  border-color:#405d85 !important;
  background:#243246 !important;
  color:#e8eef6 !important;
}
html[data-theme="dark"] body[data-view="schedule"] .schedule-selected-chip i {
  color:#ff8585;
  background:rgba(225,65,65,.16);
}
html[data-theme="dark"] body[data-view="schedule"] .schedule-asic-list label:hover {
  border-color:#5a9fe8 !important;
  background:#1d2a38 !important;
}

@media (max-width:760px) {
  body[data-view="schedule"] .schedule-panel { border-radius:14px; }
  body[data-view="schedule"] .schedule-panel .panel-head,
  body[data-view="schedule"] .schedule-toolbar { padding-left:14px; padding-right:14px; }
  body[data-view="schedule"] .schedule-rows { padding-left:14px !important; padding-right:14px !important; }
  body[data-view="schedule"] .schedule-targets { margin:0 14px 14px; padding:12px; }
}

@media (max-width: 760px) {
  .market-ranges { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .market-ranges button { min-width: 0; padding-inline: 6px; font-size: 11px; }
}

/* V0.71 multi-coin market selector and live fan indicators. */
.market-controls {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}
.market-coin-control {
  display: grid;
  gap: 3px;
}
.market-coin-control > span {
  padding-left: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.market-coin-control select {
  height: 36px;
  min-width: 150px;
  padding: 0 32px 0 11px;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.asic-fan-reading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.asic-fan-icon {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  padding: 3px;
  border-radius: 50%;
  color: #20a759;
  background: #eaf8ef;
}
.asic-fan-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  transform-origin: center;
}
.asic-fan-icon.normal svg { animation: asic-fan-spin .82s linear infinite; }
.asic-fan-icon.fast {
  color: #ef3f3f;
  background: #fff0f0;
  box-shadow: 0 0 0 3px rgba(239,63,63,.08);
}
.asic-fan-icon.fast svg { animation: asic-fan-spin .25s linear infinite; }
.asic-fan-icon.stopped { color: #909bab; background: #edf1f5; }
.asic-fan-reading > span:last-child { min-width: 0; }
@keyframes asic-fan-spin { to { transform: rotate(360deg); } }

html[data-theme="dark"] .market-coin-control select { border-color: #435164; background: #1d2631; }
html[data-theme="dark"] .asic-fan-icon.normal { color: #4bd27f; background: #173525; }
html[data-theme="dark"] .asic-fan-icon.fast { color: #ff5b5b; background: #3b2023; }
html[data-theme="dark"] .asic-fan-icon.stopped { color: #7e8997; background: #29333e; }

@media (prefers-reduced-motion: reduce) {
  .asic-fan-icon svg { animation: none !important; }
}
@media (max-width: 760px) {
  .market-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .market-coin-control select { width: 100%; }
}

/* V0.71.1 compact fleet counters and automatic algorithm hashrates. */
.metric-grid {
  display: flex !important;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px !important;
}
.metric-count-group {
  flex: 1 1 360px;
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 8px;
  min-width: 330px;
}
.metric-count {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 82px;
  padding: 12px 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15,23,42,.035);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.metric-count:hover,
.metric-count:focus-visible {
  z-index: 2;
  transform: translateY(-2px);
  border-color: rgba(8,113,220,.32);
  box-shadow: 0 12px 28px rgba(15,23,42,.10);
  outline: none;
}
.metric-count div { display: grid; gap: 3px; }
.metric-count small { color: var(--muted); font-size: 10px; font-weight: 800; }
.metric-count strong { font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-count-flow {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.metric-count-flow i {
  display: block;
  width: 3px;
  min-height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: .42;
}
.metric-count-flow i:nth-child(1) { height: 8px; }
.metric-count-flow i:nth-child(2) { height: 14px; }
.metric-count-flow i:nth-child(3) { height: 22px; }
.metric-count-flow i:nth-child(4) { height: 12px; }
.metric-count-flow i:nth-child(5) { height: 18px; }
.metric-count-online { color: #20a759; }
.metric-count-sleep { color: #6d5ce7; }
.metric-count-offline { color: #e64b45; }
.metric-count-all { color: #667386; }
.metric-count:hover .metric-count-flow i { animation: metric-hash-flow .56s ease-in-out 1; }
.metric-count:hover .metric-count-flow i:nth-child(2) { animation-delay: .05s; }
.metric-count:hover .metric-count-flow i:nth-child(3) { animation-delay: .10s; }
.metric-count:hover .metric-count-flow i:nth-child(4) { animation-delay: .15s; }
.metric-count:hover .metric-count-flow i:nth-child(5) { animation-delay: .20s; }
.metric-count-offline:hover .metric-count-flow i { animation-name: metric-hash-drop; }
.metric-hashrate,
.metric-power {
  flex: 1 1 235px;
  width: auto !important;
  min-width: 220px;
  min-height: 82px !important;
  padding: 14px 16px !important;
}
.metric-hashrate h3,
.metric-power h3 { margin-bottom: 4px !important; }
.metric-hashrate strong,
.metric-power strong { margin-top: 0 !important; font-size: clamp(23px, 2vw, 30px) !important; white-space: nowrap; }
.metric-hashrate small,
.metric-power small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.metric-rate-pulse { animation: none; }
@keyframes metric-hash-flow { 45% { height: 25px; opacity: 1; } }
@keyframes metric-hash-drop { 55% { height: 4px; opacity: .18; } }
@keyframes metric-diamond-pulse { 50% { transform: scale(1.13); opacity: .65; } }

/* Dark theme: never allow light table cells or disabled action rows. */
html[data-theme="dark"] .asic-native-table,
html[data-theme="dark"] .asic-native-table tbody,
html[data-theme="dark"] .asic-native-table tbody tr,
html[data-theme="dark"] .asic-native-table tbody td {
  color: #dbe5f1 !important;
  background: #171e27 !important;
}
html[data-theme="dark"] .asic-boards-table tr.warm td { background: #342d1e !important; }
html[data-theme="dark"] .asic-boards-table tr.hot td,
html[data-theme="dark"] .asic-boards-table tr.problem td { background: #382124 !important; }
html[data-theme="dark"] .asic-action-floating button:hover:not(:disabled) { color: #82bfff !important; background: #1b3550 !important; }
html[data-theme="dark"] .asic-action-floating button.danger:hover:not(:disabled) { color: #ff807a !important; background: #382124 !important; }
html[data-theme="dark"] .asic-action-floating button:disabled {
  color: #7d8998 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .metric-count { border-color: #344150; background: #171e27; }

/* V0.75.5: reachable ASICs with stopped mining are a separate SLEEP state. */
.status-pill.sleep { color:#5948cf; background:rgba(109,92,231,.12); }
.dot.sleep { background:#7b68ee; box-shadow:0 0 0 4px rgba(123,104,238,.12); }
.farm-map-legend .sleep { background:#7b68ee; }
.farm-slot.sleep {
  border-color:rgba(95,78,210,.45);
  background:linear-gradient(180deg,#8b7cf2,#6250cf);
  box-shadow:inset 0 -9px 14px rgba(45,34,115,.20),0 5px 14px rgba(98,80,207,.16);
}
.farm-slot.sleep::after {
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 78% 18%,rgba(255,255,255,.20),transparent 24%);
  pointer-events:none;
}
.farm-slot.sleep .slot-sleep-icon { display:inline-block; font-size:12px; transform:translateY(-1px); }
.asic-card.sleep { border-color:rgba(109,92,231,.30); background:rgba(109,92,231,.06); }
html[data-theme="dark"] .status-pill.sleep { color:#b9adff; background:rgba(123,104,238,.18); }
html[data-theme="dark"] .dot.sleep { background:#a494ff; box-shadow:0 0 0 4px rgba(164,148,255,.12); }
html[data-theme="dark"] .farm-slot.sleep { background:linear-gradient(180deg,#7061d9,#4d3fb1); }

@media (prefers-reduced-motion: reduce) {
  .metric-count-flow,
  .metric-count-flow i,
  .metric-rate-pulse { animation: none !important; }
}
@media (max-width: 760px) {
  .metric-count-group { flex-basis: 100%; min-width: 0; }
  .metric-count { min-height: 70px; padding: 9px; }
  .metric-count-flow { display: none; }
  .metric-count strong { font-size: 21px; }
  .metric-hashrate,
  .metric-power { flex-basis: 100%; }
}

/* V0.71.2 tactile controls, mining coins, electricity and vertical ASIC fans. */
button,
.download-btn {
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
button:hover:not(:disabled),
.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(15,23,42,.10);
}
button:active:not(:disabled),
.download-btn:active { transform: translateY(0) scale(.97); }
.button-symbol {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transform-origin: center;
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}
button:hover .button-symbol.plus { transform: rotate(90deg) scale(1.15); }
.asic-more-btn span {
  display: inline-block;
  transform-origin: center;
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.asic-more-btn:hover span { transform: rotate(90deg) scale(1.15); }
.map-toggle-chevron { transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.map-toggle-btn:hover .map-toggle-chevron { transform: scale(1.18); }
.farm-map-panel.is-collapsed .map-toggle-btn:hover .map-toggle-chevron { transform: rotate(90deg) scale(1.18); }
#themeBtn:hover { transform: translateY(-1px) rotate(18deg); }
#logoutBtn:hover { transform: translate(2px, -1px); }

.nav-asic { width: 21px; height: 21px; stroke-width: 1.8; }
.nav-asic-body { fill: currentColor; fill-opacity: .08; }
.nav-asic .nav-fan { stroke-width: 2; }
.nav-asic .nav-fan-blades { fill: currentColor; stroke: none; opacity: .72; }
.side-nav button:hover .nav-asic .nav-fan { animation-duration: .5s; }
.side-nav button:hover .nav-asic { filter: drop-shadow(0 0 4px rgba(8,113,220,.28)); }
.nav-pool-one,
.nav-pool-two,
.nav-pool-flow { transform-box: fill-box; transform-origin: center; }
.side-nav button:hover .nav-pool-one { animation: nav-pool-lift .72s ease-in-out 1; }
.side-nav button:hover .nav-pool-two { animation: nav-pool-lift .72s ease-in-out .12s 1; }
.side-nav button:hover .nav-pool-flow { animation: nav-pool-flow .72s ease-in-out 1; }
@keyframes nav-pool-lift { 45% { transform: translateY(-2px); opacity: .65; } }
@keyframes nav-pool-flow { 45% { stroke-dasharray: 5 4; stroke-dashoffset: 9; } }

.metric-mining-visual,
.metric-electric-visual {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  overflow: hidden;
  color: #7f5cff;
  background: rgba(127,92,255,.09);
}
.metric > .metric-mining-visual,
.metric > .metric-electric-visual {
  display: block;
  width: 58px !important;
  height: 58px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.mining-static-coin {
  position: absolute;
  z-index: 2;
  inset: 4px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 6px rgba(55,48,95,.16));
}
.coin-logo { display: block; width: 100%; height: 100%; overflow: visible; }
.coin-logo { color: #7f5cff; }
.coin-logo .coin-face { fill: transparent; stroke: currentColor; stroke-width: 1.8; }
.coin-logo text { fill: currentColor; font: 900 17px system-ui, sans-serif; }
.coin-logo-equihash { color: #d99b00; }
.coin-logo-equihash text { font-size: 15px; }
.coin-logo-equihash .zec-bars { fill: none; stroke: currentColor; stroke-width: 1.5; }
.coin-logo-sha256 { color: #f7931a; }
.coin-logo-x11 { color: #008de4; }
.coin-logo-scrypt { color: #66798c; }
.coin-logo-kheavyhash { color: #38bfb0; }
.mining-coin {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  top: -22px;
  font-style: normal;
  filter: drop-shadow(0 3px 4px rgba(55,48,95,.22));
  opacity: 0;
}
.mining-coin.coin-one { left: 5px; }
.mining-coin.coin-two { left: 31px; width: 17px; height: 17px; }
.mining-coin.coin-three { left: 18px; width: 16px; height: 16px; }
.mining-coin.coin-four { left: 20px; width: 18px; height: 18px; }
.metric-hashrate:hover .mining-static-coin { animation: mining-main-hide .12s ease-out 1 forwards; }
.metric-hashrate:hover .mining-coin.coin-one { animation: mining-coin-fall .78s ease-in 0s 1; }
.metric-hashrate:hover .mining-coin.coin-two { animation: mining-coin-fall .78s ease-in .10s 1; }
.metric-hashrate:hover .mining-coin.coin-three { animation: mining-coin-fall .78s ease-in .22s 1; }
.metric-hashrate:hover .mining-coin.coin-four { animation: mining-coin-land .72s cubic-bezier(.2,.72,.25,1) .30s 1 both; }
.metric > .metric-electric-visual { flex: 0 0 50px; width: 50px !important; height: 58px !important; color: #f2a019; overflow: visible; }
.metric-electric-visual svg { width: 100%; height: 100%; overflow: visible; }
.electric-bolt { fill: currentColor; transform-origin: center; opacity: .82; }
.metric-power:hover .electric-bolt { animation: electric-bolt .58s ease-out 1; }
@keyframes mining-coin-fall { 0% { transform: translateY(-2px) rotate(0); opacity: 0; } 16% { opacity: 1; } 100% { transform: translateY(70px) rotate(210deg); opacity: 0; } }
@keyframes mining-main-hide { to { opacity: 0; transform: scale(.72); } }
@keyframes mining-coin-land { 0% { transform: translateY(-2px) scale(.55); opacity: 0; } 18% { opacity: 1; } 78%,100% { transform: translateY(38px) scale(2.55); opacity: 1; } }
@keyframes electric-bolt { 0%,100% { transform: translateY(0) scale(1); opacity: .72; } 28% { transform: translateY(-4px) scale(1.16); opacity: 1; filter: drop-shadow(0 0 6px currentColor); } 58% { transform: translateY(3px) scale(.96); opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  button,
  .download-btn,
  .button-symbol,
  .asic-more-btn span,
  .map-toggle-chevron { transition: none !important; }
  .mining-coin,
  .mining-static-coin,
  .electric-bolt { animation: none !important; }
}

/* Real application views: dashboard, ASIC workspace and schedule. */
body[data-view="dashboard"] .asic-panel { display: none !important; }
body[data-view="dashboard"] .pool-workspace { display: none !important; }
body:not([data-view="dashboard"]) .dashboard-health { display: none !important; }
body[data-view="asics"] .metric-grid,
body[data-view="asics"] .analytics-grid,
body[data-view="asics"] .zec-panel,
body[data-view="asics"] .model-strip,
body[data-view="asics"] .schedule-panel { display: none !important; }
body[data-view="asics"] .pool-workspace { display: none !important; }
body[data-view="schedule"] .dashboard-health,
body[data-view="schedule"] .zec-panel { display: none !important; }
body[data-view="schedule"] .pool-workspace { display: none !important; }
body[data-view="asics"] .asic-panel { display: block !important; margin-top: 0; }
body[data-view="pools"] .metric-grid,
body[data-view="pools"] .analytics-grid,
body[data-view="pools"] .zec-panel,
body[data-view="pools"] .model-strip,
body[data-view="pools"] .schedule-panel,
body[data-view="pools"] .asic-panel { display: none !important; }
body[data-view="pools"] .pool-workspace { display: block !important; margin-top: 0; }

/* V0.73.2: preserve each ASIC worker suffix during bulk changes. */
.pool-preserve-worker {
  display:flex;
  align-items:center;
  gap:10px;
  margin:10px 0 2px;
  padding:10px 12px;
  border:1px solid rgba(8,113,220,.22);
  border-radius:11px;
  background:rgba(8,113,220,.055);
  cursor:pointer;
  transition:opacity .18s ease,border-color .18s ease,background .18s ease;
}
.pool-preserve-worker input { width:18px; height:18px; accent-color:#0871dc; }
.pool-preserve-worker span { display:grid; gap:2px; }
.pool-preserve-worker b { font-size:13px; }
.pool-preserve-worker small { color:var(--muted); font-size:11px; }
.pool-preserve-worker.disabled { opacity:.45; cursor:not-allowed; }
html[data-theme="dark"] .pool-preserve-worker { background:rgba(90,168,245,.08); }

.dashboard-health {
  display: grid;
  grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(120px, .7fr));
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}
.dashboard-health-title,
.dashboard-health-item {
  min-height: 66px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15,23,42,.035);
}
.dashboard-health-title { display: flex; align-items: center; gap: 11px; }
.dashboard-health-title div { display: grid; gap: 3px; }
.dashboard-health-title b { font-size: 15px; }
.dashboard-health-title small { color: var(--muted); font-size: 11px; }
.dashboard-live-dot {
  width: 11px;
  height: 11px;
  border: 3px solid #c9f2d4;
  border-radius: 50%;
  background: #29b957;
  box-shadow: 0 0 0 4px rgba(41,185,87,.09);
}
.dashboard-health-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-health-item span { color: var(--muted); font-size: 12px; font-weight: 700; }
.dashboard-health-item b { font-size: 23px; font-variant-numeric: tabular-nums; }
.dashboard-health-item.healthy b { color: #25a94e; }
.dashboard-health-item.hot b { color: #f09a21; }
.dashboard-health-item.problem b { color: #e1453e; }

.asic-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(8,113,220,.055), transparent 48%);
}
.asic-page-head > div:first-child > span {
  color: #0871dc;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
}
.asic-page-head h1 { margin: 4px 0 3px; font-size: 25px; line-height: 1.1; }
.asic-page-head p { margin: 0; color: var(--muted); font-size: 12px; }
.asic-page-count {
  display: grid;
  min-width: 92px;
  padding: 9px 13px;
  border: 1px solid rgba(8,113,220,.18);
  border-radius: 12px;
  color: #0871dc;
  background: rgba(8,113,220,.06);
  text-align: right;
}
.asic-page-count b { font-size: 19px; }
.asic-page-count span { font-size: 10px; font-weight: 750; text-transform: uppercase; }

html[data-theme="dark"] .dashboard-health-title,
html[data-theme="dark"] .dashboard-health-item { border-color: #344150; background: #171e27; }
html[data-theme="dark"] .asic-page-head { border-color: #344150; background: linear-gradient(135deg, rgba(90,168,245,.10), transparent 48%); }
html[data-theme="dark"] .asic-page-count { border-color: #315f8e; color: #82bfff; background: #1b3550; }

@media (max-width: 1100px) {
  .dashboard-health { grid-template-columns: repeat(3, 1fr); }
  .dashboard-health-title { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .dashboard-health { grid-template-columns: 1fr; }
  .dashboard-health-title { grid-column: auto; }
  .asic-page-head { align-items: flex-start; padding: 17px 15px 14px; }
  .asic-page-head h1 { font-size: 21px; }
  .asic-page-head p { display: none; }
}

/* Compact ASIC command center: no clipped toolbar while the device table scrolls. */
@media (min-width: 921px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 70;
  }
  body[data-view="asics"] .asic-panel { overflow: visible !important; }
  .asic-sticky-command-zone {
    position: sticky;
    top: 72px;
    z-index: 60;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    box-shadow: 0 9px 24px rgba(15,23,42,.08);
    backdrop-filter: blur(16px) saturate(160%);
  }
  .asic-panel > .table-wrap {
    height: calc(100vh - 215px) !important;
    max-height: calc(100vh - 215px) !important;
    min-height: 430px;
  }
}

.asic-list-controls {
  position: static !important;
  top: auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.asic-panel .toolbar { padding: 13px 16px !important; }
.asic-panel .actions.asic-primary-actions {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: wrap;
  align-items: center !important;
  gap: 8px !important;
}
.asic-panel .asic-primary-actions > button,
.asic-panel .asic-primary-actions > .search,
.asic-toolbar-menu > summary {
  order: initial !important;
  width: auto !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.asic-panel .asic-primary-actions > .search {
  display: flex !important;
  flex: 1 1 270px;
  order: -1 !important;
  padding: 0 11px !important;
  border: 1px solid #dbe4ee !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}
.asic-panel .asic-primary-actions > .search input { width: 100% !important; font-size: 12px !important; }
.asic-panel .asic-primary-actions > button { flex: 0 0 auto; }
#allAsicsBtn,
#boardProblemFilterBtn,
#addAsicBtn,
#scanNetworkBtn,
#checkAllBtn { order: initial !important; }

.asic-toolbar-menu { position: relative; flex: 0 0 auto; }
.asic-toolbar-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8e2ed;
  color: #445164;
  background: #f7f9fc;
  cursor: pointer;
  list-style: none;
}
.asic-toolbar-menu > summary::-webkit-details-marker { display: none; }
.asic-toolbar-menu[open] > summary { color: #0871dc; border-color: #9cc7f1; background: #edf6ff; }
.asic-toolbar-menu[open] > summary span { transform: rotate(180deg); }
.asic-toolbar-menu > summary span { transition: transform .18s ease; }
.asic-toolbar-menu > div {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 90;
  display: grid;
  gap: 5px;
  width: 210px;
  padding: 7px;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,.20);
}
.asic-toolbar-menu > div button {
  width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  text-align: left;
}

.asic-sticky-filters {
  position: static !important;
  top: auto !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(125px, 1fr)) auto !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px 14px 10px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.asic-sticky-filters label { gap: 3px !important; }
.asic-sticky-filters label > span {
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.asic-sticky-filters select,
.asic-sticky-filters .filter-reset {
  height: 35px !important;
  min-height: 35px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
}
.asic-sticky-filters .filter-reset { align-self: end; padding: 0 14px !important; }

.selected-action-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 7px 14px 0;
}
.selected-action-bar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #0871dc;
}
.selected-action-bar > div:first-child b { font-size: 20px; }
.selected-action-bar > div:first-child span { color: var(--muted); font-size: 11px; font-weight: 750; }
.selected-action-bar > button,
.selected-action-bar > .asic-toolbar-menu > summary {
  width: auto !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 11px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}
.selected-firmware-menu > div { left: auto; right: 0; }
.selected-asic-tray {
  display:flex;
  flex:1 1 220px;
  align-items:center;
  gap:5px;
  min-width:140px;
  max-width:100%;
  padding:2px 1px 4px;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-width:thin;
}
.selected-asic-chip,
.selected-asic-clear {
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  width:auto !important;
  height:30px !important;
  min-height:30px !important;
  padding:0 9px !important;
  border:1px solid #cfe2fa;
  border-radius:9px !important;
  color:#0869c8;
  background:#edf6ff;
  font-size:10px !important;
  font-weight:800 !important;
  white-space:nowrap;
}
.selected-asic-chip i { color:#6f8daa; font-size:14px; font-style:normal; line-height:1; }
.selected-asic-chip:hover { border-color:#8fc2f3; background:#e2f1ff; }
.selected-asic-chip:hover i { color:#e14848; }
.selected-asic-clear { color:var(--muted); border-color:var(--line); background:var(--panel); }
html[data-theme="dark"] .selected-asic-chip { color:#82bfff; border-color:#315f8e; background:#1b3550; }
html[data-theme="dark"] .selected-asic-clear { color:#cbd4df; border-color:#435164; background:#202a36; }

html[data-theme="dark"] .asic-sticky-command-zone { border-color: #344150; background: rgba(23,30,39,.96); }
html[data-theme="dark"] .asic-panel .asic-primary-actions > .search { border-color: #435164 !important; background: #1d2631 !important; }
html[data-theme="dark"] .asic-toolbar-menu > summary { color: #d8e0ea; border-color: #435164; background: #202a36; }
html[data-theme="dark"] .asic-toolbar-menu[open] > summary { color: #82bfff; border-color: #315f8e; background: #1b3550; }
html[data-theme="dark"] .asic-toolbar-menu > div { border-color: #354150; background: #171e27; }

@media (max-width: 1100px) {
  .asic-sticky-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)) !important; }
  .asic-sticky-filters .filter-reset { width: 100%; }
}
@media (max-width: 760px) {
  .asic-panel .actions.asic-primary-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .asic-panel .asic-primary-actions > .search { grid-column: 1 / -1 !important; }
  .asic-panel .asic-primary-actions > button,
  .asic-panel .asic-primary-actions > .asic-toolbar-menu { width: 100% !important; }
  .asic-toolbar-menu > summary { width: 100% !important; }
  .asic-sticky-command-zone { position: static; }
  .asic-sticky-filters { grid-template-columns: 1fr 1fr !important; }
  .selected-action-bar { flex-wrap: wrap; padding-bottom: 8px; }
  .selected-action-bar > div:first-child { flex-basis: 100%; }
  .selected-asic-tray { flex-basis:100%; order:2; }
  .selected-action-bar > button,
  .selected-action-bar > .asic-toolbar-menu { order:3; }
}

/* V0.73.5: durable ASIC audit log workspace. */
.logs-workspace { display:none; overflow:hidden; }
body[data-view="logs"] .content > :not(.logs-workspace) { display:none !important; }
body[data-view="logs"] .logs-workspace { display:block !important; margin-top:0; }
.logs-workspace-head {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  padding:20px 22px; border-bottom:1px solid var(--line);
  background:linear-gradient(135deg,rgba(8,113,220,.07),transparent 45%);
}
.logs-workspace-head > div:first-child > span { color:#0871dc; font-size:10px; font-weight:850; letter-spacing:.14em; }
.logs-workspace-head h1 { margin:4px 0 3px; font-size:25px; line-height:1.1; }
.logs-workspace-head p { margin:0; color:var(--muted); font-size:13px; }
.logs-workspace-actions { display:flex; align-items:center; gap:12px; }
.logs-workspace-actions > span { color:var(--muted); font-size:12px; font-weight:750; white-space:nowrap; }
.logs-workspace-actions button { min-height:38px; padding:8px 14px; }
.logs-retention { padding:6px 9px; border:1px solid rgba(8,113,220,.16); border-radius:999px; color:#0871dc !important; background:rgba(8,113,220,.07); }
.logs-toolbar { display:grid; grid-template-columns:minmax(280px,1fr) minmax(210px,270px); gap:12px; padding:14px 20px; border-bottom:1px solid var(--line); background:var(--panel); }
.logs-search { display:flex; align-items:center; gap:9px; min-height:42px; padding:0 13px; border:1px solid var(--line); border-radius:12px; background:var(--panel-soft,#f8fafc); transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.logs-search:focus-within { border-color:rgba(8,113,220,.45); background:var(--panel); box-shadow:0 0 0 4px rgba(8,113,220,.09); }
.logs-search > span { color:#0871dc; font-size:17px; font-weight:900; }
.logs-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font:inherit; }
.logs-toolbar select { min-height:42px; padding:0 38px 0 12px; border:1px solid var(--line); border-radius:12px; color:var(--text); background:var(--panel-soft,#f8fafc); font:inherit; font-weight:700; }
.ui-action-button,
button.blue-soft,
button.green-soft,
button.ghost {
  appearance:none;
  border:1px solid rgba(8,113,220,.22);
  border-radius:12px;
  color:#0871dc;
  background:linear-gradient(180deg,#f8fbff 0%,#eaf4ff 100%);
  box-shadow:0 4px 12px rgba(15,23,42,.06),inset 0 1px 0 rgba(255,255,255,.9);
  font-weight:800;
}
button.green-soft { border-color:rgba(27,155,73,.25); color:#17853f; background:linear-gradient(180deg,#fbfffc,#edf9f1); }
button.ghost { border-color:var(--line); color:var(--text); background:var(--panel); }
.ui-action-button:hover:not(:disabled),
button.blue-soft:hover:not(:disabled) { border-color:rgba(8,113,220,.42); background:linear-gradient(180deg,#fff,#dfedff); box-shadow:0 8px 20px rgba(8,113,220,.14); }
.ui-action-icon { display:inline-block; font-size:17px; line-height:1; transition:transform .34s cubic-bezier(.2,.8,.2,1); }
.ui-action-button:hover .ui-action-icon { transform:rotate(115deg); }
.logs-table-head,
.log-row { display:grid; grid-template-columns:145px minmax(160px,1fr) minmax(170px,1fr) minmax(300px,2.2fr); gap:16px; align-items:center; }
.logs-table-head { padding:11px 20px; color:var(--muted); background:var(--panel-soft,#f8fafc); border-bottom:1px solid var(--line); font-size:11px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.logs-rows { max-height:calc(100vh - 230px); min-height:520px; overflow:auto; }
.log-row { position:relative; padding:14px 20px; border-bottom:1px solid var(--line); }
.log-row:last-child { border-bottom:0; }
.log-row > time { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.log-asic b,.log-event b { display:block; font-size:13px; }
.log-asic small { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.log-event { display:flex; align-items:center; gap:8px; }
.log-event i { flex:0 0 9px; width:9px; height:9px; border-radius:3px; background:#28bf63; box-shadow:0 0 0 4px rgba(40,191,99,.10); }
.log-warning .log-event i { background:#f0a024; box-shadow:0 0 0 4px rgba(240,160,36,.11); }
.log-danger .log-event i { background:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.11); }
.log-row > p { margin:0; color:var(--text); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.logs-empty { display:grid; min-height:240px; place-items:center; padding:30px; color:var(--muted); font-size:14px; }
.logs-error { color:#d93333; }
html[data-theme="dark"] .logs-workspace-head { background:linear-gradient(135deg,rgba(90,168,245,.10),transparent 48%); }
html[data-theme="dark"] .logs-table-head { background:#202a36; }
html[data-theme="dark"] .logs-search,
html[data-theme="dark"] .logs-toolbar select { background:#171e27; }
html[data-theme="dark"] .ui-action-button,
html[data-theme="dark"] button.blue-soft { border-color:#315f8e; color:#82bfff; background:linear-gradient(180deg,#20354b,#192d40); box-shadow:0 5px 16px rgba(0,0,0,.18); }
html[data-theme="dark"] button.green-soft { border-color:#315f48; color:#80d89a; background:linear-gradient(180deg,#203a2b,#192d22); }
html[data-theme="dark"] button.ghost { border-color:#344150; color:#d9e1ea; background:#171e27; }
@media (max-width:900px) {
  .logs-workspace-head { align-items:flex-start; padding:17px 15px 14px; }
  .logs-workspace-head p { display:none; }
  .logs-table-head { display:none; }
  .logs-rows { max-height:none; min-height:0; }
  .log-row { grid-template-columns:1fr auto; gap:6px 12px; padding:14px 15px; }
  .log-row > time { grid-column:2; grid-row:1; }
  .log-event { grid-column:1; grid-row:1; }
  .log-asic { grid-column:1 / -1; grid-row:2; }
  .log-row > p { grid-column:1 / -1; grid-row:3; }
  .logs-toolbar { grid-template-columns:1fr; padding:12px 15px; }
  .logs-workspace-actions { flex-wrap:wrap; justify-content:flex-end; }
}

@media (prefers-reduced-motion:reduce) {
  button,.download-btn,.asic-history-link span,.ui-action-icon { transition:none !important; animation:none !important; }
}

/* V0.74.5: clear settings workspace without agent-download block. */
.settings-card { width:min(1120px,calc(100vw - 36px)); max-height:calc(100vh - 36px); overflow:auto; }
.settings-card > .panel-head { position:sticky; top:0; z-index:4; margin:-24px -24px 18px; padding:20px 24px 16px; border-bottom:1px solid var(--line); background:var(--panel); }
.settings-card > .panel-head h3 { margin:0; font-size:23px; }
.settings-card > .panel-head p { margin:4px 0 0; }
.settings-sections { display:grid; gap:18px; }
.settings-section { display:grid; gap:16px; padding:20px; border:1px solid var(--line); border-radius:18px; background:var(--panel-soft,#f8fafc); }
.settings-section-head { display:flex; align-items:center; gap:12px; }
.settings-section-head h4 { margin:0 0 3px; font-size:18px; }
.settings-section-head p { margin:0; }
.settings-step { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border-radius:11px; color:#0871dc; background:#eaf4ff; font-size:15px; font-weight:900; }
.farm-download-card { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(520px,1.4fr); gap:20px; align-items:center; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.farm-download-copy { display:grid; gap:5px; min-width:0; }
.farm-download-copy > b { font-size:19px; }
.farm-download-copy > span:last-child { color:var(--muted); font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
.agent-badge { width:max-content; padding:4px 8px; border-radius:7px; color:#168443; background:#e9f8ee; font-size:9px; font-weight:900; letter-spacing:.11em; }
.farm-download-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.farm-download-actions .download-btn { display:grid; place-items:center; align-content:center; min-height:58px; padding:8px 10px; border-radius:12px; text-align:center; text-decoration:none; }
.farm-download-actions .download-btn b { font-size:12px; }
.farm-download-actions .download-btn small { margin-top:2px; opacity:.7; font-size:9px; }
.pending-users-panel { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.pending-users-panel h5 { margin:0 0 4px; font-size:15px; }
.pending-user-row { border-color:rgba(240,160,36,.32) !important; background:rgba(240,160,36,.05); }
html[data-theme="dark"] .settings-card > .panel-head { background:#171e27; }
html[data-theme="dark"] .settings-section { background:#1d2631; }
html[data-theme="dark"] .settings-step { color:#82bfff; background:#1b3550; }
html[data-theme="dark"] .farm-download-card { background:#171e27; }
html[data-theme="dark"] .agent-badge { color:#65d894; background:#173425; }
@media (max-width:900px) {
  .farm-download-card { grid-template-columns:1fr; }
  .farm-download-actions { grid-template-columns:1fr; }
}

/* V0.74.4: readable miner-check progress and manual restart control. */
.check-cycle-card {
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:9px 10px;
  align-items:center;
  padding:13px 14px 12px !important;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
  box-shadow:0 12px 30px rgba(35,55,80,.08);
}
.check-cycle-trigger {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid #cfe2fa;
  border-radius:13px;
  color:#0871dc;
  background:#edf6ff;
  cursor:pointer;
  transition:transform .22s ease,background .22s ease,border-color .22s ease,box-shadow .22s ease;
}
.check-cycle-trigger svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  transform-origin:center;
}
.check-cycle-trigger:hover:not(:disabled) {
  border-color:#88bdf2;
  background:#e2f1ff;
  box-shadow:0 6px 16px rgba(8,113,220,.18);
  transform:translateY(-1px);
}
.check-cycle-trigger:hover:not(:disabled) svg { animation:check-cycle-turn .65s ease both; }
.check-cycle-trigger:active:not(:disabled) { transform:scale(.94); }
.check-cycle-trigger:disabled { cursor:wait; opacity:1; }
.check-cycle-copy { display:grid; min-width:0; gap:1px; }
.check-cycle-copy small {
  overflow:hidden;
  color:var(--muted);
  font-size:10px;
  font-weight:700;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.check-cycle-copy b {
  overflow:hidden;
  color:var(--text);
  font-size:20px;
  font-variant-numeric:tabular-nums;
  line-height:1.15;
  letter-spacing:-.02em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.check-cycle-copy > span {
  overflow:hidden;
  color:var(--muted);
  font-size:9px;
  font-weight:650;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.check-cycle-track {
  grid-column:1 / -1;
  position:relative;
  overflow:hidden;
  height:7px;
  border-radius:999px;
  background:#e8edf4;
}
.check-cycle-track > i {
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#1684ef,#4ba7ff);
  box-shadow:0 0 10px rgba(8,113,220,.28);
  transition:width .38s ease,background .25s ease;
}
.check-cycle-card .app-version {
  grid-column:1 / -1;
  justify-self:start;
  margin:0 !important;
  font-size:9px;
  line-height:1;
}
.check-cycle-card[data-state="running"] .check-cycle-trigger svg { animation:check-cycle-spin 1.15s linear infinite; }
.check-cycle-card[data-state="running"] .check-cycle-track > i {
  background:linear-gradient(90deg,#0871dc,#58adff,#0871dc);
  background-size:180% 100%;
  animation:check-cycle-flow 1.4s linear infinite;
}
.check-cycle-card[data-state="complete"] .check-cycle-trigger {
  color:#15964a;
  border-color:#bce8cb;
  background:#eaf8ef;
}
.check-cycle-card[data-state="complete"] .check-cycle-track > i { background:linear-gradient(90deg,#1db95b,#52d47f); }
.check-cycle-card[data-state="error"] .check-cycle-trigger {
  color:#e14848;
  border-color:#ffcaca;
  background:#fff0f0;
}
.check-cycle-card[data-state="error"] .check-cycle-track > i { background:#ef5350; }
@keyframes check-cycle-spin { to { transform:rotate(360deg); } }
@keyframes check-cycle-turn { to { transform:rotate(360deg); } }
@keyframes check-cycle-flow { to { background-position:-180% 0; } }
html[data-theme="dark"] .check-cycle-card { background:#171e27; box-shadow:0 12px 30px rgba(0,0,0,.2); }
html[data-theme="dark"] .check-cycle-trigger { color:#82bfff; border-color:#315f8e; background:#1b3550; }
html[data-theme="dark"] .check-cycle-trigger:hover:not(:disabled) { border-color:#4f8eca; background:#214263; }
html[data-theme="dark"] .check-cycle-track { background:#2b3643; }
html[data-theme="dark"] .check-cycle-card[data-state="complete"] .check-cycle-trigger { color:#65d894; border-color:#2b7147; background:#173425; }
html[data-theme="dark"] .check-cycle-card[data-state="error"] .check-cycle-trigger { color:#ff8d8d; border-color:#7e3b42; background:#3d2025; }
@media (min-width:921px) {
  body.sidebar-collapsed .check-cycle-card { display:grid; grid-template-columns:1fr; padding:10px !important; }
  body.sidebar-collapsed .check-cycle-card .check-cycle-copy,
  body.sidebar-collapsed .check-cycle-card .check-cycle-track,
  body.sidebar-collapsed .check-cycle-card .app-version { display:none; }
  body.sidebar-collapsed .check-cycle-trigger { justify-self:center; }
}
@media (prefers-reduced-motion:reduce) {
  .check-cycle-trigger,
  .check-cycle-track > i { transition:none; }
  .check-cycle-trigger svg,
  .check-cycle-track > i { animation:none !important; }
}

/* Keep the schedule surface final: older responsive rules above must not add white gutters. */
body[data-view="schedule"] .schedule-panel { padding:0 !important; }
body[data-view="schedule"] .schedule-selected-list { flex-wrap:nowrap !important; }
@media (min-width:921px) {
  body[data-view="schedule"] .schedule-panel .panel-head { padding-left:24px !important; padding-right:24px !important; }
  body[data-view="schedule"] .schedule-panel .hint { padding-left:24px !important; padding-right:24px !important; }
}

/* V0.75.2: focused personalized installer card in Settings. */
.installer-settings-section { overflow:hidden; }
.installer-download-card {
  display:grid;
  grid-template-columns:54px minmax(0,1fr) minmax(190px,230px);
  gap:16px;
  align-items:center;
  padding:18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
}
.installer-download-icon {
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border-radius:15px;
  color:#0871dc;
  background:#eaf4ff;
  font-size:29px;
  font-weight:800;
  line-height:1;
}
.installer-download-copy { display:grid; gap:5px; min-width:0; }
.installer-download-copy b { font-size:17px; }
.installer-download-copy span { color:var(--muted); font-size:12px; line-height:1.45; }
.installer-download-button {
  display:grid;
  place-items:center;
  align-content:center;
  min-height:58px;
  padding:9px 14px;
  border-radius:13px;
  text-align:center;
  text-decoration:none;
}
.installer-download-button b { font-size:14px; }
.installer-download-button small { margin-top:3px; opacity:.72; font-size:9px; }
.installer-security-hint { margin:-6px 0 0; color:var(--muted); font-size:11px; }
html[data-theme="dark"] .installer-download-card { background:#171e27; }
html[data-theme="dark"] .installer-download-icon { color:#82bfff; background:#1b3550; }
@media (max-width:760px) {
  .installer-download-card { grid-template-columns:48px minmax(0,1fr); }
  .installer-download-icon { width:48px; height:48px; }
  .installer-download-button { grid-column:1 / -1; }
}

/* V0.76.0: "one frequency for all 9 chips" row and bulk profile dialog */
.asic-manual-frequencies .manual-frequency-all {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #dfe6ee;
}
.asic-manual-frequencies .manual-frequency-all label { flex: 0 1 180px; }
.asic-manual-frequencies .manual-frequency-all button { height: 38px; white-space: nowrap; }
#bulkProfileModal .asic-manual-frequencies { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
#bulkProfileModal .modal-card { width: min(560px, calc(100vw - 32px)); }
@media (max-width: 760px) {
  .asic-manual-frequencies { grid-template-columns: repeat(3, minmax(70px, 1fr)); }
}

/* V0.76.3: symmetric dropdown menus ("Ещё", "Прошивка") — older generic
   `.actions button` rules gave each soft button its own margin/height. */
.asic-panel .actions .asic-toolbar-menu > div,
.selected-action-bar .asic-toolbar-menu > div { width: 230px !important; gap: 6px !important; padding: 8px !important; grid-template-columns: minmax(0, 1fr) !important; }
.asic-panel .actions .asic-toolbar-menu > div > button,
.selected-action-bar .asic-toolbar-menu > div > button {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  transform: none;
  /* #bulkAddBtn etc. keep order/grid-column from the old toolbar grid */
  order: 0 !important;
  grid-column: 1 / -1 !important;
  justify-self: stretch !important;
}

/* V0.76.3: clickable "Горячие" / "Проблемы плат" health tiles */
.dashboard-health-item.clickable {
  appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease, background-color .22s ease;
}
.dashboard-health-item.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15,23,42,.09);
}
.dashboard-health-item.clickable:active { transform: translateY(0) scale(.985); }
.dashboard-health-item.clickable:focus-visible { outline: 3px solid rgba(8,113,220,.35); outline-offset: 2px; }
.dashboard-health-item.hot.clickable:hover { border-color: rgba(240,154,33,.45); background: #fff9f0; }
.dashboard-health-item.problem.clickable:hover { border-color: rgba(225,69,62,.4); background: #fff5f4; }
.dashboard-health-item.clickable b { transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.dashboard-health-item.clickable:hover b { transform: scale(1.12); }
.dashboard-health-item.clickable span::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.dashboard-health-item.clickable:hover span::after { opacity: .8; transform: translateX(0); }
/* A soft pulse only when something actually needs attention. */
.dashboard-health-item.clickable.has-alert b { animation: health-alert-pulse 2.4s ease-in-out infinite; }
@keyframes health-alert-pulse { 50% { transform: scale(1.1); opacity: .75; } }
html[data-theme="dark"] .dashboard-health-item.hot.clickable:hover { background: #2b2417; }
html[data-theme="dark"] .dashboard-health-item.problem.clickable:hover { background: #2d1c1c; }
@media (prefers-reduced-motion: reduce) {
  .dashboard-health-item.clickable,
  .dashboard-health-item.clickable b { transition: none; animation: none !important; }
}
/* ID rules from the old toolbar grid (`#bulkAddBtn { grid-column: span 1 !important }`)
   outrank class selectors, so the menu items are pinned by ID as well. */
.asic-toolbar-menu > div > #bulkAddBtn,
.asic-toolbar-menu > div > #exportBtn,
.asic-toolbar-menu > div > #rebootAllBtn,
.asic-toolbar-menu > div > #installPatchSelectedBtn,
.asic-toolbar-menu > div > #installFirmwareSelectedBtn { grid-column: 1 / -1 !important; }
.asic-toolbar-menu > div > #bulkAddBtn,
.asic-toolbar-menu > div > #installPatchSelectedBtn { order: 1 !important; }
.asic-toolbar-menu > div > #exportBtn,
.asic-toolbar-menu > div > #installFirmwareSelectedBtn { order: 2 !important; }
.asic-toolbar-menu > div > #rebootAllBtn { order: 3 !important; }

/* V0.76.4: hot status in the ASIC list, board issue reasons */
.status-pill.hot { color: #c26a00 !important; background: rgba(240,154,33,.14) !important; }
.dot.hot { background: #f09a21 !important; box-shadow: 0 0 0 4px rgba(240,154,33,.14) !important; }
html[data-theme="dark"] .status-pill.hot { color: #ffb45c !important; background: rgba(240,154,33,.18) !important; }
.asic-board-issues {
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid rgba(225,69,62,.28);
  border-radius: 12px;
  color: #b3261e;
  background: #fff5f4;
  font-size: 13px;
}
.asic-board-issues b { display: block; margin-bottom: 4px; }
.asic-board-issues ul { margin: 0; padding-left: 18px; }
.asic-board-issues li + li { margin-top: 2px; }
html[data-theme="dark"] .asic-board-issues { color: #ff9d97; border-color: rgba(255,128,122,.3); background: #2d1c1c; }

/* V0.76.7: the hidden attribute must win over the button/section layout rules */
#detailModal [hidden], .asic-profile-editor[hidden] { display: none !important; }
