:root{color-scheme:light}
@media(prefers-color-scheme:dark){
 :root{color-scheme:dark;--ink:#dce5f1!important;--muted:#9aaac0!important;--line:#334156!important;--paper:#18212e!important;--bg:#101721!important;--blue:#69b5ff!important;--green:#6ed3a2!important}
 html,body{background:#101721!important;color:#dce5f1!important}
 body :is(.card,.account-pane,.account-target-pane,.status,.status-banner,.local,.local-pill,.topbar,.modal,dialog,.picker-menu,.amount-select-menu,.frame-select-menu,.group-custom-dialog,.group-turnover-mode-menu,.member-modal,.admin-metric,.login-card){background:#18212e!important;border-color:#334156!important;color:#dce5f1!important;box-shadow:0 3px 18px #0003}
 body :is(h1,h2,h3,h4,legend,.form-label,.field-label,.pane-head,.picker-account-name,.picker-option-name strong,.combo-field-title,.route-heading,.account-name,.current-purchases-head){color:#e4ebf5!important}
 body :is(.form-help,.pane-hint,.modal-desc,.modal-note,.eyebrow,.status-right,.prediction-meta,.admin-empty,.plan-empty,.automatic-odds){color:#9aaac0!important}
 body :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.content-input,.manual-combo-field,.route-pool,.account-pill,.group-slot,.destination-field,.group-tile){background:#121b28!important;border-color:#35465e!important;color:#dce5f1!important}
 body :is(input,textarea)::placeholder{color:#8b9cb3!important}
 body :is(input:disabled,input[readonly]){background:#1c2736!important;color:#93a5bc!important}
 body :is(.picker-trigger,.outline-button,.icon-button,.amount-select-trigger,.frame-select-button,.account-remove,.account-delete,.account-pool-toggle,.text-button,.clear-group,.custom-group){background:#182535!important;border-color:#3a4d66!important;color:#dce5f1!important}
 body :is(.picker-option,.amount-select-menu button,.frame-select-menu button,.route-list button){background:transparent!important;color:#dce5f1!important}
 body :is(.picker-option:hover,.picker-option.selected,.amount-select-menu button:hover,.amount-select-menu button[aria-selected=true],.frame-select-menu button:hover,.frame-select-menu button[aria-selected=true]){background:#263f5d!important;color:#a7d5ff!important}
 body :is(.picker-avatar-fallback,.account-avatar){background:#293e55!important;color:#abd2f5!important}
 body :is(.rail,.sidebar){background:#0b111a!important}
 body :is(.send-button,.modal-submit,.admin-generate){background:#276fae!important;color:#fff!important;border-color:#397eb5!important}
 body :is(.prediction-row,.current-purchases,.plan-card){background:#18212e!important;border-color:#334156!important}
 body .content-input.is-hit{background:#142c25!important;border-color:#315d4c!important}
 body .content-input.is-miss{background:#321f27!important;border-color:#69404c!important}
 body .content-input.is-rebate{background:#192c43!important;border-color:#39597c!important}
 body :is(table,th,td){color:#d0dbea!important;border-color:#334156!important}
 body :is(.modal-error,.login-error,.risk-notice,.runner-notice){background:#33232c!important;color:#ffc2b2!important;border-color:#684451!important}
 body .send-action-status{color:#ffc59c!important}
 #amountDialog :is(p,label,.automatic-budget,.account-settings,.route-heading,.routing-cost-note){color:#d8e2ef!important}
 #amountDialog :is(.settings-tabs,.amount-actions,.account-settings,#receiptChoiceRow){background:transparent!important;border-color:#334156!important}
 #amountDialog .settings-tabs button{background:transparent!important;color:#afbed1!important}
 #amountDialog .settings-tabs button[aria-selected=true]{background:#223e5b!important;border-color:#3b6287!important;color:#b1dcff!important}
 #amountDialog .send-decision-button{background:#244d75!important;color:#d5eaff!important;border-color:#42698e!important}
 body :is(.group-rate-headings,.plan-card p,.group-progress-table,.automatic-principal-value){color:#d8e2ef!important}
}

@media(prefers-color-scheme:dark){
 body :is(.picker-account-name strong,.group-accounting,.prediction-name,.account-username,.account-summary,.group-title){color:#cbd8e9!important}
 body :is(.prediction-accuracy,.admin-card-head p,.account-empty){color:#9faec2!important}
 body :is(.console-tabs,.predictions-panel,.active-decision,.card-head,.admin-card-head){border-color:#334156!important}
 body :is(.send-decision-button,#siteLogout,#logout,#adminRefresh,#redpacketEnable){background:#244d75!important;color:#d5eaff!important;border-color:#42698e!important}
 body :is(.send-decision-button:disabled,#redpacketEnable:disabled){opacity:.55}
}

@media(prefers-color-scheme:light){.frame-select-button{background-color:#fff!important;color:#354454!important;border-color:#dce6ef!important}}

/* Floating choices open at their anchor, without lateral movement. */
:is(.amount-select-menu,.frame-select-menu,.picker-menu,.destination-picker-options,#sourcePickerOptions,#groupTurnoverModeMenu){animation:none!important;transition:none!important;transform:none!important;translate:none!important;}

/* Admin counters, list interiors and empty purchase state in night mode. */
@media(prefers-color-scheme:dark){
 body .admin-content :is(.admin-metrics,.admin-invite-list,.admin-help,.admin-code-row){background:#121c29!important;border-color:#334156!important;color:#d0dbea!important}
 body .admin-content :is(.admin-metric,.admin-empty){background:transparent!important;box-shadow:none!important;color:#aebed0!important}
 body .admin-content :is(.admin-metric>span,.admin-metric strong,.admin-invite-name strong,.admin-identity strong,.admin-member-labels,.admin-code){color:#dce5f1!important}
 body .admin-content :is(.admin-invite-name small,.admin-invite-bottom small,.admin-used-note,.admin-identity small,.admin-empty strong,.admin-empty p){color:#a8b8cc!important}
 body .admin-content :is(.admin-card-symbol,.admin-count,.admin-avatar,.admin-badge){background:#263b53!important;color:#b8dbff!important}
 body .admin-content :is(.admin-copy,.admin-member-toggle,.admin-switch-button){background:#223a52!important;border-color:#405873!important;color:#c7e3ff!important}
 body .admin-content :is(.admin-invite-row,.admin-member-row,.admin-member-labels){border-color:#334156!important}
 body .admin-content .admin-invite-list::-webkit-scrollbar-thumb{background:#496078!important}
 body .current-purchases #purchaseRecordEmpty{background:#172a27!important;border-color:#34534b!important;color:#b3c9c1!important}
}

@media(prefers-color-scheme:dark){body .heading-actions :is(#siteLogout,#logout,#adminRefresh){background:#223a52!important;border-color:#405873!important;color:#d5eaff!important}}

/* Forward console: nested live feeds, account pools and selection surfaces. */
@media(prefers-color-scheme:dark){
 body:not(.login-page){--console-heading:#e4ebf5!important;--console-text:#d0dbea!important;--console-muted:#a1b1c6!important}
 body:not(.login-page) .workspace :is(.messages-feed,.round-order,.cny-round-order,.account-list,.cny-account-list,.group-list,.source-select-row,.destination-select-row,.source-picker-options,.destination-picker-options){background:#121c29!important;border-color:#33465d!important;color:#d0dbea!important}
 body:not(.login-page) .workspace :is(.group-row,.account-row,.source-picker-option,.destination-picker-option){background:transparent!important;border-color:#33465d!important;color:#d0dbea!important}
 body:not(.login-page) .workspace :is(.group-row.selected,.group-row:hover,.account-row.selected,.account-row:hover,.source-picker-option:hover,.source-picker-option[aria-selected=true],.destination-picker-option:hover,.destination-picker-option[aria-selected=true]){background:#263f5d!important;outline-color:#405d7e!important}
 body:not(.login-page) .workspace :is(.group-main strong,.account-row-text strong,.round-account,.round-account strong,.round-account b,.message-body,.message-sender,.source-picker-toggle,.destination-picker-toggle,.destination-picker-option>span,.source-picker-option>span){color:#d0dbea!important}
 body:not(.login-page) .workspace :is(.field-label,.account-pane-title h3,.side-title h3){color:#e4ebf5!important}
 body:not(.login-page) .workspace :is(.group-main small,.account-row-text small,.bindings-empty,.message-time,.messages-foot,.account-picker-label){color:#a1b1c6!important}
 body:not(.login-page) .workspace :is(.remove-account,.group-chip,.selected-group-pill){background:#223a52!important;border-color:#405873!important;color:#d5eaff!important}
 body:not(.login-page) .workspace .automation-button:disabled{background:#29435f!important;color:#afc7df!important;opacity:1}
}

/* Keep live user/order details legible and remove the last pale selection surfaces. */
@media(prefers-color-scheme:dark){
 body #groupList .group-row.selected,body #groupList .group-row:hover{background:#263f5d!important;border-color:#405d7e!important;outline-color:#405d7e!important}
 body #recipientLabel{background:#223a52!important;color:#c6d9ee!important}
 body .automation-card .source-picker>.field-label{color:#dce5f1!important}
 body .automation-card :is(.round-order,.cny-round-order) .assignment-detail,body .automation-card :is(.round-order,.cny-round-order) .assignment-detail :is(b,small){color:#dce5f1!important}
 body .workspace .side-icon.amber{background:#3b3020!important;color:#f0c076!important}
 body .workspace .side-icon.lavender{background:#302c49!important;color:#c6b7ff!important}
 body .workspace :is(.group-row,.message-item){border-color:#33465d!important}
}

@media(prefers-color-scheme:dark){body .workspace #automationToggle.pause{background:#29435f!important;border-color:#547795!important;color:#e0edfa!important}body .workspace #automationStatus.error{color:#ffc6b7!important}body .workspace #automationStatus.error span{color:#ffc6b7!important}}

/* Remove the decorative navigation rail and reclaim its space on every viewport. */
body .shell > .rail{display:none!important;width:0!important;min-width:0!important;padding:0!important;margin:0!important}
body .shell > .workspace{min-width:0;flex:1;width:100%}
