/* ============================================================
   FLEET DOCTRINE PLANNER — New Eden Tactical Command
   ============================================================ */

:root {
  --bg-deep: #04060c;
  --bg-panel: rgba(10, 18, 32, 0.82);
  --bg-panel-solid: #0a1220;
  --bg-cell: rgba(16, 28, 48, 0.65);
  --blue: #58c8ff;
  --blue-dim: #2a6d94;
  --blue-glow: rgba(88, 200, 255, 0.35);
  --gold: #f0b64c;
  --gold-dim: #8a6a2c;
  --gold-glow: rgba(240, 182, 76, 0.3);
  --red: #ff6b5e;
  --green: #5eff9e;
  --violet: #b18cff;
  --text: #cfe3f2;
  --text-dim: #7d93a8;
  --text-faint: #4a5d70;
  --line: rgba(88, 200, 255, 0.22);
  --line-strong: rgba(88, 200, 255, 0.5);
  --role-dps: #ff6b5e;
  --role-logi: #5eff9e;
  --role-support: #58c8ff;
  --role-fc: #f0b64c;
  --font-display: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: 0.02em;
}

/* ---------- backdrop layers ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -3;
  display: block;
}

.nebula {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  animation: nebulaDrift 60s ease-in-out infinite alternate;
}
.nebula-a {
  width: 55vw; height: 55vw;
  top: -18vw; right: -12vw;
  background: radial-gradient(circle, rgba(30, 80, 140, 0.55), rgba(20, 40, 90, 0.15) 60%, transparent 75%);
}
.nebula-b {
  width: 45vw; height: 45vw;
  bottom: -20vw; left: -10vw;
  background: radial-gradient(circle, rgba(120, 70, 40, 0.35), rgba(70, 40, 60, 0.12) 60%, transparent 75%);
  animation-delay: -30s;
}
@keyframes nebulaDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vw, 3vw) scale(1.12); }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(0, 0, 0, 0.055) 3px 4px
  );
  mix-blend-mode: multiply;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(8, 14, 26, 0.9), rgba(8, 14, 26, 0.55));
  backdrop-filter: blur(6px);
  position: relative;
}
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--blue-glow) 30%, var(--blue-glow) 70%, transparent);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.logo-mark {
  color: var(--blue);
  filter: drop-shadow(0 0 6px var(--blue-glow));
  animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 4px var(--blue-glow)); }
  50% { filter: drop-shadow(0 0 12px var(--blue-glow)); }
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: #eaf6ff;
  text-shadow: 0 0 18px var(--blue-glow);
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.25em;
}
.uplink-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: blink 2.2s ease-in-out infinite;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.clock-block { text-align: right; }
.clock-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-faint);
}
.clock {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(340px, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
  padding: 18px 24px 12px;
  max-width: 1800px;
  margin: 0 auto;
  align-items: start;
}
.right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- panels ---------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(88, 200, 255, 0.06),
    inset 0 0 40px rgba(10, 30, 60, 0.25);
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  position: relative;
  animation: panelIn 0.55s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.composer-panel { animation-delay: 0.08s; }
.summary-panel  { animation-delay: 0.16s; }
.archive-panel  { animation-delay: 0.24s; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to right, rgba(88, 200, 255, 0.08), transparent 65%);
}
.panel-header h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--blue);
  text-shadow: 0 0 10px var(--blue-glow);
}
.hdr-glyph { color: var(--gold); font-size: 10px; margin-right: 6px; }

.panel-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.panel-footer-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-align: center;
  padding: 8px 12px 10px;
  border-top: 1px dashed rgba(88, 200, 255, 0.12);
}

/* ---------- library controls ---------- */
.lib-controls { padding: 12px 14px 6px; }

.lib-search {
  width: 100%;
  background: rgba(5, 10, 20, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lib-search:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 12px var(--blue-glow);
}
.lib-search::placeholder { color: var(--text-faint); }

.role-filters { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.rf-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid rgba(88, 200, 255, 0.18);
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.rf-btn:hover { color: var(--blue); border-color: var(--line-strong); }
.rf-btn.active {
  color: #04121e;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 14px var(--blue-glow);
  font-weight: bold;
}

/* ---------- ship grid ---------- */
.ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  max-height: calc(100vh - 320px);
  min-height: 300px;
  overflow-y: auto;
}

.ship-card {
  background: var(--bg-cell);
  border: 1px solid rgba(88, 200, 255, 0.16);
  padding: 10px 11px 9px;
  cursor: grab;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: border-color 0.25s, transform 0.25s cubic-bezier(0.2, 0.8, 0.25, 1), box-shadow 0.25s;
  user-select: none;
  -webkit-user-select: none;
}
.ship-card::before {
  /* idle shimmer sweep */
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(140, 220, 255, 0.07) 45%, rgba(140, 220, 255, 0.12) 50%, rgba(140, 220, 255, 0.07) 55%, transparent);
  animation: shimmer 7s linear infinite;
  animation-delay: var(--shimmer-delay, 0s);
  pointer-events: none;
}
@keyframes shimmer {
  0%   { left: -80%; }
  22%  { left: 130%; }
  100% { left: 130%; }
}
.ship-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 16px var(--blue-glow);
}
.ship-card:active { cursor: grabbing; }
.ship-card.dragging {
  opacity: 0.35;
  transform: scale(0.96);
  border-style: dashed;
}

.sc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}
.sc-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #eaf6ff;
  line-height: 1.1;
}
.sc-class {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  display: block;
  margin-top: 2px;
}
.role-chip {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.role-chip.DPS     { color: var(--role-dps);     border-color: rgba(255, 107, 94, 0.5);  background: rgba(255, 107, 94, 0.08); }
.role-chip.LOGI    { color: var(--role-logi);    border-color: rgba(94, 255, 158, 0.5);  background: rgba(94, 255, 158, 0.08); }
.role-chip.SUPPORT { color: var(--role-support); border-color: rgba(88, 200, 255, 0.5);  background: rgba(88, 200, 255, 0.08); }
.role-chip.FC      { color: var(--role-fc);      border-color: rgba(240, 182, 76, 0.5);  background: rgba(240, 182, 76, 0.08); }

.sc-stats {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.sc-stat { display: flex; justify-content: space-between; gap: 4px; }
.sc-stat .k { color: var(--text-faint); }
.sc-stat .v { color: var(--text); }
.sc-stat .v.isk { color: var(--gold); }

/* ---------- dropzone / fleet ---------- */
.dropzone {
  min-height: 420px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding: 14px;
  position: relative;
  transition: background 0.25s;
}
.dropzone.drag-over {
  background:
    repeating-linear-gradient(45deg, rgba(88, 200, 255, 0.03) 0 12px, transparent 12px 24px),
    rgba(88, 200, 255, 0.05);
  outline: 1px dashed var(--line-strong);
  outline-offset: -8px;
}

.dropzone-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  pointer-events: none;
  text-align: center;
  padding: 20px;
}
.dropzone-empty p {
  font-family: var(--font-mono);
  letter-spacing: 0.3em;
  font-size: 13px;
  color: var(--text-dim);
}
.dropzone-empty .dz-sub {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}
.dz-reticle { color: var(--blue-dim); opacity: 0.8; }
.dz-ring-outer { animation: spin 24s linear infinite; transform-origin: 60px 60px; }
.dz-ring-inner { animation: spinRev 16s linear infinite; transform-origin: 60px 60px; }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes spinRev { to { transform: rotate(-360deg); } }
.dropzone.has-ships .dropzone-empty { display: none; }

.fleet-slots { display: flex; flex-direction: column; gap: 9px; }

.fleet-slot {
  display: grid;
  grid-template-columns: 4px 1fr auto auto;
  align-items: center;
  gap: 12px;
  background: var(--bg-cell);
  border: 1px solid rgba(88, 200, 255, 0.15);
  padding: 9px 12px 9px 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  animation: slotIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fleet-slot:hover { border-color: var(--line-strong); box-shadow: 0 0 14px rgba(88, 200, 255, 0.1); }
@keyframes slotIn {
  from { opacity: 0; transform: translateX(-18px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.fleet-slot.flash {
  animation: slotFlash 0.5s ease-out;
}
@keyframes slotFlash {
  0% { box-shadow: 0 0 24px var(--blue-glow), inset 0 0 24px rgba(88, 200, 255, 0.25); border-color: var(--blue); }
  100% { box-shadow: none; }
}

.fs-rail { align-self: stretch; }
.fs-rail.DPS     { background: var(--role-dps); box-shadow: 0 0 8px rgba(255,107,94,0.6); }
.fs-rail.LOGI    { background: var(--role-logi); box-shadow: 0 0 8px rgba(94,255,158,0.6); }
.fs-rail.SUPPORT { background: var(--role-support); box-shadow: 0 0 8px rgba(88,200,255,0.6); }
.fs-rail.FC      { background: var(--role-fc); box-shadow: 0 0 8px rgba(240,182,76,0.6); }

.fs-info { min-width: 0; }
.fs-name {
  font-size: 15px;
  font-weight: 700;
  color: #eaf6ff;
  letter-spacing: 0.05em;
}
.fs-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.fs-meta b { color: var(--text-dim); font-weight: normal; }

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(88, 200, 255, 0.25);
  background: rgba(5, 10, 20, 0.6);
}
.qty-btn {
  width: 26px; height: 26px;
  background: transparent;
  border: none;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.qty-btn:hover { background: rgba(88, 200, 255, 0.15); color: #fff; }
.qty-input {
  width: 42px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(88, 200, 255, 0.18);
  border-right: 1px solid rgba(88, 200, 255, 0.18);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
  outline: none;
  padding: 3px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.remove-btn {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid rgba(255, 107, 94, 0.3);
  color: rgba(255, 107, 94, 0.7);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.remove-btn:hover {
  background: rgba(255, 107, 94, 0.15);
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 10px rgba(255, 107, 94, 0.3);
}

/* ---------- summary ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}
.stat-cell {
  background: rgba(5, 10, 20, 0.55);
  border: 1px solid rgba(88, 200, 255, 0.14);
  padding: 10px 12px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.stat-cell.wide { grid-column: 1 / -1; }
.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
}
.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  margin: 3px 0 1px;
  transition: text-shadow 0.3s;
}
.stat-value.blue { color: var(--blue); text-shadow: 0 0 16px var(--blue-glow); }
.stat-value.red  { color: var(--red);  text-shadow: 0 0 16px rgba(255, 107, 94, 0.35); }
.stat-value.gold { color: var(--gold); text-shadow: 0 0 16px var(--gold-glow); }
.stat-unit {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

/* role balance */
.role-balance { padding: 4px 14px 16px; }
.rb-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.rb-warning { color: var(--gold); letter-spacing: 0.1em; animation: blink 1.8s ease-in-out infinite; }

.rb-bar {
  display: flex;
  height: 14px;
  background: rgba(5, 10, 20, 0.7);
  border: 1px solid rgba(88, 200, 255, 0.18);
  overflow: hidden;
}
.rb-seg {
  width: 0%;
  transition: width 0.6s cubic-bezier(0.25, 0.9, 0.3, 1);
  position: relative;
}
.rb-seg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent 55%);
}
.seg-dps     { background: var(--role-dps); }
.seg-logi    { background: var(--role-logi); }
.seg-support { background: var(--role-support); }
.seg-fc      { background: var(--role-fc); }

.rb-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.rb-key b { color: var(--text); font-weight: normal; margin-left: 2px; }
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 5px;
  vertical-align: baseline;
}
.dot-dps     { background: var(--role-dps);     box-shadow: 0 0 6px var(--role-dps); }
.dot-logi    { background: var(--role-logi);    box-shadow: 0 0 6px var(--role-logi); }
.dot-support { background: var(--role-support); box-shadow: 0 0 6px var(--role-support); }
.dot-fc      { background: var(--role-fc);      box-shadow: 0 0 6px var(--role-fc); }

/* ---------- archive ---------- */
.save-row {
  display: flex;
  gap: 8px;
  padding: 14px 14px 8px;
}
.doctrine-input {
  flex: 1;
  background: rgba(5, 10, 20, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.doctrine-input:focus { border-color: var(--gold-dim); box-shadow: 0 0 12px var(--gold-glow); }
.doctrine-input::placeholder { color: var(--text-faint); }

.action-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.25em;
  padding: 8px 18px;
  background: linear-gradient(to bottom, rgba(240, 182, 76, 0.18), rgba(240, 182, 76, 0.06));
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: all 0.2s;
}
.action-btn:hover {
  background: var(--gold);
  color: #1a1206;
  box-shadow: 0 0 18px var(--gold-glow);
}

.ghost-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  background: transparent;
  border: 1px solid rgba(88, 200, 255, 0.25);
  color: var(--text-dim);
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ghost-btn:hover { color: var(--blue); border-color: var(--line-strong); }
.ghost-btn.danger:hover {
  color: var(--red);
  border-color: rgba(255, 107, 94, 0.6);
  box-shadow: 0 0 10px rgba(255, 107, 94, 0.2);
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 14px 14px;
  max-height: 320px;
  overflow-y: auto;
}
.archive-empty {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-align: center;
  padding: 18px 8px;
  border: 1px dashed rgba(88, 200, 255, 0.12);
}
.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-cell);
  border: 1px solid rgba(88, 200, 255, 0.14);
  padding: 8px 10px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  animation: slotIn 0.3s ease-out both;
  transition: border-color 0.2s;
}
.archive-item:hover { border-color: var(--line-strong); }
.ai-info { min-width: 0; flex: 1; }
.ai-name {
  font-weight: 700;
  font-size: 14px;
  color: #eaf6ff;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.ai-actions { display: flex; gap: 5px; flex-shrink: 0; }
.ai-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  background: transparent;
  border: 1px solid rgba(88, 200, 255, 0.28);
  color: var(--blue);
  cursor: pointer;
  transition: all 0.15s;
}
.ai-btn:hover { background: rgba(88, 200, 255, 0.15); box-shadow: 0 0 8px var(--blue-glow); }
.ai-btn.del { border-color: rgba(255, 107, 94, 0.3); color: rgba(255, 107, 94, 0.75); }
.ai-btn.del:hover { background: rgba(255, 107, 94, 0.12); box-shadow: 0 0 8px rgba(255, 107, 94, 0.25); }

/* ---------- statusbar / toast ---------- */
.statusbar {
  display: flex;
  justify-content: space-between;
  padding: 8px 26px 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  max-width: 1800px;
  margin: 0 auto;
}
.status-msg { color: var(--text-dim); }

.toast {
  position: fixed;
  bottom: 34px;
  left: 50%;
  transform: translate(-50%, 24px);
  background: rgba(8, 16, 30, 0.95);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px var(--blue-glow), 0 8px 30px rgba(0,0,0,0.6);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 10px 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.gold { color: var(--gold); border-color: var(--gold-dim); box-shadow: 0 0 24px var(--gold-glow), 0 8px 30px rgba(0,0,0,0.6); }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(5, 10, 20, 0.5); }
::-webkit-scrollbar-thumb {
  background: rgba(88, 200, 255, 0.22);
  border: 1px solid rgba(88, 200, 255, 0.12);
}
::-webkit-scrollbar-thumb:hover { background: rgba(88, 200, 255, 0.4); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .layout { grid-template-columns: 1fr 1fr; }
  .right-col { grid-column: 1 / -1; flex-direction: row; }
  .right-col .panel { flex: 1; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .right-col { flex-direction: column; }
  .ship-grid { max-height: 420px; }
  .dropzone { min-height: 260px; }
}
