/* Shared, persistent accessibility preferences for every SaaS screen. */
.appearance-controls{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.appearance-button{appearance:none;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--text);font:inherit;font-size:.78rem;font-weight:700;line-height:1;padding:.6rem .72rem;cursor:pointer}
.appearance-button:hover{border-color:var(--mint);color:var(--mint)}
.appearance-button:focus-visible{outline:3px solid var(--blue);outline-offset:3px}

html[data-theme="light"]{--bg:#f5f8fb;--panel:#ffffff;--line:#c7d3df;--text:#132335;--muted:#43586b;--mint:#08765d;--blue:#075eb8;color-scheme:light}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}
html[data-theme="light"] header,html[data-theme="light"] aside{background:#ffffff;border-color:var(--line)}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#ffffff;color:var(--text);border-color:var(--line)}
html[data-theme="light"] .hero-panel,html[data-theme="light"] .featured{background:#102233;color:#f3f4ee}
html[data-theme="light"] .button.quiet{background:#ffffff;color:var(--text);border-color:var(--line)}
/* Shared status pills must remain readable in every SaaS surface, not only admin. */
html[data-theme="dark"] .pill{background:#17364b;color:#f3f4ee;border-color:#47718a;font-weight:700}
html[data-theme="light"] .pill{background:#e8f1f7;color:#132335;border-color:#7d9aac;font-weight:700}
html[data-theme="dark"] .pill.warning{color:#ffd087}
html[data-theme="light"] .pill.warning{color:#8c5700}

/* Light-mode controls use paired foreground/background tokens. Dark preview
   panels keep their own complete palette instead of inheriting dark text. */
html[data-theme="light"] body[data-page] .button:not(.quiet){background:#08765d;color:#fff}
html[data-theme="light"] body[data-page] .button:not(.quiet):hover{background:#065f4c;color:#fff}
html[data-theme="light"] body[data-page] .button.quiet:hover{background:#e8f1f7;color:#132335}
html[data-theme="light"] aside nav a:hover,html[data-theme="light"] aside nav a.selected{background:#e8f1f7;color:#132335}
html[data-theme="light"] .user-center{background:#f5f8fb}
html[data-theme="light"] .broker-tab:hover,html[data-theme="light"] .broker-tab.selected{background:#e8f1f7;color:#132335;border-color:#7d9aac}
html[data-theme="light"] .hero-panel,html[data-theme="light"] .featured{--text:#f3f4ee;--muted:#a7bac8;--mint:#a2f1cf;--blue:#78b7ff;--line:#355569}
html[data-theme="light"] .featured .button:not(.quiet){background:#08765d;color:#fff}
.panel-head>div,.page-heading>div{min-width:0}
.panel-head{flex-wrap:wrap}
.page-heading .pill,.panel-head .pill{white-space:normal;overflow-wrap:anywhere}

html[dir="rtl"] body{font-family:Tahoma,"Segoe UI",Arial,sans-serif}
html[dir="rtl"] .crumb{direction:rtl}
html[dir="rtl"] .identity{direction:ltr;unicode-bidi:embed}
html[dir="rtl"] .metric-row,html[dir="rtl"] .preview-row{direction:rtl}
html[dir="rtl"] aside{inset:0 0 0 auto;border-right:0;border-left:1px solid var(--line)}
html[dir="rtl"] .workspace{margin-left:0;margin-right:238px}
html[dir="rtl"] .preview-row .pill{margin-left:0;margin-right:auto}
html[dir="rtl"] .card ul{padding-left:0;padding-right:18px}
@media(max-width:1050px){html[dir="rtl"] .workspace{margin-right:200px}}
@media(max-width:760px){html[dir="rtl"] aside{inset:auto;border-left:0}html[dir="rtl"] .workspace{margin-right:0}}
@media(max-width:720px){.appearance-controls{width:100%;justify-content:flex-end}html[dir="rtl"] .appearance-controls{justify-content:flex-start}}
