/* ======================================================================
   RBS Desk v5.1.36 — Visual System Rebuild
   Canonical rule: light surface => dark text / dark surface => light text
   This file MUST be loaded after every legacy/hotfix stylesheet.
   ====================================================================== */

:root{
  --rbs-brand-950:#061827;
  --rbs-brand-900:#0B1E34;
  --rbs-brand-800:#0E3557;
  --rbs-brand-700:#0F527F;
  --rbs-blue-600:#0D72BF;
  --rbs-blue-500:#2493D6;
  --rbs-blue-300:#7CCAF4;
  --rbs-radius-sm:10px;
  --rbs-radius-md:14px;
  --rbs-radius-lg:18px;
  --rbs-radius-xl:24px;
  --rbs-ease:cubic-bezier(.2,.8,.2,1);
}

html[data-theme="light"]{
  color-scheme:light;
  --rbs-canvas:#F4F7FA;
  --rbs-canvas-2:#EEF3F7;
  --rbs-surface:#FFFFFF;
  --rbs-surface-raised:#FFFFFF;
  --rbs-surface-soft:#EEF4F8;
  --rbs-surface-hover:#E7F0F6;
  --rbs-text-1:#0B1D2E;
  --rbs-text-2:#40576A;
  --rbs-text-3:#6E8292;
  --rbs-border:#D7E2EA;
  --rbs-divider:#E5ECF1;
  --rbs-accent:#0D72BF;
  --rbs-accent-hover:#095C9B;
  --rbs-accent-soft:#E8F4FC;
  --rbs-success:#0D7950;
  --rbs-success-soft:#E6F6EF;
  --rbs-warning:#8C5D00;
  --rbs-warning-soft:#FFF3D7;
  --rbs-danger:#B42318;
  --rbs-danger-soft:#FDECEA;
  --rbs-focus:#0D72BF;
  --rbs-shadow:0 12px 34px rgba(18,48,74,.08);
  --rbs-shadow-float:0 20px 60px rgba(18,48,74,.16);
  --bg:var(--rbs-canvas);
  --card:var(--rbs-surface);
  --line:var(--rbs-border);
  --text:var(--rbs-text-1);
  --muted:var(--rbs-text-2);
  --blue:var(--rbs-accent);
}

html[data-theme="dark"]{
  color-scheme:dark;
  --rbs-canvas:#06131E;
  --rbs-canvas-2:#091A28;
  --rbs-surface:#0D2131;
  --rbs-surface-raised:#11293B;
  --rbs-surface-soft:#17364A;
  --rbs-surface-hover:#1B4056;
  --rbs-text-1:#F4F8FB;
  --rbs-text-2:#C5D3DD;
  --rbs-text-3:#92A8B8;
  --rbs-border:#29485B;
  --rbs-divider:#203C4E;
  --rbs-accent:#5AB8F2;
  --rbs-accent-hover:#82CDF7;
  --rbs-accent-soft:#123B56;
  --rbs-success:#6AD9A6;
  --rbs-success-soft:#113A2E;
  --rbs-warning:#FFD477;
  --rbs-warning-soft:#3B2F15;
  --rbs-danger:#FF968D;
  --rbs-danger-soft:#3B2024;
  --rbs-focus:#7BC9F7;
  --rbs-shadow:0 16px 40px rgba(0,0,0,.22);
  --rbs-shadow-float:0 28px 72px rgba(0,0,0,.38);
  --bg:var(--rbs-canvas);
  --card:var(--rbs-surface);
  --line:var(--rbs-border);
  --text:var(--rbs-text-1);
  --muted:var(--rbs-text-2);
  --blue:var(--rbs-accent);
  --green:var(--rbs-success);
  --amber:var(--rbs-warning);
  --red:var(--rbs-danger);
}

/* ---------- Canvas / shell ---------- */
html[data-theme],html[data-theme] body{background:var(--rbs-canvas)!important;color:var(--rbs-text-1)!important}
html[data-theme] body{accent-color:var(--rbs-accent)}
html[data-theme] body :focus-visible{outline:2px solid var(--rbs-focus)!important;outline-offset:2px!important}
html[data-theme] body ::selection{background:color-mix(in srgb,var(--rbs-accent) 42%,transparent);color:var(--rbs-text-1)}
html[data-theme] body :is(.app-shell,.ow-shell,.ow-stage,.ow-main,.v1813-client-stage,.v1813-client-stage>.page,#mainContent){background:var(--rbs-canvas)!important;color:var(--rbs-text-1)!important}
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent){background-image:radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--rbs-accent) 7%,transparent),transparent 28%)!important}

/* Startup paint */
html[data-theme] [data-rbs-startup]{background:var(--rbs-canvas)!important;color:var(--rbs-text-1)!important}
html[data-theme] [data-rbs-startup] strong{color:var(--rbs-text-1)!important}
html[data-theme] [data-rbs-startup] :is(small,p){color:var(--rbs-text-2)!important}
html[data-theme] [data-rbs-startup] div[style*="background"]{border-color:transparent!important}
html[data-theme="light"] [data-rbs-startup] div[style*="height:"]{background:#E6EDF3!important}
html[data-theme="dark"] [data-rbs-startup] div[style*="height:"]{background:#173448!important}

/* ---------- Persistent navigation ---------- */
html[data-theme] body :is(.ow-nav,.v1813-client-rail){background:linear-gradient(180deg,#0A2034 0%,#0B3150 100%)!important;border-color:rgba(255,255,255,.08)!important;color:#EEF7FC!important}
html[data-theme] body :is(.ow-nav,.v1813-client-rail) :is(strong,span,small,b){color:inherit}
html[data-theme] body :is(.ow-nav nav button,.ow-nav-foot button,.v1813-client-rail nav button,.v1813-client-rail-foot button){color:#C5D8E5!important;background:transparent!important;border-color:transparent!important}
html[data-theme] body :is(.ow-nav nav button:hover,.ow-nav-foot button:hover,.v1813-client-rail nav button:hover,.v1813-client-rail-foot button:hover){background:rgba(255,255,255,.07)!important;color:#FFFFFF!important}
html[data-theme] body :is(.ow-nav nav button.active,.v1813-client-rail nav button.active){background:linear-gradient(135deg,#155B8D,#1C70A9)!important;color:#FFFFFF!important;box-shadow:inset 3px 0 0 #7FD3FF!important}

/* ---------- Top bars ---------- */
html[data-theme="light"] body :is(.ow-top,.topbar,.v1813-client-topbar){background:rgba(255,255,255,.94)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;backdrop-filter:blur(18px)}
html[data-theme="dark"] body :is(.ow-top,.topbar,.v1813-client-topbar){background:rgba(9,27,41,.94)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;backdrop-filter:blur(18px)}
html[data-theme] body :is(.ow-top,.topbar,.v1813-client-topbar) :is(strong,.v1813-desktop-title strong){color:var(--rbs-text-1)!important}
html[data-theme] body :is(.ow-top,.topbar,.v1813-client-topbar) :is(small,.v1813-desktop-title small){color:var(--rbs-text-3)!important}
html[data-theme] body :is(.ow-top-actions>button,.topbar-actions>button,.v1813-client-top-actions>button){background:var(--rbs-surface-soft)!important;border:1px solid var(--rbs-border)!important;color:var(--rbs-text-1)!important}
html[data-theme] body :is(.ow-top-actions>button,.topbar-actions>button,.v1813-client-top-actions>button):hover{background:var(--rbs-surface-hover)!important}

/* ---------- Typography hierarchy ---------- */
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent,.modal-card) :is(h1,h2,h3,h4,h5,h6,.ticket-title){color:var(--rbs-text-1)!important}
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent,.modal-card) :is(p,small,.muted){color:var(--rbs-text-2)!important}
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent,.modal-card) :is(.eyebrow,.portal-kicker,[class*="kicker"]){color:var(--rbs-accent)!important}
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent,.modal-card) em{color:var(--rbs-text-3)!important;font-style:normal}

/* ---------- Canonical surfaces ---------- */
html[data-theme] body :is(.card,.metric,.hub-card,.admin-item,.ticket-row,.modal-card,.login-card){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;box-shadow:var(--rbs-shadow)!important}
html[data-theme] body :is(.ow-kpis>button,.ow-kpis>div,.ow-central-grid>section,.ow-central-list>button){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;box-shadow:var(--rbs-shadow)!important}
html[data-theme] body :is(.ow-inbox,.ow-context,.ow-chat-head,.ow-chat-composer,.ow-compose-pop,.ow-ticket-table,.ow-tr,.ow-kanban-card,.ow-funnel){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme] body :is(.ow-customer-card,.s14g-customer-card,.p02-customer-card,.ow-customer-hero,.ow-customer-metrics>div,.ow-customer-info,.ow-customer-timeline,.ow-timeline-event){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;box-shadow:var(--rbs-shadow)!important}
html[data-theme] body :is(.kb-card,.v5127-settings-card,.v5127-more-group>div,.v5127-kb-card,.v5130-tile,.v5130-article-grid>button,.v5130-kpis>div,.v5130-list,.v5130-report-library>button,.v5131-kpis>div,.v5131-panel,.v5132-kpis>article,.v5132-mini-grid>div,.mg12-card,.mg12-kpi,.mg12-panel){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;box-shadow:var(--rbs-shadow)!important}

/* Families that used #fff heavily. Separate rules on purpose: one invalid selector can never cancel the whole recovery. */
html[data-theme="dark"] body .queue-row2{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .queue-tabs2 button{background:var(--rbs-surface-raised)!important;color:var(--rbs-text-2)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .template-list2 button{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .admin-area-card{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .admin-quick-row button{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .service-card{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .company-service-row{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body .param-row{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}

/* ---------- Surface text reset ---------- */
html[data-theme] body :is(.card,.metric,.hub-card,.admin-item,.ticket-row,.ow-kpis>button,.ow-kpis>div,.ow-central-grid>section,.ow-central-list>button,.ow-customer-card,.ow-customer-hero,.ow-customer-metrics>div,.ow-customer-info,.ow-customer-timeline,.v5130-tile,.v5130-list,.v5130-report-library>button,.v5131-panel,.v5131-kpis>div,.v5132-kpis>article,.v5132-mini-grid>div) :is(h1,h2,h3,h4,strong,b,label){color:var(--rbs-text-1)!important}
html[data-theme] body :is(.card,.metric,.hub-card,.admin-item,.ticket-row,.ow-kpis>button,.ow-kpis>div,.ow-central-grid>section,.ow-central-list>button,.ow-customer-card,.ow-customer-hero,.ow-customer-metrics>div,.ow-customer-info,.ow-customer-timeline,.v5130-tile,.v5130-list,.v5130-report-library>button,.v5131-panel,.v5131-kpis>div,.v5132-kpis>article,.v5132-mini-grid>div) :is(p,small,em){color:var(--rbs-text-2)!important}

/* Customer cards: fix white card / white text regression explicitly. */
html[data-theme] body .ow-customer-card h3{color:var(--rbs-text-1)!important}
html[data-theme] body .ow-customer-card :is(p,small){color:var(--rbs-text-2)!important}
html[data-theme] body .ow-customer-card footer{border-color:var(--rbs-divider)!important;color:var(--rbs-text-2)!important}
html[data-theme] body .ow-customer-card footer span{background:var(--rbs-surface-soft)!important;color:var(--rbs-text-2)!important;border:1px solid var(--rbs-border)!important}
html[data-theme] body .ow-customer-card footer b{color:var(--rbs-text-1)!important}

/* ---------- Inputs / selects / search / composer ---------- */
html[data-theme] body :is(input,textarea,select,.ow-filterbar>div,.ow-order-control,.v5130-search,.v5127-kb-search){background:var(--rbs-surface-raised)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;box-shadow:none!important}
html[data-theme] body :is(input,textarea)::placeholder{color:var(--rbs-text-3)!important;opacity:1}
html[data-theme] body :is(input,textarea,select):focus{border-color:var(--rbs-focus)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--rbs-focus) 18%,transparent)!important}
html[data-theme] body option{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important}

/* ---------- Buttons ---------- */
html[data-theme] body :is(.btn,.iconbtn,.v5131-back,.v5130-page>.back,.mg12-page>.back,.v5131-detail){background:var(--rbs-surface-raised)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme] body :is(.btn,.iconbtn,.v5131-back,.v5130-page>.back,.mg12-page>.back,.v5131-detail):hover{background:var(--rbs-surface-hover)!important;border-color:color-mix(in srgb,var(--rbs-accent) 48%,var(--rbs-border))!important}
html[data-theme] body :is(.btn.primary,.btn.blue,.rbs-ui-btn.primary,.ow-send,.cw-send,.chat-ux-send){background:linear-gradient(135deg,#0E6EB5,#178BCF)!important;color:#FFFFFF!important;border-color:#2699DA!important;box-shadow:0 8px 22px rgba(13,114,191,.22)!important}
html[data-theme] body :is(.btn.primary,.btn.blue,.rbs-ui-btn.primary,.ow-send,.cw-send,.chat-ux-send):hover{background:linear-gradient(135deg,#0B5D99,#137EBE)!important}
html[data-theme] body .btn.danger{background:var(--rbs-danger-soft)!important;color:var(--rbs-danger)!important;border-color:color-mix(in srgb,var(--rbs-danger) 38%,var(--rbs-border))!important}

/* ---------- Ticketing ---------- */
html[data-theme] body .ow-ticket-table{border-radius:var(--rbs-radius-lg)!important;overflow:hidden}
html[data-theme] body .ow-tr{border-color:var(--rbs-divider)!important}
html[data-theme] body .ow-tr:hover{background:var(--rbs-surface-hover)!important}
html[data-theme] body .ow-tr :is(strong,b){color:var(--rbs-text-1)!important}
html[data-theme] body .ow-tr :is(small,span:not(.tag):not(.status)){color:var(--rbs-text-2)!important}
html[data-theme] body .ow-filterbar>div{border:1px solid var(--rbs-border)!important;border-radius:12px!important}
html[data-theme] body .ow-filterbar>div input{border:0!important;background:transparent!important}

/* ---------- Chat workspace ---------- */
html[data-theme] body .ow-chat-workspace{background:var(--rbs-canvas)!important;color:var(--rbs-text-1)!important}
html[data-theme] body .ow-inbox{background:var(--rbs-surface)!important}
html[data-theme] body .ow-center{background:var(--rbs-canvas-2)!important;color:var(--rbs-text-1)!important}
html[data-theme] body .ow-context{background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme] body .ow-context :is(h1,h2,h3,strong,b){color:var(--rbs-text-1)!important}
html[data-theme] body .ow-context :is(p,small,span){color:var(--rbs-text-2)!important}
html[data-theme] body .ow-zero :is(h1,h2,h3,strong){color:var(--rbs-text-1)!important}
html[data-theme] body .ow-zero :is(p,small){color:var(--rbs-text-2)!important}
html[data-theme] body :is(.chat-bubble,.cw-bubble){background:var(--rbs-surface-raised)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important}
html[data-theme] body :is(.chat-bubble.mine,.cw-bubble.mine){background:color-mix(in srgb,var(--rbs-accent) 24%,var(--rbs-surface))!important;color:var(--rbs-text-1)!important;border-color:color-mix(in srgb,var(--rbs-accent) 55%,var(--rbs-border))!important}

/* ---------- Reports / dashboards ---------- */
html[data-theme] body :is(.v5131-table-wrap,.mg12-table-wrap){background:var(--rbs-surface)!important;border-color:var(--rbs-border)!important}
html[data-theme] body :is(.v5131-table th,.mg12-table th){background:var(--rbs-surface-soft)!important;color:var(--rbs-text-2)!important;border-color:var(--rbs-divider)!important}
html[data-theme] body :is(.v5131-table td,.mg12-table td){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-divider)!important}
html[data-theme] body :is(.v5131-table tbody tr:hover td,.mg12-table tbody tr:hover td){background:var(--rbs-surface-hover)!important}
html[data-theme] body .v5131-bars button{background:transparent!important;color:var(--rbs-text-1)!important}
html[data-theme] body .v5131-bars button span{color:var(--rbs-text-2)!important}
html[data-theme] body .v5131-bars em{background:var(--rbs-surface-soft)!important}
html[data-theme] body .v5131-bars em i{background:linear-gradient(90deg,var(--rbs-accent),#72CEF8)!important}

/* ---------- Portal client ---------- */
html[data-theme] body.portal-client :is(.portal-home,.v186-portal-home){color:var(--rbs-text-1)!important}
html[data-theme] body.portal-client :is(.portal-hero,.v186-portal-hero){background:linear-gradient(135deg,#0C3150 0%,#176BBA 62%,#1B80C3 100%)!important;color:#FFFFFF!important;border-color:rgba(255,255,255,.12)!important;box-shadow:0 24px 64px rgba(5,36,60,.24)!important}
html[data-theme] body.portal-client :is(.portal-hero,.v186-portal-hero) :is(h1,h2,h3,strong,b){color:#FFFFFF!important}
html[data-theme] body.portal-client :is(.portal-hero,.v186-portal-hero) :is(p,small,span){color:#D7EAF7!important}
html[data-theme] body.portal-client :is(.r217-metrics button,.ss2-intent,.r217-action-card,.r217-journey-item,.r217-more-card,.v186-portal-shortcuts>button){background:var(--rbs-surface)!important;color:var(--rbs-text-1)!important;border-color:var(--rbs-border)!important;box-shadow:var(--rbs-shadow)!important}
html[data-theme] body.portal-client :is(.r217-metrics button,.ss2-intent,.r217-action-card,.r217-journey-item,.r217-more-card,.v186-portal-shortcuts>button) :is(strong,b,h3){color:var(--rbs-text-1)!important}
html[data-theme] body.portal-client :is(.r217-metrics button,.ss2-intent,.r217-action-card,.r217-journey-item,.r217-more-card,.v186-portal-shortcuts>button) :is(small,p,span:not(.rbs-ui-icon)){color:var(--rbs-text-2)!important}

/* ---------- Semantic colors: ONLY semantic components get gold/red/green ---------- */
html[data-theme] body :is(.tag.open,.status.ok,.mg12-chip.ok){background:var(--rbs-success-soft)!important;color:var(--rbs-success)!important}
html[data-theme] body :is(.tag.waiting_customer,.status.warn,.mg12-chip.warn,.banner.warn){background:var(--rbs-warning-soft)!important;color:var(--rbs-warning)!important;border-color:color-mix(in srgb,var(--rbs-warning) 34%,var(--rbs-border))!important}
html[data-theme] body :is(.tag.urgent,.tag.high,.status.err,.mg12-chip.err,.banner.danger){background:var(--rbs-danger-soft)!important;color:var(--rbs-danger)!important;border-color:color-mix(in srgb,var(--rbs-danger) 34%,var(--rbs-border))!important}
html[data-theme] body :is(.tag.resolved,.tag.closed){background:var(--rbs-success-soft)!important;color:var(--rbs-success)!important}
html[data-theme] body :is(.sla .risk,.sla-risk,.risk,.danger){color:var(--rbs-danger)!important}

/* ---------- Modal / sheets ---------- */
html[data-theme] body .modal-shell{background:rgba(0,7,12,.62)!important}
html[data-theme] body .modal-card{background:var(--rbs-surface-raised)!important;color:var(--rbs-text-1)!important;border:1px solid var(--rbs-border)!important;box-shadow:var(--rbs-shadow-float)!important}
html[data-theme] body .v1813-profile-group{background:var(--rbs-surface)!important;border-color:var(--rbs-border)!important;color:var(--rbs-text-1)!important}
html[data-theme] body .v1813-profile-row{border-color:var(--rbs-divider)!important;color:var(--rbs-text-1)!important}
html[data-theme] body .v1813-profile-row :is(strong,b){color:var(--rbs-text-1)!important}
html[data-theme] body .v1813-profile-row small{color:var(--rbs-text-2)!important}
html[data-theme] body .ux-segmented{background:var(--rbs-surface-soft)!important}
html[data-theme] body .ux-segmented button{color:var(--rbs-text-2)!important}
html[data-theme] body .ux-segmented button.active{background:var(--rbs-surface-raised)!important;color:var(--rbs-text-1)!important;box-shadow:0 4px 12px rgba(0,0,0,.10)!important}

/* ---------- Visible theme selector ---------- */
.rbs-theme-trigger{width:40px!important;height:40px!important;border-radius:12px!important;display:grid!important;place-items:center!important;padding:0!important;position:relative!important;flex:0 0 auto!important}
.rbs-theme-login-trigger{position:fixed!important;z-index:10040!important;top:max(14px,env(safe-area-inset-top))!important;right:16px!important;box-shadow:var(--rbs-shadow)!important}
.rbs-theme-trigger svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.rbs-theme-popover{position:fixed;z-index:10050;width:220px;padding:8px;border:1px solid var(--rbs-border);border-radius:16px;background:var(--rbs-surface-raised);box-shadow:var(--rbs-shadow-float);color:var(--rbs-text-1);animation:rbsThemePop .16s var(--rbs-ease)}
.rbs-theme-popover[hidden]{display:none!important}
.rbs-theme-popover .rbs-theme-pop-title{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--rbs-text-3);padding:6px 8px 8px}
.rbs-theme-popover button{width:100%;min-height:42px;border:0;border-radius:11px;background:transparent;color:var(--rbs-text-1);display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:8px;text-align:left;padding:8px 10px;font-weight:800}
.rbs-theme-popover button:hover{background:var(--rbs-surface-hover)}
.rbs-theme-popover button.active{background:var(--rbs-accent-soft);color:var(--rbs-accent)}
.rbs-theme-popover button small{color:var(--rbs-text-3)!important;font-size:10px;font-weight:700}
.rbs-theme-popover button i{width:20px;height:20px;display:grid;place-items:center;font-style:normal;font-size:16px}
@keyframes rbsThemePop{from{opacity:0;transform:translateY(-5px) scale(.98)}to{opacity:1;transform:none}}

.rbs-theme-profile-setting{margin-top:12px;padding-top:12px;border-top:1px solid var(--rbs-divider)}
.rbs-theme-profile-setting>div:first-child strong,.rbs-theme-profile-setting>div:first-child small{display:block}
.rbs-theme-profile-setting>div:first-child strong{color:var(--rbs-text-1)!important;font-size:13px}
.rbs-theme-profile-setting>div:first-child small{color:var(--rbs-text-2)!important;margin-top:2px;font-size:11px}
.rbs-theme-profile-options{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;background:var(--rbs-surface-soft);padding:4px;border-radius:12px;margin-top:10px}
.rbs-theme-profile-options button{min-height:40px;border:0;border-radius:9px;background:transparent;color:var(--rbs-text-2);font-weight:850}
.rbs-theme-profile-options button.active{background:var(--rbs-surface-raised);color:var(--rbs-text-1);box-shadow:0 3px 10px rgba(0,0,0,.10)}

/* ---------- Bottom nav ---------- */
html[data-theme="light"] body :is(.ow-mobile-nav,.bottom-nav,.v1813-client-mobile-nav){background:rgba(255,255,255,.96)!important;border-color:var(--rbs-border)!important}
html[data-theme="dark"] body :is(.ow-mobile-nav,.bottom-nav,.v1813-client-mobile-nav){background:rgba(9,27,41,.96)!important;border-color:var(--rbs-border)!important}
html[data-theme] body :is(.ow-mobile-nav,.bottom-nav,.v1813-client-mobile-nav) button{color:var(--rbs-text-3)!important}
html[data-theme] body :is(.ow-mobile-nav,.bottom-nav,.v1813-client-mobile-nav) button.active{background:var(--rbs-accent-soft)!important;color:var(--rbs-accent)!important}

/* ---------- Login ---------- */
html[data-theme="light"] body .login-wrap{background:radial-gradient(circle at 100% 0%,#DDEDFC 0%,transparent 36%),linear-gradient(160deg,#F9FBFD,#EEF4F8)!important}
html[data-theme="dark"] body .login-wrap{background:radial-gradient(circle at 100% 0%,rgba(26,116,180,.28) 0%,transparent 36%),linear-gradient(160deg,#06131E,#0A1C2A)!important}
html[data-theme] body .login-card :is(h1,strong,label){color:var(--rbs-text-1)!important}
html[data-theme] body .login-card :is(p,small){color:var(--rbs-text-2)!important}

/* ---------- Premium micro-interactions ---------- */
@media (hover:hover){
  html[data-theme] body :is(.ow-customer-card,.v5130-tile,.v5130-report-library>button,.hub-card,.r217-action-card,.ss2-intent){transition:transform .16s var(--rbs-ease),border-color .16s var(--rbs-ease),box-shadow .16s var(--rbs-ease)}
  html[data-theme] body :is(.ow-customer-card,.v5130-tile,.v5130-report-library>button,.hub-card,.r217-action-card,.ss2-intent):hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--rbs-accent) 45%,var(--rbs-border))!important;box-shadow:0 16px 40px color-mix(in srgb,var(--rbs-accent) 10%,transparent)!important}
}

@media(max-width:820px){
  .rbs-theme-trigger{width:38px!important;height:38px!important}
  .rbs-theme-popover{width:min(240px,calc(100vw - 24px))}
}

@media(prefers-reduced-motion:reduce){
  .rbs-theme-popover{animation:none!important}
}

/* Hide superseded v5.1.32 profile theme card; v5.1.36 owns the selector. */
.rbs-theme-card{display:none!important}

/* ---------- Realtime/header controls ---------- */
html[data-theme] body .rbs-refresh-btn,
html[data-theme] body .rbs-pending-btn,
html[data-theme] body .ow-presence-dot,
html[data-theme] body .v187-admin-settings-top{
  background:var(--rbs-surface-soft)!important;
  color:var(--rbs-text-1)!important;
  border-color:var(--rbs-border)!important;
  box-shadow:none!important;
}
html[data-theme] body .rbs-refresh-btn:hover,
html[data-theme] body .v187-admin-settings-top:hover{background:var(--rbs-surface-hover)!important}
html[data-theme] body .rbs-refresh-label{color:inherit!important}
html[data-theme] body .ow-context.collapsed button,
html[data-theme] body .ow-context-list button,
html[data-theme] body .ow-chat-head-actions>button{
  background:var(--rbs-surface-raised)!important;
  color:var(--rbs-text-1)!important;
  border-color:var(--rbs-border)!important;
}

/* ---------- Neutralize accidental decorative gold inside prose ---------- */
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent) :is(p,small) :is(span,b,strong,em){color:inherit}
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent) :is(.status.warn,.tag.waiting_customer,.banner.warn,.risk,.sla-risk){color:var(--rbs-warning)!important}
html[data-theme] body :is(.ow-main,.v1813-client-stage>.page,#mainContent) :is(.status.err,.tag.urgent,.tag.high,.banner.danger,.danger){color:var(--rbs-danger)!important}

/* ---------- Theme selector touch targets ---------- */
.rbs-theme-trigger{min-width:40px!important;min-height:40px!important}


/* ===== RBS Desk para Windows · v5.1.36 ===== */
.rbs-windows-entry{margin:18px 0 8px;padding-top:16px;border-top:1px solid var(--border,rgba(15,38,61,.12))}
.rbs-windows-login-cta,.rbs-windows-installed{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;border:1px solid var(--border,rgba(15,38,61,.14));border-radius:16px;padding:13px 14px;background:var(--surface,#fff);color:var(--text,#102235);text-decoration:none;box-shadow:0 8px 22px rgba(13,43,77,.06);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.rbs-windows-login-cta:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--action,#1768ac) 48%,var(--border,#d8e0e8));box-shadow:0 11px 26px rgba(13,43,77,.10)}
.rbs-windows-login-cta>span:nth-child(2),.rbs-windows-installed>div{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px}
.rbs-windows-login-cta strong,.rbs-windows-installed strong{font-size:13px;line-height:1.25;color:var(--text,#102235)}
.rbs-windows-login-cta small,.rbs-windows-installed small{font-size:11.5px;line-height:1.35;color:var(--muted,#667789)}
.rbs-windows-login-cta>b{font-size:22px;font-weight:500;color:var(--muted,#667789)}
.rbs-windows-logo,.rbs-windows-installed>span{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:var(--action-soft,#eaf3fb);color:var(--action,#1768ac);font-size:22px;font-weight:800}
.rbs-windows-installed{box-shadow:none;background:var(--surface-subtle,#f7f9fb)}
.rbs-windows-hub{position:relative}
.rbs-windows-hub::after{content:'WINDOWS';position:absolute;top:12px;right:12px;font-size:9px;letter-spacing:.09em;font-weight:800;color:var(--muted,#667789)}
.rbs-windows-hub.is-installed::after{content:'INSTALADO'}
@media(max-width:680px){.rbs-windows-entry{margin-top:14px}.rbs-windows-login-cta,.rbs-windows-installed{border-radius:14px;padding:12px}.rbs-windows-login-cta small,.rbs-windows-installed small{font-size:11px}}
