/* NOMAD. OS Core Design System */

:root {
  --bg-primary: #050505;
  --bg-tile: #0c0c0f;
  --bg-panel: #111116;
  --accent-neon: #00FF9D;
  --accent-neon-glow: rgba(0, 255, 157, 0.4);
  --accent-red: #FF3B30;
  --accent-red-glow: rgba(255, 59, 48, 0.4);
  --accent-yellow: #FFCC00;
  --accent-yellow-glow: rgba(255, 204, 0, 0.3);
  --text-white: #f8fafc;
  --text-gray: #94a3b8;
  --text-dark-gray: #475569;
  
  --font-ui: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --glow-shadow: 0 0 10px var(--accent-neon-glow);
  --border-glow: 1px solid rgba(0, 255, 157, 0.2);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-white);
  font-family: var(--font-ui);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* 1. Dynamic Scanline Effect */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--accent-neon-glow), transparent);
  opacity: 0.5;
  z-index: 9999;
  pointer-events: none;
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(-10px); }
  100% { transform: translateY(100vh); }
}

/* 2. Tactical Corners Border Utility */
.tactical-border {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tactical-border::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--accent-neon);
  border-left: 2px solid var(--accent-neon);
  pointer-events: none;
  filter: drop-shadow(0 0 2px var(--accent-neon));
}

.tactical-border::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-bottom: 2px solid var(--accent-neon);
  border-right: 2px solid var(--accent-neon);
  pointer-events: none;
  filter: drop-shadow(0 0 2px var(--accent-neon));
}

/* Glow Text Utility */
.text-glow {
  text-shadow: 0 0 8px var(--accent-neon-glow);
  color: var(--accent-neon);
}

/* 3. Terminal Layout */
.terminal-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 16px;
  gap: 16px;
}

/* 4. Terminal Header */
.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-tile);
  padding: 12px 24px;
  height: 70px;
  border-radius: 4px;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-neon);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-neon);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent-neon);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-white);
  text-transform: uppercase;
}

.logo span {
  color: var(--accent-neon);
  text-shadow: 0 0 8px var(--accent-neon-glow);
}

.header-center {
  display: flex;
  gap: 32px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-gray);
  letter-spacing: 1px;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.countdown-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-gray);
  letter-spacing: 1px;
}

.countdown-timer {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-neon);
  text-shadow: 0 0 8px var(--accent-neon-glow);
}

/* 5. Terminal Tiles Grid */
.terminal-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  margin-bottom: 70px; /* Space for floating tab bar on mobile */
}

.terminal-tile {
  display: none; /* Tabbed on mobile */
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 12px;
}

.terminal-tile.active-tile {
  display: flex;
}

.tile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.tile-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-neon);
  font-weight: bold;
}

.tile-header h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-white);
}

.tile-header h2 span {
  font-size: 12px;
  color: var(--text-gray);
  font-weight: 400;
  margin-left: 8px;
}

.tile-icon {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--accent-neon);
  filter: drop-shadow(0 0 2px var(--accent-neon));
}

.tile-body {
  flex: 1;
  background-color: var(--bg-tile);
  border-radius: 4px;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* HUD Widget Stylings */
.hud-widget {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-gray);
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

/* Command Center Components */
.node-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.node-title {
  font-size: 20px;
  font-weight: 700;
}

.node-coords {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-neon);
}

.node-weather {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 4px;
}

.weather-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-neon);
}

.weather-info {
  display: flex;
  flex-direction: column;
}

.weather-info .temp {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
}

.weather-info .desc {
  font-size: 11px;
  color: var(--text-gray);
}

/* Countdown Grid */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.time-block {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.time-num {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-neon);
}

.time-unit {
  font-size: 9px;
  color: var(--text-gray);
  margin-top: 4px;
}

/* Progress bar */
.system-sync-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-container {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--accent-neon);
}

.progress-fill.glow-green {
  box-shadow: 0 0 8px var(--accent-neon-glow);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-gray);
}

/* Circular Gauge & Logistics */
.payload-status {
  display: flex;
  align-items: center;
  gap: 20px;
}

.payload-gauge {
  width: 80px;
  height: 80px;
}

.circular-meter {
  transform: rotate(-90deg);
}

.meter-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8;
}

.meter-fill {
  fill: none;
  stroke: var(--accent-neon);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease-out;
}

.meter-fill.glow-green {
  filter: drop-shadow(0 0 3px var(--accent-neon));
}

.meter-text {
  fill: var(--text-white);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: bold;
  text-anchor: middle;
  transform: rotate(90deg) translate(0px, -45px); /* Correct visual center alignment */
}

.payload-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payload-metric {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
}

.metric-label {
  color: var(--text-gray);
}

.metric-val {
  font-weight: bold;
  color: var(--accent-neon);
}

.payload-desc {
  font-size: 10px;
  color: var(--accent-neon);
  background-color: rgba(0, 255, 157, 0.05);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--accent-neon);
}

/* Control Rows for lists */
.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.scheduler-filters, .packing-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.filter-btn, .filter-btn-packing {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn-packing:hover,
.filter-btn.active, .filter-btn-packing.active {
  border-color: var(--accent-neon);
  color: var(--accent-neon);
  background-color: rgba(0, 255, 157, 0.05);
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.2);
}

.action-btn {
  background: var(--bg-primary);
  border: var(--border-glow);
  color: var(--accent-neon);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--glow-shadow);
  transition: all 0.2s ease;
}

.action-btn i {
  width: 12px;
  height: 12px;
}

.action-btn:hover {
  background-color: var(--accent-neon);
  color: var(--bg-primary);
  box-shadow: 0 0 15px var(--accent-neon);
}

/* Tactical Entry Forms */
.tactical-form {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 157, 0.2);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-neon);
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(0, 255, 157, 0.2);
  padding-bottom: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  padding: 8px 12px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-neon);
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.2);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.form-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
}

.btn-cancel:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background-color: rgba(255, 59, 48, 0.05);
}

.btn-submit {
  background-color: transparent;
  border: var(--border-glow);
  color: var(--accent-neon);
  box-shadow: var(--glow-shadow);
}

.btn-submit:hover {
  background-color: var(--accent-neon);
  color: var(--bg-primary);
  box-shadow: 0 0 15px var(--accent-neon);
}

/* Scheduler Node List */
.node-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.itinerary-node {
  display: flex;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 14px;
  gap: 14px;
  align-items: center;
  position: relative;
  transition: all 0.2s ease;
}

.itinerary-node:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.02);
}

.node-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-type-icon i {
  width: 16px;
  height: 16px;
}

.node-type-icon.transport i { color: var(--accent-neon); }
.node-type-icon.accommodation i { color: var(--accent-yellow); }
.node-type-icon.attraction i { color: var(--text-white); }

.node-main-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

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

.node-title-text {
  font-size: 14px;
  font-weight: 700;
}

.node-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: bold;
}

.node-tag.transport { background-color: rgba(0, 255, 157, 0.1); color: var(--accent-neon); }
.node-tag.accommodation { background-color: rgba(255, 204, 0, 0.1); color: var(--accent-yellow); }
.node-tag.attraction { background-color: rgba(255, 255, 255, 0.05); color: var(--text-white); }

.node-meta-row {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-gray);
}

.node-meta-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.node-meta-row span i {
  width: 10px;
  height: 10px;
}

.node-right-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.node-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: bold;
  color: var(--text-white);
}

.node-status-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
}

.status-unbooked {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.status-pending {
  background-color: rgba(255, 204, 0, 0.1);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 204, 0, 0.2);
}

.status-confirmed {
  background-color: rgba(0, 255, 157, 0.1);
  color: var(--accent-neon);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.node-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dark-gray);
  cursor: pointer;
  padding: 4px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  color: var(--accent-red);
  background-color: rgba(255, 59, 48, 0.05);
}

.icon-btn.to-finance:hover {
  color: var(--accent-neon);
  background-color: rgba(0, 255, 157, 0.05);
}

.icon-btn i {
  width: 14px;
  height: 14px;
}

/* Travel Log stream */
.log-stream-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 12px;
}

.log-stream-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 3px;
  width: 1px;
  height: calc(100% - 16px);
  background: rgba(255, 255, 255, 0.05);
}

.log-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  padding: 14px;
  position: relative;
  transition: all 0.2s ease;
}

.log-item:hover {
  border-color: rgba(255, 255, 255, 0.06);
}

.log-timeline-dot {
  position: absolute;
  left: -12.5px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dark-gray);
  border: 2px solid var(--bg-tile);
}

.log-item:first-of-type .log-timeline-dot {
  background-color: var(--accent-neon);
  box-shadow: 0 0 6px var(--accent-neon);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-gray);
}

.log-coords {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-neon);
}

.log-mood-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
}

.mood-excited { background-color: rgba(255, 59, 48, 0.1); color: var(--accent-red); border: 1px solid rgba(255, 59, 48, 0.2); }
.mood-calm { background-color: rgba(0, 255, 157, 0.1); color: var(--accent-neon); border: 1px solid rgba(0, 255, 157, 0.2); }
.mood-anxious { background-color: rgba(255, 204, 0, 0.1); color: var(--accent-yellow); border: 1px solid rgba(255, 204, 0, 0.2); }
.mood-exhausted { background-color: rgba(255, 255, 255, 0.05); color: var(--text-white); border: 1px solid rgba(255, 255, 255, 0.1); }

.log-content-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-white);
  white-space: pre-wrap;
}

/* Packing Checklist Grid */
.control-row-packing {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.packing-quick-add {
  display: flex;
  gap: 8px;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.packing-quick-add input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 11px;
  outline: none;
}

.packing-quick-add select {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  outline: none;
}

.checkbox-critical {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.checkbox-critical input {
  display: none;
}

.crit-indicator {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: bold;
  padding: 4px 6px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-dark-gray);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.checkbox-critical input:checked + .crit-indicator {
  background-color: rgba(255, 59, 48, 0.15);
  color: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red-glow);
}

.quick-add-btn {
  background: transparent;
  border: var(--border-glow);
  color: var(--accent-neon);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.quick-add-btn:hover {
  background: var(--accent-neon);
  color: var(--bg-primary);
}

.quick-add-btn i {
  width: 14px;
  height: 14px;
}

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

.packing-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.packing-item-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.02);
}

.pack-left-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pack-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
}

.pack-checkbox.checked {
  border-color: var(--accent-neon);
  background-color: var(--accent-neon);
}

.pack-checkbox i {
  width: 10px;
  height: 10px;
  color: var(--bg-primary);
  display: none;
}

.pack-checkbox.checked i {
  display: block;
}

.pack-name-txt {
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pack-name-txt.checked {
  text-decoration: line-through;
  color: var(--text-dark-gray);
}

.pack-right-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-badge-crit {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: bold;
  padding: 1px 4px;
  background-color: rgba(255, 59, 48, 0.15);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  border-radius: 1px;
}

.item-qty-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-gray);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 2px;
}

.item-qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-gray);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
  border-radius: 1px;
}

.qty-btn:hover {
  border-color: var(--accent-neon);
  color: var(--accent-neon);
}

/* 6. Mobile Floating Glass Tab Bar */
.floating-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 500px;
  height: 60px;
  background: rgba(12, 12, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 12px;
  z-index: 1000;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease;
}

.floating-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 30px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(0, 255, 157, 0.15), transparent 40%, transparent 60%, rgba(0, 255, 157, 0.05)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 16px;
}

.nav-item i {
  width: 18px;
  height: 18px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-item.active {
  color: var(--accent-neon);
}

.nav-item.active i {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 0 4px var(--accent-neon-glow));
}

/* 7. Hide Elements Helper */
.hidden {
  display: none !important;
}

/* 8. Desktop Optimization & Dashboard Mode */
@media (min-width: 1024px) {
  /* Expand terminal box padding */
  .terminal-container {
    padding: 24px;
    height: 100vh;
  }
  
  /* Hide Mobile Floating Tab Bar */
  .floating-nav {
    display: none;
  }
  
  /* Reset Main Panel Layout to a beautiful 4-tile Dashboard Grid */
  .terminal-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 0; /* Remove mobile nav margin */
  }
  
  .terminal-tile {
    display: flex !important; /* Force all panels visible in grid */
    height: 100%;
    overflow: hidden;
  }

  .tile-body {
    overflow-y: auto;
  }

  /* Adjust Packing Checklist list layout in desktop grid */
  .packing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .form-grid {
    gap: 16px;
  }
}

@media (min-width: 1400px) {
  .terminal-main {
    grid-template-columns: 1fr 1.2fr 1fr 1fr; /* 4 columns sidebar display */
    grid-template-rows: 1fr;
  }
  
  .packing-grid {
    grid-template-columns: 1fr; /* Reset to single col when columns are narrow */
  }
}

/* Responsive helpers */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
}
