:root {
  --bg-1: #f4f8ff;
  --bg-2: #e7f0ff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #0b1c3d;
  --muted: #5a6a88;
  --accent: #005cff;
  --accent-soft: #d7e6ff;
  --ok: #0f9d58;
  --danger: #b42318;
  --shadow: 0 20px 45px rgba(6, 25, 75, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(30px);
  z-index: 0;
}

.orb-a {
  width: 320px;
  height: 320px;
  left: -80px;
  top: -80px;
  background: rgba(0, 92, 255, 0.2);
}

.orb-b {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -100px;
  background: rgba(15, 157, 88, 0.18);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1150px;
  margin: 40px auto;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 6px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.controls {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  align-items: center;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
}

select,
button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #c9dafd;
  padding: 9px 12px;
}

select {
  background: white;
  min-width: 170px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.card {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid #e5edff;
  box-shadow: var(--shadow);
  animation: rise 420ms ease both;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.card h2 {
  margin: 12px 0 0;
  font-size: clamp(1.2rem, 2.7vw, 1.9rem);
}

.card.emphasis {
  background: linear-gradient(145deg, #e8f1ff, #f8fbff);
  border-color: #cadeff;
}

.table-wrap {
  margin-top: 18px;
  background: var(--surface-strong);
  border-radius: 18px;
  border: 1px solid #e5edff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #ecf2ff;
}

.table-head h3 {
  margin: 0;
  font-size: 1rem;
}

.table-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.table-scroll {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3ff;
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

tr:last-child td {
  border-bottom: none;
}

.status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status.error {
  color: var(--danger);
}

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

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 18px;
    margin: 20px auto;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  select {
    min-width: 100%;
  }
}