body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 20%),
    linear-gradient(180deg, #05080f 0%, #08111c 45%, #0f172a 100%);
  color: #e2e8f0;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 1500px;
  margin: 0 auto;
  padding: 1.5rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 1.35rem;
  border-radius: 1.5rem;
  background: rgba(8, 13, 24, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-with-logo {
  justify-content: center;
}

.logo-img {
  width: 220px;
  max-width: 100%;
  height: auto;
}

.brand-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.brand-subtitle {
  display: block;
  color: #94a3b8;
  font-size: 0.82rem;
}

.nav-links {
  display: grid;
  gap: 0.75rem;
}

.nav-links a {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  color: #cbd5e1;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.92);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-links a.active,
.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(56, 189, 248, 0.18);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-radius: 1.2rem;
  background: rgba(10, 16, 28, 0.94);
  color: #94a3b8;
  font-size: 0.9rem;
}

.main-content {
  display: grid;
  gap: 1.5rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border-radius: 1.75rem;
  background: rgba(8, 14, 26, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.14);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3vw, 3.4rem);
}

.hero-panel p {
  margin: 1rem 0 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.status-card {
  display: grid;
  gap: 0.45rem;
  padding: 1.2rem;
  border-radius: 1.5rem;
  background: rgba(10, 16, 28, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-align: right;
}

.status-card span {
  color: #94a3b8;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.status-card strong {
  font-size: 1.4rem;
}

.status-card small {
  color: #cbd5e1;
}

.stats-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 1.3rem;
  border-radius: 1.5rem;
  background: rgba(10, 16, 28, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.stat-card span {
  display: block;
  color: #94a3b8;
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

.stat-card strong {
  font-size: 1.2rem;
}

.panel {
  padding: 1.75rem;
  border-radius: 1.75rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.panel-head {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.panel-head p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.calculator-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field span {
  font-size: 0.95rem;
  color: #cbd5e1;
}

input,
select {
  width: 100%;
  padding: 1rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(12, 18, 31, 0.95);
  color: #eef2ff;
  font-size: 1rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

button[type="submit"] {
  align-self: start;
  padding: 1rem 1.4rem;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(56, 189, 248, 0.18);
}

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

.result-card {
  padding: 1.35rem;
  border-radius: 1.4rem;
  background: rgba(10, 16, 28, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.result-title {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.metric-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
}

.metric-label {
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  min-width: 84px;
}

.result-title span {
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
}

.result-title small {
  color: #cbd5e1;
  line-height: 1.4;
}

.result-card strong {
  display: block;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.65rem;
}

.result-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
}

.result-card small {
  display: block;
  margin-top: 0.5rem;
  color: #cbd5e1;
}

.result-card.recommended {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(10, 16, 28, 0.96));
}

.result-meta {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.7rem;
  color: #cbd5e1;
}

.result-meta strong {
  color: #fff;
}

.result-notes {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
  background: rgba(8, 13, 24, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
  line-height: 1.7;
}

.result-notes strong {
  color: #fff;
}

.info-panel {
  padding: 1.75rem;
  border-radius: 1.75rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.info-list article {
  padding: 1.3rem;
  border-radius: 1.35rem;
  background: rgba(10, 16, 28, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.info-list h3 {
  margin: 0 0 0.65rem;
  color: #fff;
}

.info-list p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .stats-row,
  .result-grid,
  .info-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 1rem;
  }

  .sidebar,
  .hero-panel,
  .panel,
  .info-panel {
    padding: 1.2rem;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}
