:root {
  --ink: #101a3c;
  --forest: #10245d;
  --forest-2: #2447a0;
  --cream: #f5f7fc;
  --paper: #ffffff;
  --white: #ffffff;
  --coral: #5367f5;
  --coral-dark: #4053dd;
  --yellow: #7b3ff2;
  --green: #15956f;
  --blue: #1478ff;
  --muted: #6e7894;
  --line: #e5e9f3;
  --soft-green: #eaf7f2;
  --soft-coral: #eef0ff;
  --shadow: 0 14px 36px rgba(26, 45, 96, 0.07);
  --shadow-soft: 0 4px 18px rgba(26, 45, 96, 0.055);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --font: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--cream);
}

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

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(91, 141, 239, 0.28);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--forest);
}

.brand--large {
  color: white;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-name {
  display: grid;
  gap: 0;
  line-height: 1;
}

.brand-name strong {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.8px;
}

.brand-name small {
  margin-top: 4px;
  color: #7782a3;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 2px;
}

.brand--large .brand-name strong {
  color: white;
  font-size: 27px;
}

.brand--large .brand-name small {
  color: rgba(255, 255, 255, 0.58);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  background: var(--paper);
}

.auth-brand {
  position: relative;
  display: none;
  overflow: hidden;
  padding: 44px 8%;
  color: white;
  background:
    radial-gradient(circle at 82% 12%, rgba(82, 105, 245, 0.42), transparent 28%),
    radial-gradient(circle at 10% 92%, rgba(123, 63, 242, 0.22), transparent 30%),
    linear-gradient(145deg, #08173f 0%, #10245d 60%, #172c68 100%);
}

.auth-brand::after {
  position: absolute;
  top: -90px;
  right: -80px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.02);
  content: "";
}

.auth-message {
  position: relative;
  z-index: 1;
  margin: auto 0 36px;
}

.eyebrow,
.card-kicker {
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.auth-message .eyebrow {
  color: #f5b19f;
}

.auth-message h1 {
  margin: 18px 0;
  font-size: clamp(44px, 4.7vw, 70px);
  font-weight: 680;
  line-height: 1.01;
  letter-spacing: -3px;
}

.auth-message h1 em {
  color: #a89bff;
  font-weight: 680;
}

.auth-message p {
  max-width: 510px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  line-height: 1.55;
}

.auth-preview {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  padding: 25px 27px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
}

.preview-top,
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-top div {
  display: grid;
  gap: 5px;
}

.preview-top small,
.preview-footer > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.preview-top strong {
  font-size: 25px;
}

.preview-badge {
  padding: 7px 10px;
  border-radius: 99px;
  color: #bce8d4;
  background: rgba(47, 158, 116, 0.22);
  font-size: 11px;
  font-weight: 700;
}

.preview-chart {
  display: flex;
  height: 82px;
  align-items: flex-end;
  gap: 9px;
  margin: 25px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.preview-chart span {
  flex: 1;
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #8190ff, rgba(129, 144, 255, 0.22));
}

.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.avatar-stack .avatar {
  margin-left: -8px;
  border: 2px solid var(--forest-2);
}

.avatar--yellow {
  color: white;
  background: #7b3ff2;
}

.avatar--light {
  color: var(--forest);
  background: var(--cream);
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 30px 22px;
  background:
    radial-gradient(circle at 80% 0, rgba(83, 103, 245, 0.08), transparent 25%),
    var(--paper);
}

.auth-card {
  width: min(430px, 100%);
}

.mobile-auth-logo {
  justify-content: center;
  margin-bottom: 34px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 13px;
  background: #f0f2f8;
}

.private-access-note {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f7f8fc;
}

.private-access-note > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--coral);
  background: var(--soft-coral);
}

.private-access-note > div {
  display: grid;
  gap: 2px;
}

.private-access-note strong {
  font-size: 11px;
}

.private-access-note small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.auth-tab {
  padding: 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--forest);
  background: white;
  box-shadow: 0 3px 10px rgba(28, 55, 48, 0.08);
}

.auth-form {
  display: grid;
  gap: 17px;
  margin-top: 31px;
}

.form-heading {
  margin-bottom: 5px;
}

.form-heading h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 29px;
  font-weight: 680;
  letter-spacing: -0.8px;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-form label,
.field {
  display: grid;
  gap: 7px;
}

.auth-form label > span:first-child,
.field > span:first-child {
  font-size: 12px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input,
select {
  height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 82px;
  padding: 12px 14px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a5acc0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(83, 103, 245, 0.62);
  box-shadow: 0 0 0 4px rgba(83, 103, 245, 0.09);
  outline: none;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 7px;
  right: 6px;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button--full {
  width: 100%;
}

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--coral) 58%, #6850ee);
  box-shadow: 0 7px 18px rgba(83, 103, 245, 0.22);
}

.button--primary:hover {
  background: linear-gradient(135deg, #086ceb, #4559e7 58%, #5f43dc);
}

.button--secondary {
  color: white;
  background: var(--forest);
}

.button--light {
  color: var(--forest);
  background: var(--paper);
}

.button--outline-light {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  background: transparent;
}

.demo-login {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--forest);
  background: #f7f8fc;
  text-align: left;
  cursor: pointer;
}

.demo-login > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.demo-login strong {
  font-size: 12px;
}

.demo-login small {
  color: var(--muted);
  font-size: 10px;
}

.demo-login > svg {
  width: 15px;
}

.demo-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--coral);
  background: var(--soft-coral);
}

.shared-note,
.auth-legal {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.shared-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.shared-note svg {
  width: 16px;
}

.auth-legal {
  margin: 27px 0 0;
  text-align: center;
}

.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: none;
  width: 244px;
  flex-direction: column;
  padding: 31px 22px 23px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 51px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  color: #77837f;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.side-nav .nav-item {
  height: 47px;
  padding: 0 14px;
  border-radius: 12px;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.side-nav .nav-item.active {
  color: var(--forest);
  background: #edf0ff;
}

.side-nav .nav-item.active::before {
  position: absolute;
  left: 0;
  width: 4px;
  height: 26px;
  border-radius: 0 4px 4px 0;
  background: var(--coral);
  content: "";
}

.sidebar-tip {
  margin-top: auto;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f8fc;
}

.tip-spark {
  display: grid;
  width: 29px;
  height: 29px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 8px;
  color: #6747e8;
  background: #eeeaff;
}

.sidebar-tip strong {
  font-size: 14px;
  font-weight: 700;
}

.sidebar-tip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 11px 7px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-profile > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.sidebar-profile strong {
  font-size: 12px;
}

.sidebar-profile small {
  color: var(--muted);
  font-size: 10px;
}

.sidebar-profile > svg {
  width: 16px;
  color: #99a2bb;
}

.mobile-header {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(229, 233, 243, 0.9);
  background: rgba(245, 247, 252, 0.94);
  backdrop-filter: blur(12px);
}

.mobile-header .brand {
  gap: 7px;
}

.mobile-header .brand-mark {
  width: 38px;
  height: 38px;
}

.mobile-header .brand-name strong {
  font-size: 19px;
}

.mobile-header .brand-name small {
  font-size: 6px;
}

.main {
  min-height: 100vh;
  padding: 24px 16px 108px;
}

.view {
  display: none;
  max-width: 1210px;
  margin: 0 auto;
  animation: fade-in 0.28s ease;
}

.view.active-view {
  display: block;
}

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

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-head h1 {
  margin: 6px 0 6px;
  color: var(--ink);
  font-size: clamp(27px, 3vw, 35px);
  font-weight: 700;
  letter-spacing: -1.2px;
}

.page-head h1 span {
  font-family: var(--font);
  font-size: 21px;
}

.page-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.page-head .button {
  display: none;
}

.page-actions {
  display: none;
  align-items: center;
  gap: 9px;
}

.page-actions .button {
  display: inline-flex;
}

.period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 23px 0 17px;
}

.period-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef1f8;
}

.period-tabs button {
  min-width: 57px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.period-tabs button.active {
  color: var(--forest);
  background: white;
  box-shadow: 0 3px 10px rgba(28, 55, 48, 0.08);
}

.period-range {
  display: none;
  color: var(--muted);
  font-size: 11px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.summary-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.summary-card--balance {
  grid-column: 1 / -1;
  display: flex;
  min-height: 166px;
  flex-direction: column;
  justify-content: space-between;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at 86% 16%, rgba(83, 103, 245, 0.54), transparent 34%),
    linear-gradient(145deg, #0a1a49, #10245d 58%, #1b3478);
  box-shadow: 0 17px 36px rgba(16, 36, 93, 0.18);
}

.summary-card--balance::after {
  position: absolute;
  right: -42px;
  bottom: -80px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.025);
  content: "";
}

.summary-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.summary-card--balance .summary-label {
  color: rgba(255, 255, 255, 0.6);
}

.balance-toggle {
  position: relative;
  z-index: 2;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.summary-value {
  display: block;
  margin: 13px 0 7px;
  font-size: clamp(21px, 4vw, 29px);
  font-weight: 780;
  letter-spacing: -1px;
  white-space: nowrap;
}

.summary-card--balance .summary-value {
  margin: 8px 0 0;
  font-size: clamp(31px, 5vw, 40px);
  font-weight: 700;
}

.summary-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.summary-card--balance .summary-foot {
  color: rgba(255, 255, 255, 0.66);
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 99px;
  color: var(--green);
  background: var(--soft-green);
  font-size: 9px;
  font-weight: 800;
}

.trend svg {
  width: 11px;
  height: 11px;
}

.trend--bad {
  color: var(--coral-dark);
  background: var(--soft-coral);
}

.summary-card--balance .trend {
  color: #bbebd6;
  background: rgba(47, 158, 116, 0.25);
}

.summary-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--soft-green);
}

.summary-card--expense .summary-icon {
  color: var(--coral);
  background: var(--soft-coral);
}

.summary-card--saved {
  display: none;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.chart-card,
.category-card,
.accounts-section,
.transactions-section,
.ledger-card,
.report-breakdown {
  padding: 20px 17px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-head h2,
.gpt-copy h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.chart-legend {
  display: none;
  gap: 13px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
}

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

.cashflow-chart {
  position: relative;
  height: 210px;
  margin-top: 23px;
}

.chart-svg {
  width: 100%;
  height: 168px;
  overflow: visible;
}

.chart-svg .grid-line {
  stroke: #e9edf5;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart-svg .income-line,
.chart-svg .expense-line {
  fill: none;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.chart-svg .income-line { stroke: var(--green); }
.chart-svg .expense-line { stroke: var(--coral); }
.chart-svg .area { fill: url("#incomeGradient"); stroke: none; }
.chart-svg circle { stroke: var(--paper); stroke-width: 2; }

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #929bb3;
  font-size: 9px;
}

.empty-chart {
  display: grid;
  height: 180px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty-chart svg {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  color: #b3bcb9;
}

.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  color: var(--coral-dark);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.text-button svg {
  width: 14px;
}

.category-content {
  display: grid;
  grid-template-columns: 115px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 195px;
  margin-top: 16px;
}

.donut {
  position: relative;
  width: 115px;
  height: 115px;
  border-radius: 50%;
}

.donut::after {
  position: absolute;
  inset: 19px;
  display: block;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.donut-center {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-center strong {
  font-size: 15px;
}

.donut-center span {
  color: var(--muted);
  font-size: 8px;
}

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

.category-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
}

.category-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.category-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row strong {
  font-size: 10px;
}

.accounts-section,
.transactions-section {
  margin-top: 14px;
}

.accounts-list {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  margin: 17px -17px -2px;
  padding: 2px 17px 10px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.accounts-list::-webkit-scrollbar { display: none; }

.account-card {
  position: relative;
  min-width: 245px;
  min-height: 172px;
  overflow: hidden;
  padding: 18px;
  border-radius: 18px;
  color: white;
  scroll-snap-align: start;
  box-shadow: 0 10px 25px rgba(31, 55, 49, 0.13);
}

.account-card::after {
  position: absolute;
  right: -33px;
  bottom: -56px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 27px rgba(255, 255, 255, 0.04);
  content: "";
}

.account-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
}

.account-top span:last-child {
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  font-weight: 700;
}

.account-card h3 {
  position: relative;
  z-index: 1;
  margin: 16px 0 1px;
  font-size: 12px;
}

.account-card small {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.account-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.account-import {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.account-import svg {
  width: 12px;
}

.transaction-list {
  margin-top: 13px;
}

.transaction-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f6;
}

.transaction-item:last-child {
  border-bottom: 0;
}

.transaction-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  font-size: 17px;
}

.transaction-info {
  min-width: 0;
}

.transaction-info strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-info small,
.transaction-amount small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.transaction-amount {
  text-align: right;
}

.transaction-amount strong {
  font-size: 12px;
}

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

.empty-state {
  display: grid;
  min-height: 150px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty-state span {
  display: grid;
  width: 47px;
  height: 47px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 15px;
  color: var(--coral);
  background: var(--soft-coral);
}

.routine-summary {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  margin-top: 23px;
}

.routine-summary-card {
  display: grid;
  min-height: 118px;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.routine-summary-card--main {
  grid-column: 1 / -1;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 88% 10%, rgba(123, 63, 242, 0.32), transparent 30%),
    linear-gradient(135deg, #10245d, #2447a0);
}

.routine-summary-card--main .card-kicker {
  color: #bac5ff;
}

.routine-summary-card strong {
  color: var(--forest);
  font-size: 27px;
  line-height: 1;
}

.routine-summary-card--main strong {
  color: white;
  font-size: 34px;
}

.routine-summary-card p,
.routine-summary-card small,
.routine-today-card .card-head p,
.routine-agenda-card .card-head p,
.routine-sections .card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.routine-summary-card--main p {
  color: rgba(255, 255, 255, 0.72);
}

.routine-summary-card > span:not(.card-kicker) {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--coral);
  background: var(--soft-coral);
}

.routine-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.routine-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, #b9c3ff);
}

.routine-layout,
.routine-sections {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.routine-layout > .card,
.routine-sections > .card {
  padding: 22px;
}

.routine-list,
.routine-upcoming {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.routine-list--catalog .routine-item {
  align-items: start;
}

.routine-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fafbfe;
}

.routine-item--done {
  border-color: rgba(21, 149, 111, 0.22);
  background: #f5fbf8;
}

.routine-check,
.routine-dot {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dce2f4;
  border-radius: 12px;
  color: var(--coral);
  background: white;
}

.routine-check {
  cursor: pointer;
}

.routine-check svg,
.routine-dot svg {
  width: 17px;
}

.routine-item--done .routine-check {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.routine-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.routine-info strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-item--done .routine-info strong {
  color: rgba(16, 26, 60, 0.62);
  text-decoration: line-through;
}

.routine-info small,
.routine-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-info em {
  color: #8590aa;
}

.routine-done-by {
  color: var(--green) !important;
  font-weight: 750;
}

.routine-delete {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #a4abc0;
  background: transparent;
  cursor: pointer;
}

.routine-delete:hover {
  color: #9e493b;
  background: #fff0ee;
}

.routine-delete svg {
  width: 16px;
}

.routine-day {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f9fd;
}

.routine-day > strong {
  color: var(--forest);
  font-size: 11px;
  text-transform: capitalize;
}

.routine-day > div {
  display: grid;
  gap: 8px;
}

.routine-day .routine-item {
  padding: 10px;
  background: white;
}

.routine-day .routine-delete {
  display: none;
}

.empty-state--routine {
  min-height: 120px;
}

.task-dashboard-card {
  margin: 14px 0;
  padding: 22px;
}

.task-dashboard-card .card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.dashboard-routine-board {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.task-ring-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 18px;
  color: white;
  background:
    radial-gradient(circle at 90% 10%, rgba(123, 63, 242, 0.28), transparent 34%),
    linear-gradient(135deg, #10245d, #2447a0);
}

.task-ring {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(#ffffff var(--progress), rgba(255, 255, 255, 0.18) 0),
    rgba(255, 255, 255, 0.08);
}

.task-ring > div {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: #142d70;
  text-align: center;
}

.task-ring strong {
  font-size: 20px;
  line-height: 1;
}

.task-ring span,
.task-ring-copy span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}

.task-ring-copy {
  display: grid;
  gap: 5px;
}

.task-ring-copy strong {
  font-size: 17px;
  line-height: 1.18;
}

.task-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.task-stat {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafbfe;
}

.task-stat span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--coral);
  background: var(--soft-coral);
}

.task-stat--alert span {
  color: #9e493b;
  background: #fff0ee;
}

.task-stat strong {
  color: var(--forest);
  font-size: 22px;
  line-height: 1;
}

.task-stat small {
  color: var(--muted);
  font-size: 9px;
}

.task-frequency-chart {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafbfe;
}

.task-bar {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.task-bar > div {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9edf6;
}

.task-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.task-bar--daily i { background: linear-gradient(90deg, #1478ff, #5367f5); }
.task-bar--weekly i { background: linear-gradient(90deg, #7b3ff2, #8b5cf6); }
.task-bar--biweekly i { background: linear-gradient(90deg, #15956f, #36a77d); }

.task-bar strong {
  color: var(--ink);
  text-align: right;
}

.task-focus-list {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.task-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.routine-item--compact {
  padding: 10px;
  border-radius: 13px;
}

.routine-item--compact .routine-check,
.routine-item--compact .routine-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.routine-item--compact .routine-info em {
  display: none;
}

.routine-item--overdue {
  border-color: rgba(158, 73, 59, 0.24);
  background: #fffafa;
}

.routine-item--overdue .routine-check {
  color: #9e493b;
  border-color: rgba(158, 73, 59, 0.26);
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: calc(69px + env(safe-area-inset-bottom));
  align-items: center;
  padding: 5px 7px env(safe-area-inset-bottom);
  border-top: 1px solid #e7e3db;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 30px rgba(34, 56, 50, 0.06);
  backdrop-filter: blur(12px);
}

.bottom-nav .nav-item {
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  font-size: 8px;
}

.bottom-nav .nav-item svg {
  width: 20px;
  height: 20px;
}

.bottom-nav .nav-item.active {
  color: var(--coral-dark);
}

.mobile-add {
  display: grid;
  width: 48px;
  height: 48px;
  place-self: center;
  place-items: center;
  border: 5px solid var(--paper);
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--coral), #7048eb);
  box-shadow: 0 6px 17px rgba(83, 103, 245, 0.3);
  transform: translateY(-13px);
}

.mobile-add svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.3;
}

#view-transactions,
#view-routines,
#view-reports,
#view-family {
  padding-top: 5px;
}

#view-routines .page-head .button,
#view-family .page-head .button {
  display: inline-flex;
  flex: 0 0 auto;
}

#view-family .page-head .page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ledger-card,
.report-grid,
.gpt-export-card,
.family-grid {
  margin-top: 23px;
}

.ledger-toolbar {
  display: grid;
  gap: 13px;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 17px;
  color: var(--muted);
}

.search-box input {
  padding-left: 42px;
  background: #faf8f4;
}

.ledger-summary {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.transaction-list--full .transaction-item {
  position: relative;
}

.transaction-delete {
  display: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--coral-dark);
  background: var(--soft-coral);
  cursor: pointer;
}

.transaction-delete svg {
  width: 14px;
}

.report-grid,
.family-grid {
  display: grid;
  gap: 14px;
}

.family-grid {
  align-items: start;
}

.report-hero {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius-xl);
  color: white;
  background:
    radial-gradient(circle at 95% 10%, rgba(123, 63, 242, 0.38), transparent 33%),
    linear-gradient(145deg, #0a1a49, #10245d 62%, #1c3476);
  box-shadow: 0 18px 42px rgba(16, 36, 93, 0.16);
}

.report-hero::after {
  position: absolute;
  right: -85px;
  bottom: -125px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(255, 255, 255, 0.025);
  content: "";
}

.report-hero .card-kicker {
  color: #b8c2ff;
}

.report-hero h2 {
  max-width: 360px;
  margin: 9px 0 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.report-hero p {
  max-width: 410px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  line-height: 1.55;
}

.report-stat {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 23px;
}

.report-stat div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
}

.report-stat small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
}

.report-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.report-category {
  margin-top: 17px;
}

.report-category-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 10px;
}

.report-category-top span {
  color: var(--muted);
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0f6;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.gpt-export-card {
  position: relative;
  display: grid;
  gap: 17px;
  overflow: hidden;
  padding: 24px 20px;
  border-radius: var(--radius-xl);
  color: white;
  background:
    radial-gradient(circle at 90% 20%, rgba(123, 63, 242, 0.28), transparent 28%),
    linear-gradient(135deg, #10245d, #233b80);
}

.gpt-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #b8c2ff;
  background: rgba(255, 255, 255, 0.1);
}

.gpt-copy .card-kicker {
  color: #b8c2ff;
}

.gpt-copy h2 {
  font-size: 24px;
}

.gpt-copy p {
  max-width: 580px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
  line-height: 1.55;
}

.export-actions {
  display: grid;
  gap: 9px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 5px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.privacy-note svg {
  flex: 0 0 auto;
  width: 14px;
}

.family-users {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.family-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfe;
}

.family-user > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.family-user strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-user small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-user > small {
  padding: 5px 8px;
  border-radius: 99px;
  color: var(--green);
  background: var(--soft-green);
  font-size: 8px;
  font-weight: 800;
}

.family-members-card,
.categories-manager {
  padding: 22px;
}

.count-badge {
  padding: 6px 9px;
  border-radius: 99px;
  color: var(--coral-dark);
  background: var(--soft-coral);
  font-size: 9px;
  font-weight: 800;
}

.categories-manager {
  margin-top: 14px;
}

.categories-manager .card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.family-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.category-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbfe;
}

.category-pill-icon {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 10px;
  font-size: 15px;
}

.category-pill > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.category-pill strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-pill small {
  color: var(--muted);
  font-size: 8px;
}

.category-color-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.sharing-card {
  padding: 25px;
  border-radius: var(--radius-xl);
  color: var(--forest);
  background: linear-gradient(145deg, #edf1ff, #f0ebff);
}

.sharing-art {
  position: relative;
  width: 100%;
  height: 80px;
  margin-bottom: 15px;
}

.sharing-art span {
  position: absolute;
  bottom: 0;
  width: 55px;
  height: 55px;
  border: 8px solid rgba(83, 103, 245, 0.16);
  border-radius: 50%;
}

.sharing-art span:nth-child(1) { left: 10%; }
.sharing-art span:nth-child(2) { left: calc(10% + 41px); bottom: 17px; }
.sharing-art span:nth-child(3) { left: calc(10% + 82px); }

.sharing-card .card-kicker {
  color: #5367f5;
}

.sharing-card h2 {
  margin: 7px 0;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.12;
}

.sharing-card p {
  color: rgba(16, 26, 60, 0.66);
  font-size: 11px;
  line-height: 1.55;
}

.sharing-card ul {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
  font-weight: 700;
}

.sharing-card li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sharing-card li svg {
  width: 16px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px 0;
  background: rgba(12, 31, 26, 0.5);
  backdrop-filter: blur(3px);
}

.modal {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 22px 19px calc(24px + env(safe-area-inset-bottom));
  border-radius: 25px 25px 0 0;
  background: var(--paper);
  box-shadow: 0 -20px 60px rgba(13, 36, 30, 0.2);
  animation: slide-up 0.26s ease;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.modal-head h2 {
  margin: 4px 0;
  font-size: 25px;
  font-weight: 700;
}

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

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: white;
  cursor: pointer;
}

.modal-form {
  display: grid;
  gap: 15px;
}

.kind-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 13px;
  background: #eef1f8;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-category-trigger {
  padding: 0;
  border: 0;
  color: var(--coral-dark);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.quick-category-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dce2ff;
  border-radius: 14px;
  background: #f7f8ff;
}

.quick-category-panel .field {
  gap: 5px;
}

.quick-category-panel input {
  height: 42px;
}

.quick-category-panel .button {
  min-height: 42px;
}

.routine-form {
  gap: 14px;
}

.routine-picker-block {
  display: grid;
  gap: 8px;
}

.picker-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.choice-card {
  display: grid;
  min-height: 72px;
  gap: 4px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fafbfe;
  text-align: left;
  cursor: pointer;
}

.choice-card.active {
  border-color: rgba(83, 103, 245, 0.48);
  background: linear-gradient(145deg, #f4f6ff, #eef1ff);
  box-shadow: 0 8px 20px rgba(83, 103, 245, 0.08);
}

.choice-card strong {
  font-size: 12px;
}

.choice-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.routine-day-planner {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce2ff;
  border-radius: 16px;
  background: #f7f8ff;
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.weekday-picker button {
  height: 38px;
  border: 1px solid #dfe5f5;
  border-radius: 11px;
  color: var(--muted);
  background: white;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.weekday-picker button.active {
  border-color: var(--coral);
  color: white;
  background: var(--coral);
}

.routine-date-field small {
  color: var(--muted);
  font-size: 9px;
}

.routine-preview {
  margin: -4px 0 0;
  padding: 11px 12px;
  border-radius: 13px;
  color: #4053a1;
  background: #f0f2ff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
}

.ofx-dropzone {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 24px;
  border: 1.5px dashed #cfd6ee;
  border-radius: 16px;
  background: #f8f9fd;
  text-align: center;
  cursor: pointer;
}

.ofx-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ofx-dropzone > span {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 13px;
  color: var(--coral);
  background: var(--soft-coral);
}

.ofx-dropzone strong {
  display: block;
  font-size: 12px;
}

.ofx-dropzone small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.bank-support {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bank-support span {
  padding: 6px 9px;
  border-radius: 99px;
  color: #4d5a7b;
  background: #f0f2f8;
  font-size: 8px;
  font-weight: 750;
}

.kind-toggle button {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.kind-toggle button.active[data-kind="expense"] {
  color: var(--coral-dark);
  background: white;
  box-shadow: 0 3px 10px rgba(28, 55, 48, 0.08);
}

.kind-toggle button.active[data-kind="income"] {
  color: var(--green);
  background: white;
  box-shadow: 0 3px 10px rgba(28, 55, 48, 0.08);
}

.kind-toggle svg {
  width: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.amount-input {
  position: relative;
}

.amount-input span {
  position: absolute;
  top: 16px;
  left: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.amount-input input {
  padding-left: 44px;
  font-size: 17px;
  font-weight: 750;
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-option span {
  display: block;
  width: 31px;
  height: 31px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.color-option input:checked + span {
  box-shadow: 0 0 0 2px var(--ink);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 7px;
}

.button--ghost {
  border: 1px solid var(--line);
  color: var(--muted);
  background: white;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 14px;
  bottom: 86px;
  left: 14px;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  width: min(390px, 100%);
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border-radius: 12px;
  color: white;
  background: var(--forest);
  box-shadow: 0 11px 30px rgba(17, 48, 40, 0.25);
  font-size: 11px;
  font-weight: 700;
  animation: toast-in 0.25s ease;
}

.toast.error {
  background: #9e493b;
}

.toast svg {
  flex: 0 0 auto;
  width: 17px;
}

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

@media (min-width: 720px) {
  .main {
    padding: 35px 30px 110px;
  }

  .page-head .button {
    display: inline-flex;
  }

  .page-actions {
    display: flex;
  }

  .period-range,
  .chart-legend {
    display: flex;
  }

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

  .summary-card--balance {
    grid-column: auto;
  }

  .summary-card--saved {
    display: block;
  }

  .dashboard-grid,
  .report-grid,
  .family-grid,
  .routine-layout,
  .routine-sections {
    grid-template-columns: minmax(0, 1.65fr) minmax(285px, 0.9fr);
  }

  .routine-summary {
    grid-template-columns: 1.55fr 0.8fr 0.8fr;
  }

  .routine-summary-card--main {
    grid-column: auto;
  }

  .chart-card,
  .category-card,
  .accounts-section,
  .transactions-section,
  .ledger-card,
  .report-breakdown,
  .routine-layout > .card,
  .routine-sections > .card {
    padding: 23px;
  }

  .accounts-list {
    margin-right: -23px;
    margin-left: -23px;
    padding-right: 23px;
    padding-left: 23px;
  }

  .account-card {
    min-width: 265px;
  }

  .dashboard-routine-board {
    grid-template-columns: minmax(250px, 1.05fr) minmax(180px, 0.68fr) minmax(240px, 1fr);
    align-items: stretch;
  }

  .task-ring-card {
    min-height: 100%;
  }

  .task-frequency-chart {
    grid-column: 1 / 3;
  }

  .task-focus-list {
    grid-row: span 2;
  }

  .ledger-toolbar {
    grid-template-columns: minmax(240px, 380px) 1fr;
    align-items: center;
  }

  .ledger-summary {
    justify-content: flex-end;
    gap: 22px;
  }

  .transaction-list--full .transaction-item {
    grid-template-columns: auto 1fr 150px auto;
  }

  .transaction-delete {
    display: grid;
  }

  .gpt-export-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 28px;
  }

  .export-actions {
    min-width: 190px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal {
    padding: 26px;
    border-radius: 25px;
  }

  .toast-region {
    right: 24px;
    bottom: 24px;
    left: auto;
  }
}

@media (min-width: 960px) {
  .auth-screen {
    grid-template-columns: minmax(480px, 1.2fr) minmax(420px, 0.8fr);
  }

  .auth-brand {
    display: flex;
    flex-direction: column;
  }

  .auth-panel {
    min-height: auto;
    padding: 45px;
  }

  .mobile-auth-logo {
    display: none;
  }

  .sidebar {
    display: flex;
  }

  .mobile-header,
  .bottom-nav {
    display: none;
  }

  .main {
    margin-left: 244px;
    padding: 43px 40px 60px;
  }

  .toast-region {
    right: 28px;
  }
}

@media (min-width: 1280px) {
  .main {
    padding-right: 55px;
    padding-left: 55px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
