:root{color-scheme:light}
html[data-rf-theme="dark"]{color-scheme:dark;--rf-green:#39b87a;--rf-green-dark:#071b12;--rf-green-deep:#04130d;--rf-green-soft:#173829;--rf-bg:#0f1512;--rf-card:#18221d;--rf-border:#34443b;--rf-text:#edf5f0;--rf-muted:#a6b7ad;--rf-red:#ff7777;--rf-red-soft:#3a2022;--rf-amber:#f0b453;--rf-amber-soft:#3a2c18;--rf-blue:#71a9ef;--rf-purple:#ad8fe6;--rf-shadow:0 1px 3px rgba(0,0,0,.34)}
html[data-rf-theme="dark"] body,html[data-rf-theme="dark"] #app,html[data-rf-theme="dark"] .rf-shell,html[data-rf-theme="dark"] .rf-main,html[data-rf-theme="dark"] .content,html[data-rf-theme="dark"] .portal-shell,html[data-rf-theme="dark"] .login-shell{background:var(--rf-bg)!important;color:var(--rf-text)!important}
html[data-rf-theme="dark"] .topbar,html[data-rf-theme="dark"] .card,html[data-rf-theme="dark"] .login-frame,html[data-rf-theme="dark"] .login-form,html[data-rf-theme="dark"] .login-card,html[data-rf-theme="dark"] .drawer,html[data-rf-theme="dark"] .modal,html[data-rf-theme="dark"] .v155-more-sheet,html[data-rf-theme="dark"] .v155-bottom-nav,html[data-rf-theme="dark"] .mobile-valuation-sheet,html[data-rf-theme="dark"] .kan-col,html[data-rf-theme="dark"] .ticket-card{background:var(--rf-card)!important;color:var(--rf-text)!important;border-color:var(--rf-border)!important}
html[data-rf-theme="dark"] input,html[data-rf-theme="dark"] select,html[data-rf-theme="dark"] textarea,html[data-rf-theme="dark"] button:not(.primary):not(.danger),html[data-rf-theme="dark"] .btn:not(.primary):not(.danger){background:#111b16;color:var(--rf-text);border-color:var(--rf-border)}
html[data-rf-theme="dark"] .table th,html[data-rf-theme="dark"] .table td,html[data-rf-theme="dark"] .price-line,html[data-rf-theme="dark"] .check-row,html[data-rf-theme="dark"] .v155-more-list button{border-color:var(--rf-border)!important;color:var(--rf-text)}
html[data-rf-theme="dark"] .table tbody tr:hover,html[data-rf-theme="dark"] .action-card,html[data-rf-theme="dark"] .alert.info{background:#14281e!important}
html[data-rf-theme="dark"] .muted,html[data-rf-theme="dark"] .subtitle,html[data-rf-theme="dark"] .page-head p,html[data-rf-theme="dark"] small{color:var(--rf-muted)!important}
html[data-rf-theme="dark"] .chart svg{filter:brightness(.9) saturate(1.1)}
html[data-rf-theme="dark"] .v155-profile-card,html[data-rf-theme="dark"] .v155-more-list,html[data-rf-theme="dark"] .v155-more-list>button,html[data-rf-theme="dark"] .rf-language-switcher,html[data-rf-theme="dark"] .language-choice-card,html[data-rf-theme="dark"] .iam-admin-card,html[data-rf-theme="dark"] .topic-panel,html[data-rf-theme="dark"] .checklist-progress,html[data-rf-theme="dark"] .inspection-item,html[data-rf-theme="dark"] .trade-receipt,html[data-rf-theme="dark"] .valuation-box,html[data-rf-theme="dark"] .guided-inspection-card,html[data-rf-theme="dark"] .guide-panel,html[data-rf-theme="dark"] .template-summary,html[data-rf-theme="dark"] .consent,html[data-rf-theme="dark"] .audit-item{background:var(--rf-card)!important;color:var(--rf-text)!important;border-color:var(--rf-border)!important}
html[data-rf-theme="dark"] .topic-head,html[data-rf-theme="dark"] .check-row,html[data-rf-theme="dark"] .selected-row,html[data-rf-theme="dark"] .settings-menu button.active,html[data-rf-theme="dark"] .flow-chip,html[data-rf-theme="dark"] .receipt-ack,html[data-rf-theme="dark"] .inspection-item.failed{background:#14281e!important;color:var(--rf-text)!important;border-color:var(--rf-border)!important}
html[data-rf-theme="dark"] .branch-pill,html[data-rf-theme="dark"] .status-pill,html[data-rf-theme="dark"] .badge.gray{background:#213128!important;color:#dbe9e1!important;border-color:var(--rf-border)!important}
html[data-rf-theme="dark"] .badge.green,html[data-rf-theme="dark"] .status-pill.live{background:#123b28!important;color:#7ee2ad!important}
html[data-rf-theme="dark"] .badge.amber,html[data-rf-theme="dark"] .status-pill.demo,html[data-rf-theme="dark"] .alert.warn{background:#3a2c18!important;color:#ffd27a!important}
html[data-rf-theme="dark"] .badge.red,html[data-rf-theme="dark"] .alert.danger{background:#3a2022!important;color:#ff9b9b!important}
html[data-rf-theme="dark"] .badge.blue{background:#172d48!important;color:#9cc8ff!important}
html[data-rf-theme="dark"] .badge.purple{background:#2d2442!important;color:#cdb9f4!important}
html[data-rf-theme="dark"] .sticky-actions,html[data-rf-theme="dark"] .mobile-valuation-bar{background:rgba(7,27,18,.97)!important;border-color:var(--rf-border)!important}
html[data-rf-theme="dark"] .field label,html[data-rf-theme="dark"] .table th,html[data-rf-theme="dark"] .topic-kicker,html[data-rf-theme="dark"] .item-code,html[data-rf-theme="dark"] .v155-more-list small{color:var(--rf-muted)!important}
html[data-rf-theme="dark"] .link,html[data-rf-theme="dark"] .link-button{color:#86baff!important}
html[data-rf-theme="light"]{color-scheme:light}
.rf-theme-field{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--rf-muted)}
.rf-theme-field select{min-height:36px;border:1px solid var(--rf-border);border-radius:8px;background:var(--rf-card);color:var(--rf-text);padding:0 30px 0 10px}
.rf-theme-mobile{display:grid;gap:6px;padding:12px 2px;border-top:1px solid var(--rf-border);border-bottom:1px solid var(--rf-border);margin:8px 0}
.rf-theme-mobile>span{font-size:10px;color:var(--rf-muted)}
.rf-theme-mobile select{width:100%;min-height:44px}
.rf-theme-login{position:fixed;right:max(14px,env(safe-area-inset-right));top:max(14px,env(safe-area-inset-top));z-index:1000;padding:7px 9px;border:1px solid var(--rf-border);border-radius:10px;background:var(--rf-card);box-shadow:var(--rf-shadow)}
@media(max-width:760px){.top-actions .rf-theme-field{display:none}.rf-theme-login{top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right))}.grid.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.grid.main-side{grid-template-columns:minmax(0,1fr)!important}.head-actions{display:flex;flex-wrap:wrap;gap:6px}.head-actions .btn{flex:1 1 auto}.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.card{min-width:0}.rf-full-dashboard .action-grid{grid-template-columns:1fr}.rf-full-dashboard .table{min-width:620px}.rf-full-dashboard .kpi{min-height:92px}.rf-full-dashboard{padding-bottom:calc(78px + env(safe-area-inset-bottom))}}
