/* Nova Ledger | Rounded UI and alignment release | 11 Nov 2026
   Presentation-only: no financial calculations, auth, billing, or touch events changed.
   Brand colors preserved: #EAF4F4 #1F3A5F #5AA9E6 #222831.
   Inspired by contemporary, quiet rounded-rectangle interface patterns; not Apple assets.
*/
:root{
  --nl-ui-ice:#EAF4F4;
  --nl-ui-navy:#1F3A5F;
  --nl-ui-sky:#5AA9E6;
  --nl-ui-ink:#222831;
  --nl-r8:8px;
  --nl-r12:12px;
  --nl-r16:16px;
  --nl-r20:20px;
  --nl-r24:24px;
  --nl-r28:28px;
  --nl-ui-edge:rgba(95,144,176,.30);
  --nl-ui-surface:rgba(255,255,255,.83);
  --nl-ui-soft:rgba(234,244,244,.72);
  --nl-ui-label:#1F3A5F;
  --nl-ui-focus:0 0 0 3px rgba(90,169,230,.32);
  --nl-ui-shadow:0 10px 30px rgba(31,58,95,.085),inset 0 1px 0 rgba(255,255,255,.64);
}
html[data-theme='dark']{
  --nl-ui-edge:rgba(149,184,204,.23);
  --nl-ui-surface:rgba(34,40,49,.85);
  --nl-ui-soft:rgba(52,73,91,.60);
  --nl-ui-label:#EAF4F4;
  --nl-ui-shadow:0 12px 31px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.06);
}
*{box-sizing:border-box}
html{scroll-padding-top:84px}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;line-height:1.5}
:where(button,input,select,textarea){font-family:inherit}
:where(button,a,summary,input,textarea,select):focus-visible{outline:2px solid var(--nl-ui-sky)!important;outline-offset:3px;box-shadow:var(--nl-ui-focus)}
:where(button,a,summary){-webkit-tap-highlight-color:transparent}
:where(.shell,.content-wrap,.content-main,.page-head,.nova-dashboard-head,.kpis,.card,.home-section,.home-hero,.home-features,.home-plans,.public-page,.auth-card){min-width:0}
/* All historical announcement/banner variants are retired. Invoice and document preview dialogs remain intact. */
.nova-preview-banner,.nova-preview-auth,.nova-preview-workspace,.home-preview-tabs{display:none!important}
/* Workspace: a predictable 8/12/16/24/32 spacing rhythm */
.shell .content-main{width:100%;max-width:1480px;margin-inline:auto;padding-inline:clamp(16px,2.6vw,38px)!important}
.shell :is(.page-head,.nova-dashboard-head){align-items:center;justify-content:space-between;gap:16px 20px;margin-bottom:22px}
.shell :is(.page-head,.nova-dashboard-head) > *{min-width:0}
.shell :is(.head-actions,.nova-dashboard-actions,.inline-actions,.modal-actions,.card-actions){display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.shell :is(.head-actions,.nova-dashboard-actions) > *{margin:0}
.shell :is(.grid.kpis,.nova-insights-grid,.two-col,.settings-grid,.form-grid){gap:clamp(12px,1.4vw,18px)}
.shell :is(.grid.kpis,.nova-insights-grid,.two-col,.settings-grid,.form-grid) > *{min-width:0}
.shell :is(.card,.kpi,.plan-card,.settings-card,.nova-dashboard-filter,.suite-card){
  border-radius:var(--nl-r24)!important;
  border:1px solid var(--nl-ui-edge)!important;
  box-shadow:var(--nl-ui-shadow)!important;
  overflow-wrap:anywhere;
}
.shell .kpi{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;justify-content:space-between;padding:18px 20px!important}
.shell .kpi :is(.kpi-label,.kpi-num,.kpi-foot){margin:0;min-width:0;max-width:100%}
.shell .kpi-num{font-variant-numeric:tabular-nums;letter-spacing:-.035em;line-height:1.14;overflow-wrap:anywhere}
.shell .card-pad{padding:clamp(16px,1.8vw,24px)}
.shell :is(.card-heading,.table-heading,.card-header){display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 14px}
.shell .table-heading > *{min-width:0}
.shell :is(.table-scroll,.suite-table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border-radius:0 0 var(--nl-r20) var(--nl-r20)}
.shell table{width:100%;font-variant-numeric:tabular-nums}
.shell :is(th,td){vertical-align:middle}
.shell .actions-cell{display:flex;align-items:center;justify-content:flex-start;gap:6px;flex-wrap:wrap}
.shell .filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px 12px;min-width:0}
.shell :is(.filters,.form-grid,.field,.form-field) > *{min-width:0}
.shell :is(.field,.form-field){margin:0;max-width:100%}
.shell :is(.field label,.form-field label){display:block;margin-bottom:6px}
.shell :is(input:not([type='checkbox']):not([type='radio']),select,textarea,.input,.select){
  max-width:100%;border-radius:var(--nl-r12)!important;min-height:42px;
}
.shell textarea{min-height:90px}
.shell :is(.btn,.top-quick,.icon-btn,.avatar,.install-sidebar,.close-btn,.app-loading-dismiss){
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  border-radius:var(--nl-r12)!important;min-height:40px;
  font-weight:650;line-height:1.22;text-align:center;
}
.shell .btn{padding:9px 14px!important;max-width:100%;white-space:normal}
.shell .btn.tiny{min-height:32px;padding:6px 10px!important;border-radius:var(--nl-r8)!important}
.shell :is(.pill,.type-badge,.status-badge,.chip){border-radius:999px!important}
.shell :is(.notice,.alert,.empty-state,.save-alert){border-radius:var(--nl-r16)!important}
/* Sidebar: a straight wordmark baseline and uniformly aligned navigation rows. */
#sidebar.sidebar .brand.new-brand{display:flex!important;align-items:center!important;gap:10px!important}
#sidebar.sidebar .nova-custom-sidebar-logo{border-radius:var(--nl-r12)!important;flex-shrink:0}
#sidebar.sidebar .nova-custom-sidebar-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sidebar.sidebar .workspace{display:flex;align-items:center;gap:10px;min-width:0;border-radius:var(--nl-r16)!important}
#sidebar.sidebar .workspace-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
#sidebar.sidebar .nova-nav-group{min-width:0}
#sidebar.sidebar .nav-item{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:10px!important;min-height:41px!important;padding:9px 12px!important;
  margin:2px 0!important;text-align:left!important;
  border-radius:var(--nl-r12)!important;line-height:1.35!important;
}
#sidebar.sidebar .nav-item .nav-ico{flex:none;display:grid;place-items:center;width:21px;height:21px;margin:0!important}
#sidebar.sidebar .nav-ico svg{width:19px;height:19px}
#sidebar.sidebar .nav-item.active{box-shadow:inset 3px 0 0 var(--nl-ui-sky),0 4px 15px rgba(31,58,95,.08)!important}
#sidebar.sidebar .nova-nav-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;min-height:39px;border-radius:var(--nl-r12)!important}
#sidebar.sidebar .nova-nav-toggle span:first-child{min-width:0;flex:1}
#sidebar.sidebar .menu-heading{margin-top:16px}
/* Header, account controls, and tabs align on consistent vertical centers. */
.shell .topbar{display:flex;align-items:center;gap:12px;min-width:0}
.shell .topbar .top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto;min-width:0}
.shell .breadcrumb{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.shell .topbar :is(.mobile-menu,.avatar){flex-shrink:0}
.shell :is(.tab-btn,[role='tab'],.tabs button,.segmented button,.pulse-range button,.time-range button){
  border-radius:var(--nl-r12)!important;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:38px!important;padding:8px 12px!important;line-height:1.2!important;
}
.shell :is(.tabs,.segmented,.pulse-range,.time-range){border-radius:var(--nl-r16)!important;gap:4px;min-width:0}
/* Auth: calm, rounded form geometry while keeping agreements and error messages readable. */
.auth-gate .auth-card{border-radius:var(--nl-r28)!important;max-width:100%;padding:clamp(20px,3vw,32px)!important}
.auth-gate .auth-card :is(input:not([type='checkbox']),button:not(.auth-text-button)):not(.google-signin){border-radius:var(--nl-r12)!important}
.auth-gate .auth-card input:not([type='checkbox']){min-height:45px;padding:11px 14px}
.auth-gate .auth-card .auth-modes{display:flex;align-items:center;gap:5px;border-radius:var(--nl-r16)!important;padding:5px}
.auth-gate .auth-card .auth-mode-btn{border-radius:var(--nl-r12)!important;min-width:0;min-height:39px}
.auth-gate .auth-card .auth-submit,.auth-gate .auth-card .google-signin{min-height:45px;border-radius:var(--nl-r12)!important}
.auth-gate .auth-card .auth-checkbox{display:flex!important;align-items:flex-start!important;gap:9px!important;line-height:1.45}
.auth-gate .auth-card .auth-checkbox input[type='checkbox']{flex:0 0 18px!important;width:18px!important;height:18px!important;min-height:0!important;margin:2px 0 0!important}
.auth-gate .auth-card .auth-checkbox span{min-width:0;flex:1}
/* Marketing and public info pages: same visual rhythm as the application. */
.home-header{align-items:center;gap:12px;border-radius:0 0 var(--nl-r24) var(--nl-r24)!important}
.home-header .home-brand{display:flex;align-items:center;gap:11px;min-width:0}
.home-header .home-brand-text{min-width:0}
.home-header .home-auth{align-items:center;gap:8px}
.home-header :is(.home-login,.home-cta,.nova-home-theme-switch){min-height:40px;border-radius:var(--nl-r12)!important;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.home-hero{align-items:center;gap:clamp(20px,4vw,56px)}
.home-hero > *{min-width:0}
.home-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.home-hero :is(.home-cta,.home-quiet){border-radius:var(--nl-r12)!important;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.home-showcase,.home-about-art{border-radius:var(--nl-r28)!important}
.home-showcase :is(.showcase-tile,.showcase-strip){border-radius:var(--nl-r16)!important}
.home-features,.home-plans,.steps{gap:clamp(12px,1.8vw,20px)}
.home-features > *, .home-plans > *, .steps > *{min-width:0;border-radius:var(--nl-r24)!important}
.home-features article,.home-plans article{padding:clamp(18px,2.2vw,26px)!important}
.home-features h3,.steps h3{line-height:1.25}
.home-features p,.steps p,.home-plans p{line-height:1.55}
.home-plans .plan-link{display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:42px;border-radius:var(--nl-r12)!important}
:where(.public-page,.legal-panel,.legal-block,.faq-item,.public-top,.nova-site-menu-panel){min-width:0}
.public-page :is(.legal-panel,.faq-item,.public-content>.card){border-radius:var(--nl-r20)!important}
.public-page .public-top{display:flex;align-items:center;gap:12px}
.public-page .public-brand{display:flex;align-items:center;gap:9px;min-width:0}
.nova-site-menu>summary{border-radius:var(--nl-r12)!important}
/* Mobile layout: even bottom tabs and protected scroll areas. */
@media(max-width:880px){
  .shell .content-main{padding-inline:16px!important;padding-bottom:calc(104px + env(safe-area-inset-bottom,0px))!important}
  .shell .page-head,.shell .nova-dashboard-head{align-items:stretch;flex-direction:column}
  .shell :is(.head-actions,.nova-dashboard-actions){width:100%;justify-content:flex-start}
  .shell :is(.head-actions,.nova-dashboard-actions) .btn{flex:1 1 auto}
  .shell .bottom-tabs{
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;justify-items:center!important;gap:3px!important;
    width:min(calc(100vw - 24px),440px)!important;
    left:50%!important;right:auto!important;transform:translateX(-50%)!important;
    bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
    padding:7px 9px!important;border-radius:var(--nl-r28)!important;
  }
  .shell .bottom-tabs button:not(.bottom-add){
    display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;
    width:100%!important;min-width:0!important;max-width:none!important;
    height:51px!important;min-height:51px!important;padding:4px 1px!important;
    gap:3px!important;border-radius:var(--nl-r16)!important;
  }
  .shell .bottom-tabs .bottom-tab-icon{width:19px!important;height:19px!important;flex:none}
  .shell .bottom-tabs .bottom-tab-label{font-size:10px!important;line-height:1.15!important;white-space:nowrap}
  .shell .bottom-tabs .bottom-add{
    display:grid!important;place-items:center!important;justify-self:center!important;align-self:center!important;
    width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;
    max-width:50px!important;padding:0!important;margin:0!important;
    border-radius:var(--nl-r16)!important;
  }
  .shell .bottom-tabs .bottom-add .bottom-tab-icon{width:23px!important;height:23px!important}
  .shell .topbar{padding-inline:15px!important;gap:9px}
  .shell .topbar .top-actions{gap:7px}
  .shell .topbar .top-quick{display:none}
  .shell .table-scroll{overflow-x:auto}
}
@media(max-width:620px){
  .shell .content-main{padding-inline:14px!important}
  .shell .grid.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  .shell .kpi{padding:14px!important;border-radius:var(--nl-r20)!important;min-height:112px}
  .shell .kpi-num{font-size:clamp(18px,5vw,25px)!important}
  .shell :is(.card,.plan-card,.settings-card,.nova-dashboard-filter){border-radius:var(--nl-r20)!important}
  .shell .card-pad{padding:16px!important}
  .shell .filters > *{min-width:0}
  .home-hero{gap:22px}
  .home-features,.home-plans,.steps{gap:12px}
  .home-features > *, .home-plans > *, .steps > *{border-radius:var(--nl-r20)!important}
  .home-showcase{border-radius:var(--nl-r24)!important}
  .auth-gate{padding:14px}
  .auth-gate .auth-card{border-radius:var(--nl-r24)!important;padding:20px!important}
}
@media(max-width:360px){
  .shell .bottom-tabs{width:calc(100vw - 16px)!important;padding:6px 5px!important;gap:1px!important}
  .shell .bottom-tabs button:not(.bottom-add){height:48px!important;min-height:48px!important}
  .shell .bottom-tabs .bottom-add{height:47px!important;width:47px!important;min-width:47px!important;min-height:47px!important}
  .shell .bottom-tabs .bottom-tab-label{font-size:9px!important}
  .shell .topbar{padding-inline:10px!important}
}
html[data-theme='dark'] .shell :is(.card,.kpi,.plan-card,.settings-card,.nova-dashboard-filter,.suite-card){border-color:var(--nl-ui-edge)!important;box-shadow:var(--nl-ui-shadow)!important}
html[data-theme='dark'] .shell :is(.field input,.field select,.field textarea,.form-field input,.form-field select,.form-field textarea,.input,.select){background:rgba(40,55,69,.86)!important;border-color:rgba(127,162,186,.46)!important;color:#EAF4F4}
html[data-theme='dark'] .home-features article,html[data-theme='dark'] .home-plans article:not(.highlight){border-color:rgba(127,162,186,.35)!important}
@media(hover:hover){.shell :is(.btn,.nav-item,.bottom-tabs button):hover{filter:brightness(1.035)}}
@media(prefers-reduced-motion:reduce){.shell :is(.btn,.nav-item,.bottom-tabs button,.card,.kpi),.home-features article{animation:none!important;transition-duration:.01ms!important;transform:none!important}}
@media print{.shell :is(.card,.kpi,.plan-card,.topbar),.home-features article{box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}}
/* The drawer opener must not appear beside the desktop sidebar. */
@media(min-width:881px){.shell .topbar .mobile-menu{display:none!important}}
@media(max-width:880px){.shell .topbar .mobile-menu{display:inline-flex!important;align-items:center;justify-content:center}}

/* Final header status: quiet text, not a button, pill or card. */
.shell .topbar .top-actions .sync-indicator{
  display:inline-flex!important;align-items:center!important;flex:0 0 auto;
  min-width:0;max-width:none!important;gap:0!important;
  padding:0!important;margin:0!important;border:0!important;
  border-radius:0!important;background:transparent!important;
  box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  color:#1F3A5F!important;font:600 12px/1.35 Inter,system-ui,sans-serif!important;
  white-space:nowrap;cursor:default;pointer-events:none;
}
.shell .topbar .top-actions .sync-indicator .status-dot{display:none!important}
.shell .topbar .top-actions #top-status{color:inherit!important;font-size:inherit!important;font-weight:inherit!important}
.shell .topbar .top-actions .sync-indicator[data-sync-state='error']{color:#B74646!important}
html[data-theme='dark'] .shell .topbar .top-actions .sync-indicator{color:#EAF4F4!important}
html[data-theme='dark'] .shell .topbar .top-actions .sync-indicator[data-sync-state='error']{color:#F2ABAB!important}
@media(max-width:420px){.shell .topbar .top-actions .sync-indicator{font-size:11px!important}}
