:root{
  --theme-bg:#f5f8f6;
  --theme-panel:#ffffff;
  --theme-panel-2:#f8fbf9;
  --theme-panel-3:#eef5f0;
  --theme-text:#14231b;
  --theme-muted:#6d7c74;
  --theme-line:#dfe8e2;
  --theme-soft:#e8f7ee;
  --theme-input:#ffffff;
  --theme-overlay:rgba(4,15,9,.42);
  --theme-shadow:0 12px 34px rgba(20,43,34,.08);
  --theme-shadow-lg:0 26px 68px rgba(20,43,34,.13);
  --theme-header:rgba(255,255,255,.90);
  --theme-sidebar:#0d1712;
  --theme-sidebar-2:#14251c;
  --theme-footer:#09150e;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --theme-bg:#07100b;
  --theme-panel:#0e1a13;
  --theme-panel-2:#111f17;
  --theme-panel-3:#16271d;
  --theme-text:#edf7f0;
  --theme-muted:#91a69a;
  --theme-line:#24382d;
  --theme-soft:#123522;
  --theme-input:#0b1710;
  --theme-overlay:rgba(0,0,0,.66);
  --theme-shadow:0 16px 42px rgba(0,0,0,.30);
  --theme-shadow-lg:0 30px 78px rgba(0,0,0,.44);
  --theme-header:rgba(8,18,12,.90);
  --theme-sidebar:#050c08;
  --theme-sidebar-2:#0c1c12;
  --theme-footer:#030805;
  --bg:var(--theme-bg);
  --panel:var(--theme-panel);
  --panel2:var(--theme-panel-2);
  --text:var(--theme-text);
  --muted:var(--theme-muted);
  --line:var(--theme-line);
  --green3:#123522;
  --shadow:var(--theme-shadow);
  --oilora-surface:#07100b;
  --oilora-surface-raised:#0e1a13;
  --oilora-border:#24382d;
  --oilora-text:#edf7f0;
  --oilora-text-muted:#91a69a;
  --oilora-graphite-50:#07100b;
  --oilora-graphite-100:#0e1a13;
  --oilora-graphite-200:#17271e;
  --oilora-graphite-300:#2d4336;
  --oilora-graphite-400:#71877a;
  --oilora-graphite-500:#92a59a;
  --oilora-graphite-600:#b2c1b8;
  --oilora-graphite-700:#ced9d2;
  --oilora-graphite-800:#e4ece7;
  --oilora-graphite-900:#f3f8f5;
  --oilora-graphite-950:#fbfdfc;
}

/* First-paint and global surfaces */
html[data-theme="dark"] body{background:var(--theme-bg);color:var(--theme-text)}
html[data-theme="dark"] :where(.main,.content,.public-page,.landing-page,.customer-app,.cp-main){color:var(--theme-text)}
html[data-theme="dark"] ::selection{background:rgba(32,168,92,.34);color:#fff}
html[data-theme="dark"] hr{border-color:var(--theme-line)}
html[data-theme="dark"] code,html[data-theme="dark"] kbd{background:#15251b;color:#d9f7e5;border-color:#294034}
html[data-theme="dark"] a{color:inherit}

/* Inputs, controls, tables */
html[data-theme="dark"] :where(input,select,textarea){background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :where(input,textarea)::placeholder{color:#687e70!important}
html[data-theme="dark"] select option{background:#0b1710;color:#edf7f0}
html[data-theme="dark"] :where(.field input,.field select,.field textarea,.search input,.topbar-search,.reminder-search input){box-shadow:none}
html[data-theme="dark"] :where(table,thead,tbody,tr,td,th){border-color:var(--theme-line)}
html[data-theme="dark"] :where(thead th,.table-head){background:#111f17!important;color:#a9b9af!important}
html[data-theme="dark"] :where(tbody tr:hover){background:#12231a!important}
html[data-theme="dark"] :where(.table-empty,.search-empty){color:var(--theme-muted)}

/* Generic component surfaces. Intentionally high-level so every phase inherits theme. */
html[data-theme="dark"] :where(
  .card,.stat,.login-card,.modal,.drawer,.shell-popover,.toast,
  .settings-card,.settings-nav,.settings-savebar,.brand-live-preview,
  .dash-card,.dash-widget,.dash-kpi,.crm-card,.crm-kpi-card,.crm-time-card,.crm-vehicle-card,
  .wo-card,.wo-list-card,.wo-detail-card,.wo-summary-card,.wo-board-card,
  .res-card,.res-calendar,.res-sidebar,.res-drawer,.res-settings-modal,
  .commerce-card,.commerce-stat,.commerce-product-card,.commerce-order-card,.commerce-order-drawer,
  .plan-card,.plan-feature-card,.loyalty-card,.loyalty-stat,.automation-card,.automation-stat,
  .rbac-card,.rbac-stat,.report-card,.report-stat,.report-filter-card,
  .cp-card,.cp-stat,.cp-vehicle-card,.cp-order-card,.cp-booking-card,.cp-membership-card,
  .feature-demo,.demo-window,.pricing-card,.blog-card,.contact-card,.faq-item,.legal-layout aside,
  .article-toc,.article-lead,.auth-card,.onboarding-card,.ds-card,.ds-panel
){background:var(--theme-panel)!important;border-color:var(--theme-line)!important;color:var(--theme-text);box-shadow:var(--theme-shadow)}

html[data-theme="dark"] :where(
  .panel,.panel-soft,.card-soft,.stat-soft,.dash-subcard,.crm-info,.crm-info-grid>div,
  .wo-line,.wo-summary-line,.res-detail-grid>div,.commerce-drawer-meta>div,.order-drawer-meta>div,
  .setting-switch,.settings-status-grid article,.settings-danger-zone,.automation-health-grid>div,
  .loyalty-tier,.rbac-role-item,.report-mini,.cp-info-row,.cp-summary-row,.cp-wallet-row,
  .demo-content,.demo-kpi,.public-stat,.feature-pill,.plan-limit,.legal-intro
){background:var(--theme-panel-2)!important;border-color:var(--theme-line)!important;color:var(--theme-text)}

html[data-theme="dark"] :where(p,small,label,.muted,.field-help,.page-head p,.settings-section-head p,.crm-kicker+*,.dash-card-head p){color:var(--theme-muted)}
html[data-theme="dark"] :where(h1,h2,h3,h4,strong,b,.page-head h1,.settings-section-head h2){color:var(--theme-text)}

/* Buttons */
html[data-theme="dark"] .btn-ghost,html[data-theme="dark"] .icon-btn{background:#101e16;color:#dcebe2;border-color:#2a4033}
html[data-theme="dark"] .btn-ghost:hover,html[data-theme="dark"] .icon-btn:hover{background:#172a1f;border-color:#355342}
html[data-theme="dark"] .btn-soft{background:#123522;color:#67d795}
html[data-theme="dark"] .btn-danger{background:#331817;color:#ffaca5;border-color:#5c2925}
html[data-theme="dark"] .btn-light{background:#edf8f1;color:#0b542f}
html[data-theme="dark"] :where(button:disabled,.btn:disabled){opacity:.5}

/* Admin shell */
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#050c08 0%,#08130d 100%);border-inline-start-color:#10241a}
html[data-theme="dark"] .side-brand{border-color:#17291e}
html[data-theme="dark"] .nav-item{color:#b9c9bf}
html[data-theme="dark"] .nav-item:hover{background:#0e2116;color:#fff}
html[data-theme="dark"] .nav-item.active{background:linear-gradient(90deg,#14633a,#0f3e28);color:#fff}
html[data-theme="dark"] .topbar{background:var(--theme-header);border-color:var(--theme-line);box-shadow:0 8px 28px rgba(0,0,0,.16)}
html[data-theme="dark"] .topbar-search{background:#0d1b13;border-color:#23392c;color:var(--theme-text)}
html[data-theme="dark"] .topbar-search kbd{background:#17281e;border-color:#2a4033;color:#9db1a5}
html[data-theme="dark"] :where(.branch-btn,.profile,.quick-create){background:#101e16!important;border-color:#293e32!important;color:var(--theme-text)!important}
html[data-theme="dark"] .profile small{color:var(--theme-muted)}
html[data-theme="dark"] .shell-popover{background:#0d1a12!important;border-color:#273d30!important;box-shadow:0 28px 70px rgba(0,0,0,.48)}
html[data-theme="dark"] .shell-option:hover,html[data-theme="dark"] .search-result:hover{background:#14271c}
html[data-theme="dark"] .shell-popover-title{color:#809589;border-color:#24382d}
html[data-theme="dark"] .notification-mini{border-color:#22362b}
html[data-theme="dark"] .mobile-bottom-nav{background:rgba(8,18,12,.96)!important;border-color:#24382d!important}
html[data-theme="dark"] .mobile-bottom-nav :where(a,button){color:#8fa398}
html[data-theme="dark"] .mobile-bottom-nav .active{color:#52c57f}

/* Dashboard + charts */
html[data-theme="dark"] .dash-hero{background:radial-gradient(circle at 88% 15%,rgba(35,163,86,.19),transparent 34%),linear-gradient(135deg,#0b2115,#08130d)!important;border-color:#1f422d!important}
html[data-theme="dark"] .dash-hero :where(h1,p,.dash-date){color:#eaf6ee}
html[data-theme="dark"] .dash-chart-grid,html[data-theme="dark"] .chart-grid{stroke:#2d4437!important}
html[data-theme="dark"] :where(.bar-track,.chart-track,.progress-track){background:#203328!important}
html[data-theme="dark"] :where(.dash-activity-item,.dash-due-row,.dash-stock-row,.dash-team-row){border-color:var(--theme-line)}

/* CRM / Work Orders / Reservations / Commerce */
html[data-theme="dark"] :where(.crm-toolbar,.crm-filterbar,.wo-toolbar,.wo-filterbar,.res-toolbar,.res-filter-bar,.commerce-toolbar,.commerce-filterbar,.reminder-filter-bar){background:#0e1b13!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :where(.crm-profile-hero,.wo-detail-hero,.res-hero,.commerce-hero,.settings-hero,.automation-hero,.reminder-hero,.reports-hero,.loyalty-hero,.rbac-hero){border-color:#274435!important}
html[data-theme="dark"] .crm-profile-tabs{background:#0c1811;border-color:#24382d}
html[data-theme="dark"] .crm-profile-tabs button{color:#95a99d}
html[data-theme="dark"] .crm-profile-tabs button.active{background:#163c26;color:#79dea0}
html[data-theme="dark"] .crm-plate{background:#e9eef0!important;color:#17231c!important}
html[data-theme="dark"] :where(.wo-board-column,.res-calendar-day,.inventory-row,.commerce-list-row){background:#0b1710!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] :where(.modal-backdrop,.res-drawer-backdrop,.commerce-drawer-backdrop){background:var(--theme-overlay)!important}
html[data-theme="dark"] :where(.modal-head,.modal-foot,.res-drawer header,.commerce-order-drawer header){border-color:var(--theme-line)!important}

/* Settings + appearance */
html[data-theme="dark"] .settings-pro{color:var(--theme-text)}
html[data-theme="dark"] .settings-nav a{color:#a7b8ae}
html[data-theme="dark"] .settings-nav a:hover{background:#13231a}
html[data-theme="dark"] .settings-nav a.active{background:#123522;color:#6fdb99;border-color:#24543a}
html[data-theme="dark"] .logo-upload{background:#0b1710!important;border-color:#2a4033!important}
html[data-theme="dark"] .logo-preview{background:#f0f7f2!important}
html[data-theme="dark"] .brand-preview-card{box-shadow:0 24px 58px rgba(0,0,0,.36)}
.theme-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}
.theme-choice{position:relative;display:block;cursor:pointer}
.theme-choice>input{position:absolute;opacity:0;pointer-events:none}
.theme-choice-ui{min-height:174px;border:1px solid var(--line);border-radius:20px;background:var(--panel2);padding:14px;display:flex;flex-direction:column;gap:12px;transition:.18s ease}
.theme-choice:hover .theme-choice-ui{transform:translateY(-2px);border-color:#8fc7a5}
.theme-choice>input:checked+.theme-choice-ui{border-color:var(--oilora-primary-600,#178A4A);box-shadow:0 0 0 3px rgba(23,138,74,.12)}
.theme-choice-preview{height:92px;border-radius:14px;border:1px solid #dfe8e2;overflow:hidden;display:grid;grid-template-columns:28% 72%}
.theme-choice-preview i{display:block}
.theme-choice-preview .preview-side{background:#0d1712}
.theme-choice-preview .preview-main{background:#f5f8f6;position:relative}
.theme-choice-preview .preview-main:before,.theme-choice-preview .preview-main:after{content:"";position:absolute;right:10px;left:10px;border-radius:5px;background:#fff;border:1px solid #dfe8e2}
.theme-choice-preview .preview-main:before{top:12px;height:17px}.theme-choice-preview .preview-main:after{top:38px;height:38px}
.theme-choice[data-mode="dark"] .preview-main{background:#07100b}.theme-choice[data-mode="dark"] .preview-side{background:#030805}.theme-choice[data-mode="dark"] .preview-main:before,.theme-choice[data-mode="dark"] .preview-main:after{background:#0e1a13;border-color:#24382d}
.theme-choice[data-mode="system"] .theme-choice-preview{grid-template-columns:14% 36% 36% 14%;background:#0d1712}.theme-choice[data-mode="system"] .preview-side{grid-column:1/2}.theme-choice[data-mode="system"] .preview-main{grid-column:2/3}.theme-choice[data-mode="system"] .preview-dark{grid-column:3/4;background:#07100b;position:relative}.theme-choice[data-mode="system"] .preview-tail{grid-column:4/5;background:#030805}.theme-choice[data-mode="system"] .preview-dark:before,.theme-choice[data-mode="system"] .preview-dark:after{content:"";position:absolute;right:7px;left:7px;border-radius:5px;background:#0e1a13;border:1px solid #24382d}.theme-choice[data-mode="system"] .preview-dark:before{top:12px;height:17px}.theme-choice[data-mode="system"] .preview-dark:after{top:38px;height:38px}
.theme-choice-copy{display:flex;align-items:center;justify-content:space-between;gap:8px}.theme-choice-copy b{font-size:14px}.theme-choice-copy small{font-size:11px;color:var(--muted)}.theme-choice-check{width:22px;height:22px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;color:transparent}.theme-choice>input:checked+.theme-choice-ui .theme-choice-check{background:var(--oilora-primary-600,#178A4A);border-color:var(--oilora-primary-600,#178A4A);color:#fff}
.theme-system-note{margin-top:18px;padding:14px 16px;border-radius:16px;background:var(--panel2);border:1px solid var(--line);display:flex;gap:12px;align-items:flex-start}.theme-system-note span{font-size:22px}.theme-system-note b{display:block;margin-bottom:3px}.theme-system-note p{margin:0;color:var(--muted);font-size:12px;line-height:1.8}
html[data-theme="dark"] .theme-choice-ui,html[data-theme="dark"] .theme-system-note{background:#0c1811;border-color:#263b2f}

/* Landing + public site */
html[data-theme="dark"] :where(.landing-page,.public-page){background:#07100b;color:#edf7f0}
html[data-theme="dark"] :where(.landing-header,.public-header){background:rgba(7,16,11,.90)!important;border-color:#23372b!important;box-shadow:0 10px 32px rgba(0,0,0,.18)}
html[data-theme="dark"] :where(.landing-links a,.public-links a){color:#b6c7bd}
html[data-theme="dark"] :where(.landing-links a:hover,.public-links a:hover,.public-links a.active){color:#64d58f}
html[data-theme="dark"] :where(.landing-wordmark,.public-header .landing-wordmark){filter:brightness(0) invert(1) opacity(.94)}
html[data-theme="dark"] .landing-hero{background:radial-gradient(circle at 15% 8%,rgba(35,166,88,.16),transparent 31%),linear-gradient(180deg,#07100b,#0a1610)!important}
html[data-theme="dark"] :where(.landing-section,.public-section,.article-body,.faq-page,.legal-section){background:#07100b!important}
html[data-theme="dark"] :where(.landing-section.alt,.public-section.alt,.feature-strip,.pricing-section,.blog-section){background:#0a1510!important}
html[data-theme="dark"] :where(.feature-card,.workflow-card,.testimonial-card,.faq-card,.pricing-card,.blog-card,.feature-detail,.contact-info-card,.contact-form-card){background:#0e1a13!important;border-color:#24382d!important;color:#edf7f0}
html[data-theme="dark"] :where(.feature-card p,.workflow-card p,.blog-card p,.feature-detail p,.pricing-card p,.faq-item p){color:#91a69a!important}
html[data-theme="dark"] :where(.demo-window,.demo-content){background:#0c1811!important;border-color:#263b2f!important}
html[data-theme="dark"] .demo-top{background:#111f17!important;border-color:#263b2f!important}
html[data-theme="dark"] :where(.public-mobile-menu,.landing-mobile-links){background:#0b1710!important;border-color:#263b2f!important;box-shadow:0 22px 50px rgba(0,0,0,.45)}
html[data-theme="dark"] .landing-footer{background:#030805}
html[data-theme="dark"] .article-layout article{color:#dfeae3}

/* Auth / onboarding */
html[data-theme="dark"] :where(.auth-page,.login-wrap,.onboarding-page){background:#07100b}
html[data-theme="dark"] :where(.login-side,.auth-side,.onboarding-side){background:#07100b!important}
html[data-theme="dark"] .login-hero{background:radial-gradient(circle at 20% 15%,#166d3d 0,#0c4025 38%,#061c10 100%)}
html[data-theme="dark"] :where(.auth-tabs,.onboarding-progress,.auth-helper,.demo-box){background:#0b1b12!important;border-color:#254031!important;color:#a8baaf!important}

/* Customer portal */
html[data-theme="dark"] .customer-app{background:#07100b;color:#edf7f0}
html[data-theme="dark"] .cp-header{background:rgba(7,16,11,.94)!important;border-color:#24382d!important}
html[data-theme="dark"] .cp-brand>div>img{filter:brightness(0) invert(1) opacity(.94)}
html[data-theme="dark"] .cp-desktop-nav a{color:#a9bbb0}
html[data-theme="dark"] .cp-desktop-nav a.active{background:#123522;color:#65d28d}
html[data-theme="dark"] :where(.cp-icon-btn,.cp-cart-btn,.cp-profile-btn){background:#101e16!important;border-color:#293e32!important;color:#edf7f0!important}
html[data-theme="dark"] .cp-profile-menu{background:#0d1a12!important;border-color:#293f32!important;box-shadow:0 28px 70px rgba(0,0,0,.48)}
html[data-theme="dark"] .cp-profile-menu :where(a,button){color:#dce9e1}
html[data-theme="dark"] .cp-profile-menu :where(a,button):hover{background:#14271c}
html[data-theme="dark"] .cp-mobile-nav{background:rgba(7,16,11,.97)!important;border-color:#24382d!important}
html[data-theme="dark"] .cp-login-panel{background:#07100b!important}
html[data-theme="dark"] .cp-login-box{background:#0e1a13!important;border-color:#24382d!important;box-shadow:var(--theme-shadow-lg)}
html[data-theme="dark"] .cp-demo-login{background:#0b1b12!important;border-color:#254031!important;color:#a8baaf!important}

/* Status / semantic surfaces remain legible on dark */
html[data-theme="dark"] :where(.badge.green,.cp-status.success){background:#123b25!important;color:#70e09d!important;border-color:#235d3a!important}
html[data-theme="dark"] :where(.badge.orange,.cp-status.waiting){background:#3a2b10!important;color:#f4c56f!important;border-color:#655022!important}
html[data-theme="dark"] :where(.badge.red,.cp-status.danger){background:#3a1918!important;color:#ffaaa4!important;border-color:#682b28!important}
html[data-theme="dark"] :where(.badge.blue){background:#102a44!important;color:#8cc9ff!important;border-color:#214c72!important}
html[data-theme="dark"] :where(.alert,.warning-box,.automation-toast-note){border-color:#354539!important}

/* Logo behavior */
html[data-theme="dark"] img[src$="oilora-wordmark.svg"]{filter:brightness(0) invert(1) opacity(.94)}
html[data-theme="dark"] img[src$="oilora-mark.svg"]{filter:saturate(1.08) brightness(1.06)}

/* Theme toggles */
.theme-toggle{position:relative;display:inline-grid;place-items:center;width:40px;height:40px;min-width:40px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease}
.theme-toggle:hover{transform:translateY(-1px);border-color:#9dcbb0;background:var(--panel2)}
.theme-toggle:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(23,138,74,.14)}
.theme-toggle [data-theme-icon]{font-size:18px;line-height:1;transform:translateY(-1px)}
.theme-toggle [data-theme-label]{display:none}
html[data-theme="dark"] .theme-toggle{background:#101e16;border-color:#293e32;color:#dff2e6}
html[data-theme="dark"] .theme-toggle:hover{background:#172a1f;border-color:#395743}
.public-theme-toggle,.landing-theme-toggle{margin-inline-start:2px}
.cp-theme-toggle{width:38px;height:38px;border-radius:12px}

/* Native scrollbar */
html[data-theme="dark"]{scrollbar-color:#365345 #0a1510}
html[data-theme="dark"] ::-webkit-scrollbar{width:11px;height:11px}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:#0a1510}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#294235;border:3px solid #0a1510;border-radius:999px}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#365747}

/* Print must stay light and ink-friendly regardless of current theme. */
@media print{
  html[data-theme="dark"]{color-scheme:light;--bg:#fff;--panel:#fff;--panel2:#fafafa;--text:#111;--muted:#555;--line:#ddd}
  html[data-theme="dark"] body,html[data-theme="dark"] .content{background:#fff!important;color:#111!important}
  .theme-toggle{display:none!important}
}

@media(max-width:900px){
  .theme-choice-grid{grid-template-columns:1fr}
  .theme-choice-ui{min-height:auto;display:grid;grid-template-columns:130px 1fr;align-items:center}
  .theme-choice-preview{height:78px}
  .landing-theme-toggle,.public-theme-toggle{display:grid}
}
@media(max-width:560px){
  .theme-toggle{width:38px;height:38px;min-width:38px}
  .theme-choice-ui{grid-template-columns:100px 1fr;padding:11px}
  .theme-choice-preview{height:68px}
}

@media(prefers-reduced-motion:reduce){
  .theme-toggle,.theme-choice-ui{transition:none!important}
}
.theme-mobile-row{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font:inherit;font-weight:700}
.theme-mobile-row [data-theme-icon]{font-size:18px}.theme-mobile-row [data-theme-label]{display:inline}
html[data-theme="dark"] .theme-mobile-row{background:#101e16;border-color:#293e32;color:#dff2e6}
.cp-login-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.cp-login-top .cp-back-home{margin:0}

:root{
  accent-color:var(--oilora-primary-600,#178A4A);
  --theme-focus:rgba(23,138,74,.20);
  --theme-danger-soft:#fff4f1;
  --theme-warning-soft:#fff9e9;
}
html[data-theme="dark"]{
  --theme-focus:rgba(111,219,153,.24);
  --theme-danger-soft:#2b1715;
  --theme-warning-soft:#2a2413;
}
html[data-theme="light"] body{color-scheme:light}
html[data-theme="dark"] body{color-scheme:dark}
html[data-theme] :where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--oilora-primary-600,#178A4A);outline-offset:2px;box-shadow:0 0 0 4px var(--theme-focus)}
html[data-theme] :where(input[type="checkbox"],input[type="radio"],input[type="range"]){accent-color:var(--oilora-primary-600,#178A4A)}

html[data-theme="dark"][data-oilora-app="public"] body,
html[data-theme="dark"] body.oilora-app-public,
html[data-theme="dark"] .public-page-phase5,
html[data-theme="dark"] .public-page-phase5 .public-section,
html[data-theme="dark"] .oilora-home,
html[data-theme="dark"] .oilora-home main,
html[data-theme="dark"] .oil-hero,
html[data-theme="dark"] .oil-section,
html[data-theme="dark"] .oil-brand-rail,
html[data-theme="dark"] .oil-final{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .public-page-phase5 .public-section:nth-of-type(even),
html[data-theme="dark"] .oil-cycle-section{background:var(--theme-panel-2)!important}
html[data-theme="dark"] .public-page-phase5 .public-header-v5,
html[data-theme="dark"] .oil-home-header{background:rgba(7,16,11,.94)!important;border-color:var(--theme-line)!important;box-shadow:0 10px 36px rgba(0,0,0,.18)!important}
html[data-theme="dark"] .public-page-phase5 .public-links a{color:#aebfb5!important}
html[data-theme="dark"] .public-page-phase5 .public-links a:hover,
html[data-theme="dark"] .public-page-phase5 .public-links a.active{color:#72dfa0!important}
html[data-theme="dark"] .public-page-phase5 .public-access-btn{background:#101e16!important;border-color:#293e32!important;color:#dcebe2!important}
html[data-theme="dark"] .public-page-phase5 .public-hero{background:radial-gradient(circle at 82% 8%,rgba(46,188,100,.12),transparent 28%),radial-gradient(circle at 12% 82%,rgba(222,164,48,.07),transparent 24%),#07100b!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] .public-page-phase5 .public-brand-proof{color:var(--theme-muted)!important}
html[data-theme="dark"] .public-page-phase5 .public-mobile-menu{background:#0b1710!important;border-color:#263b2f!important;box-shadow:0 18px 40px rgba(0,0,0,.38)!important}
html[data-theme="dark"] .public-page-phase5 .public-mobile-menu a.active{background:#123522!important;color:#72dfa0!important}
html[data-theme="dark"] :where(.oil-home-brand,.oil-final-box) img[src*="wordmark-light.png"]{filter:brightness(0) invert(1) opacity(.96)}
html[data-theme="dark"] .oil-footer img[src*="wordmark-dark.png"]{filter:none}

/* Current landing reset surface (Oilora-specific classes introduced after legacy Theme 22). */
html[data-theme="dark"] :where(.oil-story-card,.oil-cycle-card,.oil-panel-card,.oil-stat,.oil-proof-card,.oil-final-box,.access-card,.access-role-panel,.access-route-guide>div,.brand-showcase-card,.brand-system-copy,.brand-icon-stage){background:var(--theme-panel)!important;border-color:var(--theme-line)!important;color:var(--theme-text)!important;box-shadow:var(--theme-shadow)!important}
html[data-theme="dark"] :where(.oil-story-card p,.oil-cycle-card p,.oil-panel-card p,.oil-stat small,.oil-proof-card p,.access-card p,.access-role-panel p,.access-route-guide small,.brand-showcase-card small,.brand-system-copy p){color:var(--theme-muted)!important}
html[data-theme="dark"] :where(.oil-outline,.access-role){background:#101e16!important;border-color:#293e32!important;color:#dcebe2!important}
html[data-theme="dark"] :where(.panel-login-hint,.access-credentials,.access-state-strip>span){background:var(--theme-panel-2)!important;border-color:var(--theme-line)!important;color:var(--theme-muted)!important}
html[data-theme="dark"] .phase4-access .access-state-strip>span{background:var(--theme-panel)!important;border-color:var(--theme-line)!important;color:var(--theme-muted)!important}

/* Owner Console was introduced by the architecture reset after legacy theme coverage. */
html[data-theme="dark"][data-oilora-surface="platform-owner"] body,
html[data-theme="dark"] .platform-shell{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .platform-topbar{background:rgba(8,18,12,.94)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] .platform-top-actions>a,
html[data-theme="dark"] .platform-top-actions button{background:#101e16!important;border-color:#293e32!important;color:#dcebe2!important}
html[data-theme="dark"] :where(.platform-owner-kpis article,.platform-owner-grid>article,.platform-owner-note){background:var(--theme-panel)!important;border-color:var(--theme-line)!important;color:var(--theme-text)!important;box-shadow:var(--theme-shadow)!important}
html[data-theme="dark"] :where(.platform-runtime-list span,.platform-runtime-ok,.platform-owner-links a){background:var(--theme-panel-2)!important;border-color:var(--theme-line)!important;color:var(--theme-text)!important}
html[data-theme="dark"] :where(.platform-owner-kpis small,.platform-owner-kpis span,.platform-owner-head span,.platform-runtime-list b,.platform-owner-note p){color:var(--theme-muted)!important}

/* Settings Theme transaction/status UI. */
.theme-live-status{display:inline-flex;align-items:center;min-height:30px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);background:var(--panel2);color:var(--muted);font-size:10px;font-weight:800;white-space:nowrap}
html[data-theme-preview="true"] .theme-live-status:after{content:" · پیش‌نمایش";color:var(--oilora-primary-600,#178A4A)}
.theme-a11y-note{display:flex;align-items:flex-start;gap:10px;margin-top:12px;padding:12px 14px;border-radius:14px;border:1px dashed var(--line);background:var(--panel2);font-size:11px;line-height:1.8}.theme-a11y-note b{flex:none}.theme-a11y-note span{color:var(--muted)}
html[data-theme="dark"] :where(.settings-access-banner,.settings-status-grid article,.setting-switch,.settings-savebar,.theme-live-status,.theme-a11y-note){background:var(--theme-panel-2)!important;border-color:var(--theme-line)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .settings-danger-zone{background:var(--theme-danger-soft)!important;border-color:#5a2d27!important}
html[data-theme="dark"] .settings-savebar{box-shadow:0 16px 42px rgba(0,0,0,.32)!important}

/* Mobile active navigation and overlays must not fall back to light after route CSS. */
html[data-theme="dark"] .mobile-bottom-nav button.active,
html[data-theme="dark"] .mobile-bottom-nav a.active{background:#123522!important;color:#72dfa0!important}
html[data-theme="dark"] body.oilora-public-menu-open:after{background:rgba(0,0,0,.54)!important}

/* Browser/system accessibility modes. */
@media(forced-colors:active){
  .theme-toggle,.theme-choice-ui,.theme-mobile-row{forced-color-adjust:auto;border:1px solid ButtonText}
  .theme-choice>input:checked+.theme-choice-ui{outline:2px solid Highlight;outline-offset:2px}
  .theme-choice-check{forced-color-adjust:none;background:Canvas!important;color:CanvasText!important}
}
@media(prefers-contrast:more){
  html[data-theme="dark"]{--theme-muted:#b6c7bd;--theme-line:#456052}
  html[data-theme="light"]{--theme-muted:#4d5f55;--theme-line:#bac8c0}
  .theme-toggle,.theme-choice-ui,.btn,.icon-btn{border-width:2px}
}
