:root{
  --surface:#ffffff;--surface-2:#f8fafc;--surface-3:#f2f4f7;--text-strong:#101828;--text-soft:#667085;
  --icon-stroke:1.9;--focus-ring:0 0 0 4px rgba(59,130,246,.14);
}
.ui-icon,.icon-svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:var(--icon-stroke);stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.icon-svg.sm{width:15px;height:15px}.icon-svg.lg{width:20px;height:20px}
.theme-toggle{width:38px;height:38px;border:1px solid var(--line,#e2e8f0);border-radius:12px;background:var(--surface,#fff);color:var(--muted,#64748b);display:inline-grid;place-items:center;padding:0;cursor:pointer;transition:background .16s,border-color .16s,color .16s,transform .16s,box-shadow .16s}
.theme-toggle:hover{color:var(--ink,#0f172a);border-color:#cbd5e1;box-shadow:0 6px 18px rgba(15,23,42,.08);transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:none;box-shadow:var(--focus-ring)}
.btn-icon{display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn-icon .icon-svg{width:15px;height:15px}
.icon-badge{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--blue-soft,#eff6ff);color:var(--blue,#3b82f6)}
.icon-badge.green{background:var(--green-soft,#ecfdf5);color:var(--green,#10b981)}
[data-theme="dark"]{
  --bg:#0b1120;--panel:#111827;--surface:#111827;--surface-2:#151e2d;--surface-3:#1b2637;
  --ink:#f8fafc;--text-strong:#f8fafc;--muted:#a3afc2;--muted2:#718096;--line:#263348;
  --blue:#60a5fa;--blue2:#3b82f6;--blue-soft:#102747;--green:#34d399;--green-soft:#0d2f28;
  --red:#fb7185;--amber:#fbbf24;--shadow:0 18px 48px rgba(0,0,0,.28);
  color-scheme:dark;
}
[data-theme="dark"] body{background:#0b1120!important;color:var(--ink)!important}
[data-theme="dark"] .top{background:rgba(11,17,32,.92)!important;border-color:var(--line)!important}
[data-theme="dark"] .filters,[data-theme="dark"] .hero,[data-theme="dark"] .kpi,[data-theme="dark"] .panel,[data-theme="dark"] .card,[data-theme="dark"] .modal,[data-theme="dark"] .loader-card,[data-theme="dark"] .report-card,[data-theme="dark"] .review-item,[data-theme="dark"] .conversion-row,[data-theme="dark"] .secret-box,[data-theme="dark"] .client-logo,[data-theme="dark"] .logo-preview,[data-theme="dark"] .action-item{background:var(--panel)!important;border-color:var(--line)!important;color:var(--ink)!important}
[data-theme="dark"] .input,[data-theme="dark"] .select,[data-theme="dark"] .textarea,[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{background:#0f172a!important;border-color:#314158!important;color:#e5edf7!important}
[data-theme="dark"] .input::placeholder,[data-theme="dark"] textarea::placeholder,[data-theme="dark"] input::placeholder{color:#64748b!important}
[data-theme="dark"] .periods,[data-theme="dark"] .conv-switch{background:#0f172a!important}
[data-theme="dark"] .periods button.active,[data-theme="dark"] .conv-switch button.active,[data-theme="dark"] .review-btn,[data-theme="dark"] .file-label{background:#1b2637!important;color:#f8fafc!important;border-color:#314158!important}
[data-theme="dark"] th{background:#0f172a!important;border-color:var(--line)!important;color:#718096!important}
[data-theme="dark"] td{border-color:#1d293b!important;color:#a3afc2!important}
[data-theme="dark"] td strong,[data-theme="dark"] .conversion-name b,[data-theme="dark"] .review-title,[data-theme="dark"] .review-section-head h5{color:#f8fafc!important}
[data-theme="dark"] .insight-card,[data-theme="dark"] .conversion-note,[data-theme="dark"] .note,[data-theme="dark"] .reporting-box,[data-theme="dark"] .review-help,[data-theme="dark"] .comparison-banner,[data-theme="dark"] .complete-card{background:#0f172a!important;border-color:#263348!important;color:#a3afc2!important}
[data-theme="dark"] .conversion-total{background:linear-gradient(145deg,#0f172a,#111827)!important;border-color:#263348!important}
[data-theme="dark"] .conversion-meta span{background:#151e2d!important;border-color:#314158!important;color:#a3afc2!important}
[data-theme="dark"] .conversion-track{background:#253247!important}
[data-theme="dark"] .gridline{stroke:#1d293b!important}
[data-theme="dark"] .point{fill:#111827!important}
[data-theme="dark"] .rowbtn{background:#102747!important;color:#93c5fd!important}
[data-theme="dark"] .status,[data-theme="dark"] .secure{background:#0d2f28!important;color:#6ee7b7!important}
[data-theme="dark"] .brand small,[data-theme="dark"] .eyebrow,[data-theme="dark"] .kpi-foot,[data-theme="dark"] .heading p,[data-theme="dark"] .panel-head p,[data-theme="dark"] .footer,[data-theme="dark"] .scope{color:#718096!important}
[data-theme="dark"] .loading{background:rgba(11,17,32,.88)!important}
[data-theme="dark"] .modal-backdrop{background:rgba(2,6,23,.72)!important}
[data-theme="dark"] .close{background:#151e2d!important;border-color:#314158!important;color:#a3afc2!important}
[data-theme="dark"] .pin{background:#0f172a!important;border-color:#314158!important;color:#f8fafc!important}
[data-theme="dark"] .btn.secondary,[data-theme="dark"] .logout-btn{background:#151e2d!important;color:#dbeafe!important;border-color:#314158!important}
[data-theme="dark"] .footer,[data-theme="dark"] .co-brand{color:#718096!important}
[data-theme="dark"] .error,[data-theme="dark"] .connection-bad,[data-theme="dark"] .report-error{background:#321821!important;border-color:#7f1d1d!important;color:#fecdd3!important}
[data-theme="dark"] .connection-ok,[data-theme="dark"] .pin-box{background:#0d2f28!important;border-color:#1f6f57!important;color:#6ee7b7!important}
[data-theme="dark"] .toast{background:#f8fafc!important;color:#0f172a!important}
[data-theme="dark"] .review-item.kept{background:#0d2f28!important;border-color:#1f6f57!important}
[data-theme="dark"] .evidence-pill{background:#102747!important;border-color:#1e3a5f!important;color:#bfdbfe!important}
[data-theme="dark"] .advanced-notes{border-color:var(--line)!important}
[data-theme="dark"] ::selection{background:#1d4ed8;color:#fff}
@media print{.theme-toggle{display:none!important}[data-theme="dark"]{color-scheme:light}[data-theme="dark"] body{background:#fff!important;color:#111827!important}}

[data-theme="dark"] .admin-pill,[data-theme="dark"] .report-period{background:#102747!important;border-color:#1e3a5f!important;color:#93c5fd!important}
[data-theme="dark"] .client{background:#111827!important;border-color:#263348!important;color:#f8fafc!important}
[data-theme="dark"] .client.active{background:#102747!important;border-color:#1e3a5f!important}
[data-theme="dark"] .input[readonly]{background:#151e2d!important;color:#94a3b8!important}
[data-theme="dark"] .custom-date-panel{background:#111827!important;border-color:#314158!important;box-shadow:0 20px 55px rgba(0,0,0,.38)!important}
[data-theme="dark"] .date-btn.secondary{background:#1b2637!important;color:#cbd5e1!important}
[data-theme="dark"] .date-error{background:#321821!important;border-color:#7f1d1d!important;color:#fecdd3!important}
[data-theme="dark"] .report-group{background:#0f172a!important;border-color:#263348!important}
[data-theme="dark"] .report-group h4{color:#94a3b8!important}
[data-theme="dark"] .report-summary,[data-theme="dark"] .report-group li{color:#cbd5e1!important}
[data-theme="dark"] .secondary-badge{background:#3a2610!important;color:#fbbf24!important}
[data-theme="dark"] .conversion-category{background:#1b2637!important;color:#94a3b8!important}
[data-theme="dark"] .client-accent{box-shadow:0 0 0 3px rgba(96,165,250,.09)}
[data-theme="dark"] .badge,[data-theme="dark"] .shield{background:linear-gradient(135deg,rgba(96,165,250,.16),rgba(52,211,153,.13))!important;color:#93c5fd!important}
[data-theme="dark"] .expired{background:#3a2610!important;border-color:#6b3f13!important;color:#fdba74!important}
[data-theme="dark"] .invalid .btn{background:#151e2d!important;color:#e2e8f0!important;border-color:#314158!important}
[data-theme="dark"] .theme-toggle:hover{border-color:#475569!important;color:#f8fafc!important;box-shadow:0 8px 20px rgba(0,0,0,.24)}
.btn svg+span{margin-left:7px}.btn span+.icon-svg{margin-left:7px}.rowbtn svg+span{margin-left:6px}.rowbtn span+.icon-svg{margin-left:6px}

/* v1.0.4 bilingual UI */
.lang-toggle{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 11px;border:1px solid var(--line,#dbe4f0);border-radius:12px;background:var(--card,#fff);color:var(--text,#0f172a);font:600 12px/1 Inter,system-ui,sans-serif;cursor:pointer;transition:.18s ease;white-space:nowrap}
.lang-toggle:hover{transform:translateY(-1px);border-color:rgba(59,130,246,.45);box-shadow:0 6px 18px rgba(15,23,42,.06)}
.lang-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] .lang-toggle{background:rgba(15,23,42,.72);border-color:#26344b;color:#dbeafe}
html[lang="zh-CN"] body{font-family:"Noto Sans SC","Inter",system-ui,-apple-system,sans-serif}
html[lang="zh-CN"] h1,html[lang="zh-CN"] h2,html[lang="zh-CN"] h3,html[lang="zh-CN"] h4,html[lang="zh-CN"] .kpi-value{font-family:"Noto Sans SC","Manrope","Inter",system-ui,sans-serif;letter-spacing:-.025em}
@media(max-width:720px){.lang-toggle{height:34px;padding:0 9px}.lang-toggle .lang-word{display:none}}
