:root {
  color-scheme: dark;
  --bg: #080a12;
  --panel: #101421;
  --panel-2: #151a2a;
  --panel-3: #0d111d;
  --line: rgba(255, 255, 255, 0.09);
  --soft-line: rgba(255, 255, 255, 0.06);
  --text: #f4f7fb;
  --muted: #96a0b5;
  --faint: #687389;
  --indigo: #7c8cff;
  --indigo-2: #4f46e5;
  --cyan: #26d3ee;
  --green: #37d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --radius: 8px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), transparent 34rem),
    linear-gradient(135deg, #080a12 0%, #0d111d 44%, #090b13 100%);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.app {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  overflow-x: hidden;
}

.sidebar {
  min-width: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.74);
  backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 38px rgba(20, 184, 166, 0.22);
}

.brand-mark img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 8px 0 0;
  padding: 0 8px;
  border: 1px solid rgba(124, 140, 255, 0.24);
  border-radius: 999px;
  color: #c7d2fe;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  background: rgba(124, 140, 255, 0.12);
}

.sidebar-logo {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #eef3fb);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.sidebar-logo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.wordmark-logo img {
  max-width: 172px;
}

.nav {
  display: grid;
  gap: 12px;
}

.nav-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.nav-group + .nav-group {
  margin-top: 0;
}

.banking-group {
  --section-accent: var(--indigo);
  --section-accent-2: var(--cyan);
  border-color: rgba(124, 140, 255, 0.18);
  background: linear-gradient(180deg, rgba(124, 140, 255, 0.1), rgba(124, 140, 255, 0.025));
}

.credit-group {
  --section-accent: var(--green);
  --section-accent-2: #2dd4bf;
  border-color: rgba(55, 211, 153, 0.18);
  background: linear-gradient(180deg, rgba(55, 211, 153, 0.1), rgba(45, 212, 191, 0.025));
}

.nav-group summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 6px 8px;
  color: var(--section-accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  color: var(--text);
  background: rgba(124, 140, 255, 0.12);
  border-color: rgba(124, 140, 255, 0.18);
}

.credit-group .nav-button:hover,
.credit-group .nav-button.active {
  background: rgba(55, 211, 153, 0.12);
  border-color: rgba(55, 211, 153, 0.22);
}

.banking-group .nav-button:hover,
.banking-group .nav-button.active {
  background: rgba(124, 140, 255, 0.12);
  border-color: rgba(124, 140, 255, 0.2);
}

.nav-button.active .nav-icon {
  color: var(--section-accent-2);
}

.nav-icon {
  width: 24px;
  text-align: center;
}

.side-note {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.side-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-legal {
  width: 100%;
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.main {
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  padding: 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  min-width: 0;
}

.account-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.account-option {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.account-option.active {
  color: var(--text);
  background: rgba(124, 140, 255, 0.24);
}

.app[data-account="credit"] {
  --text: #0f172a;
  --muted: #334155;
  --faint: #475569;
  --line: rgba(27, 38, 58, 0.16);
  --soft-line: rgba(27, 38, 58, 0.1);
  --shadow: 0 18px 54px rgba(54, 70, 96, 0.18);
  background: linear-gradient(135deg, #f7faff 0%, #edf4ff 48%, #f8fbff 100%);
  color: var(--text);
}

.app[data-account="credit"] .sidebar {
  background: rgba(246, 249, 255, 0.88);
  border-color: rgba(27, 38, 58, 0.12);
}

.app[data-account="credit"] .main {
  background:
    radial-gradient(circle at top right, rgba(38, 211, 238, 0.18), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, #edf4ff 54%, #ffffff 100%);
}

.app[data-account="credit"] .account-switcher {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(59, 130, 246, 0.16);
}

.app[data-account="credit"] .account-option.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.app[data-account="credit"] .card,
.app[data-account="credit"] .modal-card,
.app[data-account="credit"] .action-sheet-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(27, 38, 58, 0.14);
}

.app[data-account="credit"] .field,
.app[data-account="credit"] .category-select,
.app[data-account="credit"] textarea,
.app[data-account="credit"] .segments,
.app[data-account="credit"] .summary-item,
.app[data-account="credit"] .mode-notice,
.app[data-account="credit"] .history-row,
.app[data-account="credit"] .category-row,
.app[data-account="credit"] .rule-row,
.app[data-account="credit"] .goal-row,
.app[data-account="credit"] .reset-option {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(27, 38, 58, 0.14);
  color: var(--text);
}

.app[data-account="credit"] .ghost,
.app[data-account="credit"] .pill {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(27, 38, 58, 0.14);
  color: var(--text);
}

.app[data-account="credit"] .segment.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.app[data-account="credit"] .helper,
.app[data-account="credit"] .summary-item p,
.app[data-account="credit"] .mode-notice,
.app[data-account="credit"] .history-row p,
.app[data-account="credit"] .side-note p,
.app[data-account="credit"] .sidebar-legal,
.app[data-account="credit"] .brand-subtitle,
.app[data-account="credit"] .category-breakdown-row span {
  color: var(--muted);
}

.app[data-account="credit"] .version-badge {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(59, 130, 246, 0.1);
}

.app[data-account="credit"] h1,
.app[data-account="credit"] h2,
.app[data-account="credit"] h3,
.app[data-account="credit"] strong,
.app[data-account="credit"] label {
  color: var(--text);
}

.app[data-account="credit"] th,
.app[data-account="credit"] td::before,
.app[data-account="credit"] .axis-label,
.app[data-account="credit"] .bar-label {
  color: var(--faint);
  fill: var(--faint);
}

.app[data-account="credit"] td,
.app[data-account="credit"] .transaction-table td,
.app[data-account="credit"] .readonly-table td {
  color: var(--muted);
}

.app[data-account="credit"] input,
.app[data-account="credit"] select,
.app[data-account="credit"] textarea {
  color: var(--text);
}

.app[data-account="credit"] .amount.positive {
  color: #047857;
}

.app[data-account="credit"] .amount.negative {
  color: #be123c;
}

.app[data-account="credit"] .privacy-note.glass {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.34);
  background: rgba(16, 185, 129, 0.12);
}

.app[data-account="credit"] .danger {
  color: #be123c;
  border-color: rgba(190, 18, 60, 0.34);
  background: rgba(244, 63, 94, 0.08);
}

.app[data-account="credit"] .danger:disabled {
  color: #9f1239;
  border-color: rgba(190, 18, 60, 0.24);
  background: rgba(244, 63, 94, 0.06);
  opacity: 0.78;
}

.global-import-button {
  white-space: nowrap;
}

.command-trigger {
  min-width: 48px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(3, 6, 15, 0.72);
  backdrop-filter: blur(14px);
  animation: resultIn 180ms ease both;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  border: 1px solid rgba(124, 140, 255, 0.26);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 26, 42, 0.98), rgba(13, 17, 29, 0.98));
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.action-sheet {
  width: min(560px, 100%);
}

.action-sheet .modal-actions {
  position: sticky;
  bottom: -20px;
  margin-right: -20px;
  margin-bottom: -20px;
  margin-left: -20px;
  padding: 16px 20px 20px;
  background: linear-gradient(180deg, rgba(13, 17, 29, 0), rgba(13, 17, 29, 0.98) 35%);
}

.action-list,
.command-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.action-row,
.command-row,
.more-card {
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.action-row {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 14px;
}

.action-row span,
.command-row span,
.more-card p {
  color: var(--muted);
  font-size: 13px;
}

.muted-action {
  opacity: 0.6;
}

.command-palette {
  width: min(640px, 100%);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #090909;
  box-shadow: var(--shadow);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.command-input-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.command-input-row h2 {
  margin: 0;
  font-size: 15px;
}

.command-row {
  display: grid;
  gap: 4px;
  min-height: 60px;
  padding: 12px;
}

.command-row:hover,
.action-row:hover,
.more-card:hover {
  border-color: rgba(124, 140, 255, 0.34);
  background: rgba(124, 140, 255, 0.11);
}

.more-card {
  min-height: 156px;
}

.more-card .card-inner {
  display: grid;
  gap: 8px;
}

.more-card span {
  color: var(--indigo);
  font-size: 24px;
  font-weight: 900;
}

.more-card h2 {
  margin: 0;
}

.version-card {
  cursor: default;
}

.version-card small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.legal-grid {
  align-items: stretch;
}

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

.legal-copy {
  gap: 12px;
}

.legal-copy h2 {
  margin: 0;
}

.legal-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

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

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.topbar > div {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.pill,
.primary,
.ghost,
.danger {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.primary {
  border: 0;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-2));
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.26);
}

.mock-disabled,
button:disabled {
  cursor: not-allowed;
  color: var(--faint);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  opacity: 0.58;
  box-shadow: none;
}

.danger {
  color: #ffd8df;
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.08);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

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

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

.categories-workspace {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.75fr);
  align-items: start;
}

.rules-workspace {
  display: grid;
  gap: 18px;
  align-self: start;
  min-width: 0;
}

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 20, 33, 0.82);
  box-shadow: var(--shadow);
}

.card-inner {
  padding: 20px;
}

.balance-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 140, 255, 0.98), rgba(79, 70, 229, 0.9) 48%, rgba(38, 211, 238, 0.74)),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.36), transparent 18rem);
}

.credit-card-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(79, 70, 229, 0.86) 54%, rgba(55, 211, 153, 0.72)),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.28), transparent 17rem);
}

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

.credit-card-hero .card-inner {
  position: relative;
  z-index: 1;
}

.balance-label,
.small-label {
  margin: 0 0 9px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.balance-value {
  margin: 0;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
}

.balance-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
}

.balance-meta strong {
  display: block;
  font-size: 22px;
}

.metric {
  padding: 18px;
}

button.metric {
  width: 100%;
  text-align: left;
}

.action-metric {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.08);
}

.metric p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
}

.uncategorized-callout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(251, 191, 36, 0.075);
  text-align: left;
}

.uncategorized-callout strong {
  font-size: 22px;
}

.warning-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.12);
}

.category-breakdown {
  display: grid;
  gap: 10px;
}

.category-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.category-breakdown-row span {
  color: var(--muted);
}

.budget-pie-view {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr);
  gap: 18px;
  align-items: center;
}

.budget-pie {
  width: min(260px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--soft-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow);
}

.budget-total-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.budget-total-card span,
.category-breakdown-row i + * {
  color: var(--muted);
}

.category-breakdown-row i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
}

.budget-histogram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 12px;
  min-height: 300px;
  align-items: end;
}

.histogram-bar {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.histogram-track {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 190px;
  padding: 8px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.histogram-track span {
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
}

.histogram-bar strong {
  font-size: 12px;
}

.histogram-bar small {
  min-height: 32px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.budget-gantt {
  display: grid;
  gap: 10px;
}

.gantt-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.3fr) 56px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.gantt-row div:first-child {
  display: grid;
  gap: 4px;
}

.gantt-row span,
.gantt-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.gantt-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.gantt-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.gantt-row .over-budget {
  color: #ff9aaa;
}

.compact-budget-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

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

.section-head h2,
.panel-title {
  margin: 0;
  font-size: 18px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.segments {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.segment {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segment.active {
  color: var(--text);
  background: rgba(124, 140, 255, 0.22);
}

.chart-wrap {
  height: 310px;
}

.chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.axis-label,
.bar-label {
  fill: var(--muted);
  font-size: 11px;
}

.summary {
  display: grid;
  gap: 12px;
}

.summary-item {
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

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

.summary-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  color: var(--text);
}

.pinned-filter-row td {
  background: rgba(55, 211, 153, 0.055);
}

.uncategorized-row td {
  background: rgba(251, 191, 36, 0.055);
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.8);
}

.inline-suggestion {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: var(--radius);
  background: rgba(251, 191, 36, 0.075);
}

.inline-suggestion span {
  color: #ffe8ae;
  font-size: 12px;
}

.inline-suggestion button {
  width: 100%;
}

.merchant-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.merchant-cell span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.merchant-edit-button {
  min-height: 30px;
  padding: 0 8px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

tr:hover .merchant-edit-button,
.merchant-edit-button:focus-visible {
  opacity: 1;
  transform: translateX(0);
}

@media (hover: none) {
  .merchant-edit-button {
    opacity: 1;
    transform: none;
  }
}

.merchant-edit-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 360px;
}

.merchant-edit-field {
  min-height: 36px;
}

.amount.positive {
  color: var(--green);
}

.amount.negative {
  color: #ff9aaa;
}

.category-select,
.field,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.category-select,
.field {
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.upload-box {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px dashed rgba(124, 140, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(124, 140, 255, 0.06);
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: #b8f7dc;
  font-size: 12px;
  font-weight: 800;
}

.privacy-note.glass {
  border: 1px solid rgba(55, 211, 153, 0.34);
  background: rgba(55, 211, 153, 0.13);
}

.privacy-note.mono {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.compact-upload {
  margin-bottom: 14px;
  padding: 14px;
}

.upload-result {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  animation: resultIn 340ms ease both;
}

.upload-result strong {
  display: block;
  margin-bottom: 6px;
}

.upload-result p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-result.success {
  border-color: rgba(55, 211, 153, 0.35);
  background: rgba(55, 211, 153, 0.1);
}

.upload-result.warning {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.09);
}

.upload-result.error {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.1);
}

.result-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #04130d;
  font-weight: 900;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(55, 211, 153, 0.5);
  animation: checkPop 720ms ease both;
}

.upload-result.warning .result-icon {
  color: #1b1200;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.44);
}

.upload-result.error .result-icon {
  color: #210007;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.42);
}

.upload-actions,
.form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mode-notice-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.mode-notice-stack .mode-notice {
  margin-bottom: 0;
}

.mode-notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.mode-notice strong {
  color: var(--text);
}

.demo-notice {
  border-color: rgba(55, 211, 153, 0.26);
  background: rgba(55, 211, 153, 0.08);
}

.empty-notice {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
}

.fresh-session-notice {
  border-color: rgba(38, 211, 238, 0.28);
  background: rgba(38, 211, 238, 0.08);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed rgba(124, 140, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(124, 140, 255, 0.055);
  text-align: center;
}

.empty-state strong {
  font-size: 18px;
}

.empty-state p {
  max-width: 420px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.compact-empty {
  min-height: 112px;
  margin-top: 6px;
}

.budget-list,
.goal-list {
  display: grid;
  gap: 14px;
}

.goal-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.goal-progress {
  display: grid;
  gap: 8px;
}

.goal-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) repeat(2, minmax(112px, 0.72fr)) repeat(2, minmax(136px, 0.86fr));
  gap: 10px;
  min-width: 0;
}

.goal-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.goal-fields label span {
  text-transform: uppercase;
}

.money-input {
  position: relative;
}

.money-input span {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 800;
}

.money-input input {
  padding-left: 28px;
}

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

.goal-fields input[type="date"] {
  min-width: 0;
  font-size: 14px;
}

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

.reset-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.reset-option strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.reset-option p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.category-editor,
.rule-list {
  display: grid;
  gap: 12px;
}

.category-editor {
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  align-items: start;
}

.hidden-list {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.rule-suggestions {
  display: grid;
  gap: 10px;
}

.compact-section-head {
  margin-bottom: 4px;
}

.rule-suggestion-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(55, 211, 153, 0.14);
  border-radius: var(--radius);
  background: rgba(55, 211, 153, 0.055);
}

.rule-suggestion-row strong {
  display: block;
  margin-bottom: 4px;
}

.rule-suggestion-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.suggestion-category-select {
  min-height: 38px;
  width: 100%;
}

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

.suggestion-actions .icon-button {
  width: 100%;
}

.upload-history {
  display: grid;
  gap: 10px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  animation: historyIn 360ms ease both;
}

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

.history-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.status-pill {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(124, 140, 255, 0.1);
}

.status-pill.imported {
  color: #b8f7dc;
  border-color: rgba(55, 211, 153, 0.34);
  background: rgba(55, 211, 153, 0.12);
}

.status-pill.imported::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  transform: translateX(-140%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: pillShine 1.4s ease 260ms 1;
}

.category-row,
.rule-row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.category-row {
  grid-template-columns: 64px minmax(0, 1fr) minmax(94px, 0.48fr) minmax(92px, 0.42fr);
  align-items: end;
}

.rule-row {
  grid-template-columns: minmax(160px, 1fr) 24px minmax(150px, 0.8fr) minmax(136px, auto) repeat(2, minmax(72px, auto));
}

.rules-workspace .rule-row {
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
}

.rules-workspace .match-pill {
  grid-column: 1 / -1;
}

.rules-workspace .rules-save-button {
  grid-column: 1 / 3;
}

.rules-workspace .rule-row .danger {
  grid-column: 3;
}

.category-row > *,
.rule-row > *,
.rule-suggestion-row > * {
  min-width: 0;
}

.color-field {
  width: 52px;
  height: 46px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.color-picker-label {
  display: grid;
  gap: 5px;
  align-self: stretch;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compact-field {
  min-width: 0;
}

.inline-field-label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

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

.inline-field-label .field {
  margin-bottom: 0;
}

.budget-field {
  max-width: none;
}

.category-spend {
  display: grid;
  gap: 3px;
  align-self: center;
}

.category-spend span {
  color: var(--text);
  font-weight: 700;
}

.category-spend small,
.match-pill {
  color: var(--muted);
  font-size: 12px;
}

.match-pill {
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: rgba(124, 140, 255, 0.1);
}

.rule-arrow {
  color: var(--indigo);
  text-align: center;
  font-weight: 800;
}

.icon-button {
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

.category-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.category-actions .icon-button {
  min-height: 34px;
  padding: 0 8px;
}

.promoted-button {
  color: #b8f7dc;
  border-color: rgba(55, 211, 153, 0.34);
  background: rgba(55, 211, 153, 0.1);
}

.app[data-account="credit"] .promoted-button {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.42);
  background: rgba(16, 185, 129, 0.1);
}

.rule-save-button,
.rules-save-button {
  min-height: 36px;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.rule-save-button:disabled,
.rules-save-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.inline-rule-editor {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 320px;
}

.rule-keyword-field {
  min-height: 36px;
}

.rule-save-button.saved,
.rules-save-button.saved {
  color: #b8f7dc;
  border-color: rgba(55, 211, 153, 0.46);
  background: rgba(55, 211, 153, 0.16);
  transform: translateY(-1px);
  animation: savedPulse 620ms ease both;
}

.category-rule-notice {
  margin-top: 0;
}

.rule-save-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(55, 211, 153, 0.34);
  border-radius: var(--radius);
  background: rgba(55, 211, 153, 0.1);
  animation: resultIn 260ms ease both;
}

.rule-save-notice span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #04130d;
  font-weight: 900;
  background: var(--green);
}

.rule-save-notice strong {
  white-space: nowrap;
}

.rule-save-notice p {
  margin: 0;
  color: var(--muted);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.transaction-filter-bar {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(140px, 1.1fr) minmax(140px, 1.1fr) minmax(150px, 1fr) minmax(100px, 0.7fr) auto auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.active-filter {
  color: #ffe8ae;
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.13);
}

.filter-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.new-category-row {
  border-color: rgba(55, 211, 153, 0.42);
  background: rgba(55, 211, 153, 0.08);
  animation: categoryFocus 900ms ease both;
}

.rule-actions {
  margin-top: 16px;
}

.hidden-categories {
  margin-top: 16px;
  border-top: 1px solid var(--soft-line);
  padding-top: 14px;
}

.hidden-categories summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.hidden-list {
  margin-top: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.category-note {
  margin-top: 14px;
}

.progress-row {
  display: grid;
  gap: 8px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--indigo), var(--cyan));
}

.mobile-menu {
  display: none;
}

.bottom-tabs {
  display: none;
}

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

@keyframes checkPop {
  0% {
    opacity: 0;
    transform: scale(0.72);
    box-shadow: 0 0 0 0 rgba(55, 211, 153, 0.5);
  }
  58% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 0 12px rgba(55, 211, 153, 0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes historyIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pillShine {
  to {
    transform: translateX(260%) skewX(-18deg);
  }
}

@keyframes savedPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(55, 211, 153, 0.4);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(55, 211, 153, 0);
  }
}

@keyframes categoryFocus {
  0% {
    box-shadow: 0 0 0 0 rgba(55, 211, 153, 0.46);
    transform: translateY(8px);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(55, 211, 153, 0);
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .categories-workspace {
    grid-template-columns: 1fr;
  }

  .goal-row {
    grid-template-columns: 1fr;
  }

  .goal-actions {
    grid-column: auto;
  }
}

@media (max-width: 1800px) {
  .rule-row {
    grid-template-columns: minmax(180px, 1fr) 24px minmax(180px, 0.8fr) minmax(136px, auto) auto auto;
  }

  .categories-workspace .card {
    overflow: hidden;
  }

  .rule-list {
    overflow: hidden;
  }

  .goal-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 10px;
  }

  .brand {
    justify-content: center;
    padding: 0;
    margin-bottom: 18px;
  }

  .brand > div:not(.brand-mark),
  .nav-group summary,
  .nav-label,
  .side-note,
  .sidebar-logo {
    display: none;
  }

  .nav-button {
    min-height: 52px;
    justify-content: center;
    padding: 0;
  }

  .nav-icon {
    width: auto;
    font-size: 18px;
  }

  .main {
    padding: 24px;
  }

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

  .two-grid,
  .budget-pie-view,
  .gantt-row {
    grid-template-columns: 1fr;
  }

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

  .category-row,
  .rule-row,
  .rule-suggestion-row,
  .goal-row,
  .goal-fields,
  .reset-option {
    grid-template-columns: 1fr;
  }

  .category-row .icon-button {
    grid-row: auto;
    grid-column: auto;
    justify-self: stretch;
  }

  .budget-field {
    width: 100%;
    max-width: none;
  }

  .category-editor,
  .hidden-list {
    grid-template-columns: 1fr;
  }

  .category-row {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }

  .color-picker-label {
    grid-row: span 2;
  }

  .color-field {
    width: 58px;
    height: 58px;
  }

  .category-spend,
  .category-actions {
    grid-column: 1 / -1;
  }

  .category-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), transparent 24rem),
      linear-gradient(180deg, #080a12 0%, #0b0f19 100%);
  }

  .app {
    display: block;
    padding-bottom: 96px;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 16px 14px 22px;
  }

  .topbar,
  .section-head,
  .balance-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 18px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .account-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    overflow: hidden;
  }

  .account-option {
    min-width: 0;
    padding: 0 8px;
  }

  .global-import-button,
  .command-trigger {
    display: none;
  }

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

  .segments {
    width: 100%;
    overflow-x: auto;
  }

  .top-actions,
  .upload-actions,
  .form-row,
  .section-actions,
  .modal-actions,
  .search-row,
  .transaction-filter-bar,
  .inline-rule-editor,
  .merchant-edit-row {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .account-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }

  .history-row,
  .history-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .merchant-edit-button {
    opacity: 1;
    transform: none;
  }

  .top-actions button,
  .upload-actions button,
  .form-row button,
  .section-actions button,
  .modal-actions button,
  .suggestion-actions button,
  .goal-actions button,
  .reset-option button {
    width: 100%;
  }

  .card-inner {
    padding: 16px;
  }

  .balance-card,
  .credit-card-hero {
    min-height: 220px;
  }

  .chart-wrap {
    height: 250px;
  }

  .bottom-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    width: 100vw;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(8, 10, 18, 0.96);
    backdrop-filter: blur(22px);
  }

  .bottom-tab {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 58px;
    padding: 0 2px;
    border: 0;
    border-radius: 14px;
    color: #cbd5e1;
    background: transparent;
  }

  .bottom-tab span {
    font-size: 19px;
    line-height: 1;
  }

  .bottom-tab small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    font-weight: 800;
    color: inherit;
    white-space: nowrap;
  }

  .bottom-tab.active {
    color: #ffffff;
    background: rgba(124, 140, 255, 0.22);
  }

  .bottom-tab.center-action {
    color: #06110d;
  }

  .bottom-tab.center-action span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: -22px;
    border-radius: 999px;
    color: #06110d;
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    box-shadow: 0 16px 34px rgba(38, 211, 238, 0.24);
  }

  .bottom-tab.center-action small {
    color: #ffffff;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  table {
    display: grid;
    gap: 12px;
  }

  tr {
    overflow: hidden;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
  }

  td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--soft-line);
  }

  td::before {
    color: var(--faint);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  td:nth-child(1)::before { content: "Date"; }
  td:nth-child(2)::before { content: "Merchant"; }
  td:nth-child(3)::before { content: "Notes"; }
  td:nth-child(4)::before { content: "Category"; }
  .has-rule td:nth-child(5)::before { content: "Rule"; }
  .has-rule td:nth-child(6)::before { content: "Amount"; }
  .readonly-table td:nth-child(5)::before { content: "Amount"; }

  tr td:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  .sidebar {
    padding: 12px;
  }

  .brand {
    padding: 0;
  }

  .main {
    padding: 10px;
  }

  .pill,
  .primary,
  .ghost,
  .danger {
    padding: 0 10px;
  }
}
