﻿:root,
[data-theme="light"] {
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f1f4f9;
  --glass: rgba(255, 255, 255, 0.86);
  --text: #182337;
  --text-muted: #63718a;
  --text-faint: #7b879b;
  --border: #e2e8f0;
  --accent: #6155dc;
  --accent-hover: #5144cd;
  --accent-soft: #efedff;
  --positive: #16845f;
  --positive-soft: #e7f6ef;
  --negative: #c45068;
  --negative-soft: #fbeef1;
  --shadow: 0 4px 24px rgba(25, 40, 70, 0.04);
  --shadow-hover: 0 10px 30px rgba(25, 40, 70, 0.08);
  --hero-start: #6655d8;
  --hero-end: #4638a9;
  --skeleton: #e9edf5;
  --skeleton-shine: #f8faff;
  --overlay: rgba(27, 35, 51, 0.45);
}
[data-theme="dark"] {
  --background: #0c101a;
  --surface: #141b29;
  --surface-raised: #1b2535;
  --surface-muted: #101725;
  --glass: rgba(20, 27, 41, 0.88);
  --text: #e9edf6;
  --text-muted: #a1adc2;
  --text-faint: #8290a8;
  --border: #293348;
  --accent: #a69afa;
  --accent-hover: #b8aefc;
  --accent-soft: #282542;
  --positive: #78d8b2;
  --positive-soft: #193b32;
  --negative: #f198ac;
  --negative-soft: #402534;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.2);
  --hero-start: #5648bc;
  --hero-end: #343072;
  --skeleton: #1e2a3f;
  --skeleton-shine: #2c3a50;
  --overlay: rgba(4, 9, 19, 0.7);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body,
body.modern-shell {
  background: var(--background);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  min-height: 100dvh;
  transition:
    background-color 0.2s,
    color 0.2s;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button,
input,
select,
textarea {
  transition:
    background-color 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h2 {
  letter-spacing: -1px;
}
h3 {
  font-weight: 650;
  font-size: 16px;
  color: var(--text);
}
.glass,
.glass-card,
.surface {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: 16px;
}
.glass-card:hover {
  box-shadow: var(--shadow-hover);
}
.surface {
  background: var(--surface);
  overflow: hidden;
}
.surface-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 18px;
}
.surface-heading p:not(.eyebrow) {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.surface-heading > i {
  color: var(--accent);
}
.eyebrow {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.9px;
  color: var(--text-faint);
  margin: 0 0 9px;
}
.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  min-height: 42px;
  padding: 11px 17px;
  border-radius: 9px;
  white-space: nowrap;
  transition: all 0.18s;
}
.primary-button {
  background: #6455d9;
  color: white;
  border: 1px solid #6455d9;
  box-shadow: 0 4px 10px #6155dc20;
}
.primary-button:hover {
  background: #5144c5;
  transform: translateY(-1px);
}
.secondary-button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.secondary-button:hover {
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--accent);
}
.secondary-button.small {
  font-size: 11px;
  min-height: 34px;
  padding: 8px 12px;
}
.text-button {
  background: transparent;
  color: var(--accent);
  padding: 6px 0;
  min-height: 32px;
  border: 0;
}
.page-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 0 32px;
}
.page-intro h2 {
  font-size: clamp(27px, 3vw, 37px);
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 9px;
  letter-spacing: -1.5px;
}
.page-intro h2 span {
  color: var(--accent);
}
.intro-description {
  font-size: 12px;
  line-height: 1.75;
  color: var(--text-muted);
}
.intro-actions {
  display: flex;
  gap: 10px;
}
.overview-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 15px;
}
.overview-caption > span:first-child {
  font-weight: 600;
  color: var(--text);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--positive);
}
.summary-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.metric-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 0;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.metric-featured {
  background: linear-gradient(125deg, var(--hero-start), var(--hero-end));
  color: #fff;
  border-color: transparent;
}
.metric-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.metric-featured .metric-title {
  color: #e5e1ff;
}
.metric-icon {
  background: var(--surface-muted);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
}
.metric-card .stat-value {
  font-size: clamp(15px, 2.2vw, 26px);
  font-weight: 650;
  letter-spacing: -0.8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.metric-note {
  font-size: 9px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 16px;
}
.metric-note > span {
  display: inline-block;
  margin-right: 5px;
}
.metric-featured .metric-note {
  color: #d5cef9;
  margin-top: 10px;
}
.rate-pill {
  font-size: 8px;
  color: #e8e2ff;
  margin-top: 9px;
}
.positive {
  color: var(--positive);
}
.negative {
  color: var(--negative);
}
.metric-icon.positive {
  background: var(--positive-soft);
}
.metric-icon.negative {
  background: var(--negative-soft);
}
.analytics-layout {
  display: grid;
  gap: 20px;
  margin-bottom: 22px;
}
.spending-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 12px 24px 20px;
}
.donut-container {
  position: relative;
  height: 180px;
  width: 180px;
  flex-shrink: 0;
}
.spending-legend {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-height: 225px;
  overflow: auto;
}
.spending-legend > div {
  font-size: 11px !important;
  padding: 10px 0 !important;
  gap: 12px;
}
.spending-legend .font-mono {
  font-family: Inter, sans-serif;
  font-size: 10px;
}
.surface-footnote {
  padding: 13px 24px;
  color: var(--text-muted);
  font-size: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}
.trend-container {
  position: relative;
  height: 247px;
  margin: 10px 24px 22px;
}
.currency-pill select {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px;
  font-size: 10px;
  color: var(--text);
}
.neutral-badge {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 9px;
  padding: 6px 8px;
  white-space: nowrap;
}
.wallets-surface {
  margin-bottom: 22px;
}
.wallet-layout {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wallet-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  min-width: 0;
  background: var(--surface);
  transition:
    background 0.2s,
    transform 0.2s;
}
.wallet-card:hover {
  background: var(--surface-muted);
  transform: translateY(-2px);
}
.wallet-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}
.wallet-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.wallet-name {
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-value {
  font-size: 16px;
  font-weight: 650;
  display: block;
  color: var(--text);
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
  text-align: left;
}
.wallet-meta {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 9px;
  line-height: 1.6;
}
.is-investment .wallet-avatar {
  background: var(--positive-soft);
  color: var(--positive);
}
.activity-layout {
  display: grid;
  gap: 20px;
}
.activity-list {
  padding: 0 20px 16px;
}
.activity-list > div {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 15px 4px !important;
  gap: 8px;
}
.activity-list .font-bold {
  font-weight: 550;
  font-size: 12px;
}
.activity-list .font-mono {
  font-size: 11px;
}
.activity-list .text-\[10px\] {
  font-size: 9px;
}
.top-category-list {
  padding: 0 24px 24px;
}
.top-category-list > div {
  margin-bottom: 18px;
}
.top-category-list .font-mono {
  font-size: 10px;
}
.entry-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}
.entry-surface > .surface-heading {
  padding-bottom: 24px;
}
.entry-form {
  padding: 0 24px 0;
}
.entry-segments {
  position: relative;
  display: flex;
  margin: 0 24px 26px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.entry-segments #segment-indicator {
  display: none;
}
.entry-segments label {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.entry-segments input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.entry-segments span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  font-size: 11px;
  padding: 11px 3px;
  color: var(--text-muted);
}
.entry-segments input:checked + span {
  background: var(--surface);
  box-shadow: 0 2px 8px #18253c0c;
  color: var(--accent);
  font-weight: 600;
}
.entry-segments input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 21px;
  min-width: 0;
}
.field > label,
.group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}
.field input,
.field select,
.input-glow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 13px;
  font-size: 12px;
  color: var(--text);
  min-width: 0;
  width: 100%;
  box-shadow: none;
}
.field input:hover,
.field select:hover,
.input-glow:hover {
  border-color: var(--text-faint);
}
.field input:focus,
.field select:focus,
.input-glow:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field small {
  font-size: 10px;
  line-height: 1.7;
  color: var(--text-muted);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-faint) !important;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.account-input-group {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  margin: 3px 0 22px;
}
.group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  color: var(--text-muted);
}
.account-input-group .amount-field {
  margin-bottom: 0;
}
.currency-input {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  min-width: 0;
  align-items: center;
}
.currency-input select {
  flex: 0 0 76px;
  width: 76px;
  border: 0;
  background: transparent;
  padding: 16px 10px;
  font-weight: 550;
}
.currency-input input {
  font-size: 24px;
  font-weight: 550;
  border: 0;
  background: transparent;
  text-align: right;
  letter-spacing: -0.6px;
  padding: 15px 12px;
  flex: 1;
  min-width: 0;
}
.currency-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.currency-input input:focus,
.currency-input select:focus {
  box-shadow: none;
}
.entry-form #submit-btn {
  background: #6455d9 !important;
  color: white !important;
  box-shadow: 0 4px 10px #6155dc20 !important;
  border-radius: 9px !important;
  width: 100%;
  min-height: 46px;
  font-size: 12px !important;
  padding: 13px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.entry-footer {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  padding: 17px 0 23px;
}
.entry-footer i {
  margin-right: 4px;
}
.entry-aside {
  display: grid;
  gap: 22px;
}
.receipt-surface {
  padding: 27px;
}
.receipt-icon {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  width: 49px;
  height: 53px;
  border-radius: 13px;
  font-size: 21px;
  margin-bottom: 22px;
}
.receipt-surface .eyebrow {
  font-size: 8px;
}
.receipt-surface h3 {
  font-size: 23px;
  letter-spacing: -0.8px;
  line-height: 1.4;
  margin: 0 0 13px;
  max-width: 230px;
}
.receipt-surface > p:not(.eyebrow) {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 23px;
}
.receipt-surface > button {
  width: 100%;
  margin-bottom: 10px;
}
.entry-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
}
.entry-tip > i {
  color: var(--accent);
  font-size: 16px;
  margin-top: 4px;
}
.entry-tip h4 {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 5px;
}
.form-feedback {
  border: 1px solid var(--negative);
  background: var(--negative-soft);
  color: var(--negative);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.7;
}
.empty-copy {
  font-size: 12px;
  color: var(--text-muted);
  padding: 25px;
}
.preview-notice {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 11px;
  margin-bottom: 20px;
  line-height: 1.7;
}
/* Shared internal component treatment: tables, portfolio cards, budget rows and settings. */
#view-transactions > div,
#view-daily > div,
#view-config > .glass-card,
#view-budget .glass-card {
  border-radius: 14px !important;
}
#view-transactions table {
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 0;
}
#view-transactions th {
  background: var(--surface-muted);
  font-size: 10px;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
}
#view-transactions td {
  border-bottom: 1px solid var(--border);
  padding-top: 17px;
  padding-bottom: 17px;
}
#view-transactions tbody tr:hover {
  background: var(--accent-soft);
}
#view-transactions .edit-btn,
#view-transactions .del-btn {
  border: 1px solid var(--border);
}
#view-transactions td .opacity-0 {
  opacity: 1;
}
#portfolio-assets-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
#portfolio-assets-list > div {
  margin: 0 !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
#portfolio-assets-list > div:hover {
  box-shadow: var(--shadow-hover);
}
#config-sections-container > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px !important;
  box-shadow: none;
}
#view-config input,
#portfolio-modal input,
#portfolio-modal select,
#budget-form input,
#budget-form select {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
#view-config button,
#view-budget button {
  border-radius: 8px;
}
#budget-list > div {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: none;
}
#view-config .rounded-3xl,
#view-budget .rounded-3xl {
  border-radius: 15px;
}
#view-daily .rounded-3xl {
  border-radius: 14px;
}
#view-config > div:first-child {
  background: var(--surface) !important;
}
#view-config .text-transparent {
  color: var(--text) !important;
  background: none !important;
  -webkit-text-fill-color: var(--text);
}
.tab-view:not(.hidden) {
  animation: view-in 0.2s ease both;
}
@keyframes view-in {
  from {
    opacity: 0.3;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Bridge retained provider and export controls to the same semantic palette. */
body :is(.text-white, .text-slate-100, .text-slate-200, .text-slate-300) {
  color: var(--text);
}
body :is(.text-slate-400, .text-slate-500, .text-slate-600) {
  color: var(--text-muted);
}
body
  :is(
    .text-theme-primaryLight,
    .text-indigo-300,
    .text-indigo-400,
    .text-purple-400,
    .text-blue-400
  ) {
  color: var(--accent);
}
body :is(.text-emerald-400, .text-green-400) {
  color: var(--positive);
}
body :is(.text-rose-400, .text-red-400) {
  color: var(--negative);
}
body [class*="border-white/"],
body [class*="divide-white/"] > * {
  border-color: var(--border);
}
body :is([class*="bg-black/"], [class*="bg-white/"], .bg-theme-card) {
  background-color: var(--surface-muted);
}
body .bg-theme-bg {
  background-color: var(--background);
}
body :is([class*="bg-theme-bg/"], [class*="bg-slate-900/"]) {
  background-color: var(--overlay);
}
body input,
body select,
body textarea {
  color: var(--text);
  color-scheme: inherit;
}
body
  :is(
    .bg-purple-600,
    .bg-indigo-600,
    .bg-theme-primary,
    .bg-emerald-600,
    .bg-rose-600
  ) {
  color: white !important;
}
body .preset-btn {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 11px;
}
.theme-toggle {
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--surface);
}
.load-error {
  color: var(--negative);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: center;
}
.loading-workspace {
  width: min(960px, 90vw);
  padding: 30px;
}
.loading-workspace h2 {
  font-size: 25px;
  color: var(--text);
  margin-bottom: 30px;
}
.skeleton {
  border-radius: 12px;
  background: linear-gradient(
    100deg,
    var(--skeleton) 20%,
    var(--skeleton-shine) 45%,
    var(--skeleton) 70%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skeleton-heading {
  height: 22px;
  width: 45%;
  margin-bottom: 22px;
}
.skeleton-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.skeleton-card {
  height: 120px;
}
.skeleton-chart {
  height: 240px;
}
.loader {
  display: inline-block;
  width: 70px;
  height: 8px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(
    100deg,
    var(--accent-soft),
    var(--accent),
    var(--accent-soft)
  );
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}
#init-loader {
  background: var(--background);
  color: var(--text);
}
.auth-card {
  color: var(--text);
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 18px;
  text-align: center;
}
.auth-card h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}
.auth-card p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.custom-scroll::-webkit-scrollbar {
  width: 5px;
}
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}
.font-mono {
  font-variant-numeric: tabular-nums;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.api-progress {
  height: 2px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: pulse 1s ease-in-out infinite;
  opacity: 0;
}
body[data-busy="true"] .api-progress {
  opacity: 1;
}
@keyframes pulse {
  50% {
    transform: scaleX(0.5);
  }
}
@media (min-width: 650px) {
  .page-intro {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .spending-layout {
    flex-direction: row;
  }
  .wallet-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .skeleton-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1100px) {
  .summary-layout {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .analytics-layout {
    grid-template-columns: 1.12fr 1fr;
  }
  .activity-layout {
    grid-template-columns: 1.45fr 1fr;
  }
  .entry-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .entry-surface {
    max-width: 740px;
  }
  .metric-card {
    padding: 22px;
    min-height: 182px;
  }
  .spending-layout {
    gap: 20px;
    padding: 16px 22px 24px;
  }
  .donut-container {
    width: 170px;
    height: 170px;
  }
  .spending-legend {
    max-height: 200px;
  }
  .surface-heading {
    padding: 23px 22px 15px;
  }
}
@media (min-width: 1450px) {
  .wallet-layout {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .donut-container {
    width: 190px;
    height: 190px;
  }
  .entry-layout {
    grid-template-columns: minmax(0, 780px) 350px;
  }
  .summary-layout .stat-value {
    font-size: 26px;
  }
}
@media (max-width: 600px) {
  .metric-card {
    padding: 16px;
    min-height: 165px;
  }
  .metric-title {
    font-size: 10px;
  }
  .metric-note {
    font-size: 9px;
  }
  .metric-title {
    margin-bottom: 20px;
  }
  .surface-heading {
    padding: 20px 18px 16px;
  }
  .surface-heading h3 {
    font-size: 15px;
  }
  .surface-heading .eyebrow {
    font-size: 8px;
  }
  .wallet-layout {
    padding: 0 18px 20px;
    gap: 9px;
  }
  .wallet-card {
    padding: 13px;
  }
  .wallet-value {
    font-size: 14px;
  }
  .wallet-meta {
    font-size: 8px;
  }
  .overview-caption {
    font-size: 9px;
  }
  .entry-form {
    padding: 0 18px;
  }
  .entry-segments {
    margin-left: 18px;
    margin-right: 18px;
  }
  .account-input-group {
    padding: 15px;
  }
  .field input,
  .field select {
    font-size: 16px;
  }
  .currency-input input {
    font-size: 23px;
  }
  .currency-input select {
    flex-basis: 67px;
    width: 67px;
    font-size: 14px;
  }
  .entry-layout {
    gap: 18px;
  }
  .field-row {
    gap: 12px;
  }
  .intro-actions .primary-button,
  .intro-actions .secondary-button {
    padding: 10px 12px;
    font-size: 11px;
  }
  .metric-card .stat-value {
    font-size: clamp(14px, 4.3vw, 19px);
  }
  .activity-list {
    padding: 0 14px 15px;
  }
  .activity-list .font-bold {
    font-size: 11px;
  }
  .activity-list .font-mono {
    font-size: 10px;
  }
  .activity-list > div {
    min-width: 0;
  }
  .spending-layout {
    padding-left: 18px;
    padding-right: 18px;
  }
  .receipt-surface {
    padding: 24px;
  }
  .entry-tip {
    margin-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
