/* Shared, non-modal page help; only explicitly selected explanations collapse. */
@media screen {
  html body #appShell #mainContent .page-notice-source, html body #appShell #mainContent .page-notice-empty, html body #workspace-main .page-notice-source, html body #workspace-main .page-notice-empty { display:none !important; }
  .page-notice-dock { position:fixed; right:max(20px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); z-index:1010; font-size:13px; color:var(--ui-text,#243247); }
  .page-notice-dock[hidden], .page-notice-panel[hidden] { display:none !important; }
  html body .page-notice-trigger { display:flex; align-items:center; gap:7px; min-height:40px; padding:8px 13px; margin-left:auto; border:1px solid var(--ui-line,#d8e1ee); border-radius:8px; background:var(--ui-panel,#fff); color:var(--ui-brand,#2563eb); font:inherit; font-weight:600; cursor:pointer; box-shadow:0 2px 8px #182c4610; }
  .page-notice-count { padding:1px 6px; border-radius:10px; background:var(--ui-brand-soft,#edf3ff); font-size:12px; }
  .page-notice-panel { width:min(400px,calc(100vw - 32px)); max-height:min(60vh,540px); display:flex; flex-direction:column; margin-bottom:8px; border:1px solid var(--ui-line,#d8e1ee); border-radius:10px; background:var(--ui-panel,#fff); box-shadow:0 6px 24px #182c461a; overflow:hidden; }
  .page-notice-panel > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid var(--ui-line,#d8e1ee); }
  html body .page-notice-close { min-width:32px; min-height:32px; padding:2px; background:transparent; color:inherit; border:0; font-size:22px; cursor:pointer; }
  .page-notice-body { overflow:auto; overscroll-behavior:contain; padding:0 14px; line-height:1.65; overflow-wrap:anywhere; }
  .page-notice-item { padding:12px 0; }
  .page-notice-item + .page-notice-item { border-top:1px solid var(--ui-line,#d8e1ee); }
  .page-notice-item :is(h2,h3,h4) { font-size:13px; margin:0 0 6px; }
  .page-notice-item :is(p,ul,ol) { margin:4px 0; }
  .page-notice-item small { font-size:12px; display:block; color:var(--ui-muted,#617087); }
  .page-notice-item article + article { margin-top:8px; }
  .page-notice-item article > span:first-child { margin-right:6px; }
  .page-notice-item summary { cursor:pointer; }
  .page-notice-dock :focus-visible { outline:2px solid var(--ui-brand,#2563eb); outline-offset:2px; }
  html body.ui-spacious #appShell #mainContent > .topbar { margin-bottom:12px !important; padding-bottom:8px !important; }
  html body.ui-spacious #appShell #view-bank-center .bank-center-kpis { margin-bottom:0 !important; }
  html body.ui-spacious #appShell #view-bank-center .bank-account-switcher { margin-top:0 !important; }
  html body.ui-spacious #appShell #view-bank-center .bank-flow-panel-head { align-items:center !important; min-height:40px !important; margin-bottom:8px !important; gap:12px !important; }
  html body.ui-spacious #appShell #view-bank-center .bank-flow-panel-head > div { padding:0 !important; margin:0 !important; min-height:0 !important; }
  html body.ui-spacious #appShell #view-bank-center .bank-flow-panel-head .form-section-title { padding:0 !important; margin:0 !important; }

  /* Keep save/error feedback above the help launcher and all dialogs above help. */
  html body .toast-wrap, html body #toast { bottom:76px; }
  html[data-theme="dark"] .page-notice-dock { color:var(--ui-text,#e4e9f2); }
  html[data-theme="dark"] .page-notice-panel, html[data-theme="dark"] .page-notice-trigger { background:var(--ui-panel,#192638); }
  @media(max-width:640px) { .page-notice-dock { right:12px; bottom:max(12px,env(safe-area-inset-bottom)); } .page-notice-panel { max-height:55vh; } }
}
@media print { .page-notice-dock { display:none !important; } }

/* The MY ledger starts at its vehicle tabs; navigation already names the page. */
@media screen {
  html body.ui-spacious #appShell #mainContent:has(#view-tax.active) > .topbar .view-title-row { display:none !important; }
  html body.ui-spacious #appShell #mainContent:has(#view-tax.active) #viewTitle {
    position:absolute !important; width:1px !important; height:1px !important;
    padding:0 !important; margin:-1px !important; overflow:hidden !important;
    clip-path:inset(50%) !important; white-space:nowrap !important;
  }
  html body.ui-spacious #appShell #mainContent:has(#view-tax.active) > .topbar { margin:0 0 8px !important; padding:0 !important; min-height:0 !important; }
}

@media screen {
 .page-notice-dock.page-notice-in-header {position:relative;inset:auto;z-index:12;flex:none}
 .page-notice-in-header .page-notice-panel {position:absolute;top:100%;right:0;margin:5px 0 0}
 .page-notice-in-header .page-notice-trigger {min-height:32px;padding:4px 9px;box-shadow:none}
 .page-notice-dock:not(.page-notice-in-header) {bottom:calc(78px + env(safe-area-inset-bottom))}
 .invoice-compact-bar {display:flex;align-items:center;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding:3px 0}
 .invoice-compact-bar :is(input,select,button) {min-height:32px;height:32px;width:auto;flex:0 0 auto;margin:0;padding-block:3px}
 .invoice-compact-bar input[type=search] {width:clamp(155px,22vw,300px)}
 .invoice-compact-bar output {white-space:nowrap;font-variant-numeric:tabular-nums}
 #invoice-filter-bar + section tr[hidden] {display:none}
 @media(max-width:650px){.page-notice-in-header .page-notice-panel {position:fixed;top:auto;right:10px;bottom:75px;max-width:calc(100vw - 20px)}}
}

.invoice-vin-link {color:var(--blue,#185da9);text-decoration:underline;text-underline-offset:2px}
tr:has(.invoice-alert-label:is([data-verdict="suspect"],[data-verdict="confirmed"])) :is(td,td *) {color:var(--invoice-error-text,#b42318)!important}
.invoice-alert-label {background:transparent;border:1px solid currentColor;border-radius:5px;font:inherit;font-size:.875em;padding:2px 6px;white-space:nowrap;cursor:pointer}
.invoice-alert-label[data-verdict="cleared"] {color:inherit}
.invoice-alert-dialog {max-width:min(460px,90vw);border:1px solid #aab3bd;border-radius:10px;padding:20px;color:inherit;background:var(--surface,#fff);margin:auto}
.invoice-alert-dialog::backdrop {background:rgba(19,32,48,.4)}
.invoice-alert-dialog footer {display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.invoice-alert-dialog footer button {min-height:34px}
[data-theme="dark"] {--invoice-error-text:#ff9f96}
