/* TP READABILITY 20261027 — shared final layer; presentation only. */
body[data-ui]{font-family:Inter,"Segoe UI","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;font-size:14px;line-height:1.65;font-synthesis:none}
body[data-ui] :is(button,input,select,textarea){font-family:inherit}
body[data-ui] :is(input,select,textarea){font-size:14px;line-height:1.5;min-width:0;max-width:100%}
body[data-ui] :is(input,select,textarea)::placeholder{opacity:1}
body[data-ui] :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
body[data-ui] :is(button,summary){touch-action:manipulation}
body[data-ui] :is(button,input,select,textarea):disabled{opacity:1;cursor:not-allowed}
body[data-ui] :is(button,a){overflow-wrap:anywhere}
body[data-ui] :is(pre,code){font-family:ui-monospace,Consolas,monospace;font-size:12px;line-height:1.7}
body[data-ui] pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;overflow:auto}
body[data-ui] :is(dialog,img,video,canvas,svg){max-width:100%}
body[data-ui] dialog{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
body[data-ui] dialog::backdrop{background:#020617a8}
body[data-ui] :is(.table-wrap,.table-scroll,.table-container){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
body[data-ui] :is(th,td){font-size:13px;line-height:1.65}
body[data-ui] :is(.muted,small,label,.empty,.empty-state,.stat-empty,.table-empty){line-height:1.75}
body[data-ui] :is(p,label,small,.muted,.empty-state,.table-empty,.notice,.message){overflow-wrap:anywhere}
body[data-ui] [hidden]{display:none!important}

/* AGENT: keep the established charcoal/gold theme in every route. */
body[data-ui="agent"]{--ui-surface:#101a28;--ui-surface-2:#172334;--ui-border:#3b4d65;--ui-text:#edf3fc;--ui-muted:#b5c4d8;--ui-gold:#f0ce8c;--ui-focus:#edc875;--ink:#edf3fc;--text:#edf3fc;--muted:#b5c4d8;--line:#3b4d65;--text-secondary:#c8d4e5;--text-muted:#b5c4d8;color:#edf3fc;background:#080f19;color-scheme:dark}
body[data-ui="agent"] :is(.panel,.dashboard-panel,.login-card,.scan-card,.report-card,.automation-tier,.alert-metric,.crm-stage,.crm-activity-item,.preview-feature-cards article,.collider-control-panel,.collider-module-panel,.collider-result-panel){background:#101a28!important;border-color:#3b4d65!important;color:#edf3fc;filter:none!important}
body[data-ui="agent"] :is(.usage-grid>div,.account-info>div,.package-summary>div,.plan-usage>div,.plan-rule-grid>div,.report-metrics>div,.automation-usage>div,.alert-usage>div,.ads-usage>div,.ads-benchmark>div,.crm-usage>div,.scan-facts>div,.scan-attention article,.google-ads-kpi,.collider-metrics>div,.collider-module-grid>div,.onchain-capability-grid>div){background:#172334!important;border-color:#3b4d65!important;color:#d6e1f0!important}
body[data-ui="agent"] :is(.report-center-hero,.automation-center-hero,.alert-center-hero,.ads-center-hero,.crm-center-hero,.market-prices-hero,.onchain-tracker-hero,.onchain-feature-shell,.collider-feature-shell){background:linear-gradient(125deg,#162437,#101a28)!important;border-color:#3b4d65!important}
body[data-ui="agent"] :is(.report-locked,.automation-locked,.alert-locked,.crm-locked,.onchain-feature-shell.is-locked,.onchain-feature-card.is-locked,.collider-feature-card.is-locked){opacity:1!important;filter:none!important}
body[data-ui="agent"] :is(.muted,.login-note,.stat-empty,.table-empty,.table-empty p,.table-empty small,.panel-header p,.dashboard-panel-head p,.scan-upload-status,.scan-card p,.crm-activity-item small,.report-meta,.report-card p,.automation-tier p,.alert-metric p,.ads-source-notice,.onchain-display-notice,.collider-interface-notice){color:#b5c4d8!important;font-size:13px}
body[data-ui="agent"] :is(.content label,.login-card label,.crm-form label,.crm-toolbar label,.crm-activity-form label,.ads-form label,.ads-toolbar label,.alert-form label,.automation-form label,.activity-toolbar label){color:#c8d4e5!important;font-size:13px!important}
body[data-ui="agent"] :is(.content input,.content select,.content textarea,.login-card input,.login-card select,.workspace-search input){background:#0c1522!important;color:#edf3fc!important;border-color:#4c607a!important;box-shadow:none!important;font-size:14px!important;min-height:42px}
body[data-ui="agent"] :is(input,textarea)::placeholder{color:#a8b9ce!important}
body[data-ui="agent"] option{background:#101a28;color:#edf3fc}
body[data-ui="agent"] :is(input,select,textarea):disabled{background:#192638!important;color:#bac7d9!important;-webkit-text-fill-color:#bac7d9;border-style:dashed!important}
body[data-ui="agent"] :is(button:disabled,.secondary:disabled){background:#233146!important;color:#bdcadc!important;border:1px solid #536078!important;box-shadow:none!important;filter:none!important}
body[data-ui="agent"] .sidebar button[data-view]:disabled{background:transparent!important;border-color:transparent!important;color:#b7c5d8!important}
body[data-ui="agent"] :is(h1,h2,h3,h4){line-height:1.45;overflow-wrap:anywhere}
body[data-ui="agent"] :is(.panel h2,.dashboard-panel h2,.panel h3,.scan-card h3,.report-card h3,.automation-tier h3,.crm-stage h3){color:#eef3fc!important}
body[data-ui="agent"] :is(.panel h2,.dashboard-panel h2){font-size:21px}
body[data-ui="agent"] :is(.panel h3,.dashboard-panel h3){font-size:16px}
body[data-ui="agent"] :is(.usage-grid span,.account-info span,.package-summary span,.plan-usage span,.report-metrics span,.automation-usage span,.alert-usage span,.ads-usage span,.crm-usage span,.collider-metrics span,.scan-facts span){color:#b5c4d8!important;font-size:12px!important}
body[data-ui="agent"] :is(.usage-grid strong,.account-info strong,.package-summary strong,.report-metrics strong,.automation-usage strong,.alert-usage strong,.ads-usage strong,.crm-usage strong,.collider-metrics strong){color:#f1dfb8!important;line-height:1.5}
body[data-ui="agent"] :is(.agent-plan-feature-summary,.agent-plan-feature-list span,.plan-limit-summary,.scan-upload-status,.stat-empty,.table-empty,.ads-source-notice,.onchain-display-notice,.collider-interface-notice){background:#172334!important;border-color:#4b5b70!important;color:#cbd6e5!important}
body[data-ui="agent"] :is(.report-tools,.report-toolbar,.automation-form,.alert-form,.crm-form,.crm-toolbar,.crm-activity-form,.ads-form,.ads-toolbar){min-width:0}
body[data-ui="agent"] :is(.table-wrap,.table-scroll){background:#101a28!important;border-color:#3b4d65!important}
body[data-ui="agent"] :is(thead,th){background:#1b2a3e!important;color:#d9e3f0!important;border-color:#3b4d65!important;font-weight:650}
body[data-ui="agent"] :is(tbody tr,.table-wrap tbody tr:nth-child(even),td){background:#101a28!important;border-color:#2d3f55!important;color:#d3dfef!important}
body[data-ui="agent"] :is(tbody tr:hover,.table-wrap tbody tr:nth-child(even):hover){background:#1b2c42!important}
body[data-ui="agent"] :is(td small,td time,td code,.table-wrap small){color:#b7c7dc!important;font-size:12px!important}
body[data-ui="agent"] :is(td strong,th strong){color:#f0f4fb!important}
body[data-ui="agent"] :is(.panel-chip,.status-chip,.plan-request-state,.plan-request-badge,.automation-status,.alert-severity,.alert-event-status,.ads-status,.crm-stage-badge,.crm-tag,.crm-activity-type,.collider-engine-badge,.collider-access-badge,.onchain-access-badge,.entity-status){background:#24334a!important;color:#dbe5f2!important;border:1px solid #50627a!important;font-size:12px!important;line-height:1.6}
body[data-ui="agent"] :is(.status-active,.status-approved,.status-completed,.status-success,.is-enabled .onchain-access-badge,.status-chip.active){background:#123b30!important;color:#a6ecd0!important;border-color:#3b7e65!important}
body[data-ui="agent"] :is(.status-pending,.status-paused,.severity-medium,.status-acknowledged,.is-pending,.is-locked .onchain-access-badge){background:#3c2f19!important;color:#f8d99a!important;border-color:#8d713c!important}
body[data-ui="agent"] :is(.status-failed,.status-rejected,.severity-high,.status-open,.status-chip.failed){background:#422531!important;color:#ffc3d2!important;border-color:#945669!important}
body[data-ui="agent"] :is(.error,.message.error){background:#3a202b!important;color:#ffd0dc!important;border-color:#9a576d!important}
body[data-ui="agent"] :is(button.secondary,a.secondary,.icon-button,.nav-toggle){background:#1b293b!important;color:#dbe5f2!important;border-color:#52657e!important;font-size:13px;min-height:36px}
body[data-ui="agent"] :is(button.secondary,a.secondary):hover{background:#29384b!important;color:#f6dfad!important;border-color:#a88a53!important}
body[data-ui="agent"] :is(.sidebar .brand small,.sidebar-plan-copy small,.sidebar-footer small,.sidebar-workspace-title){color:#b4c3d6!important;font-size:12px!important}
body[data-ui="agent"] #agent-navigation button[data-view]{font-size:14px!important;line-height:1.5;min-height:44px!important}
body[data-ui="agent"] #agent-navigation .sidebar-subnav>button[data-view]{font-size:13px!important;min-height:40px!important}
body[data-ui="agent"] #agent-navigation button[data-view].plan-locked::after{font-size:11px!important;line-height:1.5;min-width:40px}
body[data-ui="agent"] :is(.edition-status-copy small,.edition-status-badge,.edition-status-icon){font-size:11px!important;color:#becbdc}
body[data-ui="agent"] :is(.dashboard-entity-row,.entity-primary strong,.entity-primary small,.dashboard-entity-row time,.dashboard-system-panel .live-activity-item time,.dashboard-system-panel .live-activity-item>div strong,.dashboard-system-panel .live-activity-item>div p,.mini-table-head,.dashboard-activity-filters,.dashboard-activity-filters .activity-toolbar label){font-size:12px!important;line-height:1.65!important;color:#bdcce0}
body[data-ui="agent"] .entity-primary small{max-width:none;white-space:normal;overflow-wrap:anywhere}
body[data-ui="agent"] :is(.entity-primary strong,.dashboard-system-panel .live-activity-item>div strong){color:#edf3fc!important;font-size:13px!important}
body[data-ui="agent"] .dashboard-entity-row{min-height:58px}
body[data-ui="agent"] .dashboard-activity-filters .activity-toolbar :is(input,select){font-size:13px!important;min-height:38px}
body[data-ui="agent"] :is(.plan-card li,.plan-card-features li,.plan-specs>span,.plan-duration,.plan-credit,.plan-benefit-title>span,.plan-savings>span,.promotion-kicker,.payment-order-reference,.payment-copy,.payment-cancel-row span){font-size:12px!important;line-height:1.7}
body[data-ui="agent"] :is(.onchain-kpis span,.onchain-chain-card small,.market-source-note,.onchain-source-note,.market-ticker-card small,.market-table small){font-size:12px!important;color:#b9c9dd!important}
body[data-ui="agent"] .login-view{background:radial-gradient(ellipse at top,#26334a,#080f19 72%);color:#edf3fc}
body[data-ui="agent"] .login-card{box-shadow:0 22px 60px #0005}
body[data-ui="agent"] :is(.hero-primary,.payment-copy-address,.payment-submit,.promotion-cta){color:#261d0b!important}
body[data-ui="agent"] :is(.content small,.content .eyebrow,.content .panel-header-actions,.data-query-tools label>span,.pager,.page-size-label,#data-updated-at,#search-shortcut,.welcome-eyebrow,.dashboard-shortcuts small){font-size:12px!important;color:#b5c4d8!important;line-height:1.7}
body[data-ui="agent"] :is(.flat-nav-icon,.dashboard-shortcuts i){font-size:12px!important}
body[data-ui="agent"] .flat-agent-navigation>button em{font-size:11px;min-width:28px;text-align:center}
body[data-ui="agent"] :is(#logout,#topbar-username){font-size:12px!important}
body[data-ui="agent"] .resource-donut::after{background:#101a28!important}
body[data-ui="agent"] .resource-donut>span{font-size:12px!important;color:#c2d0e3!important}
body[data-ui="agent"] :is(.resource-legend span,.resource-bars span,.dashboard-trend-legend span,.trend-range-button){font-size:12px!important;color:#bbcadf!important}
body[data-ui="agent"] .dashboard-trend-chart text{fill:#bbcadf!important;font-size:12px!important;opacity:1}
body[data-ui="agent"] #agent-navigation button[data-view]{transition:none!important}
body[data-ui="agent"] #agent-navigation button[data-view]:not(.active)>span{color:#c4d1e4!important}
body[data-ui="agent"] #agent-navigation button[data-view].active{background:linear-gradient(110deg,#ffe7a7,#d6a13c)!important;color:#241c0c!important}
body[data-ui="agent"] #agent-navigation button[data-view].active :is(span,i,b){color:#241c0c!important}
body[data-ui="agent"] :is(.report-card>div>span,.automation-tier>div>span,.alert-metric>span){color:#dbe5f2!important;font-size:14px!important;font-weight:650}
body[data-ui="agent"] :is(.report-card>div>b,.automation-tier>div>b,.alert-metric>b,.session-state){font-size:12px!important;line-height:1.6;background:#25364f!important;color:#e2eaf5!important;border:1px solid #50667f}
body[data-ui="agent"] .automation-tier>strong{color:#f2d89f!important;font-size:18px}
body[data-ui="agent"] #report-meta{background:#1b293b!important;color:#c6d4e7!important;border-color:#435a74}
body[data-ui="agent"] :is(.report-empty,#data-page-info,#ads-page-info,#crm-page-info,.account-info>div>strong,.onchain-capability-grid>div>p,.onchain-capability-grid>div>span,.collider-module-grid>div>span,.collider-module-grid>div>b,.dashboard-entitlement-preview span){font-size:12px!important;color:#b9cade!important;line-height:1.7}
body[data-ui="agent"] .flat-agent-navigation>button em{font-size:12px!important}
body[data-ui="agent"] .resource-donut>span{background:#101a28}
body[data-ui="agent"] .resource-donut>strong{background:#101a28;color:#f1dfb8!important}
body[data-ui="agent"] #message.error{color:#ffd0dc!important;background:#3a202b!important;font-size:13px}
body[data-ui="agent"] #view-plans .plan-card-head>b{font-size:12px!important}
body[data-ui="agent"] :is(.market-rank,.market-table .status-pill,.chain-pill){font-size:12px!important;line-height:1.7}
body[data-ui="agent"] .market-rank{color:#b8c9df!important}

/* ADMIN: preserve the familiar light workspace; dark sidebar/asset cockpit are scoped below. */
body[data-ui="admin"]{--ui-surface:#fff;--ui-surface-2:#f0f4f9;--ui-border:#cbd5e1;--ui-text:#172b42;--ui-muted:#475b73;--ui-focus:#176c58;--text:#172b42;--muted:#475b73;color:#172b42;background:#f1f5f9;color-scheme:light}
body[data-ui="admin"] :is(.workspace main,.workspace .topbar,dialog){--muted:#475b73;--text:#172b42;color:#172b42}
body[data-ui="admin"] :is(.panel,.section-block,.dashboard-shortcuts,.operations-center,dialog,.agent-payment-settings-panel){border-color:#cad5e2}
body[data-ui="admin"] :is(.muted,.section-title p,.section-head p,.section-heading p,.panel-subtitle,.agent-field-hint,.agent-table small,.agent-detail-grid small,.agent-payment-config-state,.system-state small,.filter-field,.select-field,.overview-health-message small,.overview-cockpit-card-head p,.overview-traffic-period span,.behavior-paths-head span,.behavior-path-list article small,.behavior-path-list article>span){color:#475b73!important;font-size:13px!important}
body[data-ui="admin"] .workspace main :is(label,legend){color:#334b66;font-size:13px!important;line-height:1.65}
body[data-ui="admin"] :is(.workspace main small,dialog small,.workspace .topbar small){font-size:12px;line-height:1.65}
body[data-ui="admin"] :is(input,select,textarea){color:#1b304a;background:#fff;border-color:#8fa2b8;font-size:14px!important;min-height:40px;color-scheme:light}
body[data-ui="admin"] :is(input,textarea)::placeholder{color:#596c82!important}
body[data-ui="admin"] option{background:#fff;color:#1b304a}
body[data-ui="admin"] :is(input,select,textarea):disabled,body[data-ui="admin"] input[readonly]{color:#465d77;background:#e9eff6;border-color:#aab9ca;-webkit-text-fill-color:#465d77}
body[data-ui="admin"] :is(button:disabled,.secondary-button:disabled){background:#e8eef5!important;color:#52647b!important;border:1px solid #adbacb!important;box-shadow:none;opacity:1}
body[data-ui="admin"] :is(.secondary,.secondary-button,.mini-action,.compact-action){font-size:12px;min-height:34px}
body[data-ui="admin"] :is(th,thead th){background:#eaf0f7;color:#334b66;border-color:#cbd5e1;font-size:13px}
body[data-ui="admin"] :is(td,td strong){color:#263e59;border-color:#d8e1ec;font-size:13px}
body[data-ui="admin"] :is(td small,td code,td time){color:#4e627b;font-size:12px!important;line-height:1.65}
body[data-ui="admin"] :is(.empty,.empty-state,.table-empty,.empty-note){color:#52647b!important;font-size:13px!important}
body[data-ui="admin"] :is(.hint,.field-hint,.help-text,.help-note,.pagination,.table-pagination,.update-meta,.overview-kpi small,.metric-note,.operations-fold-label small){font-size:12px!important;color:#50657d}
body[data-ui="admin"] :is(.status-pill,.status-badge,.state-badge,.http-status,.agent-status,.agent-plan-badge){font-size:12px;line-height:1.6}
body[data-ui="admin"] :is(.agent-permission-grid,.agent-detail-grid,.system-health-grid,.system-quality-grid,.audit-summary)>div{min-width:0}
body[data-ui="admin"] :is(.section-title h2,.section-head h2,.section-heading h3,dialog h2){color:#1d344d}
body[data-ui="admin"] :is(.sidebar,.sidebar .side-nav){color:#dbe5f2;--muted:#b7c6db}
body[data-ui="admin"] .sidebar :is(.brand small,.sidebar-foot p,.sidebar-foot small,.nav-group-toggle,.system-state small){color:#b7c6db!important;font-size:12px!important}
body[data-ui="admin"] .sidebar .nav-link{font-size:14px;min-height:42px;color:#c7d5e8}
body[data-ui="admin"] .sidebar .nav-link.active{color:#fff;background:#1e574b}
body[data-ui="admin"] .sidebar .nav-group-toggle{min-height:36px}
body[data-ui="admin"] dialog{background:#fff;color:#172b42;border:1px solid #afbdcd;border-radius:14px}
body[data-ui="admin"] dialog :is(label,.muted,p,small){color:#475b73}
body[data-ui="admin"] .detail-navigation{background:#f7f9fc;border-color:#cbd5e1}
body[data-ui="admin"] #detail-breadcrumb{color:#465c76;font-size:12px}
body[data-ui="admin"] :is(.auth-gate-dialog,.auth-dialog){color:#172b42}
/* Retain dark public-chain/asset visualization surfaces with light readable text. */
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel{--muted:#b8cfda;--text:#edf7fb;color:#edf7fb;color-scheme:dark}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel :is(p,small,label,.muted,.asset-panel-note,.asset-kpi span,.asset-kpi small,.asset-panel-subtitle,.asset-wallet-summary span){color:#b8cfda!important;font-size:12px!important;line-height:1.7}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel :is(h2,h3,strong,.asset-kpi strong){color:#edf7fb}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel :is(input,select,textarea){background:#122e3b!important;color:#e8f4fb!important;border-color:#60818f!important;color-scheme:dark}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel :is(input,textarea)::placeholder{color:#aac6d5!important}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel option{background:#122e3b;color:#e8f4fb}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel :is(th,td,td strong,td code,td small){color:#c5dce9!important;font-size:12px!important;border-color:#426271!important}
body[data-ui="admin"] .asset-monitor-page .live-wallet-panel th{background:#14303d!important}
body[data-ui="admin"] :is(.overview-traffic-metrics span,.overview-traffic-metrics small,.overview-traffic-daily-head,.overview-traffic-day>span:first-child small,.overview-series-legend span,.overview-live-status-grid span,.overview-live-status-grid small,.overview-live-events .realtime-event strong,.overview-live-events .realtime-event small,.overview-live-events .realtime-event time,.overview-traffic-history>summary span){font-size:12px!important;line-height:1.7!important;color:#475b73!important;opacity:1}
body[data-ui="admin"] .overview-chart-axis-label{fill:#475b73!important;font-size:12px!important}
body[data-ui="admin"] :is(.agent-table small,.agent-stat-grid span,.agent-detail-grid strong){opacity:1;font-size:12px!important;line-height:1.7}
body[data-ui="admin"] #agent-entries .agent-plan-request-pending{color:#805411!important;opacity:1}
body[data-ui="admin"] #wallet-activity-live :is(.asset-kpi>small,.asset-health-grid small,.asset-wallet-table th,.asset-wallet-table td,.asset-wallet-table .muted,.asset-table-address,.asset-table-action,.asset-chain-event small,.asset-chain-event time,.asset-anomaly small,.asset-anomaly time,.asset-token-market-table td small){font-size:12px!important;line-height:1.7!important;color:#c2d9e8!important;opacity:1}
body[data-ui="admin"] #wallet-activity-live .asset-pagination{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}
body[data-ui="admin"] #wallet-activity-live .asset-pagination :is(button,span){font-size:12px;white-space:normal}
body[data-ui="admin"] #wallet-activity-live .asset-trend-chart text{fill:#bdd3e3!important;font-size:12px!important}
/* Detail dialog is deliberately mixed: dark shell, explicit light information cards. */
body[data-ui="admin"] #detail{background:#0d202c!important;color:#e9f4fa!important;border-color:#4e6a7d}
body[data-ui="admin"] #detail>#detail-content{color:#e9f4fa}
body[data-ui="admin"] #detail :is(h2,h3){color:#e9f4fa}
body[data-ui="admin"] #detail .kv,body[data-ui="admin"] #detail .device-profile,body[data-ui="admin"] #detail .wallet-association-panel{background:#f4f8fc!important;color:#243c56!important;border-color:#bfd0e0}
body[data-ui="admin"] #detail :is(.kv,.device-profile,.wallet-association-panel) :is(h2,h3,h4,strong,dt){color:#243c56!important}
body[data-ui="admin"] #detail :is(.kv,.device-profile,.wallet-association-panel) :is(p,small,span,dd,.eyebrow){color:#475b73!important}
body[data-ui="admin"] #detail .detail-navigation{color:#243c56}
body[data-ui="admin"] .workspace main small{font-size:12px!important;color:#475b73!important;opacity:1}
body[data-ui="admin"] :is(.overview-health-facts span,.overview-health-message span,.overview-traffic-day>span,.overview-traffic-day b,.overview-traffic-day strong,.overview-traffic-history>summary,.overview-live-card>header b,.operations-trend-column>span,.operations-dashboard-head small,#operations-generated-at,.overview-traffic-ranges button,.update-meta span,.operations-summary-note){font-size:12px!important;color:#475b73!important;line-height:1.7!important}
body[data-ui="admin"] :is(.overview-health-banner small,.overview-live-card small,.overview-live-card>header>span){color:#3b5d55!important}
body[data-ui="admin"] .overview-live-card>header>span{font-size:12px!important}
body[data-ui="admin"] .overview-kpi-mark{font-size:12px!important}
body[data-ui="admin"] :is(.topbar kbd,#connection-label,#role-badge,.sidebar-foot strong){font-size:12px!important}
body[data-ui="admin"] #overview-realtime-state{color:#086943!important}
body[data-ui="admin"] .sidebar .nav-icon{font-size:11px;min-width:26px;color:#b4c8e0}
body[data-ui="admin"] .sidebar .nav-link.active .nav-icon{color:#c1ffe7}
body[data-ui="admin"] .live-wallet-panel small{color:#c2d9e8!important}
body[data-ui="admin"] :is(.sidebar .nav-icon,.section-index,.page-footer span,.pagination-summary,.pagination-page,.select-field>span,.search-field>span,.panel-copy,.page-heading p){font-size:12px!important;line-height:1.7}
body[data-ui="admin"] :is(.overview-period-switch button,.overview-live-event-head strong,#overview-live-event-count,.overview-quality-grid span,.overview-quality-grid strong,.overview-readiness-row b,.overview-trend-item span,.overview-coverage-panel span,.overview-comparison-panel span,.overview-quick-grid strong,.overview-quick-grid>button>span,.overview-live-card header span){font-size:12px!important;line-height:1.7!important;color:#3f566f!important}
body[data-ui="admin"] .overview-period-switch button.is-active{background:#dcece6;color:#165c48!important;border-color:#669582}
body[data-ui="admin"] :is(.operations-kpis>article>span,.realtime-user-stats>article>span){color:#475b73!important;font-size:13px}
body[data-ui="admin"] #operations-center-status{font-size:12px}
body[data-ui="admin"] #wallet-activity-live :is(.asset-panel-empty,.live-wallet-foot,.live-wallet-foot span,.asset-panel-controls,.asset-section-header>span,.asset-tool-actions>span,.asset-trend-summary>span,.asset-trend-summary>strong,.asset-metrics-grid span,.asset-trend-tabs button,.primary-asset-total>b,.live-panel-toggle span,.live-empty-state span,.asset-token-controls label){color:#c2d9e8!important;font-size:12px!important;line-height:1.7!important;opacity:1}
body[data-ui="admin"] #wallet-activity-live .asset-trend-tabs button.is-active{color:#082820!important;background:#90e9c1!important}
body[data-ui="admin"] #wallet-activity-live :is(.asset-panel-header,.asset-section-header) :is(span,small){font-size:12px!important;color:#c2d9e8!important}
body[data-ui="admin"] #wallet-activity-live :is(.live-wallet-stats,.asset-health-grid,.asset-trend-facts,.asset-portfolio-facts)>div>span{font-size:12px!important;color:#c2d9e8!important}
body[data-ui="admin"] :is(.workspace main .eyebrow,.behavior-summary span,.behavior-category-tabs button,.policy-grid span,.policy-grid strong,.boundary-grid span,.boundary-grid strong,.privacy-control-copy span,.security-note span,.security-note strong,.module-category,.module-state,.module-card-copy p,.module-center-summary,.module-updated-at,.low-frequency-actions summary span,.status-chip){font-size:12px!important;line-height:1.7!important}
body[data-ui="admin"] :is(#policy-summary,#boundary-summary,.policy-grid,.boundary-grid,.data-boundary-grid) :is(span,strong){font-size:12px!important;line-height:1.7!important}
body[data-ui="admin"] :is(#privacy-updated-at,#clear-privacy-history,#privacy-master-status,#module-updated-at,#module-master-status,#system-overall-status,#system-insights-count){font-size:12px!important;color:#475b73!important;line-height:1.7}
body[data-ui="admin"] :is(.overview-trend-visual-card,.overview-live-card,.overview-quality-card,.overview-quality-grid,.overview-quality-panel,.overview-readiness-grid,.overview-readiness-row,.overview-comparison-card,.overview-quick-actions,.dashboard-shortcuts) :is(span,p,strong,b){font-size:12px;line-height:1.7}
body[data-ui="admin"] :is(.overview-trend-visual-card .eyebrow,.overview-live-card .eyebrow,.overview-live-card>header b,.overview-quality-card summary b,.overview-quick-actions button>span,.dashboard-shortcuts button>span){color:#2f5b50!important;font-size:12px!important}
body[data-ui="admin"] :is(.overview-quality-panel>summary,.overview-quality-panel>summary b,.overview-live-event-head,.overview-quick-actions button,.operations-dashboard-head>div>p){font-size:12px!important;color:#475b73!important}
body[data-ui="admin"] .overview-quick-actions button>span{background:#e3eee9;color:#295648!important}
body[data-ui="admin"] .module-card:not(.is-enabled) .module-state{color:#52647b!important;background:#eaf0f6;border-radius:5px;padding:2px 6px}
body[data-ui="admin"] .app-center-tab.active{color:#20549a!important;background:#e9f0fb!important;border-color:#9db8df}
body[data-ui="admin"] #operators-section td code{color:#475b73!important;font-size:12px!important}
body[data-ui="admin"] .realtime-monitor{background:#edf3f8!important;color:#243c56;border-color:#c3d2e2}
body[data-ui="admin"] .realtime-monitor :is(.realtime-monitor-head strong,.realtime-events-head strong,.realtime-event strong){color:#243c56!important;font-size:13px!important}
body[data-ui="admin"] .realtime-monitor :is(small,time,.realtime-status-grid span,.realtime-status-grid small,#realtime-monitor-copy,#realtime-monitor-status,#realtime-event-count){color:#475b73!important;font-size:12px!important;line-height:1.7!important}
body[data-ui="admin"] :is(.system-health-grid,.system-quality-grid,.system-metrics-summary,.system-insights) :is(span,small,time){color:#475b73!important;font-size:13px!important;line-height:1.7!important}
body[data-ui="admin"] .system-insight strong{font-size:13px!important}
body[data-ui="admin"] #wallet-activity-live :is(strong,.live-wallet-actions button,.asset-export-actions button,.live-connection>span,#asset-market-status,#asset-chain-event-count,#asset-anomaly-count,#chain-sync-health-label){font-size:12px!important;line-height:1.7!important}
body[data-ui="admin"] #wallet-activity-live :is(.asset-kpi strong,#asset-trend-current){font-size:clamp(20px,2vw,28px)!important;line-height:1.35!important}
body[data-ui="admin"] :is(.overview-depth-panel>summary,.overview-depth-panel>summary strong,.overview-depth-panel>summary b,.overview-readiness-card .overview-card-head span,.overview-trend-card .overview-card-head span,.policy-list span,.policy-list strong,.low-frequency-panel>summary>span){font-size:12px!important;line-height:1.7!important;color:#475b73!important}
body[data-ui="admin"] .overview-live-card .overview-cockpit-card-head>div>span{color:#2f5b50!important}
body[data-ui="admin"] .workspace main details>summary>span{font-size:12px!important;line-height:1.7}
body[data-ui="admin"] button.table-row-title{color:#096650!important;font-size:13px!important}
body[data-ui="admin"] #detail .profile-admin-actions{background:#f4f8fc!important;color:#243c56!important;border-color:#bfd0e0}
body[data-ui="admin"] #detail .profile-admin-actions :is(strong,span,p){color:#243c56!important}
body[data-ui="admin"] #detail #detail-content>p.muted{color:#c2d4e3!important}
body[data-ui="admin"] #detail :is(.kv,.wallet-association-panel,.device-profile,.backup-status-card,.address-list) :is(span,p,code,time,em){font-size:12px!important;line-height:1.7!important}
body[data-ui="admin"] #detail :is(.kv,.wallet-association-panel,.device-profile,.backup-status-card) strong{font-size:14px!important;line-height:1.65}
body[data-ui="admin"] #detail .wallet-association-panel :is(time,em){color:#39604f!important}
body[data-ui="admin"] #detail .chain-chip{font-size:12px!important}
body[data-ui="admin"] #detail .backup-status-card{background:#f4f8fc!important;border-color:#bfd0e0;color:#243c56!important}
body[data-ui="admin"] #detail .backup-status-card :is(strong,span){color:#243c56!important}
body[data-ui="admin"] #detail .address-list{color:#d6e5f0}
body[data-ui="admin"] #detail .address-list>div{background:#172b3b!important;color:#d6e5f0!important;border-color:#48647b}
body[data-ui="admin"] #detail .address-list code{color:#d6e5f0!important}
body[data-ui="admin"] #detail .address-list small{color:#b9cddf!important}
body[data-ui="admin"] :is(.chain-chip,#detail .wallet-association-panel i){font-size:12px!important;line-height:1.7}
body[data-ui="admin"] :is(.agent-login-history-trigger,.agent-login-history-trigger:hover,.agent-login-history-trigger:focus){background:#f0f4f9!important;color:#243c56!important;border-color:#bdcadb!important}
body[data-ui="admin"] #command-dialog :is(em,kbd,.command-foot span){color:#475b73!important;font-size:12px!important;line-height:1.7}
body[data-ui="admin"] .topbar :is(.workspace-tool span,#operator-auth){font-size:12px!important;line-height:1.65}
body[data-ui="admin"] :is(.overview-live-empty,.login-frequency,.quality-badge,.bar-label span){font-size:12px!important;line-height:1.7}
body[data-ui="admin"] .overview-live-empty{color:#475b73!important}
body[data-ui="admin"] #detail :is(.associated-wallet-card,.associated-wallet-title,.associated-wallet-grid,.wallet-association-panel>div){min-width:0;max-width:100%;overflow-wrap:anywhere}
body[data-ui="admin"] #detail .associated-wallet-title{display:flex;flex-wrap:wrap;gap:6px}
body[data-ui="admin"] #detail .associated-wallet-title strong{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(max-width:640px){body[data-ui="admin"] #detail .associated-wallet-card{width:100%;display:grid;grid-template-columns:minmax(0,1fr)}body[data-ui="admin"] #detail .associated-wallet-card>*{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}}

/* Responsive: confine wide tables, never hide data/actions to make them fit. */
body[data-ui] :is(.content,.workspace,.workspace>main,.view,.section-block,.panel,.dashboard-panel,.section-toolbar,.filter-bar){min-width:0}
body[data-ui="agent"] .content>.view{grid-template-columns:minmax(0,1fr)}
body[data-ui="agent"] :is(.crm-stage-cards,.crm-usage,.report-metrics,.automation-usage,.alert-usage,.ads-usage){min-width:0}
@media(max-width:1100px){body[data-ui="agent"] :is(.crm-stage-cards,.crm-usage){grid-template-columns:repeat(3,minmax(0,1fr))}body[data-ui="admin"] :is(.agent-create-form,.agent-payment-settings-form){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){body[data-ui] dialog{width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)}body[data-ui="agent"] :is(.crm-stage-cards,.crm-usage,.automation-usage,.alert-usage,.ads-usage,.report-metrics){grid-template-columns:repeat(2,minmax(0,1fr))}body[data-ui="agent"] :is(.crm-form,.crm-toolbar,.crm-activity-form,.ads-form,.ads-toolbar,.alert-form,.automation-form){grid-template-columns:minmax(0,1fr)}body[data-ui="agent"] :is(.crm-note-field,.ads-note-field){grid-column:auto}body[data-ui="admin"] :is(.agent-create-form,.agent-payment-settings-form){grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){body[data-ui] :is(.panel,.dashboard-panel){overflow-wrap:anywhere}body[data-ui="agent"] :is(.content input,.content select,.content textarea,.login-card input){font-size:16px!important}body[data-ui="agent"] .sidebar{width:min(292px,90vw);transition:none!important}body[data-ui="agent"] .content>section.view>article{min-width:0}body[data-ui="agent"] :is(.crm-stage-cards,.report-cards,.automation-tier-cards,.alert-metric-cards){grid-template-columns:minmax(0,1fr)}body[data-ui="admin"] :is(.workspace main input,.workspace main select,.workspace main textarea,dialog input,dialog select,dialog textarea){font-size:16px!important}body[data-ui="admin"] .agent-plan-price-fields{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-ui="admin"] .topbar-actions{row-gap:10px}body[data-ui] .table-wrap{border-radius:10px}}
@media(prefers-reduced-motion:reduce){body[data-ui] :is(button,a,.panel,.view,.sidebar){transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* LOGIN LAYOUT FIX 20261027: reset inherited button margin/height inside password input. */
html:has(body[data-ui="agent"]){background:#080f19;color-scheme:dark;scrollbar-color:#53627a #0b1420}
body[data-ui="agent"] #login-view{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;padding:clamp(18px,4vh,40px) 20px;overflow-x:clip}
body[data-ui="agent"] #login-view .login-card{box-sizing:border-box;width:min(100%,440px);min-width:0;max-width:100%;margin:0;display:grid;grid-template-columns:minmax(0,1fr);gap:18px;padding:clamp(24px,3vw,36px);align-self:center;justify-self:center}
body[data-ui="agent"] #login-view .login-card h1{margin:0;color:#f2ce84;font-family:inherit;font-size:clamp(25px,2.5vw,30px);line-height:1.4;letter-spacing:0;font-weight:750}
body[data-ui="agent"] #login-view .login-card .eyebrow{margin:0;color:#e3c282;font-size:12px;line-height:1.6;letter-spacing:.14em}
body[data-ui="agent"] #login-view .login-card .muted{margin:-8px 0 4px;font-size:14px;line-height:1.75}
body[data-ui="agent"] #login-view .login-card label{gap:8px;margin:0;font-size:14px;line-height:1.5;min-width:0}
body[data-ui="agent"] #login-view .login-card :is(input,select){box-sizing:border-box;width:100%;height:48px;min-height:48px;margin:0;padding:11px 13px;font-size:15px;line-height:24px;border-radius:10px}
body[data-ui="agent"] #login-view .password-input{position:relative;display:block;min-width:0;height:48px;margin:0;padding:0}
body[data-ui="agent"] #login-view .password-input input{padding-right:82px}
body[data-ui="agent"] #login-view .password-input .password-toggle{position:absolute;inset:auto 7px auto auto;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:64px;height:34px;min-height:34px;max-height:34px;margin:0!important;padding:0 10px!important;font-size:13px;line-height:1;border-radius:7px;box-shadow:none!important;white-space:nowrap}
body[data-ui="agent"] #login-view .password-input .password-toggle:active{transform:translateY(-50%)}
body[data-ui="agent"] #login-view .login-card>button{box-sizing:border-box;width:100%;height:auto;min-height:48px;margin:0;padding:11px 14px;font-size:15px;line-height:1.6;border-radius:10px}
body[data-ui="agent"] #login-view .login-note{margin:0;font-size:12px;line-height:1.8;color:#b9c9dc}
body[data-ui="agent"] #login-view .error{margin:0;font-size:13px;line-height:1.7;max-width:100%}
body[data-ui="agent"] #login-view .error:empty{display:none}
@media(max-width:480px){body[data-ui="agent"] #login-view{padding:20px 14px}body[data-ui="agent"] #login-view .login-card{gap:16px;padding:24px 20px;border-radius:16px}body[data-ui="agent"] #login-view .login-card input{font-size:16px!important}body[data-ui="agent"] #login-view .login-card .muted{font-size:13px}}
@media(max-height:680px){body[data-ui="agent"] #login-view{place-items:start center;padding-top:20px;padding-bottom:20px}body[data-ui="agent"] #login-view .login-card{align-self:start}}

/* Global mobile-browser access control, administrator page only. */
body[data-ui="admin"] .agent-mobile-browser-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
body[data-ui="admin"] .agent-mobile-browser-panel>div{flex:1;min-width:min(260px,100%)}
body[data-ui="admin"] .agent-mobile-browser-panel h3{margin:0 0 8px;font-size:17px}
body[data-ui="admin"] .agent-mobile-browser-panel p{margin:0 0 7px;color:#334b66;line-height:1.8}
body[data-ui="admin"] .agent-mobile-browser-panel small{display:block;color:#52647b;font-size:12px;line-height:1.8}
body[data-ui="admin"] #agent-mobile-browser-toggle{min-height:44px;padding:10px 16px;border:1px solid #648c7f;border-radius:9px;background:#e4f4ec;color:#15583e;font-size:14px;font-weight:700}
body[data-ui="admin"] #agent-mobile-browser-toggle[aria-checked="false"]{border-color:#9bacc0;background:#eaf0f6;color:#435972}
@media(max-width:640px){body[data-ui="admin"] #agent-mobile-browser-toggle{width:100%}}
