/* RPOP - Dark mode (toggle beside the notification bell). Same colors the old RPO pages used. */
html[data-theme="dark"]{color-scheme:dark;--doh-bg:#0f1117;--doh-text:#e2e8f0;--doh-muted:#94a3b8;--doh-border:#2d3148;--doh-light:#1e2a44;--doh-inp:#0f1117;--shadow:0 2px 10px rgba(0,0,0,.35)}
html[data-theme="dark"] body{background:#0f1117;color:#e2e8f0}

/* layout */
html[data-theme="dark"] .sidebar{background:#151823;border-right-color:#2d3148}
html[data-theme="dark"] .sb-title{color:#cfe0ff;border-bottom-color:#2d3148}
html[data-theme="dark"] .sidebar nav a,html[data-theme="dark"] .sb-logout button{color:#cbd5e1}
html[data-theme="dark"] .sidebar nav a i{color:#60a5fa}
html[data-theme="dark"] .sidebar nav a:hover,html[data-theme="dark"] .sb-logout button:hover{background:#1f2433}
html[data-theme="dark"] .sidebar nav a.active{background:linear-gradient(135deg,#1252a3,#003882);color:#fff}
html[data-theme="dark"] .sidebar nav a.active i{color:#fff}
html[data-theme="dark"] .sb-sep{color:#7c8aa5}

/* cards, titles, tables, forms */
html[data-theme="dark"] .card,html[data-theme="dark"] .kpi,html[data-theme="dark"] .filter-bar,html[data-theme="dark"] .cmp-modal,
html[data-theme="dark"] .admin .doh-modal,html[data-theme="dark"] .bell-dropdown,html[data-theme="dark"] .pager{background:#1a1d27;border-color:#2d3148;color:#e2e8f0}
html[data-theme="dark"] .card-hd{background:#1f2433;border-bottom-color:#2d3148}
html[data-theme="dark"] .card-hd h3,html[data-theme="dark"] .card-hd i{color:#cfe0ff}
html[data-theme="dark"] .page-title h1,html[data-theme="dark"] .rpo-pt h1,html[data-theme="dark"] .kpi .k-val{color:#e6eefc}
html[data-theme="dark"] .muted,html[data-theme="dark"] .page-title p,html[data-theme="dark"] small{color:#94a3b8}
html[data-theme="dark"] .tbl th{background:#0f1117;color:#94a3b8;border-bottom-color:#2d3148}
html[data-theme="dark"] .tbl td{border-bottom-color:#2d3148}
html[data-theme="dark"] .tbl tr:hover td{background:#1f2433}
html[data-theme="dark"] .inp,html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]),
html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0f1117!important;color:#e2e8f0!important;border-color:#2d3148!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#64748b!important}
html[data-theme="dark"] label,html[data-theme="dark"] .form-f label{color:#cbd5e1}
html[data-theme="dark"] .btn-outline{background:#1a1d27;color:#cfe0ff;border-color:#3a4566}
html[data-theme="dark"] .alert-info{background:#0d1f3a;color:#9cc3ff;border-color:#1e3a66}
html[data-theme="dark"] .alert-success{background:#0d2414;color:#86efac;border-color:#1e7e34}
html[data-theme="dark"] .alert-warning{background:#2a2108;color:#fcd34d;border-color:#6b5210}
html[data-theme="dark"] .alert-danger{background:#2a0d10;color:#fca5a5;border-color:#7f1d1d}
html[data-theme="dark"] .badge.b-gray{background:#2d3148;color:#cbd5e1}
html[data-theme="dark"] .dl dt{color:#94a3b8}
html[data-theme="dark"] code,html[data-theme="dark"] .temp-pw{background:#0f1117;color:#fcd34d}
html[data-theme="dark"] .live-pill{background:#1a1d27;color:#cbd5e1;border-color:#2d3148}

/* bell window */
html[data-theme="dark"] .bell-item{background:#1a1d27;border-bottom-color:#2d3148}
html[data-theme="dark"] .bell-item:hover{background:#1f2433}
html[data-theme="dark"] .bell-title-row{color:#e2e8f0}
html[data-theme="dark"] .bell-sub,html[data-theme="dark"] .bell-meta{color:#94a3b8}
html[data-theme="dark"] .bell-foot{background:#151823;border-top-color:#2d3148}

/* RPO pages (native look parts) */
html[data-theme="dark"] .rpo-page .list-hero h1,html[data-theme="dark"] .rpo-page .page-title,html[data-theme="dark"] .pg-amendment-history .container>h1{color:#e6eefc!important}
html[data-theme="dark"] .rpo-page .stat-card,html[data-theme="dark"] .rpo-page .toolbar,html[data-theme="dark"] .rpo-page .table-wrap,
html[data-theme="dark"] .rpo-page .pagination-bar,html[data-theme="dark"] .rpo-page .excel-actions,html[data-theme="dark"] .rpo-page .personnel-card,
html[data-theme="dark"] .pg-amendment-history .timeline,html[data-theme="dark"] .rpo-page .card,html[data-theme="dark"] .rpo-page .sum-card,
html[data-theme="dark"] .rpo-page .user-info-card,html[data-theme="dark"] .rpo-page .section-card,html[data-theme="dark"] .rpo-page .form-section,
html[data-theme="dark"] .rpo-page .modal,html[data-theme="dark"] .rpo-page .modal-content,html[data-theme="dark"] .rpo-page .modal-box{background:#1a1d27!important;border-color:#2d3148!important;color:#e2e8f0!important}
html[data-theme="dark"] .rpo-page .stat-value{color:#e6eefc!important}
html[data-theme="dark"] .rpo-page .card-hd,html[data-theme="dark"] .rpo-page .modal-header,html[data-theme="dark"] .rpo-page .mhd{background:#1f2433!important;border-color:#2d3148!important;color:#cfe0ff!important}
html[data-theme="dark"] .rpo-page .documents-table th{background:#0f1117!important;color:#94a3b8!important}
html[data-theme="dark"] .rpo-page .documents-table td{color:#e2e8f0!important;border-bottom-color:#2d3148!important}
html[data-theme="dark"] .rpo-page .row-pending{background:#1c1a08!important}
html[data-theme="dark"] .rpo-page .row-ready{background:#091810!important}
html[data-theme="dark"] .rpo-page .row-transferred-pending{background:#2a1b0a!important}
html[data-theme="dark"] .rpo-page .row-transferred-ready{background:#062a30!important}
html[data-theme="dark"] .rpo-page .filter-tab,html[data-theme="dark"] .rpo-page .pg-opt,html[data-theme="dark"] .rpo-page .pg-btn{background:#1a1d27!important;border-color:#2d3148!important;color:#94a3b8!important}
html[data-theme="dark"] .rpo-page .filter-tab.active,html[data-theme="dark"] .rpo-page .pg-btn.active,html[data-theme="dark"] .rpo-page .pg-opt.active{background:#1252a3!important;color:#fff!important}
html[data-theme="dark"] .rpo-page h1,html[data-theme="dark"] .rpo-page h2,html[data-theme="dark"] .rpo-page h3,html[data-theme="dark"] .rpo-page h4{color:#e6eefc}
html[data-theme="dark"] .rpo-page p{color:#cbd5e1}
/* the editable / printed document page stays white like paper */
html[data-theme="dark"] .rpo-page .doc-page,html[data-theme="dark"] .rpo-page .page-sheet,html[data-theme="dark"] .rpo-page [contenteditable="true"]{background:#fff!important;color:#000!important}
html[data-theme="dark"] .rpo-page [contenteditable="true"] *{color:revert}

/* theme button in the header */
.theme-btn{position:relative;background:rgba(255,255,255,.14);border:1.5px solid rgba(255,255,255,.28);color:#fff;width:38px;height:38px;border-radius:9px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;transition:background .15s}
.theme-btn:hover{background:rgba(255,255,255,.28)}
@media (max-width:700px){.theme-btn{width:34px;height:34px;font-size:14px}}

/* document editor: the paper stays white with black text */
html[data-theme="dark"] #docPage,html[data-theme="dark"] .page[contenteditable],html[data-theme="dark"] .print-page{background:#fff!important;color:#000!important}
html[data-theme="dark"] #docPage .ph,html[data-theme="dark"] #docPage .ph p{color:#6b7280!important}

/* New RPO Request: request type / role chips */
html[data-theme="dark"] .hrdtype-opt,html[data-theme="dark"] .transport-opt,html[data-theme="dark"] .role-chk{background:#1f2433!important;border-color:#3a4566!important;color:#cbd5e1!important}
html[data-theme="dark"] .hrdtype-opt:has(input:checked),html[data-theme="dark"] .transport-opt:has(input:checked),html[data-theme="dark"] .role-chk:has(input:checked){background:#1252a3!important;border-color:#3b82f6!important;color:#fff!important}
html[data-theme="dark"] .role-chk *,html[data-theme="dark"] .hrdtype-opt *,html[data-theme="dark"] .transport-opt *{color:inherit}
html[data-theme="dark"] #docPage .rpo-page :is(p,h1,h2,h3,h4,label,small),html[data-theme="dark"] .rpo-template .rpo-page :is(p,h1,h2,h3,h4,label,small){color:inherit}
html[data-theme="dark"] .rpo-template,html[data-theme="dark"] .rpo-template .rpo-page{color:#000}
html[data-theme="dark"] .pnl-wrap,html[data-theme="dark"] .pnl-table{background:#151823!important;border-color:#2d3148!important}
html[data-theme="dark"] .pnl-table td{border-color:#2d3148!important}
