/* Nova Ledger: shared auth + signed-in workspace usability improvements, 2026-11-14.
   Keep Netlify/Supabase auth, Turnstile and accounting logic unchanged. */
:root{
  --nl-ui-text:#1f3a5f;--nl-ui-muted:#5e738a;--nl-ui-link:#1769c4;
  --nl-ui-r8:8px;--nl-ui-r12:12px;--nl-ui-r16:16px;
  --nl-ui-r20:20px;--nl-ui-r28:28px;--nl-ui-pill:999px;
  --nl-ui-text-xs:12px;--nl-ui-text-sm:13px;--nl-ui-text-body:14px;
}
html[data-theme=dark]{--nl-ui-text:#e9f4ff;--nl-ui-muted:#b4c9df;--nl-ui-link:#93c5ff}
/* AUTH #1/3/4/5 and APP button variation: five common roles. */
.auth-gate :is(.auth-submit,.google-signin,.auth-mode-btn,.auth-text-button),
.shell :is(.btn,.nav-item,.nova-nav-toggle,.text-link,.icon-btn){font-family:Inter,system-ui,sans-serif;letter-spacing:0}
.auth-gate .auth-card :is(.auth-submit,.google-signin){min-height:46px;border-radius:var(--nl-ui-r12)!important;font-size:14px!important}
.auth-gate .auth-card .auth-modes{background:rgba(225,237,251,.5)!important;border-radius:var(--nl-ui-r16)!important;padding:4px}
.auth-gate .auth-card .auth-mode-btn{border-radius:var(--nl-ui-r12)!important;min-height:40px!important;font-size:13px!important;
  box-shadow:none!important;border:1px solid transparent!important;background:transparent!important;color:var(--nl-ui-muted)!important}
.auth-gate .auth-card .auth-mode-btn.is-active{background:rgba(255,255,255,.8)!important;border-color:rgba(91,142,198,.4)!important;
  color:var(--nl-ui-text)!important;box-shadow:inset 0 -2px 0 rgba(48,117,204,.5)!important}
.auth-gate .auth-card .auth-text-button{font-size:13px!important;color:var(--nl-ui-link)!important}
/* AUTH #2: one copy block, no repeating wallpaper, stable height. */
.auth-gate .auth-editorial{background-repeat:no-repeat!important;background-size:cover!important;background-position:center center;
  min-height:min(650px,100dvh);max-height:min(850px,100dvh);align-self:stretch;isolation:isolate}
.auth-gate .auth-editorial-inner{height:100%;min-height:0;max-height:100%;display:flex;flex-direction:column;justify-content:center}
.auth-gate .auth-editorial-copy{position:relative;z-index:1;margin:auto 0}
.auth-gate .auth-editorial-copy h2{max-width:410px;overflow-wrap:normal}
/* AUTH #6: readable verification helper and useful status spacing. */
#nova-login-captcha-note{font-size:13px!important;line-height:1.55;color:var(--nl-ui-muted);margin:9px 0 12px}
/* AUTH #7: reset is adjacent to password field. Keep it a real button, not a dead anchor. */
.auth-gate .auth-card .auth-forgot-near-password{display:inline-flex;float:right;clear:both;
  min-height:36px;padding:8px 0!important;margin:3px 0 7px!important;text-underline-offset:3px}
.auth-gate .auth-card .auth-remember{clear:both;margin-top:12px}
/* AUTH #8: separate verification from primary submit controls; do not alter provider widget. */
#nova-login-captcha:not([hidden]){margin:15px 0 8px;min-height:50px;padding:9px 8px;
  border:1px solid rgba(112,153,196,.28);border-radius:var(--nl-ui-r12);background:rgba(231,242,255,.28)}
/* Workspaces #2: major buttons, outlined buttons, small/utility button, danger, text. */
.shell .btn{min-height:42px;border-radius:var(--nl-ui-r12)!important;font-size:13px!important;font-weight:680!important}
.shell .btn.primary{background:#1468d7!important;border:1px solid #1468d7!important;color:#fff!important}
.shell .btn.btn--ghost{background:rgba(236,245,255,.84)!important;border:1px solid #99c4ef!important;color:#19497a!important;box-shadow:none!important}
.shell .btn.tiny{min-height:36px!important;padding:7px 12px!important;font-size:12px!important}
.shell .btn.danger{color:#a23b44!important;border-color:#d9a8ad!important}
.shell .text-link{font-size:13px!important;min-height:38px}
.shell .btn:focus-visible,.shell .text-link:focus-visible,.shell .nav-item:focus-visible{outline:3px solid #70b1f7;outline-offset:2px}
/* Workspace #3/4/5: shared typography/color/radius roles for main visual elements. */
.shell :is(.card-heading h2,.table-heading h2,.settings-card h2){font-size:16px!important;color:var(--nl-ui-text)!important}
.shell :is(.page-head p,.nova-dashboard-head p,.card-sub,.kpi-foot,.kpi-label,.empty-state p){font-size:13px!important;color:var(--nl-ui-muted)}
.shell :is(.filter-panel-heading span,.filter-row label,.legend,.report-footnote){font-size:12px!important}
.shell :is(.card,.kpi,.plan-card,.settings-card,.nova-dashboard-filter,.report-filter-panel){border-radius:var(--nl-ui-r20)!important}
.shell :is(.nav-item,.nova-nav-toggle,.btn,.pill,.input,.select){border-radius:var(--nl-ui-r12)!important}
.shell :is(.type-badge,.status-dot){border-radius:var(--nl-ui-pill)!important}
/* Workspace #3/4: compact collapsible utility sections in sidebar; primary seven groups already collapse. */
#sidebar .nova-utility-group{display:block;padding:0 0 3px;border-top:1px solid rgba(148,190,232,.19);margin:9px 0 0}
#sidebar .nova-utility-group>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;
  min-height:45px;padding:11px 14px;list-style:none;font:740 13px/1.35 Inter,system-ui,sans-serif;
  color:#d8e9fa;border-radius:var(--nl-ui-r12)}
#sidebar .nova-utility-group>summary::-webkit-details-marker{display:none}
#sidebar .nova-utility-group>summary::after{content:'⌄';color:#b6cde6;font-size:19px;transition:transform .17s}
#sidebar .nova-utility-group[open]>summary::after{transform:rotate(180deg)}
#sidebar .nova-utility-group>summary:hover{background:rgba(132,185,238,.11)}
#sidebar .nova-utility-group>summary:focus-visible{outline:3px solid #76b5fa;outline-offset:1px}
#sidebar .nova-utility-group .menu-heading{margin:13px 14px 7px;color:#b7cce2;font-size:12px!important;
  font-weight:750;letter-spacing:.015em;text-transform:none!important}
#sidebar .nova-utility-group .nav-item{margin:1px 0;min-height:41px!important}
#sidebar .nova-nav-toggle{font-size:13px!important;text-transform:none!important;letter-spacing:0!important;
  font-weight:740!important;color:#d1e2f6!important}
#sidebar .nav-item{font-size:13px!important;line-height:1.4;display:flex;align-items:center;gap:11px}
#sidebar .nav-ico{flex:0 0 19px;width:19px;height:19px;color:currentColor;display:inline-grid;place-items:center}
#sidebar .nav-ico svg{display:block;width:18px;height:18px;stroke:currentColor}
#sidebar .nova-nav-items{padding-left:0}
/* Workspace #7/12: calendar + nearby chevron and whole summary as 44px target. */
#nova-overview-filters>summary{display:flex;align-items:center;justify-content:flex-start;
  gap:10px;min-height:46px;font-size:14px!important;padding:10px 15px;cursor:pointer}
#nova-overview-filters>summary::after{content:none!important;display:none!important}
#nova-overview-filters .nova-filter-chevron{margin:0 0 0 3px;transition:transform .16s}
#nova-overview-filters[open] .nova-filter-chevron{transform:rotate(180deg)}
#nova-overview-filters>summary:hover{background:rgba(44,116,210,.055)}
#nova-overview-filters>summary:focus-visible{outline:3px solid #70b1f7;outline-offset:-3px}
#nova-overview-filters .nova-filter-active{margin-left:auto;font-size:12px}
/* Workspace #8/17: plan gate stays legible but secondary, visually a small interactive control. */
#nova-overview-filters .filter-upgrade{display:flex;align-items:center;gap:11px}
#nova-overview-filters .nova-standard-feature{min-height:36px!important;border:1px solid #a9c8e9!important;
  background:rgba(228,241,255,.85)!important;color:#214c7d!important;border-radius:var(--nl-ui-r12)!important;
  box-shadow:none!important}
/* Workspace #13: legend swatches are visible, but only decorative indicators, not pretend toggles. */
.shell .legend{display:flex;gap:13px;font-size:12px!important;flex-wrap:wrap}
.shell .legend span{display:inline-flex;align-items:center;gap:6px}
.shell .legend i{display:inline-block;width:11px;height:11px;min-width:11px;border-radius:3px;margin:0;border:1px solid rgba(16,63,113,.16)}
.shell .legend .nova-legend-revenue{background:#3176d3!important}
.shell .legend .nova-legend-expense{background:#a9c8ee!important}
/* Workspace #2/14: meaningful empty-state entry points and a shorter unused chart area. */
.shell .chart-area:has(.chart-empty){height:auto;min-height:158px}
.shell .chart-empty{min-height:158px;display:flex;flex-direction:column;gap:13px;justify-content:center;align-items:center;
  text-align:center;padding:20px 14px;color:var(--nl-ui-muted);font-size:13px}
.shell .chart-empty p{max-width:340px;margin:0;line-height:1.5}
.shell .chart-empty .btn{min-height:40px}
.shell .nova-category-empty{min-height:158px;padding:24px 12px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.shell .nova-category-empty p{max-width:280px;margin:0;font-size:13px;line-height:1.5}
/* Workspace #10/16: two clear actions, 12px separation, secondary outlined expense. */
.shell .nova-dashboard-actions{display:flex;gap:12px!important;align-items:center;flex-wrap:wrap}
.shell .nova-dashboard-actions .btn{min-width:138px;min-height:44px}
/* Workspace #18: sibling chart subtitle parity. */
.shell .studio-categories .card-sub{margin:7px 0 0;line-height:1.35;font-size:13px}
/* Workspace #19: utility headings visible after expanding; still smaller than their parent. */
#sidebar .menu-heading.second{color:#b9cee2;letter-spacing:.015em;font-weight:740}
@media(max-width:840px){
  .auth-gate .auth-editorial{display:none}
  .shell .nova-dashboard-actions{gap:12px!important}
  .shell .nova-dashboard-actions .btn{flex:1 1 145px}
  .shell .chart-empty,.shell .nova-category-empty{min-height:142px}
}
@media(prefers-reduced-motion:reduce){#nova-overview-filters .nova-filter-chevron,#sidebar .nova-utility-group>summary::after{transition:none}}
