/* Latency Lab Console - lab UI (loads after site.css) */
.lab__layout {
  display: grid;
  gap: 1rem;
}

.lab__intro h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}

.lab__intro p {
  color: var(--muted);
  max-width: 70ch;
}

.lab__link-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.92rem;
}

.lab__link-status--agent-offline {
  border-color: rgba(255, 107, 138, 0.45);
  background: rgba(255, 107, 138, 0.08);
  color: #ffc8d4;
}

.lab__link-status .agent-name {
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
}

.lab__link-status .agent-name--offline {
  color: var(--danger);
}

.agent-pick--offline .agent-pick__id {
  color: var(--danger);
}

.ops-updated--stale {
  color: var(--danger) !important;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}

.status-dot--ok {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 168, 0.55);
}

.status-dot--bad {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 107, 138, 0.45);
}

.status-dot--unknown {
  background: #64748b;
}

.lab-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.lab-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.ops-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
  width: 100%;
}

.ops-board {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ops-board--offline {
  opacity: 0.78;
}

.ops-board__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(120, 160, 220, 0.18);
}

.ops-board__title {
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ops-board__meta {
  font-size: 0.72rem;
  white-space: nowrap;
}

.ops-board__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

.ops-board .op-card {
  padding: 0.45rem 0.4rem 0.5rem;
  border-radius: 8px;
  background: #0e1626;
}

.ops-board .op-card__top {
  margin-bottom: 0.2rem;
  gap: 0.25rem;
}

.ops-board .op-card__top strong {
  font-size: 0.72rem;
  line-height: 1.15;
}

.ops-board .op-card__logo {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 5px;
}

.ops-board .op-badge {
  font-size: 0.6rem;
  padding: 0.08rem 0.28rem;
}

.ops-board .signal {
  margin: 0.25rem 0 0.3rem;
  min-height: 14px;
  gap: 0.2rem;
}

.ops-board .signal__bar {
  width: 3px;
}

.ops-board .op-card__meta {
  font-size: 0.68rem;
}

.ops-board .wl-badge {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  padding: 0.15rem 0.3rem;
  line-height: 1.2;
}

@media (max-width: 1200px) {
  .ops-board__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ops-boards {
    grid-template-columns: 1fr;
  }

  .ops-board__grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

.op-card {
  border: 1px solid rgba(120, 160, 220, 0.28);
  border-radius: 14px;
  padding: 0.9rem;
  background: #10182a;
}

.op-card--online {
  border-color: rgba(0, 229, 168, 0.55);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 168, 0.08);
}

.op-card--offline {
  opacity: 0.85;
  border-color: rgba(255, 107, 138, 0.35);
}

.op-card--stale {
  opacity: 0.92;
  border-color: rgba(255, 107, 138, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 138, 0.12);
}

.op-card--stale .op-card__top strong {
  color: #ffc8d4;
}

.op-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.op-card__top strong {
  color: #f2f6ff;
  font-size: 1rem;
}

.op-card__logo {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.op-card--offline .op-card__logo,
.op-card--stale .op-card__logo {
  filter: grayscale(1);
  opacity: 0.65;
}

.op-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #041018;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.op-card--offline .op-badge {
  color: #fff;
  background: var(--danger);
}

.op-card__meta {
  display: grid;
  gap: 0.2rem;
  color: #b7c3de;
  font-size: 0.82rem;
}

.wl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.55rem 0 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  width: fit-content;
}

.wl-badge--on {
  color: #041018;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 168, 0.35);
}

.wl-badge--off {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 107, 138, 0.35);
}

.wl-badge--unknown {
  color: #cbd5e1;
  background: rgba(100, 116, 139, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.wl-badge--stale {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 107, 138, 0.35);
  opacity: 0.9;
}

.signal {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  margin: 0.55rem 0 0.65rem;
  min-height: 22px;
}

.signal__bar {
  display: inline-block;
  width: 5px;
  height: var(--h, 10px);
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.28);
}

.signal__bar--on {
  background: linear-gradient(180deg, #5dffc4, var(--accent));
  box-shadow: 0 0 8px rgba(0, 229, 168, 0.35);
}

.op-card--offline .signal__bar--on {
  background: var(--danger);
  box-shadow: none;
}

.signal__rtt {
  margin-left: 0.25rem;
  color: #d7e4ff;
  font-size: 0.78rem;
  line-height: 1;
  align-self: center;
}

.check-ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  width: 100%;
}

.check-ops .agent-picks {
  flex: 1 1 16rem;
  min-width: 0;
}

.ping-method {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1424;
  min-width: 7.5rem;
}

.ping-method[hidden] {
  display: none;
}

.ping-method__legend {
  padding: 0 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.ping-method__opts {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.ping-method__opt {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  user-select: none;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ping-method__opt:hover {
  background: rgba(0, 229, 168, 0.08);
}

.ping-method__opt:has(input:checked) {
  color: #e8fff7;
  border-color: rgba(0, 229, 168, 0.45);
  background: rgba(0, 229, 168, 0.12);
}

.ping-method__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ping-method__opt:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.ping-method__note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

.ping-method--locked .ping-method__opt:has(input:not(:checked)) {
  display: none;
}

.agent-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  width: 100%;
  align-items: center;
}

.agent-pick {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.3rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.agent-pick__label {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  flex: 0 0 auto;
  white-space: nowrap;
}

.agent-pick__id {
  color: var(--accent);
  font-weight: 600;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.88em;
  letter-spacing: 0.02em;
}

.agent-pick .op-pick {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.op-pick {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem 0.4rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1424;
}

.op-pick__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  padding: 0.15rem 0.25rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.op-pick__item:hover:not(.op-pick__item--off) {
  background: rgba(0, 229, 168, 0.08);
}

.op-pick__item--off {
  opacity: 0.35;
  cursor: not-allowed;
}

.op-pick__item input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: inherit;
}

.op-pick__logo {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 5px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.op-pick__item--off .op-pick__logo {
  filter: grayscale(1);
  opacity: 0.55;
}

@media (max-width: 900px) {
  .check-ops {
    flex-direction: column;
    align-items: stretch;
  }

  .ping-method {
    width: 100%;
  }

  .agent-picks {
    grid-template-columns: 1fr;
  }

  .agent-pick__label {
    white-space: normal;
  }

  .op-pick {
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    padding: 0.55rem 0.65rem;
  }

  .op-pick__item {
    flex: 0 0 auto;
  }
}

.lab-form {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field[hidden],
.input[hidden],
textarea[hidden] {
  display: none !important;
}

.field span {
  color: var(--muted);
  font-size: 0.9rem;
}

.input,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d1424;
  color: var(--text);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font: inherit;
  color-scheme: dark;
}

select.input,
.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

select.input option,
.select option {
  background-color: #0d1424;
  color: #e8eefc;
}

select.input option:checked,
.select option:checked,
select.input option:hover,
.select option:hover {
  background-color: #14304a;
  color: #ffffff;
}

select.input option:disabled,
.select option:disabled {
  color: #6b7690;
  background-color: #0a101c;
}

.input:focus,
.select:focus {
  outline: 1px solid rgba(0, 229, 168, 0.45);
}

.input--area {
  resize: vertical;
  min-height: 5rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.45;
}

.user-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
}

/* display:flex above must not override the hidden attribute */
.user-bar[hidden] {
  display: none !important;
}

.user-bar__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.user-bar__meta strong {
  color: var(--text);
}

.user-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.role-badge {
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.role-badge--admin {
  background: rgba(79, 140, 255, 0.2);
  color: #9ec1ff;
}

.role-badge--user {
  background: rgba(0, 229, 168, 0.15);
  color: var(--accent);
}

.role-badge--moderator {
  background: rgba(255, 176, 59, 0.18);
  color: #ffc96a;
}

.servers-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.server-row {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.server-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.server-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.server-row__order {
  display: inline-flex;
  gap: 0.15rem;
}

.btn--icon {
  min-width: 2rem;
  padding-inline: 0.45rem;
  font-family: var(--mono);
  line-height: 1.2;
}

.server-row__title {
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.7rem;
}

.server-row__scan-time {
  font-weight: 500;
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--muted);
}

.server-row__meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--mono);
  margin: 0.25rem 0 0.65rem;
}

.srv-ops {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 900px) {
  .srv-ops {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .srv-ops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.srv-op {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  background: #10182a;
}

.srv-op--ok {
  border-color: rgba(0, 229, 168, 0.45);
}

.srv-op--fail {
  border-color: rgba(255, 107, 138, 0.4);
}

.srv-op__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.srv-op__top strong {
  font-size: 0.88rem;
  color: #f2f6ff;
}

.srv-op__badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  color: #041018;
  background: var(--accent);
}

.srv-op--fail .srv-op__badge {
  color: #fff;
  background: var(--danger);
}

.srv-op__ping {
  color: #b7c3de;
  font-size: 0.8rem;
}

.stats-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.stats-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.7rem;
  align-items: stretch;
}

.stats-row__label {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

.stats-row__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.stat-card {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.stat-card--total {
  max-width: 200px;
}

.stat-card strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.2rem;
  margin-top: 0.25rem;
}

.stat-extra {
  font-size: 0.82rem;
  font-weight: 500;
}

.stat-ok {
  color: #3dd68c;
}

.stat-new {
  color: #5eb8ff;
}

.stats-users {
  display: grid;
  gap: 0.55rem;
}

.stats-users__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  width: fit-content;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 168, 0.45);
  background: rgba(0, 229, 168, 0.1);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.stats-users__toggle::-webkit-details-marker {
  display: none;
}

.stats-users__toggle::before {
  content: "▸";
  font-size: 0.85em;
  line-height: 1;
}

.stats-users[open] > .stats-users__toggle::before {
  content: "▾";
}

.stats-users__toggle:hover {
  background: rgba(0, 229, 168, 0.18);
}

.stats-users__empty {
  margin: 0;
}

.stats-users__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.stats-users__table th,
.stats-users__table td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.stats-users__table th {
  color: var(--muted, #9aa3ad);
  font-weight: 600;
}

.stats-users__uname {
  font-weight: 500;
  white-space: nowrap;
}

.stats-users__table code {
  font-family: var(--mono);
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .stats-row__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-only[hidden],
.user-panel[hidden] {
  display: none !important;
}

.lab-panel__head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lab-panel[data-collapsible] > .lab-panel__head {
  cursor: pointer;
  user-select: none;
}

.lab-panel__collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.lab-panel__collapse:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lab-panel--collapsed .lab-panel__collapse {
  transform: rotate(-90deg);
}

.lab-panel--collapsed > .lab-panel__body {
  display: none;
}

.lab-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.lab-form__actions--admin {
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.lab-form__actions-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.lab-form__actions--admin #maintenance-toggle {
  margin-left: auto;
  flex-shrink: 0;
}

.mono {
  font-family: var(--mono);
}

.lab-progress {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(56, 120, 255, 0.08);
  border: 1px solid rgba(96, 165, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lab-progress__title {
  font-size: 0.78rem;
  color: #8eb4ff;
  margin-bottom: 0.15rem;
}

.lab-progress__skipped {
  font-size: 0.72rem;
  color: #c4a574;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.lab-progress__row {
  display: grid;
  grid-template-columns: 4.6rem 1fr 2.4rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.lab-progress__label {
  color: #a8c4f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-progress__track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.lab-progress__fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.25s ease;
  min-width: 0;
}

.lab-progress__row--done .lab-progress__fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.lab-progress__row--error .lab-progress__fill {
  background: #ef4444;
  width: 100% !important;
  opacity: 0.35;
}

.lab-progress__row--error .lab-progress__label {
  color: #fca5a5;
}

.lab-progress__row--pending .lab-progress__fill {
  background: rgba(255, 255, 255, 0.12);
  width: 0 !important;
}

.lab-progress__pct {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #7a9fd4;
  text-align: right;
}

.lab-progress--completed .lab-progress__title {
  color: #6ee7a0;
}

.lab-progress--simple {
  color: #b8d4ff;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.lab-log {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  color: #d7e4ff;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.lab-abuse-banner {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 93, 93, 0.55);
  background: rgba(232, 93, 93, 0.14);
  color: #ffd4d4;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.lab-abuse-banner[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .lab-preview {
    grid-template-columns: 1fr;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .lab-progress__fill,
  .signal__bar,
  .op-card,
  .btn {
    transition: none !important;
    animation: none !important;
  }
}

/* Кастомные подсказки (сигнал модемов и др.) */
.ll-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4000;
  max-width: min(280px, calc(100vw - 24px));
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 160, 220, 0.28);
  background:
    linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(10, 16, 28, 0.98) 100%);
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  white-space: normal;
}

.ll-tip--visible {
  opacity: 1;
}

.ll-tip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  border-radius: 10px 10px 0 0;
  background: rgba(147, 160, 189, 0.45);
}

.ll-tip[data-state="ok"] {
  border-color: rgba(0, 229, 168, 0.35);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(0, 229, 168, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ll-tip[data-state="ok"]::after {
  background: linear-gradient(90deg, #3dffc0, #00c992);
}

.ll-tip[data-state="partial"] {
  border-color: rgba(240, 180, 41, 0.4);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(240, 180, 41, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ll-tip[data-state="partial"]::after {
  background: linear-gradient(90deg, #ffd56a, #f0b429);
}

.ll-tip[data-state="fail"] {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(239, 68, 68, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ll-tip[data-state="fail"]::after {
  background: linear-gradient(90deg, #ff8d8d, #ef4444);
}

