/* ==========================================================================
   RBM look v2 (December 2026): calm flat cards on a warm off-white page, one red accent.
   Follows the approved mockups (RBM Dashboard Redesign canvas).
   Active only while <html> has class "v2". The hub sets it on itself and on every module it opens;
   "Switch back to the classic look" removes it everywhere. Only changes how things LOOK.
   ========================================================================== */
html.v2:root:root:root:not([data-theme="dark"]){
  --cw-page:#F6F1EF; --cw-page-2:#F1EAE8; --cw-chip:#F3EAE8; --cw-paper:#FBF6F5;
  --cw-text:#5C4A48; --cw-mute:#6E5E5C; --cw-line:#EFE4E2; --cw-line-2:#F3EAE8; --cw-edge:transparent;
  --cw-shadow:none; --cw-shadow-h:0 10px 30px rgba(34,20,20,.08); --cw-btn:none;
  --page:#F6F1EF; --bg:#F6F1EF; --neutral:#F3EAE8; --line:#EFE4E2; --line2:#F3EAE8; --line-2:#F3EAE8; --line-soft:#F3EAE8;
  --surface-2:#FBF6F5; --text-2:#5C4A48; --text-3:#6E5E5C; --sub:#6E5E5C; --muted:#6E5E5C; --mute:#6E5E5C; --ink-muted:#6E5E5C; --ink-soft:#6E5E5C;
  --rbm-page:#F6F1EF; --rbm-grey:#F3EAE8; --rbm-line:#EFE4E2; --rbm-line-soft:#F3EAE8; --rbm-muted:#6E5E5C;
  --v2-tint:#FBF1F0; --v2-red:#B82926; --v2-red-t:#A8231F; --v2-soft:#FBEAE9; --v2-ink:#1E1514; --v2-edge:#E6D8D6;
}
/* page */
html.v2:root:root:root:not([data-theme="dark"]) body{background-color:#F6F1EF!important;background-image:none!important}
html.v2:root:root:root:not([data-theme="dark"]) h1{font-weight:600;letter-spacing:-.02em}
html.v2:root:root:root:not([data-theme="dark"]) a{color:var(--v2-red-t)}

/* cards: white, large radius, no border, no shadow */
html.v2:root:root:root:not([data-theme="dark"]) :is(.card,.panel,.module-card,.kpi,.stat,.tile,.box,.strip,.dpanel,.bpanel,.info,.product,details.vendor,.vtable-wrap,.kcol,.kcard,.cred,.lb,.add,.sendrow,.up-card,.hcard){
  background:#FFFFFF!important;border:0!important;border-radius:22px!important;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(.card,.module-card,.panel,.kpi,.stat,.strip,.sheet)::after{display:none!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(a.card,button.card,.module-card,.card[data-go],.card[data-open],.card[onclick],.kcard,.stat):hover{transform:none!important;box-shadow:0 0 0 2px var(--v2-soft)!important}
html.v2:root:root:root:not([data-theme="dark"]) .empty{background:#FFFFFF!important;border:1.5px dashed #E0CFCD!important;border-radius:22px!important;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) .msg{border-radius:16px!important;box-shadow:none!important}

/* buttons: pills, flat */
html.v2:root:root:root:not([data-theme="dark"]) :is(.btn,button.btn,a.btn){border-radius:999px!important;box-shadow:none!important;font-weight:600}
html.v2:root:root:root:not([data-theme="dark"]) :is(.btn.p,.btn.primary,button.p,button.primary,.btn-primary,.btn.accent,.btn.red,.btn.go){background:var(--v2-red)!important;border-color:var(--v2-red)!important;color:#FFFFFF!important;box-shadow:none!important;background-image:none!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(.btn.p,.btn.primary,button.p,button.primary,.btn-primary,.btn.accent)::after{display:none!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(.btn.p,.btn.primary,button.p,button.primary,.btn-primary,.btn.accent):hover:not(:disabled){background:#9E2320!important;transform:none!important}
html.v2:root:root:root:not([data-theme="dark"]) .btn:not(.p):not(.primary):not(.accent):not(.d):not(.danger):not(.l):not(.green):not(.btn-primary):not(.red){background:#FFFFFF!important;border:1px solid var(--v2-edge)!important;color:var(--v2-ink)!important;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) .btn:not(.p):not(.primary):not(.accent):not(.d):not(.danger):not(.l):not(.green):not(.btn-primary):not(.red):hover:not(:disabled){background:var(--v2-tint)!important;transform:none!important}
html.v2:root:root:root:not([data-theme="dark"]) .btn.ghost{background:transparent!important;border-color:transparent!important;color:var(--cw-mute)!important}

/* tabs: one white pill bar, the open tab dark */
html.v2:root:root:root:not([data-theme="dark"]) .tabs{display:flex;flex-wrap:wrap;gap:4px!important;padding:4px!important;background:#FFFFFF!important;border:0!important;border-radius:24px!important;width:max-content;max-width:100%;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) .tabs > :is(.tab,button,a){min-height:40px;padding:0 16px!important;border:0!important;border-radius:999px!important;background:transparent!important;color:var(--cw-mute)!important;font-weight:600!important;display:inline-flex;align-items:center;gap:6px}
html.v2:root:root:root:not([data-theme="dark"]) .tabs > :is(.tab,button,a):hover{background:var(--v2-tint)!important;color:var(--v2-ink)!important}
html.v2:root:root:root:not([data-theme="dark"]) .tabs > :is(.tab,button,a):is([aria-selected="true"],.on,.active,[aria-current="page"]){background:var(--v2-ink)!important;color:#FFFFFF!important}
/* stock count's section bar is the same pill bar */
html.v2:root:root:root:not([data-theme="dark"]) nav#nav.nav{display:flex!important;gap:4px!important;padding:4px!important;background:#FFFFFF!important;border:0!important;border-radius:999px!important;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) nav#nav.nav button{min-height:40px;padding:0 16px!important;border-radius:999px!important;background:transparent!important;color:var(--cw-mute)!important;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) nav#nav.nav button[aria-current="page"]{background:var(--v2-ink)!important;color:#FFFFFF!important}
/* phones: tab bars stay on one line and scroll sideways instead of stacking into a box */
@media (max-width:700px){
  html.v2:root:root:root:not([data-theme="dark"]) :is(.tabs,nav#nav.nav){display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;overflow-x:auto!important;width:auto!important;max-width:100%!important;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html.v2:root:root:root:not([data-theme="dark"]) :is(.tabs,nav#nav.nav)::-webkit-scrollbar{display:none}
  html.v2:root:root:root:not([data-theme="dark"]) :is(.tabs > *,nav#nav.nav button){flex:none!important;white-space:nowrap!important}
}

/* tables: light rows, small uppercase headings */
html.v2:root:root:root:not([data-theme="dark"]) :is(table.tbl,table.vtable,table.rvt,table.pt,table.cmp,table.cc-cmp,table.gc-results,table.stack,.vtable-wrap table) th{background:transparent!important;font-size:11.5px!important;letter-spacing:.06em;text-transform:uppercase;color:var(--cw-mute)!important;font-weight:600!important;border:0!important;border-bottom:1px solid #EFE4E2!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(table.tbl,table.vtable,table.rvt,table.pt,table.cmp,table.cc-cmp,table.gc-results,table.stack,.vtable-wrap table) td{border-left:0!important;border-right:0!important;border-top:0!important;border-bottom:1px solid #F3EAE8!important}
@media (hover:hover) and (pointer:fine){html.v2:root:root:root:not([data-theme="dark"]) :is(table.tbl,table.vtable,table.rvt,table.pt) tbody tr:hover td{background:var(--v2-tint)}}

/* fields */
html.v2:root:root:root:not([data-theme="dark"]) :is(input[type=text],input[type=search],input[type=number],input[type=email],input[type=password],input[type=date],input:not([type]),select,textarea):not(.cnt):not([class*=cell]){border-radius:14px;border-color:var(--v2-edge)}
html.v2:root:root:root:not([data-theme="dark"]) :is(.pill,.chip,.tag,.lz){border-radius:999px}

/* ---------- the hub ---------- */
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) .top{background:#F6F1EF!important;border-bottom:0!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) .side{background:#FFFFFF!important;border:0!important;border-radius:24px;margin:8px 0 12px 12px;height:calc(100vh - 76px)!important;top:64px!important;box-shadow:none!important}
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) .side .nav{border-left:0!important;border-radius:12px!important;min-height:40px}
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) .side .nav.on{background:var(--v2-soft)!important;color:var(--v2-red-t)!important;font-weight:600}
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) .side .nav.on .ni{color:var(--v2-red-t)!important}
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) #frames,html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) #frames iframe{background:#F6F1EF!important}
html.v2[data-app="hub"]:root:root:root:not([data-theme="dark"]) .card{padding:20px}

/* every button the same height and centred, including the ones that open a menu (<summary class="btn">) */
html.v2:root:root:root:not([data-theme="dark"]) :is(.btn,summary.btn){display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-height:40px;line-height:1.2;vertical-align:middle}
html.v2:root:root:root:not([data-theme="dark"]) summary.btn{margin:0!important;list-style:none}
html.v2:root:root:root:not([data-theme="dark"]) summary.btn::-webkit-details-marker{display:none}
html.v2:root:root:root:not([data-theme="dark"]) details[open]>summary.btn{background:var(--v2-tint)!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(.btn.ghost,summary.btn.ghost){background:#FFFFFF!important;border:1px solid var(--v2-edge)!important;color:var(--v2-ink)!important}

/* ---------- clean-up pass: fewer heavy borders, tidy filter rows ---------- */
html.v2:root:root:root:not([data-theme="dark"]) .cocard{border:0!important;border-radius:22px!important;box-shadow:none!important}
html.v2:root:root:root:not([data-theme="dark"]) .cobadge{border:0!important;border-radius:12px!important}
html.v2:root:root:root:not([data-theme="dark"]) :is(.toolbar,.tools,.fbar,.filters){gap:8px!important;align-items:center}
@media (max-width:700px){
  /* status chips: one row that scrolls sideways */
  html.v2:root:root:root:not([data-theme="dark"]) .chipsrow{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none;gap:6px!important;max-width:100%}
  html.v2:root:root:root:not([data-theme="dark"]) .chipsrow::-webkit-scrollbar{display:none}
  html.v2:root:root:root:not([data-theme="dark"]) .chipsrow>*{flex:none!important}
  /* a search box in a toolbar takes the whole first line */
  html.v2:root:root:root:not([data-theme="dark"]) .toolbar>input[type=search]{flex:1 1 100%!important;width:100%!important}
  html.v2:root:root:root:not([data-theme="dark"]) .toolbar .sp{display:none}
}
@media (max-width:700px){
  /* number tiles two to a row on phones instead of one long column */
  html.v2:root:root:root:not([data-theme="dark"]) .tiles{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  html.v2:root:root:root:not([data-theme="dark"]) .tiles>*{padding:14px!important;border-radius:18px!important;min-width:0}
}
/* inside the dashboard the dashboard signs people out: the apps' own Log out buttons are not needed */
html.v2.in-hub [data-signout]{display:none!important}

/* touch screens: a finger scrolling over a row or card must not leave it highlighted (hover effects are for a mouse only) */
@media (hover:none),(pointer:coarse){
  html.v2:root:root:root:not([data-theme="dark"]) tr:hover>td,html.v2:root:root:root:not([data-theme="dark"]) tr:hover>th{background-color:transparent!important;box-shadow:none!important}
  html.v2:root:root:root:not([data-theme="dark"]) tr.row:hover>td:first-child{box-shadow:none!important}
  html.v2:root:root:root:not([data-theme="dark"]) :is(.card,.tile,.btn,a,button):hover{transform:none!important}
  html.v2:root:root:root:not([data-theme="dark"]) :is(a.card,button.card,.module-card,.kcard,.stat,.rp-tile):hover{box-shadow:none!important}
  html.v2:root:root:root:not([data-theme="dark"]) table.pt tr.row,html.v2:root:root:root:not([data-theme="dark"]) table.pt tr.row:hover{background:#FFFFFF!important}
  html.v2:root:root:root:not([data-theme="dark"]) table.pt tr.row:hover>td{background:none!important}
}
/* a text box inside a search pill has no second border of its own */
html.v2:root:root:root:not([data-theme="dark"]) :is(label.search,.search) :is(input,input[type=search]){border:0!important;box-shadow:none!important;background:transparent!important;outline-offset:2px}
@media (max-width:700px){
  /* long page descriptions under the title: two lines on a phone */
  html.v2:root:root:root:not([data-theme="dark"]) header.top :is(p,.sub){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
/* LAUNCHV2-v1: Prices and Calculators start screens: wider 3-column grid on desktop, compact rows on phones */
html.v2:root:root:root:not([data-theme="dark"]) .wrap:has(#screen-home.active){max-width:1080px}
@media (min-width:900px){html.v2:root:root:root:not([data-theme="dark"]) #screen-home .module-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:700px){
  html.v2:root:root:root:not([data-theme="dark"]) .module-grid{grid-template-columns:1fr!important;gap:10px}
  html.v2:root:root:root:not([data-theme="dark"]) body .module-card{display:grid!important;grid-template-columns:44px minmax(0,1fr);grid-template-areas:"ic t" "ic p" "ic g";column-gap:12px;row-gap:2px;align-items:start;padding:14px 16px!important;text-align:left;min-height:0}
  html.v2:root:root:root:not([data-theme="dark"]) body .module-card .icon{grid-area:ic;width:44px;height:44px;border-radius:14px;background:#FBEDEB;display:flex;align-items:center;justify-content:center;margin:0!important}
  html.v2:root:root:root:not([data-theme="dark"]) body .module-card .icon svg{width:22px;height:22px}
  html.v2:root:root:root:not([data-theme="dark"]) body .module-card h3{grid-area:t;margin:0!important;font-size:15.5px}
  html.v2:root:root:root:not([data-theme="dark"]) body .module-card p{grid-area:p;margin:0!important;font-size:13px}
  html.v2:root:root:root:not([data-theme="dark"]) body .module-card .tag{grid-area:g;justify-self:start;margin-top:6px!important}
}
html.v2:root:root:root:not([data-theme="dark"]) #screen-home .module-grid{align-items:stretch}html.v2:root:root:root:not([data-theme="dark"]) #screen-home .module-card{height:100%}
/* STATEV2-v1: message cards (no branch, no access, empty) look like the other cards; filter chip rows stay one line on phones */
html.v2:root:root:root:not([data-theme="dark"]) body .state{border:0!important;border-radius:22px!important;background:#fff!important;padding:24px!important;margin:40px auto!important;max-width:520px}
html.v2:root:root:root:not([data-theme="dark"]) body .state h2::before{content:"";display:block;width:36px;height:4px;border-radius:4px;background:#B3261E;margin-bottom:14px}
@media (max-width:700px){
  html.v2:root:root:root:not([data-theme="dark"]) body .filters:has(>.chip){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:6px}
  html.v2:root:root:root:not([data-theme="dark"]) body .filters:has(>.chip)::-webkit-scrollbar{display:none}
  html.v2:root:root:root:not([data-theme="dark"]) body .filters>.chip{flex:none;white-space:nowrap}
  html.v2:root:root:root:not([data-theme="dark"]) body .state{margin:16px!important}
}
/* SEARCHBOX-v2: every search field is ONE pill. The text box inside a search pill never has an outline, background or shadow of its own. */
html.v2:root:root:root:root:root:root:root:not([data-theme="dark"]) body :is(.search,.searchbar,.sbar,.sbox,label.search,.fb2-s) :is(input,input[type=search],input[type=text]){border:0!important;border-color:transparent!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;outline:0!important;min-height:0}
html.v2:root:root:root:root:root:root:root:not([data-theme="dark"]) body :is(.search,.searchbar,.sbar,.sbox,label.search,.fb2-s):focus-within{border-color:#B82926!important;box-shadow:0 0 0 3px rgba(184,41,38,.12)!important}
