.theme-toggle {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 45;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 4px 16px #0002;
    font: 600 13px/1.4 system-ui, sans-serif;
    cursor: pointer;
}
.theme-toggle:focus-visible { outline: 3px solid #10b981; outline-offset: 3px; }
html[data-theme="dark"] { background: #0b1220; color: #e2e8f0; }
html[data-theme="dark"] body { background: #0b1220 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] :is(.upwork-card, .card, .case, dialog, body > main > section) {
    background: #111c2e !important;
    color: #e2e8f0;
    border-color: #334155 !important;
}
html[data-theme="dark"] [class*="bg-white"] { background-color: #111c2e !important; }
html[data-theme="dark"] :is([class*="bg-slate-50"], [class*="bg-slate-100"], [class*="bg-slate-200"]) { background-color: #1e293b !important; }
html[data-theme="dark"] :is([class*="text-slate-900"], [class*="text-slate-800"], [class*="text-slate-700"]) { color: #f1f5f9 !important; }
html[data-theme="dark"] :is([class*="text-slate-600"], [class*="text-slate-500"], [class*="text-slate-400"], .card p, .intro, .meta, .case p, body > main > section p) { color: #b6c3d5 !important; }
html[data-theme="dark"] :is([class*="border-slate-100"], [class*="border-slate-200"], [class*="border-slate-300"]) { border-color: #334155 !important; }
html[data-theme="dark"] :is([class*="bg-emerald-50"], [class*="bg-emerald-100"], .metrics span) { background-color: #123d35 !important; color: #a7f3d0 !important; }
html[data-theme="dark"] :is([class*="text-emerald-700"], [class*="text-emerald-800"], [class*="text-emerald-900"], .tag) { color: #6ee7b7 !important; }
html[data-theme="dark"] a:not([class*="bg-"]):not([class*="text-white"]):not(.primary) { color: #6ee7b7; }
html[data-theme="dark"] .nav-pill.active { background: #d1fae5 !important; color: #064e3b !important; }
html[data-theme="dark"] :is(input, textarea, select, #share-links a, #copy-page-link, #device-share) { border-color: #475569; }
html[data-theme="dark"] :is(input, textarea, select) { background: #1e293b; color: #f1f5f9; }
html[data-theme="dark"] :is(.filters button, .button:not(.primary), .theme-toggle) { background: #1e293b; color: #e2e8f0; border-color: #475569; }
html[data-theme="dark"] .filters button[aria-pressed="true"] { background: #047857; color: #fff; border-color: #047857; }
html[data-theme="dark"] [class*="hover:bg-slate-"]:hover { background-color: #334155 !important; }
html[data-theme="dark"] [class*="ring-slate-"] { --tw-ring-color: #334155; }
body { padding-bottom: 80px; }

html[data-theme="dark"] .job-success-badge {
    background-color: #172f4b !important;
    color: #bfdbfe !important;
    border-color: #3b628d !important;
}
