@font-face {
  font-family: 'Feature Deck';
  src: url('./assets/fonts/FeatureDeck-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Founders Grotesk';
  src: url('./assets/fonts/FoundersGrotesk-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Founders Grotesk';
  src: url('./assets/fonts/FoundersGrotesk-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --pine-950: #021f21;
  --pine-900: #03292b;
  --pine-800: #00393d;
  --pine-700: #0f6167;
  --lettuce-500: #9fe963;
  --lettuce-400: #b4f07f;
  --white: #ffffff;
  --text-muted: #8ba8a8;
  --text-subtle: #6d8a8a;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);
  --nav-active-bg: rgba(15, 97, 103, 0.45);
  --tab-track: #0a3538;
  --tab-active: #e8f4f2;
  --tab-active-text: #021f21;
  --type-pill-bg: rgba(0, 0, 0, 0.28);
  --dot-orange: #f6ad55;
  --dot-green: #68d391;
  --dot-blue: #63b3ed;
  --sidebar-w: 248px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Founders Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  color: var(--white);
  background: var(--pine-950);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 28px;
  color: var(--lettuce-500);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo__mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
}

.nav__item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav__item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.nav__item.is-active {
  color: var(--white);
  background: var(--nav-active-bg);
  box-shadow: inset 3px 0 0 var(--lettuce-500);
}

.nav__item.is-active svg {
  color: var(--lettuce-500);
  opacity: 1;
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 16px;
}

.sidebar__footer .nav__item {
  font-size: 14px;
}

/* ── Main ── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-muted);
}

.sidebar-toggle:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-move-money {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lettuce-500);
  color: var(--pine-950);
  font-weight: 500;
  font-size: 14px;
}

.btn-move-money svg {
  width: 14px;
  height: 14px;
}

.btn-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--white);
  font-size: 14px;
  font-weight: 400;
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-muted);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #3b6050, #0f6167);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content {
  flex: 1;
  padding: 28px 40px 48px;
  max-width: 1200px;
}

.page-title {
  font-family: 'Feature Deck', Georgia, 'Times New Roman', serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.view-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--tab-track);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.view-tab {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.view-tab.is-active {
  background: var(--tab-active);
  color: var(--tab-active-text);
}

.toolbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn[aria-expanded='true'] {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.filter-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Filter panel ── */
.filter-panel {
  margin-bottom: 28px;
  padding: 20px 20px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(3, 41, 43, 0.55);
}

.filter-panel[hidden] {
  display: none !important;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(2, 31, 33, 0.6);
  color: var(--white);
}

.field input::placeholder {
  color: var(--text-subtle);
}

.field--amount input {
  padding-left: 28px;
}

.amount-wrap {
  position: relative;
}

.amount-wrap::before {
  content: '$';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.date-wrap {
  position: relative;
}

.date-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.date-wrap input {
  padding-left: 38px;
}

.filter-accounts {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.filter-accounts > label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.account-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.account-option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.account-option.is-checked {
  background: rgba(15, 97, 103, 0.35);
}

.account-check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}

.account-option__box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.account-option.is-checked .account-option__box {
  background: var(--lettuce-500);
  border-color: var(--lettuce-500);
}

.account-option.is-checked .account-option__box::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--pine-950);
  border-bottom: 2px solid var(--pine-950);
  transform: rotate(-45deg) translateY(-1px);
}

.account-option__label {
  font-size: 14px;
  color: var(--white);
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.filter-clear {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
}

.filter-clear:hover {
  color: var(--white);
}

.btn-apply {
  padding: 10px 28px;
  border-radius: 999px;
  background: var(--lettuce-500);
  color: var(--pine-950);
  font-weight: 500;
  font-size: 14px;
}

.btn-apply:hover {
  background: var(--lettuce-400);
}

/* ── Account icons ── */
.acct-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: default;
}

.acct-icon::after {
  content: attr(data-tooltip-name) '\A' attr(data-tooltip-number);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 20;
  min-width: 160px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--pine-800);
  border: 1px solid var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--white);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: pre;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  font-variant-numeric: tabular-nums;
}

.acct-icon:hover::after,
.acct-icon:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.acct-icon:focus {
  outline: none;
}

.acct-icon:focus-visible {
  box-shadow: 0 0 0 2px var(--pine-950), 0 0 0 3px var(--lettuce-500);
}

.acct-icon svg {
  width: 14px;
  height: 14px;
}

.acct-icon--check {
  color: var(--lettuce-500);
  border-color: rgba(159, 233, 99, 0.25);
  background: rgba(159, 233, 99, 0.08);
}

.acct-icon--savings {
  color: #7ec8e3;
  border-color: rgba(126, 200, 227, 0.25);
  background: rgba(126, 200, 227, 0.08);
}

.acct-icon--tp {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.acct-icon--card {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.25);
  background: rgba(196, 181, 253, 0.08);
}

/* ── Table ── */
.tx-table-wrap {
  margin-top: 8px;
}

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

.tx-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-subtle);
  padding: 0 12px 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tx-table thead th.col-amount {
  text-align: right;
  padding-right: 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-subtle);
  padding: 20px 0 10px;
}

.tx-table tbody td {
  padding: 16px 12px 16px 0;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tx-table tbody tr:last-child td {
  border-bottom: none;
}

.col-date {
  width: 72px;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.col-desc {
  min-width: 280px;
}

.desc-cell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.desc-cell--transfer {
  align-items: center;
  gap: 14px;
}

.transfer-route {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.transfer-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  color: var(--text-muted);
}

.transfer-arrow svg {
  width: 20px;
  height: 12px;
}

.tx-row--transfer .col-desc {
  padding-top: 14px;
  padding-bottom: 14px;
}

.desc-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.desc-line {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.3;
  text-transform: none;
}

.desc-line--primary {
  font-size: 15px;
  color: var(--white);
  font-weight: 400;
}

.col-type {
  width: 220px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--type-pill-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.type-pill--icon-only {
  padding: 6px 10px;
}

.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.type-dot--orange {
  background: var(--dot-orange);
}

.type-dot--green {
  background: var(--dot-green);
}

.type-dot--blue {
  background: var(--dot-blue);
}

.type-pill__label {
  font-size: 13px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-amount {
  text-align: right;
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  white-space: nowrap;
  padding-right: 0 !important;
}

.tx-empty {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Intro overlay ── */
body.intro-active {
  overflow: hidden;
}

body.intro-active .app {
  filter: blur(10px) saturate(0.85);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

body:not(.intro-active) .app {
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 31, 33, 0.72);
  transition: opacity 0.28s ease;
}

.intro-overlay--out {
  opacity: 0;
  pointer-events: none;
}

.intro-overlay[hidden] {
  display: none !important;
}

.intro-modal {
  width: min(100%, 560px);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 32px 36px 28px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--pine-900);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.intro-step {
  display: none;
}

.intro-step.is-active {
  display: block;
  animation: intro-fade-in 0.28s ease;
}

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

.intro-lead {
  font-family: 'Feature Deck', Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 28px;
  color: var(--white);
}

.intro-title {
  font-family: 'Feature Deck', Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--white);
}

.intro-list {
  margin: 0 0 28px;
  padding: 0 0 0 1.15em;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.intro-list li {
  padding-left: 4px;
}

.intro-list strong {
  color: var(--white);
  font-weight: 500;
}

.intro-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-intro-primary {
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--lettuce-500);
  color: var(--pine-950);
  font-size: 15px;
  font-weight: 500;
}

.btn-intro-primary:hover {
  background: var(--lettuce-400);
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .content {
    padding: 20px 16px 32px;
  }

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

  .intro-modal {
    padding: 24px 22px 20px;
  }

  .intro-list {
    font-size: 13px;
    gap: 12px;
  }
}
