/*
  AVAJANG AIOS — Light Mode V24
  Purpose: one last-loaded, role-independent theme layer for the V23 CSS stack.
  Dark mode is untouched. Layout dimensions, responsive breakpoints, and business logic
  are intentionally not modified. Scanner's live-video stage and authored banners stay dark.
*/

/* Stable, keyboard-accessible theme switch in both layouts */
.aios-theme-switch {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:40px;min-width:40px;padding:7px 12px;
  border:1px solid #41596b;border-radius:12px;
  background:#192e40;color:#d6f7f0;
  font:700 12px/1.5 'YBakh',Tahoma,sans-serif;
  white-space:nowrap;cursor:pointer;flex-shrink:0;
  transition:background .18s ease,color .18s ease,border-color .18s ease;
}
.aios-theme-switch:hover{background:#254456;border-color:#82a5ae}
.aios-theme-switch:focus-visible{outline:3px solid #ffb547;outline-offset:3px}
.aios-theme-icon{width:19px;height:19px;flex:0 0 19px}
.aios-theme-icon--moon{display:none}
html[data-theme="light"] .aios-theme-icon--sun{display:none}
html[data-theme="light"] .aios-theme-icon--moon{display:block}
.aios-theme-switch--auth{position:fixed;left:clamp(12px,3vw,32px);top:clamp(12px,3vw,30px);z-index:140}
@media(max-width:650px){
  .topbar .aios-theme-switch{width:40px;padding:6px;flex:0 0 40px}
  .topbar .aios-theme-switch [data-aios-theme-label]{display:none}
  .aios-theme-switch--auth{min-height:40px;padding:6px 10px}
}
html.aios-touch-compact .topbar .aios-theme-switch{width:40px;padding:6px;flex:0 0 40px}
html.aios-touch-compact .topbar .aios-theme-switch [data-aios-theme-label]{display:none}

/* Semantic tokens: explicit values avoid inheriting competing dark :root overrides. */
html[data-theme="light"] {
  color-scheme:light !important;
  --ava-primary:#006f68;--ava-secondary:#e8f1f4;--ava-accent:#ae6e12;
  --ava-text:#183444;--ava-muted:#526b7b;--ava-bg:#f4f8fb;
  --ava-deep:#fff;--ava-surface:#fff;--ava-surface-hover:#eaf5f6;
  --ava-border:#cbdde5;--ava-teal-hover:#006c64;--ava-amber-hover:#8d5710;
  --ava-focus:#006f68;--ava-glow:rgba(194,129,31,.12);
  --ava-brand-glow:rgba(0,111,104,.1);
  --bg:#f4f8fb;--surface:#fff;--surface-soft:#edf4f7;
  --ink:#183444;--muted:#526b7b;--line:#cbdde5;--line-strong:#abc5cf;
  --brand:#006f68;--brand-dark:#00584f;--brand-soft:#e1f3ee;
  --ai-navy:#e7f2f5;--ai-midnight:#f2f8fa;--ai-cyan:#00776d;
  --control-bg:#fff;--control-hover:#edf5f7;--control-fg:#173747;
  --control-muted:#607c8b;--control-line:#bed4dc;--control-accent:#007470;
  --shadow-sm:0 2px 6px rgba(29,60,79,.035);
  --shadow-md:0 10px 26px rgba(25,68,80,.065);
  --shadow-lg:0 22px 52px rgba(24,62,78,.11);
  accent-color:#007470;
}
html[data-theme="light"] body,
html[data-theme="light"] body.ai-platform,
html[data-theme="light"] body.auth-body{
  color:#183444!important;
  background:#f4f8fb!important;
}
html[data-theme="light"] body.ai-platform::before{display:none!important}
html[data-theme="light"] ::selection{background:#9be9d6;color:#063d36}
html[data-theme="light"] :focus-visible{outline-color:#007470}
html[data-theme="light"] .aios-theme-switch{
  background:#fff;color:#176257;border-color:#bbd5da;
  box-shadow:0 2px 10px rgba(21,61,75,.045);
}
html[data-theme="light"] .aios-theme-switch:hover{background:#e6f4f1;border-color:#64b4a4}
html[data-theme="light"] .aios-theme-switch:focus-visible{outline-color:#007470}

/* Main shell: navigational hierarchy, sidebar, topbar, focus treatment. */
html[data-theme="light"] body.ai-platform .main-wrap,
html[data-theme="light"] body.ai-platform .app-shell,
html[data-theme="light"] body.ai-platform .page-content{background:transparent!important;color:#183444!important}
html[data-theme="light"] body.ai-platform .sidebar{
  background:linear-gradient(175deg,#fff,#f1f7f9)!important;
  border-color:#d0e1e7!important;
  box-shadow:-5px 0 24px rgba(17,63,75,.05)!important;
}
html[data-theme="light"] body.ai-platform .sidebar::before,
html[data-theme="light"] body.ai-platform .sidebar::after{display:none!important}
html[data-theme="light"] body.ai-platform .topbar{
  background:rgba(255,255,255,.97)!important;
  border-color:#d6e4e9!important;
  box-shadow:0 2px 14px rgba(26,64,79,.04)!important;
}
html[data-theme="light"] body.ai-platform :is(.top-title,.brand-copy strong,.topbar-identity,.user-copy strong){color:#183c4b!important}
html[data-theme="light"] body.ai-platform :is(.top-kicker,.nav-caption,.brand-copy span,.user-copy span){color:#5e7887!important}
html[data-theme="light"] body.ai-platform :is(.side-brand,.nav-caption i){border-color:#d8e6eb!important}
html[data-theme="light"] body.ai-platform .nav-link{color:#345969!important;background:transparent}
html[data-theme="light"] body.ai-platform .nav-link:hover{background:#e5f3f2!important;color:#006b61!important}
html[data-theme="light"] body.ai-platform .nav-link.active{
  background:#ddf1ec!important;color:#006459!important;
  border-color:#a4d9ca!important;
  box-shadow:inset -3px 0 0 #007470!important;
}
html[data-theme="light"] body.ai-platform .nav-ico,
html[data-theme="light"] body.ai-platform .sidebar-close,
html[data-theme="light"] body.ai-platform .mobile-menu,
html[data-theme="light"] body.ai-platform .logout-btn{
  background:#eaf3f5!important;color:#295667!important;border-color:#c7dce2!important;
}
html[data-theme="light"] body.ai-platform .nav-link.active .nav-ico{background:#c4e9df!important;color:#00685d!important}
html[data-theme="light"] body.ai-platform .side-user{background:#fff!important;border-color:#d4e2e8!important}
html[data-theme="light"] body.ai-platform .avatar{background:#e5f5ef!important;color:#00675c!important;border-color:#b4ddd2!important}
html[data-theme="light"] body.ai-platform .sidebar-scrim.is-visible{background:rgba(10,29,39,.37)!important}
html[data-theme="light"] body.ai-platform .status-pill.aios-service-pill{background:#e3f5ec!important;color:#08684b!important;border-color:#a7d5bd!important}
html[data-theme="light"] body.ai-platform .role-home-button.role-admin{background:#fff2d9!important;color:#7f530e!important;border-color:#d9bc84!important}
html[data-theme="light"] body.ai-platform .role-home-button.role-representative{background:#e5f5ff!important;color:#17647e!important;border-color:#aed6e5!important}
html[data-theme="light"] body.ai-platform .role-home-button.role-customer{background:#e4f6ef!important;color:#00695a!important;border-color:#a4d8c7!important}

/* Elevation, headings, cards, tables, grids, dashboards, status summaries. */
html[data-theme="light"] body.ai-platform :is(.card,.table-card,.acip-card,.request-card,.referral-card,.inspection-card,.profile-card,.metric,.chart-card,.stats-card){
  background:#fff!important;color:#183444!important;border-color:#d2e1e7!important;
  box-shadow:0 5px 20px rgba(18,64,79,.045)!important;
}
html[data-theme="light"] body.ai-platform :is(.card,.table-card,.acip-card) :is(h1,h2,h3,h4),
html[data-theme="light"] body.ai-platform :is(.page-head h1,.section-head strong,.metric strong,.step-title strong,.card-title,.onsite-job-title){color:#173b4a!important}
html[data-theme="light"] body.ai-platform :is(.page-head p,.section-head small,.subtle,.muted,.eyebrow,.field-help,.metric small,.table-total){color:#536f7d!important}
html[data-theme="light"] body.ai-platform :is(.metric,.warranty-summary>div,.info-row,.summary-row,.request-row,.inspection-summary){
  background:#f3f8fa!important;border-color:#d3e4e9!important;color:#1c4051!important;
}
html[data-theme="light"] body.ai-platform :is(.request-row,.table-card,.metric):hover{box-shadow:none}
html[data-theme="light"] body.ai-platform :is(.request-row:hover,tbody tr:hover){background:#edf6f5!important}
html[data-theme="light"] body.ai-platform :is(.empty,.compact-empty){background:#f7fafc!important;color:#567180!important;border-color:#dae7ec!important}
html[data-theme="light"] body.ai-platform :is(.table-wrap,.table-card,.table-toolbar){border-color:#d5e5e9!important;color:#234758!important}
html[data-theme="light"] body.ai-platform .table-toolbar{background:#f7fbfc!important;border-color:#d4e4e9!important;color:#2c5361!important}
html[data-theme="light"] body.ai-platform :is(table,thead,tbody,tr,th,td){border-color:#d5e3e8!important}
html[data-theme="light"] body.ai-platform table th{background:#ecf4f7!important;color:#375b68!important}
html[data-theme="light"] body.ai-platform table td{background:transparent!important;color:#1d3f51!important}
html[data-theme="light"] body.ai-platform table td strong{color:#173a4b!important}
html[data-theme="light"] body.ai-platform table tbody tr:nth-child(even){background:#f7fafb!important}
html[data-theme="light"] body.ai-platform table tbody tr:hover{background:#eaf5f3!important}
html[data-theme="light"] body.ai-platform :is(.table-page-number,.table-total,.table-toolbar .table-pager){color:#345869!important}
html[data-theme="light"] body.ai-platform :is(.table-pager button,.table-page-size,.table-search){
  background:#fff!important;color:#27495c!important;border-color:#c9dde4!important;
}
html[data-theme="light"] body.ai-platform :is(.table-pager button:hover,.table-page-number.active){background:#e0f2ec!important;color:#00675f!important}
html[data-theme="light"] body.ai-platform .table-pager button:disabled{color:#869ca7!important;opacity:.55}
html[data-theme="light"] body.ai-platform :is(.filter-pills a,.tab-btn,.tab-link){color:#375c69!important;border-color:#cbdfe4!important;background:#f6fafb!important}
html[data-theme="light"] body.ai-platform :is(.filter-pills a.active,.tab-btn.active,.tab-link.active){color:#00695e!important;background:#dff3ec!important;border-color:#9ed7c5!important}

/* Inputs: text fields, numbers, file inputs, native select, search-select and checkbox. */
html[data-theme="light"] body.ai-platform :is(.field label,.field>label,.check,.field-help){color:#2d5261!important}
html[data-theme="light"] body.ai-platform :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),textarea,select,.search-select__control,.permission-search input,.table-search){
  background:#fff!important;color:#173747!important;border-color:#bcd4dd!important;
  box-shadow:none!important;
}
html[data-theme="light"] body.ai-platform :is(input,textarea)::placeholder{color:#677f8c!important;opacity:1}
html[data-theme="light"] body.ai-platform :is(input:focus,textarea:focus,select:focus,.search-select__control:focus-within){
  border-color:#007c73!important;box-shadow:0 0 0 3px rgba(0,116,112,.12)!important;
}
html[data-theme="light"] body.ai-platform :is(input:disabled,textarea:disabled,select:disabled,input[readonly]){
  background:#edf3f5!important;color:#647b88!important;opacity:1;
}
html[data-theme="light"] body.ai-platform :is(select option,.search-select__option){background:#fff!important;color:#1b4052!important}
html[data-theme="light"] body.ai-platform .search-select__value,
html[data-theme="light"] body.ai-platform .field .search-select__value{color:#203e4f!important}
html[data-theme="light"] body.ai-platform .search-select__value.is-placeholder{color:#647f8b!important}
html[data-theme="light"] body.ai-platform .search-select__arrow,
html[data-theme="light"] body.ai-platform .search-select.is-open .search-select__arrow{
  background:#e9f3f5!important;border-color:#c9dce2!important;color:#315f68!important;
}
html[data-theme="light"] body.ai-platform .search-select__arrow::before{border-color:#315b65!important}
html[data-theme="light"] body.ai-platform .search-select__menu,
html[data-theme="light"] body.ai-platform .field .search-select__menu,
html[data-theme="light"] body.ai-platform .search-select__options{
  background:#fff!important;color:#173a48!important;border-color:#cbdfe5!important;
  box-shadow:0 14px 42px rgba(22,57,72,.16)!important;
}
html[data-theme="light"] body.ai-platform .search-select__search,
html[data-theme="light"] body.ai-platform .search-select__search:focus{
  background:#f8fbfc!important;color:#183f4b!important;border-color:#c2d9df!important;
}
html[data-theme="light"] body.ai-platform .search-select__option:hover,
html[data-theme="light"] body.ai-platform .search-select__option.is-highlighted,
html[data-theme="light"] body.ai-platform .search-select__option.is-selected{
  background:#e2f4ee!important;color:#006c61!important;
}
html[data-theme="light"] body.ai-platform :is(.search-select__group,.search-select__empty){color:#607d8c!important}
html[data-theme="light"] body.ai-platform .search-select__options{scrollbar-color:#a9c7ce #f4f8fa}
html[data-theme="light"] body.ai-platform :is(.field-error,.field-validation-error,.validation-summary-errors){color:#a02d3c!important}
html[data-theme="light"] body.ai-platform .input-validation-error{background:#fff7f7!important;border-color:#d38995!important}
html[data-theme="light"] body.ai-platform :is(.form-hint,.help-text,.hint){color:#58727e!important}

/* Buttons: preserve strong contrast on primary actions and all semantic states. */
html[data-theme="light"] body.ai-platform :is(.btn,.icon-btn,.action-btn){border-color:#c2d9df;color:#244a59}
html[data-theme="light"] body.ai-platform :is(.btn.primary,.btn.success,.submit-analysis,.btn.hero-action){
  background:#007470!important;color:#fff!important;border-color:#00665e!important;
  box-shadow:0 4px 12px rgba(0,116,112,.13)!important;
}
html[data-theme="light"] body.ai-platform :is(.btn.primary,.btn.success,.submit-analysis):hover{background:#006059!important}
html[data-theme="light"] body.ai-platform :is(.btn.ghost,.btn.secondary,.icon-btn,.btn.tiny,.action-btn){
  background:#f2f8f9!important;color:#1c5362!important;border-color:#bfd7df!important;
}
html[data-theme="light"] body.ai-platform :is(.btn.ghost,.btn.secondary,.icon-btn,.btn.tiny):hover{background:#e1f1f0!important}
html[data-theme="light"] body.ai-platform :is(.btn.danger,.btn.btn-danger){background:#b13b4c!important;color:#fff!important;border-color:#a02e43!important}
html[data-theme="light"] body.ai-platform :is(.btn:disabled,.btn[disabled],button:disabled){opacity:.55;cursor:not-allowed}
html[data-theme="light"] body.ai-platform :is(.status,.role-badge,.badge){border-color:#d1e0e5}
html[data-theme="light"] body.ai-platform :is(.status-completed,.status-approved,.status-duplicatereused,.status.ok,.role-badge.approved){background:#e0f5e8!important;color:#116044!important;border-color:#9cceb0!important}
html[data-theme="light"] body.ai-platform :is(.status-processing,.status-queued,.status.pending){background:#fff3d9!important;color:#805312!important;border-color:#e1bf7b!important}
html[data-theme="light"] body.ai-platform :is(.status-failed,.status-rejected,.status.error){background:#fde8eb!important;color:#9d283b!important;border-color:#e5a1ad!important}
html[data-theme="light"] body.ai-platform :is(.alert,.flash,.inline-message){background:#eef6f9!important;color:#254d5e!important;border-color:#cadee5!important}
html[data-theme="light"] body.ai-platform :is(.alert.success,.flash.success,.inline-message.ok,#warrantyMessage.ok,.photo-identity-status.is-valid){background:#e0f5e9!important;color:#156246!important;border-color:#94d0ae!important}
html[data-theme="light"] body.ai-platform :is(.alert.danger,.flash.danger,.inline-message.bad,#warrantyMessage.bad,.photo-identity-status.is-invalid){background:#fff0f1!important;color:#a02a3f!important;border-color:#e1a7b0!important}
html[data-theme="light"] body.ai-platform :is(.alert.warning,.photo-identity-status.is-checking,.onsite-required-warning){background:#fff4df!important;color:#83550e!important;border-color:#e2c48d!important}
html[data-theme="light"] body.ai-platform .photo-identity-status.is-idle{background:#eff5f8!important;color:#4f7181!important;border-color:#d0e0e7!important}

/* Local Persian calendar (not a browser select). Keep day contrast in every state. */
html[data-theme="light"] body :is(.persian-date-display,.persian-datepicker__time input){background:#fff!important;color:#173747!important;border-color:#bed5dd!important}
html[data-theme="light"] body .persian-date-display::placeholder{color:#6b838e!important}
html[data-theme="light"] body .persian-date-trigger{background:#eaf4f2!important;color:#006d62!important;border-color:#bad8cf!important}
html[data-theme="light"] body .persian-datepicker{
  background:#fff!important;color:#244452!important;border-color:#c9dce3!important;
  box-shadow:0 18px 48px rgba(23,64,80,.16)!important;
}
html[data-theme="light"] body .persian-datepicker :is(.persian-datepicker__title,.persian-datepicker__day){color:#1d4453!important}
html[data-theme="light"] body .persian-datepicker__weekdays span{color:#5e7785!important}
html[data-theme="light"] body .persian-datepicker__nav{background:#eff6f7!important;color:#305b65!important;border-color:#c6dbe1!important}
html[data-theme="light"] body .persian-datepicker__nav:hover{background:#dff1ee!important;color:#00695d!important}
html[data-theme="light"] body .persian-datepicker__day:hover{background:#e5f4f0!important;color:#00695d!important}
html[data-theme="light"] body .persian-datepicker__day.is-today{color:#006b60!important;box-shadow:inset 0 0 0 1px #4eb3a2!important}
html[data-theme="light"] body .persian-datepicker__day.is-selected{background:#007470!important;color:#fff!important;box-shadow:none!important}
html[data-theme="light"] body .persian-datepicker__time{border-color:#d5e3e8!important;color:#415e6f!important}
html[data-theme="light"] body .persian-datepicker__footer{background:#fff!important;border-color:#d5e3e8!important}

/* Inspection, AI analysis, warranty, upload tiles, barcode entry and progress feedback. */
html[data-theme="light"] body.ai-platform :is(.inspection-page,.inspection-journey){color:#173b49}
html[data-theme="light"] body.ai-platform .inspection-page :is(.acip-card,.serial-card,.photo-tile,.warranty-summary,.request-list){
  background:#fff!important;color:#193b4a!important;border-color:#d2e1e7!important;
}
html[data-theme="light"] body.ai-platform .inspection-page .ai-hero{
  background:linear-gradient(125deg,#e4f5f0,#eaf4fa)!important;
  color:#173b49!important;border-color:#c5e4dd!important;
}
html[data-theme="light"] body.ai-platform .inspection-page .ai-hero :is(h1,p,.ai-hero-eyebrow,.ai-hero-caption){color:#1b4b55!important}
html[data-theme="light"] body.ai-platform .inspection-page .ai-hero h1 em{color:#00685e!important}
html[data-theme="light"] body.ai-platform .inspection-page .ai-hero .neural-scene{opacity:.56}
html[data-theme="light"] body.ai-platform .inspection-page :is(.api-state,.ai-section-tag,.journey-step){color:#37606b!important}
html[data-theme="light"] body.ai-platform .inspection-journey .journey-step.is-current{background:#dcf3ec!important;border-color:#8ed6c4!important;color:#00695f!important}
html[data-theme="light"] body.ai-platform .inspection-page .serial-input-shell{
  background:#fff!important;border-color:#bad9df!important;box-shadow:none!important;
}
html[data-theme="light"] body.ai-platform .inspection-page .serial-input-shell .serial-input{
  background:transparent!important;color:#123e4b!important;
}
html[data-theme="light"] body.ai-platform .inspection-page .serial-input::placeholder{color:#668492!important}
html[data-theme="light"] body.ai-platform .inspection-page .photo-tile{background:#f6fafb!important;border-color:#bed6de!important}
html[data-theme="light"] body.ai-platform .inspection-page .photo-tile:hover{border-color:#007d70!important;background:#edf8f4!important}
html[data-theme="light"] body.ai-platform .inspection-page .photo-tile.has-image{background:#fff!important}
html[data-theme="light"] body.ai-platform .inspection-page .photo-placeholder :is(strong,small){color:#345866!important}
html[data-theme="light"] body.ai-platform .inspection-page .ai-upload-guidance{
  background:#edf7f3!important;border-color:#c1e4d9!important;color:#315b61!important;
}
html[data-theme="light"] body.ai-platform .inspection-page .ai-upload-guidance b{color:#006b61!important}
html[data-theme="light"] body.ai-platform .inspection-page .warranty-summary{background:#f0f8f5!important;border-color:#c6e4da!important}
html[data-theme="light"] body.ai-platform .inspection-page .warranty-summary :is(strong,small){color:#2e5261!important}
html[data-theme="light"] body.ai-platform .serial-loader{
  background:#eff8f5!important;color:#244e56!important;border-color:#c0e0d7!important;
}
html[data-theme="light"] body.ai-platform .serial-loader strong{color:#1d4756!important}
html[data-theme="light"] body.ai-platform :is(.progress-card,.global-loader .loader-card){
  background:#fff!important;color:#204353!important;border-color:#c8dfe5!important;
  box-shadow:0 24px 75px rgba(15,49,68,.2)!important;
}
html[data-theme="light"] body.ai-platform :is(.progress-card h3,.progress-card p,.global-loader .loader-card b){color:#214859!important}
html[data-theme="light"] body.ai-platform .progress-bar{background:#e1edef!important}
html[data-theme="light"] body.ai-platform .progress-bar i{background:#007b6f!important}
html[data-theme="light"] body.ai-platform .global-loader{background:rgba(19,42,54,.42)!important}
html[data-theme="light"] body.ai-platform .aios-no-box-notice{
  background:#fff5e6!important;color:#7e520e!important;border-color:#e1c590!important;
}
/* The submitted images themselves and red annotation borders must not be recolored. */
html[data-theme="light"] body.ai-platform .aios-annotated-canvas{background:#eef4f6!important}
html[data-theme="light"] body.ai-platform .aios-detection-outline{border-color:#ed2727!important;background:rgba(235,40,40,.07)!important}
html[data-theme="light"] body.ai-platform .aios-inspection-overlays figcaption{color:#4a6c7b!important}

/* Modal sheets, edit-result/referral dialog, confirmation, chats and toast UI. */
html[data-theme="light"] body.ai-platform .modal{background:rgba(18,43,58,.44)!important}
html[data-theme="light"] body.ai-platform :is(.modal-card,.edit-request-modal__card,.confirm-action-card,.progress-card){
  background:#fff!important;color:#1b3e4f!important;border-color:#cedfe6!important;
  box-shadow:0 20px 65px rgba(21,51,66,.18)!important;
}
html[data-theme="light"] body.ai-platform .modal-card :is(h1,h2,h3,.modal-head strong){color:#183d4b!important}
html[data-theme="light"] body.ai-platform :is(.modal-head,.edit-request-modal__header,.edit-request-modal__footer){
  background:#f5f9fa!important;color:#27495c!important;border-color:#d6e4e9!important;
}
html[data-theme="light"] body.ai-platform #editRequestModal .edit-request-modal__card{background:#fff!important}
html[data-theme="light"] body.ai-platform #editRequestModal :is(.edit-request-modal__header,.edit-request-modal__footer){
  background:#f4f9fa!important;border-color:#d4e3e8!important;
}
html[data-theme="light"] body.ai-platform #editRequestModal .edit-request-modal__header strong{color:#1a3b49!important}
html[data-theme="light"] body.ai-platform #editRequestModal .edit-request-modal__section{border-color:#d8e5e9!important}
html[data-theme="light"] body.ai-platform #editRequestModal .edit-request-modal__section h3{color:#006e66!important}
html[data-theme="light"] body.ai-platform #editRequestModal .field>label:not(.check){color:#2b515f!important}
html[data-theme="light"] body.ai-platform :is(.chat-card,.chat-thread,.chat-compose){border-color:#d2e2e8!important}
html[data-theme="light"] body.ai-platform .chat-thread{background:#f5f9fa!important;color:#234958!important}
html[data-theme="light"] body.ai-platform .chat-message{color:#1d3f50!important;border-color:#d2e2e8!important}
html[data-theme="light"] body.ai-platform .chat-message.admin{background:#dff3ea!important;color:#174e44!important}
html[data-theme="light"] body.ai-platform .chat-message.user{background:#e5f0fa!important;color:#214964!important}
html[data-theme="light"] body.ai-platform .chat-message.system{background:#fff4df!important;color:#785212!important}
html[data-theme="light"] body.ai-platform .chat-meta :is(strong,time){color:#506c78!important}
html[data-theme="light"] body.ai-platform :is(.toast,.toast-card,.toast-message){background:#fff!important;color:#1c4655!important;border-color:#c8dfe6!important}
html[data-theme="light"] body.ai-platform .confirm-action-symbol{background:#ffebed!important;color:#af3644!important}

/* Do not invert the scanner video stage. It is deliberately dark under both themes. */
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card{
  background:#132638!important;color:#effbff!important;border-color:#3e6675!important;
}
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card .modal-head{background:transparent!important}
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card :is(.modal-head strong,.scanner-activity-text,#scannerHint){color:#e6f5f8!important}
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card :is(.scanner-actions .btn,.scanner-footer .btn.ghost){
  background:#213d50!important;color:#eaffff!important;border-color:#4b7280!important;
}
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card :is(.scanner-result,.scanner-activity){
  background:#0d2b3a!important;color:#d5f4fb!important;border-color:#46757e!important;
}
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card .scanner-result bdi{color:#adffeb!important}
html[data-theme="light"] body.ai-platform #scannerModal .scanner-card .scanner-footer .btn.primary{
  background:#007470!important;color:#fff!important;border-color:#007470!important;
}

/* Admin-specific token editor, product catalog, marketing, role/permission forms. */
html[data-theme="light"] body.ai-platform .token-switch-form{
  background:#f4f9fa!important;color:#234858!important;border-color:#cedeE5!important;
}
html[data-theme="light"] body.ai-platform .token-switch-form label{color:#244c5b!important}
html[data-theme="light"] body.ai-platform .amount-in-words{color:#00665b!important}
html[data-theme="light"] body.ai-platform :is(.permission-group,.permissions-card,.catalog-card,.marketing-card){
  background:#fff!important;color:#1c4050!important;border-color:#d5e3e9!important;
}
html[data-theme="light"] body.ai-platform :is(.admin-note,.referral-note,.representative-instruction){
  background:#fff8e8!important;color:#755015!important;border-color:#dfc68f!important;
}

/* On-site staff view and referral details: no dark islands or pale text on white. */
html[data-theme="light"] body.ai-platform :is(.onsite-header,.onsite-stat,.onsite-job,.onsite-info){
  background:#fff!important;color:#193f4d!important;border-color:#cbdfe5!important;
}
html[data-theme="light"] body.ai-platform .onsite-header{background:linear-gradient(115deg,#e9f7f1,#eef5fa)!important}
html[data-theme="light"] body.ai-platform .onsite-profile :is(h1,p){color:#1f4655!important}
html[data-theme="light"] body.ai-platform .onsite-stat strong{color:#006f65!important}
html[data-theme="light"] body.ai-platform .onsite-stat span{color:#54707e!important}
html[data-theme="light"] body.ai-platform .onsite-fallback{background:#d5f2e9!important;color:#00756b!important}
html[data-theme="light"] body.ai-platform .onsite-facts>div{
  background:#f3f8fa!important;border-color:#d3e2e8!important;color:#244757!important;
}
html[data-theme="light"] body.ai-platform .onsite-facts span{color:#597786!important}
html[data-theme="light"] body.ai-platform .onsite-facts strong{color:#1d3b4a!important}
html[data-theme="light"] body.ai-platform :is(.onsite-code,.onsite-job-title){color:#006d63!important}
html[data-theme="light"] body.ai-platform .onsite-empty p{color:#617c88!important}

/* Authentication layout (loads a shorter CSS stack). Treat showcase art as branded asset. */
html[data-theme="light"] body.auth-body .auth-workspace{background:#f4f8fb!important;color:#1c4253!important}
html[data-theme="light"] body.auth-body :is(.auth-card,.auth-login-card,.register-card){
  background:#fff!important;color:#1b3e4d!important;border-color:#d4e4e9!important;
  box-shadow:0 16px 46px rgba(20,59,77,.075)!important;
}
html[data-theme="light"] body.auth-body :is(.auth-card h1,.auth-card h2,.auth-kicker,.auth-card .field label){color:#214658!important}
html[data-theme="light"] body.auth-body :is(.auth-card input:not([type="checkbox"]),.auth-card textarea,.auth-card select){
  background:#fff!important;color:#1c4052!important;border-color:#bfd5df!important;
}
html[data-theme="light"] body.auth-body :is(.auth-card input,.auth-card textarea)::placeholder{color:#718690!important}
html[data-theme="light"] body.auth-body :is(.check,.auth-card .check,.auth-card .check span){color:#365b69!important}
html[data-theme="light"] body.auth-body :is(.field-error,.field-validation-error){color:#a52c42!important}
html[data-theme="light"] body.auth-body .auth-card :is(.btn.ghost,.auth-link-button){background:#edf7f5!important;color:#00685f!important;border-color:#c3ded6!important}
html[data-theme="light"] body.auth-body .auth-card .btn.primary{background:#007470!important;color:#fff!important;border-color:#00665d!important}
html[data-theme="light"] body.auth-body .auth-card .alert.danger{background:#fff0f1!important;color:#982b3e!important;border-color:#dfa8b1!important}
html[data-theme="light"] body.auth-body .auth-card .alert.success{background:#e0f4e8!important;color:#135d41!important;border-color:#9bceb0!important}
html[data-theme="light"] body.auth-body .auth-showcase{background:#0e2b3b!important;color:#fff!important}
html[data-theme="light"] body.auth-body .auth-showcase :is(h2,p,.auth-showcase-eyebrow){color:#f1faff!important}
html[data-theme="light"] body.auth-body :is(.global-loader .loader-card){background:#fff!important;color:#234555!important}
html[data-theme="light"] body.auth-body :is(.global-loader .loader-card b){color:#234555!important}

/* Native widgets and motion preferences. No dimensions are changed. */
html[data-theme="light"] body.ai-platform :is(input[type="checkbox"],input[type="radio"]),
html[data-theme="light"] body.auth-body :is(input[type="checkbox"],input[type="radio"]){accent-color:#007470}
html[data-theme="light"] body.ai-platform :is(input[type="file"],input[type="date"]){color-scheme:light}
@media(prefers-reduced-motion:reduce){.aios-theme-switch{transition:none}}
