/* Screen-only colour treatment. No geometry, visibility, content or behaviour rules.
   Print/export rendering deliberately uses the original styles. */
@media screen {
  :root {
    --ao-page-bg:#f7fafb;
    --ao-surface:#ffffff;
    --ao-surface-soft:#f3f8fa;
    --ao-sidebar:#f4f8fa;
    --ao-sidebar-2:#edf4f7;
    --ao-primary:#245b78;
    --ao-primary-hover:#1c4861;
    --ao-accent:#268052;
    --ao-accent-hover:#206c46;
    --ao-text:#203541;
    --ao-muted:#607381;
    --ao-border:#e1e9ee;
    --ao-border-strong:#becfd9;
    --ao-shadow:0 5px 18px rgba(31,66,88,.055);
    --ao-shadow-sm:0 2px 7px rgba(31,66,88,.035);
    --ao-sidebar-text:#344f60;
    --ao-sidebar-muted:#607381;
    --ao-sidebar-icon:#577787;
    --ao-tab-accent:#268052;
    --ao-navy:#245b78;
    --ao-navy-2:#28536b;
    --ao-green:#268052;
    --ao-green-dark:#206c46;
    --ao-blue:#286a91;
    --ao-ink:#203541;
    --ao-line:#e1e9ee;
    --ao-soft:#f6fafc;
  }
  body[data-ao-theme] .btn-primary {
    background:var(--ao-primary) !important; color:#fff !important;
    box-shadow:0 2px 6px rgba(31,66,88,.10) !important;
  }
  body[data-ao-theme] .btn-primary:hover { background:var(--ao-primary-hover) !important; }
  body[data-ao-theme] .btn-secondary { background:#fff; color:#35576b; border-color:#d8e3e9; box-shadow:none; }
  body[data-ao-theme] .btn-secondary:hover { background:#edf5f8; }
  body[data-ao-theme] .btn,
  body[data-ao-theme] .btn-primary,
  body[data-ao-theme] .btn-secondary,
  body[data-ao-theme] .ao-account-btn,
  body[data-ao-theme] .ao-app-nav-link,
  body[data-ao-theme] .ao-public-links a { font-weight:600; }
  body[data-ao-theme] .card { box-shadow:var(--ao-shadow-sm); border-color:var(--ao-border); }
  body[data-ao-theme] .input-field { border-color:var(--ao-border-strong); }
  body[data-ao-theme] .input-field:focus { border-color:#387da0; }
  body[data-ao-theme] .ao-public-header,
  body[data-ao-theme] .ao-app-topbar { background:#fff; border-color:#e1e9ee; box-shadow:0 1px 5px rgba(31,66,88,.035); }

  /* Sidebar: replace the whole dark surface, including its text pairs. */
  body[data-ao-theme] .app-sidebar { background:#f4f8fa !important; color:#344f60 !important; box-shadow:inset -1px 0 #e1e9ee; }
  body[data-ao-theme] .app-sidebar .sidebar-brand { background:#edf4f7 !important; border-color:#e1e9ee !important; }
  body[data-ao-theme] .app-sidebar .sidebar-brand-text { color:#245b78 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-client-block { border-color:#e1e9ee !important; }
  body[data-ao-theme] .app-sidebar .sidebar-client-name { color:#344f60 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-auto-close,
  body[data-ao-theme] .app-sidebar .section-header { color:#607381 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-link { color:#344f60 !important; background:transparent; box-shadow:none !important; }
  body[data-ao-theme] .app-sidebar .sidebar-link span[style*="font-size"] { color:#577787 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-link:hover { background:#e9f1f5 !important; color:#245b78 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-link.active { background:#e3f1e9 !important; color:#216443 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-link.active span,
  body[data-ao-theme] .app-sidebar .sidebar-link.active .sidebar-link-label,
  body[data-ao-theme] .app-sidebar .sidebar-link.active .sidebar-footer-label { color:#216443 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-step-no { background:#e1eaf0 !important; color:#35576b !important; }
  body[data-ao-theme] .app-sidebar .sidebar-link.active .sidebar-step-no { background:#cbe5d6 !important; color:#216443 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-utility,
  body[data-ao-theme] .app-sidebar .sidebar-financial-action { background:#fff !important; color:#35576b !important; border-color:#dce6ec !important; box-shadow:none !important; }
  body[data-ao-theme] .app-sidebar .sidebar-utility:hover,
  body[data-ao-theme] .app-sidebar .sidebar-utility.active,
  body[data-ao-theme] .app-sidebar .sidebar-financial-action:hover,
  body[data-ao-theme] .app-sidebar .sidebar-financial-action.active { background:#e9f3ef !important; color:#216443 !important; border-color:#bad7c6 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-compliance { background:#edf3f6 !important; }
  body[data-ao-theme] .app-sidebar [style*="color:#94a3b8"],
  body[data-ao-theme] .app-sidebar [style*="color:#cbd5e1"],
  body[data-ao-theme] .app-sidebar [style*="color:#64748b"] { color:#526a79 !important; }
  body[data-ao-theme] .app-sidebar .sidebar-compliance a { color:#245b78 !important; }
  body[data-ao-theme] .app-sidebar [data-prep-sidebar-pct][style*="#4ade80"] { color:#216443 !important; }
  body[data-ao-theme] .app-sidebar [data-prep-sidebar-pct][style*="#fbbf24"],
  body[data-ao-theme] .app-sidebar .sidebar-footer-label [style*="#fbbf24"] { color:#855a0a !important; }
  body[data-ao-theme] .app-sidebar [data-prep-sidebar-pct][style*="#f87171"] { color:#b33b3b !important; }
  body[data-ao-theme] .sidebar-toggle { border-color:#becfd9; color:#245b78; box-shadow:0 2px 6px rgba(31,66,88,.08); }

  /* Workspace controls only: retain table figures, emphasis, errors and row states. */
  body[data-ao-theme] .tb-compact-toolbar button,
  body[data-ao-theme] .tb-compact-toolbar a,
  body[data-ao-theme] .tb-more-actions > summary { font-weight:600 !important; box-shadow:none !important; }
  body[data-ao-theme] .financial-report-card { box-shadow:var(--ao-shadow-sm); }
  body[data-ao-theme] .fin-workbook-dock { background:#f1f6f8; border-color:#d8e3e9; box-shadow:0 -1px 4px rgba(31,66,88,.04); }
  body[data-ao-theme] .fin-sheet.is-active,
  body[data-ao-theme] .fin-sheet-more.is-active { color:#216443; border-bottom-color:#268052; font-weight:600; }

  /* Public pages keep their existing layout, labels and brand mark. */
  body[data-ao-theme="public"] {
    --ink:#203541; --muted:#607381; --soft:#f6fafb; --line:#e1e9ee;
    --navy:#245b78; --blue:#245b78; --blue2:#286a91;
    --green:#268052; --green2:#268052; --bg:#f7fafb;
    --shadow:0 6px 22px rgba(31,66,88,.065);
    background:#fff !important; color:#203541;
  }
  body[data-ao-theme="public"] .hero { background:linear-gradient(120deg,#fff 25%,#f2f8fb 100%) !important; }
  body[data-ao-theme="public"] .hero h1,
  body[data-ao-theme="public"] .hero h2 { color:#203541; font-weight:700; }
  body[data-ao-theme="public"] .lead b { color:#344f60; font-weight:500; }
  body[data-ao-theme="public"] .btn-green { background:#268052; color:#fff; box-shadow:0 2px 6px rgba(31,66,88,.09); }
  body[data-ao-theme="public"] .eyebrow,
  body[data-ao-theme="public"] .pill,
  body[data-ao-theme="public"] .live { font-weight:600; }
  body[data-ao-theme="public"] .dash-card,
  body[data-ao-theme="public"] .integrated-card,
  body[data-ao-theme="public"] .product,
  body[data-ao-theme="public"] .quote-card { box-shadow:var(--ao-shadow); border-color:#e1e9ee; }
  body[data-ao-theme="public"] .integrated-card.dark,
  body[data-ao-theme="public"] .cta { background:#edf5f8; color:#203541; }
  body[data-ao-theme="public"] .integrated-card.dark p,
  body[data-ao-theme="public"] .integrated-card.dark li,
  body[data-ao-theme="public"] .cta p { color:#526a79; }
  body[data-ao-theme="public"] .cta h2 { color:#203541; }
  body[data-ao-theme="public"] h1.font-black,
  body[data-ao-theme="public"] h2.font-black { font-weight:700; }
  body[data-ao-theme="auth"] { background:linear-gradient(130deg,#f1f7fa,#fff 55%,#f1f8f3) !important; }
  body[data-ao-theme="auth"] .login-card,
  body[data-ao-theme="auth"] .signup-card,
  body[data-ao-theme="auth"] .auth-card { box-shadow:0 6px 24px rgba(31,66,88,.08); }
}
