/* ==========================================================================
   VOLTDROP — MINIMAL DARK UI
   Inspired by Linear, Vercel, Raycast
   ========================================================================== */

:root {
  --bg:          #0a0a0a;
  --bg-raised:   #111111;
  --bg-elevated: #161616;
  --bg-overlay:  #1a1a1a;
  --border:      rgba(255, 255, 255, 0.08);
  --border-mid:  rgba(255, 255, 255, 0.12);
  --border-high: rgba(255, 255, 255, 0.22);
  --text-1:      #ffffff;
  --text-2:      rgba(255, 255, 255, 0.60);
  --text-3:      rgba(255, 255, 255, 0.35);
  --accent:      #ffffff;
  --accent-bg:   rgba(255, 255, 255, 0.06);
  --accent-glow: rgba(255, 255, 255, 0.1);
  --green:       #22c55e;
  --green-bg:    rgba(34, 197, 94, 0.08);
  --red:         #ef4444;
  --amber:       #f59e0b;
  --r:           10px;
  --r-sm:        6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: fixed;
  top: 0;
  left: 0;
}

/* Very subtle grain texture on the body */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

.app-viewport {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.hidden { display: none !important; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.app-nav {
  height: 48px;
  min-height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand svg { opacity: 0.8; }

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

.nav-icon-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  font-size: 12px;
}
.nav-icon-btn:hover { background: var(--border); color: var(--text-1); }

.network-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: dotPulse 2.5s infinite;
}
.status-dot.small { width: 4px; height: 4px; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.app-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 24px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.view-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeUp 0.2s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   WELCOME — 2 COLUMN
   ========================================================================== */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
  align-items: stretch;
}

.hero-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 0;
}

/* Hero lockup */
.hero-lockup {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.02em;
  width: fit-content;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dotPulse 1.8s infinite;
}

h1 {
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-1);
  margin: 6px 0 10px;
}

.intro {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 380px;
}

/* My Device Card */
.my-device-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg-elevated) 100%);
  border-radius: var(--r);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}
.my-device-card:hover { border-color: var(--border-mid); }

.my-device-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.my-device-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-device-label {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.my-device-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-device-platform {
  font-size: 11.5px;
  color: var(--text-3);
}

.my-device-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 4px 8px;
  border-radius: 20px;
  font-weight: 500;
  flex-shrink: 0;
}



/* Radar column */
.radar-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.nearby-panel {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-raised) 0%, rgba(14, 14, 14, 0.8) 100%);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.nearby-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.nearby-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
}

.nearby-device-count {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-3);
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 12px;
}

.scan-state {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}

.panel-subtitle {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 14px;
  flex-shrink: 0;
}

.device-list-scrollable {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.device-list-scrollable::-webkit-scrollbar { width: 3px; }
.device-list-scrollable::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }

/* Radar Animated Empty State */
.radar-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 20px;
  text-align: center;
}

.radar-visual {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.radar-ring.ring-1 { width: 44px; height: 44px; }
.radar-ring.ring-2 { width: 82px; height: 82px; }
.radar-ring.ring-3 {
  width: 118px;
  height: 118px;
  animation: radarPulse 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  50% { opacity: 0.3; }
  100% { transform: scale(1.15); opacity: 0; }
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(34, 197, 94, 0.15) 0deg, transparent 60deg, transparent 360deg);
  animation: radarSpin 4s linear infinite;
  pointer-events: none;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.radar-center-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  z-index: 2;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.radar-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
}

.radar-status-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
}

.radar-status-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}

/* Feature Grid / Trust Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.feature-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-1px);
}

.feature-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.feature-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.feature-info strong {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-1);
}

.feature-info span {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.4;
}

.nearby-device {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-raised);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}
.nearby-device:hover {
  border-color: var(--border-mid);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.nearby-device:active {
  transform: scale(0.99);
}
.nearby-device:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.nearby-device .device-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--text-1);
}

.nearby-device .device-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nearby-device .device-name,
.nearby-device strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.nearby-device .device-platform,
.nearby-device small {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-family: var(--font);
}

.nearby-device .connect-action-label,
.nearby-device b {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 5px 12px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  font-family: var(--font);
}

.nearby-device:hover .connect-action-label,
.nearby-device:hover b {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
}


.trust-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.trust-pills span {
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 10px;
}

.radar-sweep-icon { display: none; }

/* ==========================================================================
   TRANSFER VIEW
   ========================================================================== */
.transfer-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.transfer-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.connection-code {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-top: 2px;
}

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

.outline-btn {
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.outline-btn:hover { background: var(--border); }

.ghost-btn {
  background: none;
  border: none;
  color: var(--text-3);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ghost-btn:hover { background: var(--border); color: var(--text-2); }
.ghost-btn.leave:hover { color: var(--red); }

.transfer-content-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  overflow: hidden;
}

.transfer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

/* Peer card */
.peer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: var(--r);
  flex-shrink: 0;
}
.peer-card .device-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-2);
  flex-shrink: 0;
  font-size: 16px;
}
.peer-info strong { font-size: 13px; font-weight: 500; display: block; }
.peer-info p { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.peer-state {
  margin-left: auto;
  font-size: 11px;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 3px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.peer-state.connected {
  color: var(--green);
  background: var(--green-bg);
  border-color: rgba(34,197,94,0.2);
}

/* Drop Zone */
.drop-zone {
  flex: 1;
  min-height: 0;
  border: 1px dashed var(--border-mid);
  background: var(--bg-raised);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.drop-zone input { display: none; }
.drop-zone.disabled { opacity: 0.5; cursor: not-allowed; }
.drop-zone:not(.disabled):not(.has-staged):hover { border-color: var(--border-high); background: var(--bg-elevated); }
.drop-zone:not(.disabled).drag { border-color: rgba(255,255,255,0.4); background: var(--bg-elevated); }

.drop-zone.has-staged {
  border-style: solid;
  border-color: var(--border);
  padding: 14px 16px;
  cursor: default;
  background: var(--bg-raised);
}

.drop-idle-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.drop-content { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop-icon { color: var(--text-3); margin-bottom: 4px; }
.drop-content h2 { font-size: 14px; font-weight: 500; color: var(--text-2); }
.drop-content p { font-size: 12px; color: var(--text-3); }
.drop-content label {
  color: var(--text-2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.drop-content label:hover { color: var(--text-1); }
.drop-icon-float { display: none; }

/* Staged chamber */
.staged-chamber {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.chamber-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text-2);
}
.staged-title-bold {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.staged-total-pill {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-3);
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

.add-more-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.add-more-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
}

.staged-files-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}
.staged-files-list::-webkit-scrollbar { width: 3px; }
.staged-files-list::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }

.staged-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  box-sizing: border-box;
}
.staged-file-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-mid);
  transform: translateY(-1px);
}

.staged-file-type-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.badge-image { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.25); }
.badge-video { background: rgba(168, 85, 247, 0.12); border: 1px solid rgba(168, 85, 247, 0.25); }
.badge-audio { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-code  { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-doc   { background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.25); }
.badge-archive { background: rgba(249, 115, 22, 0.12); border: 1px solid rgba(249, 115, 22, 0.25); }
.badge-generic { background: var(--bg-overlay); border: 1px solid var(--border); }

.staged-file-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.staged-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staged-file-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-3);
}

.staged-file-ext-tag {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 4px;
  border-radius: 4px;
}

.staged-file-dot {
  opacity: 0.5;
}

.staged-file-size {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
}

.remove-staged-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
}
.remove-staged-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.chamber-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}



.beam-action-btn {
  flex: 1;
  position: relative;
  background: var(--text-1);
  border: none;
  border-radius: var(--r-sm);
  padding: 9px 16px;
  color: var(--bg);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
}
.beam-action-btn:hover { opacity: 0.9; }
.btn-beam-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06), transparent);
  transform: skewX(-20deg);
  animation: shineSweep 3s infinite;
}
@keyframes shineSweep {
  0% { left: -100%; }
  50%, 100% { left: 180%; }
}
.btn-send-icon { display: none; }

/* Transfer right panel */
.transfer-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: var(--r);
  padding: 14px;
}

.transfer-queue-header { flex-shrink: 0; }
.transfer-list-scrollable {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.transfer-list-scrollable::-webkit-scrollbar { width: 3px; }
.transfer-list-scrollable::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.empty-transfer-msg {
  font-size: 12px;
  color: var(--text-3);
  padding: 12px 0;
}

.session-note {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* File rows */
.file-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 12px;
  transition: border-color 0.15s;
}

.file-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-ext {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 5px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-1);
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.file-size-info {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
}

.file-speed-pill, .file-eta-pill, .file-done-pill {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
}

.file-done-pill { color: var(--green); }

.file-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.file-status {
  font-size: 11px;
  color: var(--green);
  font-family: var(--mono);
  white-space: nowrap;
}

.file-status.cancelled { color: var(--red) !important; }
.file-row.cancelled-row { opacity: 0.5; }

/* Progress bar — always visible, full width below the row content */
.file-progress-wrap {
  width: 100%;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.file-progress-bar {
  height: 100%;
  background: var(--text-1);
  border-radius: 2px;
  transition: width 0.25s linear;
  min-width: 2px; /* always show a sliver even at 0% */
}

.file-cancel-btn {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.file-cancel-btn:hover { color: var(--red); background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }


/* ==========================================================================
   TRANSFER OVERLAY — Minimal Maglev
   ========================================================================== */
.transfer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  animation: fadeUp 0.2s ease-out;
  gap: 24px;
}

.maglev-overlay-track {
  position: relative;
  width: 80px;
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

.mol-rail {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border-mid);
}
.mol-rail-left  { left: 12px; }
.mol-rail-right { right: 12px; }

.mol-coil {
  width: 80px;
  height: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 3px;
  z-index: 1;
  transition: border-color 0.15s, background 0.15s;
}
.mol-coil.lit {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}

.mol-pod {
  position: absolute;
  z-index: 5;
  width: 48px;
  height: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  top: 80px;
  transition: none;
}
.mol-pod.launch-up { animation: molLaunchUp 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.mol-pod.arrive-down { animation: molArriveDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes molLaunchUp {
  0%   { top: 80px; opacity: 1; }
  100% { top: -180px; opacity: 0; }
}
@keyframes molArriveDown {
  0%   { top: -180px; opacity: 0; }
  80%  { top: 88px; opacity: 1; }
  100% { top: 80px; opacity: 1; }
}

.mol-pod-clamp {
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  border: 1px solid var(--border-mid);
  transition: background 0.2s, border-color 0.2s;
}
.mol-pod-clamp.locked {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.mol-pod-window {
  width: 34px;
  height: 46px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  font-family: var(--mono);
}

.mol-pod-led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: dotPulse 0.8s infinite alternate;
}

.flight-beam-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 200px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  height: 36px;
  min-height: 36px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  background: rgba(10,10,10,0.9);
  flex-shrink: 0;
  z-index: 10;
  font-size: 11px;
  color: var(--text-3);
}

/* ==========================================================================
   HIGHLIGHT / BADGE STATES
   ========================================================================== */
.highlight { color: var(--text-1); }
.eyebrow { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }

/* Telemetry / speed display */
.telem-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 820px) {
  .app-main { padding: 14px 16px; }

  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    overflow-y: auto;
  }

  .hero-col { gap: 14px; }
  .hero-icon-wrap { display: none; }
  h1 { font-size: 26px; }

  /* Stack transfer panels vertically on mobile */
  .transfer-content-split {
    grid-template-columns: 1fr;
    overflow-y: auto;
    gap: 10px;
  }

  .transfer-left {
    flex-shrink: 0;
  }

  /* Drop zone: fixed height on mobile so activity log is reachable */
  .drop-zone {
    min-height: 140px;
    flex: 0 0 auto;
  }

  /* Activity panel: compact, visible, below drop zone */
  .transfer-right {
    display: flex;
    flex-shrink: 0;
    min-height: 0;
    max-height: 280px;
    border-radius: var(--r);
  }

  /* Make the list itself scrollable within the fixed container */
  .transfer-list-scrollable {
    max-height: 180px;
  }

  /* Compact file rows on mobile */
  .file-row {
    padding: 8px 10px;
  }

  .file-meta {
    display: none;
  }

  /* Hide session note on mobile to save space */
  .session-note { display: none; }
}

@media (max-width: 480px) {
  .app-nav { padding: 0 14px; }
  .app-main { padding: 12px 14px; }
  .nav-center-hud { display: none; }

  .trust-pills span:not(:first-child):not(:nth-child(2)) { display: none; }
}

/* ==========================================================================
   MISC COMPONENTS (used by app.js)
   ========================================================================== */
.transfer-queue-header .panel-title { font-size: 13px; font-weight: 500; }

.panel-chrome-top,
.hud-corner,
.aurora,
.nebula-one,
.nebula-two { display: none; }

/* Searching dot animation used in .searching */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Keep the old telemetry display working */
.telem-row { font-size: 11px; color: var(--text-3); font-family: var(--mono); }

/* Progress bar animation */
@keyframes progressPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

/* podHover used by inline styles */
@keyframes podHover {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

/* Scrollable list for nearby devices also used for staged files */
.transfer-list-scrollable::-webkit-scrollbar { width: 3px; }
.transfer-list-scrollable::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Maglev overlay animations used by app.js */
@keyframes podLed { 0% { opacity: 0.3; } 100% { opacity: 1; } }
@keyframes molLedBlink { 0% { opacity: 0.3; } 100% { opacity: 1; } }

/* ==========================================================================
   TRANSFER REQUEST POPUP (Accept / Decline)
   ========================================================================== */
.tr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: trFadeIn 0.2s ease;
}

.tr-overlay.hidden { display: none; }

@keyframes trFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tr-modal {
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: trSlideUp 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

@keyframes trSlideUp {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.tr-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
}

.tr-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tr-label {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
  letter-spacing: 0.01em;
}

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

.tr-sender {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
  letter-spacing: -0.02em;
}

.tr-device-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.4;
}

.tr-file-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tr-file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.tr-file-list li .tr-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-1);
}

.tr-file-list li .tr-file-size {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  flex-shrink: 0;
}

.tr-file-list li .tr-file-ext {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 5px;
  flex-shrink: 0;
}

/* More-files indicator */
.tr-file-more {
  font-size: 11px;
  color: var(--text-3);
  padding: 4px 0 0 2px;
}

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

.tr-btn {
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, transform 0.1s;
}

.tr-btn:active { transform: scale(0.97); }

.tr-decline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-2);
}

.tr-decline:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-1); }

.tr-accept {
  background: var(--text-1);
  color: #000;
}

.tr-accept:hover { opacity: 0.9; }

@media (max-width: 480px) {
  .tr-modal {
    padding: 22px 20px 20px;
  }
  .tr-sender { font-size: 18px; }
}
