/* Light mode — active when <html data-theme="light">. Dark (default) is app-theme.css unchanged. */
html[data-theme="light"] {
  --glass: #ffffff; --glass-border: #d5dbe7; --card-bg: #ffffff;
  --text: #13203a; --muted: #55607a; --border: #d5dbe7; --input-bg: #ffffff;
  color-scheme: light;
}
html[data-theme="light"] body { background: #eef2f8 !important; color: #13203a !important; }
html[data-theme="light"] body::before { background: #eef2f8 !important; }
html[data-theme="light"] #bg-fx, html[data-theme="light"] #fx { display: none !important; }
html[data-theme="light"] a { color: #0b57c2; }
html[data-theme="light"] a:hover { color: #083f8c; }
html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3, html[data-theme="light"] h4,
html[data-theme="light"] label, html[data-theme="light"] p, html[data-theme="light"] li, html[data-theme="light"] td,
html[data-theme="light"] div, html[data-theme="light"] span, html[data-theme="light"] summary, html[data-theme="light"] em, html[data-theme="light"] strong { color: #13203a; }
html[data-theme="light"] .muted, html[data-theme="light"] .sub, html[data-theme="light"] .label { color: #55607a !important; }
html[data-theme="light"] .site-header, html[data-theme="light"] nav.site-header { background: #ffffff !important; border-bottom: 1px solid #d5dbe7; box-shadow: 0 1px 6px rgba(20,40,80,.08); }
html[data-theme="light"] .site-header .btn, html[data-theme="light"] .navbar .btn, html[data-theme="light"] nav .btn {
  background: #e8f0ff !important; border: 1px solid #b8cdf3 !important; color: #123a7a !important; }
html[data-theme="light"] .site-header .btn:hover, html[data-theme="light"] nav .btn:hover { background: #d6e4ff !important; }
html[data-theme="light"] .site-header a:not(.btn) { color: #123a7a; }
html[data-theme="light"] .search-box { background: #fff; color: #13203a; border-color: #c5cede; }
html[data-theme="light"] .card, html[data-theme="light"] .table-card, html[data-theme="light"] .kpi, html[data-theme="light"] .box,
html[data-theme="light"] .search-card, html[data-theme="light"] .unreceived-card {
  background: #ffffff !important; border: 1px solid #d5dbe7 !important; box-shadow: 0 2px 10px rgba(20,40,80,.06); color: #13203a; backdrop-filter: none; }
html[data-theme="light"] table { color: #13203a; }
html[data-theme="light"] th { color: #33415c !important; }
html[data-theme="light"] td, html[data-theme="light"] th { border-bottom-color: #e3e8f1 !important; }
html[data-theme="light"] tbody tr:nth-child(even) { background: #f6f8fc !important; }
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=number], html[data-theme="light"] input[type=email],
html[data-theme="light"] input[type=tel], html[data-theme="light"] input[type=date], html[data-theme="light"] input[type=password],
html[data-theme="light"] input[type=search], html[data-theme="light"] select, html[data-theme="light"] textarea {
  background: #ffffff !important; color: #13203a !important; border: 1px solid #c5cede !important; }
html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: #8a93a8; }
html[data-theme="light"] .btn, html[data-theme="light"] button.btn, html[data-theme="light"] button[type=submit], html[data-theme="light"] .btn-primary {
  background: #e8f0ff !important; border: 1px solid #b8cdf3 !important; color: #123a7a !important; }
html[data-theme="light"] .btn-primary, html[data-theme="light"] button.btn-primary { background: #1f5fd1 !important; border-color: #1f5fd1 !important; color: #fff !important; }
html[data-theme="light"] .ok, html[data-theme="light"] .status-ok { background: #e8f8f0 !important; border-color: #9fdcbf !important; color: #0f6a43 !important; }
html[data-theme="light"] .err, html[data-theme="light"] .status-err { background: #fdeceb !important; border-color: #f2b1ab !important; color: #9b1c12 !important; }
html[data-theme="light"] .status-pill, html[data-theme="light"] .pill { background: #eef2f8; color: #33415c; border-color: #c5cede; }
html[data-theme="light"] .pill-status-draft, html[data-theme="light"] .pill[data-status="draft"] { background: #eef1f5 !important; color: #374151 !important; border-color: #c4cad4 !important; }
html[data-theme="light"] .pill-status-sent, html[data-theme="light"] .pill[data-status="sent"] { background: #e3f4fd !important; color: #075985 !important; border-color: #7cc5ea !important; }
html[data-theme="light"] .pill-status-accepted, html[data-theme="light"] .pill-status-won, html[data-theme="light"] .pill[data-status="accepted"], html[data-theme="light"] .pill[data-status="won"],
html[data-theme="light"] .pill-bank-categorized { background: #e3f7ee !important; color: #065f46 !important; border-color: #7fd1ad !important; }
html[data-theme="light"] .pill-status-converted, html[data-theme="light"] .pill[data-status="converted"] { background: #efeafd !important; color: #5b21b6 !important; border-color: #b9a6f2 !important; }
html[data-theme="light"] .pill-status-rejected, html[data-theme="light"] .pill-status-lost, html[data-theme="light"] .pill-status-cancelled,
html[data-theme="light"] .pill[data-status="rejected"], html[data-theme="light"] .pill[data-status="lost"], html[data-theme="light"] .pill[data-status="cancelled"] { background: #fdeceb !important; color: #991b1b !important; border-color: #f0a9a2 !important; }
html[data-theme="light"] .pill-status-expired, html[data-theme="light"] .pill[data-status="expired"],
html[data-theme="light"] .pill-bank-uncategorized { background: #fdf5df !important; color: #854d0e !important; border-color: #e9c46a !important; }
html[data-theme="light"] .pdf-modal-card { background: #ffffff !important; color: #13203a; }
html[data-theme="light"] body:not(.is-dashboard) input[type="checkbox"] { border-color: #b7791f !important; background: #fff8e6 !important; }
html[data-theme="light"] body:not(.is-dashboard) input[type="checkbox"]:checked { background: #d69e2e !important; }
html[data-theme="light"] body:not(.is-dashboard) .flag-check { background: #fff8e6; border-color: #e9c46a; }
html[data-theme="light"] body:not(.is-dashboard) .flag-check span, html[data-theme="light"] body:not(.is-dashboard) .flag-check .muted { color: #854d0e !important; }
/* report "paper" panels and table headers keep their own colors */
html[data-theme="light"] .paper { box-shadow: 0 2px 10px rgba(20,40,80,.08); border: 1px solid #d5dbe7; }
html[data-theme="light"] .pnlm thead th, html[data-theme="light"] .pnlm thead th a,
html[data-theme="light"] .cpa th { color: #fff !important; }
html[data-theme="light"] .cpa td { border-bottom-color: #e3e8f1 !important; }
html[data-theme="light"] .cpa tr.tot td { border-top-color: #33415c !important; }
html[data-theme="light"] .cpa a { color: #0b57c2; }
html[data-theme="light"] .cpa .ok { color: #0f6a43; background: none !important; border: 0 !important; padding: 0; }
html[data-theme="light"] .cpa .bad { color: #b00020; }
/* shared Home bar (pages without the main nav) */
#home-bar { position: relative; z-index: 5; padding: 8px 16px 0; }
#home-bar a { display: inline-block; padding: 5px 12px; border-radius: 999px; font: 600 13px Inter, system-ui, sans-serif; text-decoration: none;
  background: rgba(91,157,255,.22); border: 1px solid rgba(91,157,255,.45); color: #e8f1ff; }
html[data-theme="light"] #home-bar a { background: #e8f0ff; border-color: #b8cdf3; color: #123a7a; }
/* Theme toggle: fixed pill, top-right of the header on every page */
#theme-toggle { position: fixed; top: 12px; right: 16px; z-index: 1000; cursor: pointer;
  padding: 7px 16px; border-radius: 999px; font: 700 14px Inter, system-ui, sans-serif; letter-spacing: .02em;
  background: #fbbf24; color: #1a1400; border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
#theme-toggle:hover { filter: brightness(1.08); }
#theme-toggle:focus-visible { outline: 3px solid #5b9dff; outline-offset: 2px; }
html[data-theme="light"] #theme-toggle { background: #13203a; color: #ffffff; border-color: #fbbf24; box-shadow: 0 2px 10px rgba(20,40,80,.25); }
/* keep header content clear of the pill */
html.has-theme-toggle .navbar { padding-right: 110px; }
html.has-theme-toggle #home-bar { padding-right: 110px; min-height: 30px; }
