:root {
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --secondary: #4854bb;
  --tertiary: #009844;
  --surface: #f8f9fa;
  --surface-low: #f3f4f5;
  --surface-container: #edeeef;
  --border: #e4e4e7;
  --border-soft: #f4f4f5;
  --text: #191c1d;
  --muted: #71717a;
  --faint: #a1a1aa;
  --danger: #ba1a1a;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--text);
  font-family: Outfit, Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
.font-display {
  font-family: Outfit, Manrope, Inter, sans-serif;
  letter-spacing: -0.02em;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e2e2e2;
  border-radius: 999px;
}

.material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.filled {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.page-shell {
  min-height: 100vh;
}

.container {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.dashboard-layout {
  min-height: 100vh;
}

.dashboard-main {
  min-height: 100vh;
  padding-bottom: 92px;
}

.app-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header-inner {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.app-content {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
  padding: 24px 0 32px;
  animation: pageEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.sidebar {
  display: none;
}

.bottom-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  height: 72px;
  padding: 6px 4px max(6px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.04);
}

.bottom-nav a.active {
  color: var(--primary);
  transform: translateY(-2px);
}
.bottom-nav a {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  /* previous properties... */
  min-width: 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bottom-nav .material-symbols-outlined {
  font-size: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: #000000;
}

.brand-word {
  font-family: Manrope, Inter, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.landing-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 72px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(16px);
}

.landing-nav-inner {
  height: 100%;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-links {
  display: none;
  align-items: center;
  gap: 30px;
}

.landing-links a,
.label {
  color: var(--muted);
  font-family: Manrope, Inter, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-links a:hover {
  color: var(--primary);
}

.hero {
  min-height: 100svh;
  padding: 92px 0 32px;
  display: flex;
  align-items: center;
}

.hero-grid {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  display: grid;
  gap: 42px;
  align-items: center;
}

.hero h1 {
  max-width: 740px;
  margin: 0 0 24px;
  font-size: clamp(40px, 12vw, 86px);
  line-height: 1;
  font-weight: 900;
}

.hero-muted {
  color: #d4d4d8;
}

.hero-copy {
  max-width: 570px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.hero-actions,
.button-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: min(100%, 330px);
  padding: 12px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid rgba(228, 228, 231, 0.86);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.14);
}

.phone::before {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: -1;
  border-radius: 34px;
  background: linear-gradient(45deg, #e4e4e7, transparent);
  filter: blur(28px);
  opacity: 0.78;
}

.phone-screen {
  position: relative;
  aspect-ratio: 9 / 14;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
}

.phone-top {
  height: 44px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
}

.phone-content {
  padding: 16px;
}

.mock-balance {
  padding: 20px;
  min-height: 116px;
  border-radius: 18px;
  color: #ffffff;
  background: #000000;
}

.mock-balance p,
.mock-list-title {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mock-balance strong {
  font-family: Manrope, Inter, sans-serif;
  font-size: 26px;
  font-weight: 900;
}

.mock-list-title {
  margin-top: 20px;
  color: var(--faint);
}

.mock-row {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.035);
}

.mock-dot {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f4f4f5;
}

.mock-lines {
  display: grid;
  gap: 6px;
}

.mock-line {
  width: 74px;
  height: 10px;
  border-radius: 999px;
  background: #e4e4e7;
}

.mock-line.short {
  width: 52px;
  height: 8px;
  background: #f1f1f2;
}

.scan-line {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #3b82f6;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.82);
  animation: scan 3s linear infinite;
}

.stats-band {
  padding: 72px 0;
  background: #fafafa;
  border-block: 1px solid var(--border-soft);
}

.stats-grid,
.feature-grid {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 900;
}

.stat span {
  color: var(--faint);
  font-family: Manrope, Inter, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-section {
  padding: 80px 0;
}

.feature-card,
.card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.feature-card {
  padding: 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.feature-card .material-symbols-outlined {
  margin-bottom: 18px;
  font-size: 34px;
}

.feature-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.landing-footer {
  padding: 80px 0 120px;
  text-align: center;
}

.landing-footer h2 {
  margin: 0 0 28px;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.02;
  font-weight: 900;
}

.footer-row {
  width: min(100% - 32px, 1280px);
  margin: 80px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: var(--faint);
  font-size: 14px;
}

.footer-row nav {
  display: flex;
  gap: 28px;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #ffffff;
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary), var(--primary-hover));
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(245, 166, 35, 0.2);
}

.btn.large {
  min-height: 56px;
  padding-inline: 28px;
  border-radius: 16px;
  font-size: 17px;
}

.btn.secondary {
  color: #18181b;
  background: #f4f4f5;
  background-image: none;
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

.btn.secondary:hover {
  background: #e4e4e7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.btn.green {
  background: var(--tertiary);
  background-image: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn.icon {
  width: 42px;
  min-height: 42px;
  padding: 0;
}

.btn.text {
  color: var(--muted);
  background: transparent;
  background-image: none;
  box-shadow: none;
}

.btn.text:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: none;
  box-shadow: none;
}

.btn.full {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.52;
  pointer-events: none;
}

.header-title p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.header-title h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.12;
}

.status-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sync-pill,
.account-pill,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sync-pill {
  min-height: 34px;
  padding: 0 14px;
  color: var(--faint);
  background: #fafafa;
  border: 1px solid var(--border-soft);
}

.sync-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--tertiary);
}

.balance-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  color: #ffffff;
  background: #000000;
  border-radius: 28px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.18);
}

.balance-card::after {
  content: "";
  position: absolute;
  top: -42px;
  right: -42px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(24px);
}

.balance-card > * {
  position: relative;
  z-index: 1;
}

.balance-card .eyebrow,
.eyebrow {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.balance-card .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.balance-amount {
  margin: 0 0 24px;
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.metric-grid {
  display: grid;
  gap: 12px;
}

.metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 21px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bento-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.bento-card {
  min-height: 168px;
  padding: 22px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.bento-card:hover {
  transform: translateY(-2px);
}

.bento-card.blue {
  color: #16238e;
  background: #8692fd;
}

.bento-card.dark {
  color: #ffffff;
  background: #18181b;
}

.bento-card.light {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bento-card .value {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 31px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.section-heading {
  margin: 0 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 24px;
}

.section-heading a {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 800;
}

.card {
  overflow: hidden;
}

.empty-state {
  padding: 60px 22px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px dashed var(--border-soft);
}

.empty-state .material-symbols-outlined {
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 64px;
  opacity: 0.8;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.2));
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
  font-size: 15px;
}

.txn-list {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.txn-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  transition: all 0.2s ease;
}

.txn-row:first-child {
  border-top: 0;
}

.txn-row:hover {
  background: #fafafa;
  transform: scale(1.005);
}

.txn-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.txn-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.source-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.source-badge .material-symbols-outlined {
  font-size: 13px;
}

.txn-title {
  margin: 0;
  color: #18181b;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txn-meta,
.txn-note {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.txn-note {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txn-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.txn-amount {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.txn-amount.income {
  color: var(--tertiary);
}

.txn-status {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--muted);
}

.icon-btn:hover {
  background: #f4f4f5;
}

.icon-btn.danger {
  color: var(--danger);
  border-color: #fee2e2;
}

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.search-field {
  position: relative;
}

.search-field .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--faint);
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 46px;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
}

.chip {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #ffffff;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.chip:hover {
  background: #f4f4f5;
}

.chip.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.form-stack {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.select,
.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  color: #18181b;
  background: #ffffff;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.select:focus,
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  background: #ffffff;
}

.field textarea {
  resize: vertical;
  min-height: 92px;
}

.amount-field {
  position: relative;
}

.amount-field strong {
  position: absolute;
  left: 15px;
  top: 50%;
  color: var(--faint);
  font-size: 20px;
  transform: translateY(-50%);
}

.amount-field input {
  padding-left: 40px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 24px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
}

.segmented button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segmented button.active {
  color: #ffffff;
  background: #000000;
}

.segmented button.active.green {
  background: var(--tertiary);
}

.scan-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.reset-capture {
  justify-self: stretch;
  gap: 6px;
}

.reset-capture .material-symbols-outlined {
  font-size: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-option {
  min-height: 78px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.category-option.active {
  color: #ffffff;
  background: #18181b;
  border-color: #18181b;
}

.source-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notice {
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.notice.success {
  color: var(--tertiary);
  background: rgba(0, 152, 68, 0.1);
  border: 1px solid rgba(0, 152, 68, 0.2);
}

.notice.error {
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fee2e2;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: end;
  padding: 16px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal {
  width: 100%;
  max-width: 680px;
  max-height: calc(100svh - 32px);
  margin: 0 auto;
  padding: 22px;
  border-radius: 20px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  transform: scale(0.95);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.receipt-upload-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.receipt-drop {
  width: 100%;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  border: 1px dashed #d4d4d8;
  border-radius: 18px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.receipt-drop:disabled {
  cursor: wait;
  opacity: 0.52;
}

.receipt-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
  backdrop-filter: blur(6px);
}

.receipt-scan-overlay strong {
  font-family: Manrope, Inter, sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 900;
  letter-spacing: 0;
}

.receipt-scan-overlay small {
  max-width: 320px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.45;
}

.scan-loader {
  width: 64px;
  height: 64px;
  border: 5px solid rgba(255, 255, 255, 0.26);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin 0.8s linear infinite, pulse-glow 1.4s ease-in-out infinite;
}

@media (max-width: 420px) {
  .container,
  .hero-grid,
  .app-header-inner,
  .app-content {
    width: min(100% - 24px, 960px);
  }

  .landing-nav {
    height: 64px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-word {
    font-size: 20px;
  }

  .hero {
    padding-top: 84px;
  }

  .hero h1 {
    margin-bottom: 18px;
  }

  .hero-copy {
    margin-bottom: 22px;
    font-size: 16px;
    line-height: 1.55;
  }

  .app-header {
    padding: 14px 0;
  }

  .app-header-inner {
    gap: 12px;
  }

  .status-pills {
    width: 100%;
  }

  .btn.large {
    min-height: 50px;
    font-size: 16px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100svh - 20px);
    padding: 18px;
    border-radius: 16px;
  }

  .modal-head {
    gap: 10px;
  }

  .modal-head h2 {
    font-size: 24px;
  }

  .receipt-drop {
    min-height: 190px;
    aspect-ratio: 1 / 1;
  }

  .upload-placeholder {
    max-width: 88%;
  }

  .amount-field input {
    font-size: 22px;
  }
}

.receipt-drop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-placeholder {
  display: flex;
  max-width: min(340px, 84%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.35;
  color: var(--text);
}

.upload-placeholder .material-symbols-outlined {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 14px;
  background: #f4f4f5;
  color: #71717a;
  font-size: 32px;
}

.upload-placeholder small {
  color: var(--muted);
}

.file-preview {
  display: flex;
  max-width: min(320px, 80%);
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.file-preview strong,
.file-preview small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.file-preview small {
  color: var(--muted);
}

.file-preview .material-symbols-outlined {
  color: #d4d4d8;
  font-size: 48px;
}

.scan-status {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--faint);
  font-size: 12px;
}

.scan-status strong {
  color: var(--tertiary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-card {
  padding: 22px;
}

.profile-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #000000;
}

.profile-copy h2,
.profile-copy p {
  margin: 0;
}

.profile-copy h2 {
  font-size: 22px;
}

.profile-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.profile-copy small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
}

.account-pill {
  margin-top: 18px;
  padding: 7px 12px;
  color: #002109;
  background: #6bff8f;
}

.settings-list {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
}

.settings-row {
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-row:first-child {
  border-top: 0;
}

.settings-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-info p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.settings-info small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #d4d4d8;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 160ms ease;
}

.toggle.active {
  background: #000000;
}

.toggle.active::after {
  transform: translateX(20px);
}

.onboarding {
  min-height: 100vh;
  padding: 24px 0;
  background: #f0f1f2;
}

.onboarding-inner {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
}

.onboarding-top {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 22px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step-btn {
  min-height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--faint);
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.step-btn.active {
  color: #ffffff;
  background: #000000;
  border-color: #000000;
}

.onboarding-card {
  padding: clamp(22px, 5vw, 34px);
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
}

.connection-card {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  background: #ffffff;
  text-align: left;
}

.connection-card:hover {
  background: #fafafa;
}

.connection-card h3,
.connection-card p {
  margin: 0;
}

.connection-card h3 {
  font-size: 15px;
}

.connection-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-grid {
  display: grid;
  gap: 10px;
}

.status-card {
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #fafafa;
}

.status-card.active {
  border-color: rgba(0, 152, 68, 0.2);
  background: rgba(0, 152, 68, 0.1);
}

.legal-page {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 32px 0 64px;
}

.legal-page h1 {
  font-size: clamp(40px, 8vw, 64px);
}

.spinner {
  animation: spin 1s linear infinite;
}

.fade-in {
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan {
  from {
    top: 0;
  }
  to {
    top: 100%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 34px rgba(255, 255, 255, 0.36);
  }
}

@media (min-width: 540px) {
  .hero-actions,
  .button-row {
    flex-direction: row;
  }

  .scan-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .reset-capture {
    justify-self: end;
  }

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

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .scan-status {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .profile-row,
  .settings-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 760px) {
  .landing-nav {
    height: 80px;
  }

  .landing-links {
    display: flex;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  }

  .phone-wrap {
    justify-content: end;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .footer-row {
    flex-direction: row;
    justify-content: space-between;
  }

  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .txn-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .txn-side {
    justify-content: end;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid .wide {
    grid-column: 1 / -1;
  }

  .modal-backdrop {
    align-items: center;
  }

  .onboarding-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 860px) {
  .dashboard-layout {
    padding-left: 256px;
  }

  .dashboard-main {
    padding-bottom: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 35;
    width: 256px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid var(--border);
  }

  .sidebar-brand {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-soft);
  }

  .sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: grid;
    align-content: start;
    gap: 6px;
  }

  .sidebar-nav a {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 700;
  }

  .sidebar-nav a:hover {
    color: var(--text);
    background: #f4f4f5;
  }

  .sidebar-nav a.active {
    color: #ffffff;
    background: #000000;
  }

  .sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-soft);
  }

  .sidebar-user-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
  }

  .sidebar-user-inner p {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
  }

  .sidebar-user-inner small {
    display: block;
    margin-top: 3px;
    color: var(--faint);
    font-size: 12px;
  }

  .bottom-nav {
    display: none;
  }
}
