/* HRIS Dark Mode: targeted contrast and workflow polish (November 2026).
   App UI only: no changes to business logic, uploaded files, print templates or PDFs. */
html.dark {
    --hris-bg: #0c1524;
    --hris-card: #172439;
    --hris-elevated: #1b2a3f;
    --hris-input: #101d2e;
    --hris-text: #e6eef9;
    --hris-secondary: #a9bbd0;
    --hris-border: #34465c;
    --hris-blue: #80cffa;
}
/* Main shell: sidebar and topbar form one coherent visual system. */
html.dark #sidebar { background:#121f30; border-color:#34465c; }
html.dark #sidebar nav { scrollbar-color:#33465c transparent; }
html.dark #sidebar .border-b { border-color:#2c3b50; }
html.dark #mainContent { background:#0c1524; }
html.dark #mainContent > header { background:rgb(19 31 47 / .94); border-color:#34465c; }
html.dark #sidebarOverlay { background:rgb(0 0 0 / .6); }
html.dark #sidebar [class~="bg-sky-50"],
html.dark #sidebar [class~="bg-sky-50/70"] { background:#16364a; }
html.dark #sidebar [class~="bg-emerald-50"] { background:#15382e; }
html.dark #sidebar [class~="bg-violet-50"] { background:#312c4b; }
html.dark #sidebar [class~="hover:bg-slate-50"]:hover { background:#24364b; }
html.dark #sidebar [class~="hover:text-slate-900"]:hover { color:#f8fbff; }
html.dark #mainContent .hris-theme-toggle,
html.dark #sidebar .hris-theme-toggle { background:#20344a; }
/* Neutral buttons, filters and fields stay legible even where older pages omit classes. */
html.dark :where(input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),textarea,select) {
    color:var(--hris-text);
    caret-color:#bfe9ff;
}
html.dark :where(textarea, input, select):read-only { color: #c4d3e4; }
html.dark :where(table) { color:inherit; }
html.dark :where(thead) { color:#b7c9df; }
html.dark :where(dialog, [role="dialog"]) { color:#e6eef9; }
html.dark [class~="bg-white"] :where(input,select,textarea):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]) { border-color:#34465c; }
html.dark [class~="bg-white/90"] :where(input,select,textarea):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]) { border-color:#34465c; }
html.dark [class~="ring-white"] { --tw-ring-color:#35475c; }
html.dark :where(input[type="file"])::file-selector-button { background:#263a50; color:#dceafa; border:1px solid #405773; border-radius:7px; padding:6px 10px; }
html.dark [class~="text-slate-400"]::placeholder,
html.dark [class~="text-slate-500"]::placeholder { color:#8fa4bc; }
/* Explicit link and badge hues on navy surfaces. */
html.dark [class~="text-sky-700"],html.dark [class~="text-sky-800"] { color:#84d1ff; }
html.dark [class~="text-emerald-700"],html.dark [class~="text-emerald-800"] { color:#7fe7bb; }
html.dark [class~="text-amber-700"],html.dark [class~="text-amber-800"] { color:#f2d08b; }
html.dark [class~="text-rose-700"],html.dark [class~="text-red-700"] { color:#ffa8b5; }
/* Keep saturated primary buttons and white button captions intact. */
html.dark [class~="bg-sky-600"],html.dark [class~="bg-blue-600"] { background-color:#0369a1; }
html.dark [class~="bg-sky-500"] { background-color:#0284c7; }
html.dark [class~="bg-emerald-600"] { background-color:#047857; }
html.dark [class~="bg-rose-600"] { background-color:#be123c; }
html.dark [class~="bg-violet-600"] { background-color:#6d28d9; }
html.dark [class~="text-white"] { color:#ffffff; }
html.dark [class~="bg-sky-600"][class~="text-sky-700"] { color:#fff; }
/* Supporting HR including Leave Management, Contract Management, Dispensasi and PKWT. */
html.dark .hr-workspace { --hr-ink:#e8f0fa; --hr-muted:#a8bbcf; --hr-soft:#18273a; --hr-line:#32465c; --hr-accent:#81cffb; color:#d9e6f4; }
html.dark .hr-workspace .hr-card,
html.dark .hr-workspace .hr-metrics { background:#172439; border-color:#34465c; }
html.dark .hr-workspace .hr-button { color:#d7e7f6; border-color:#3d526b; background:#1d3045; }
html.dark .hr-workspace .hr-button:hover { background:#284159; border-color:#52758f; }
html.dark .hr-workspace .hr-button--primary { background:#066a9e; border-color:#1688bd; color:#fff; }
html.dark .hr-workspace .hr-button--primary:hover { background:#087db4; border-color:#2198ce; }
html.dark .hr-workspace .hr-table { color:#d5e3f1; }
html.dark .hr-workspace .hr-table :where(th) { color:#bbcee1; background:#213147; }
html.dark .hr-workspace .hr-field,
html.dark .hr-workspace .hr-compose-label { color:#c4d5e6; }
html.dark .hr-workspace .hr-control,
html.dark .hr-workspace .hr-field :is(input:not([type="hidden"]),select,textarea) { background:#101d2e; border-color:#405168; color:#edf4fd; }
html.dark .hr-workspace .hr-field :is(input,textarea)::placeholder { color:#8da4bc; }
html.dark .hr-workspace .hr-control:disabled { background:#1b2839; color:#8fa2b6; }
html.dark .hr-workspace .hr-filters--contract-pro { background:linear-gradient(#1b2a3f,#172439); }
html.dark .hr-workspace .hr-contract-summary-bar { background:#192b3f; }
html.dark .hr-workspace .hr-doc-chip { color:#96d8fe; background:#172f43; }
html.dark .hr-workspace .hr-doc-chip--muted { color:#9cb0c7; background:#233044; }
html.dark .hr-leave-ledger tbody tr:nth-child(even) td { background:#17243a; }
html.dark .hr-leave-ledger tbody tr:hover td { background:#22374e; }
html.dark .hr-leave-avatar { background:#24384b; color:#b1d7ef; }
html.dark .hr-leave-stat { background:#26364a; border-color:#455b73; color:#e1ebf7; }
html.dark .hr-leave-stat--used { background:#3a2c20; border-color:#705331; color:#f0cb89; }
html.dark .hr-leave-stat--remaining.hr-tone-neutral { background:#253247; border-color:#45546b; color:#c3d4e6; }
html.dark .hr-leave-stat--remaining.hr-tone-green { background:#123b30; border-color:#315d4f; color:#8deac4; }
html.dark .hr-leave-stat--remaining.hr-tone-red { background:#432b38; border-color:#704858; color:#ffa8b8; }
html.dark .hr-leave-surface { color:#d9e6f4; }
html.dark .hr-workspace .hr-compose-card > .hr-card-head { border-bottom-color:#35475d; }
html.dark .hr-workspace .hr-compose-card .hr-compose-heading h2 { color:#edf5fd; }
html.dark .hr-workspace .hr-compose-card .hr-compose-heading p { color:#a9bfd4; }
html.dark .hr-workspace .hr-compose-card :is(.hr-compose-native,.hr-compose-search input[data-employee-search],.hr-compose-expiry) { background:#111e30; border-color:#415a73; color:#edf5fd; }
html.dark .hr-workspace .hr-compose-card .hr-compose-search > svg { color:#8fa6bf; }
html.dark .hr-workspace .hr-compose-card .hr-compose-note { border-top-color:#34465c; color:#a9bbcf; }
html.dark .hr-workspace .hr-compose-card .hr-compose-note svg { color:#80cffa; }
/* Contract Management's independent CM5 design system. */
html.dark .cm5 { --cm-ink:#e8f0fa; --cm-text:#d8e5f3; --cm-muted:#acbfd2; --cm-line:#34465c; --cm-primary:#80cffa; --cm-soft:#152439; --cm-shadow:0 6px 20px rgb(0 0 0 / .20); }
html.dark .cm5 .cm5-panel,
html.dark .cm5 .cm5-stat { background:#172439; border-color:#354860; }
html.dark .cm5 .cm5-resultstrip,
html.dark .cm5 .cm5-filters { background:#192a3d; }
html.dark .cm5 .cm5-control { background:#101d2d; color:#eaf3fd; border-color:#43576e; }
html.dark .cm5 .cm5-control::placeholder { color:#90a6ba; }
html.dark .cm5 .cm5-table th { background:#24344a; color:#bacbdd; border-color:#395068; }
html.dark .cm5 .cm5-table td { border-color:#324359; }
html.dark .cm5 .cm5-table tbody tr:hover { background:#20334a; }
html.dark .cm5 .cm5-detail,
html.dark .cm5 .cm5-export,
html.dark .cm5 .cm5-link-button { background:#20344b; color:#aedcf9; border-color:#49627c; }
html.dark .cm5 .cm5-export--excel { background:#163a31; color:#89e7c2; border-color:#31654f; }
html.dark .cm5 .cm5-export--pdf { background:#422a38; color:#ffadbe; border-color:#78495a; }
html.dark .cm5 .cm5-detail:hover,
html.dark .cm5 .cm5-export:hover { background:#2a4660; }
html.dark .cm5 .cm5-button { background:#0873a6; color:#fff; border-color:#1384b6; }
html.dark .cm5 .cm5-counter { background:#27384c; color:#c9d9e9; }
html.dark .cm5 .cm5-period { color:#b4c4d5; }
html.dark .cm5 .cm5-period b { color:#8fa6bd; }
html.dark .cm5-toast { color:#e5eff9; background:#172639; }
/* Dispensasi detail has an independent DSP component layer. */
html.dark .dsp-page { --dsp-line:#34465c; --dsp-muted:#a9bdd1; --dsp-blue:#83d0ff; --dsp-soft:#1b2b3e; --dsp-ink:#e9f1fa; }
html.dark .dsp-page .dsp-card { background:#172439; border-color:#34465c; }
html.dark .dsp-page .dsp-person { background:#1b2b3e; border-color:#34465c; }
html.dark .dsp-page .dsp-person h3,
html.dark .dsp-page .dsp-attachment-heading strong { color:#edf5fd; }
html.dark .dsp-page :is(dt,.dsp-hr-note h3,.dsp-reason h3) { color:#a8bed2; }
html.dark .dsp-page dd { color:#e5effa; }
html.dark .dsp-page .dsp-reason p,
html.dark .dsp-page .dsp-hr-note,
html.dark .dsp-page .dsp-attachment-preview { background:#1b2a3f; color:#dce8f7; border-color:#3a4f68; }
html.dark .dsp-page .dsp-input { background:#101e30; border-color:#435a72; color:#eaf2fa; }
html.dark .dsp-page .dsp-button--primary { color:#fff; background:#086d9c; }
html.dark .dsp-page .dsp-button--approve { color:#fff; background:#127153; }
html.dark .dsp-page .dsp-button--outline { background:#1e3147; color:#d4e8f7; border-color:#476179; }
html.dark .dsp-page .dsp-button--danger { background:#432836; color:#ffadbd; border-color:#744353; }
/* Public employee forms: scoped classes prevent accidental impact on authenticated pages. */
html.dark body.hris-public-leave { --primary:#164f83; --blue:#82d3ff; background:#0f1a29; }
html.dark body.hris-public-leave .card,
html.dark body.hris-public-leave .form-box { background:#172439; color:#e2edf8; }
html.dark body.hris-public-leave .field input,
html.dark body.hris-public-leave .field select,
html.dark body.hris-public-leave .field textarea { background:#101e30; color:#e8f1fc; border-color:#435870; }
html.dark body.hris-public-leave .field-label { color:#c5d6e8; }
html.dark body.hris-public-leave .btn { color:white; background:#075f90; }
html.dark body.hris-public-leave .btn-secondary { color:#d2e8f9; background:#223a50; }
html.dark body.hris-public-leave .request-meta strong,
html.dark body.hris-public-leave .info strong { color:#e9f1fa; }
html.dark body.hris-public-dispensation { --blue:#80cffa; --blue-soft:#19384b; --bg:#0f1a2b; --card:#172439; color:#e5effa; }
html.dark body.hris-public-dispensation .field input,
html.dark body.hris-public-dispensation .field select,
html.dark body.hris-public-dispensation .field textarea { background:#101f30; color:#e6f0fa; border-color:#41576d; }
html.dark body.hris-public-dispensation .label { color:#c6d7e8; }
html.dark body.hris-public-dispensation .choice-tip,
html.dark body.hris-public-dispensation .declaration { color:#d0dfed; }
html.dark body.hris-public-dispensation .submit { background:#086ca8; color:#fff; }
/* User-uploaded image/video previews preserve original colors; never invert. */
html.dark :is(img,video,canvas,iframe,object,embed) { filter:none; }
/* Legacy hover states with translucent Tailwind utility tokens. */
html.dark [class~="hover:bg-slate-50/60"]:hover,
html.dark [class~="hover:bg-slate-50/50"]:hover,
html.dark [class~="hover:bg-slate-50/40"]:hover,
html.dark [class~="hover:bg-slate-50/70"]:hover,
html.dark [class~="group-hover:bg-slate-50/95"]:hover { background-color:#24364b; }
html.dark [class~="hover:bg-white/80"]:hover { background-color:#23374e; }
html.dark [class~="hover:bg-sky-50/30"]:hover,
html.dark [class~="hover:bg-sky-50/40"]:hover,
html.dark [class~="hover:bg-sky-50/50"]:hover,
html.dark [class~="hover:bg-sky-100"]:hover,
html.dark [class~="hover:bg-blue-50"]:hover { background-color:#1a4059; }
html.dark [class~="hover:bg-emerald-100"]:hover,
html.dark [class~="hover:bg-emerald-50/50"]:hover { background-color:#1b4739; }
html.dark [class~="hover:bg-violet-50"]:hover,
html.dark [class~="hover:bg-violet-100"]:hover,
html.dark [class~="hover:bg-violet-100/60"]:hover { background-color:#373356; }
html.dark [class~="hover:bg-amber-50"]:hover,
html.dark [class~="hover:bg-amber-100/60"]:hover { background-color:#48351d; }
html.dark [class~="hover:bg-rose-100"]:hover,
html.dark [class~="hover:bg-rose-100/60"]:hover,
html.dark [class~="hover:bg-red-100"]:hover { background-color:#4a2d3a; }
html.dark [class~="ring-sky-100"],html.dark [class~="ring-sky-200"],html.dark [class~="ring-indigo-100"] { --tw-ring-color:#275d7a; }
html.dark [class~="ring-emerald-100"],html.dark [class~="ring-emerald-200"] { --tw-ring-color:#31644f; }
html.dark [class~="ring-violet-100"],html.dark [class~="ring-violet-200"] { --tw-ring-color:#514773; }
html.dark [class~="ring-amber-100"],html.dark [class~="ring-amber-200"] { --tw-ring-color:#77552f; }
html.dark [class~="ring-red-100"],html.dark [class~="ring-rose-200"] { --tw-ring-color:#80475a; }
