body.kf-open {overflow:hidden}
#kf-view {position:fixed;inset:0;z-index:1500;overflow:auto;background:radial-gradient(circle at top right,#173b63,transparent 40%),linear-gradient(135deg,#07111f,#0e1f35,#08101d);color:#eef7ff;padding:28px max(16px,calc((100vw - 1200px)/2));direction:rtl}
#kf-view[hidden] {display:none}
#kf-view * {box-sizing:border-box}
#kf-view .kf-header,#kf-view .kf-toolbar {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:24px}
#kf-view h1 {font-size:28px;margin:4px 0}
#kf-view h2 {font-size:21px;margin:0 0 18px}
#kf-view p {line-height:1.7}
#kf-view .kf-eyebrow {color:#79b8ff;font-weight:700;letter-spacing:.06em;margin:0}
#kf-view button,#kf-view select {font:inherit;border:1px solid #536781;border-radius:14px;padding:12px 16px;background:#21324b;color:#eef7ff;cursor:pointer;min-height:44px}
#kf-view button:focus-visible,#kf-view select:focus-visible,#kf-view summary:focus-visible {outline:3px solid #79b8ff;outline-offset:3px}
#kf-view button[aria-pressed=true] {border-color:#79b8ff;background:#284a70}
#kf-view button:disabled {opacity:.45;cursor:default}
#kf-view .kf-tabs {display:flex;flex-wrap:wrap;gap:8px}
#kf-view .kf-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:24px}
#kf-view .kf-kpis {grid-template-columns:repeat(4,minmax(0,1fr))}
#kf-view .kf-card {padding:24px;border:1px solid rgba(255,255,255,.16);border-radius:22px;background:rgba(255,255,255,.075);box-shadow:0 16px 40px #0003;min-width:0}
#kf-view .kf-kpi span {display:block;color:#b9cde2;margin-bottom:12px}
#kf-view .kf-kpi strong {font-size:27px;display:block;direction:ltr;text-align:right}
#kf-view .kf-positive {color:#46ffa6}
#kf-view .kf-negative {color:#ff8585}
#kf-view .kf-muted {color:#b9cde2;font-size:14px}
#kf-view .kf-row {display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #ffffff16;overflow-wrap:anywhere}
#kf-view .kf-row:last-child {border:0}
#kf-view .kf-money {direction:ltr;white-space:nowrap}
#kf-view details {border-bottom:1px solid #ffffff16;padding:8px 0}
#kf-view summary {cursor:pointer;padding:8px 0;line-height:1.7}
#kf-view .kf-details {padding:4px 14px;border-radius:12px;background:#ffffff08}
#kf-view .kf-details .kf-row {font-size:14px;flex-wrap:wrap}
#kf-view .kf-date {color:#79b8ff}
#kf-view .kf-bars {display:flex;align-items:stretch;gap:4px;height:230px;overflow-x:auto;direction:ltr;padding:8px 0}
#kf-view .kf-bar-day {display:flex;flex-direction:column;justify-content:flex-end;align-items:center;flex:1;min-width:22px;font-size:11px;color:#b9cde2}
#kf-view .kf-bar {width:70%;min-height:2px;border-radius:8px 8px 0 0;background:linear-gradient(#c9ffe3,#46ffa6);margin-bottom:8px}
#kf-view .kf-bar.expense {background:linear-gradient(#ffc2c2,#ff7777)}
#kf-view .kf-pie {width:180px;height:180px;border-radius:50%;margin:14px auto 24px;border:2px solid #ffffff30}
#kf-view .kf-legend {display:flex;align-items:center;gap:8px}
#kf-view .kf-dot {width:10px;height:10px;border-radius:50%;flex:none}
#kf-view .kf-chart {width:100%;height:auto;display:block;direction:ltr}
#kf-view .kf-empty {text-align:center;color:#b9cde2;padding:28px}
#kf-view .kf-note {color:#b9cde2;text-align:center;margin:0 0 24px}
#kf-view .kf-error {border:1px solid #ff8585;border-radius:14px;padding:16px;margin-bottom:16px;color:#ffbcbc}
@media(max-width:850px){#kf-view .kf-kpis {grid-template-columns:repeat(2,minmax(0,1fr))}#kf-view .kf-grid:not(.kf-kpis) {grid-template-columns:1fr}}
@media(max-width:480px){#kf-view {padding:20px 14px;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom))}#kf-view .kf-card {padding:18px}#kf-view .kf-kpi strong {font-size:21px}#kf-view .kf-tabs {width:100%}#kf-view .kf-tabs button {flex:1;padding:10px 8px}#kf-view h1 {font-size:24px}}
/* Match the original FINANCE spacing, split name/amount rows and summary pills. */
#kf-view {font-family:Arial,sans-serif;padding-top:45px;padding-bottom:45px}
#kf-view .kf-grid {gap:28px;margin-bottom:28px}
#kf-view .kf-card {background:rgba(255,255,255,.09);backdrop-filter:blur(14px);box-shadow:0 18px 45px rgba(0,0,0,.35)}
#kf-view h2 {color:#dfefff;font-size:22px;font-weight:600;margin-bottom:22px}
#kf-view .kf-difference {text-align:center;margin-bottom:35px}
#kf-view .kf-difference h2 {color:#b9dfff;margin-bottom:10px}
#kf-view .kf-difference>strong {display:block;font-size:34px;font-weight:700}
#kf-view .kf-stat-pill {display:flex;justify-content:space-between;align-items:center;padding:22px}
#kf-view .kf-stat-pill span {font-size:22px}
#kf-view .kf-stat-pill strong {font-size:30px;font-weight:600}
#kf-view .kf-daily-average {display:flex;justify-content:center;align-items:center;gap:8px;color:#b9cde2;font-size:16px;margin:12px 0 10px;text-align:center}
#kf-view .kf-daily-average strong {font-size:18px}
#kf-view .kf-rank-row {display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.08);line-height:1.5}
#kf-view .kf-rank-name {grid-column:2;grid-row:1;min-width:0;overflow-wrap:anywhere}
#kf-view .kf-rank-meta {grid-column:3;grid-row:1;display:flex;align-items:center;gap:12px;justify-self:end}
#kf-view .kf-rank-meta .kf-date {font-size:13px;font-weight:600}
#kf-view .kf-rank-group {padding:0;border:0}
#kf-view .kf-rank-group summary {list-style:none;cursor:pointer}
#kf-view .kf-rank-group summary::-webkit-details-marker {display:none}
#kf-view .kf-rank-group summary:hover {background:rgba(255,255,255,.08);border-radius:10px}
#kf-view .kf-arrow {grid-column:1;grid-row:1;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:#79b8ff;transition:transform .18s}
#kf-view .kf-rank-group[open] .kf-arrow {transform:rotate(-90deg)}
#kf-view .kf-source {display:block;color:#a9c0d7;font-size:13px;font-weight:400;margin-top:3px}
#kf-view .kf-details {margin:4px 0 14px;padding:12px 16px;background:rgba(255,255,255,.07);border-radius:14px}
#kf-view .kf-detail-row {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:8px 0;color:#cfe0f2;border-bottom:1px solid rgba(255,255,255,.08)}
#kf-view .kf-detail-row:last-child {border:0}
#kf-view .kf-show-more {margin-top:18px;width:100%;padding:12px 18px;border:0;border-radius:999px;background:rgba(255,119,119,.16);color:#ff9a9a;font-size:16px;font-weight:700}
#kf-view .kf-canvas-wrap {height:330px;position:relative}
#kf-view .kf-pie-card .kf-canvas-wrap {height:380px}
#kf-view .kf-chart-values {margin-top:14px;color:#b9cde2;font-size:14px}
#kf-view .kf-month-navigation {display:flex;align-items:center;gap:10px;direction:ltr}
#kf-view .kf-month-navigation select {padding:14px 24px;border:1px solid #ffffff29;background:#ffffff17;color:#b9dfff;font-size:24px;text-align:center;direction:rtl}
#kf-view .kf-month-navigation select option {background:#0e1f35}
#kf-view .kf-month-navigation button {width:42px;height:42px;min-height:42px;padding:0;border-radius:50%;font-size:28px;line-height:1;background:#ffffff17;color:#b9dfff;border:1px solid #ffffff29}
#kf-view .kf-day-card {padding:18px;border:1px solid #ffffff24;border-radius:20px;background:#ffffff14;margin-bottom:16px}
#kf-view .kf-day-card.kf-highest-income {border:2.5px solid #46ffa6bf;box-shadow:0 0 28px #46ffa647}
#kf-view .kf-day-card.kf-highest-expense {border:2.5px solid #ff7878bf;box-shadow:0 0 28px #ff5a5a47}
#kf-view .kf-day-header {display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px;font-weight:700;color:#b9dfff}
#kf-view .kf-highest-badge {width:fit-content;margin:0 auto 14px;border-radius:999px;padding:7px 14px;background:#ffffff14;font-size:14px}
@media(max-width:850px){#kf-view {padding-top:25px}#kf-view .kf-month-summary {grid-template-columns:1fr}#kf-view .kf-month-navigation {justify-content:center}}
@media(max-width:600px){#kf-view .kf-rank-meta {align-items:flex-end;flex-direction:column;gap:4px}#kf-view .kf-detail-row {grid-template-columns:minmax(0,1fr) auto}#kf-view .kf-detail-row .kf-date {grid-column:1/-1;grid-row:2}#kf-view .kf-stat-pill strong {font-size:26px}#kf-view .kf-stat-pill span {font-size:21px}#kf-view .kf-month-navigation select {font-size:20px;padding:12px 16px}#kf-view .kf-pie-card .kf-canvas-wrap {height:330px}}
#kf-view [hidden] {display:none!important}
#kf-view .kf-insights {font-size:18px;line-height:2}
#kf-view .kf-insights p {margin:0 0 16px}
#kf-view .kf-insights ol {padding-right:28px;margin:12px 0 18px}
#kf-view .kf-insights li {margin-bottom:12px}
#kf-view .kf-toolbar>.kf-tabs button,#kf-view [data-kf-action=refresh] {padding:14px 22px;font-size:17px;border-radius:22px;background:rgba(255,255,255,.09);box-shadow:0 18px 45px #0003}
#kf-view .kf-toolbar>.kf-tabs button[aria-pressed=true] {background:rgba(255,120,255,.14)}
@media(max-width:480px){#kf-view .kf-toolbar>.kf-tabs button {padding:10px 8px;font-size:16px}}
#kf-view .kf-bar-day {min-width:0}
@media(max-width:850px){#kf-view .kf-bar-day {min-width:18px}}
#kf-view .kf-detail-row.kf-without-date {grid-template-columns:minmax(0,1fr) auto}
#kf-view .kf-collapse-toggle {display:none}
#kf-view .kf-period-marker {color:#91a9c1;font-size:13px;margin:0 0 16px}
@media(max-width:640px){
  #kf-view .kf-collapsible>.kf-static-heading {display:none}
  #kf-view button.kf-collapse-toggle {display:flex;width:100%;justify-content:space-between;align-items:center;gap:12px;min-height:44px;padding:4px 0;border:0;border-radius:12px;background:transparent;box-shadow:none;color:#b9dfff;text-align:right;font:inherit;cursor:pointer}
  #kf-view button.kf-section-heading {font-size:21px;font-weight:600;margin-bottom:18px}
  #kf-view .kf-collapse-arrow {color:#79b8ff;font-size:22px;flex:none;transition:transform .18s}
  #kf-view .kf-collapsible.is-collapsed>.kf-collapse-toggle {margin-bottom:0}
  #kf-view .kf-collapsible.is-collapsed>.kf-collapse-toggle .kf-collapse-arrow {transform:rotate(90deg)}
  #kf-view .kf-collapsible.is-collapsed>.kf-collapsible-content {display:none}
}
@media(prefers-reduced-motion:reduce){#kf-view .kf-collapse-arrow,#kf-view .kf-arrow {transition:none}}


/* Compact shared header and paired financial summaries. */
.page-header {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,430px);align-items:center;gap:16px 24px}
.dashboard-topbar {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px}
.dashboard-brand {margin:0;font-size:1.35rem;flex:none}
.dashboard-account {grid-column:1/-1;justify-content:flex-start;min-width:0;gap:12px}
.dashboard-account>div {min-width:0;max-width:calc(100% - 100px)}
.page-header .header-controls {grid-column:2;min-width:0}
.dashboard-title {grid-column:1;grid-row:3;font-size:clamp(1.7rem,2.6vw,2.6rem);line-height:1.3}
.view-switch-btn,#kf-view button.view-switch-btn {flex:none;width:156px;min-height:44px;padding:4px 10px;border:1px solid #70c4ff;border-radius:12px;background:linear-gradient(135deg,#1464bb,#2383db);box-shadow:0 0 14px #329bff38;color:#fff;font:inherit;font-size:12px;font-weight:700;line-height:1.4;text-align:center;cursor:pointer}
.view-switch-btn:hover,#kf-view button.view-switch-btn:hover {background:linear-gradient(135deg,#1b75d2,#329beb);color:#fff}
.view-switch-btn:focus-visible {outline:3px solid #9bdcff;outline-offset:3px}
.page-header .period-controls {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.page-header .period-controls label {min-width:0;max-width:100%;overflow:hidden}
.page-header .period-controls input,.page-header .period-controls select {display:block;width:100%;min-width:0;min-inline-size:0;max-width:100%;box-sizing:border-box}
.page-header input[type=month]::-webkit-datetime-edit {min-width:0;padding:0}
.page-header input[type=month]::-webkit-date-and-time-value {min-width:0;text-align:right}
#kf-view {padding-top:38px;padding-inline:28px}
#kf-view .kf-topbar {display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;margin-bottom:20px}
#kf-view .kf-topbar .brand-wordmark {font-size:1.35rem;margin:0;flex:none}
#kf-view .kf-header {justify-content:center;text-align:center;margin-bottom:18px}
#kf-view .kf-toolbar {flex-direction:column;justify-content:center;gap:14px;margin-bottom:18px}
#kf-view .kf-tabs {justify-content:center;order:2}
#kf-view .kf-month-navigation {order:1;justify-content:center;max-width:100%;margin-inline:auto}
#kf-view .kf-money-value {display:inline-flex;flex-direction:row-reverse;align-items:baseline;justify-content:center;gap:.25em;direction:ltr;unicode-bidi:isolate;max-width:100%;flex-wrap:nowrap;white-space:normal}
#kf-view .kf-number {min-width:0;overflow-wrap:anywhere}
#kf-view .kf-currency {flex:none;font-size:.8em}
#kf-view .kf-difference {padding:14px 18px;margin-bottom:14px}
#kf-view .kf-difference h2 {font-size:18px;margin-bottom:6px}
#kf-view .kf-difference>strong {font-size:26px;line-height:1.3}
#kf-view .kf-grid.kf-month-summary {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#kf-view .kf-month-summary {margin-bottom:12px}
#kf-view .kf-month-summary>div {min-width:0;display:flex;flex-direction:column}
#kf-view .kf-stat-pill {padding:16px;flex-direction:column;justify-content:center;gap:6px;text-align:center;min-width:0;flex:1}
#kf-view .kf-stat-pill span {font-size:16px}
#kf-view .kf-stat-pill strong {font-size:24px;max-width:100%;white-space:normal}
#kf-view .kf-stat-pill .kf-currency {font-size:.8em}
#kf-view .kf-daily-average {flex-direction:column;gap:4px;font-size:13px;line-height:1.5;margin:8px 0 0}
#kf-view .kf-daily-average strong {font-size:16px;max-width:100%}
#kf-view .kf-fade-in {animation:kf-data-fade-in .2s ease-out}
@keyframes kf-data-fade-in {from{opacity:0}to{opacity:1}}
@media(max-width:640px){
  .page-header {grid-template-columns:minmax(0,1fr);gap:14px;margin-bottom:18px}
  .dashboard-topbar {grid-column:1;grid-row:1;gap:10px}
  .dashboard-brand,#kf-view .kf-topbar .brand-wordmark {font-size:1.1rem}
  .dashboard-account {grid-column:1;grid-row:2;flex-wrap:nowrap;padding:0;gap:10px}
  .dashboard-account>div {flex:1 1 0;max-width:none}
  .dashboard-account .logout-btn {min-height:36px;padding:6px 10px}
  .page-header .header-controls {grid-column:1;grid-row:3;gap:6px}
  .page-header .period-controls {gap:12px}
  .page-header .period-controls label {font-size:11px;gap:6px}
  .page-header .period-controls input,.page-header .period-controls select {min-height:42px;padding:7px;font-size:13px;border-radius:12px}
  .page-header .reset-day-hint {font-size:11px}
  .page-header .dashboard-title {grid-column:1;grid-row:4;text-align:center;font-size:clamp(1.25rem,5.5vw,1.65rem);line-height:1.4}
  .view-switch-btn,#kf-view button.view-switch-btn {width:142px;font-size:11px;padding:6px 8px;min-height:44px}
  #kf-view {padding:max(18px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(34px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
  #kf-view .kf-topbar {margin-bottom:16px}
  #kf-view .kf-month-navigation {gap:8px}
  #kf-view .kf-month-navigation select {min-width:0;max-width:calc(100vw - 128px);padding:8px 10px;font-size:17px}
  #kf-view .kf-toolbar>.kf-tabs button {font-size:13px;padding:9px 6px}
  #kf-view .kf-difference {padding:12px;margin-bottom:12px}
  #kf-view .kf-difference h2 {font-size:16px;margin-bottom:4px}
  #kf-view .kf-difference>strong {font-size:23px}
  #kf-view .kf-month-summary {gap:10px}
  #kf-view .kf-stat-pill {padding:12px 8px;border-radius:16px}
  #kf-view .kf-stat-pill span {font-size:14px}
  #kf-view .kf-stat-pill strong {font-size:clamp(16px,4.8vw,22px)}
  #kf-view .kf-stat-pill .kf-currency {font-size:.8em}
  #kf-view .kf-daily-average {font-size:11px}
  #kf-view .kf-daily-average strong {font-size:14px}
  #kf-view .kf-note {font-size:11px;line-height:1.6;margin-bottom:14px}
}
@media(prefers-reduced-motion:reduce){#kf-view .kf-fade-in {animation:none}}

#kf-view .kf-stat-pill .kf-number {font-size:inherit}

@media(max-width:640px){#kf-view .kf-stat-pill .kf-money-value.is-long {font-size:.72em}}

/* Keep the selected month overview stable above the detail tabs. */
.dashboard-brand,#kf-view .kf-topbar .brand-wordmark {font-size:1.7rem}
.view-switch-btn,#kf-view button.view-switch-btn {white-space:nowrap}
.month-picker-field {position:relative;display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-width:0;min-height:48px;padding:10px;border:1px solid var(--border);border-radius:15px;background:var(--panel-strong);color:var(--text)}
#monthPickerLabel {min-width:0;font-weight:700;white-space:nowrap}
.month-picker-icon {flex:none;color:var(--blue)}
.page-header .period-controls .month-picker-field input {position:absolute;inset:0;height:100%;width:100%;opacity:0;cursor:pointer}
.month-picker-field:focus-within {outline:2px solid var(--blue);outline-offset:2px}
.page-header .period-controls {grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
.page-header .period-controls label {overflow:visible}
#kf-view .kf-account {display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:100%;margin:0 0 20px}
#kf-view .kf-account .user-email {min-width:0;text-align:right}

#kf-view .kf-month-navigation {margin:0 auto 18px;width:fit-content}
#kf-view .kf-month-navigation select {width:320px;max-width:calc(100vw - 140px);text-align:center;text-align-last:center}
#kf-view .kf-toolbar {margin:6px 0 20px}
#kf-view .kf-tabs {width:100%}
#kf-view .kf-grid.kf-stacked-sections {grid-template-columns:minmax(0,1fr)}
#kf-view #kf-content {scroll-margin-top:12px;outline:none}
#kf-view .kf-chart-grid {max-width:1100px;margin-inline:auto}
#kf-view .kf-chart-card h2,#kf-view .kf-pie-card h2 {text-align:center}
#kf-view .kf-canvas-wrap {direction:ltr;width:100%;max-width:760px;height:280px;margin:0 auto}
#kf-view .kf-canvas-wrap canvas {display:block;direction:ltr;width:100%;height:100%;max-width:100%;margin:0 auto}
#kf-view .kf-pie-card .kf-canvas-wrap {width:min(100%,260px);height:220px;margin:0 auto 14px}
#kf-view .kf-pie-legend {display:flex;flex-wrap:wrap;justify-content:center;gap:8px 14px;font-size:12px;line-height:1.5;margin:0 auto 14px;max-width:560px}
#kf-view .kf-pie-legend>span {display:inline-flex;align-items:center;gap:6px;max-width:100%;overflow-wrap:anywhere}
#kf-view .kf-pie-legend i {width:10px;height:10px;border-radius:3px;flex:none}
#kf-view .kf-bars {width:100%;max-width:760px;margin-inline:auto}
@media(max-width:640px){
 .dashboard-brand,#kf-view .kf-topbar .brand-wordmark {font-size:clamp(1.12rem,5.4vw,1.4rem)}
 #kf-view .kf-topbar {gap:10px}
 .month-picker-field {min-height:42px;padding:7px 8px;border-radius:12px;font-size:12px}
 #kf-view .kf-account {margin-bottom:14px}
 #kf-view .kf-month-navigation {gap:8px;margin-bottom:14px}
 #kf-view .kf-month-navigation select {width:210px;max-width:calc(100vw - 108px);font-size:18px;padding:9px 10px}
 #kf-view .kf-month-navigation button {width:36px;height:36px;min-height:36px}
 #kf-view .kf-toolbar {margin:4px 0 16px}
 #kf-view .kf-canvas-wrap {height:240px}
 #kf-view .kf-pie-card .kf-canvas-wrap {width:min(100%,240px);height:220px}
}

.page-header .month-picker-field input::-webkit-calendar-picker-indicator {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}

#kf-view .kf-current-date {text-align:center;color:#b9cde2;font-size:12px;line-height:1.5;margin:0 0 8px}

/* The same account node uses the management typography in both views. */
#kf-view .dashboard-account {justify-content:flex-start;font-family:Arial,"Noto Sans Hebrew",sans-serif;font-size:.85rem;line-height:1.45;color:var(--muted)}
.dashboard-account .user-email {text-decoration:none;border-bottom:0;user-select:none;-webkit-user-select:none}
#kf-view .dashboard-account .logout-btn {font:inherit;line-height:inherit;border:1px solid var(--border);border-radius:12px;min-height:36px;padding:6px 11px;color:#d4e5f4;background:rgba(255,255,255,.04)}
#kf-view .dashboard-account .logout-btn:hover {border-color:rgba(255,116,127,.5);color:var(--red)}
.view-switch-btn,#kf-view button.view-switch-btn {display:inline-flex;align-items:center;justify-content:center;gap:5px;direction:rtl}
.view-switch-icon {width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dashboard-brand,#kf-view .kf-topbar .brand-wordmark {font-size:2rem}
#kf-view .kf-day-total {display:inline-flex;align-items:baseline;gap:6px;direction:rtl;border-bottom:2px solid #ff747f;padding-bottom:4px}
#kf-view .kf-day-total>span {white-space:nowrap}
@media(max-width:640px){
 .dashboard-brand,#kf-view .kf-topbar .brand-wordmark {font-size:clamp(1.18rem,6vw,1.55rem)}
 #kf-view .dashboard-account {flex-wrap:nowrap;padding:0;gap:10px}
 #kf-view .dashboard-account>div {flex:1 1 0;max-width:none}
 #kf-view .dashboard-account .logout-btn {padding:6px 10px}
}

.dashboard-brand,#kf-view .kf-topbar .brand-wordmark {line-height:1.45}
#kf-view .kf-topbar {margin-bottom:16px}
/* Tab scrolling sets its own destination when chart/content height changes. */
#kf-view {overflow-anchor:none}
@media(max-width:640px){#kf-view .kf-topbar {margin-bottom:14px}}


/* Finance analysis polish: brand-matched daily totals, stable tab transitions and a fixed amount scale. */
#kf-view .kf-day-total {
  position:relative;
  border-bottom:0;
  padding-bottom:6px;
}
#kf-view .kf-day-total::after {
  content:"";
  position:absolute;
  inset-inline:0;
  bottom:0;
  height:2px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--green),var(--blue));
  box-shadow:0 0 10px rgba(69,241,162,.2);
}
#kf-view .kf-fade-in {
  animation:kf-data-fade-in .18s ease-out;
}
@keyframes kf-data-fade-in {
  from {transform:translateY(4px)}
  to {transform:translateY(0)}
}
#kf-view .kf-daily-chart {
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:8px;
  align-items:stretch;
  direction:ltr;
  width:100%;
  max-width:820px;
  margin-inline:auto;
}
#kf-view .kf-amount-axis {
  height:230px;
  padding:8px 0 29px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-end;
  color:#9fb7ce;
  font-size:11px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  user-select:none;
}
#kf-view .kf-amount-axis span {
  display:block;
  line-height:1;
}
#kf-view .kf-daily-chart .kf-bars {
  width:100%;
  min-width:0;
  max-width:none;
  margin:0;
}
@media(max-width:640px) {
  #kf-view .kf-daily-chart {
    grid-template-columns:44px minmax(0,1fr);
    gap:6px;
  }
  #kf-view .kf-amount-axis {
    font-size:10px;
  }
}
@media(prefers-reduced-motion:reduce) {
  #kf-view .kf-fade-in {animation:none}
}



#kf-view .kf-average-table{grid-column:1/-1}
#kf-view .kf-average-table .kf-row{gap:20px;align-items:center}
.kf-average-table .kf-row>span:first-child{min-width:0;overflow-wrap:anywhere}
.kf-average-table .kf-money{flex-shrink:0;white-space:nowrap}
.kf-average-table .kf-average-heading{font-size:13px;color:var(--kf-muted);font-weight:600}

#kf-view .kf-average-period{display:block;margin-top:4px}
#kf-view .kf-average-group{border-bottom:1px solid #ffffff16}
#kf-view .kf-average-group>summary{list-style:none;cursor:pointer}
#kf-view .kf-average-group>summary::-webkit-details-marker{display:none}
#kf-view .kf-average-category{position:relative;padding-inline-start:24px}
#kf-view .kf-average-arrow{position:absolute;inset-inline-start:0;top:50%;width:16px;height:16px;transform:translateY(-50%);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
#kf-view .kf-average-group[open]>.kf-average-category .kf-average-arrow{transform:translateY(-50%) rotate(-90deg)}
#kf-view .kf-average-children{padding-inline:24px 8px;padding-bottom:8px}
#kf-view .kf-average-child{font-size:.9em}
#kf-view .kf-average-group:has(+.kf-average-group)>summary{border-bottom:0}
#kf-view .kf-average-category>.kf-average-name{min-width:0;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){#kf-view .kf-average-arrow{transition:none}}

#kf-view .kf-ranking-title{margin-bottom:0}
#kf-view .kf-ranking-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:44px;margin:0;padding:0 0 12px;border:0;border-radius:0;background:transparent;box-shadow:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
#kf-view .kf-brand-collapse{display:inline-grid;place-items:center;flex-shrink:0;width:33px;height:31px;border:1px solid #89e6ff94;border-radius:8px;background:linear-gradient(135deg,#45f1a2,#71c9ff);color:#04120d;font-family:Arial,sans-serif;font-size:23px;font-weight:950;line-height:1;transform:none;transition:transform .18s}
#kf-view .kf-ranking-toggle[aria-expanded=true] .kf-brand-collapse,
#kf-view .kf-collapse-toggle[aria-expanded=true] .kf-brand-collapse{transform:rotate(180deg)}
#kf-view .kf-collapsible.is-collapsed>.kf-collapse-toggle .kf-brand-collapse{transform:none}
#kf-view .kf-ranking>[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){#kf-view .kf-ranking-arrow{transition:none}}

/* A persistent highlight slides underneath the selected analysis tab. */
#kf-view .kf-sliding-tabs{position:relative;isolation:isolate;--kf-tab-fill:rgba(255,120,255,.14);--kf-tab-edge:#79b8ff;--kf-tab-shadow:none;--kf-tab-radius:22px}
#kf-view .kf-sliding-tabs>[data-kf-tab]{position:relative;z-index:1}
#kf-view .kf-sliding-tabs>[data-kf-tab][aria-pressed=true]{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
#kf-view .kf-tab-highlight{position:absolute;z-index:0;left:0;top:0;pointer-events:none;box-sizing:border-box;border:1px solid var(--kf-tab-edge);border-radius:var(--kf-tab-radius);background:var(--kf-tab-fill);box-shadow:var(--kf-tab-shadow)}
#kf-view .kf-tabs-ready>.kf-tab-highlight{transition:transform .3s cubic-bezier(.22,.7,.25,1),width .3s ease,height .3s ease}
#kf-view.kf-neon .kf-sliding-tabs{--kf-tab-fill:linear-gradient(115deg,#66319c,#48207d);--kf-tab-edge:#bf84fa;--kf-tab-shadow:inset 0 0 15px #a667ef22;--kf-tab-radius:999px}
html.kama-ocean-ui #kf-view.kf-neon .kf-sliding-tabs{--kf-tab-fill:linear-gradient(115deg,#18516c,#0b3048);--kf-tab-edge:#65bdd4;--kf-tab-shadow:inset 0 0 15px #65bdd422}
@media(prefers-reduced-motion:reduce){#kf-view .kf-tabs-ready>.kf-tab-highlight{transition:none}}

/* Crossfade the two complete views, including their shared header. */
html.kama-page-transition::view-transition-old(root){animation:none;opacity:1;mix-blend-mode:normal}
html.kama-page-transition::view-transition-new(root){animation:kama-page-in 340ms ease both;mix-blend-mode:normal}
@keyframes kama-page-out{from{opacity:1}to{opacity:0}}
@keyframes kama-page-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){html.kama-page-transition::view-transition-old(root),html.kama-page-transition::view-transition-new(root){animation:none}}

/* Unknown history is a loading state, not a confirmed navigation boundary. */
#kf-view[aria-busy=true] .kf-month-navigation button:disabled{opacity:1}

/* Day totals stay visible; each section owns its single detail-visibility control. */
#kf-view .kf-day-card>.kf-day-heading{display:flex;justify-content:space-between;align-items:center;width:100%;gap:12px}
#kf-view .kf-day-heading>.kf-day-total{margin-inline-start:auto;flex-shrink:0}
#kf-view .kf-day-entries[hidden]{display:none!important}
#kf-view .kf-amount-only{display:flex;align-items:center;gap:8px;margin:0 0 16px;font-size:14px;cursor:pointer;color:inherit}
#kf-view .kf-amount-only input{width:18px;height:18px;margin:0;flex-shrink:0;accent-color:var(--green,#62edbd);cursor:pointer}
#kf-view .kf-canvas-wrap canvas{pointer-events:auto}
#kf-view #kf-month-flow{pointer-events:none}

#kf-view .kf-section-titles{display:block;min-width:0;text-align:right}
#kf-view .kf-section-name{display:block;font-size:clamp(24px,4vw,28px);line-height:1.3;font-weight:750}
#kf-view .kf-section-subtitle{display:block;margin-top:5px;font-size:14px;line-height:1.5;font-weight:500;color:var(--kf-muted,#9eb1c5)}
#kf-view .kf-flow-card .kf-flow-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:12px;direction:rtl;min-width:0}
#kf-view .kf-flow-values>span{white-space:nowrap}
#kf-view .kf-daily-balance{display:inline-flex;align-items:center;justify-content:flex-start;gap:5px}
#kf-view .kf-neutral{color:var(--kf-muted,#91a9c1)}
#kf-view .kf-daily-trend{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#kf-view .kf-daily-trend.is-negative{transform:scaleY(-1)}
@media(max-width:640px){#kf-view .kf-flow-card .kf-chart-values .kf-row{gap:8px;font-size:12px}#kf-view .kf-flow-card .kf-flow-values{gap:8px}#kf-view .kf-daily-trend{width:14px;height:14px}}
@media(max-width:360px){#kf-view .kf-flow-card .kf-chart-values .kf-row{display:grid;grid-template-columns:minmax(0,1fr)}#kf-view .kf-flow-card .kf-flow-values{width:100%;justify-content:stretch}}
html.kama-page-transition::view-transition-group(kama-brand){animation-duration:340ms;animation-timing-function:ease}

html.kama-page-transition::view-transition-group(root){animation:none}
html.kama-ocean-ui.kama-page-transition::view-transition{background:#041726}

/* Keep the period and description control together without a spare row. */
#kf-view .kf-detail-options{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;margin:0 0 16px;direction:rtl}
#kf-view .kf-detail-options>.kf-period-marker,#kf-view .kf-detail-options>.kf-amount-only{margin:0}
#kf-view .kf-detail-options>.kf-amount-only{margin-inline-start:auto;margin-inline-end:10px;font-size:13px;white-space:nowrap}
/* Date, daily net, then income/expenses at the far left. */
#kf-view .kf-flow-card .kf-chart-values .kf-flow-day{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;direction:rtl;gap:12px}
#kf-view .kf-flow-day>.kf-daily-balance{justify-self:start;min-width:0;direction:rtl}
#kf-view .kf-flow-card .kf-flow-values{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:640px){#kf-view .kf-flow-card .kf-chart-values .kf-flow-day{gap:8px}}
@media(max-width:360px){#kf-view .kf-flow-card .kf-chart-values .kf-flow-day{grid-template-columns:minmax(0,1fr) auto}#kf-view .kf-flow-day>.kf-flow-values{grid-column:1 / -1;width:auto;justify-self:end}}

#kf-view .kf-daily-balance.kf-no-deficit{color:#3f7fa6;white-space:nowrap;font-size:.92em}

#kf-view #kf-content .kf-flow-card .kf-chart-values>summary{color:#fff;font-weight:700}
