/* Malino panel — single source of truth. Sections preserve the tested cascade. */

/* === Foundations and original panel components === */
:root {
  --ink: #07242b;
  --ink-2: #10353c;
  --muted: #647d80;
  --page: #f3f5ef;
  --surface: #fffefa;
  --line: #dce4dc;
  --lime: #d7ff58;
  --teal: #007d79;
  --blue: #3f62e8;
  --red: #cf4a48;
  --orange: #e79b32;
  --shadow: 0 18px 50px rgba(7, 36, 43, 0.08);
  --font: "Vazirmatn", Tahoma, sans-serif;
}

/* === Live personal and business tools === */
.connected .account-unit,
.connected .feature-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 24px;
}
.connected .account-unit {
  align-items: center;
}
.connected .account-unit small {
  color: var(--app-muted);
}
.connected
  :is(.account-unit, .feature-toolbar, .feature-form, .persian-picker)
  label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  min-width: 0;
}
.connected
  :is(.account-unit, .feature-toolbar, .feature-form, .persian-picker)
  :is(input:not([type="checkbox"]), select) {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #092129;
  color: var(--app-text);
  font: inherit;
  font-size: 16px;
}
.connected .account-unit select {
  width: auto;
}
.connected .feature-toolbar label {
  flex: 1;
  min-width: 150px;
}
.connected :is(.feature-cards, .wallet-grid, .business-live-kpis) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-block: 20px;
}
.connected .professional-card {
  min-width: 0;
}
.connected .professional-card > strong {
  display: block;
  font-size: 22px;
  color: var(--app-text);
  overflow-wrap: anywhere;
}
.connected .professional-card :is(p, small) {
  color: var(--app-muted);
}
.connected .professional-card > small {
  display: block;
}
.connected .feature-cards meter,
.connected .category-chart meter {
  width: 100%;
  height: 10px;
  accent-color: var(--app-aqua);
}
.connected :is(.wallet-details, #business-history, #stock-history) {
  margin-block: 20px;
}
.connected :is(.wallet-details, #business-history, #stock-history) summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 10px;
  color: var(--app-aqua);
}
.connected :is(.wallet-details, #business-history, #stock-history) p {
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.9;
}
.connected .feature-dialog {
  color: var(--app-text);
  width: min(560px, calc(100vw - 32px));
}
.connected .wide-dialog {
  width: min(880px, calc(100vw - 32px));
  max-width: 880px;
}
.connected .feature-form {
  display: grid;
  gap: 16px;
}
.connected .feature-form :is(input, select) {
  margin-bottom: 0;
}
.connected .feature-dialog :is(p, small) {
  font-size: 14px;
  line-height: 1.9;
}
.connected .feature-dialog .page-actions {
  margin-top: 12px;
}
.connected .feature-dialog button {
  min-height: 44px;
  font-size: 14px;
}
.connected .feature-dialog .dialog-heading {
  gap: 12px;
}
.connected .feature-dialog .dialog-heading h2 {
  color: var(--app-text);
}
.connected .form-hint {
  color: var(--app-muted);
  margin: 0;
}
.connected .check-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.connected .check-line input {
  width: 20px !important;
  height: 20px !important;
  min-height: 20px;
  accent-color: var(--app-aqua);
  margin: 0 !important;
}
.connected .persian-picker {
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  margin-block: 12px;
}
.connected .persian-picker legend {
  padding-inline: 6px;
  font-size: 14px;
}
.connected .persian-picker > div:first-of-type {
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 1fr;
  gap: 8px;
}
.connected .date-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.connected .date-tools button {
  border: 0;
  background: transparent;
  color: var(--app-aqua);
  font: inherit;
  font-size: 14px;
  min-height: 44px;
  padding: 6px 10px;
  cursor: pointer;
}
.connected .date-tools small {
  color: var(--app-muted);
}
.connected .schedule-list {
  display: grid;
  gap: 10px;
}
.connected .schedule-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--app-border);
  padding: 14px 0;
}
.connected .schedule-list article > div {
  display: grid;
  gap: 4px;
}
.connected .notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  width: auto;
  height: 22px;
  line-height: 20px;
  box-shadow: 0 0 0 2px var(--app-night);
  padding: 1px 4px;
  border-radius: 20px;
  background: var(--app-aqua);
  color: #07242b;
  font-size: 13px;
  font-weight: 800;
}
.connected .topbar .icon-button > span:not(.notification-count) {
  display: none;
}
.connected .account-unit[hidden],
.connected .notification-count[hidden] {
  display: none;
}
.connected .topbar .icon-button {
  position: relative;
}
.connected .notification-list article {
  padding: 14px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  margin-top: 12px;
}
.connected .notification-list article.unread {
  border-inline-start: 3px solid var(--app-aqua);
}
.connected .notification-list article h3 {
  font-size: 17px;
  margin: 0;
}
.connected .notification-list article button {
  margin-top: 10px;
}
.connected .live-report-grid {
  display: block;
  margin-top: 22px;
}
.connected .real-chart {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: var(--panel-calm, #0b252d);
}
.connected .real-chart figcaption {
  font-size: 16px;
  font-weight: 700;
}
.connected .real-chart svg {
  width: 100%;
  height: auto;
  min-height: 180px;
  direction: ltr;
}
.connected .real-chart svg text {
  fill: var(--app-muted);
  font-family: var(--font);
  font-size: 13px;
}
.connected .real-chart :is(.chart-income, .chart-expense) {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
}
.connected .chart-income {
  stroke: var(--app-aqua);
}
.connected .chart-expense {
  stroke: #ffa8af;
  stroke-dasharray: 6 4;
}
.connected .income-dot {
  fill: var(--app-aqua);
}
.connected .expense-dot {
  fill: #ffa8af;
}
.connected .chart-axis {
  stroke: var(--app-border);
  stroke-width: 1;
}
.connected .chart-key {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 14px;
}
.connected .chart-dates {
  display: flex;
  direction: ltr;
  justify-content: space-between;
  gap: 12px;
  color: var(--app-muted);
  font-size: 14px;
  margin-bottom: 12px;
}
.connected .chart-dates span {
  direction: rtl;
}
.connected .chart-key span:first-child {
  color: var(--app-aqua);
}
.connected .chart-key span:last-child {
  color: #ffa8af;
}
.connected .real-chart small,
.connected .chart-comparison {
  color: var(--app-muted);
  line-height: 1.9;
}
.connected .real-chart summary {
  min-height: 44px;
  padding-top: 14px;
  cursor: pointer;
}
.connected .category-chart > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--app-border);
}
.connected .category-chart meter {
  grid-column: 1/-1;
}
.connected .category-chart b {
  font-size: 14px;
}
.connected .data-table {
  max-width: 100%;
  overflow-x: auto;
}
.connected .data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: right;
}
.connected .data-table :is(th, td) {
  padding: 12px;
  border-bottom: 1px solid var(--app-border);
  white-space: nowrap;
}
.connected .data-table th {
  color: var(--app-muted);
}
.connected .business-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.connected .business-tabs button {
  flex: 1;
  min-height: 44px;
}
.connected .empty-feature {
  padding: 40px 24px;
  border: 1px dashed var(--app-border);
  border-radius: 18px;
  text-align: center;
}
.connected .invoice-editor {
  border-top: 1px solid var(--app-border);
  padding-top: 12px;
}
.connected .invoice-line {
  display: grid;
  grid-template-columns: 1fr 100px 150px auto;
  gap: 10px;
  align-items: end;
  padding: 14px 0;
  border-bottom: 1px solid var(--app-border);
}
.connected .invoice-paper h3 {
  font-size: 24px;
}
.connected .invoice-paper > strong {
  display: block;
  font-size: 22px;
  margin-top: 18px;
}
.connected #invoice-total {
  display: block;
  margin-top: 16px;
  font-size: 20px;
}
@media (max-width: 720px) {
  .connected :is(.feature-cards, .wallet-grid, .business-live-kpis) {
    grid-template-columns: 1fr;
  }
  .connected .invoice-line {
    grid-template-columns: 1fr 1fr;
  }
  .connected .invoice-line > b {
    grid-column: 1/-1;
  }
  .connected .feature-toolbar button {
    flex: 1;
  }
  .connected .real-chart {
    padding: 14px;
  }
  .connected .category-chart > div {
    grid-template-columns: 1fr;
  }
  .connected .account-unit small {
    flex-basis: 100%;
  }
  .connected .feature-form .page-actions button {
    flex: 1;
  }
}
@media print {
  body.connected > :not(.invoice-print) {
    display: none !important;
  }
  body.connected {
    background: white !important;
    color: black !important;
  }
  .connected .invoice-print {
    position: static !important;
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    background: white !important;
    color: black !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .connected .invoice-print .no-print {
    display: none !important;
  }
  .connected .invoice-print :is(p, small, h2, h3, th, td, strong) {
    color: black !important;
  }
  .connected .invoice-print .data-table {
    overflow: visible;
  }
  .connected .invoice-print .data-table :is(th, td) {
    white-space: normal;
    border-color: #ccc;
  }
  dialog::backdrop {
    display: none;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}
button,
input,
select {
  font: inherit;
}
.skip-link {
  position: fixed;
  top: -5rem;
  right: 1rem;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 10px;
}
.skip-link:focus {
  top: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
}
.brand img {
  object-fit: contain;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 40px clamp(28px, 5vw, 80px);
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.auth-brand:before {
  content: "";
  position: absolute;
  inset: auto -200px -320px auto;
  width: 700px;
  height: 700px;
  border: 1px solid #527067;
  border-radius: 50%;
  box-shadow:
    0 0 0 65px #10363a,
    0 0 0 130px #123b3f;
}
.auth-brand .brand {
  align-self: flex-start;
  color: #fff;
}
.auth-brand .brand img {
  filter: drop-shadow(0 6px 15px #0003);
}
.auth-message {
  max-width: 560px;
  margin-top: 10vh;
  position: relative;
  z-index: 1;
}
.eyebrow,
.step-label {
  color: #7ca69a;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
}
.auth-message h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.25;
  letter-spacing: -2px;
  margin: 0;
}
.auth-message > p:last-child {
  max-width: 480px;
  color: #b9ceca;
  font-size: 16px;
  line-height: 2;
}
.auth-preview {
  position: relative;
  margin-top: auto;
  height: 240px;
  max-width: 660px;
  border: 1px solid #ffffff20;
  border-radius: 20px;
  background: #ffffff0a;
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.auth-preview:after {
  content: "";
  position: absolute;
  right: 52px;
  bottom: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 7px #d7ff5830;
}
.preview-balance {
  position: absolute;
  z-index: 2;
  right: 28px;
  top: 25px;
}
.preview-balance span,
.preview-balance strong,
.preview-balance small {
  display: block;
}
.preview-balance span {
  color: #a5c0ba;
  font-size: 13px;
}
.preview-balance strong {
  font-size: 31px;
  letter-spacing: -1px;
  margin-top: 4px;
}
.preview-balance small {
  color: #8ca59f;
  font-size: 13px;
}
.auth-preview svg {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 180px;
}
.auth-preview .area {
  fill: url(#auth-fill);
}
.auth-preview .line {
  fill: none;
  stroke: var(--lime);
  stroke-width: 3;
}
.auth-panel {
  padding: 40px clamp(28px, 6vw, 90px);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.back-site {
  align-self: flex-start;
  color: #526e73;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.auth-form-wrap {
  width: min(100%, 430px);
  margin: auto;
}
.auth-form-wrap h2 {
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: -1px;
  margin: 0 0 7px;
}
.auth-form-wrap form > p:not(.step-label):not(.field-error) {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 30px;
}
.auth-form-wrap label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
}
.phone-input {
  height: 54px;
  border: 1px solid #cbd8ce;
  border-radius: 12px;
  display: flex;
  direction: ltr;
  align-items: center;
  padding: 4px 12px;
  background: #fff;
}
.phone-input:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px #007d7918;
}
.phone-input span {
  font-size: 14px;
  color: #678080;
  padding-right: 10px;
  border-right: 1px solid #d8e1da;
}
.phone-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  text-align: left;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}
.auth-form-wrap small {
  font-size: 13px;
  color: #849797;
}
.field-error {
  min-height: 24px;
  color: #a53232;
  font-size: 13px;
  font-weight: 700;
  margin: 5px 0;
}
.primary-action {
  height: 52px;
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px #07242b24;
}
.text-action {
  float: left;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.otp-input {
  width: 100%;
  height: 58px;
  border: 1px solid #cbd8ce;
  border-radius: 12px;
  text-align: center;
  letter-spacing: 13px;
  font-size: 23px;
  font-weight: 800;
  direction: ltr;
  margin-bottom: 4px;
}
.otp-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px #007d7918;
  outline: 0;
}
.auth-legal {
  font-size: 13px;
  color: #849797;
  text-align: center;
  margin: 0;
}
.dashboard {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 236px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 22px 14px;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.side-brand {
  color: #fff;
  padding: 0 10px 26px;
  border-bottom: 1px solid #ffffff17;
  margin-bottom: 19px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  height: 46px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a9c0bc;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: right;
}
.nav-item svg,
.icon-button svg,
.profile-button svg,
.voice-action svg,
.manual-action svg,
.insight-card svg,
.bottom-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item:hover,
.nav-item.active {
  background: #174149;
  color: #fff;
}
.nav-item.active {
  box-shadow: inset -3px 0 var(--lime);
}
.nav-item > b {
  margin-right: auto;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #34575c;
  color: #d9ebe7;
  font-size: 13px;
}
.voice-quota {
  margin-top: auto;
  border: 1px solid #ffffff15;
  border-radius: 13px;
  background: #ffffff08;
  padding: 14px;
}
.voice-quota div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #b1c7c2;
}
.voice-quota div b {
  color: var(--lime);
  direction: ltr;
}
.voice-quota i {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: #36565b;
  overflow: hidden;
  margin: 10px 0 6px;
}
.voice-quota i b {
  display: block;
  width: 74%;
  height: 100%;
  background: var(--lime);
}
.voice-quota small {
  font-size: 13px;
  color: #779691;
}
.logout {
  margin-top: 8px;
}
.dashboard-shell {
  min-width: 0;
}
.topbar {
  height: 88px;
  padding: 0 clamp(22px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  background: #f3f5efdd;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 8;
}
.topbar > div:first-child p {
  font-size: 13px;
  color: #809394;
  margin: 0;
}
.topbar h1 {
  font-size: 20px;
  margin: 1px 0 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.icon-button {
  position: relative;
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}
.icon-button > span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e5544f;
  box-shadow: 0 0 0 2px #fff;
}
.profile-button {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 7px 4px 10px;
  color: var(--ink);
  cursor: pointer;
}
.profile-button > span {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #dff3dd;
  color: #247558;
  font-weight: 900;
}
.profile-button div {
  text-align: right;
}
.profile-button b,
.profile-button small {
  display: block;
}
.profile-button b {
  font-size: 13px;
}
.profile-button small {
  font-size: 13px;
  color: #819393;
}
.profile-button > svg {
  width: 15px;
}
#dashboard-main {
  padding: 30px clamp(20px, 3vw, 44px) 50px;
  outline: none;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 18px;
}
.balance-card,
.quick-add-card,
.transactions-card,
.budget-card,
.insight-card,
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 7px 25px #07242b08;
}
.balance-card {
  min-height: 420px;
  padding: 26px 28px 18px;
  position: relative;
  overflow: hidden;
}
.balance-card:after {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -160px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid #cae2cd;
  box-shadow:
    0 0 0 40px #eaf2e7,
    0 0 0 80px #f1f4ee;
}
.balance-top {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.balance-top p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.balance-top h2 {
  font-size: 31px;
  margin: 5px 0;
}
.balance-top h2 small {
  font-size: 13px;
  color: #718687;
}
.trend {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 800;
}
.trend svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.trend.up {
  background: #e5f4df;
  color: #367e3c;
}
.balance-stats {
  display: flex;
  gap: 32px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.balance-stats div {
  display: grid;
  grid-template-columns: 8px auto;
  column-gap: 7px;
}
.balance-stats p,
.balance-stats b {
  margin: 0;
}
.balance-stats p {
  font-size: 13px;
  color: #728687;
}
.balance-stats b {
  grid-column: 2;
  font-size: 13px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
}
.dot.income {
  background: var(--teal);
}
.dot.expense {
  background: var(--orange);
}
.flow-chart {
  height: 210px;
  position: absolute;
  right: 24px;
  left: 24px;
  bottom: 20px;
  z-index: 1;
}
.flow-chart svg {
  width: 100%;
  height: 175px;
  overflow: visible;
}
.grid-lines path {
  fill: none;
  stroke: #dce5dd;
  stroke-width: 1;
  stroke-dasharray: 5 7;
}
.chart-area {
  fill: url(#flow-fill);
}
.chart-line {
  fill: none;
  stroke: #8ebd2d;
  stroke-width: 3;
}
.flow-chart circle {
  fill: var(--lime);
  stroke: var(--ink);
  stroke-width: 3;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  color: #8b9e9e;
  font-size: 13px;
}
.quick-add-card {
  padding: 24px;
  background: var(--ink);
  color: #fff;
}
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.card-heading p {
  font-size: 13px;
  color: #92aaa5;
  margin: 0;
}
.card-heading h2 {
  font-size: 20px;
  margin: 3px 0;
}
.spark {
  color: var(--lime);
  font-size: 23px;
}
.voice-action {
  width: 100%;
  border: 1px solid #31535a;
  border-radius: 14px;
  background: #163a40;
  color: #fff;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: right;
  cursor: pointer;
}
.voice-action:hover {
  border-color: #729b60;
  background: #1b4449;
}
.mic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.voice-action b,
.voice-action small {
  display: block;
}
.voice-action b {
  font-size: 13px;
}
.voice-action small {
  font-size: 13px;
  color: #9eb5b0;
  margin-top: 3px;
}
.voice-action i {
  font-style: normal;
  margin-right: auto;
  color: #7c9a95;
}
.or {
  position: relative;
  text-align: center;
  color: #73908a;
  font-size: 13px;
  margin: 10px 0;
}
.or:before,
.or:after {
  content: "";
  position: absolute;
  top: 50%;
  width: 43%;
  border-top: 1px solid #315158;
}
.or:before {
  right: 0;
}
.or:after {
  left: 0;
}
.or span {
  background: var(--ink);
  padding: 0 7px;
  position: relative;
  z-index: 1;
}
.manual-action {
  width: 100%;
  height: 43px;
  border: 1px solid #3a5b60;
  border-radius: 10px;
  background: transparent;
  color: #c4d7d3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.transactions-card,
.budget-card {
  padding: 22px;
}
.transactions-card {
  grid-column: 1;
}
.budget-card {
  grid-column: 2;
}
.card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 13px;
}
.card-title h2 {
  font-size: 16px;
  margin: 0;
}
.card-title p {
  font-size: 13px;
  color: #839696;
  margin: 2px 0;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 8px;
}
.simple {
  font-size: 22px;
  border: 0;
  background: #eef4ea;
}
.transaction-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) 0.75fr 0.7fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #edf1ec;
}
.transaction-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.transaction-name > span {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}
.transaction-name > span.income {
  background: #e1f3de;
  color: #2d7d43;
}
.transaction-name > span.expense {
  background: #fff0da;
  color: #b26b18;
}
.transaction-name b,
.transaction-name small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transaction-name b {
  font-size: 13px;
}
.transaction-name small,
.transaction-row > span {
  font-size: 13px;
  color: #819393;
}
.amount {
  text-align: left;
  font-size: 13px;
  font-weight: 900;
  direction: rtl;
}
.amount.income {
  color: #27814b;
}
.amount.expense {
  color: #9a4d40;
}
.budget-list > div {
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 7px;
  margin: 17px 0;
}
.budget-list > div > div {
  display: flex;
  justify-content: space-between;
  grid-column: 1/-1;
}
.budget-list span,
.budget-list b,
.budget-list small {
  font-size: 13px;
}
.budget-list span {
  font-weight: 700;
}
.budget-list b {
  color: #708586;
}
.budget-list i {
  height: 7px;
  border-radius: 99px;
  background: #e4ebe3;
  overflow: hidden;
}
.budget-list i b {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 99px;
}
.budget-list i.warning b {
  background: var(--orange);
}
.budget-list small {
  text-align: left;
  color: #7b8f8e;
}
.insight-card {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  background: #e8f0df;
  border-color: #d2e2ce;
}
.insight-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--lime);
  color: var(--ink);
  flex: 0 0 auto;
}
.insight-card p {
  font-size: 13px;
  color: #688268;
  margin: 0;
}
.insight-card h3 {
  font-size: 13px;
  margin: 1px 0;
}
.insight-card small {
  font-size: 13px;
  color: #6b8270;
}
.view-panel[hidden] {
  display: none;
}
.view-panel.active {
  display: grid;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-title p {
  font-size: 13px;
  color: var(--teal);
  font-weight: 800;
  margin: 0;
}
.page-title h2 {
  font-size: 27px;
  margin: 2px 0;
}
.primary-small {
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.data-view {
  display: block !important;
}
.data-view[hidden] {
  display: none !important;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}
.toolbar label {
  position: relative;
}
.toolbar label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.toolbar input {
  width: min(330px, 48vw);
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 13px;
  color: var(--ink);
}
.filter-tabs {
  display: flex;
  background: #e4eae3;
  padding: 4px;
  border-radius: 10px;
}
.filter-tabs button {
  border: 0;
  background: transparent;
  color: #687f80;
  border-radius: 7px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.filter-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px #08272c10;
}
.table-card {
  padding: 0 20px;
}
.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.6fr 0.6fr;
  gap: 16px;
  align-items: center;
}
.table-head {
  padding: 15px 0;
  color: #829493;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.table-row {
  padding: 13px 0;
  border-bottom: 1px solid #edf1ec;
}
.table-row:last-child {
  border-bottom: 0;
}
.table-row > span {
  font-size: 13px;
  color: #697f80;
}
.table-row .amount {
  font-size: 13px;
}
.placeholder-view {
  min-height: calc(100dvh - 170px);
  place-items: center;
  text-align: center;
  align-content: center;
}
.placeholder-view .empty-illustration {
  width: 150px;
  height: 110px;
  color: #6d9b90;
}
.empty-illustration svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.placeholder-view > p:first-of-type {
  font-size: 13px;
  color: var(--teal);
  font-weight: 800;
  margin: 16px 0 0;
}
.placeholder-view h2 {
  font-size: 26px;
  margin: 3px 0;
}
.placeholder-view > p:last-of-type {
  max-width: 500px;
  color: var(--muted);
  font-size: 13px;
}
.placeholder-view button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: #8ba09c;
  padding: 8px 15px;
}
.bottom-nav {
  display: none;
}
.transaction-dialog {
  width: min(92vw, 470px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 25px 80px #001b2160;
  color: var(--ink);
  background: var(--surface);
}
.transaction-dialog::backdrop {
  background: #051f256d;
  backdrop-filter: blur(4px);
}
.transaction-dialog form {
  padding: 25px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.dialog-heading p {
  font-size: 13px;
  color: var(--teal);
  margin: 0;
}
.dialog-heading h2 {
  font-size: 22px;
  margin: 0;
}
.close-dialog {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}
.transaction-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 17px;
}
.transaction-dialog legend,
.transaction-dialog > form > label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 7px;
}
.type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.type-switch label {
  cursor: pointer;
}
.type-switch input {
  position: absolute;
  opacity: 0;
}
.type-switch span {
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
.type-switch input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.transaction-dialog input:not([type="radio"]),
.transaction-dialog select {
  width: 100%;
  height: 45px;
  border: 1px solid #cbd8ce;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  margin-bottom: 14px;
}
.transaction-dialog label span {
  color: #819492;
  font-weight: 400;
}
.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  border-radius: 11px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 35px #08282d30;
  transform: translateY(100px);
  opacity: 0;
  transition: 0.25s;
}
.toast.show {
  transform: none;
  opacity: 1;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #4f6df3;
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .dashboard {
    grid-template-columns: 86px 1fr;
  }
  .side-brand span,
  .nav-item span,
  .nav-item > b,
  .voice-quota {
    display: none;
  }
  .side-brand {
    justify-content: center;
    padding-inline: 0;
  }
  .nav-item {
    justify-content: center;
    padding: 0;
  }
  .transactions-card {
    grid-column: 1/-1;
  }
  .budget-card {
    grid-column: 1/-1;
  }
  .quick-add-card {
    min-height: 300px;
  }
}
@media (max-width: 720px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    min-height: 270px;
    padding: 25px 22px;
  }
  .auth-message {
    margin-top: 24px;
  }
  .auth-message h1 {
    font-size: 35px;
  }
  .auth-message > p:last-child {
    font-size: 13px;
  }
  .auth-preview {
    display: none;
  }
  .auth-panel {
    min-height: calc(100dvh - 270px);
    padding: 25px 22px;
  }
  .auth-form-wrap {
    margin: 55px auto;
  }
  .dashboard {
    display: block;
    padding-bottom: 74px;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 76px;
    padding: 0 18px;
  }
  .topbar > div:first-child p {
    display: none;
  }
  .topbar h1 {
    font-size: 16px;
  }
  .profile-button div,
  .profile-button > svg {
    display: none;
  }
  .profile-button {
    padding: 5px;
  }
  .icon-button {
    width: 42px;
    height: 42px;
  }
  #dashboard-main {
    padding: 20px 15px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .balance-card {
    min-height: 390px;
    padding: 22px 18px;
  }
  .balance-top h2 {
    font-size: 25px;
  }
  .quick-add-card {
    min-height: auto;
  }
  .transactions-card,
  .budget-card {
    grid-column: auto;
  }
  .transaction-row {
    grid-template-columns: minmax(140px, 1fr) auto;
  }
  .transaction-row > span {
    display: none;
  }
  .insight-card {
    align-items: flex-start;
  }
  .insight-card small {
    display: block;
    margin-top: 4px;
  }
  .bottom-nav {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    height: 68px;
    background: #fffefaee;
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--line);
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 4px 6px max(4px, env(safe-area-inset-bottom));
  }
  .bottom-nav button {
    border: 0;
    background: transparent;
    color: #718686;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 9px;
  }
  .bottom-nav button.active {
    color: var(--teal);
  }
  .bottom-nav .bottom-add {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--lime);
    font-size: 28px;
    justify-self: center;
    align-self: center;
    transform: translateY(-17px);
    box-shadow: 0 8px 18px #06272c35;
  }
  .page-title {
    margin-bottom: 17px;
  }
  .toolbar {
    flex-direction: column;
  }
  .toolbar input {
    width: 100%;
  }
  .filter-tabs {
    align-self: flex-start;
  }
  .table-head {
    display: none;
  }
  .table-card {
    padding: 0 14px;
  }
  .table-row {
    grid-template-columns: 1fr auto;
    gap: 7px;
  }
  .table-row > span:nth-of-type(2),
  .table-row > span:nth-of-type(3) {
    display: none;
  }
  .placeholder-view {
    min-height: calc(100dvh - 190px);
  }
  .toast {
    left: 15px;
    right: 15px;
    bottom: 86px;
    text-align: center;
  }
}
@media (max-width: 390px) {
  .balance-top {
    display: block;
  }
  .trend {
    position: absolute;
    left: 0;
    top: 4px;
  }
  .balance-stats {
    gap: 18px;
  }
  .flow-chart {
    right: 10px;
    left: 10px;
  }
  .transaction-dialog form {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* === Malino dark brand theme === */
:root {
  --app-night: #05181e;
  --app-deep: #031116;
  --app-surface: rgba(17, 52, 60, 0.66);
  --app-surface-strong: rgba(20, 61, 68, 0.88);
  --app-border: rgba(202, 255, 244, 0.12);
  --app-text: #effcf9;
  --app-muted: #9cb8b5;
  --app-aqua: #72f4dc;
  --app-aqua-bright: #b1fff0;
  --app-gold: #f5d477;
  --app-glow:
    0 0 0 1px rgba(114, 244, 220, 0.15),
    0 22px 60px -32px rgba(114, 244, 220, 0.48);
  --app-shadow: 0 28px 75px -38px rgba(0, 0, 0, 0.9);
}
html {
  background: var(--app-deep);
}
body {
  color: var(--app-text);
  background:
    radial-gradient(
      52rem 40rem at 82% 2%,
      rgba(53, 222, 198, 0.15),
      transparent 68%
    ),
    radial-gradient(
      44rem 36rem at 5% 38%,
      rgba(142, 111, 255, 0.11),
      transparent 70%
    ),
    var(--app-deep);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.11;
  background-image:
    linear-gradient(rgba(187, 255, 242, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(187, 255, 242, 0.16) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(68% 55% at 55% 18%, #000, transparent);
  mask-image: radial-gradient(68% 55% at 55% 18%, #000, transparent);
}
.auth-brand,
.auth-panel {
  background: transparent;
}
.auth-shell {
  background: linear-gradient(
    90deg,
    rgba(5, 23, 29, 0.32),
    rgba(8, 33, 40, 0.12)
  );
}
.auth-brand {
  border-left: 1px solid var(--app-border);
}
.auth-brand::before {
  border-color: rgba(114, 244, 220, 0.11);
  box-shadow:
    0 0 0 65px rgba(114, 244, 220, 0.025),
    0 0 0 130px rgba(114, 244, 220, 0.018);
}
.auth-brand .brand,
.back-site {
  color: var(--app-text);
}
.auth-message h1 {
  color: var(--app-text);
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.4);
}
.auth-message .eyebrow,
.step-label {
  color: var(--app-aqua-bright);
}
.auth-message > p:last-child,
.auth-form-wrap form > p:not(.step-label):not(.field-error),
.auth-legal {
  color: var(--app-muted);
}
.auth-preview,
.phone-input,
.otp-input {
  background: linear-gradient(
    145deg,
    rgba(25, 70, 77, 0.7),
    rgba(6, 27, 34, 0.74)
  );
  border-color: var(--app-border);
  box-shadow:
    var(--app-shadow),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}
.preview-balance span,
.preview-balance small {
  color: var(--app-muted);
}
.auth-preview .line {
  stroke: var(--app-aqua);
  filter: drop-shadow(0 0 8px rgba(114, 244, 220, 0.35));
}
.auth-preview::after {
  background: var(--app-aqua);
  box-shadow:
    0 0 0 7px rgba(114, 244, 220, 0.12),
    0 0 20px var(--app-aqua);
}
.auth-form-wrap h2,
.auth-form-wrap label {
  color: var(--app-text);
}
.phone-input input,
.otp-input {
  color: var(--app-text);
}
.phone-input input::placeholder,
.otp-input::placeholder {
  color: #78918f;
}
.phone-input span {
  color: var(--app-muted);
  border-color: var(--app-border);
}
.auth-form-wrap small {
  color: var(--app-muted);
}
.primary-action {
  color: #06242a;
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: var(--app-glow);
}
.text-action {
  color: var(--app-aqua);
}

.dashboard {
  background: transparent;
}
.sidebar {
  background: linear-gradient(
    180deg,
    rgba(15, 48, 56, 0.88),
    rgba(4, 22, 28, 0.94)
  );
  border-left: 1px solid var(--app-border);
  box-shadow: 12px 0 55px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px);
}
.side-brand {
  border-color: var(--app-border);
}
.nav-item {
  color: var(--app-muted);
}
.nav-item:hover,
.nav-item.active {
  background: rgba(114, 244, 220, 0.08);
  color: var(--app-text);
}
.nav-item.active {
  box-shadow:
    inset -3px 0 var(--app-aqua),
    0 0 28px rgba(114, 244, 220, 0.04);
}
.nav-item > b {
  color: var(--app-aqua-bright);
  background: rgba(114, 244, 220, 0.12);
}
.voice-quota {
  border-color: var(--app-border);
  background: rgba(255, 255, 255, 0.025);
}
.voice-quota div {
  color: var(--app-muted);
}
.voice-quota div b {
  color: var(--app-aqua);
}
.voice-quota i {
  background: rgba(255, 255, 255, 0.08);
}
.voice-quota i b {
  background: linear-gradient(90deg, var(--app-aqua), var(--app-gold));
  box-shadow: 0 0 14px rgba(114, 244, 220, 0.35);
}
.topbar {
  color: var(--app-text);
  background: rgba(5, 24, 30, 0.7);
  border-color: var(--app-border);
  backdrop-filter: blur(20px);
}
.topbar > div:first-child p,
.profile-button small {
  color: var(--app-muted);
}
.icon-button,
.profile-button {
  color: var(--app-text);
  background: rgba(18, 56, 63, 0.62);
  border-color: var(--app-border);
}
.profile-button > span {
  background: rgba(114, 244, 220, 0.13);
  color: var(--app-aqua-bright);
}
#dashboard-main {
  color: var(--app-text);
}
.balance-card,
.quick-add-card,
.transactions-card,
.budget-card,
.insight-card,
.table-card {
  color: var(--app-text);
  background: linear-gradient(
    145deg,
    rgba(23, 66, 73, 0.72),
    rgba(5, 26, 33, 0.78)
  );
  border-color: var(--app-border);
  box-shadow:
    var(--app-shadow),
    inset 0 1px rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}
.balance-card {
  border-color: rgba(114, 244, 220, 0.2);
  box-shadow: var(--app-shadow), var(--app-glow);
}
.balance-card::after {
  border-color: rgba(114, 244, 220, 0.09);
  box-shadow:
    0 0 0 40px rgba(114, 244, 220, 0.025),
    0 0 0 80px rgba(114, 244, 220, 0.015);
}
.balance-top p,
.balance-top h2 small,
.balance-stats p,
.card-title p,
.card-heading p,
.transaction-name small,
.transaction-row > span {
  color: var(--app-muted);
}
.trend.up {
  background: rgba(114, 244, 220, 0.12);
  color: var(--app-aqua-bright);
}
.dot.income {
  background: var(--app-aqua);
  box-shadow: 0 0 10px rgba(114, 244, 220, 0.5);
}
.dot.expense {
  background: var(--app-gold);
}
.grid-lines path {
  stroke: rgba(202, 255, 244, 0.09);
}
.chart-line {
  stroke: var(--app-aqua);
  filter: drop-shadow(0 0 7px rgba(114, 244, 220, 0.35));
}
.flow-chart circle {
  fill: var(--app-gold);
  stroke: var(--app-night);
}
.chart-labels {
  color: var(--app-muted);
}
.quick-add-card {
  background: linear-gradient(
    145deg,
    rgba(20, 70, 75, 0.88),
    rgba(4, 23, 29, 0.94)
  );
}
.spark {
  color: var(--app-gold);
  filter: drop-shadow(0 0 10px rgba(245, 212, 119, 0.35));
}
.voice-action {
  background: rgba(114, 244, 220, 0.07);
  border-color: rgba(114, 244, 220, 0.17);
}
.voice-action:hover {
  background: rgba(114, 244, 220, 0.11);
  border-color: rgba(114, 244, 220, 0.35);
}
.mic {
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  color: #06242a;
  box-shadow: var(--app-glow);
}
.voice-action small,
.manual-action {
  color: var(--app-muted);
}
.manual-action,
.or::before,
.or::after {
  border-color: var(--app-border);
}
.or span {
  background: transparent;
}
.link-button {
  color: var(--app-aqua);
}
.simple {
  color: var(--app-aqua-bright);
  background: rgba(114, 244, 220, 0.1);
}
.transaction-row,
.table-row,
.table-head {
  border-color: var(--app-border);
}
.transaction-name > span.income {
  background: rgba(114, 244, 220, 0.12);
  color: var(--app-aqua-bright);
}
.transaction-name > span.expense {
  background: rgba(245, 212, 119, 0.12);
  color: var(--app-gold);
}
.amount.income {
  color: var(--app-aqua);
}
.amount.expense {
  color: #ff978d;
}
.budget-list b,
.budget-list small {
  color: var(--app-muted);
}
.budget-list i {
  background: rgba(255, 255, 255, 0.08);
}
.budget-list i b {
  background: linear-gradient(90deg, var(--app-aqua), #4fdbc7);
  box-shadow: 0 0 12px rgba(114, 244, 220, 0.25);
}
.budget-list i.warning b {
  background: linear-gradient(90deg, var(--app-gold), #ef9a3b);
}
.insight-card {
  background: linear-gradient(
    135deg,
    rgba(114, 244, 220, 0.1),
    rgba(245, 212, 119, 0.055)
  );
  border-color: rgba(114, 244, 220, 0.16);
}
.insight-icon {
  background: rgba(114, 244, 220, 0.14);
  color: var(--app-aqua-bright);
}
.insight-card p,
.insight-card small {
  color: var(--app-muted);
}
.page-title p {
  color: var(--app-aqua);
}
.primary-small {
  color: #06242a;
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: var(--app-glow);
}
.toolbar input,
.filter-tabs,
.filter-tabs button.active {
  color: var(--app-text);
  background: rgba(17, 51, 59, 0.72);
  border-color: var(--app-border);
}
.toolbar input::placeholder {
  color: #78918f;
}
.filter-tabs button {
  color: var(--app-muted);
}
.filter-tabs button.active {
  color: var(--app-text);
  box-shadow: inset 0 0 0 1px rgba(114, 244, 220, 0.12);
}
.table-head,
.table-row > span,
.placeholder-view > p:last-of-type {
  color: var(--app-muted);
}
.placeholder-view .empty-illustration,
.placeholder-view > p:first-of-type {
  color: var(--app-aqua);
}
.placeholder-view button {
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--app-border);
}
.bottom-nav {
  background: rgba(5, 24, 30, 0.9);
  border-color: var(--app-border);
  backdrop-filter: blur(20px);
}
.bottom-nav button {
  color: var(--app-muted);
}
.bottom-nav button.active {
  color: var(--app-aqua);
}
.bottom-nav .bottom-add {
  color: #06242a;
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: var(--app-glow);
}
.transaction-dialog {
  color: var(--app-text);
  background: linear-gradient(
    145deg,
    rgba(23, 66, 73, 0.98),
    rgba(5, 26, 33, 0.98)
  );
  border: 1px solid var(--app-border);
}
.transaction-dialog::backdrop {
  background: rgba(1, 10, 13, 0.78);
}
.close-dialog,
.transaction-dialog input:not([type="radio"]),
.transaction-dialog select,
.type-switch span {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--app-border);
}
.transaction-dialog input::placeholder {
  color: #78918f;
}
.type-switch input:checked + span {
  color: #06242a;
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  border-color: transparent;
}
.toast {
  color: #06242a;
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: var(--app-glow);
}

.balance-card,
.quick-add-card,
.transactions-card,
.budget-card,
.insight-card {
  animation: app-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.quick-add-card {
  animation-delay: 0.08s;
}
.transactions-card {
  animation-delay: 0.14s;
}
.budget-card {
  animation-delay: 0.2s;
}
.insight-card {
  animation-delay: 0.26s;
}
@keyframes app-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    background: rgba(5, 24, 30, 0.86);
  }
  .balance-card,
  .quick-add-card,
  .transactions-card,
  .budget-card,
  .insight-card {
    backdrop-filter: blur(14px);
  }
  .auth-panel {
    background: rgba(4, 20, 26, 0.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .balance-card,
  .quick-add-card,
  .transactions-card,
  .budget-card,
  .insight-card {
    animation: none;
  }
}

/* === Professional panel components === */
.kpi-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kpi-card {
  min-width: 0;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    rgba(23, 66, 73, 0.66),
    rgba(5, 26, 33, 0.72)
  );
  box-shadow:
    var(--app-shadow),
    inset 0 1px rgba(255, 255, 255, 0.04);
}
.kpi-icon,
.debt-symbol {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.kpi-icon svg,
.debt-symbol svg,
.secondary-small svg,
.budget-alert svg,
.insight-pro svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kpi-icon.aqua {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.11);
}
.kpi-icon.gold {
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.11);
}
.kpi-icon.violet {
  color: #baa9ff;
  background: rgba(155, 124, 255, 0.12);
}
.kpi-card p,
.kpi-card strong,
.kpi-card small {
  display: block;
  margin: 0;
}
.kpi-card p {
  color: var(--app-muted);
  font-size: 13px;
}
.kpi-card strong {
  margin-top: 2px;
  color: var(--app-text);
  font-size: 16px;
}
.kpi-card small {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 13px;
}
.positive {
  color: var(--app-aqua) !important;
}
.negative {
  color: #ff978d !important;
}
.health-ring {
  --progress: 82%;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(
    var(--app-aqua) var(--progress),
    rgba(255, 255, 255, 0.08) 0
  );
  box-shadow: 0 0 18px rgba(114, 244, 220, 0.14);
  position: relative;
}
.health-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: #0c3037;
}
.health-ring span {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 900;
}
.page-title > div > span {
  display: block;
  color: var(--app-muted);
  font-size: 13px;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.primary-small {
  min-height: 44px;
}
.secondary-small {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.secondary-small:hover {
  border-color: rgba(114, 244, 220, 0.32);
  background: rgba(114, 244, 220, 0.07);
}
.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}
.summary-row > div {
  padding: 13px 15px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.summary-row span,
.summary-row b {
  display: block;
}
.summary-row span {
  color: var(--app-muted);
  font-size: 13px;
}
.summary-row b {
  margin-top: 3px;
  font-size: 13px;
}

.feature-page.active {
  display: block;
}
.budget-overview,
.debt-summary,
.report-kpis {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.budget-overview {
  grid-template-columns: 1.35fr 0.65fr;
}
.budget-overview > article,
.debt-summary > article,
.report-kpis > article,
.professional-card,
.people-card,
.reminder-card,
.analytics-card,
.settings-card {
  border: 1px solid var(--app-border);
  border-radius: 17px;
  background: linear-gradient(
    145deg,
    rgba(23, 66, 73, 0.64),
    rgba(5, 26, 33, 0.74)
  );
  box-shadow:
    var(--app-shadow),
    inset 0 1px rgba(255, 255, 255, 0.04);
}
.budget-overview > article {
  padding: 20px;
}
.budget-overview p,
.budget-overview strong,
.budget-overview span {
  display: block;
  margin: 0;
}
.budget-overview p {
  color: var(--app-muted);
  font-size: 13px;
}
.budget-overview strong {
  margin-top: 4px;
  font-size: 23px;
}
.budget-overview strong small {
  color: var(--app-muted);
  font-size: 13px;
}
.budget-overview > article > span {
  margin-top: 8px;
  color: var(--app-muted);
  font-size: 13px;
}
.budget-total-track {
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}
.budget-total-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--app-aqua), var(--app-gold));
  box-shadow: 0 0 14px rgba(114, 244, 220, 0.25);
}
.budget-overview .budget-alert {
  display: flex;
  align-items: center;
  gap: 13px;
  background: linear-gradient(
    145deg,
    rgba(245, 212, 119, 0.09),
    rgba(5, 26, 33, 0.76)
  );
}
.budget-alert > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(245, 212, 119, 0.12);
  color: var(--app-gold);
}
.budget-alert b,
.budget-alert small {
  display: block;
}
.budget-alert b {
  margin-top: 3px;
  font-size: 13px;
}
.budget-alert small {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 13px;
}
.professional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.professional-card {
  padding: 18px;
}
.professional-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.professional-card-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.professional-card .category-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.1);
  font-size: 14px;
  font-weight: 900;
}
.professional-card h3,
.professional-card p {
  margin: 0;
}
.professional-card h3 {
  font-size: 13px;
}
.professional-card p {
  color: var(--app-muted);
  font-size: 13px;
}
.budget-percent {
  color: var(--app-aqua);
  font-size: 13px;
  font-weight: 900;
}
.budget-percent.warning {
  color: var(--app-gold);
}
.pro-progress {
  height: 8px;
  margin: 16px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}
.pro-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--app-aqua), #4fd6c3);
}
.pro-progress.warning i {
  background: linear-gradient(90deg, var(--app-gold), #ef9437);
}
.professional-card-foot {
  display: flex;
  justify-content: space-between;
  color: var(--app-muted);
  font-size: 13px;
}

.debt-summary {
  grid-template-columns: repeat(3, 1fr);
}
.debt-summary > article {
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
}
.debt-symbol.receive {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.11);
}
.debt-symbol.pay {
  color: #ff978d;
  background: rgba(255, 151, 141, 0.11);
}
.debt-symbol.soon {
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.11);
}
.debt-summary p,
.debt-summary strong,
.debt-summary small {
  display: block;
  margin: 0;
}
.debt-summary p {
  color: var(--app-muted);
  font-size: 13px;
}
.debt-summary strong {
  margin-top: 3px;
  font-size: 14px;
}
.debt-summary small {
  color: var(--app-muted);
  font-size: 13px;
}
.debt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 12px;
}
.people-card,
.reminder-card {
  padding: 20px;
}
.section-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-card-title h3,
.section-card-title p {
  margin: 0;
}
.section-card-title h3 {
  font-size: 14px;
}
.section-card-title p {
  color: var(--app-muted);
  font-size: 13px;
}
.filter-tabs.compact button {
  padding: 5px 9px;
}
.debt-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 0.7fr 0.6fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--app-border);
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.person-avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(155, 124, 255, 0.13);
  color: #c8bbff;
  font-size: 13px;
  font-weight: 900;
}
.person-cell b,
.person-cell small {
  display: block;
}
.person-cell b {
  font-size: 13px;
}
.person-cell small,
.debt-row > span {
  color: var(--app-muted);
  font-size: 13px;
}
.debt-row > strong {
  font-size: 13px;
}
.status-chip {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.status-chip.receivable {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.09);
}
.status-chip.payable {
  color: #ff9e94;
  background: rgba(255, 151, 141, 0.09);
}
.reminder-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: linear-gradient(
    145deg,
    rgba(245, 212, 119, 0.095),
    rgba(5, 26, 33, 0.78)
  );
}
.reminder-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.12);
}
.reminder-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.reminder-card p {
  margin: 16px 0 0;
  color: var(--app-muted);
  font-size: 13px;
}
.reminder-card h3 {
  margin: 3px 0;
  font-size: 15px;
}
.reminder-card strong {
  color: var(--app-gold);
  font-size: 17px;
}
.reminder-card button {
  width: 100%;
  margin-top: 17px;
  padding: 9px;
  border: 1px solid rgba(245, 212, 119, 0.2);
  border-radius: 9px;
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.07);
  font-weight: 800;
  cursor: pointer;
}
.reminder-card small {
  display: block;
  margin-top: 12px;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.8;
}

.report-kpis {
  grid-template-columns: repeat(4, 1fr);
}
.report-kpis > article {
  padding: 16px;
}
.report-kpis p,
.report-kpis strong,
.report-kpis span {
  display: block;
  margin: 0;
}
.report-kpis p {
  color: var(--app-muted);
  font-size: 13px;
}
.report-kpis strong {
  margin-top: 4px;
  font-size: 16px;
}
.report-kpis span {
  margin-top: 4px;
  color: var(--app-muted);
  font-size: 13px;
}
.page-actions select {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
}
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 12px;
}
.analytics-card {
  padding: 20px;
}
.analytics-card.wide {
  min-height: 345px;
}
.chart-legend {
  display: flex;
  gap: 12px;
  color: var(--app-muted);
  font-size: 13px;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.chart-legend i.income {
  background: var(--app-aqua);
}
.chart-legend i.expense {
  background: var(--app-gold);
}
.bar-chart {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 16px;
  padding-top: 20px;
  border-bottom: 1px solid var(--app-border);
  background-image: linear-gradient(
    rgba(202, 255, 244, 0.06) 1px,
    transparent 1px
  );
  background-size: 100% 25%;
}
.bar-chart > div {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.bar-chart span {
  width: 28px;
  height: 82%;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.bar-chart span::before,
.bar-chart span::after {
  content: "";
  width: 12px;
  border-radius: 5px 5px 1px 1px;
}
.bar-chart span::before {
  height: var(--income);
  background: linear-gradient(var(--app-aqua-bright), var(--app-aqua));
  box-shadow: 0 0 10px rgba(114, 244, 220, 0.18);
}
.bar-chart span::after {
  height: var(--expense);
  background: linear-gradient(var(--app-gold), #e89a3e);
}
.bar-chart b {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.donut-wrap {
  display: grid;
  place-items: center;
}
.donut {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    var(--app-aqua) 0 32%,
    #9d83ff 32% 57%,
    var(--app-gold) 57% 75%,
    #ec7c76 75% 100%
  );
  position: relative;
  box-shadow: 0 0 30px rgba(114, 244, 220, 0.08);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 23px;
  border-radius: inherit;
  background: #0b2b32;
}
.donut span {
  position: relative;
  z-index: 1;
  text-align: center;
}
.donut b,
.donut small {
  display: block;
}
.donut b {
  font-size: 22px;
}
.donut small {
  color: var(--app-muted);
  font-size: 13px;
}
.donut-wrap ul {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.donut-wrap li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
}
.donut-wrap li i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.donut-wrap li .food {
  background: var(--app-aqua);
}
.donut-wrap li .fun {
  background: #9d83ff;
}
.donut-wrap li .transport {
  background: var(--app-gold);
}
.donut-wrap li .bills {
  background: #ec7c76;
}
.donut-wrap li span {
  color: var(--app-muted);
}
.insight-pro {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(
    135deg,
    rgba(114, 244, 220, 0.09),
    rgba(155, 124, 255, 0.06)
  );
}
.insight-pro > span {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.11);
}
.insight-pro p,
.insight-pro h3,
.insight-pro small {
  display: block;
  margin: 0;
}
.insight-pro p {
  color: var(--app-aqua);
  font-size: 13px;
}
.insight-pro h3 {
  margin-top: 2px;
  font-size: 13px;
}
.insight-pro small {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 13px;
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-card {
  padding: 20px;
}
.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.settings-form label {
  color: var(--app-muted);
  font-size: 13px;
}
.settings-form input,
.settings-form select {
  width: 100%;
  height: 43px;
  margin-top: 6px;
  padding: 0 11px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
}
.settings-form input[readonly] {
  opacity: 0.65;
}
.toggle-list label {
  min-height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--app-border);
  cursor: pointer;
}
.toggle-list b,
.toggle-list small {
  display: block;
}
.toggle-list b {
  font-size: 13px;
}
.toggle-list small {
  color: var(--app-muted);
  font-size: 13px;
}
.toggle-list input {
  appearance: none;
  width: 39px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}
.toggle-list input::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px;
  right: 3px;
  border-radius: 50%;
  background: #a2b6b4;
  transition: 0.2s;
}
.toggle-list input:checked {
  background: var(--app-aqua);
}
.toggle-list input:checked::after {
  right: 20px;
  background: #06242a;
}
.compact-dialog {
  max-width: 440px;
}
.empty-row {
  padding: 30px;
  text-align: center;
  color: var(--app-muted);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .kpi-strip,
  .report-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .debt-layout,
  .report-grid {
    grid-template-columns: 1fr;
  }
  .reminder-card {
    min-height: 220px;
  }
}
@media (max-width: 720px) {
  .kpi-strip,
  .summary-row,
  .budget-overview,
  .professional-grid,
  .debt-summary,
  .report-kpis,
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-card {
    min-height: 100px;
    padding: 13px;
  }
  .kpi-icon {
    width: 37px;
    height: 37px;
  }
  .page-title {
    align-items: flex-start;
    gap: 12px;
  }
  .page-title > div > span {
    display: none;
  }
  .page-actions {
    align-items: stretch;
  }
  .secondary-small {
    padding-inline: 10px;
  }
  .debt-row {
    grid-template-columns: minmax(130px, 1fr) auto;
  }
  .debt-row > span,
  .debt-row > .status-chip {
    display: none;
  }
  .bar-chart {
    gap: 6px;
  }
  .bar-chart span {
    width: 22px;
    gap: 3px;
  }
  .bar-chart span::before,
  .bar-chart span::after {
    width: 9px;
  }
  .settings-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 390px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }
  .page-title {
    flex-direction: column;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions > * {
    flex: 1;
  }
}

/* === Voice login scene === */
/* Voice-first authentication experience */
.auth-shell {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  overflow: hidden;
}
.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
}
.auth-shell::before {
  width: 520px;
  height: 520px;
  right: -210px;
  top: -250px;
  background: rgba(114, 244, 220, 0.11);
}
.auth-shell::after {
  width: 460px;
  height: 460px;
  left: -190px;
  bottom: -220px;
  background: rgba(155, 124, 255, 0.1);
}
.auth-brand {
  min-height: 100dvh;
  padding: 30px clamp(28px, 5vw, 74px);
}
.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(187, 255, 242, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(187, 255, 242, 0.14) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(65% 52% at 48% 48%, #000, transparent);
  mask-image: radial-gradient(65% 52% at 48% 48%, #000, transparent);
}
.auth-logo {
  position: relative;
  z-index: 5;
}
.auth-logo img {
  animation: auth-logo-breathe 3s ease-in-out infinite;
}
.auth-brand-wave {
  height: 20px;
  display: inline-flex;
  direction: ltr;
  align-items: center;
  gap: 2px;
  margin-right: 7px;
}
.auth-brand-wave i {
  width: 2px;
  height: 6px;
  border-radius: 9px;
  background: var(--app-aqua);
  box-shadow: 0 0 8px var(--app-aqua);
  animation: auth-mini-wave 1s ease-in-out infinite;
}
.auth-brand-wave i:nth-child(2) {
  animation-delay: -0.5s;
}
.auth-brand-wave i:nth-child(3) {
  animation-delay: -0.25s;
}
.auth-brand-wave i:nth-child(4) {
  animation-delay: -0.7s;
}
.auth-message {
  width: min(100%, 610px);
  margin-top: clamp(42px, 8vh, 95px);
}
.auth-message .eyebrow {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}
.auth-message .eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-aqua);
  box-shadow:
    0 0 0 5px rgba(114, 244, 220, 0.1),
    0 0 14px var(--app-aqua);
}
.auth-message h1 {
  font-size: clamp(43px, 5vw, 72px);
  line-height: 1.2;
}
.auth-message h1 em {
  display: inline-block;
  position: relative;
  color: transparent;
  font-style: normal;
  background: linear-gradient(
    105deg,
    var(--app-aqua-bright),
    var(--app-aqua),
    var(--app-gold)
  );
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: auth-sheen 5s ease-in-out infinite;
}
.auth-message h1 em::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 100%;
  background: linear-gradient(90deg, transparent, var(--app-aqua), transparent);
  box-shadow: 0 3px 15px rgba(114, 244, 220, 0.42);
}
.auth-message > p:last-child {
  margin-top: 18px;
  max-width: 510px;
  font-size: 14px;
}

.login-voice-scene {
  width: min(100%, 660px);
  height: 310px;
  margin-top: auto;
  position: relative;
  z-index: 3;
  perspective: 900px;
}
.login-orbit {
  position: absolute;
  inset: 20px 18%;
  border: 1px solid rgba(114, 244, 220, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 45px rgba(114, 244, 220, 0.02),
    0 0 0 90px rgba(114, 244, 220, 0.012);
}
.login-orbit.orbit-b {
  inset: 62px 29%;
  border-color: rgba(155, 124, 255, 0.14);
}
.login-voice-core {
  width: 116px;
  height: 116px;
  position: absolute;
  top: 98px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 25%,
    #d8fff8,
    var(--app-aqua) 40%,
    #25ae9f 100%
  );
  box-shadow:
    0 0 0 13px rgba(114, 244, 220, 0.055),
    0 0 60px rgba(114, 244, 220, 0.3),
    inset 0 1px 4px rgba(255, 255, 255, 0.75);
  animation: auth-core-float 4s ease-in-out infinite;
}
.login-voice-core::before,
.login-voice-core::after {
  content: "";
  position: absolute;
  inset: -25px;
  border: 1px solid rgba(114, 244, 220, 0.2);
  border-radius: 50%;
  animation: auth-listen-ring 2.8s ease-out infinite;
}
.login-voice-core::after {
  animation-delay: -1.35s;
}
.login-voice-core span {
  width: 3px;
  height: 21px;
  border-radius: 9px;
  background: #07343a;
  animation: auth-voice-wave 0.8s ease-in-out infinite alternate;
}
.login-voice-core span:nth-child(2),
.login-voice-core span:nth-child(5) {
  height: 42px;
  animation-delay: -0.5s;
}
.login-voice-core span:nth-child(3),
.login-voice-core span:nth-child(4) {
  height: 57px;
  animation-delay: -0.25s;
}
.login-voice-core span:nth-child(6) {
  animation-delay: -0.68s;
}
.login-float-card {
  position: absolute;
  padding: 13px 15px;
  border: 1px solid var(--app-border);
  border-radius: 15px;
  background: linear-gradient(
    145deg,
    rgba(24, 69, 76, 0.8),
    rgba(6, 28, 35, 0.82)
  );
  box-shadow:
    var(--app-shadow),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}
.login-float-card > span {
  color: var(--app-muted);
  font-size: 9px;
}
.login-float-card p {
  margin: 4px 0 0;
  color: var(--app-text);
  font-size: 11px;
  font-weight: 700;
}
.heard-card {
  width: 245px;
  right: 0;
  top: 18px;
  transform: rotate(2deg);
  animation: auth-card-float 6.5s ease-in-out infinite;
}
.heard-card > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.heard-card i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-aqua);
  box-shadow: 0 0 10px var(--app-aqua);
}
.result-card {
  width: 235px;
  left: 0;
  bottom: 18px;
  transform: rotate(-2deg);
  animation: auth-card-float 7.5s ease-in-out -0.8s infinite reverse;
}
.result-card > span {
  display: flex;
  justify-content: space-between;
}
.result-card > span b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #063039;
  background: var(--app-aqua);
}
.result-card p {
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.result-card p strong,
.result-card p small {
  display: block;
}
.result-card p small {
  color: var(--app-aqua);
  font-size: 9px;
}
.insight-card-auth {
  right: 7%;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: auth-card-float 8s ease-in-out -1.7s infinite;
}
.insight-card-auth strong {
  color: var(--app-gold);
  font-size: 11px;
}

.auth-panel {
  min-height: 100dvh;
  padding: 28px clamp(28px, 5vw, 70px);
  position: relative;
}
.back-site {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 3;
}
.auth-form-wrap {
  width: min(100%, 455px);
  margin: auto;
  padding: clamp(28px, 4vw, 42px);
  position: relative;
  border: 1px solid var(--app-border);
  border-radius: 28px;
  background: linear-gradient(
    145deg,
    rgba(21, 61, 69, 0.72),
    rgba(5, 25, 32, 0.78)
  );
  box-shadow:
    var(--app-shadow),
    0 0 0 1px rgba(114, 244, 220, 0.04),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  animation: auth-form-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-form-wrap::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  top: -80px;
  right: -70px;
  border-radius: 50%;
  background: rgba(114, 244, 220, 0.08);
  filter: blur(48px);
  pointer-events: none;
}
.auth-form-mark {
  width: 52px;
  height: 52px;
  margin: 0 0 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  color: #062a31;
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: var(--app-glow);
}
.auth-form-mark span {
  width: 3px;
  height: 13px;
  border-radius: 7px;
  background: #06333a;
  animation: auth-voice-wave 0.85s ease-in-out infinite alternate;
}
.auth-form-mark span:nth-child(2) {
  height: 27px;
  animation-delay: -0.45s;
}
.auth-form-mark span:nth-child(3) {
  height: 20px;
  animation-delay: -0.2s;
}
.auth-form-mark span:nth-child(4) {
  animation-delay: -0.7s;
}
.auth-form-wrap h2 {
  font-size: 34px;
}
.auth-form-wrap form {
  animation: auth-content-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.phone-input,
.otp-input {
  border-radius: 14px;
  background: rgba(2, 18, 23, 0.46);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.phone-input:focus-within,
.otp-input:focus {
  border-color: rgba(114, 244, 220, 0.55);
  background: rgba(10, 40, 47, 0.72);
  box-shadow:
    0 0 0 4px rgba(114, 244, 220, 0.08),
    0 12px 35px -25px rgba(114, 244, 220, 0.55);
}
.primary-action {
  min-height: 54px;
  border-radius: 14px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}
.primary-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow:
    var(--app-glow),
    0 16px 35px -20px rgba(114, 244, 220, 0.7);
}
.primary-action:active {
  transform: scale(0.985);
}
.auth-trust {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--app-muted);
  font-size: 9px;
}
.auth-trust span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.auth-trust i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--app-aqua);
  box-shadow: 0 0 7px var(--app-aqua);
}
.auth-legal {
  position: relative;
  z-index: 2;
}

@keyframes auth-mini-wave {
  0%,
  100% {
    height: 6px;
    opacity: 0.55;
  }
  50% {
    height: 18px;
    opacity: 1;
  }
}
@keyframes auth-logo-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 18px rgba(114, 244, 220, 0.12));
  }
  50% {
    transform: scale(1.035);
    filter: drop-shadow(0 9px 28px rgba(114, 244, 220, 0.36));
  }
}
@keyframes auth-sheen {
  0%,
  100% {
    background-position: 160% 50%;
  }
  50% {
    background-position: -20% 50%;
  }
}
@keyframes auth-core-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}
@keyframes auth-listen-ring {
  from {
    transform: scale(0.68);
    opacity: 0.8;
  }
  to {
    transform: scale(1.25);
    opacity: 0;
  }
}
@keyframes auth-voice-wave {
  from {
    transform: scaleY(0.42);
    opacity: 0.65;
  }
  to {
    transform: scaleY(1.08);
    opacity: 1;
  }
}
@keyframes auth-card-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}
@keyframes auth-form-enter {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@keyframes auth-content-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr 1fr;
  }
  .auth-brand {
    padding-inline: 30px;
  }
  .auth-message h1 {
    font-size: 48px;
  }
  .login-voice-scene {
    height: 280px;
  }
  .heard-card {
    width: 210px;
  }
  .result-card {
    width: 205px;
  }
  .insight-card-auth {
    display: none;
  }
  .auth-panel {
    padding-inline: 24px;
  }
  .auth-form-wrap {
    padding: 30px 25px;
  }
}
@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }
  .auth-shell {
    display: block;
    overflow-x: clip;
    overflow-y: visible;
  }
  .auth-brand {
    min-height: 420px;
    padding: 22px 20px 0;
    border-left: 0;
    border-bottom: 1px solid var(--app-border);
  }
  .auth-logo img {
    width: 74px;
    height: 57px;
  }
  .auth-message {
    margin-top: 20px;
    text-align: center;
  }
  .auth-message .eyebrow {
    margin-inline: auto;
  }
  .auth-message h1 {
    font-size: 38px;
  }
  .auth-message > p:last-child {
    max-width: 360px;
    margin-inline: auto;
    font-size: 12px;
  }
  .login-voice-scene {
    height: 150px;
    margin: 8px auto 0;
  }
  .login-orbit {
    inset: 5px 24%;
  }
  .login-orbit.orbit-b {
    inset: 27px 34%;
  }
  .login-voice-core {
    width: 78px;
    height: 78px;
    top: 38px;
  }
  .login-voice-core span {
    height: 15px;
  }
  .login-voice-core span:nth-child(2),
  .login-voice-core span:nth-child(5) {
    height: 29px;
  }
  .login-voice-core span:nth-child(3),
  .login-voice-core span:nth-child(4) {
    height: 40px;
  }
  .heard-card {
    width: 174px;
    right: -6px;
    top: 2px;
    padding: 9px 10px;
  }
  .heard-card p {
    font-size: 8px;
  }
  .result-card {
    width: 168px;
    left: -5px;
    bottom: 2px;
    padding: 9px 10px;
  }
  .result-card p {
    font-size: 8px;
  }
  .result-card p small {
    font-size: 7px;
  }
  .auth-panel {
    min-height: 620px;
    padding: 20px 16px 28px;
  }
  .auth-form-wrap {
    margin: 35px auto 24px;
    padding: 28px 22px;
    border-radius: 23px;
  }
  .auth-form-mark {
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
  }
  .auth-form-wrap h2 {
    font-size: 30px;
  }
  .auth-legal {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 390px) {
  .auth-trust {
    gap: 10px;
    font-size: 8px;
  }
  .auth-message h1 {
    font-size: 34px;
  }
  .heard-card {
    right: -16px;
  }
  .result-card {
    left: -16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-logo img,
  .auth-brand-wave i,
  .auth-message h1 em,
  .login-voice-core,
  .login-voice-core::before,
  .login-voice-core::after,
  .login-voice-core span,
  .login-float-card,
  .auth-form-wrap,
  .auth-form-wrap form,
  .auth-form-mark span {
    animation: none;
  }
}

/* === Feature pages === */
/* Phase 2–4 product modules */
.sidebar {
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar {
  display: none;
}
.sidebar nav {
  flex: 0 0 auto;
}
.nav-section-label {
  display: block;
  padding: 16px 13px 5px;
  color: #668783;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.beta-pill {
  min-width: auto !important;
  height: auto !important;
  margin-right: auto !important;
  padding: 2px 5px;
  border-radius: 5px !important;
  color: var(--app-gold) !important;
  background: rgba(245, 212, 119, 0.1) !important;
  font-size: 13px !important;
}
.voice-quota {
  flex: 0 0 auto;
  margin-top: 18px;
}
.phase-mobile-switcher {
  display: none;
}

.phase-launcher {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.phase-launcher button {
  min-height: 76px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--app-border);
  border-radius: 15px;
  color: var(--app-text);
  background: linear-gradient(
    145deg,
    rgba(23, 66, 73, 0.58),
    rgba(5, 26, 33, 0.66)
  );
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: right;
  transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.phase-launcher button:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 244, 220, 0.28);
  background: linear-gradient(
    145deg,
    rgba(27, 78, 83, 0.68),
    rgba(6, 31, 38, 0.72)
  );
}
.phase-launcher button > span:nth-child(2) {
  display: grid;
}
.phase-launcher small {
  color: var(--app-muted);
  font-size: 13px;
}
.phase-launcher b {
  margin-top: 1px;
  font-size: 13px;
}
.phase-launcher i {
  margin-right: auto;
  color: var(--app-muted);
  font-style: normal;
}
.phase-orb {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}
.phase-orb.phase-two {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.11);
}
.phase-orb.phase-three {
  color: #baa9ff;
  background: rgba(155, 124, 255, 0.12);
}
.phase-orb.phase-four {
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.11);
}

.phase-page.active {
  display: block;
  animation: phase-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.phase-card,
.phase-kpis article,
.business-kpis article,
.automation-card,
.automation-hero,
.predictive-strip {
  border: 1px solid var(--app-border);
  border-radius: 17px;
  background: linear-gradient(
    145deg,
    rgba(23, 66, 73, 0.64),
    rgba(5, 26, 33, 0.74)
  );
  box-shadow:
    var(--app-shadow),
    inset 0 1px rgba(255, 255, 255, 0.04);
}
.phase-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}
.phase-kpis article {
  min-height: 105px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.phase-kpi-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.phase-kpi-icon svg,
.predictive-icon svg,
.auto-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.phase-kpi-icon.aqua,
.auto-icon.aqua {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.1);
}
.phase-kpi-icon.gold,
.auto-icon.gold {
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.1);
}
.phase-kpi-icon.violet,
.auto-icon.violet {
  color: #baa9ff;
  background: rgba(155, 124, 255, 0.12);
}
.phase-kpis p,
.phase-kpis strong,
.phase-kpis small {
  display: block;
  margin: 0;
}
.phase-kpis p {
  color: var(--app-muted);
  font-size: 13px;
}
.phase-kpis strong {
  margin-top: 2px;
  font-size: 15px;
}
.phase-kpis small {
  color: var(--app-muted);
  font-size: 13px;
}
.installment-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
}
.phase-card {
  padding: 20px;
}
.live-badge,
.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
}
.live-badge i,
.preview-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-aqua);
  box-shadow: 0 0 9px var(--app-aqua);
}
.installment-list {
  margin-top: 12px;
}
.installment-list > div {
  min-height: 69px;
  display: grid;
  grid-template-columns: 48px minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--app-border);
}
.due-date {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 10px;
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.09);
  line-height: 1.2;
}
.due-date.warning {
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.1);
}
.due-date b {
  font-size: 13px;
}
.due-date small {
  font-size: 13px;
}
.installment-list > div > span:nth-child(2) {
  display: grid;
}
.installment-list > div > span b {
  font-size: 13px;
}
.installment-list > div > span small {
  color: var(--app-muted);
  font-size: 13px;
}
.installment-list > div > strong {
  font-size: 13px;
}
.installment-list button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid rgba(114, 244, 220, 0.2);
  border-radius: 8px;
  color: #06242a;
  background: var(--app-aqua);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.installment-list button.quiet-action {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.06);
}
.currency-card {
  overflow: hidden;
}
.mini-more {
  width: 36px;
  height: 36px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}
.currency-total {
  padding: 18px 0 14px;
}
.currency-total small,
.currency-total strong {
  display: block;
}
.currency-total small {
  color: var(--app-muted);
  font-size: 13px;
}
.currency-total strong {
  margin-top: 3px;
  font-size: 22px;
}
.currency-total em {
  color: var(--app-muted);
  font-size: 13px;
  font-style: normal;
}
.currency-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: rgba(2, 18, 23, 0.35);
}
.currency-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: var(--app-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.currency-switch button.active {
  color: #06242a;
  background: var(--app-aqua);
}
.currency-balance {
  min-height: 107px;
  padding: 18px 3px 12px;
  display: grid;
  align-content: center;
}
.currency-balance span,
.currency-balance strong,
.currency-balance small {
  display: block;
}
.currency-balance span {
  color: var(--app-muted);
  font-size: 13px;
}
.currency-balance strong {
  margin-top: 1px;
  font-size: 24px;
}
.currency-balance small {
  color: var(--app-muted);
  font-size: 13px;
}
.rate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.rate-row span {
  padding: 9px;
  display: grid;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--app-muted);
  font-size: 13px;
}
.rate-row b {
  color: var(--app-text);
  font-size: 13px;
}
.predictive-strip {
  margin-top: 12px;
  padding: 17px 19px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 14px;
  background: linear-gradient(
    135deg,
    rgba(155, 124, 255, 0.09),
    rgba(245, 212, 119, 0.055)
  );
}
.predictive-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #baa9ff;
  background: rgba(155, 124, 255, 0.12);
}
.predictive-strip p,
.predictive-strip h3,
.predictive-strip small {
  display: block;
  margin: 0;
}
.predictive-strip p {
  color: #baa9ff;
  font-size: 13px;
}
.predictive-strip h3 {
  margin-top: 1px;
  font-size: 13px;
}
.predictive-strip small {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 13px;
}
.risk-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}
.risk-meter::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}
.risk-meter i {
  grid-column: 1;
  grid-row: 1;
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--app-gold), #ef7f68);
  box-shadow: 0 0 12px rgba(245, 212, 119, 0.22);
}
.risk-meter small {
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}

.business-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.business-kpis article {
  min-height: 119px;
  padding: 16px;
  overflow: hidden;
  position: relative;
}
.business-kpis p,
.business-kpis strong,
.business-kpis span {
  display: block;
  margin: 0;
  position: relative;
  z-index: 1;
}
.business-kpis p {
  color: var(--app-muted);
  font-size: 13px;
}
.business-kpis strong {
  margin-top: 5px;
  font-size: 16px;
}
.business-kpis strong small {
  color: var(--app-muted);
  font-size: 13px;
}
.business-kpis span {
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 13px;
}
.sparkline {
  position: absolute;
  right: 15px;
  left: 15px;
  bottom: 0;
  height: 28px;
  opacity: 0.25;
  -webkit-mask: linear-gradient(
    135deg,
    transparent 0 10%,
    #000 11% 18%,
    transparent 19% 29%,
    #000 30% 42%,
    transparent 43% 52%,
    #000 53% 67%,
    transparent 68% 76%,
    #000 77%
  );
  mask: linear-gradient(
    135deg,
    transparent 0 10%,
    #000 11% 18%,
    transparent 19% 29%,
    #000 30% 42%,
    transparent 43% 52%,
    #000 53% 67%,
    transparent 68% 76%,
    #000 77%
  );
}
.sparkline.aqua-line {
  background: var(--app-aqua);
}
.sparkline.violet-line {
  background: #9b7cff;
}
.sparkline.gold-line {
  background: var(--app-gold);
}
.business-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
}
.sales-pulse {
  min-height: 310px;
}
.sales-bars {
  height: 225px;
  padding: 25px 8px 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--app-border);
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px
  );
  background-size: 100% 25%;
}
.sales-bars > span {
  height: 100%;
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 3px;
}
.sales-bars > span::before,
.sales-bars > span::after {
  content: "";
  width: 10px;
  border-radius: 4px 4px 1px 1px;
}
.sales-bars > span::before {
  height: var(--sale);
  background: linear-gradient(
    to top,
    rgba(114, 244, 220, 0.24),
    var(--app-aqua)
  );
  box-shadow: 0 0 10px rgba(114, 244, 220, 0.14);
}
.sales-bars > span::after {
  height: var(--credit);
  background: linear-gradient(to top, rgba(155, 124, 255, 0.22), #9b7cff);
}
.sales-bars b {
  position: absolute;
  bottom: -21px;
  color: var(--app-muted);
  font-size: 13px;
}
.stock-alerts {
  min-height: 310px;
}
.alert-count {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.1);
  font-size: 13px;
  font-weight: 900;
}
.stock-alerts > div:not(.section-card-title) {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--app-border);
}
.stock-thumb {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}
.stock-thumb.aqua {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.1);
}
.stock-thumb.gold {
  color: var(--app-gold);
  background: rgba(245, 212, 119, 0.1);
}
.stock-thumb.violet {
  color: #baa9ff;
  background: rgba(155, 124, 255, 0.11);
}
.stock-alerts p {
  display: grid;
  margin: 0;
}
.stock-alerts b {
  font-size: 13px;
}
.stock-alerts small {
  color: var(--app-muted);
  font-size: 13px;
}
.stock-alerts div > strong {
  margin-right: auto;
  color: var(--app-gold);
  font-size: 13px;
}
.business-lower {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 12px;
  margin-top: 12px;
}
.ledger-head,
.ledger-row {
  display: grid;
  grid-template-columns: 1.2fr 0.55fr 0.7fr 0.8fr;
  align-items: center;
  gap: 10px;
}
.ledger-head {
  padding: 12px 0;
  color: var(--app-muted);
  border-bottom: 1px solid var(--app-border);
  font-size: 13px;
}
.ledger-row {
  min-height: 55px;
  border-bottom: 1px solid var(--app-border);
}
.ledger-row:last-child {
  border-bottom: 0;
}
.ledger-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.ledger-row i,
.team-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.1);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}
.ledger-row b,
.ledger-row strong {
  font-size: 13px;
}
.ledger-row small {
  color: var(--app-muted);
  font-size: 13px;
}
.ledger-row em {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-style: normal;
}
.ledger-row em.receive {
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.09);
}
.ledger-row em.pay {
  color: #ff978d;
  background: rgba(255, 151, 141, 0.09);
}
.team-card > div:not(.section-card-title) {
  min-height: 63px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--app-border);
}
.team-avatar.purple {
  color: #baa9ff;
  background: rgba(155, 124, 255, 0.11);
}
.team-card p {
  display: grid;
  margin: 0;
}
.team-card b {
  font-size: 13px;
}
.team-card small {
  color: var(--app-muted);
  font-size: 13px;
}
.team-card em {
  margin-right: auto;
  color: var(--app-muted);
  font-size: 13px;
  font-style: normal;
}
.team-card .privacy-note {
  display: block;
  padding-top: 10px;
  line-height: 1.7;
}

.preview-badge {
  color: var(--app-aqua);
}
.automation-hero {
  min-height: 250px;
  padding: 23px;
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      28rem 18rem at 75% 55%,
      rgba(114, 244, 220, 0.1),
      transparent 70%
    ),
    linear-gradient(145deg, rgba(23, 66, 73, 0.7), rgba(5, 26, 33, 0.78));
}
.automation-hero p,
.automation-hero h3,
.automation-hero span {
  display: block;
  margin: 0;
}
.automation-hero p {
  color: var(--app-aqua);
  font-size: 13px;
}
.automation-hero h3 {
  margin-top: 4px;
  font-size: 19px;
}
.automation-hero h3 strong {
  color: var(--app-aqua);
}
.automation-hero > div:first-child > span {
  margin-top: 10px;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.8;
}
.forecast-chart {
  height: 190px;
  position: relative;
}
.forecast-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.forecast-area {
  fill: url(#forecast-fill);
}
.forecast-line {
  fill: none;
  stroke: rgba(114, 244, 220, 0.28);
  stroke-width: 2;
}
.forecast-dashed {
  fill: none;
  stroke: var(--app-aqua);
  stroke-width: 3;
  stroke-dasharray: 7 7;
  filter: drop-shadow(0 0 6px rgba(114, 244, 220, 0.35));
  animation: forecast-flow 8s linear infinite;
}
.forecast-now {
  position: absolute;
  right: 47%;
  bottom: 5px;
  color: var(--app-muted) !important;
  font-size: 13px !important;
}
.automation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.automation-card {
  min-height: 300px;
  padding: 20px;
}
.auto-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.automation-card > p,
.automation-card > h3 {
  display: block;
  margin: 0;
}
.automation-card > p {
  margin-top: 14px;
  color: var(--app-aqua);
  font-size: 13px;
}
.automation-card > h3 {
  margin-top: 3px;
  font-size: 13px;
}
.automation-card > button {
  width: 100%;
  min-height: 42px;
  margin-top: 13px;
  border: 1px solid rgba(114, 244, 220, 0.18);
  border-radius: 10px;
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.06);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.automation-card > button.is-processing {
  color: var(--app-gold);
  border-color: rgba(245, 212, 119, 0.18);
}
.scan-preview,
.sms-preview {
  min-height: 100px;
  margin-top: 15px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: rgba(2, 18, 23, 0.34);
}
.scan-paper {
  width: 59px;
  height: 75px;
  padding: 11px 8px;
  flex: 0 0 auto;
  display: grid;
  align-content: start;
  gap: 6px;
  position: relative;
  border-radius: 4px;
  background: #d9ebe7;
  transform: rotate(-3deg);
  overflow: hidden;
}
.scan-paper i {
  height: 2px;
  border-radius: 3px;
  background: #6e8d88;
}
.scan-paper i:nth-child(2) {
  width: 75%;
}
.scan-paper i:nth-child(3) {
  width: 88%;
}
.scan-paper b {
  position: absolute;
  right: 0;
  left: 0;
  height: 2px;
  top: 0;
  background: var(--app-aqua);
  box-shadow: 0 0 12px var(--app-aqua);
  animation: scan-line 2.5s ease-in-out infinite;
}
.scan-preview > span:last-child {
  display: grid;
}
.scan-preview b {
  font-size: 13px;
}
.scan-preview small {
  color: var(--app-muted);
  font-size: 13px;
}
.scan-preview em {
  width: fit-content;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 5px;
  color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.08);
  font-size: 13px;
  font-style: normal;
}
.sms-preview {
  display: block;
}
.sms-preview > span {
  color: var(--app-aqua);
  font-size: 13px;
}
.sms-preview p {
  margin: 6px 0 3px;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.8;
}
.sms-preview p b {
  color: var(--app-text);
}
.sms-preview small {
  color: #6b8985;
  font-size: 13px;
}
.wide-auto {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  grid-template-columns: 43px 0.6fr 1.4fr;
  align-items: center;
  gap: 14px;
}
.wide-auto > div:nth-child(2) p {
  margin: 0;
  color: var(--app-gold);
  font-size: 13px;
}
.wide-auto > div:nth-child(2) h3 {
  margin: 3px 0 0;
  font-size: 13px;
}
.product-analysis {
  display: grid;
  gap: 12px;
}
.product-analysis span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
}
.product-analysis b {
  font-size: 13px;
}
.product-analysis small {
  color: var(--app-muted);
  font-size: 13px;
}
.product-analysis i {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 99px;
  background: var(--app-aqua);
  box-shadow: 0 0 10px rgba(114, 244, 220, 0.2);
}
.product-analysis i.slow {
  background: var(--app-gold);
}

@keyframes phase-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@keyframes forecast-flow {
  to {
    stroke-dashoffset: -140;
  }
}
@keyframes scan-line {
  0%,
  100% {
    top: 5px;
  }
  50% {
    top: 68px;
  }
}

@media (max-width: 1180px) {
  .business-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .installment-layout,
  .business-layout,
  .business-lower {
    grid-template-columns: 1fr;
  }
  .wide-auto {
    grid-template-columns: 43px 1fr;
  }
  .wide-auto .product-analysis {
    grid-column: 1/-1;
  }
}
@media (max-width: 900px) {
  .phase-launcher {
    grid-template-columns: 1fr;
  }
  .phase-kpis {
    grid-template-columns: 1fr;
  }
  .automation-hero {
    grid-template-columns: 1fr;
  }
  .forecast-chart {
    height: 150px;
  }
}
@media (max-width: 720px) {
  .nav-section-label {
    display: none;
  }
  .phase-mobile-switcher {
    margin: 0 0 16px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: rgba(4, 22, 28, 0.62);
  }
  .phase-mobile-switcher button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    color: var(--app-muted);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
  }
  .phase-mobile-switcher button.active {
    color: #06242a;
    background: var(--app-aqua);
  }
  .phase-launcher {
    grid-template-columns: 1fr 1fr;
  }
  .phase-launcher button:last-child {
    grid-column: 1/-1;
  }
  .phase-kpis,
  .business-kpis,
  .automation-grid {
    grid-template-columns: 1fr;
  }
  .installment-list > div {
    grid-template-columns: 45px minmax(110px, 1fr) auto;
  }
  .installment-list > div > strong {
    display: none;
  }
  .installment-list button {
    max-width: 92px;
  }
  .predictive-strip {
    grid-template-columns: 42px 1fr;
  }
  .risk-meter {
    grid-column: 1/-1;
  }
  .automation-hero {
    padding: 18px;
  }
  .wide-auto {
    grid-column: auto;
    display: block;
  }
  .wide-auto > .auto-icon {
    margin-bottom: 12px;
  }
  .wide-auto .product-analysis {
    margin-top: 18px;
  }
  .ledger-head {
    display: none;
  }
  .ledger-row {
    grid-template-columns: 1fr auto;
  }
  .ledger-row > small,
  .ledger-row > em {
    display: none;
  }
  .team-card em {
    display: none;
  }
}
@media (max-width: 420px) {
  .phase-launcher {
    grid-template-columns: 1fr;
  }
  .phase-launcher button:last-child {
    grid-column: auto;
  }
  .business-kpis {
    grid-template-columns: 1fr;
  }
  .installment-list > div {
    gap: 7px;
  }
  .installment-list button {
    font-size: 13px;
    padding-inline: 6px;
  }
  .currency-total strong {
    font-size: 20px;
  }
  .automation-hero h3 {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .phase-page.active,
  .forecast-dashed,
  .scan-paper b {
    animation: none;
  }
}

/* Comfortable pointer and touch targets */
.installment-list button,
.currency-switch button,
.automation-card > button {
  min-height: 44px;
}
.mini-more {
  width: 44px;
  height: 44px;
}
@media (max-width: 720px) {
  .phase-mobile-switcher button {
    min-height: 44px;
  }
}

/* === Compact panel layout === */
/* Calm daily workspace; secondary information is disclosed, never discarded. */
.dashboard {
  --panel-calm: #0b252d;
  --panel-line: rgba(202, 255, 244, 0.1);
}
.dashboard .sidebar {
  background: #092129;
  backdrop-filter: none;
  box-shadow: none;
}
.dashboard .topbar {
  background: rgba(5, 24, 30, 0.96);
  backdrop-filter: none;
}
.sidebar nav {
  gap: 8px;
}
.sidebar .nav-item {
  font-size: 13px;
  min-height: 46px;
}
.nav-group {
  border-block: 1px solid var(--panel-line);
  padding-block: 5px;
}
.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 8px 13px;
  cursor: pointer;
  list-style: none;
  color: var(--app-muted);
  font-size: 13px;
}
.nav-group summary::-webkit-details-marker,
.overview-details summary::-webkit-details-marker {
  display: none;
}
.nav-group summary > span {
  transition: transform 0.18s ease;
}
.nav-group[open] summary > span {
  transform: rotate(180deg);
}
.nav-group.has-active summary {
  color: var(--app-aqua);
}
.nav-group .nav-item {
  width: 100%;
  padding-inline-start: 20px;
}
.nav-group .nav-item b,
.nav-group .beta-pill {
  display: none;
}
.nav-group summary:hover {
  color: var(--app-text);
}
#dashboard-main {
  max-width: 1440px;
  margin-inline: auto;
  padding-top: 28px;
}
.overview-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: stretch;
}
.overview-intro {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 4px;
}
.overview-intro p {
  margin: 0 0 5px;
  font-size: 13px;
  color: var(--app-muted);
}
.overview-intro h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
.quiet-tools {
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  color: var(--app-text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.quiet-tools:hover {
  border-color: var(--app-aqua);
  background: rgba(114, 244, 220, 0.05);
}
.quiet-tools span {
  margin-inline-start: 14px;
  color: var(--app-aqua);
}
.overview-grid > .balance-card,
.overview-grid > .quick-add-card,
.overview-grid > .transactions-card {
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
  background: var(--panel-calm);
  border-color: var(--panel-line);
}
.overview-grid > .balance-card {
  min-height: 300px;
  padding: 24px;
}
.overview-grid > .balance-card::after {
  display: none;
}
.overview-grid .balance-top h2 {
  font-size: clamp(24px, 2.8vw, 34px);
}
.overview-grid .flow-chart {
  height: 120px;
  margin-top: 18px;
}
.overview-grid .flow-chart > svg {
  height: 94px;
}
.overview-grid > .quick-add-card {
  min-height: 0;
  padding: 24px;
  background: linear-gradient(145deg, #10383f, #0b252d);
}
.overview-grid .card-heading h2 {
  font-size: 21px;
}
.overview-grid .voice-action {
  margin-top: 24px;
}
.overview-grid > .transactions-card {
  grid-column: 1/-1;
  padding: 24px;
}
.overview-grid .transaction-row {
  min-height: 64px;
}
.overview-details {
  grid-column: 1/-1;
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: rgba(11, 37, 45, 0.55);
}
.overview-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  min-height: 76px;
  cursor: pointer;
  list-style: none;
}
.overview-details summary b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.overview-details summary small {
  display: block;
  margin-top: 5px;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.8;
}
.disclosure-label {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--app-aqua);
  font-size: 13px;
  white-space: nowrap;
}
.disclosure-label i {
  font-style: normal;
  transition: transform 0.18s ease;
}
.overview-details[open] .disclosure-label i {
  transform: rotate(180deg);
}
.overview-extra {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.overview-extra .kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.overview-extra .kpi-card {
  box-shadow: none;
  background: transparent;
  padding: 16px 12px;
}
.overview-extra .kpi-icon {
  display: none;
}
.overview-extra .budget-card {
  grid-column: 1;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}
.overview-extra .insight-card {
  grid-column: 2;
  align-items: flex-start;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
  padding: 22px;
}
.overview-extra .insight-card h3 {
  line-height: 1.9;
}
.overview-extra .insight-card small {
  font-size: 13px;
  line-height: 1.9;
  display: block;
}
.tools-directory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.tools-directory > section {
  min-width: 0;
}
.tools-directory h3 {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--app-muted);
  font-weight: 500;
}
.tools-directory button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
  width: 100%;
  padding: 20px;
  margin-bottom: 12px;
  text-align: start;
  font: inherit;
  color: var(--app-text);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  background: var(--panel-calm);
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s;
}
.tools-directory button::after {
  content: "←";
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  color: var(--app-aqua);
}
.tools-directory b {
  font-size: 15px;
  font-weight: 600;
}
.tools-directory button span {
  grid-column: 1;
  font-size: 13px;
  line-height: 1.8;
  color: var(--app-muted);
}
.tools-directory button:hover {
  border-color: rgba(114, 244, 220, 0.4);
  background: #10343c;
}
.dashboard :is(button, summary):focus-visible {
  outline: 2px solid var(--app-aqua);
  outline-offset: 4px;
}
.dashboard :is(button, summary) {
  touch-action: manipulation;
  scroll-margin-block: 100px;
}
.dashboard .phase-page .page-title p {
  color: var(--app-muted);
}
@media (min-width: 721px) and (max-width: 1100px) {
  .dashboard {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar .nav-item {
    justify-content: flex-start;
    padding-inline: 12px;
  }
  .sidebar .nav-item span,
  .sidebar .side-brand span {
    display: inline;
  }
  .sidebar .voice-quota {
    display: block;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-extra .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  #dashboard-main {
    padding: 22px 16px 32px;
  }
  .dashboard {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #092129;
    backdrop-filter: none;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .overview-intro h2 {
    font-size: 20px;
  }
  .overview-intro p {
    font-size: 13px;
  }
  .quiet-tools {
    padding: 9px 10px;
    font-size: 13px;
  }
  .quiet-tools span {
    margin-inline-start: 5px;
  }
  .overview-grid > .balance-card {
    min-height: 280px;
    padding: 20px;
  }
  .overview-grid > .quick-add-card,
  .overview-grid > .transactions-card {
    padding: 20px;
  }
  .overview-grid .voice-action {
    margin-top: 18px;
  }
  .overview-details > summary {
    padding: 16px;
    gap: 8px;
  }
  .overview-details summary small {
    font-size: 13px;
  }
  .overview-extra {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
    gap: 14px;
  }
  .overview-extra .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-extra .budget-card,
  .overview-extra .insight-card {
    grid-column: 1;
  }
  .overview-extra .kpi-card {
    padding: 12px 8px;
  }
  .overview-extra .kpi-card strong {
    font-size: 18px;
  }
  .tools-directory {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard *,
  .dashboard *::before,
  .dashboard *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* === Connected data, CRUD and accessibility === */
.mode-notice,
.connection-note {
  padding: 12px 18px;
  color: var(--app-muted, #9cb8b5);
  background: #0b252d;
  border: 1px solid rgba(202, 255, 244, 0.12);
  font: inherit;
  font-size: 13px;
  line-height: 1.9;
}
.mode-notice a,
.connection-note a {
  color: var(--app-aqua, #72f4dc);
}
.connection-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.connection-note button {
  min-height: 44px;
  background: transparent;
  color: var(--app-aqua);
  border: 0;
  font: inherit;
  cursor: pointer;
}
.connected .empty-row {
  padding: 28px 16px;
  font-size: 13px;
  line-height: 2;
  color: var(--app-muted);
  text-align: center;
}
.connected .auth-trust {
  line-height: 1.9;
}
.connected #otp-note {
  display: block;
  border: 1px solid var(--app-border);
  padding: 12px;
  border-radius: 10px;
  margin-block: 12px;
  color: var(--app-gold);
  line-height: 2;
}
.connected .preview-note {
  border: 1px solid rgba(245, 212, 119, 0.25);
  background: rgba(245, 212, 119, 0.05);
  color: var(--app-gold);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.connected .flow-chart {
  display: flex;
  align-items: end;
}
.connected .flow-chart p {
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.9;
}
.connected .report-data {
  margin-top: 20px;
}
.connected .report-data > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--app-border);
  font-size: 13px;
}
.connected .report-preview {
  margin-top: 24px;
}
.connected .report-preview summary {
  cursor: pointer;
  min-height: 44px;
  color: var(--app-muted);
  padding-block: 12px;
}
.admin-toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-toolbar label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  flex: 1;
}
.admin-toolbar input,
.admin-toolbar select,
.admin-user select {
  min-height: 44px;
  color: var(--app-text);
  background: #092129;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  min-width: 0;
}
.admin-users {
  display: grid;
  gap: 12px;
}
.admin-user {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 130px 130px auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--panel-calm, #0b252d);
}
.admin-user strong,
.admin-user small {
  display: block;
}
.admin-user strong {
  font-size: 14px;
}
.admin-user small {
  margin-top: 6px;
  color: var(--app-muted);
  font-size: 13px;
}
.admin-user label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--app-muted);
}
.admin-user button {
  min-height: 44px;
}
.admin-audit {
  margin-top: 24px;
}
.admin-audit summary {
  min-height: 44px;
  cursor: pointer;
  font-size: 14px;
}
.admin-audit p {
  padding-block: 10px;
  margin: 0;
  color: var(--app-muted);
  border-bottom: 1px solid var(--app-border);
  font-size: 13px;
  line-height: 1.9;
}
.connected button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.connected :is(input, select):focus-visible {
  outline: 2px solid var(--app-aqua);
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .connected input,
  .connected select {
    font-size: 16px;
  }
}
.connected #admin-confirm {
  color: var(--app-text);
  max-width: 440px;
}
.connected #admin-confirm p {
  color: var(--app-muted);
  line-height: 2;
}
.connected #admin-confirm .page-actions {
  margin-top: 24px;
}
.connected #admin-confirm button {
  min-height: 44px;
}
@media (max-width: 900px) {
  .admin-user {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .admin-user > div {
    grid-column: 1/-1;
  }
  .admin-user button {
    grid-column: 1/-1;
  }
}
@media (max-width: 480px) {
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .connected .report-data > div {
    font-size: 13px;
    flex-wrap: wrap;
  }
}

/* Shared panel type scale: 13px captions, 14px labels, 16px reading/actions. */
.connected .record-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  grid-column: 1/-1;
  padding-top: 8px;
}
.connected .record-actions button,
.connected .record-pager button {
  min-height: 44px;
  min-width: 64px;
  padding: 8px 14px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: transparent;
  color: var(--app-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.connected .record-actions button:hover,
.connected .record-pager button:hover:not(:disabled) {
  color: var(--app-aqua);
  border-color: var(--app-aqua);
}
.connected .delete-record {
  color: #ffa8af !important;
}
.connected .record-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--app-muted);
}
.connected #delete-confirm {
  color: var(--app-text);
  max-width: 460px;
}
.connected #delete-confirm p {
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.connected #delete-confirm .page-actions {
  margin-top: 24px;
}
.connected #delete-confirm button {
  min-height: 44px;
}
.connected #transaction-date {
  color-scheme: dark;
  direction: ltr;
  width: 100%;
}
.connected #date-preview {
  display: block;
  color: var(--app-aqua);
  font-size: 14px;
  margin-top: 8px;
}
.connected .transaction-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.connected :is(.transaction-name b, .person-cell b, .professional-card h3) {
  overflow-wrap: anywhere;
}
.connected button:focus-visible {
  outline: 2px solid var(--app-aqua);
  outline-offset: 3px;
}
.connected .table-row:has(.record-actions),
.connected .debt-row:has(.record-actions) {
  row-gap: 8px;
}
.connected .record-actions {
  border-top: 1px solid var(--app-border);
}
.dashboard {
  font-size: 16px;
}
.dashboard :is(p, small, label) {
  line-height: 1.85;
}

/* Voice transaction capture */
.connected .voice-dialog {
  width: min(480px, calc(100% - 28px));
  border: 1px solid color-mix(in srgb, var(--app-aqua) 34%, var(--app-border));
  border-radius: 24px;
  background: #092126;
  color: var(--app-text);
}
.connected .voice-recorder { padding: 24px; text-align: center; }
.connected .voice-recorder .dialog-heading { text-align: right; }
.connected .voice-recorder .close-dialog { width: 44px; height: 44px; }
.connected .voice-orb {
  position: relative;
  width: 176px;
  height: 176px;
  display: grid;
  place-items: center;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #20d7c422 0 38%, #20d7c40c 39% 60%, transparent 61%);
  border: 1px solid #54e7d633;
}
.connected .mic-ring {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--app-aqua), #44a8ef);
  color: #062026;
  box-shadow: 0 0 0 10px #24d7c31a, 0 16px 38px #16cab535;
}
.connected .voice-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: .38;
}
.connected .voice-bars i {
  --level: 16%;
  width: 3px;
  height: var(--level);
  max-height: 82px;
  border-radius: 8px;
  background: #8ff8eb;
  transition: height 90ms linear;
}
.connected .voice-dialog.is-recording .voice-bars { opacity: .9; }
.connected .voice-dialog.is-recording .mic-ring { animation: voice-pulse 1.5s ease-in-out infinite; }
.connected .voice-dialog.is-processing .voice-orb { animation: voice-breathe 1.2s ease-in-out infinite alternate; }
.connected .voice-state { margin: 0; font-weight: 800; font-size: 18px; }
.connected .voice-timer { display: block; direction: ltr; margin: 5px 0; font-family: var(--font-data); color: var(--app-aqua); }
.connected .voice-help { margin: 12px auto 18px; color: var(--app-muted); font-size: 14px; }
.connected .voice-controls { display: flex; justify-content: center; gap: 10px; }
.connected .voice-controls button { min-width: 150px; min-height: 48px; }
.connected .voice-stop {
  border: 0;
  border-radius: 12px;
  background: #ff6879;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.connected .voice-error { min-height: 24px; margin: 12px 0 0; color: #ff9aa5; font-size: 14px; }
.connected .voice-privacy { display: block; margin-top: 12px; color: var(--app-muted); font-size: 12px; }
.connected .voice-review {
  padding: 13px 14px;
  margin: 0 0 18px;
  border: 1px solid #36dec558;
  border-radius: 14px;
  background: #24cdb817;
  text-align: right;
}
.connected .voice-review span,
.connected .voice-review q,
.connected .voice-review small { display: block; }
.connected .voice-review span { color: var(--app-aqua); font-size: 13px; font-weight: 800; }
.connected .voice-review q { margin: 7px 0; font-size: 15px; line-height: 1.8; }
.connected .voice-review small { color: var(--app-muted); }
@keyframes voice-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 18px #24d7c312, 0 18px 46px #16cab54b; } }
@keyframes voice-breathe { to { transform: scale(.94); opacity: .75; } }
@media (prefers-reduced-motion: reduce) {
  .connected .voice-dialog.is-recording .mic-ring,
  .connected .voice-dialog.is-processing .voice-orb { animation: none; }
  .connected .voice-bars i { transition: none; }
}
.dashboard
  :is(
    .nav-item,
    .nav-group summary,
    .quiet-tools,
    .link-button,
    .primary-small,
    .secondary-small,
    .manual-action,
    .filter-tabs button
  ) {
  font-size: 14px;
}
.dashboard
  :is(
    .transaction-name b,
    .person-cell b,
    .debt-row > strong,
    .table-row > .amount,
    .transaction-row > .amount,
    .tools-directory b,
    .toggle-list b,
    .admin-user strong
  ) {
  font-size: 15px;
}
.dashboard
  :is(
    .page-title > div > span,
    .settings-form label,
    .admin-toolbar label,
    .admin-user label,
    .budget-list > div > div,
    .balance-stats p,
    .summary-row span,
    .kpi-card p,
    .phase-kpis p,
    .section-card-title p,
    .card-title p,
    .report-kpis p,
    .professional-card-foot
  ) {
  font-size: 14px;
}
.dashboard
  :is(
    .tools-directory button span,
    .voice-quota small,
    .profile-button small,
    .topbar > div > p,
    .transaction-name small,
    .overview-details summary small,
    .toggle-list small,
    .admin-user small
  ) {
  font-size: 13px;
}
.dashboard
  :is(
    .voice-action b,
    .tools-directory h3,
    .professional-card h3,
    .overview-details summary b,
    .settings-form input,
    .settings-form select
  ) {
  font-size: 16px;
}
.dashboard :is(.card-title h2, .section-card-title h3) {
  font-size: 18px;
}
.dashboard .page-title > div > span {
  max-width: 65ch;
}
.dashboard .voice-action {
  height: auto;
  min-height: 86px;
}
.dashboard .voice-action > span:nth-child(2) {
  min-width: 0;
}
.dashboard .voice-action small {
  white-space: normal;
}
.dashboard .nav-item {
  height: auto;
  min-height: 46px;
  padding-block: 8px;
}
.dashboard
  :is(
    .transaction-name,
    .person-cell,
    .phase-kpis article > div,
    .business-kpis article,
    .admin-user > div,
    .tools-directory button > *
  ) {
  min-width: 0;
}
.dashboard
  :is(
    .transaction-name b,
    .person-cell b,
    .admin-user strong,
    .tools-directory b
  ) {
  overflow-wrap: anywhere;
}
.dashboard .professional-card-foot {
  flex-wrap: wrap;
  gap: 8px 16px;
  line-height: 1.9;
}
.dashboard .chart-legend {
  flex-wrap: wrap;
}
.dashboard :is(.page-actions, .card-title, .section-card-title) {
  flex-wrap: wrap;
  row-gap: 12px;
}
.transaction-dialog :is(label, legend, .field-error) {
  font-size: 14px;
  line-height: 1.8;
}
.transaction-dialog :is(input, select, .primary-action) {
  font-size: 16px;
}
.transaction-dialog .type-switch span {
  font-size: 15px;
}
@media (max-width: 720px) {
  .dashboard .transaction-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-block: 16px;
  }
  .dashboard .transaction-row > .amount {
    padding-inline-start: 50px;
  }
  .dashboard .table-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }
  .dashboard .table-row .transaction-name {
    grid-column: 1/-1;
  }
  .dashboard .table-row > .amount {
    grid-column: 1/-1;
  }
  .connected .table-row > span:nth-of-type(2) {
    display: block;
    text-align: end;
  }
  .connected .debt-row > span {
    display: block;
  }
  .connected .debt-row > .status-chip {
    display: inline-flex;
    justify-self: start;
  }
  .dashboard .overview-extra .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard .overview-extra .kpi-card strong {
    overflow-wrap: anywhere;
  }
.dashboard :is(.page-title > div > span, .preview-note, .empty-row) {
    font-size: 16px;
  }
  .dashboard .page-actions {
    width: 100%;
  }
  .dashboard .page-actions > * {
    flex: 1;
  }
  .dashboard .installment-list > div {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }
  .dashboard .installment-list > div > strong,
  .dashboard .installment-list > div > button {
    grid-column: 2;
  }
  .dashboard .team-card > div:not(.section-card-title) {
    flex-wrap: wrap;
  }
  .dashboard .team-card em {
    margin-inline-start: 48px;
  }
  .dashboard .overview-intro {
    flex-wrap: wrap;
  }
  .dashboard .bottom-nav button {
    min-height: 44px;
  }
}

/* === Three-way quick entry: voice first, then natural text, then manual === */
.quick-entry-scrim {
  display: none;
}
.quick-entry-shell {
  min-width: 0;
}
.quick-entry-menu {
  position: fixed;
  right: 14px;
  left: 14px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 24;
  width: min(420px, calc(100vw - 28px));
  margin-inline: auto;
  padding: 13px;
  border: 1px solid rgba(177, 255, 240, 0.18);
  border-radius: 24px;
  color: var(--app-text);
  background:
    radial-gradient(circle at 82% 4%, rgba(114, 244, 220, 0.13), transparent 43%),
    linear-gradient(155deg, rgba(18, 57, 65, 0.98), rgba(4, 23, 29, 0.99));
  box-shadow: 0 30px 80px rgba(0, 7, 10, 0.72), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px);
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transform-origin: 50% 100%;
  transition:
    opacity 150ms ease-out,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.quick-entry-menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.quick-entry-menu > p {
  margin: 1px 7px 10px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 750;
}
.bottom-nav .quick-entry-menu .quick-entry-option {
  position: relative;
  width: 100%;
  min-height: 66px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--app-text);
  text-align: right;
  background: transparent;
  opacity: 0;
  transform: translateY(9px);
  transition:
    opacity 180ms ease-out,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 140ms ease,
    border-color 140ms ease;
}
.quick-entry-menu.is-open .quick-entry-option {
  opacity: 1;
  transform: none;
}
.quick-entry-menu.is-open .quick-entry-option:nth-of-type(2) {
  transition-delay: 35ms;
}
.quick-entry-menu.is-open .quick-entry-option:nth-of-type(3) {
  transition-delay: 70ms;
}
.bottom-nav .quick-entry-menu .quick-entry-option:hover,
.bottom-nav .quick-entry-menu .quick-entry-option:focus-visible {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(177, 255, 240, 0.14);
}
.bottom-nav .quick-entry-menu .quick-entry-option.is-primary {
  min-height: 76px;
  margin-bottom: 3px;
  color: #06242a;
  border-color: rgba(177, 255, 240, 0.34);
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: 0 15px 34px -20px rgba(114, 244, 220, 0.88);
}
.quick-entry-option > span:nth-child(2) {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 1px;
}
.quick-entry-option b {
  font-size: 15px;
  font-weight: 850;
}
.quick-entry-option small {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.6;
}
.quick-entry-option.is-primary small {
  color: rgba(6, 36, 42, 0.72);
}
.quick-entry-option em {
  padding: 4px 7px;
  border-radius: 99px;
  color: #dffff8;
  background: #0b353b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.quick-entry-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(177, 255, 240, 0.13);
  border-radius: 14px;
  color: var(--app-aqua-bright);
  background: rgba(114, 244, 220, 0.08);
}
.is-primary .quick-entry-icon {
  color: var(--app-aqua-bright);
  background: #0b353b;
  border-color: rgba(6, 36, 42, 0.25);
}
.quick-entry-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-waves {
  gap: 3px;
}
.voice-waves i {
  width: 2px;
  height: 22px;
  border-radius: 8px;
  background: currentColor;
  animation: quick-voice-wave 850ms ease-in-out infinite alternate;
}
.voice-waves i:nth-child(1),
.voice-waves i:nth-child(5) { height: 8px; animation-delay: -520ms; }
.voice-waves i:nth-child(2),
.voice-waves i:nth-child(4) { height: 15px; animation-delay: -260ms; }
.quick-entry-scrim.is-open {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: block;
  border: 0;
  background: rgba(0, 9, 12, 0.54);
  backdrop-filter: blur(3px);
  animation: quick-scrim-in 160ms ease-out both;
}
.bottom-nav #quick-entry-toggle > span {
  display: block;
  line-height: 1;
  transition: transform 230ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bottom-nav #quick-entry-toggle.is-open > span {
  transform: rotate(45deg);
}

.typed-entry-dialog {
  width: min(92vw, 520px);
}
.typed-entry-form textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 16px;
  line-height: 1.9;
}
.typed-entry-form textarea::placeholder {
  color: #78918f;
}
.typed-entry-form > small {
  display: block;
  margin-top: 7px;
  color: var(--app-muted);
  line-height: 1.8;
}
.typed-entry-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.typed-entry-examples button {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-aqua-bright);
  background: rgba(114, 244, 220, 0.06);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.typed-entry-submit {
  position: relative;
}
.typed-entry-submit i {
  display: none;
}
.typed-entry-submit[aria-busy="true"] i {
  width: 17px;
  height: 17px;
  display: block;
  border: 2px solid rgba(6, 36, 42, 0.25);
  border-top-color: #06242a;
  border-radius: 50%;
  animation: typed-entry-spin 750ms linear infinite;
}
.typed-entry-privacy {
  text-align: center;
  font-size: 11px;
}

@keyframes quick-voice-wave {
  from { transform: scaleY(0.45); opacity: 0.62; }
  to { transform: scaleY(1.08); opacity: 1; }
}
@keyframes quick-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes typed-entry-spin {
  to { transform: rotate(1turn); }
}

@media (max-width: 720px) {
  .quick-entry-shell {
    position: relative;
    display: grid;
    place-items: center;
  }
  .bottom-nav #quick-entry-toggle {
    width: 52px;
    height: 52px;
    min-height: 52px;
  }
}
@media (max-width: 380px) {
  .quick-entry-menu {
    right: 8px;
    left: 8px;
    width: calc(100vw - 16px);
    padding: 10px;
  }
  .quick-entry-option em {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quick-entry-menu,
  .quick-entry-option,
  .bottom-nav #quick-entry-toggle > span,
  .quick-entry-scrim,
  .voice-waves i,
  .typed-entry-submit i {
    animation: none !important;
    transition: none !important;
  }
}

/* === People ledgers, category catalog and manual exchange quotes === */
.connected .transaction-dialog.feature-dialog {
  padding: 24px;
  scrollbar-color: #3b6b70 #102c33;
}
.connected .feature-dialog .feature-form {
  padding: 0;
}
.connected .feature-dialog .dialog-heading h2 {
  overflow-wrap: anywhere;
}
.connected .person-search {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  font-size: 14px;
}
.connected .person-search input,
.connected .feature-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: #092129;
  color: var(--app-text);
  font: inherit;
  font-size: 16px;
}
.connected .feature-form textarea {
  min-height: 90px;
  resize: vertical;
}
.connected .person-account {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 4px;
  text-align: right;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-text);
  cursor: pointer;
  border-radius: 8px;
  font: inherit;
}
.connected .person-account:hover {
  background: rgba(102, 242, 217, 0.05);
}
.connected :is(.person-identity, .person-balance) {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.connected .person-identity b {
  overflow-wrap: anywhere;
  font-weight: 500;
  font-size: 16px;
}
.connected :is(.person-account, .person-report-head, .ledger-entry) small {
  font-size: 13px;
  color: var(--app-muted);
}
.connected .person-balance {
  text-align: left;
}
.connected .person-balance strong {
  font-family: var(--font-data);
  font-size: 16px;
  font-weight: 600;
}
.connected .person-balance.receivable strong {
  color: #7bf1d9;
}
.connected .person-balance.payable strong {
  color: #ffb1bb;
}
.connected .person-report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.connected .person-report-head p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.connected .person-ledger-balance {
  display: grid;
  gap: 8px;
  padding: 24px;
  margin-block: 18px;
  border: 1px solid rgba(102, 242, 217, 0.24);
  border-radius: 18px;
  background: linear-gradient(120deg, #133a40, #0b242d);
}
.connected .person-ledger-balance strong {
  font-family: var(--font-data);
  font-size: clamp(24px, 5vw, 34px);
}
.connected .person-ledger-balance > :not(strong) {
  font-size: 14px;
  font-weight: 400;
}
.connected :is(.ledger-entry-title, .ledger-entry-amount, .ledger-totals) {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.connected .ledger-totals {
  font-size: 14px;
  color: var(--app-muted);
}
.connected .ledger-entry {
  border-inline-start: 2px solid rgba(102, 242, 217, 0.4);
  padding: 18px;
  margin-block: 16px;
  background: #0c242d;
  border-radius: 4px 14px 14px 4px;
}
.connected .ledger-entry p {
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.connected .ledger-entry-title span {
  font-size: 13px;
  color: var(--app-muted);
}
.connected .ledger-entry-amount {
  margin-top: 12px;
}
.connected .ledger-entry-amount strong {
  font-family: var(--font-data);
  font-size: 18px;
}
.connected .ledger-entry-amount span {
  color: var(--app-muted);
  font-size: 13px;
}
.connected .category-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #7bf1d9;
  background: rgba(123, 241, 217, 0.09);
}
.connected .category-icon svg {
  width: 23px;
  height: 23px;
}
.connected .category-icon.tone-violet {
  color: #c4b5ff;
  background: rgba(164, 140, 255, 0.12);
}
.connected .category-icon.tone-amber {
  color: #ffdc91;
  background: rgba(255, 194, 83, 0.12);
}
.connected .category-icon.tone-rose {
  color: #ffb1bb;
  background: rgba(255, 130, 151, 0.12);
}
.connected .category-icon.tone-blue {
  color: #9ccfff;
  background: rgba(114, 179, 255, 0.12);
}
.connected .category-heading {
  display: flex;
  gap: 10px;
  align-items: center;
}
.connected .category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.connected .category-card {
  display: flex;
  gap: 12px;
  padding: 20px;
  align-items: center;
  text-align: right;
  background: #0d2831;
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
}
.connected .category-card b {
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.connected .category-card > span:last-child {
  margin-inline-start: auto;
  font-size: 12px;
  white-space: nowrap;
  color: #7bf1d9;
}
.connected .category-select-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 16px;
}
.connected .category-select-actions button {
  min-height: 44px;
}
.connected .category-settings-link {
  margin-block: 0 20px;
}
.connected .feature-form .category-icon-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 10px 0;
}
.connected .category-icon-picker legend {
  margin-bottom: 8px;
}
.connected .category-icon-picker label {
  position: relative;
  cursor: pointer;
}
.connected .category-icon-picker input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
}
.connected .category-icon-picker label > span {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
}
.connected .category-icon-picker svg {
  width: 24px;
  height: 24px;
}
.connected .category-icon-picker small {
  font-size: 12px;
  color: inherit;
}
.connected .category-icon-picker input:checked + span {
  border-color: #7bf1d9;
  background: rgba(123, 241, 217, 0.12);
  color: #7bf1d9;
}
.connected .category-icon-picker input:focus-visible + span {
  outline: 2px solid #7bf1d9;
  outline-offset: 3px;
}
.connected .admin-rates {
  padding: 20px;
  margin-block: 20px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: #0c242d;
}
.connected :is(.admin-rates, #rate-history) > summary {
  cursor: pointer;
  min-height: 44px;
  line-height: 44px;
  font-size: 16px;
}
.connected .rate-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--app-border);
}
.connected .rate-card small {
  color: var(--app-muted);
  font-size: 13px;
}
.connected .rate-equation {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.connected .rate-equation strong {
  font: 600 17px var(--font-data);
}
.connected .conversion-result {
  display: grid;
  gap: 8px;
}
.connected .conversion-result strong {
  font: 600 26px var(--font-data);
  color: #7bf1d9;
}
.connected .conversion-result small {
  color: var(--app-muted);
}
input[data-numeric] {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1000px) {
  .connected .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 590px) {
  .connected .transaction-dialog.feature-dialog {
    padding: 16px;
  }
  .connected .person-account {
    grid-template-columns: 40px minmax(0, 1fr) 16px;
    gap: 10px;
  }
  .connected .person-balance {
    grid-column: 2;
    text-align: right;
  }
  .connected .person-account > span:last-child {
    grid-column: 3;
    grid-row: 1 / 3;
  }
  .connected .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .connected .feature-form .category-icon-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .connected .person-report-head {
    align-items: start;
    flex-wrap: wrap;
  }
  .connected .rate-card {
    align-items: start;
    flex-direction: column;
  }
  .connected .ledger-entry {
    padding: 14px;
  }
}

/* Trustworthy account overview: real data, quiet navigation, visible actions. */
body:not(.connected) .connected-filter { display: none; }
.connected .balance-card { min-height: 0; padding-bottom: 24px; }
.connected .overview-grid > .quick-add-card { align-self: start; }
.connected .account-unit #account-currency { width: 160px; flex: 0 1 160px; }
.connected .account-unit { gap: 10px 14px; }
.connected .account-unit small { margin-inline-start: auto; }
.connected .balance-explanation { color: var(--app-muted); font-size: 13px; margin: 12px 0 24px; }
.connected .cashflow-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.connected .cashflow-toolbar h3 { font-size: 18px; margin: 0; }
.connected .cashflow-toolbar label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.connected :is(.cashflow-toolbar, .toolbar) select {
  min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--app-border);
  border-radius: 10px; background: var(--ink); color: var(--app-text); font: inherit;
}
.connected .flow-chart { position: relative; inset: auto; height: auto; display: block; min-height: 245px; margin-top: 16px; }
.connected .cashflow-figure { margin: 0; }
.connected .cashflow-figure figcaption { color: var(--app-muted); font-size: 13px; }
.connected .cashflow-figure svg { display: block; width: 100%; height: auto; min-height: 155px; direction: ltr; }
.connected .cashflow-figure svg text { fill: var(--app-muted); font: 14px var(--font-data); }
.connected .cashflow-grid { stroke: var(--app-border); stroke-dasharray: 4 6; fill: none; }
.connected .cashflow-income { fill: var(--app-aqua); }
.connected .cashflow-expense { fill: var(--app-gold); }
.connected .cashflow-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 12px; }
.connected .cashflow-legend span { font-size: 13px; border-inline-start: 3px solid var(--app-aqua); padding-inline-start: 8px; }
.connected .cashflow-legend span + span { border-color: var(--app-gold); }
.connected .cashflow-legend b { display: block; font: 500 15px var(--font-data); margin-top: 4px; }
.connected .cashflow-table summary { min-height: 44px; display: flex; align-items: center; color: var(--app-aqua); cursor: pointer; font-size: 14px; }
.connected .cashflow-table .data-table { max-height: 220px; overflow: auto; }
.connected .cashflow-table table { min-width: 0; width: 100%; font-size: 13px; }
.connected .cashflow-table th, .connected .cashflow-table td { white-space: normal; min-width: 0; }
.connected .toolbar { flex-wrap: wrap; align-items: end; }
.connected .toolbar label { display: grid; gap: 6px; flex: 1; min-width: 180px; }
.connected .toolbar label span { position: static; width: auto; height: auto; font-size: 14px; }
.connected .toolbar input { width: 100%; min-height: 44px; }
.connected .toolbar .filter-tabs { align-self: end; }
.connected .category-filter-chip {
  justify-self: start; padding: 8px 10px; min-height: 44px; max-width: 100%; border: 1px solid var(--app-border);
  border-radius: 10px; background: transparent; color: var(--app-aqua); font: inherit; font-size: 14px;
  text-align: start; cursor: pointer; overflow-wrap: anywhere;
}
.connected .category-filter-chip:hover { border-color: var(--app-aqua); }
.connected .record-actions .settle-entry { color: var(--app-aqua); }
.connected .voice-coming-soon { opacity: .8; }
.connected .coming-soon-page { max-width: 1000px; }
.connected .coming-soon-page h3 { margin-top: 20px; }
.connected .coming-soon-page .professional-card p { font-size: 16px; color: var(--app-muted); }
.connected .coming-soon-page .page-actions { margin-top: 24px; }
.connected .coming-soon-page a { display: inline-flex; align-items: center; min-height: 44px; }
.connected .toast { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; max-width: min(560px, calc(100vw - 32px)); font-size: 14px; }
.connected .toast:not(.show) { visibility: hidden; pointer-events: none; }
.connected .toast > span { flex: 1; min-width: 150px; }
.connected .toast button { min-height: 44px; padding: 8px 14px; border: 1px solid currentColor; border-radius: 9px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.connected .toast .toast-dismiss { padding: 8px; min-width: 44px; border: 0; font-size: 22px; }
.connected .toast button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 720px) {
  .connected .table-row .transaction-date { display: block; text-align: end; }
  .connected .toolbar label { width: 100%; min-width: 0; }
  .connected .cashflow-toolbar label { width: 100%; justify-content: space-between; }
  .connected .cashflow-toolbar select { flex: 1; }
  .connected .toast { bottom: calc(90px + env(safe-area-inset-bottom)); left: 16px; right: 16px; }
  .connected dialog .toast { bottom: 16px; }
}
