/* Color and typography layer. Layout and responsive structure live in styles.css. */
:root {
  --bg: #f5f7fb;
  --ink: #172e38;
  --muted: #627585;
  --green: #00876b;
  --light: #e4f6ef;
  --line: #e1e7ef;
  --orange: #e98234;
  --purple: #8254db;
  --shadow: 0 4px 18px #22395306, 0 1px 3px #22395304;
}
body {
  -webkit-font-smoothing: antialiased;
}
body:not(.app-ready) > .sidebar,
body:not(.app-ready) > .app-shell {
  visibility: hidden;
}
#auth-gate {
  width: min(460px, calc(100% - 30px));
  padding: 40px;
  text-align: center;
}
#auth-gate h1 {
  font-family: Manrope, sans-serif;
  font-size: 32px;
  letter-spacing: -1px;
}
#auth-gate p {
  color: #536b7a;
  line-height: 1.7;
  min-height: 48px;
}
#auth-gate small {
  display: block;
  margin-top: 24px;
  color: #64798a;
  line-height: 1.7;
}
#google-signin {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.auth-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 26px;
  border-radius: 16px;
  background: #00876b;
  color: white;
  font:
    800 32px Manrope,
    sans-serif;
  display: grid;
  place-items: center;
}
#session-actions {
  white-space: nowrap;
}
@media (max-width: 640px) {
  #session-actions .panel-link {
    font-size: 10px;
    padding: 4px;
  }
  #auth-gate {
    padding: 30px 20px;
  }
}
.sidebar {
  border-right-color: #e3e9ee;
}
.brand {
  color: #17342f;
}
.brand-icon {
  background: #008b70;
  box-shadow: 0 4px 10px #008b7020;
}
.brand-dot {
  color: #03ae81;
}
.workspace-label {
  color: #718390;
  font-size: 10px;
  letter-spacing: 1.5px;
}
.nav-link {
  color: #536777;
  font-size: 13px;
  font-weight: 550;
  border-radius: 10px;
}
.nav-link:hover {
  color: #007e65;
  background: #f0f8f5;
}
.nav-link.active {
  color: #fff;
  background: #00876b;
  box-shadow: 0 5px 12px #00876b22;
}
.nav-link.active .nav-dot {
  background: #7cf3c7;
}
.nav-link svg,
.icon svg {
  stroke-width: 1.85;
}
.sidebar-bottom > strong {
  font-size: 13px;
}
.sidebar-bottom p {
  color: #637886;
  font-size: 12px;
}
.small-art {
  color: #00876b;
}
.avatar {
  color: #007e65;
  background: #d9f4e9;
  font-weight: 700;
}
.profile small {
  color: #667a86;
  font-size: 10px;
}
.topbar {
  background: #fff;
  height: 76px;
}
.breadcrumb {
  color: #6d7d8d;
  font-size: 12px;
}
.breadcrumb strong {
  color: #263f4d;
  font-weight: 600;
}
.breadcrumb span {
  color: #a1b0bb;
}
.private-label {
  color: #506e64;
  background: #eff8f3;
  border: 1px solid #e0eee6;
  border-radius: 20px;
  padding: 7px 11px;
  font-size: 11px;
}
.private-label:before {
  color: #00a578;
}
.icon-button {
  color: #536b7a;
}
main {
  padding-top: 32px;
}
.eyebrow {
  color: #00856b;
  font-size: 10px;
  letter-spacing: 1.6px;
}
.page-heading h1 {
  color: #182f3a;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1.2px;
}
.page-heading p {
  color: #607385;
  font-size: 13px;
  line-height: 1.6;
}
.button {
  border-radius: 9px;
  padding: 12px 17px;
  font-size: 12px;
}
.primary {
  background: #00876b;
  border-color: #00876b;
  box-shadow: 0 5px 12px #00876b20;
}
.primary:hover {
  background: #006e57;
  border-color: #006e57;
  box-shadow: 0 6px 16px #00876b30;
}
.secondary {
  color: #405c6e;
  border-color: #d6e0e8;
}
.secondary:hover {
  background: #eef4fa;
}
.month-select {
  font-size: 12px;
  color: #405b6d;
  border-color: #dbe3eb;
  border-radius: 9px;
  padding: 11px 13px;
}
.demo-banner {
  color: #6c5791;
  border: 1px solid #e9e0f7;
  background: #f1ebfa;
  border-radius: 9px;
  font-size: 12px;
  padding: 11px 15px;
}
.demo-banner > span:first-child {
  font-size: 20px;
  color: #8d60c5;
}
.demo-banner button {
  color: #7043a4;
  font-size: 12px;
}

/* Distinct, consistent colors make the four money destinations easy to scan. */
.stat-card {
  --accent: #008365;
  --tint: #e3f6ed;
  --border: #c9e9da;
  --icon-bg: #c8eedd;
  position: relative;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px #263d5004;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 22px;
  width: 35px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}
.stat-orange {
  --accent: #b85420;
  --tint: #fff1e5;
  --border: #f4dec9;
  --icon-bg: #ffe0c5;
}
.stat-purple {
  --accent: #7545c3;
  --tint: #f0eafd;
  --border: #e2d7f8;
  --icon-bg: #e0d3fc;
}
.stat-blue {
  --accent: #2466ba;
  --tint: #e8f1ff;
  --border: #d3e3fa;
  --icon-bg: #cfe2ff;
}
.stat-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}
.stat-icon,
.stat-icon.orange,
.stat-icon.purple,
.stat-icon.blue {
  color: var(--accent);
  background: var(--icon-bg);
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.stat-value {
  color: #1d3440;
  font-size: 31px;
  font-weight: 800;
  margin: 13px 0 9px;
  letter-spacing: -1.1px;
}
.stat-foot {
  color: #5d7180;
  font-size: 11px;
}
.stat-foot .positive {
  color: #008365;
  font-weight: 700;
}
.panel {
  border-radius: 15px;
  border-color: #e1e7ee;
}
.panel-header h2 {
  color: #243c4b;
  font-size: 15px;
  font-weight: 700;
}
.panel-header p {
  color: #64798a;
  font-size: 12px;
  line-height: 1.5;
}
.panel-link {
  color: #007e67;
  font-size: 12px;
  font-weight: 600;
}
.panel-link:hover {
  color: #005844;
  text-decoration: underline;
}
.badge {
  color: #526a7a;
  background: #eef3f7;
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
}

/* One strong focal card gives the light dashboard more depth. */
.flow-panel {
  background: #104e46;
  border-color: #104e46;
  color: white;
  box-shadow: 0 7px 20px #104e4615;
}
.flow-panel .panel-header h2 {
  color: white;
}
.flow-panel .panel-header p {
  color: #bedbd2;
}
.flow-panel .badge {
  color: #dbf9ec;
  background: #ffffff14;
  border: 1px solid #ffffff1f;
}
.flow-panel .available {
  color: white;
  font-size: 39px;
  font-weight: 800;
  letter-spacing: -1.3px;
}
.flow-panel .available small {
  color: #bedbd2;
  font-size: 12px;
  margin-top: 6px;
}
.allocation-bar {
  height: 19px;
  border-radius: 6px;
  gap: 5px;
}
.flow-panel .allocation-bar {
  background: #ffffff14;
}
.flow-panel .legend-label {
  color: #c4dfd6;
  font-size: 11px;
}
.flow-panel .legend-value {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.dot {
  width: 7px;
  height: 7px;
}
.flow-panel .insight {
  color: #d3eee3;
  background: #ffffff0b;
  border: 1px solid #ffffff14;
  padding: 11px 13px;
  font-size: 11px;
  line-height: 1.7;
  border-radius: 8px;
}
.flow-panel .insight .icon {
  color: #65e0b5;
}
.spending-content {
  gap: 26px;
  padding-top: 34px;
  padding-bottom: 34px;
}
.donut {
  width: 155px;
  height: 155px;
}
.donut:before {
  inset: 22px;
  box-shadow: 0 0 0 5px #ffffff35;
}
.donut-center strong {
  color: #1f3949;
  font-size: 22px;
  font-weight: 800;
}
.donut-center small {
  color: #697f8e;
  font-size: 11px;
}
.category-row {
  color: #536c7c;
  font-size: 12px;
  gap: 8px;
}
.category-row strong {
  color: #273f50;
  font-size: 12px;
  font-weight: 600;
}
.transaction {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom-color: #edf0f5;
}
.transaction-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff0e0;
  color: #bd701f;
}
.transaction-icon.income {
  background: #dff5ea;
  color: #00886b;
}
.transaction-icon.investment {
  background: #ede5ff;
  color: #8150d0;
}
.transaction-icon.emergency {
  background: #e3eeff;
  color: #2a76cd;
}
.transaction-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #294150;
}
.transaction-info small,
.transaction-amount small {
  color: #718290;
  font-size: 11px;
}
.transaction-amount {
  color: #243b4b;
  font-size: 13px;
  font-weight: 650;
}
.green-text {
  color: #008467;
}
.delete-button {
  color: #7f8e9d;
}
.emergency-panel {
  background: #e9f2ff;
  border: 1px solid #d0e1fb;
  border-radius: 15px;
}
.emergency-top {
  color: #205699;
  font-size: 13px;
}
.emergency-top .icon {
  color: #2a76d2;
}
.emergency-top .badge {
  color: #2765b1;
  background: #d5e6ff;
  font-size: 9px;
}
.emergency-amount {
  color: #1b4272;
  font-size: 29px;
  font-weight: 800;
}
.emergency-amount small {
  color: #547398;
  font-size: 12px;
}
.progress-track {
  background: #cddff6;
  height: 8px;
}
.progress-track span {
  background: #3787ed;
}
.emergency-footer {
  color: #4a6e99;
  font-size: 11px;
}
.emergency-footer a {
  color: #2266b9;
  font-weight: 600;
}
.bill-date {
  color: #b66b1f;
  background: #fff0df;
  font-size: 9px;
  min-width: 38px;
}
.bill-date strong {
  color: #a85c13;
  font-weight: 700;
}
.bill-info strong {
  color: #294150;
  font-size: 13px;
  font-weight: 600;
}
.bill-info small {
  color: #718290;
  font-size: 11px;
}
.bill-amount {
  color: #294150;
  font-size: 13px;
  font-weight: 600;
}

/* Carry the improved contrast through forms and secondary screens. */
.toolbar {
  background: #fbfcfe;
}
.toolbar input,
.toolbar select {
  font-size: 13px;
  border-color: #dce4ec;
}
.field > span {
  color: #466273;
  font-size: 12px;
  font-weight: 600;
}
.field input,
.field select {
  border-color: #cedbdc;
}
.field-note,
.summary-note {
  color: #617788;
  font-size: 12px;
}
.field input:focus,
.field select:focus {
  outline-color: #4cba9a;
}
.account-card h2 {
  color: #243c4b;
  font-size: 16px;
}
.account-card > .icon {
  display: inline-flex;
  padding: 12px;
  border-radius: 12px;
  background: #e4f5ef;
  color: #00866a;
}
.account-card:nth-child(2) > .icon {
  background: #e5efff;
  color: #367dd5;
}
.account-card p {
  color: #617788;
  font-size: 13px;
}
.accounts-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
}
.accounts-toolbar strong {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 30px;
  margin-top: 7px;
  letter-spacing: -1px;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.account-card h2 {
  overflow-wrap: anywhere;
}
.transfer-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: -7px 0 19px;
  color: #617788;
  font-size: 11px;
}
.transfer-balance button {
  padding: 6px 0;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
.transaction-icon.transfer {
  background: #e3f5ef;
  color: #007e67;
}
.flow-legend {
  grid-template-columns: repeat(var(--legend-columns, 4), minmax(0, 1fr));
}
.legend-label {
  min-height: 27px;
}
.report-table th {
  color: #526e80;
  font-size: 12px;
}
.report-table td {
  color: #2a4354;
  font-size: 13px;
}
.report-table tfoot {
  background: #edf7f3;
}
.setting-row h3 {
  color: #294150;
  font-size: 14px;
}
.setting-row p {
  color: #617788;
  font-size: 12px;
}
.settings-note {
  background: #fff3df;
  color: #85602d;
}
.empty {
  color: #6b7e8a;
}
.empty strong {
  color: #315747;
}
.danger,
.form-error {
  color: #a94a40;
}
footer {
  color: #6d808d;
  font-size: 10px;
}
#toast {
  background: #104e46;
}
:focus-visible {
  outline: 2px solid #009b7b;
  outline-offset: 4px;
}

@media (min-width: 1600px) {
  main {
    padding-top: 40px;
  }
  .page-heading h1 {
    font-size: 35px;
  }
  .donut {
    width: 175px;
    height: 175px;
  }
  .stat-value {
    font-size: 34px;
  }
}
@media (max-width: 1200px) {
  .stat-card {
    padding: 18px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-foot {
    font-size: 10px;
  }
  .donut {
    width: 130px;
    height: 130px;
  }
  .donut:before {
    inset: 18px;
  }
  .donut-center strong {
    font-size: 19px;
  }
  .spending-content {
    gap: 18px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .category-row,
  .category-row strong {
    font-size: 11px;
  }
  .flow-panel .legend-label {
    font-size: 10px;
  }
  .flow-panel .legend-value {
    font-size: 12px;
  }
  .emergency-top {
    font-size: 12px;
  }
  .emergency-top .badge {
    font-size: 8px;
  }
}
@media (max-width: 980px) {
  .page-heading h1 {
    font-size: 29px;
  }
  .donut {
    width: 160px;
    height: 160px;
  }
  .donut:before {
    inset: 22px;
  }
  .spending-content {
    gap: 34px;
  }
  .flow-panel .legend-label {
    font-size: 11px;
  }
  .category-row,
  .category-row strong {
    font-size: 12px;
  }
}
@media (max-width: 640px) {
  nav {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    flex: 1 0 50px;
  }
  .nav-link[data-page="accounts"] {
    display: flex;
  }
  .accounts-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .accounts-toolbar .account-actions {
    width: 100%;
  }
  .transfer-balance {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .flow-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 16px;
  }
  main {
    padding-top: 25px;
  }
  .sidebar {
    border-top-color: #dee6ee;
    box-shadow: 0 -4px 18px #17324707;
  }
  .topbar {
    height: 59px;
  }
  .nav-link {
    font-size: 8px;
    padding: 8px 7px;
    border-radius: 7px;
  }
  .nav-link.active {
    color: #007e65;
    background: #ddf4e9;
    box-shadow: none;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .button {
    font-size: 11px;
    padding: 10px 12px;
  }
  .month-select {
    font-size: 11px;
    padding: 10px;
    max-width: 145px;
  }
  .demo-banner {
    font-size: 11px;
    padding: 11px 12px;
    gap: 10px;
  }
  .demo-banner button {
    font-size: 11px;
  }
  .stat-card {
    padding: 16px;
    border-radius: 12px;
  }
  .stat-card::after {
    left: 16px;
    width: 25px;
  }
  .stat-label {
    font-size: 11px;
    gap: 5px;
  }
  .stat-icon,
  .stat-icon.orange,
  .stat-icon.purple,
  .stat-icon.blue {
    width: 27px;
    height: 27px;
    flex-shrink: 0;
    border-radius: 8px;
  }
  .stat-icon svg {
    width: 17px;
    height: 17px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-foot {
    font-size: 10px;
  }
  .panel-header h2 {
    font-size: 14px;
  }
  .panel-header p {
    font-size: 11px;
  }
  .panel-link {
    font-size: 11px;
  }
  .flow-panel .available {
    font-size: 35px;
  }
  .flow-panel .legend-label {
    font-size: 9px;
    gap: 4px;
  }
  .flow-panel .legend-value {
    font-size: 11px;
  }
  .flow-panel .insight {
    font-size: 11px;
  }
  .donut {
    width: 140px;
    height: 140px;
  }
  .donut:before {
    inset: 20px;
  }
  .spending-content {
    gap: 20px;
  }
  .category-row,
  .category-row strong {
    font-size: 10px;
    gap: 5px;
  }
  .transaction-icon {
    width: 33px;
    height: 33px;
  }
  .transaction-info strong,
  .transaction-amount {
    font-size: 12px;
  }
  .transaction-info small,
  .transaction-amount small {
    font-size: 10px;
  }
  .emergency-top {
    font-size: 12px;
  }
  .emergency-top .badge {
    font-size: 8px;
  }
  .emergency-amount {
    font-size: 27px;
  }
  .emergency-amount small {
    font-size: 11px;
  }
  .emergency-footer {
    font-size: 10px;
  }
  .bill-info strong,
  .bill-amount {
    font-size: 12px;
  }
  footer {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
