:root {
  --bg: #08111f;
  --bg-soft: rgba(15, 23, 42, 0.8);
  --card: rgba(255, 255, 255, 0.9);
  --card-border: rgba(148, 163, 184, 0.28);
  --text: #0f172a;
  --muted: #475569;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #f59e0b;
  --danger: #b91c1c;
  --success: #166534;
  --shadow: 0 24px 70px rgba(8, 15, 30, 0.28);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #e2e8f0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.32), transparent 24%),
    linear-gradient(160deg, #08111f 0%, #13233a 45%, #0b1628 100%);
  min-height: 100vh;
}

.background {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
  pointer-events: none;
}

.shell {
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero {
  padding: 12px 8px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fcd34d;
  font-size: 0.78rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 0.95;
  max-width: 12ch;
  margin-bottom: 16px;
}

.lede {
  max-width: 60ch;
  color: rgba(226, 232, 240, 0.88);
  font-size: 1.05rem;
}

.card {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.94));
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
}

.install-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(255, 252, 240, 0.98), rgba(248, 250, 252, 0.94));
}

.install-copy h2 {
  margin-bottom: 10px;
}

.install-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.install-steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.install-steps li + li {
  margin-top: 6px;
}

.install-dismiss {
  white-space: nowrap;
}

.card-head p,
.toolbar p,
.muted {
  color: var(--muted);
}

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

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

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

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

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
}

.secondary {
  background: #0f172a;
  color: white;
}

.ghost {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
}

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

.recorder {
  border: 1px dashed rgba(15, 118, 110, 0.35);
  background: rgba(240, 253, 250, 0.75);
  border-radius: 20px;
  padding: 16px;
}

.recorder-actions {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.recording-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}

.recording-meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width 0.25s linear;
}

.recording-timer {
  margin: 0 0 10px;
  color: #0f766e;
  font-weight: 700;
}

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

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-chip {
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
}

.expense-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  padding: 16px;
  background: white;
}

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

.expense-amount {
  font-size: 1.35rem;
  font-weight: 800;
}

.expense-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.transcript {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.08);
  color: #134e4a;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.expense-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.danger {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger);
}

.error {
  color: var(--danger);
  min-height: 1.2em;
}

.success {
  color: var(--success);
  min-height: 1.2em;
}

.hidden {
  display: none;
}

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

  .card {
    border-radius: 22px;
    padding: 18px;
  }

  .grid,
  .toolbar,
  .expense-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .install-card {
    display: grid;
  }

  .install-dismiss {
    width: 100%;
  }
}
