
:root {
  --bg: #07100d;
  --bg-2: #0a1713;
  --panel: rgba(15, 29, 24, .92);
  --panel-2: #12251f;
  --panel-3: #183129;
  --text: #f5fbf8;
  --muted: #91a39b;
  --line: rgba(209, 255, 234, .11);
  --green: #63f3ba;
  --green-2: #29c7a4;
  --blue: #6e86ff;
  --yellow: #ffd166;
  --red: #ff6b6b;
  --orange: #ff9f43;
  --purple: #b191ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  --radius: 24px;
  --sidebar: 258px;
  --content-max: 1420px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -10%, rgba(41, 199, 164, .14), transparent 34rem),
    radial-gradient(circle at 15% 65%, rgba(90, 124, 255, .08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.text-warning { color: var(--yellow); }
.eyebrow {
  display: block;
  color: var(--green);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.button {
  min-height: 46px;
  padding: .72rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  font-weight: 850;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-primary {
  color: #03120d;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 14px 32px rgba(41, 199, 164, .2);
}
.button-secondary { color: white; background: var(--panel-3); border-color: var(--line); }
.button-ghost { color: #dce8e2; background: transparent; border-color: var(--line); }
.button-danger { color: white; background: rgba(255, 107, 107, .14); border-color: rgba(255, 107, 107, .25); }
.button-small { min-height: 36px; padding: .48rem .72rem; border-radius: 10px; font-size: .78rem; }
.button-full { width: 100%; }
.icon-button {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; border: 1px solid var(--line);
  background: rgba(255,255,255,.035); color: white; cursor: pointer;
}
.stack-form { display: grid; gap: 1rem; }
.stack-form label, .field {
  display: grid;
  gap: .42rem;
  color: #d8e5de;
  font-size: .82rem;
  font-weight: 760;
}
.stack-form small, .field small { color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%;
  color: var(--text);
  background: #0a1713;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: .78rem .88rem;
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(99, 243, 186, .65);
  box-shadow: 0 0 0 3px rgba(99, 243, 186, .09);
}
input[type="color"] { min-height: 45px; padding: .25rem; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: #d8e5de; }
.auth-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 30px clamp(20px, 5vw, 76px);
}
.auth-ambient {
  position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none;
}
.ambient-one {
  width: 540px; height: 540px; right: -180px; top: -160px;
  background: radial-gradient(circle, rgba(99,243,186,.18), transparent 65%);
}
.ambient-two {
  width: 520px; height: 520px; left: -220px; bottom: -180px;
  background: radial-gradient(circle, rgba(90,124,255,.15), transparent 65%);
}
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.auth-brand img { width: min(305px, 58vw); height: 64px; object-fit: contain; object-position: left center; }
.auth-brand span { color: var(--muted); font-size: .84rem; font-weight: 700; }
.auth-grid {
  position: relative; z-index: 2;
  width: min(1180px, 100%);
  margin: 7vh auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .7fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
}
.auth-intro h1 {
  margin: .45rem 0 1.4rem;
  font-size: clamp(3.2rem, 7vw, 7.2rem);
  line-height: .88;
  letter-spacing: -.075em;
}
.auth-intro h1 em { color: var(--green); font-style: normal; }
.auth-intro > p { max-width: 650px; color: #b8c7c0; font-size: 1.05rem; }
.auth-feature-list { margin-top: 2.3rem; display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem; }
.auth-feature-list div {
  display: grid; grid-template-columns: 36px 1fr; gap: .75rem; align-items: center;
  padding: .9rem; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.auth-feature-list span { color: var(--green); font-weight: 900; }
.auth-feature-list strong { font-size: .83rem; }
.auth-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(209,255,234,.14);
  border-radius: 28px;
  background: rgba(10,23,19,.88);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.auth-card-heading { margin-bottom: 1.5rem; }
.auth-card-heading h2 { margin: .2rem 0; font-size: 2.2rem; letter-spacing: -.045em; }
.auth-card-heading p { margin: 0; color: var(--muted); font-size: .88rem; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar);
  padding: 24px 18px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(7,16,13,.88);
  backdrop-filter: blur(18px);
}
.side-brand { display: flex; align-items: center; gap: .8rem; padding: .25rem .55rem 1.8rem; }
.side-brand img { width: 45px; height: 45px; }
.side-brand span { font-size: 1.15rem; letter-spacing: -.04em; }
.side-brand span strong { color: var(--text); }
.side-brand span { color: var(--green); font-weight: 850; }
.side-nav { display: grid; gap: .3rem; }
.side-nav a {
  min-height: 48px;
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem .72rem;
  border-radius: 14px;
  color: #94a79e;
  font-size: .88rem;
  font-weight: 780;
  transition: .17s ease;
}
.side-nav a:hover { color: white; background: rgba(255,255,255,.035); }
.side-nav a.active {
  color: #062016;
  background: linear-gradient(135deg, var(--green), #7bf5c5);
  box-shadow: 0 12px 30px rgba(41,199,164,.18);
}
.nav-icon {
  width: 31px; height: 31px; display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  font-size: 1rem;
}
.side-nav a.active .nav-icon { background: rgba(0,0,0,.1); }
.sidebar-foot { margin-top: .8rem; }
.profile-button {
  width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: .65rem; align-items: center;
  padding: .65rem; border: 1px solid var(--line); border-radius: 15px;
  color: white; background: rgba(255,255,255,.025); text-align: left; cursor: pointer;
}
.profile-button > span:first-child {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green-2), var(--blue)); color: #06130f; font-weight: 950;
}
.profile-button span:nth-child(2) { display: grid; }
.profile-button small { color: var(--muted); }
.mobile-header, .bottom-nav { display: none; }
.main-content { margin-left: var(--sidebar); min-height: 100vh; padding: 32px clamp(22px, 4vw, 58px) 70px; }
#page-content { width: min(var(--content-max), 100%); margin: 0 auto; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.7rem;
}
.page-head h1 { margin: .15rem 0 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: .96; letter-spacing: -.055em; }
.page-head p { margin: .6rem 0 0; color: var(--muted); max-width: 650px; }
.page-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.month-switcher {
  display: flex; align-items: center; gap: .4rem;
  padding: .3rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025);
}
.month-switcher button {
  width: 34px; height: 34px; border: 0; border-radius: 10px;
  color: white; background: transparent; cursor: pointer;
}
.month-switcher button:hover { background: var(--panel-3); }
.month-switcher strong { min-width: 120px; text-align: center; font-size: .82rem; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18,37,31,.95), rgba(11,25,20,.94));
  box-shadow: 0 18px 60px rgba(0,0,0,.16);
}
.card-pad { padding: 1.25rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .9rem; }
.summary-card { position: relative; min-height: 150px; overflow: hidden; padding: 1.2rem; }
.summary-card::after {
  content: ""; position: absolute; width: 130px; height: 130px; right: -55px; top: -55px;
  border-radius: 50%; background: var(--card-glow, rgba(99,243,186,.1));
}
.summary-card span { color: var(--muted); font-size: .76rem; font-weight: 820; text-transform: uppercase; letter-spacing: .09em; }
.summary-card strong { display: block; margin-top: .65rem; font-size: clamp(1.55rem, 2.7vw, 2.45rem); letter-spacing: -.055em; line-height: 1; }
.summary-card small { display: block; margin-top: .65rem; color: #abc0b6; }
.summary-card.hero-metric {
  background: linear-gradient(145deg, rgba(40,194,155,.98), rgba(22,126,105,.96));
  color: #04150f;
}
.summary-card.hero-metric span, .summary-card.hero-metric small { color: rgba(3,21,15,.72); }
.dashboard-grid {
  display: grid; grid-template-columns: minmax(0,1.4fr) minmax(310px,.75fr);
  gap: 1rem; margin-top: 1rem;
}
.dashboard-column { display: grid; gap: 1rem; align-content: start; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.2rem 0;
}
.card-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; }
.card-head p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }
.card-head .text-button, .text-button {
  padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-weight: 850; font-size: .8rem;
}
.card-body { padding: 1rem 1.2rem 1.25rem; }
.quick-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: .65rem; }
.quick-action {
  min-height: 96px; display: grid; place-items: center; align-content: center; gap: .45rem;
  border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025);
  color: #dceae3; cursor: pointer; transition: .18s ease;
}
.quick-action:hover { transform: translateY(-3px); border-color: rgba(99,243,186,.28); background: rgba(99,243,186,.05); }
.quick-action b { font-size: 1.25rem; color: var(--green); }
.quick-action span { font-size: .75rem; font-weight: 820; }
.budget-list { display: grid; gap: .95rem; }
.budget-row { display: grid; gap: .42rem; }
.budget-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; }
.budget-line span { display: flex; align-items: center; gap: .5rem; }
.color-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.budget-line small { color: var(--muted); }
.progress {
  height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.055);
}
.progress > i {
  display: block; height: 100%; width: var(--progress, 0%);
  border-radius: inherit; background: var(--bar, var(--green));
  transition: width .35s ease;
}
.progress.danger > i { background: var(--red); }
.progress.warning > i { background: var(--yellow); }
.transaction-list, .bill-list, .goal-list { display: grid; }
.list-row {
  display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: .75rem; align-items: center;
  padding: .82rem 0; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.row-icon {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px;
  color: var(--row-color, var(--green)); background: color-mix(in srgb, var(--row-color, var(--green)) 13%, transparent);
  font-weight: 950;
}
.row-main { min-width: 0; }
.row-main strong, .row-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main strong { font-size: .86rem; }
.row-main span { color: var(--muted); font-size: .74rem; margin-top: .15rem; }
.row-value { text-align: right; }
.row-value strong { font-size: .88rem; }
.row-value small { display: block; color: var(--muted); font-size: .7rem; margin-top: .16rem; }
.partner-preview {
  position: relative; overflow: hidden; padding: 1.25rem;
  background:
    radial-gradient(circle at 100% 0, rgba(110,134,255,.22), transparent 50%),
    linear-gradient(145deg, #172b25, #10211c);
}
.partner-preview::before {
  content: "⟳"; position: absolute; right: 12px; bottom: -45px;
  font-size: 9rem; color: rgba(255,255,255,.025); font-weight: 900;
}
.partner-preview h3 { margin: .3rem 0 .1rem; font-size: 1.35rem; }
.partner-preview p { margin: .2rem 0 1rem; color: var(--muted); font-size: .8rem; }
.partner-numbers { display: grid; grid-template-columns: repeat(2,1fr); gap: .7rem; }
.partner-numbers div { padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.partner-numbers span { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.partner-numbers strong { display: block; margin-top: .25rem; font-size: 1rem; }
.empty-state {
  min-height: 170px; display: grid; place-items: center; text-align: center; padding: 2rem;
  border: 1px dashed var(--line); border-radius: 18px; color: var(--muted);
}
.empty-state strong { display: block; color: white; margin-bottom: .25rem; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: 1rem;
}
.toolbar-left, .toolbar-right { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.search-input { max-width: 260px; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th {
  padding: .82rem 1rem; color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; text-align: left; background: rgba(255,255,255,.02);
}
.data-table td { padding: .85rem 1rem; border-top: 1px solid var(--line); font-size: .82rem; }
.data-table tr:hover td { background: rgba(255,255,255,.015); }
.table-amount { font-weight: 900; white-space: nowrap; }
.table-actions { display: flex; justify-content: flex-end; gap: .35rem; }
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .32rem .55rem; border-radius: 999px;
  background: rgba(255,255,255,.055); color: #d8e5de;
  font-size: .68rem; font-weight: 850;
}
.pill.success { background: rgba(99,243,186,.11); color: var(--green); }
.pill.warning { background: rgba(255,209,102,.11); color: var(--yellow); }
.pill.danger { background: rgba(255,107,107,.11); color: var(--red); }
.pill.info { background: rgba(110,134,255,.12); color: #a9b5ff; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.goal-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.goal-card { padding: 1rem; }
.goal-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.goal-card h3 { margin: .25rem 0 0; font-size: 1rem; }
.goal-card .goal-number { margin: 1.1rem 0 .65rem; font-size: 1.5rem; font-weight: 950; letter-spacing: -.04em; }
.goal-card .goal-number small { color: var(--muted); font-size: .74rem; font-weight: 650; }
.goal-card-foot { display: flex; justify-content: space-between; gap: .5rem; margin-top: .7rem; color: var(--muted); font-size: .7rem; }
.category-manage-list { display: grid; gap: .6rem; }
.category-manage-row {
  display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center;
  padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02);
}
.category-manage-row > div:first-child { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.category-manage-row > div:first-child > div { display: grid; gap: .24rem; min-width: 0; }
.category-manage-row strong { display: block; }
.category-manage-row small { display: block; line-height: 1.45; }
.calendar-shell { overflow: hidden; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.calendar-weekdays span { padding: .75rem; text-align: center; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.calendar-day {
  min-height: 128px; padding: .65rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.006);
}
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { opacity: .35; }
.calendar-day.today { background: rgba(99,243,186,.035); box-shadow: inset 0 0 0 1px rgba(99,243,186,.25); }
.day-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-size: .75rem; font-weight: 900; }
.today .day-number { color: #06160f; background: var(--green); }
.calendar-events { display: grid; gap: .27rem; margin-top: .45rem; }
.calendar-event {
  overflow: hidden; padding: .32rem .4rem; border-radius: 7px;
  white-space: nowrap; text-overflow: ellipsis;
  color: var(--event-color, #dffef0);
  background: color-mix(in srgb, var(--event-color, var(--green)) 12%, transparent);
  border-left: 2px solid var(--event-color, var(--green));
  font-size: .62rem; font-weight: 760;
}
.partner-grid, .list-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; }
.partner-card, .shopping-card { padding: 1rem; cursor: pointer; transition: .18s ease; }
.partner-card:hover, .shopping-card:hover { transform: translateY(-3px); border-color: rgba(99,243,186,.25); }
.partner-card h3, .shopping-card h3 { margin: .4rem 0 .2rem; font-size: 1rem; }
.partner-card > p, .shopping-card > p { margin: 0; color: var(--muted); font-size: .76rem; }
.card-metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: .5rem; margin-top: 1rem; }
.card-metrics div { padding: .65rem; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.card-metrics span { display: block; color: var(--muted); font-size: .63rem; text-transform: uppercase; letter-spacing: .07em; }
.card-metrics strong { display: block; margin-top: .2rem; font-size: .88rem; }
.detail-back { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; color: var(--muted); font-size: .8rem; font-weight: 800; }
.partner-hero {
  padding: 1.25rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  background: radial-gradient(circle at 90% 20%, rgba(110,134,255,.18), transparent 35%), var(--panel);
}
.partner-hero h2 { margin: .3rem 0; font-size: 2rem; letter-spacing: -.045em; }
.partner-hero p { margin: 0; color: var(--muted); }
.partner-rounds { display: grid; gap: .75rem; margin-top: 1rem; }
.round-card { overflow: hidden; }
.round-summary {
  display: grid; grid-template-columns: 50px minmax(0,1.3fr) repeat(3,minmax(90px,.5fr)) auto;
  gap: .75rem; align-items: center; padding: .9rem 1rem; cursor: pointer;
}
.round-number {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px;
  background: rgba(110,134,255,.12); color: #b5c0ff; font-weight: 950;
}
.round-summary h3 { margin: 0; font-size: .9rem; }
.round-summary p { margin: .16rem 0 0; color: var(--muted); font-size: .7rem; }
.round-stat span { display: block; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; }
.round-stat strong { display: block; margin-top: .18rem; font-size: .82rem; }
.round-detail { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.contribution-list { display: grid; gap: .45rem; margin-top: .8rem; }
.contribution-row {
  display: grid; grid-template-columns: minmax(0,1fr) 100px 80px auto; gap: .7rem; align-items: center;
  padding: .7rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018);
}
.contribution-row strong { font-size: .82rem; }
.contribution-row small { display: block; color: var(--muted); font-size: .67rem; }
.contribution-actions { display: flex; gap: .35rem; }
.shopping-detail-grid { display: grid; grid-template-columns: minmax(0,1.3fr) 320px; gap: 1rem; }
.shopping-items { display: grid; gap: .5rem; }
.shopping-item {
  display: grid; grid-template-columns: 30px minmax(0,1fr) 90px auto; gap: .7rem; align-items: center;
  padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018);
}
.shopping-item.checked .item-name { text-decoration: line-through; color: var(--muted); }
.item-name strong { display: block; font-size: .84rem; }
.item-name small { color: var(--muted); font-size: .68rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.settings-section { padding: 1.15rem; }
.settings-section h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.settings-section > p { margin: 0 0 1rem; color: var(--muted); font-size: .78rem; }
.settings-list { display: grid; gap: .5rem; }
.settings-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018);
}
.settings-row strong { display: block; font-size: .82rem; }
.settings-row small { display: block; color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(255,107,107,.08); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(99,243,186,.08); }
.toast-region { position: fixed; z-index: 300; right: 18px; top: 18px; display: grid; gap: .6rem; }
.toast {
  width: min(380px, calc(100vw - 36px)); padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(15,29,24,.97);
  box-shadow: var(--shadow); animation: toast-in .2s ease;
}
.toast.success { border-color: rgba(99,243,186,.28); }
.toast.error { border-color: rgba(255,107,107,.35); }
.toast strong { display: block; font-size: .82rem; }
.toast span { display: block; color: var(--muted); font-size: .75rem; margin-top: .12rem; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }
.modal {
  width: min(640px, calc(100vw - 24px)); max-height: min(88vh, 860px);
  padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 24px;
  color: var(--text); background: #0d1d18; box-shadow: 0 30px 100px rgba(0,0,0,.62);
}
.modal::backdrop { background: rgba(0,7,4,.72); backdrop-filter: blur(8px); }
.modal-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; max-height: inherit; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.2rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: .15rem 0 0; font-size: 1.45rem; letter-spacing: -.035em; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; background: transparent; color: white; cursor: pointer; font-size: 1.4rem; }
.modal-body { overflow-y: auto; padding: 1.25rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: rgba(0,0,0,.08); }
.member-builder { display: grid; gap: .55rem; }
.member-line { display: grid; grid-template-columns: 34px 1fr 1fr 34px; gap: .5rem; align-items: center; }
.member-line > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(110,134,255,.12); color: #b6c0ff; font-weight: 900; font-size: .72rem; }
.member-line button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); color: var(--red); background: transparent; cursor: pointer; }
.loading {
  min-height: 50vh; display: grid; place-items: center; color: var(--muted);
}
.loading::before {
  content: ""; width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.08);
  border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1160px) {
  .summary-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .partner-grid, .list-grid { grid-template-columns: repeat(2,1fr); }
  .round-summary { grid-template-columns: 46px 1fr repeat(2,minmax(80px,.5fr)) auto; }
  .round-summary .round-stat:nth-of-type(3) { display: none; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .mobile-header {
    position: fixed; z-index: 50; inset: 0 0 auto 0; height: 68px; padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--line); background: rgba(7,16,13,.9); backdrop-filter: blur(18px);
  }
  .mobile-brand { display: flex; align-items: center; gap: .55rem; font-weight: 900; letter-spacing: -.03em; }
  .mobile-brand img { width: 38px; height: 38px; }
  .main-content { margin: 0; padding: 92px 16px 102px; }
  .bottom-nav {
    position: fixed; z-index: 50; inset: auto 10px max(10px, env(safe-area-inset-bottom)) 10px;
    height: 68px; display: grid; grid-template-columns: repeat(6,1fr);
    border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
    background: rgba(10,23,19,.95); backdrop-filter: blur(20px); box-shadow: var(--shadow);
  }
  .bottom-nav a { display: grid; place-items: center; align-content: center; gap: .18rem; color: var(--muted); }
  .bottom-nav a span { font-size: 1.05rem; }
  .bottom-nav a small { font-size: .59rem; font-weight: 800; }
  .bottom-nav a.active { color: var(--green); background: rgba(99,243,186,.05); }
  .auth-grid { grid-template-columns: 1fr; margin-top: 4vh; }
  .auth-intro { display: none; }
  .auth-card { width: min(480px, 100%); margin: auto; }
  .plan-grid, .settings-grid { grid-template-columns: 1fr; }
  .shopping-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .auth-view { padding: 18px; }
  .auth-brand span { display: none; }
  .auth-brand img { width: 235px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 2.3rem; }
  .page-head .page-actions { justify-content: flex-end; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-height: 132px; }
  .summary-card strong { font-size: 1.45rem; }
  .quick-actions { grid-template-columns: repeat(2,1fr); }
  .goal-cards, .partner-grid, .list-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-input { max-width: none; }
  .calendar-day { min-height: 86px; padding: .35rem; }
  .calendar-weekdays span { padding: .55rem .15rem; font-size: .58rem; }
  .calendar-event { font-size: 0; min-height: 8px; padding: 0; border-left: 0; border-radius: 999px; }
  .day-number { width: 23px; height: 23px; font-size: .65rem; }
  .round-summary { grid-template-columns: 42px minmax(0,1fr) auto; }
  .round-summary .round-stat { display: none !important; }
  .contribution-row { grid-template-columns: minmax(0,1fr) auto; }
  .contribution-row > :nth-child(2), .contribution-row > :nth-child(3) { display: none; }
  .shopping-item { grid-template-columns: 28px minmax(0,1fr) auto; }
  .shopping-item > :nth-child(3) { display: none; }
  .member-line { grid-template-columns: 28px 1fr 34px; }
  .member-line input:nth-of-type(2) { grid-column: 2; }
  .member-line button { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 420px) {
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 112px; }
  .page-head { display: block; }
  .page-actions { margin-top: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* BudgetSync 2.0 additions */
.month-switcher strong { min-width: 132px; text-align: center; }
.month-switcher input[type="month"] {
  width: 142px; min-height: 34px; padding: .35rem .55rem; border-radius: 10px;
  background: rgba(255,255,255,.035); font-size: .75rem; color: var(--text);
}
.month-switcher .today-button { width: auto; padding: 0 .65rem; color: var(--green); font-size: .68rem; font-weight: 900; }

.sidebar-calculator {
  margin-top: .9rem; padding: .7rem; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255,255,255,.022);
}
.calculator-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.calculator-head button { border: 0; color: var(--green); background: transparent; cursor: pointer; font-weight: 900; }
.calculator-display {
  min-height: 42px; display: flex; align-items: center; justify-content: flex-end; overflow: hidden;
  padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 11px; background: #08140f;
  color: white; font-size: 1.02rem; font-weight: 900; font-variant-numeric: tabular-nums;
}
.calculator-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .28rem; margin-top: .45rem; }
.calculator-grid button {
  min-height: 31px; border: 1px solid var(--line); border-radius: 9px; color: #dce8e2;
  background: rgba(255,255,255,.03); cursor: pointer; font-size: .72rem; font-weight: 850;
}
.calculator-grid button:hover { background: rgba(99,243,186,.08); border-color: rgba(99,243,186,.24); }
.calculator-grid .calculator-equals { grid-column: 1 / -1; color: #062016; background: linear-gradient(135deg, var(--green), var(--green-2)); }

.compare-controls { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: .75rem; align-items: end; }
.compare-controls label { display: grid; gap: .38rem; color: var(--muted); font-size: .72rem; font-weight: 850; }
.compare-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.compare-card { padding: 1rem; }
.compare-card > span { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.compare-values { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .75rem; }
.compare-values div { padding: .7rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.02); }
.compare-values small, .compare-delta small { display: block; color: var(--muted); font-size: .65rem; }
.compare-values strong { display: block; margin-top: .18rem; font-size: .95rem; }
.compare-delta { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.compare-delta strong { font-size: .85rem; }
.compare-table { margin-top: 1rem; }

.calendar-day { color: inherit; text-align: left; cursor: pointer; }
.calendar-day:hover { background: rgba(99,243,186,.045); }
.calendar-day:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.calendar-jump { display: flex; align-items: center; gap: .45rem; }
.calendar-jump input { width: 150px; min-height: 42px; }
.day-overview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .8rem; margin-bottom: 1rem; }
.day-event-list { display: grid; gap: .55rem; }
.day-event-row { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; gap: .7rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); }
.day-event-row i { width: 10px; height: 10px; border-radius: 50%; background: var(--event-color); }
.day-event-row strong, .day-event-row small { display: block; }
.day-event-row small { color: var(--muted); margin-top: .15rem; }

.partner-fee-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; margin-top: 1rem; }
.partner-fee-grid div { padding: .72rem; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.02); }
.partner-fee-grid span { display: block; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; }
.partner-fee-grid strong { display: block; margin-top: .2rem; font-size: .88rem; }

.whatsapp-choice-grid { display: grid; gap: .75rem; }
.whatsapp-choice-panel { padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }

@media (max-height: 800px) and (min-width: 901px) {
  .sidebar { overflow-y: auto; }
  .side-brand { padding-bottom: .9rem; }
  .side-nav a { min-height: 43px; }
  .sidebar-calculator { margin-top: .55rem; }
  .calculator-grid button { min-height: 27px; }
}
@media (max-width: 900px) {
  .compare-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .month-switcher { flex-wrap: wrap; justify-content: center; }
  .month-switcher strong { min-width: 110px; }
  .month-switcher input[type="month"] { width: 132px; }
  .compare-controls { grid-template-columns: 1fr 1fr; }
  .compare-summary, .day-overview-grid, .partner-fee-grid { grid-template-columns: 1fr; }
  .calendar-jump { width: 100%; }
  .calendar-jump input { flex: 1; width: auto; }
}


/* BudgetSync 2.1 refinements */
.auth-brand img { width: min(282px, 56vw); height: 62px; }
.side-brand { gap: 1.05rem; }
.side-brand span { white-space: nowrap; }
.calculator-display {
  min-height: 58px; flex-direction: column; align-items: stretch; justify-content: center; gap: .18rem;
  text-align: right;
}
.calculator-expression {
  min-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: .62rem; font-weight: 750; letter-spacing: .01em;
}
.calculator-display strong { color: white; font-size: 1.05rem; line-height: 1.1; }
.calculator-grid button:active { transform: translateY(1px); background: rgba(99,243,186,.14); }
.compare-legend { display: flex; flex-wrap: wrap; gap: .75rem 1.15rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 750; }
.compare-legend span { display: inline-flex; align-items: center; gap: .38rem; }
.compare-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-good { background: var(--green); }
.legend-bad { background: #ff6b6b; }
.legend-neutral { background: #8ca19a; }
.compare-summary-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.compare-delta strong { display: block; margin-top: .22rem; line-height: 1.35; }
.compare-delta strong span, .data-table td strong span { color: currentColor; opacity: .72; font-size: .72em; font-weight: 750; }
.compare-neutral { color: var(--muted); }
@media (max-width: 1250px) { .compare-summary-five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .compare-summary-five { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .compare-summary-five { grid-template-columns: 1fr; } }

/* BUDGETSYNC_MOBILE_CSS_V218_START */
.mobile-drawer-v218,
.mobile-drawer-backdrop-v218,
.mobile-menu-button-v218 {
  display: none;
}

@media (max-width: 900px) {
  body.mobile-menu-open-v218 {
    overflow: hidden;
  }

  .mobile-header {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: .55rem;
  }

  .mobile-menu-button-v218 {
    display: grid;
    place-items: center;
    grid-column: 1;
  }

  .mobile-header .mobile-brand {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    gap: .58rem;
  }

  .mobile-header .mobile-brand span {
    white-space: nowrap;
  }

  .mobile-header > [aria-label="Settings"],
  .mobile-header #mobile-settings,
  .mobile-header #mobile-settings-v218 {
    grid-column: 3;
    justify-self: end;
  }

  .hamburger-lines-v218 {
    width: 18px;
    display: grid;
    gap: 4px;
  }

  .hamburger-lines-v218 i {
    width: 100%;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
  }

  .mobile-drawer-backdrop-v218 {
    display: block;
    position: fixed;
    z-index: 1090;
    inset: 0;
    background: rgba(0, 8, 6, .70);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity .2s ease,
      visibility .2s ease;
    backdrop-filter: blur(3px);
  }

  .mobile-drawer-backdrop-v218.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-drawer-v218 {
    display: flex;
    position: fixed;
    z-index: 1100;
    inset: 0 auto 0 0;
    width: min(330px, 86vw);
    padding:
      max(16px, env(safe-area-inset-top))
      16px
      max(20px, env(safe-area-inset-bottom));
    flex-direction: column;
    overflow-y: auto;
    background:
      linear-gradient(165deg, #0b211a, #06110d 72%);
    border-right: 1px solid var(--line);
    box-shadow: 24px 0 70px rgba(0, 0, 0, .48);
    transform: translateX(-104%);
    visibility: hidden;
    transition:
      transform .24s ease,
      visibility .24s step-end;
  }

  .mobile-drawer-v218.open {
    transform: translateX(0);
    visibility: visible;
    transition:
      transform .24s ease,
      visibility 0s;
  }

  .mobile-drawer-head-v218 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .mobile-drawer-brand-v218 {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: white;
    font-size: 1.05rem;
    font-weight: 950;
    letter-spacing: -.035em;
  }

  .mobile-drawer-brand-v218 img {
    width: 38px;
    height: 38px;
  }

  .mobile-drawer-nav-v218 {
    display: grid;
    gap: .42rem;
    padding-top: 1rem;
  }

  .mobile-drawer-nav-v218 a,
  .mobile-drawer-nav-v218 button {
    width: 100%;
    min-height: 52px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .72rem;
    align-items: center;
    padding: .55rem .7rem;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--muted);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .mobile-drawer-nav-v218 a > span,
  .mobile-drawer-nav-v218 button > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: white;
    background: rgba(255, 255, 255, .05);
  }

  .mobile-drawer-nav-v218 strong {
    font-size: .86rem;
  }

  .mobile-drawer-nav-v218 a:hover,
  .mobile-drawer-nav-v218 button:hover,
  .mobile-drawer-nav-v218 a.active {
    color: white;
    border-color: rgba(99, 243, 186, .18);
    background: rgba(99, 243, 186, .07);
  }

  .mobile-drawer-nav-v218 a.active > span {
    color: #062016;
    background: var(--green);
  }
}

@media (max-width: 680px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head .page-actions {
    width: 100%;
  }

  .month-switcher {
    width: 100% !important;
    min-width: 0;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    grid-template-rows: auto auto;
    gap: .45rem !important;
    align-items: center;
    padding: .5rem !important;
  }

  .month-switcher > button[data-shift="-1"] {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .month-switcher > strong {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
  }

  .month-switcher > button[data-shift="1"] {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .month-switcher > input[type="month"] {
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0;
  }

  .month-switcher > .today-button {
    grid-column: 3 !important;
    grid-row: 2 !important;
    width: 100%;
    min-width: 0;
    padding-inline: .25rem;
    white-space: nowrap;
  }

  .month-switcher > button {
    min-width: 38px;
  }
}
/* BUDGETSYNC_MOBILE_CSS_V218_END */

/* BUDGETSYNC_MOBILE_ICONS_V219_START */
@media (max-width: 900px) {
  .mobile-drawer-brand-v218 {
    width: min(184px, 70%);
    min-width: 0;
  }

  .mobile-drawer-brand-v218 img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 46px;
    object-fit: contain;
    object-position: left center;
  }

  .mobile-drawer-close-v219 svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .mobile-menu-icon-v219 {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: white;
    background: rgba(255, 255, 255, .05);
  }

  .mobile-menu-icon-v219 svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-drawer-nav-v218 a.active .mobile-menu-icon-v219 {
    color: #062016;
    background: var(--green);
  }
}
/* BUDGETSYNC_MOBILE_ICONS_V219_END */

/* BUDGETSYNC_MOBILE_HEADER_LOGO_V220_START */
@media (max-width: 900px) {
  .mobile-header .mobile-brand {
    width: min(154px, 48vw);
    min-width: 0;
    display: block;
    justify-self: center;
  }

  .mobile-header .mobile-brand img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 43px;
    object-fit: contain;
    object-position: center;
  }
}

@media (max-width: 390px) {
  .mobile-header .mobile-brand {
    width: min(138px, 45vw);
  }
}
/* BUDGETSYNC_MOBILE_HEADER_LOGO_V220_END */


/* Tax Center */
.tax-year-toolbar{display:flex;align-items:center;justify-content:center;gap:1rem;margin:0 0 1rem}.tax-stat-grid{margin-bottom:1rem}.tax-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:1rem;margin:1rem 0}.tax-help-card{align-self:start}.check-list{display:grid;gap:.75rem;margin:1rem 0}.check-list span{padding:.75rem;border-radius:12px;background:var(--surface-soft,#f5f7f8)}.tax-review-card{margin-top:1rem}.percent-input{display:flex;align-items:center;gap:.35rem}.percent-input input{width:78px}.notice{padding:1rem 1.1rem;border-radius:14px;margin:1rem 0}.notice.warning{background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.35)}.notice.success{background:rgba(52,211,153,.1);border:1px solid rgba(52,211,153,.3)}
@media(max-width:900px){.tax-layout{grid-template-columns:1fr}.tax-year-toolbar{justify-content:space-between}.tax-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.tax-stat-grid{grid-template-columns:1fr}.tax-year-toolbar strong{font-size:.9rem}}

/* BUDGETSYNC TAX PREP V3 */
.tax-head-actions{display:flex;gap:.55rem;flex-wrap:wrap}.tax-progress-card{display:grid;grid-template-columns:minmax(250px,360px) minmax(0,1fr);gap:2rem;align-items:center;margin-bottom:1rem;padding:1.35rem 1.5rem}.tax-progress-card>div:first-child{min-width:0}.tax-progress-card>div:last-child{min-width:0;padding-left:2rem;border-left:1px solid var(--border)}.tax-progress-card h2{margin:.2rem 0 .3rem}.tax-progress-card p{margin:0;color:var(--muted);line-height:1.45}.tax-progress-track{width:100%;height:14px;border-radius:999px;background:rgba(255,255,255,.07);overflow:hidden;border:1px solid var(--border);box-shadow:inset 0 1px 2px rgba(0,0,0,.2)}.tax-progress-track span{display:block;height:100%;background:var(--green);border-radius:inherit;transition:width .25s ease}.tax-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1rem 0}.tax-summary-card{min-width:0;padding:1.15rem;border-radius:18px;background:var(--panel);border:1px solid var(--border);display:grid;gap:.38rem}.tax-summary-card>span{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}.tax-summary-card>strong{font-size:clamp(1.35rem,2vw,2rem);line-height:1.05;overflow-wrap:anywhere}.tax-summary-card>small{color:var(--muted);line-height:1.35}.tax-step-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem;margin:1rem 0}.tax-step-nav a{display:flex;gap:.65rem;align-items:center;padding:.75rem .85rem;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.025);color:var(--text);text-decoration:none}.tax-step-nav b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:rgba(99,243,186,.12);color:var(--green)}.tax-step-nav span{font-weight:750;font-size:.85rem}.tax-wizard-section{margin:1rem 0;padding:1.2rem}.tax-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.tax-section-head h2{margin:.15rem 0}.tax-section-head p{margin:.25rem 0 0;color:var(--muted);max-width:820px}.tax-pack-card{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem;border:1px solid rgba(99,243,186,.18);background:rgba(99,243,186,.045);border-radius:14px}.tax-pack-card h3{margin:.2rem 0}.tax-pack-card p{margin:.2rem 0 .35rem;color:var(--muted)}.tax-advanced{border:1px solid var(--border);border-radius:14px;padding:.9rem 1rem;background:rgba(255,255,255,.02)}.tax-advanced summary{cursor:pointer;font-weight:800}.tax-advanced[open] summary{margin-bottom:.75rem}.tax-data-table select{min-width:220px}.tax-data-table .tax-amount{white-space:nowrap;font-weight:750}.tax-data-table .tax-amount.income{color:var(--green)}.tax-question-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.tax-question{display:grid;gap:.5rem;padding:1rem;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.02)}.tax-question>span{font-weight:760;line-height:1.35}.tax-question-grid>.button{grid-column:1/-1}.tax-final-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr);gap:1rem}.tax-checklist{display:grid;gap:.7rem}.tax-checklist>div{display:flex;gap:.75rem;align-items:flex-start;padding:.9rem;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.025);color:var(--text)}.tax-checklist b{flex:0 0 30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(99,243,186,.12);color:var(--green)}.tax-checklist span{display:grid;gap:.2rem}.tax-checklist strong{color:var(--text)}.tax-checklist small{color:var(--muted)}.tax-export-panel{padding:1rem;border-radius:16px;background:rgba(99,243,186,.055);border:1px solid rgba(99,243,186,.2)}.tax-export-panel h3{margin:.2rem 0}.tax-export-panel p{color:var(--muted)}.tax-export-panel .button+.button{margin-top:.55rem}.admin-users-card{grid-column:1/-1}.pill.warning{border-color:rgba(245,158,11,.4);color:#fbbf24}.check-list span{color:var(--text)!important;background:rgba(255,255,255,.035)!important;border:1px solid var(--border)}
@media(max-width:1100px){.tax-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tax-progress-card{grid-template-columns:1fr;gap:1rem}.tax-progress-card>div:last-child{padding-left:0;padding-top:1rem;border-left:0;border-top:1px solid var(--border)}.tax-final-grid{grid-template-columns:1fr}}
@media(max-width:760px){.tax-summary-grid,.tax-question-grid{grid-template-columns:1fr}.tax-step-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.tax-section-head,.tax-pack-card{flex-direction:column;align-items:stretch}.tax-data-table{min-width:780px}}
@media(max-width:480px){.tax-step-nav{grid-template-columns:1fr}.tax-year-toolbar{gap:.4rem}.tax-year-toolbar .button{padding-inline:.65rem}.tax-wizard-section{padding:.9rem}}

/* BudgetSync 2.5.2 sidebar fit fix
   Keep every desktop sidebar control visible on shorter screens after adding
   Tax Center and Point of Sale. The sidebar becomes denser before falling
   back to scrolling, so navigation, calculator and profile/settings remain reachable. */
@media (min-width: 901px) and (max-height: 1020px) {
  .sidebar {
    padding: 14px 13px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .side-brand {
    gap: .72rem;
    padding: .1rem .45rem .72rem;
  }
  .side-brand img { width: 38px; height: 38px; }
  .side-brand span { font-size: 1.02rem; }

  .side-nav { gap: .18rem; }
  .side-nav a {
    min-height: 39px;
    gap: .65rem;
    padding: .32rem .58rem;
    border-radius: 12px;
    font-size: .82rem;
  }
  .nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: .9rem;
    flex: 0 0 28px;
  }

  .sidebar-calculator {
    margin-top: .5rem;
    padding: .55rem;
    border-radius: 14px;
  }
  .calculator-head { margin-bottom: .32rem; font-size: .62rem; }
  .calculator-display {
    min-height: 45px;
    padding: .4rem .5rem;
  }
  .calculator-expression { min-height: 11px; font-size: .57rem; }
  .calculator-display strong { font-size: .94rem; }
  .calculator-grid { gap: .22rem; margin-top: .32rem; }
  .calculator-grid button {
    min-height: 25px;
    border-radius: 8px;
    font-size: .66rem;
  }

  .sidebar-foot { margin-top: .48rem; padding-bottom: .1rem; }
  .profile-button {
    grid-template-columns: 32px 1fr auto;
    gap: .5rem;
    padding: .48rem;
    border-radius: 13px;
  }
  .profile-button > span:first-child {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .profile-button strong { font-size: .78rem; }
  .profile-button small { font-size: .65rem; }
}

@media (min-width: 901px) and (max-height: 820px) {
  .sidebar { padding-top: 9px; padding-bottom: 9px; }
  .side-brand { padding-bottom: .42rem; }
  .side-brand img { width: 34px; height: 34px; }
  .side-nav a { min-height: 35px; padding-top: .24rem; padding-bottom: .24rem; }
  .nav-icon { width: 25px; height: 25px; flex-basis: 25px; }
  .sidebar-calculator { margin-top: .35rem; padding: .45rem; }
  .calculator-display { min-height: 39px; }
  .calculator-grid button { min-height: 22px; }
  .sidebar-foot { margin-top: .35rem; }
}


/* BudgetSync v2.6 connected workflow refinements */
.tax-progress-meter{min-width:0;padding-left:2rem;border-left:1px solid var(--border)}
.tax-progress-meter .tax-progress-track{padding:0!important}
.tax-progress-track span{margin:0!important;transform:none!important}
.money-view-tabs{display:inline-flex;gap:.35rem;padding:.3rem;margin:0 0 1rem;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.02)}
.money-view-tabs a{padding:.65rem 1rem;border-radius:10px;color:var(--muted);font-size:.82rem;font-weight:850;text-decoration:none}
.money-view-tabs a.active{color:#06130f;background:var(--green)}
.auto-pill{margin-left:.45rem;font-size:.58rem;vertical-align:middle;color:var(--green);border-color:rgba(99,243,186,.25);background:rgba(99,243,186,.08)}
.smart-help{display:grid;gap:.3rem;margin-top:1rem;padding:.85rem;border:1px solid rgba(99,243,186,.18);border-radius:13px;background:rgba(99,243,186,.045)}
.smart-help small{color:var(--muted);line-height:1.45}
.admin-danger-zone{display:grid;gap:.45rem;margin-top:1rem;padding:1rem;border:1px solid rgba(255,107,107,.3);border-radius:14px;background:rgba(255,107,107,.05)}
.admin-danger-zone small{color:var(--muted)}
.check-field small{display:block;margin:.35rem 0 0 1.65rem;color:var(--muted);line-height:1.4}
@media(max-width:1100px){.tax-progress-meter{padding-left:0;padding-top:1rem;border-left:0;border-top:1px solid var(--border)}.tax-progress-card>div:last-child{padding-left:0!important;border-left:0!important}.tax-progress-track{padding:0!important}}
@media(max-width:640px){.money-view-tabs{display:grid;grid-template-columns:1fr 1fr;width:100%}.money-view-tabs a{text-align:center}.tax-progress-meter{padding-top:.8rem}}


/* v2.7 personal WhatsApp pairing */
.whatsapp-qr-wrap{margin-top:1rem;padding:1rem;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.025);display:grid;justify-items:center;gap:.4rem;text-align:center}.whatsapp-qr-wrap img{width:min(240px,100%);aspect-ratio:1;background:#fff;border-radius:14px;padding:10px}.whatsapp-qr-wrap small{color:var(--muted)}.whatsapp-connect-actions{display:flex;gap:.65rem;flex-wrap:wrap;margin-top:1rem}.whatsapp-connect-actions .button{flex:1 1 180px}.field-error{display:block;margin-top:.75rem;color:#fca5a5;overflow-wrap:anywhere}

/* v2.8 connected workflow refinements */
.member-self-choice{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap;padding:.45rem .55rem;border:1px solid var(--border);border-radius:10px;color:var(--muted);font-size:.78rem;font-weight:800}
.member-self-choice input{margin:0;accent-color:#63f3ba}
.member-self-choice:has(input:checked){border-color:#63f3ba;color:#63f3ba;background:rgba(99,243,186,.08)}
@media(max-width:720px){.member-line{grid-template-columns:auto 1fr}.member-line [data-member-phone]{grid-column:2}.member-self-choice{grid-column:2;justify-self:start}.member-line [data-remove-member]{grid-column:1;grid-row:2}}


/* BudgetSync v2.9 responsive cards + linked savings reversal UI */
.goal-card,
.goal-card * { min-width: 0; }
.goal-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .55rem;
}
.goal-card-head .text-button {
  justify-self: end;
  white-space: nowrap;
}
.goal-card h3,
.goal-card .goal-number,
.goal-card-foot span {
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .goal-cards { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .goal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contribution-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem .75rem;
    align-items: center;
  }
  .contribution-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .contribution-row > :nth-child(2) {
    display: block !important;
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .contribution-row > :nth-child(3) {
    display: inline-flex !important;
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .contribution-row > .contribution-actions {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .goal-cards { grid-template-columns: 1fr; }
  .goal-card { padding: .9rem; }
  .goal-card-foot { align-items: flex-start; }
  .contribution-row { padding: .65rem; }
  .contribution-actions .button { padding-inline: .65rem; }
}

@media (max-width: 390px) {
  .goal-card-head { grid-template-columns: 1fr; }
  .goal-card-head .text-button { justify-self: start; }
  .goal-card-foot { flex-direction: column; }
  .contribution-row { grid-template-columns: 1fr; }
  .contribution-row > :nth-child(1),
  .contribution-row > :nth-child(2),
  .contribution-row > :nth-child(3),
  .contribution-row > .contribution-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    text-align: left;
  }
  .contribution-row > .contribution-actions { justify-content: flex-start; }
}

/* v3.1 verified tax calculation details */
.tax-calculation-details{margin:1rem 0;padding:0;overflow:hidden}
.tax-calculation-details>summary{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.2rem;cursor:pointer;list-style:none}
.tax-calculation-details>summary::-webkit-details-marker{display:none}
.tax-calculation-details>summary span{color:var(--muted);font-size:.84rem;text-align:right}
.tax-calculation-body{display:grid;gap:1rem;padding:0 1.2rem 1.2rem;border-top:1px solid var(--border)}
.tax-calculation-body>div:first-child{padding-top:1rem}
.tax-calc-row{display:flex;justify-content:space-between;gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--border)}
.tax-calc-row:last-child{border-bottom:0}
.tax-calculation-body h4{margin:.1rem 0 .45rem}.tax-calculation-body ul{margin:.35rem 0;padding-left:1.2rem;color:var(--muted)}
.tax-calculation-body small{color:var(--muted);line-height:1.45}
@media(max-width:760px){.tax-calculation-details>summary{align-items:flex-start;flex-direction:column}.tax-calculation-details>summary span{text-align:left}.tax-calc-row{align-items:flex-start}.tax-calc-row strong{text-align:right}}


/* BudgetSync website integration API */
.integration-api-card .button-full{margin-top:1rem}
.integration-api-note{display:grid;gap:.25rem;padding:.9rem 1rem;margin:.8rem 0 1rem;border:1px solid rgba(91,234,184,.18);border-radius:14px;background:rgba(91,234,184,.06)}
.integration-api-note span{color:var(--muted,#91a69d);font-size:.9rem}
.integration-secret{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;padding:1rem;border:1px solid rgba(91,234,184,.2);border-radius:14px;background:#071710}
.integration-secret code{flex:1;min-width:0;overflow:auto;white-space:nowrap;font-size:.82rem;color:#77efc3}
@media(max-width:640px){.integration-api-card .toolbar{align-items:flex-start}.integration-secret{align-items:stretch}.integration-secret .button{width:100%}}


/* v3.3.6 API secret modal polish */
.modal:has(#integration-secret-value) {
  width: min(760px, calc(100vw - 24px));
}
.modal:has(#integration-secret-value) .modal-body {
  padding: 1.35rem;
}
#integration-secret-value {
  min-height: 92px;
  resize: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.modal:has(#integration-secret-value) .button-row {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}
.modal:has(#integration-secret-value) .button-row .button {
  min-height: 44px;
}
.modal:has(#integration-secret-value) .modal-actions {
  padding-top: .9rem;
}
@media (max-width: 620px) {
  .modal:has(#integration-secret-value) .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .modal:has(#integration-secret-value) .button-row .button {
    width: 100%;
    justify-content: center;
  }
  #integration-secret-value { font-size: .8rem; }
}

/* v3.3.2 Loans responsive layout restored */
.loan-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.loan-summary-grid .summary-card {
  min-width: 0;
  min-height: 138px;
}
.loan-summary-grid + .settings-section { margin-top: 0; }
@media (max-width: 920px) {
  .loan-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loan-summary-grid .summary-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .loan-summary-grid { grid-template-columns: 1fr; gap: .75rem; }
  .loan-summary-grid .summary-card:last-child { grid-column: auto; }
  .loan-summary-grid .summary-card { min-height: 112px; padding: 1rem; }
}

/* v3.3.8 integration API model assignment */
.integration-key-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:3px}
.integration-model-help{display:grid;gap:8px}
.integration-model-help-row{border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.018);display:grid;gap:2px}
.integration-model-help-row span,.integration-model-help-row small{color:var(--muted)}
@media (max-width:640px){.integration-key-row{align-items:flex-start}.integration-key-row>.button{width:100%}.integration-model-help-row{padding:9px 10px}}

/* v3.4 combined POS catalog + custom business money categories */
.pos-category-list{margin-top:16px;display:grid;gap:8px;max-height:260px;overflow:auto}
.pos-category-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:12px}
.pos-category-row span{display:grid;gap:2px}.pos-category-row small{opacity:.72}
@media(max-width:640px){.pos-category-row{align-items:flex-start}.pos-category-row .button{flex:0 0 auto}}


/* v3.4.1 POS simplification / page-action alignment */
.pos-page-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:24px;
}
.pos-page-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  align-self:end;
  margin:0;
}
.pos-page-actions .pos-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.pos-page-actions .button{
  margin:0;
  white-space:nowrap;
}
@media (max-width:900px){
  .pos-page-head{
    grid-template-columns:1fr;
    align-items:start;
    gap:16px;
  }
  .pos-page-actions{
    justify-content:flex-start;
    width:100%;
  }
  .pos-page-actions .pos-header-actions{
    justify-content:flex-start;
  }
}
@media (max-width:560px){
  .pos-page-actions,
  .pos-page-actions .pos-header-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .pos-page-actions .button{
    width:100%;
    min-width:0;
  }
  .pos-page-actions .pos-header-actions .button:only-child{
    grid-column:1/-1;
  }
}


/* v3.4.2 simplified workspace navigation */
.workspace-switcher{
  margin:10px 12px 14px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(10,30,23,.58);
}
.workspace-label{
  display:block;
  margin:0 0 7px 2px;
  font-size:.68rem;
  line-height:1;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.68;
}
.workspace-options{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:5px;
}
.workspace-options button{
  appearance:none;
  border:0;
  border-radius:9px;
  min-width:0;
  padding:8px 5px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:.72rem;
  font-weight:800;
  cursor:pointer;
}
.workspace-options button:hover{background:rgba(255,255,255,.045);color:var(--text)}
.workspace-options button.active{
  background:var(--accent);
  color:#062117;
}
.workspace-switcher-mobile{
  margin:8px 14px 12px;
}
.side-nav a[hidden],
.mobile-drawer-nav-v218 a[hidden]{
  display:none !important;
}
@media(max-height:760px) and (min-width:901px){
  .workspace-switcher{margin-top:6px;margin-bottom:8px;padding:7px}
  .workspace-options button{padding:6px 3px;font-size:.67rem}
  .workspace-label{margin-bottom:5px}
}


/* v3.4.3 workspace selected-state contrast fix */
.workspace-options button.active,
.workspace-options button[aria-pressed="true"]{
  background:#59e6bd;
  color:#062117 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
.workspace-options button.active:hover,
.workspace-options button[aria-pressed="true"]:hover{
  color:#062117 !important;
}


/* v3.4.4 workspace-aware Business Home */
.business-home-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.business-home-summary{margin-bottom:16px}
.business-primary-card{border-color:rgba(89,230,189,.32)}
.business-home-secondary{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(280px,.75fr);
  gap:16px;
  margin-bottom:16px;
}
.business-glance-card,.business-quick-card{padding:20px}
.business-glance-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.business-glance-grid a{
  display:grid;
  gap:4px;
  min-width:0;
  padding:14px;
  border:1px solid var(--border);
  border-radius:14px;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,.018);
}
.business-glance-grid a:hover{border-color:rgba(89,230,189,.4);background:rgba(89,230,189,.04)}
.business-glance-grid span,.business-glance-grid small{color:var(--muted)}
.business-glance-grid strong{font-size:1.22rem}
.business-quick-card h2{margin:.2rem 0 .35rem}
.business-quick-card p{margin:0 0 14px;color:var(--muted)}
.business-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.business-quick-grid a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:11px;
  text-decoration:none;
  color:var(--text);
  font-weight:800;
}
.business-quick-grid a:hover{border-color:rgba(89,230,189,.42);color:var(--accent)}
.business-home-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.business-activity-list{display:grid}
.business-activity-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  border-bottom:1px solid var(--border);
  text-decoration:none;
  color:inherit;
}
.business-activity-row:last-child{border-bottom:0}
.business-activity-row>div{display:grid;gap:2px;min-width:0}
.business-activity-row>div:last-child{text-align:right;flex:0 0 auto}
.business-activity-row span,.business-activity-row small{color:var(--muted);font-size:.78rem}
.business-activity-row:hover strong:first-child{color:var(--accent)}
@media(max-width:1100px){
  .business-glance-grid{grid-template-columns:1fr 1fr}
  .business-home-secondary{grid-template-columns:1fr}
}
@media(max-width:780px){
  .business-home-columns{grid-template-columns:1fr}
}
@media(max-width:560px){
  .business-home-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .business-home-actions .button{width:100%}
  .business-glance-grid,.business-quick-grid{grid-template-columns:1fr}
  .business-activity-row{align-items:flex-start}
}


/* v3.4.11 workspace dashboard organization */
.business-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);
  gap:16px;
}
.business-quick-actions,
.all-quick-actions{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.quick-actions a.quick-action{
  text-decoration:none;
  color:inherit;
}
.quick-actions a.quick-action:hover{
  color:inherit;
}
.all-home-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:16px;
}
.all-home-quick{min-width:0}
.all-attention-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.all-attention-grid a{
  display:grid;
  gap:4px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:13px;
  color:inherit;
  text-decoration:none;
}
.all-attention-grid a:hover{
  border-color:rgba(89,230,189,.4);
  background:rgba(89,230,189,.035);
}
.all-attention-grid span,
.all-attention-grid small{color:var(--muted)}
.all-attention-grid strong{font-size:1.2rem}
@media(max-width:1000px){
  .business-dashboard-grid,
  .all-home-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .business-quick-actions,
  .all-quick-actions{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
  .business-quick-actions,
  .all-quick-actions,
  .all-attention-grid{grid-template-columns:1fr}
}


/* v3.4.12 cleaner All Home + workspace-aware loan summaries */
.home-loan-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.home-loan-summary>div,
.all-loan-grid>div{
  display:grid;
  gap:3px;
  padding:13px;
  border:1px solid var(--border);
  border-radius:13px;
  background:rgba(255,255,255,.015);
}
.home-loan-summary span,
.home-loan-summary small,
.all-loan-grid span,
.all-loan-grid small{color:var(--muted)}
.home-loan-summary strong,
.all-loan-grid strong{font-size:1.18rem}
.home-loan-next{
  display:grid;
  grid-template-columns:1fr auto;
  gap:3px 12px;
  margin-top:10px;
  padding:11px 13px;
  border:1px solid var(--border);
  border-radius:12px;
  color:inherit;
  text-decoration:none;
}
.home-loan-next small{grid-column:1/-1;color:var(--muted)}
.all-home-quick{margin-bottom:16px}
.all-home-smart-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);
  gap:16px;
  margin-bottom:16px;
}
.all-loan-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.all-attention-list{
  display:grid;
  gap:0;
}
.all-attention-list a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 2px;
  border-bottom:1px solid var(--border);
  color:inherit;
  text-decoration:none;
}
.all-attention-list a:last-child{border-bottom:0}
.all-attention-list span{color:var(--muted)}
.all-home-activity-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.empty-state.compact{min-height:110px}
@media(max-width:1050px){
  .all-home-smart-grid,
  .all-home-activity-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  .all-loan-grid{grid-template-columns:1fr}
  .home-loan-summary{grid-template-columns:1fr}
}


/* v3.4.13 All Workspace Home layout correction */
.all-home-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin:0 0 18px !important;
  align-items:stretch;
}
.all-home-summary > .summary-card{
  min-width:0;
  height:auto;
  min-height:148px;
  margin:0 !important;
}

.all-home-quick{
  position:relative;
  z-index:0;
  clear:both;
  width:100%;
  margin:0 0 18px !important;
  padding:0;
  transform:none !important;
}
.all-home-quick .card-head{
  padding:18px 20px 8px;
}
.all-home-quick .card-body{
  padding:8px 20px 20px;
}
.all-home-quick .quick-actions{
  margin:0;
}

.all-home-smart-grid,
.all-home-activity-grid{
  clear:both;
  width:100%;
  margin-top:0 !important;
}

@media (max-width:1180px){
  .all-home-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:700px){
  .all-home-summary{
    grid-template-columns:1fr;
    gap:12px;
  }
  .all-home-summary > .summary-card{
    min-height:126px;
  }
  .all-home-quick .card-head{
    padding:16px 16px 7px;
  }
  .all-home-quick .card-body{
    padding:7px 16px 16px;
  }
}


/* v3.4.14 All Workspace Home: keep Personal cards together, then Business cards */
.all-home-summary > .summary-card:nth-child(1){ order:1; } /* Personal safe to spend */
.all-home-summary > .summary-card:nth-child(2){ order:2; } /* Personal balance */
.all-home-summary > .summary-card:nth-child(3){ order:3; } /* Business cash */
.all-home-summary > .summary-card:nth-child(4){ order:4; } /* Business net profit */


/* v3.4.15 workspace-aware mobile/app bottom navigation */
@media (max-width:900px){
  .bottom-nav{
    grid-template-columns:repeat(var(--bottom-nav-count,5),minmax(0,1fr)) !important;
  }
  .bottom-nav a{
    min-width:0;
    padding:6px 2px;
    text-decoration:none;
  }
  .bottom-nav a small{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* v3.4.20 Business/All month performance */
.business-home-summary .summary-card,
.all-home-summary .summary-card{
  min-width:0;
}
.business-home-summary strong,
.all-home-summary strong{
  overflow-wrap:anywhere;
}
@media(max-width:760px){
  .business-home-summary{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:520px){
  .business-home-summary{
    grid-template-columns:1fr;
  }
}

/* v3.4.21 separated Personal / Business Tax Center */
.tax-scope-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0 22px}
.tax-scope-card{padding:22px;display:flex;flex-direction:column;gap:14px}
.tax-scope-card .button{align-self:flex-start}
.tax-mini-stats,.tax-business-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.tax-scope-grid,.tax-mini-stats,.tax-business-source-grid{grid-template-columns:1fr}}


/* v3.4.24 organized All Workspace Tax overview */
.tax-overview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  width:100%;
  margin:16px 0 22px;
  align-items:stretch;
}

.tax-overview-card{
  min-width:0;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow:hidden;
}

.tax-overview-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.tax-overview-head>div{
  min-width:0;
}

.tax-overview-head h2{
  margin:.25rem 0 .35rem;
  font-size:clamp(1.55rem,2.3vw,2.15rem);
  letter-spacing:-.04em;
}

.tax-overview-head p{
  margin:0;
  max-width:560px;
  color:var(--muted);
  line-height:1.45;
}

.tax-overview-status{
  flex:0 0 auto;
  padding:.42rem .7rem;
  border-radius:999px;
  color:var(--yellow);
  background:rgba(255,209,102,.09);
  border:1px solid rgba(255,209,102,.18);
  font-size:.7rem;
  font-weight:850;
}

.tax-overview-status.ready{
  color:var(--green);
  background:rgba(99,243,186,.09);
  border-color:rgba(99,243,186,.2);
}

.tax-overview-progress{
  width:100%;
}

.tax-overview-progress .tax-progress-track{
  height:10px;
}

.tax-overview-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.tax-overview-stat{
  min-width:0;
  min-height:126px;
  padding:16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.018);
  overflow:hidden;
}

.tax-overview-stat>span{
  color:var(--muted);
  font-size:.7rem;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.tax-overview-stat>strong{
  display:block;
  margin-top:.55rem;
  font-size:clamp(1.35rem,2vw,2rem);
  line-height:1.03;
  letter-spacing:-.045em;
  overflow-wrap:anywhere;
}

.tax-overview-stat>small{
  display:block;
  margin-top:.5rem;
  color:var(--muted);
  line-height:1.35;
}
.tax-overview-foot{
  margin-top:auto;
  padding-top:2px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
}

.tax-overview-foot p{
  margin:0;
  color:var(--muted);
  line-height:1.4;
  font-size:.8rem;
}

.tax-overview-foot .button{
  min-width:178px;
  white-space:nowrap;
}

@media(max-width:1050px){
  .tax-overview-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:620px){
  .tax-overview-card{
    padding:16px;
    gap:15px;
  }

  .tax-overview-head{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
  }

  .tax-overview-stats{
    grid-template-columns:1fr;
  }

  .tax-overview-stat{
    min-height:108px;
  }

  .tax-overview-foot{
    grid-template-columns:1fr;
  }

  .tax-overview-foot .button{
    width:100%;
    min-width:0;
  }
}

@media(max-width:420px){
  .tax-overview-head{
    grid-template-columns:1fr;
  }

  .tax-overview-status{
    justify-self:start;
  }
}


/* v3.4.26 Smart reusable Shopping Lists */
.shopping-head-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.shopping-search-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.shopping-search-bar input{max-width:430px}
.shopping-search-bar>span{color:var(--muted);font-size:.78rem;font-weight:800;white-space:nowrap}

.shopping-detail-grid{
  grid-template-columns:minmax(0,1.55fr) minmax(300px,.7fr);
  align-items:start;
}
.shopping-master-card,.shopping-totals-card{min-width:0}
.smart-shopping-items{gap:9px}
.shopping-smart-item{
  min-width:0;
  display:grid;
  grid-template-columns:34px minmax(150px,1.15fr) minmax(230px,.9fr) minmax(125px,.55fr) auto;
  gap:12px;
  align-items:center;
  padding:13px;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(255,255,255,.015);
}
.shopping-smart-item.selected{
  border-color:rgba(99,243,186,.32);
  background:rgba(99,243,186,.035);
}
.shopping-select-box{display:grid;place-items:center}
.shopping-select-box input{width:19px;height:19px}
.shopping-smart-main{min-width:0}
.shopping-smart-main strong{display:block;font-size:.9rem;overflow-wrap:anywhere}
.shopping-smart-main small{display:block;margin-top:3px;color:var(--muted);font-size:.7rem;line-height:1.35;overflow-wrap:anywhere}
.shopping-trip-controls{display:grid;grid-template-columns:minmax(80px,.55fr) minmax(120px,1fr);gap:8px;min-width:0}
.shopping-trip-controls label,.shopping-purchase-row label{
  display:grid;gap:4px;color:var(--muted);font-size:.64rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em
}
.shopping-trip-controls input{min-width:0;padding:.6rem .65rem}
.shopping-trip-controls input:disabled{opacity:.42}
.shopping-selected-total{min-width:0}
.shopping-selected-total span,.shopping-purchase-subtotal span{
  display:block;color:var(--muted);font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em
}
.shopping-selected-total strong,.shopping-purchase-subtotal strong{display:block;margin-top:3px;font-size:.9rem;overflow-wrap:anywhere}
.shopping-row-actions{display:flex;gap:6px;justify-content:flex-end}

.shopping-total-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
.shopping-total-grid>div{min-width:0;padding:12px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.018)}
.shopping-total-grid span{display:block;color:var(--muted);font-size:.62rem;font-weight:850;text-transform:uppercase;letter-spacing:.07em}
.shopping-total-grid strong{display:block;margin-top:4px;font-size:1rem;overflow-wrap:anywhere}
.shopping-total-grid small{display:block;margin-top:3px;color:var(--muted);font-size:.66rem;line-height:1.3}
.shopping-budget-progress{margin-top:12px}
.shopping-totals-card .smart-help{margin:14px 0}
.shopping-totals-card #delete-list{margin-top:0}

.shopping-purchase-review{display:grid;gap:9px}
.shopping-purchase-row{
  display:grid;
  grid-template-columns:auto minmax(145px,1fr) 82px minmax(110px,.7fr) minmax(125px,.75fr) minmax(90px,.5fr);
  gap:9px;
  align-items:end;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.018);
}
.shopping-purchase-row.not-bought{opacity:.48}
.shopping-bought-check{display:flex!important;align-items:center;gap:6px;padding-bottom:9px;white-space:nowrap}
.shopping-bought-check input{width:18px;height:18px}
.shopping-purchase-name{align-self:center;min-width:0}
.shopping-purchase-name strong{display:block;overflow-wrap:anywhere}
.shopping-purchase-name small{display:block;margin-top:3px;color:var(--muted);font-size:.67rem;line-height:1.3}
.shopping-purchase-row input{min-width:0;padding:.62rem}
.shopping-purchase-subtotal{align-self:center;text-align:right}
.shopping-purchase-total{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px;border:1px solid rgba(99,243,186,.24);border-radius:14px;background:rgba(99,243,186,.055)
}
.shopping-purchase-total span{color:var(--muted);font-size:.75rem;font-weight:800}
.shopping-purchase-total strong{font-size:1.35rem}

@media(max-width:1180px){
  .shopping-detail-grid{grid-template-columns:1fr}
  .shopping-totals-card{position:static}
}
@media(max-width:980px){
  .shopping-smart-item{
    grid-template-columns:34px minmax(0,1fr) minmax(210px,.85fr) auto;
  }
  .shopping-selected-total{grid-column:2}
  .shopping-row-actions{grid-column:4;grid-row:1/3}
  .shopping-purchase-row{grid-template-columns:auto minmax(0,1fr) 90px 1fr}
  .shopping-purchase-row label:nth-of-type(4){grid-column:2/4}
  .shopping-purchase-subtotal{grid-column:4}
}
@media(max-width:700px){
  .shopping-head-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .shopping-head-actions .button{width:100%;min-width:0}
  .shopping-search-bar{align-items:stretch;flex-direction:column}
  .shopping-search-bar input{max-width:none}
  .shopping-smart-item{
    grid-template-columns:30px minmax(0,1fr) auto;
    gap:9px;
  }
  .shopping-smart-main{grid-column:2}
  .shopping-trip-controls{grid-column:2/4;grid-row:2;grid-template-columns:1fr 1fr}
  .shopping-selected-total{grid-column:2;grid-row:3}
  .shopping-row-actions{grid-column:3;grid-row:3;align-self:end}
  .shopping-total-grid{grid-template-columns:1fr 1fr}
  .shopping-purchase-row{
    grid-template-columns:auto minmax(0,1fr);
    align-items:center
  }
  .shopping-purchase-name{grid-column:2}
  .shopping-purchase-row>label:not(.shopping-bought-check){grid-column:1/-1}
  .shopping-purchase-subtotal{grid-column:1/-1;text-align:left}
}
@media(max-width:460px){
  .shopping-head-actions{grid-template-columns:1fr}
  .shopping-trip-controls,.shopping-total-grid{grid-template-columns:1fr}
  .shopping-smart-item{padding:10px}
  .shopping-selected-total{grid-column:1/3}
  .shopping-row-actions{grid-column:3}
  .shopping-purchase-total{align-items:flex-start;flex-direction:column}
}


/* v3.4.27 Shopping purchase receipt-total flow */
.shopping-master-pricing{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px}
.shopping-master-pricing small{margin:0!important}
.shopping-master-total{color:#dbe9e2!important;font-weight:800}
.shopping-latest-actual{color:var(--green)!important}

.modal:has(.shopping-purchase-review){width:min(980px,calc(100vw - 28px))}
.modal:has(.shopping-purchase-review) .modal-body{overflow-x:hidden}
.shopping-purchase-review{width:100%;min-width:0}
.shopping-purchase-row{
  width:100%;min-width:0;
  grid-template-columns:auto minmax(150px,1.15fr) minmax(72px,.42fr) minmax(110px,.72fr) minmax(130px,.82fr) minmax(118px,.65fr);
  align-items:end
}
.shopping-purchase-row>*{min-width:0}
.shopping-purchase-row input{width:100%;min-width:0}
.shopping-purchase-subtotal{min-width:0;text-align:right}
.shopping-purchase-subtotal small{display:block;margin-top:4px;color:var(--muted);font-size:.65rem;line-height:1.25}

@media(max-width:900px){
  .modal:has(.shopping-purchase-review){width:min(760px,calc(100vw - 24px))}
  .shopping-purchase-row{grid-template-columns:auto minmax(0,1fr) 90px minmax(120px,.8fr)}
  .shopping-purchase-name{grid-column:2/5}
  .shopping-purchase-row>label:nth-of-type(2){grid-column:2}
  .shopping-purchase-row>label:nth-of-type(3){grid-column:3}
  .shopping-purchase-row>label:nth-of-type(4){grid-column:4}
  .shopping-purchase-subtotal{grid-column:2/5;text-align:left;padding-top:3px}
}
@media(max-width:620px){
  .modal:has(.shopping-purchase-review){width:calc(100vw - 16px);max-height:92vh}
  .modal:has(.shopping-purchase-review) .modal-body{padding:1rem}
  .shopping-purchase-row{grid-template-columns:1fr;gap:8px}
  .shopping-bought-check,.shopping-purchase-name,.shopping-purchase-row>label:not(.shopping-bought-check),.shopping-purchase-subtotal{
    grid-column:1!important;grid-row:auto!important
  }
  .shopping-bought-check{padding-bottom:0}
  .shopping-purchase-subtotal{padding:10px 0 0;border-top:1px solid var(--line)}
}


/* v3.4.28 compact shopping item pricing */
.shopping-master-pricing{
  gap:3px 8px;
}
.shopping-master-pricing small{
  white-space:nowrap;
}
@media(max-width:520px){
  .shopping-master-pricing{
    display:grid;
    grid-template-columns:auto auto;
    justify-content:start;
  }
  .shopping-master-pricing small{
    white-space:normal;
  }
}


/* v3.4.29 per-user WhatsApp QR / unpair */
.whatsapp-qr-loading{
  min-height:220px;
  margin-top:1rem;
  padding:1.2rem;
  display:grid;
  place-items:center;
  align-content:center;
  gap:.55rem;
  text-align:center;
  border:1px dashed var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.018);
}
.whatsapp-qr-loading>span{
  width:34px;
  height:34px;
  border:3px solid rgba(255,255,255,.08);
  border-top-color:var(--green);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
.whatsapp-qr-loading strong{font-size:.9rem}
.whatsapp-qr-loading small{color:var(--muted)}
#personal-whatsapp-qr-area{min-width:0}
#personal-whatsapp-qr-area .whatsapp-qr-wrap{
  width:min(100%,420px);
  margin-left:auto;
  margin-right:auto;
}
@media(max-width:640px){
  .whatsapp-qr-loading{min-height:180px}
}


/* v3.4.30 Import & Export */
.import-export-card{grid-column:1/-1}
.import-export-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.import-safety-note{
  display:grid;grid-template-columns:auto 1fr;gap:10px 14px;align-items:start;
  padding:13px 15px;border:1px solid rgba(99,243,186,.18);border-radius:14px;background:rgba(99,243,186,.04)
}
.import-safety-note strong{color:var(--green)}
.import-safety-note span{color:var(--muted);line-height:1.4}
.import-history-head{margin-top:18px}
.import-history-row small+small{display:block;margin-top:3px}
.export-group{display:grid;gap:8px;padding-top:8px}
.export-link-grid{display:flex;gap:8px;flex-wrap:wrap}
.import-preview-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.import-preview-summary>div{padding:11px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.018);min-width:0}
.import-preview-summary span{display:block;color:var(--muted);font-size:.65rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.import-preview-summary strong{display:block;margin-top:4px;overflow-wrap:anywhere}
.import-mapping-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.import-preview-table{max-height:280px}
@media(max-width:700px){
  .import-safety-note{grid-template-columns:1fr}
  .import-preview-summary,.import-mapping-grid{grid-template-columns:1fr}
  .import-export-actions .button{flex:1 1 180px}
}


/* v3.4.34 shopping variants + settings paging */
.shopping-variant-label{display:grid;gap:4px;margin-top:7px;color:var(--muted);font-size:.63rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.shopping-variant-label select{min-width:0;width:100%;padding:.55rem .65rem;text-transform:none;letter-spacing:0}
.settings-inline-search{margin:12px 0}
.settings-pager{display:flex;justify-content:flex-end;align-items:center;gap:9px;min-height:34px;margin-top:10px;color:var(--muted);font-size:.75rem;font-weight:750}
.settings-pager span{white-space:nowrap}
@media(max-width:700px){.settings-pager{justify-content:space-between}.shopping-variant-label select{font-size:.78rem}}


/* v3.4.35 manual shopping variants */
.shopping-product-editor{gap:14px}
.shopping-variant-editor-head{margin-top:2px}
.shopping-variant-editor-head small{display:block;margin-top:3px;color:var(--muted)}
#shopping-variant-editor{display:grid;gap:10px}
.shopping-variant-editor-row{
  padding:13px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.018);
}
.shopping-variant-editor-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.shopping-variant-editor-title strong{
  font-size:.8rem;
}
@media(max-width:620px){
  .shopping-variant-editor-head{
    align-items:stretch;
  }
  .shopping-variant-editor-head .button{
    width:100%;
  }
}


/* v3.4.36 simple shopping deletion */
.shopping-row-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}
@media(max-width:700px){
  .shopping-head-actions [data-action="delete-selected"]{
    order:5;
  }
}


/* v3.4.40 — ONLY Accounts, Bills and Approved Users are contained */
.settings-accounts-card,
.settings-bills-card{
  height:560px;
  min-height:560px;
  max-height:560px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.settings-users-card{
  height:620px;
  min-height:620px;
  max-height:620px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Keep the headings/search/actions fixed. */
.settings-accounts-card > .toolbar,
.settings-bills-card > .toolbar,
.settings-users-card > .toolbar,
.settings-users-card > .settings-inline-search{
  flex:0 0 auto;
}

/* Only the record lists scroll inside the three cards. */
.settings-accounts-card > .settings-list,
.settings-bills-card > .settings-list,
.settings-users-card > .settings-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  padding-right:4px;
}

/* Pagination/count stays at the bottom of these three cards only. */
.settings-accounts-card > .settings-pager,
.settings-bills-card > .settings-pager,
.settings-users-card > .settings-pager{
  flex:0 0 38px;
  min-height:38px;
  height:38px;
  margin-top:8px;
  padding-top:6px;
  border-top:1px solid var(--line);
  background:transparent;
}

/* Small unobtrusive internal scrollbar. */
.settings-accounts-card .settings-list::-webkit-scrollbar,
.settings-bills-card .settings-list::-webkit-scrollbar,
.settings-users-card .settings-list::-webkit-scrollbar{
  width:8px;
}

.settings-accounts-card .settings-list::-webkit-scrollbar-thumb,
.settings-bills-card .settings-list::-webkit-scrollbar-thumb,
.settings-users-card .settings-list::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(255,255,255,.12);
}

/* Explicitly leave every other Settings card at its original natural height. */
.integration-api-card,
.import-export-card,
.settings-section:not(.settings-accounts-card):not(.settings-bills-card):not(.settings-users-card){
  min-height:initial;
  max-height:none;
}

/* Responsive heights only for the three intended cards. */
@media(max-width:900px){
  .settings-accounts-card,
  .settings-bills-card,
  .settings-users-card{
    height:520px;
    min-height:520px;
    max-height:520px;
  }
}

@media(max-width:620px){
  .settings-accounts-card,
  .settings-bills-card,
  .settings-users-card{
    height:500px;
    min-height:500px;
    max-height:500px;
  }
}


/* v3.4.46 — Integration API owns its own Settings row */
.settings-api-own-row{
  grid-column:1 / -1;
  height:auto;
  min-height:0;
  max-height:none;
  overflow:visible;
}

/* Multiple API keys stay organized without stretching a neighboring card. */
.settings-api-own-row .settings-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}

.settings-api-own-row .integration-key-row{
  min-width:0;
  height:100%;
  align-items:center;
}

.settings-api-own-row .integration-key-row > div{
  min-width:0;
}

.settings-api-own-row .integration-key-title,
.settings-api-own-row .integration-key-row small{
  overflow-wrap:anywhere;
}

/* Keep the existing API pagination inside this independent row. */
.settings-api-own-row + .settings-pager{
  grid-column:1 / -1;
}

/* Docs action remains at the bottom of the API section. */
.settings-api-own-row > .button-full{
  margin-top:12px;
}

@media(max-width:900px){
  .settings-api-own-row .settings-list{
    grid-template-columns:1fr;
  }
}


/* v3.4.47 — contained Integration API block */
.settings-api-own-row{
  grid-column:auto;
}

.integration-api-card.settings-api-contained{
  height:430px;
  min-height:430px;
  max-height:430px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Header/note/docs stay fixed inside the card. */
.settings-api-contained > .toolbar,
.settings-api-contained > .integration-api-note,
.settings-api-contained > .button-full{
  flex:0 0 auto;
}

/* API keys scroll inside the card. Roughly two keys are visible at once. */
.settings-api-contained > .settings-list{
  flex:1 1 auto;
  min-height:0;
  max-height:220px;
  overflow-y:auto;
  overflow-x:hidden;
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:10px;
  padding-right:4px;
  overscroll-behavior:contain;
}

.settings-api-contained .integration-key-row{
  min-height:96px;
  height:auto;
  align-items:center;
  min-width:0;
}

.settings-api-contained .integration-key-row > div{
  min-width:0;
}

.settings-api-contained .integration-key-title,
.settings-api-contained .integration-key-row small{
  overflow-wrap:anywhere;
}

.settings-api-contained > .button-full{
  margin-top:10px;
}

/* Hide any stale pager that might already exist from a cached render. */
.settings-api-contained + .settings-pager{
  display:none;
}

.settings-api-contained .settings-list::-webkit-scrollbar{
  width:8px;
}

.settings-api-contained .settings-list::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(255,255,255,.12);
}

@media(max-width:900px){
  .integration-api-card.settings-api-contained{
    height:410px;
    min-height:410px;
    max-height:410px;
  }

  .settings-api-contained > .settings-list{
    max-height:210px;
  }
}

@media(max-width:620px){
  .integration-api-card.settings-api-contained{
    height:390px;
    min-height:390px;
    max-height:390px;
  }

  .settings-api-contained > .settings-list{
    max-height:195px;
  }
}


/* v3.4.48 — API note removed, use freed space for keys */
.settings-api-contained > .settings-list{
  max-height:285px;
}

@media(max-width:900px){
  .settings-api-contained > .settings-list{
    max-height:270px;
  }
}

@media(max-width:620px){
  .settings-api-contained > .settings-list{
    max-height:250px;
  }
}


/* v3.4.49 — reserve space for two API key rows without stretching one key */
.settings-api-contained > .settings-list{
  /* Two normal API-key rows + one gap. */
  height:202px;
  min-height:202px;
  max-height:202px;
  flex:0 0 202px;
  overflow-y:auto;
  overflow-x:hidden;
  align-content:start;
}

/* Important: individual API key rows keep their normal compact height. */
.settings-api-contained .integration-key-row{
  min-height:96px;
  height:96px;
  max-height:96px;
}

/* One key should sit in the first slot only; remaining space stays empty. */
.settings-api-contained > .settings-list:has(.integration-key-row:only-child){
  align-content:start;
}

/* Keep the card itself stable as before. */
.integration-api-card.settings-api-contained{
  height:430px;
  min-height:430px;
  max-height:430px;
}

@media(max-width:900px){
  .settings-api-contained > .settings-list{
    height:202px;
    min-height:202px;
    max-height:202px;
    flex-basis:202px;
  }
  .settings-api-contained .integration-key-row{
    height:96px;
    min-height:96px;
    max-height:96px;
  }
}

@media(max-width:620px){
  .settings-api-contained > .settings-list{
    height:202px;
    min-height:202px;
    max-height:202px;
    flex-basis:202px;
  }
}


/* ===== BudgetSync mobile Integration API layout fix ===== */
@media (max-width: 680px) {
  .integration-api-card.settings-api-contained {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .integration-api-card.settings-api-contained > .toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  .integration-api-card.settings-api-contained > .toolbar > div {
    min-width: 0 !important;
  }

  .integration-api-card.settings-api-contained > .toolbar .button {
    width: auto !important;
    min-width: 76px !important;
    flex: 0 0 auto !important;
  }

  .integration-api-card.settings-api-contained > .settings-list {
    display: block !important;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin-top: 12px !important;
    padding-right: 3px !important;
  }

  .integration-api-card.settings-api-contained .integration-key-row {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    margin: 0 0 8px !important;
    overflow: hidden !important;
  }

  .integration-api-card.settings-api-contained .integration-key-row > div {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .integration-api-card.settings-api-contained .integration-key-title {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin-bottom: 4px !important;
    min-width: 0 !important;
  }

  .integration-api-card.settings-api-contained .integration-key-title .pill {
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    font-size: .58rem !important;
  }

  .integration-api-card.settings-api-contained .integration-key-row small {
    display: block !important;
    font-size: .67rem !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
  }

  .integration-api-card.settings-api-contained .integration-key-row small:last-child {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
  }

  .integration-api-card.settings-api-contained .integration-key-row > .button {
    width: auto !important;
    min-width: 76px !important;
    padding: 9px 10px !important;
    flex: 0 0 auto !important;
  }

  .integration-api-card.settings-api-contained > .button-full {
    margin-top: 10px !important;
  }
}


/* ===== Keep workspace greeting on one line ===== */
.page-head > div:first-child {
  min-width: 0;
}

.page-head h1 {
  white-space: nowrap !important;
  max-width: 100%;
}

/* Do not let the month controls squeeze the greeting into multiple lines. */
@media (max-width: 1180px) {
  .page-head {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-head > div:first-child {
    width: 100% !important;
  }

  .page-head .page-actions {
    width: 100% !important;
    margin-top: .8rem !important;
    justify-content: flex-start !important;
  }

  .page-head h1 {
    font-size: clamp(2rem, 6vw, 3.7rem) !important;
  }
}

@media (max-width: 680px) {
  .page-head h1 {
    font-size: clamp(1.7rem, 8.2vw, 2.45rem) !important;
    letter-spacing: -.05em !important;
    line-height: .96 !important;
  }
}

@media (max-width: 390px) {
  .page-head h1 {
    font-size: clamp(1.55rem, 7.8vw, 2.1rem) !important;
  }
}
