:root {
  --bg: #08111f;
  --bg-accent: #0f1b2f;
  --panel: rgba(13, 24, 41, 0.9);
  --panel-strong: #13243d;
  --text: #edf3fb;
  --muted: #9eb1c7;
  --line: rgba(255, 255, 255, 0.1);
  --green: #33d487;
  --green-soft: rgba(51, 212, 135, 0.16);
  --blue: #59a9ff;
  --amber: #ffc86e;
  --red: #ff7f7f;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(51, 212, 135, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(89, 169, 255, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg), #050a12 70%);
}

.shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  margin-bottom: 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(19, 36, 61, 0.98), rgba(10, 20, 34, 0.95));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #7fe1b5;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
}

h1, h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.96;
}

h2 {
  font-size: 24px;
}

.hero-copy {
  width: min(420px, 100%);
}

.hero-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.panel {
  grid-column: span 6;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.auth-panel,
.trip-panel {
  grid-column: span 5;
}

.tracking-panel {
  grid-column: span 7;
}

.summary-panel,
.log-panel {
  grid-column: span 6;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 14px;
}

.stack.small {
  gap: 10px;
}

label span,
.metric-label,
.data-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(89, 169, 255, 0.4);
  border-color: rgba(89, 169, 255, 0.55);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #1a3150, #112440);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, border-color 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button.primary {
  background: linear-gradient(135deg, #36d78c, #1ea66d);
  color: #04120d;
}

.button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
}

.button.danger {
  background: linear-gradient(135deg, #ff8b8b, #e65151);
  color: #240707;
}

.button.subtle {
  background: rgba(255, 255, 255, 0.06);
}

.callout,
.empty-state {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  line-height: 1.6;
}

.callout.subtle,
.empty-state {
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article,
.data-grid article {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metrics strong {
  font-size: 24px;
  font-family: "Space Grotesk", sans-serif;
}

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

.data-value {
  font-size: 15px;
  font-weight: 700;
}

.summary-list,
.log-output {
  display: grid;
  gap: 10px;
}

.summary-row,
.log-line {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.5;
}

.log-line strong {
  color: var(--text);
}

code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cce8ff;
}

@media (max-width: 1080px) {
  .panel,
  .auth-panel,
  .trip-panel,
  .tracking-panel,
  .summary-panel,
  .log-panel {
    grid-column: 1 / -1;
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 100%);
    padding-top: 12px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 74px;
    height: 74px;
  }

  .metrics,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
