:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef5fb;
  --line: #e1e7ef;
  --border: #e1e7ef;
  --line-strong: #cbd5e1;
  --text: #111827;
  --muted: #64748b;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --accent: #14b8a6;
  --danger: #b42318;
  --warning: #a15c07;
  --ok: #087443;
  --sidebar: #08111f;
  --sidebar-panel: #102033;
  --sidebar-muted: #8da2b8;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f9fbfd 0%, var(--bg) 48%);
  background-size: 28px 100%, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 80% 90%, rgba(34, 197, 94, 0.12), transparent 30%),
    #0f172a;
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 30px;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
}

.brand-line,
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-line span,
.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #14b8a6, #22c55e);
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.28);
  color: white;
  font-size: 12px;
}

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

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.08), transparent 34%),
    var(--sidebar);
  color: white;
}

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

.brand {
  margin: 0;
  font-size: 17px;
}

.sidebar-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: white;
  font-size: 24px;
  line-height: 1;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button,
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-muted);
  padding: 11px 12px;
  text-align: left;
  font-weight: 750;
  text-decoration: none;
}

.nav span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #7dd3fc;
  font-size: 15px;
}

.nav b {
  font: inherit;
}

.nav button:hover,
.nav button.active,
.nav a:hover {
  background: var(--sidebar-panel);
  color: white;
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.sidebar-collapsed .sidebar {
  padding-inline: 12px;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .nav b {
  display: none;
}

.sidebar-collapsed .brand,
.sidebar-collapsed .nav button,
.sidebar-collapsed .nav a {
  justify-content: center;
}

.sidebar-collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 58px;
  right: 10px;
  width: 24px;
  height: 24px;
  font-size: 18px;
}

.main {
  width: 100%;
  max-width: 1440px;
  padding: 28px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.metric {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 12px;
  overflow: hidden;
  align-items: center;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #14b8a6, #22c55e);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric strong {
  grid-column: 2;
  font-size: 30px;
  line-height: 1;
}

.metric > .icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e6fffb;
  color: var(--brand);
  padding: 10px;
}

.metric.ok > .icon {
  background: #dcfae6;
  color: var(--ok);
}

.metric.warn > .icon {
  background: #fef0c7;
  color: var(--warning);
}

.metric.bad > .icon {
  background: #fee4e2;
  color: var(--danger);
}

.toolbar,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.form {
  display: grid;
  gap: 12px;
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: #14b8a6;
}

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

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
  outline: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border-radius: 8px;
  background: linear-gradient(180deg, #139b90, var(--brand));
  color: white;
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}

.btn.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.btn.icon-only {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.btn.secondary {
  background: #eef2f6;
  color: var(--text);
}

.btn.danger {
  background: linear-gradient(180deg, #c0392b, var(--danger));
}

.icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.collapse-card {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.grid > .collapse-card {
  margin-top: 0;
}

.collapse-card summary,
.compact-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.collapse-card summary::-webkit-details-marker,
.compact-card > summary::-webkit-details-marker {
  display: none;
}

.collapse-card summary::after,
.compact-card > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.collapse-card[open] summary::after,
.compact-card[open] > summary::after {
  transform: rotate(225deg);
}

.collapse-card summary > .icon {
  margin-right: 8px;
}

.collapse-card > .form,
.collapse-card > .compact-form,
.collapse-card > form,
.collapse-card > div {
  padding: 0 16px 16px;
}

.compact-form {
  display: grid;
  gap: 12px;
}

.compact-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.compact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px 10px;
}

.compact-row strong,
.compact-row small {
  overflow-wrap: anywhere;
}

.compact-row small {
  color: var(--muted);
}

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

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

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

th {
  background: var(--surface-soft);
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fbfdff;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.badge.ok {
  background: #dcfae6;
  color: var(--ok);
}

.badge.bad {
  background: #fee4e2;
  color: var(--danger);
}

.badge.warn {
  background: #fef0c7;
  color: var(--warning);
}

.notice,
.empty {
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 12px;
}

.notice.small {
  margin: 0;
  padding: 10px;
  font-size: 13px;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  padding: 14px;
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast.closing {
  animation: toast-out 160ms ease-in forwards;
}

.toast-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #dcfae6;
  color: var(--ok);
  font-weight: 900;
}

.toast.warn .toast-mark,
.toast.confirm .toast-mark {
  background: #fef0c7;
  color: var(--warning);
}

.toast.bad .toast-mark {
  background: #fee4e2;
  color: var(--danger);
}

.toast-copy {
  min-width: 0;
}

.toast-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.toast-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toast-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.toast-close:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
  animation: toast-progress linear forwards;
}

.toast.warn .toast-progress,
.toast.confirm .toast-progress {
  background: #f59e0b;
}

.toast.bad .toast-progress {
  background: #ef4444;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.empty {
  text-align: center;
  padding: 28px;
}

.media-type {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.media-type.video {
  background: #e0f2fe;
  color: #0369a1;
}

.media-type.image {
  background: #ecfdf3;
  color: #067647;
}

.media-type.link {
  background: #f5f3ff;
  color: #6d28d9;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.network-card {
  display: grid;
  gap: 16px;
}

.network-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.network-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 3px;
}

.network-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-card {
  padding: 0;
  overflow: hidden;
}

.compact-card > :not(summary) {
  margin: 0 16px 14px;
}

.compact-card > summary + .device-meta,
.compact-card > summary + .network-details {
  margin-top: 0;
}

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

.network-details div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px 10px;
}

.network-details span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.network-details strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.network-message {
  margin: 0;
  border-radius: 8px;
  background: #fef0c7;
  color: var(--warning);
  padding: 10px 12px;
  font-weight: 750;
}

.network-message.ok {
  background: #dcfae6;
  color: var(--ok);
}

.device-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.pair-card {
  position: sticky;
  top: 24px;
}

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

.device-card {
  display: grid;
  gap: 14px;
}

.device-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.device-summary h2,
.network-head h2 {
  font-size: 16px;
}

.device-summary p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.device-summary p span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.device-summary .icon {
  width: 14px;
  height: 14px;
}

.summary-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.device-card-head h2 {
  margin: 0 0 3px;
}

.device-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.device-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 800;
}

.device-meta .icon {
  width: 13px;
  height: 13px;
}

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

.device-note {
  margin: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
}

.device-note.ok {
  background: #dcfae6;
  color: var(--ok);
}

.device-note.warn {
  background: #fef0c7;
  color: var(--warning);
}

.device-note.bad {
  background: #fee4e2;
  color: var(--danger);
}

.wifi-modal {
  width: min(680px, 100%);
}

.wifi-scan {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
}

.wifi-scan-head,
.wifi-network {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.wifi-scan-head {
  color: var(--muted);
  font-size: 12px;
}

.wifi-network {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.wifi-network:hover {
  border-color: var(--accent);
}

.wifi-network span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.wifi-network svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.wifi-network em {
  border-radius: 999px;
  background: #dcfae6;
  color: var(--ok);
  padding: 2px 7px;
  font-size: 11px;
  font-style: normal;
}

.wifi-network strong,
.wifi-network small {
  color: var(--muted);
}

.playlist-card {
  display: grid;
  gap: 14px;
}

.playlist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.playlist-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 3px;
}

.playlist-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.playlist-items {
  display: grid;
  gap: 8px;
}

.playlist-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px 34px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px;
}

.playlist-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.playlist-item small {
  color: var(--muted);
}

.item-order {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: white;
  font-size: 12px;
  font-weight: 850;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  padding: 18px;
}

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

.modal-head h2,
.modal-head p {
  margin: 0;
}

.modal-head p {
  color: var(--muted);
}

.preview-frame {
  display: grid;
  place-items: center;
  min-height: 320px;
  border-radius: 8px;
  background: #0f172a;
  overflow: hidden;
}

.preview-frame img,
.preview-frame video,
.preview-frame iframe {
  display: block;
  max-width: 100%;
  max-height: 70vh;
}

.preview-frame iframe {
  width: min(1100px, 90vw);
  height: min(680px, 70vh);
  border: 0;
  background: #fff;
}

.fab-send {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #22c55e);
  color: white;
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.38);
  font-size: 24px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.fab-send:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 52px rgba(20, 184, 166, 0.46);
}

.upload-status {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.selected-file {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.selected-file strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.selected-file span {
  color: var(--muted);
  font-size: 13px;
}

.upload-status.failed {
  border-color: #f3b4ad;
  background: #fff6f5;
}

.upload-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.upload-head strong {
  color: var(--text);
}

.upload-total {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #22c55e);
  transition: width 180ms ease;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.download-card {
  display: grid;
  gap: 16px;
}

.download-items {
  display: grid;
  gap: 10px;
}

.download-item {
  border: 1px solid var(--border);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.download-item.ok {
  border-left-color: #22c55e;
}

.download-item.bad {
  border-left-color: #ef4444;
}

.download-item strong,
.download-item small {
  display: block;
  overflow-wrap: anywhere;
}

.download-item small {
  margin-top: 3px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

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

  .sidebar-collapsed .brand-text,
  .sidebar-collapsed .nav b {
    display: inline;
  }

  .sidebar-collapsed .brand,
  .sidebar-collapsed .nav button,
  .sidebar-collapsed .nav a {
    justify-content: flex-start;
  }

  .sidebar-collapsed .sidebar-toggle {
    position: static;
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .main {
    padding: 20px;
  }

  .cols-2,
  .cols-3,
  .form-row,
  .network-details,
  .device-layout,
  .download-grid,
  .device-meta {
    grid-template-columns: 1fr;
  }

  .pair-card {
    position: static;
  }

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

  .summary-badges .badge + .badge {
    display: none;
  }

  .compact-row {
    grid-template-columns: 1fr;
  }
}
