.theme-control{display:inline-flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}.theme-control>span{opacity:.75}.theme-control select,.portal .theme-control select{border:1px solid #63708a;border-radius:7px;padding:6px 8px;background:#202b40;color:#f2f5fc;min-height:34px;font:inherit;cursor:pointer}.theme-control select:focus-visible{outline:2px solid #a8c5ff;outline-offset:2px}
html[data-theme=dark]{color-scheme:dark;background:#101521;color:#e3e9f4;--theme-bg:#101521;--theme-panel:#192131;--theme-raised:#202c40;--theme-line:#344056;--theme-text:#e3e9f4;--theme-muted:#b0bed3}
html[data-theme=dark] :is(body,body.portal,main,.portal:has(.home-welcome),.shell,.grid-scroll,.workspace-dashboard,.management-main){background:var(--theme-bg);color:var(--theme-text)}
html[data-theme=dark] :is(aside,.topbar,.portal header){background:#151d2c;color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] :is(.views,.toolbar,.board-heading,.period-toolbar,footer,.portal footer,.active-filter-summary){background:var(--theme-bg);color:var(--theme-muted);border-color:var(--theme-line)}
html[data-theme=dark] :is(table,th,td,.name-col,.grid-scroll th,.grid-scroll td,.grid-scroll tfoot td,.sales-table th,.sales-table td,.portal table.team th,.portal table.team td){background:var(--theme-panel)!important;color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] :is(thead th,.sales-table thead th){background:var(--theme-raised)!important;color:var(--theme-muted)}
html[data-theme=dark] :is(.portal .card,.portal .family,.portal .metric,.portal .loading,.report-metrics article,.report-charts article,.sales-scorecards article,.sales-trend,.sales-detail,.login-card,.detail-panel,.item-detail,.detail,.comments article,.subitems,dialog,#modal,.portal #panel,#install-help){background:var(--theme-panel);color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] :is(input,textarea,select,.portal input,.portal select,.dashboard-period select,.group-filter){background:var(--theme-bg);color:var(--theme-text);border-color:#4a5872}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#a5b2c7}
html[data-theme=dark] :is(button,a.button,.portal button,.portal .button){color:var(--theme-text);border-color:var(--theme-line)}
html[data-theme=dark] :is(.portal button,.portal .button,.outline,.pager button,.tool,.relation-results button){background:var(--theme-raised)}
html[data-theme=dark] :is(.primary,.portal .primary,.portal .module-primary,.google-login){background:#315fbe;color:#fff;border-color:#5a87df}
html[data-theme=dark] :is(button:hover,a.button:hover,.portal button:hover,.portal .button:hover,.nav-board:hover,.relation-results button:hover){background-color:#2b3a54}
html[data-theme=dark] :is(.nav-board.active,.nav-board.selected,.view.active,.tool.chosen,.sidebar-bottom .workspace-dashboard-nav button.active,.comparison-active){background:#293956;color:#bcd4ff;border-color:#759de5}
html[data-theme=dark] :is(p,.muted,.intro,.portal .intro,.portal .card p,.portal .module-body p,.portal .home-welcome .intro,.portal .home-section-title>span,.portal .eyebrow,.breadcrumb,.count,.nav-sort,.sidebar-bottom button,.sales-person-stats,.sales-person-stats b,.report-metrics span,.dashboard-period label,.sales-scorecards article>small,.sales-table small,.install-note,.portal .team small){color:var(--theme-muted)}
html[data-theme=dark] :is(h1,h2,h3,h4,.portal h1,.portal h2,.portal .home-welcome h1,.open-item,.group-name,.cell.text){color:var(--theme-text)}
html[data-theme=dark] :is(a,.relation-cell,.computed-cell,.portal .other-boards summary){color:#9bc1ff!important}
html[data-theme=dark] :is(.brand,.portal header a,.module-primary,.google-login){color:#fff!important}
html[data-theme=dark] :is(.notice,.notice.pending,.report-warning,.portal .warning){background:#302a1d;color:#ead399;border-color:#665735}
html[data-theme=dark] :is(.report-warning p,.notice button){color:#ead399}
html[data-theme=dark] :is(.error,.portal .error){background:#3b222b;color:#ffb4be}
html[data-theme=dark] :is(.linked-row,.portal .statuspill,.sales-rank){background:#293956;color:#bdd0f4}
html[data-theme=dark] :is(.workspace-owner,.nav-top,.team-list article,.panelhead,.detail-head,.detail-tabs,.comment-form,.group-title,.add-row){border-color:var(--theme-line)}
html[data-theme=dark] :is(.report-row>div,.portal .bar){background:#2a344a}
html[data-theme=dark] .sales-trend svg text{fill:#b7c5da}
html[data-theme=dark] .sales-trend svg line{stroke:#46536b}
html[data-theme=dark] .portal .home-welcome h1 span{color:#aac6b7}
html[data-theme=dark] .portal .welcome-stamp{background:#203b32;color:#c4e1c5;border-color:#456353;box-shadow:0 0 0 12px #192a27}
html[data-theme=dark] .portal .module-card{box-shadow:none;border-color:var(--theme-line)}
html[data-theme=dark] .portal .module-art{background:#243246}
html[data-theme=dark] :is(.theme-control select,.portal .theme-control select){background:#26344c;color:#f2f5fc}
html[data-theme=dark] ::-webkit-scrollbar{background:#151d2c}html[data-theme=dark] ::-webkit-scrollbar-thumb{background:#45536b;border:2px solid #151d2c;border-radius:8px}
@media(max-width:650px){.theme-control>span{display:none}.theme-control select,.portal .theme-control select{min-height:34px;max-width:102px;padding:5px}.topbar .top-meta{flex-wrap:wrap}}
.theme-control{margin-right:8px}html[data-theme=dark] #sales-twelve{background:#26344c;color:#d2dfff;border-color:#53688a}html[data-theme=dark] #sales-twelve.comparison-active{background:#6351a6;color:white}html[data-theme=dark] :is(.module-kicker,.portal .module-kicker,.sales-period-title small){color:#b7addb}
.sidebar-bottom>.theme-control{display:flex;justify-content:space-between;width:100%;margin:8px 0 0;padding:10px 4px 0;border-top:1px solid #7a869244}.sidebar-bottom>.theme-control>span{display:inline}.portal footer>.theme-control{margin:8px 0}.topbar{transition:margin-top .18s ease,opacity .18s ease}.header-hidden .topbar{margin-top:calc(-1 * var(--app-header-height,56px));opacity:0;visibility:hidden;pointer-events:none}body:has(.topbar) .shell{height:calc(100dvh - var(--app-header-height,56px))!important}body.header-hidden:has(.topbar) .shell{height:100dvh!important}body.portal #app>header{position:sticky;top:0;z-index:20;transition:transform .18s ease}body.portal.header-hidden #app>header{transform:translateY(-100%);pointer-events:none}body.header-hidden .mobile-nav-dismiss,body.header-hidden .shell>aside{top:0!important}@media(prefers-reduced-motion:reduce){.topbar,body.portal #app>header{transition:none}}@media(max-width:650px){.sidebar-bottom>.theme-control{flex-shrink:0}.sidebar-bottom>.theme-control>span{display:inline}}
.header-hidden .topbar{display:none!important}

/* Tombol dialog masukan tetap terbaca dalam tema gelap. */
html[data-theme="dark"] .app-feedback-dialog button{background:#26344a!important;color:#e5eaf4!important}html[data-theme="dark"] .app-feedback-dialog .afb-primary{background:#5355d6!important;color:#fff!important}
