:root {
  color-scheme: dark;
  --bg: #071013;
  --ink: #eff7f5;
  --muted: #a7b8b5;
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.09);
  --glass-strong: rgba(255, 255, 255, 0.15);
  --cyan: #37d5c7;
  --green: #8add6d;
  --rose: #ff6f91;
  --amber: #ffc857;
  --blue: #71a7ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 4%, rgba(55, 213, 199, 0.24), transparent 28rem),
    radial-gradient(circle at 90% 18%, rgba(255, 200, 87, 0.16), transparent 24rem),
    linear-gradient(145deg, #071013 0%, #0c1b1d 42%, #11141f 100%);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 32px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  min-height: 210px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    linear-gradient(90deg, rgba(55, 213, 199, 0.16), rgba(113, 167, 255, 0.11));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(145%);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(110deg, transparent 0 30%, rgba(255, 255, 255, 0.20) 44%, transparent 58% 100%);
  transform: translateX(-80%);
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-copy,
.status-grid {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(55, 213, 199, 0.36);
  border-radius: 999px;
  background: rgba(55, 213, 199, 0.10);
  color: #bffcf5;
  font-size: 12px;
  text-transform: uppercase;
}

h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.55;
}

.status-grid {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.status-grid div,
.glass,
.tabbar,
.toast {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(22px) saturate(140%);
}

.status-grid div {
  min-height: 92px;
  padding: 16px;
  border-radius: 8px;
}

.status-grid span {
  display: block;
  font-size: 30px;
  font-weight: 760;
}

.status-grid small {
  color: var(--muted);
}

.tabbar {
  position: sticky;
  top: 8px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
  padding: 8px;
  border-radius: 8px;
}

.tab,
.glass-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.tab:hover,
.glass-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--glass-strong);
}

.glass-button:disabled {
  cursor: progress;
  opacity: 0.62;
  transform: none;
}

.tab.active {
  background: rgba(55, 213, 199, 0.18);
  border-color: rgba(55, 213, 199, 0.42);
}

.icon {
  display: grid;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 800;
}

.view {
  display: none;
  animation: rise 240ms ease both;
}

.view.active {
  display: grid;
  gap: 14px;
}

.glass {
  border-radius: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

label.wide {
  grid-column: span 3;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(2, 8, 10, 0.42);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(55, 213, 199, 0.58);
  box-shadow: 0 0 0 3px rgba(55, 213, 199, 0.13);
}

.glass-button {
  align-self: end;
  padding: 0 14px;
  font-weight: 760;
}

.glass-button.primary {
  background: linear-gradient(135deg, rgba(55, 213, 199, 0.34), rgba(113, 167, 255, 0.24));
}

.glass-button.danger {
  background: linear-gradient(135deg, rgba(255, 111, 145, 0.30), rgba(255, 200, 87, 0.18));
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(18px) saturate(135%);
}

.item strong {
  display: block;
  margin-bottom: 4px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mini {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #d9fffb;
  background: rgba(55, 213, 199, 0.11);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translate(-50%, 24px);
  width: min(520px, calc(100% - 28px));
  min-height: 48px;
  padding: 13px 15px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes sheen {
  0%, 40% { transform: translateX(-85%); }
  70%, 100% { transform: translateX(85%); }
}

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

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 540px);
  }

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

  .status-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .status-grid div {
    min-height: 76px;
    padding: 11px;
  }

  .status-grid span {
    font-size: 23px;
  }

  .tab span:last-child {
    display: none;
  }

  label.wide {
    grid-column: auto;
  }

  .actions {
    justify-content: stretch;
  }

  .actions .glass-button {
    flex: 1;
  }
}
