:root {
  color-scheme: dark;
  font-family: "Manrope", "Segoe UI", sans-serif;
  --bg: #03111d;
  --bg-elevated: rgba(11, 23, 37, 0.82);
  --surface: rgba(10, 25, 41, 0.82);
  --surface-strong: rgba(15, 34, 54, 0.96);
  --surface-soft: rgba(17, 39, 60, 0.78);
  --border: rgba(144, 199, 255, 0.14);
  --border-strong: rgba(92, 255, 226, 0.3);
  --text: #eff7ff;
  --text-muted: #92a9bf;
  --text-soft: #b7c9d8;
  --accent: #5cffc8;
  --accent-strong: #10e7b7;
  --accent-secondary: #58a6ff;
  --accent-warm: #ffb86b;
  --danger: #ff7f96;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1360px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(
      circle at top left,
      rgba(16, 231, 183, 0.14),
      transparent 30%
    ),
    radial-gradient(
      circle at top right,
      rgba(88, 166, 255, 0.16),
      transparent 28%
    ),
    linear-gradient(180deg, #05101b 0%, #03111d 34%, #020810 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: transparent;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 16px 112px;
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(4, 14, 25, 0.7);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(88, 166, 255, 0.95),
    rgba(16, 231, 183, 0.95)
  );
  color: #04131f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(16, 231, 183, 0.18);
}

.brand-block h1,
.section-heading h2,
.hero-amount,
.stat-card strong,
.mini-stat strong,
.feed-item strong,
.meta-pill strong {
  font-family: "Space Grotesk", sans-serif;
}

.brand-block h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.nav-chip,
.icon-button,
.ghost-button,
.action-button,
.primary-button,
.currency-option {
  border: 1px solid transparent;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.nav-chip,
.icon-button,
.ghost-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.nav-chip:hover,
.icon-button:hover,
.ghost-button:hover,
.action-button:hover,
.primary-button:hover,
.currency-option:hover {
  transform: translateY(-1px);
}

.nav-chip.is-active,
.ghost-button:hover,
.nav-chip:hover,
.icon-button:hover {
  border-color: var(--border-strong);
  background: rgba(16, 231, 183, 0.08);
  color: var(--text);
}

.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--text-soft);
  border: 1px solid rgba(88, 166, 255, 0.16);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(92, 255, 200, 0.72);
}

.app-main {
  display: block;
}

.view-root,
.view-page {
  display: grid;
  gap: 18px;
}

.surface-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    180deg,
    rgba(14, 30, 48, 0.94),
    rgba(8, 18, 31, 0.92)
  );
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px;
}

.hero-card__glow {
  position: absolute;
  inset: auto -10% -35% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(
    circle,
    rgba(92, 255, 200, 0.28),
    transparent 68%
  );
  pointer-events: none;
}

.hero-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: end;
}

.hero-amount {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy,
.section-copy,
.empty-state p,
.feed-item span,
.info-row span,
.currency-option small {
  color: var(--text-muted);
}

.hero-copy {
  max-width: 700px;
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero-card__meta,
.quick-actions,
.stats-grid,
.dashboard-grid,
.page-grid,
.activity-summary-grid,
.settings-inline-stats,
.currency-grid,
.form-grid,
.mini-stat-list {
  display: grid;
  gap: 14px;
}

.hero-card__meta {
  align-content: end;
}

.meta-pill,
.mini-stat,
.stat-card,
.projection-row,
.feed-item,
.currency-option,
.info-row {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.028);
}

.meta-pill,
.mini-stat,
.info-row {
  padding: 16px 18px;
  border-radius: 18px;
}

.meta-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.quick-actions {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.action-button,
.primary-button {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.action-button--primary,
.primary-button {
  background: linear-gradient(
    135deg,
    rgba(16, 231, 183, 0.92),
    rgba(88, 166, 255, 0.95)
  );
  color: #03111d;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(16, 231, 183, 0.2);
}

.secondary-button,
.inline-action {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.secondary-button {
  border: 1px solid rgba(144, 199, 255, 0.14);
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 22px;
  border-radius: 24px;
}

.stat-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.stat-card span,
.mini-stat span,
.meta-pill span,
.projection-row span,
.info-row span,
.feed-item span {
  font-size: 0.92rem;
}

.stat-card--accent {
  border-color: rgba(92, 255, 200, 0.22);
  background: linear-gradient(
    180deg,
    rgba(14, 39, 44, 0.98),
    rgba(6, 22, 28, 0.95)
  );
}

.dashboard-grid,
.page-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-card,
.page-hero {
  padding: 22px;
}

.panel-card--wide {
  grid-column: span 2;
}

.panel-card--highlight {
  border-color: rgba(92, 255, 200, 0.3);
  box-shadow:
    0 0 0 1px rgba(92, 255, 200, 0.14),
    var(--shadow);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.projection-list,
.feed-list,
.info-stack,
.wallet-form,
.settings-form {
  display: grid;
  gap: 12px;
}

.projection-row {
  padding: 14px 16px;
  border-radius: 18px;
}

.projection-row > div:first-child,
.feed-item,
.feed-item__title-row,
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.projection-row > div:first-child {
  margin-bottom: 12px;
}

.projection-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.projection-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(88, 166, 255, 0.95),
    rgba(92, 255, 200, 0.95)
  );
}

.feed-item {
  padding: 16px 18px;
  border-radius: 18px;
}

.feed-item__main {
  min-width: 0;
}

.feed-item__side {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.feed-item--compact {
  padding: 14px 16px;
}

.feed-item__title-row {
  margin-bottom: 6px;
  align-items: center;
}

.feed-item__price-block {
  text-align: right;
}

.feed-item__price-block span {
  display: block;
  margin-top: 6px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions--end {
  justify-content: end;
}

.inline-action {
  border: 1px solid rgba(144, 199, 255, 0.14);
  font-size: 0.8rem;
}

.inline-action--danger {
  border-color: rgba(255, 127, 150, 0.24);
  color: #ffc5d0;
  background: rgba(255, 127, 150, 0.08);
}

.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.type-badge--income,
.type-badge--extra,
.type-badge--savings,
.type-badge--card {
  color: #03111d;
}

.type-badge--income {
  background: rgba(92, 255, 200, 0.92);
}

.type-badge--extra {
  background: rgba(88, 166, 255, 0.92);
}

.type-badge--savings {
  background: rgba(255, 184, 107, 0.92);
}

.type-badge--expense {
  background: rgba(255, 127, 150, 0.18);
  color: #ffc5d0;
}

.type-badge--card {
  background: rgba(255, 255, 255, 0.86);
}

.empty-state {
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
}

.wallet-form label,
.currency-option {
  display: grid;
  gap: 8px;
}

.form-actions {
  display: grid;
  gap: 12px;
}

.form-actions--split {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.wallet-form label span {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(144, 199, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(92, 255, 200, 0.42);
  box-shadow: 0 0 0 3px rgba(92, 255, 200, 0.1);
}

.mini-stat-list,
.activity-summary-grid,
.settings-inline-stats,
.currency-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.mini-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.currency-grid {
  margin-top: 8px;
}

.currency-option {
  position: relative;
  padding: 18px;
  border-radius: 20px;
}

.currency-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.currency-option span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.currency-option--active {
  border-color: rgba(92, 255, 200, 0.36);
  background: rgba(16, 231, 183, 0.08);
}

.info-row {
  padding: 16px 18px;
  border-radius: 18px;
}

.bottom-nav {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(3, 11, 22, 0.88);
  backdrop-filter: blur(24px);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(92, 255, 200, 0.06);
}

.bottom-nav__item {
  flex: 1;
  min-height: 64px;
  padding: 10px 6px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.bottom-nav__item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.bottom-nav__item.is-active {
  background: rgba(16, 231, 183, 0.1);
  border-color: rgba(92, 255, 200, 0.28);
  color: var(--accent);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.bottom-nav__item span:last-child {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 40;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(6, 25, 41, 0.94);
  color: var(--text);
  border: 1px solid rgba(92, 255, 200, 0.28);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .app-bar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .top-nav,
  .app-bar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-card__content,
  .stats-grid,
  .dashboard-grid,
  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px 12px 106px;
  }

  .app-bar {
    padding: 16px;
    border-radius: 24px;
  }

  .top-nav,
  .status-pill {
    display: none;
  }

  .app-bar-actions {
    width: auto;
  }

  .hero-card,
  .panel-card,
  .page-hero,
  .stat-card {
    padding: 18px;
  }

  .hero-card__content,
  .quick-actions,
  .stats-grid,
  .dashboard-grid,
  .page-grid,
  .form-grid--two,
  .form-grid--three {
    grid-template-columns: 1fr;
  }

  .feed-item {
    align-items: start;
  }

  .feed-item,
  .feed-item__title-row,
  .feed-item__price-block,
  .form-actions--split {
    grid-template-columns: 1fr;
    display: grid;
    justify-content: initial;
  }

  .feed-item__side,
  .feed-item__price-block,
  .inline-actions--end {
    justify-items: start;
    text-align: left;
    justify-content: start;
  }

  .panel-card--wide {
    grid-column: auto;
  }

  .section-heading {
    flex-direction: column;
  }
}

@media (min-width: 821px) {
  .bottom-nav {
    display: none;
  }

  .app-shell {
    padding-bottom: 28px;
  }
}
