/* Variables de tema espacial oscuro (60% fondo, 30% paneles, 10% acento cian) */
:root {
  --bg: #090e1a;
  --surface: #111827;
  --surface-alt: #0b1220;
  --border: rgba(148, 163, 184, 0.16);
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.14);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --ok: #22c55e;
  --err: #ef4444;
  --warn: #f59e0b;
  --wa: #25d366;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 68px;
}

[id] {
  scroll-margin-top: 68px;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
}

/* Barra superior compacta (3 zonas: Marca — Navegación — Acción principal) */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 54px;
  background: rgba(9, 14, 26, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.brand-icon-btn {
  background: transparent;
  border: none;
  padding: 2px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-icon-btn:hover {
  transform: scale(1.06);
}

.brand-icon-btn:active {
  transform: scale(0.95);
}

.brand-svg .ring-outer {
  transform-origin: 48px 48px;
  transition: transform 0.5s ease;
}

.brand-icon-btn:hover .ring-outer {
  transform: rotate(45deg);
}

.brand-icon-btn.scanning .ring-outer {
  animation: otip-spin 1s linear infinite;
}

@keyframes otip-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.nav-tab.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(6, 182, 212, 0.35);
}

.topbar-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wa-icon-btn {
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.36);
  padding: 4px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
}

.wa-icon-btn:hover {
  transform: scale(1.06);
  border-color: var(--wa);
  background: rgba(37, 211, 102, 0.18);
}

.wa-icon-btn:active {
  transform: scale(0.95);
}

.wa-graphic-svg .wa-ring {
  transform-origin: 24px 24px;
  transition: transform 0.5s ease;
}

.wa-icon-btn:hover .wa-ring {
  transform: rotate(45deg);
}

.wa-icon-btn.is-pulsing .wa-ring {
  animation: otip-spin 1.1s linear 1;
}

.full-scan-btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.6);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

.full-scan-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.24);
  transform: translateY(-1px);
}

.full-scan-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.full-scan-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Contenedor principal de pantallas */
.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: grid;
  gap: 16px;
}

.screen-panel {
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-width: 0;
}

.panel h2,
.panel h3 {
  margin: 0;
  font-weight: 650;
  color: var(--text);
  text-wrap: balance;
}

.panel h2 {
  font-size: 1.25rem;
}

.panel h3 {
  font-size: 1.05rem;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.muted-meta {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 4px 0 0;
}

/* Cabecera hero en Pantalla 1 (Resumen Gráfico) */
.hero-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.hero-copy {
  max-width: 82ch;
}

.hero-kicker {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.2;
  text-wrap: balance;
}

.app-description {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.app-description strong {
  color: var(--text);
}

.app-description code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.custom-dev-callout {
  margin-top: 12px;
  padding: 11px 14px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 10px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.custom-dev-callout strong {
  color: var(--accent);
  font-weight: 650;
}

.pwa-pillars {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pillar-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pillar-item strong {
  font-size: 0.84rem;
  color: var(--accent);
  font-weight: 650;
}

.pillar-item span {
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-action-groups {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.action-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.action-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Botones de utilidad */
.perm-btn,
.reset-btn,
.install-btn,
.whatsapp-btn,
.action-btn,
.text-link-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

.perm-btn {
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.perm-btn:hover:not(:disabled) {
  border-color: var(--warn);
  background: rgba(245, 158, 11, 0.22);
}

.reset-btn {
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: var(--surface-alt);
  color: var(--text);
}

.reset-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(148, 163, 184, 0.12);
}

.install-btn {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.install-btn:hover {
  background: rgba(6, 182, 212, 0.24);
}

.whatsapp-btn {
  gap: 8px;
  border: 1px solid rgba(37, 211, 102, 0.48);
  background: rgba(37, 211, 102, 0.12);
  color: #86efac;
}

.whatsapp-btn:hover {
  border-color: var(--wa);
  background: rgba(37, 211, 102, 0.22);
}

.wa-btn-svg {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.whatsapp-btn:hover .wa-btn-svg {
  transform: scale(1.12) rotate(-6deg);
}

.whatsapp-options-btn {
  border: 1px solid rgba(37, 211, 102, 0.34);
  background: rgba(37, 211, 102, 0.06);
  color: #bbf7d0;
}

.whatsapp-options-btn:hover {
  border-color: var(--wa);
  background: rgba(37, 211, 102, 0.16);
}

.text-link-btn {
  min-height: 36px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--accent);
}

.text-link-btn:hover {
  text-decoration: underline;
}

/* Barra de permisos y estado del escaneo */
.perm-status,
.scan-status {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.perm-status.perm-ok {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.perm-status.perm-warn {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.perm-status.perm-err {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.scan-status {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
  color: var(--text);
  font-weight: 500;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Historial de las últimas 5 sesiones en LocalStorage */
.history-panel {
  padding: 16px 20px;
}

.history-head {
  margin-bottom: 10px;
}

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

.history-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.history-select {
  flex: 1 1 280px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
}

.history-select:hover:not(:disabled) {
  border-color: var(--accent);
}

.history-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Contador de visitas local */
.visit-counter-panel {
  padding: 16px 20px;
}

.visit-head {
  margin-bottom: 12px;
}

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

.visit-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 650;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.visit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.visit-stat-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.visit-stat-card.is-primary {
  border-color: rgba(6, 182, 212, 0.42);
  background: rgba(6, 182, 212, 0.08);
}

.visit-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.visit-stat-value {
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.visit-stat-card.is-primary .visit-stat-value {
  color: var(--accent);
}

.visit-stat-sub {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visit-activity-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.visit-activity-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 600;
}

.visit-7day-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.visit-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.visit-day-count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
}

.visit-day-col.is-today .visit-day-count {
  color: var(--accent);
}

.visit-day-track {
  width: 100%;
  height: 40px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 2px;
}

.visit-day-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.45);
  transition: height 0.25s ease;
}

.visit-day-col.is-today .visit-day-bar {
  background: linear-gradient(180deg, #22d3ee, #06b6d4);
}

.visit-day-label {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.footer-visit-badge {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Dashboard visual de gráficos interactivos (Radar + Anillo de salud) */
.visual-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.radar-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

.radar-vertex {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.radar-vertex:focus:not(:focus-visible) {
  outline: none;
}

.radar-vertex:hover {
  filter: brightness(1.25);
}

.health-ring-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.health-ring-svg {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
}

.health-breakdown {
  flex: 1;
  min-width: 180px;
  display: grid;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.9rem;
}

.health-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.health-row strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

/* Cuadrícula 3x3 de telemetría profunda */
#sys-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#sys-info p {
  margin: 0;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-wrap: break-word;
}

#sys-info strong {
  color: var(--accent);
  font-weight: 600;
}

/* Panel de Discos Duros, Capacidad Total y Espacio Utilizado */
.storage-panel {
  display: grid;
  gap: 14px;
}

.storage-panel .panel-head {
  margin-bottom: 0;
}

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

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

.storage-meter-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.storage-meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.storage-pct-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.storage-pct-badge.is-ok {
  color: var(--ok);
}

.storage-pct-badge.is-warn {
  color: var(--warn);
}

.storage-pct-badge.is-err {
  color: var(--err);
}

.storage-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.storage-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.storage-progress-fill.is-ok {
  background: var(--ok);
}

.storage-progress-fill.is-warn {
  background: var(--warn);
}

.storage-progress-fill.is-err {
  background: var(--err);
}

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

.storage-local-disks-panel,
.storage-partitions-panel {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 14px;
  display: grid;
  gap: 10px;
}

.storage-local-disks-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.storage-local-disk-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.storage-partitions-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.storage-partitions-head h4 {
  margin: 0 0 3px;
  font-size: 0.96rem;
  color: var(--text);
}

.storage-partitions-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.storage-partitions-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.storage-partitions-scheme-ctrl {
  display: grid;
  gap: 4px;
  min-width: 210px;
}

.storage-partitions-scheme-ctrl label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.storage-partitions-scheme-ctrl select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
}

.storage-partitions-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.storage-partition-empty {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.storage-partition-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.storage-partition-card.is-warn {
  border-color: rgba(245, 158, 11, 0.45);
}

.storage-partition-card.is-err {
  border-color: rgba(239, 68, 68, 0.5);
}

.storage-partition-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.storage-partition-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text);
}

.storage-partition-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent);
}

.storage-partition-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partition-remove-btn {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.78rem;
  cursor: pointer;
}

.partition-remove-btn:hover {
  border-color: var(--err);
  color: var(--err);
}

.storage-partition-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.79rem;
  color: var(--muted);
}

.storage-partition-finding {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.storage-partition-finding.is-warn {
  color: #fbbf24;
}

.storage-partition-finding.is-err {
  color: #f87171;
}

.partition-add-grid {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr 0.8fr auto;
  gap: 8px;
  align-items: end;
}

.partition-add-btn-wrap {
  display: flex;
}

.storage-smart-import {
  background: rgba(15, 23, 42, 0.55);
  border: 1px dashed rgba(6, 182, 212, 0.32);
  border-radius: 11px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.storage-smart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.storage-smart-row textarea {
  width: 100%;
  min-width: 0;
  min-height: 70px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  resize: vertical;
}

.storage-smart-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.storage-smart-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.storage-form {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.storage-form-actions {
  grid-column: 1 / -1;
}

/* Ficha de identidad del equipo, año de fábrica, modelos similares, soporte técnico y BIOS */
.identity-panel {
  display: grid;
  gap: 14px;
}

.identity-panel .panel-head {
  margin-bottom: 0;
}

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

.identity-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.identity-label {
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.identity-value {
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--text);
  overflow-wrap: break-word;
}

.identity-sub {
  margin: 0;
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: break-word;
}

.identity-list {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text);
}

.identity-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.83rem;
  font-weight: 650;
  color: var(--accent);
  text-decoration: none;
  padding-top: 4px;
}

.identity-link:hover {
  text-decoration: underline;
}

.identity-code {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  background: rgba(9, 14, 26, 0.9);
  color: #67e8f9;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.identity-form {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.identity-form-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.identity-form-wide {
  grid-column: span 2;
}

.identity-form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.identity-form-field select,
.identity-form-field input {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

.identity-form-field select:focus,
.identity-form-field input:focus {
  border-color: var(--accent);
  outline: none;
}

.identity-form-actions {
  grid-column: span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* Pantalla 2: Visor Gráfico Interactivo + Matriz de 9 Pruebas */
.tests-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tests-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.live-stage {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.live-stage-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.stage-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--accent);
}

.stage-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#live-scope-canvas {
  width: 100%;
  height: 150px;
  display: block;
  border-radius: 8px;
  background: #060a14;
}

.key-visual {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.keycap-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: #090e1a;
}

.keycap-char {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.keycap-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.keyboard-probe {
  margin-bottom: 14px;
}

.keyboard-probe input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.part-filter-bar {
  margin-bottom: 14px;
  overflow-x: auto;
}

.part-groups-stack {
  display: grid;
  gap: 16px;
}

.part-group {
  background: rgba(9, 14, 26, 0.42);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.part-group.is-filtered-out {
  display: none;
}

.part-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.part-group-head h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 650;
  color: var(--accent);
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 10px;
}

.button-grid button {
  min-height: 86px;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.15s ease, background-color 0.18s ease;
}

.button-grid button.is-filtered-out {
  display: none;
}

.part-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.button-grid button:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-1px);
}

.button-grid button:active:not(:disabled) {
  transform: scale(0.98);
}

.button-grid button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-title {
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--text);
}

.btn-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.part-readout {
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Pantalla 3: Monitor Gráfico y Registro Filtrable */
.monitor-chart-wrap {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.monitor-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.segmented-filter {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  gap: 4px;
}

.seg-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

#log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

#log-list li {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  word-break: break-word;
}

#log-list li:last-child {
  border-bottom: none;
}

#log-list li.ok {
  color: var(--ok);
}

#log-list li.err {
  color: var(--err);
}

#log-list li.is-filtered-out {
  display: none;
}

/* Pantalla 4: Informe Técnico y Exportación */
.report-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-summary {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.report-summary strong {
  color: var(--text);
}

.report-table-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  margin-bottom: 14px;
  overflow: hidden;
}

.report-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.report-table th,
.report-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.report-table th {
  color: var(--accent);
  font-weight: 600;
  background: rgba(9, 14, 26, 0.9);
}

.report-table th:nth-child(1) { width: 17%; }
.report-table th:nth-child(2) { width: 22%; }
.report-table th:nth-child(3) { width: 17%; }
.report-table th:nth-child(4) { width: 16%; }
.report-table th:nth-child(5) { width: 10%; }
.report-table th:nth-child(6) { width: 18%; }

.report-table tbody tr:last-child td {
  border-bottom: none;
}

/* Estados semánticos limpios sin cápsulas ni píldoras */
.status-badge {
  font-weight: 650;
  font-size: 12px;
  white-space: nowrap;
}

.status-ok { color: var(--ok); }
.status-ok::before { content: "● "; }
.status-err { color: var(--err); }
.status-err::before { content: "✖ "; }
.status-warn { color: var(--warn); }
.status-warn::before { content: "▲ "; }
.status-pending { color: var(--muted); }
.status-pending::before { content: "○ "; }

.report-recommendations {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.report-recommendations h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--accent);
}

.report-recommendations ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 4px;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
}

.action-btn {
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: var(--accent-soft);
  color: var(--text);
}

.action-btn:hover {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.24);
  transform: translateY(-1px);
}

.action-btn.whatsapp-btn {
  border-color: rgba(37, 211, 102, 0.48);
  background: rgba(37, 211, 102, 0.12);
  color: #86efac;
}

.action-btn.whatsapp-options-btn {
  border-color: rgba(37, 211, 102, 0.36);
  background: rgba(37, 211, 102, 0.06);
  color: #bbf7d0;
}

.action-btn.whatsapp-options-btn:hover {
  border-color: var(--wa);
  background: rgba(37, 211, 102, 0.16);
}

.action-btn-secondary {
  background: var(--surface-alt);
  border-color: rgba(148, 163, 184, 0.28);
}

.action-btn-secondary:hover {
  background: rgba(148, 163, 184, 0.14);
}

/* HUD durante prueba RGB de pantalla completa */
body.screen-testing header,
body.screen-testing main,
body.screen-testing nav,
body.screen-testing footer {
  opacity: 0;
  pointer-events: none;
}

.screen-hud {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(9, 14, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Pantalla 5: Funcionamiento amplio y Ayuda paso a paso */
.help-overview {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.help-overview h3 {
  font-size: 1rem;
  color: var(--accent);
}

.help-overview p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.help-overview strong {
  color: var(--text);
}

.help-overview code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.help-specialties {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.help-specialty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.help-specialty-card h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--accent);
}

.help-specialty-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.help-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.help-step-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 650;
}

.step-body p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.step-body strong {
  color: var(--text);
}

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

.faq-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.faq-item strong {
  font-size: 0.9rem;
  color: var(--accent);
}

.faq-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Navegación móvil inferior en zona del pulgar (<= 15% altura sticky total) */
.mobile-tab-bar {
  display: none;
}

/* Modal interactivo de opciones de compartir por WhatsApp */
.wa-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 9, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wa-modal {
  width: min(700px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.wa-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wa-modal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wa-modal-brand h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  color: var(--text);
}

.wa-modal-emblem {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wa-close-btn {
  min-width: 40px;
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.wa-close-btn:hover {
  border-color: var(--accent);
}

.wa-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wa-preset-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.wa-preset-btn strong {
  font-size: 0.86rem;
  color: var(--text);
}

.wa-preset-btn span {
  font-size: 0.76rem;
  color: var(--muted);
}

.wa-preset-btn:hover {
  border-color: rgba(37, 211, 102, 0.55);
}

.wa-preset-btn.is-active {
  border-color: var(--wa);
  background: rgba(37, 211, 102, 0.12);
}

.wa-preset-btn.is-active strong {
  color: #86efac;
}

.wa-phone-field,
.wa-preview-field {
  display: grid;
  gap: 6px;
}

.wa-phone-field label,
.wa-preview-head label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.wa-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wa-feedback {
  font-size: 0.78rem;
  color: #86efac;
  font-weight: 600;
}

.wa-phone-field input,
.wa-preview-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.86rem;
  font-family: inherit;
}

.wa-preview-textarea {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 165px;
}

.wa-phone-field input:focus,
.wa-preview-textarea:focus {
  border-color: var(--wa);
  outline: none;
}

.wa-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.wa-modal-actions .whatsapp-btn {
  flex: 1 1 190px;
}

/* Foco accesible universal */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

footer {
  text-align: center;
  padding: 8px 16px 28px;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Adaptación tablet */
@media (max-width: 960px) {
  .visual-dashboard-grid,
  .help-steps-list,
  .help-faq-grid,
  .help-specialties {
    grid-template-columns: 1fr;
  }

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

  #sys-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .identity-grid,
  .storage-meters-grid,
  .storage-specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

/* Adaptación aplicación móvil PWA (<= 820px) */
@media (max-width: 820px) {
  .topbar-inner {
    gap: 10px;
    padding: 0 12px;
  }

  .desktop-nav {
    display: none;
  }

  .brand-title {
    font-size: 0.84rem;
    line-height: 1.15;
    white-space: normal;
    max-width: 148px;
  }

  .full-scan-btn {
    padding: 8px 11px;
    font-size: 0.82rem;
  }

  .app-shell {
    padding-bottom: 84px;
  }

  footer {
    padding-bottom: 84px;
  }

  .mobile-tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(9, 14, 26, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
  }

  .tab-btn {
    min-height: 48px;
    border: none;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 2px;
  }

  .tab-btn.is-active {
    color: var(--accent);
  }
}

/* Vista apilada de la matriz en pantallas estrechas */
@media (max-width: 680px) {
  .hero-action-groups {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .action-group-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-group-row .reset-btn,
  .action-group-row .whatsapp-btn,
  .action-group-row .whatsapp-options-btn,
  .action-group-row .install-btn {
    grid-column: 1 / -1;
  }

  .wa-modal {
    padding: 14px;
    gap: 10px;
  }

  .wa-preset-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .wa-preset-btn {
    padding: 8px 10px;
  }

  .wa-preview-textarea {
    min-height: 112px;
  }

  .wa-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-actions,
  .history-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .history-select {
    width: 100%;
    flex-basis: auto;
  }

  #sys-info,
  .identity-grid,
  .identity-form,
  .storage-meters-grid,
  .storage-specs-grid,
  .storage-smart-row,
  .storage-form,
  .partition-add-grid {
    grid-template-columns: 1fr;
  }

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

  .visit-7day-bars {
    gap: 5px;
  }

  .storage-head-actions {
    width: 100%;
  }

  .storage-head-actions > button {
    flex: 1 1 140px;
  }

  .identity-form-wide,
  .identity-form-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .identity-form-actions > button {
    width: 100%;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }

  .report-table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  .report-table,
  .report-table tbody,
  .report-table tr,
  .report-table td {
    display: block;
    width: 100%;
  }

  .report-table thead {
    display: none;
  }

  .report-table tbody {
    display: grid;
    gap: 10px;
  }

  .report-table tr {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
  }

  .report-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding: 6px 0;
  }

  .report-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 480px) {
  .panel,
  .hero-strip {
    padding: 16px;
  }

  .button-grid button {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
