/* RVO V36.1 · Detail pass. Loaded last, scoped to the portal surfaces.
   Existing frame, shine animations, Bao rig and photo-editor styling stay intact. */
:root {
  --rvo-polish-ink:#101216;
  --rvo-polish-line:rgba(238,242,247,.11);
  --rvo-polish-text:#f3f5f8;
  --rvo-polish-secondary:#b5bdc8;
  --rvo-polish-muted:#909aa8;
  --rvo-polish-ease:cubic-bezier(.2,.75,.25,1);
  --rvo-polish-focus:rgba(235,241,248,.8);
}

/* A quieter glass finish, with the existing animated edge highlights above it. */
:is(.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) {
  --sx-title:var(--rvo-polish-text);
  --sx-sub:var(--rvo-polish-secondary);
  --sx-dim:var(--rvo-polish-muted);
  --sx-panel:linear-gradient(150deg,rgba(255,255,255,.045),transparent 42%) padding-box,
    linear-gradient(180deg,rgba(24,27,33,.96),rgba(15,18,23,.96)) padding-box,
    linear-gradient(145deg,rgba(255,255,255,.19),rgba(255,255,255,.045) 48%,rgba(255,255,255,.09)) border-box;
  --sx-card:linear-gradient(160deg,rgba(255,255,255,.035),transparent 55%) padding-box,
    linear-gradient(180deg,rgba(27,31,37,.8),rgba(18,21,27,.86)) padding-box,
    linear-gradient(150deg,rgba(255,255,255,.14),rgba(255,255,255,.045) 55%,rgba(255,255,255,.07)) border-box;
  --sx-tile:var(--sx-card);
  --sx-panel-sh:inset 0 1px 0 rgba(255,255,255,.035),0 12px 34px -16px rgba(0,0,0,.72);
  --sx-card-sh:inset 0 1px 0 rgba(255,255,255,.025),0 4px 12px -7px rgba(0,0,0,.55);
  --sx-hover-sh:inset 0 0 0 1px rgba(239,243,248,.19),0 6px 18px -9px rgba(0,0,0,.6);
  --sx-on-sh:inset 0 0 0 1px rgba(237,242,248,.25),0 4px 16px -10px rgba(219,231,246,.24);
  --sx-on-bg:linear-gradient(180deg,rgba(235,242,250,.09),rgba(235,242,250,.025));
  font-kerning:normal;
  text-rendering:optimizeLegibility;
}
#s4.bx {
  --bx-panel:var(--sx-panel); --bx-card:var(--sx-card); --bx-tile:var(--sx-card);
  --bx-panel-sh:var(--sx-panel-sh); --bx-card-sh:var(--sx-card-sh);
  --bx-hover-sh:var(--sx-hover-sh); --bx-on-sh:var(--sx-on-sh); --bx-on-bg:var(--sx-on-bg);
  --bx-sub:var(--rvo-polish-secondary); --bx-muted:var(--rvo-polish-muted);
}
:is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-panel,
#s4.bx .bx-panel {
  border-radius:20px !important;
  padding:20px !important;
}
:is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-title,
#s4.bx .bx-title {
  font-size:16px !important;
  font-weight:600 !important;
  line-height:1.25 !important;
  letter-spacing:-.015em !important;
}
:is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-sub,
#s4.bx .bx-sub { line-height:1.5; }
:is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-ph,
#s4.bx .bx-ph { gap:10px; margin-bottom:18px; }
:is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-hx,
#s4.bx .bx-hx { filter:none; opacity:.88; }
:is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-hx .sx-ico,
#s4.bx .bx-hx .bx-ico { width:23px; height:23px; stroke-width:1.7; }

/* Navigation: keep all five familiar destinations, refine the weight and spacing. */
#rvTop.rvt { --t-text:var(--rvo-polish-text); --t-sub:var(--rvo-polish-secondary); }
#rvTop .rvt-row { margin-bottom:16px; gap:12px; }
#rvTop .rvt-greet b { font-weight:600 !important; letter-spacing:-.035em; text-shadow:none; }
#rvTop .rvt-greet span { color:var(--rvo-polish-secondary); font-size:13px; }
#rvTop .rvt-tiles.rvn-main { gap:9px; }
#rvTop .rvt-tile {
  min-height:80px; gap:9px; border-radius:17px;
  background:linear-gradient(155deg,rgba(255,255,255,.045),transparent 65%),linear-gradient(180deg,#202329,#15181e);
  border-color:rgba(255,255,255,.085);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 4px 14px -10px #000;
  transition:background .18s var(--rvo-polish-ease),border-color .18s,box-shadow .18s,transform .18s;
}
#rvTop .rvt-tile .ic { filter:none; color:#c9d0da; }
#rvTop .rvt-tile .ic .v11-ico { width:25px; height:25px; stroke-width:1.6; }
#rvTop .rvt-tile .lb { font-size:12.5px; font-weight:500; letter-spacing:.005em; }
#rvTop .rvt-tile.on {
  border-color:rgba(241,245,250,.26);
  background:linear-gradient(155deg,rgba(255,255,255,.09),transparent 65%),linear-gradient(180deg,#292d34,#1a1e25);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.035),0 4px 20px -12px rgba(219,231,246,.3);
}
#rvTop .rvt-tile.on .ic { filter:none; color:#fff; }
#rvTop :is(.rvt-pill,.rvt-bell) {
  border:1px solid var(--rvo-polish-line);
  background:linear-gradient(145deg,#22262d,#12161c);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
#rvTop .rvt-pill { min-height:49px; }
#rvTop .rvt-pill > span { font-size:12px; line-height:1.4; }
#rvTop .rvt-bell { width:46px; height:46px; }
#rvTop .rvt-tile .bd { box-shadow:0 0 0 3px #11151b !important; font-size:11px; }
.rvn-sub { margin-top:14px; }
.rvn-seg { padding:5px; border-radius:15px; background:#101318; box-shadow:inset 0 0 0 1px rgba(255,255,255,.085); }
.rvn-seg button { min-height:42px; font-size:12.5px; letter-spacing:.005em; }
.rvn-seg button b { font-weight:600 !important; }
.rvn-ink { top:5px; bottom:5px; border-radius:10px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.13); }

/* Metrics: calmer symbols and consistent, readable numerals. */
:is(.hm,.st,.in) .st-m,
#s4.bx :is(.bx-m,.bx-s2,.bx-cat),.hm-s2 {
  border-radius:13px; min-height:70px;
}
:is(.hm,.st,.in) .st-m .mi,
#s4.bx .mi,.hm-s2 .mi {
  width:35px; height:35px; border-radius:10px;
  border-color:rgba(235,241,248,.11);
  background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.015));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
:is(.hm,.st,.in) .st-m .mi .sx-ico { filter:none; stroke-width:1.6; }
:is(.hm,.st,.in) .st-m .val,
#s4.bx .bx-m .val,.hm-s2 .val {
  font-variant-numeric:tabular-nums lining-nums;
  font-size:23px; font-weight:600; line-height:1.15; letter-spacing:-.035em; text-shadow:none;
}
:is(.hm,.st,.in) .st-m .lbl { color:#b5bdc8; font-size:11px; line-height:1.4; }
.rvo-kpis { gap:10px; }
.rvo-kpis > div { padding:13px 14px; border-radius:12px; background:rgba(5,8,12,.38); box-shadow:inset 0 0 0 1px rgba(255,255,255,.055); }
.rvo-kpis small { font-size:11px; color:var(--rvo-polish-secondary); }
.rvo-kpis b { font-size:25px; font-weight:600; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.rvo-kpis em { margin-top:5px; color:var(--rvo-polish-muted); font-size:11px; }
.rvo-hello { color:var(--rvo-polish-secondary); line-height:1.6; margin-bottom:14px; }
.rvo-bi { min-height:62px; padding:12px 14px; border-radius:12px; }
.hm-row,.hm-task,.hm-trend { border-radius:12px !important; }
.hm-row { padding:10px !important; }
.hm-row .nm b { font-weight:550; font-size:13.5px; }
.hm-row .nm small { color:var(--rvo-polish-secondary); }
.hm-row :is(img,.ph) { border-radius:9px; }
.hm .hm-more { min-height:34px; font-size:11.5px !important; }

/* Inventory: clearer text rhythm without touching photos or studio canvases. */
#s4.bx .bx-card { border-radius:16px; border-color:rgba(255,255,255,.08); box-shadow:0 5px 18px -10px rgba(0,0,0,.6); }
#s4.bx .bx-card .bx-name { line-height:1.4; letter-spacing:-.01em; }
#s4.bx :is(.bx-price,.bx-ek,.bx-profit) { font-variant-numeric:tabular-nums; }
#s4.bx .bx-st { letter-spacing:.015em; font-weight:500; }
#s4.bx .bx-tab { border-radius:14px !important; }
:is(.st,.in,#s4.bx) table { border-collapse:separate; border-spacing:0; }
:is(.st,.in,#s4.bx) th { color:var(--rvo-polish-secondary); font-size:11px; font-weight:600; letter-spacing:.035em; }
:is(.st,.in,#s4.bx) td { padding-top:13px; padding-bottom:13px; font-variant-numeric:tabular-nums; }

/* Bao: a companion beside the conversation, with more space for actual work. */
#aiChat.ch .pd-stage {
  height:172px; margin-bottom:18px; border-radius:16px;
  background:radial-gradient(65% 130% at 80% 95%,rgba(221,231,244,.055),transparent 72%),linear-gradient(145deg,#171b21,#101318);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);
}
#aiChat.ch .pd-stage .pd-hold { left:auto; right:20px; bottom:2px; transform:none; width:150px; height:159px; }
#aiChat.ch .pd-stage .pd-state { left:16px; top:16px; font-size:9px; letter-spacing:.085em; }
#aiChat.ch .pd-stage .pd-plate { left:18px; bottom:20px; max-width:calc(100% - 185px); }
#aiChat.ch .pd-stage .pd-plate b { font-size:20px; font-weight:600; letter-spacing:-.02em; }
#aiChat.ch .pd-stage .pd-plate small { color:var(--rvo-polish-secondary); line-height:1.5; margin-top:4px; }
#aiChat.ch .ch-welcome { padding:10px 8px 22px; gap:9px; }
#aiChat.ch .ch-welcome b { font-size:20px; font-weight:600; letter-spacing:-.025em; }
#aiChat.ch .ch-welcome p { font-size:14px; color:var(--rvo-polish-secondary); line-height:1.65; }
#aiChat.ch .ch-feed { gap:18px; padding:4px 0 18px; }
#aiChat.ch .ch-bubble {
  border-radius:17px 17px 17px 5px; padding:13px 15px 10px; font-size:14px; line-height:1.65;
  background:linear-gradient(145deg,#1c2129,#181c23); border-color:rgba(255,255,255,.065); box-shadow:none;
}
#aiChat.ch .ch-msg.me .ch-bubble { border-radius:17px 17px 5px 17px; background:linear-gradient(145deg,#2b3039,#242a33); border-color:rgba(255,255,255,.1); box-shadow:none; }
#aiChat.ch .ch-meta { margin-top:8px; }
#aiChat.ch .ch-meta small { color:var(--rvo-polish-muted); font-size:10px; }
#aiChat.ch .ch-entry { padding:8px !important; gap:8px; margin:0; border-radius:22px; border:1px solid rgba(255,255,255,.09); background:rgba(15,18,23,.96); box-shadow:0 -8px 24px -14px #000,0 8px 24px -16px #000; bottom:max(10px,env(safe-area-inset-bottom)); }
#aiChat.ch #chatInput { font-size:16px !important; border-radius:15px !important; padding:13px 106px 13px 15px !important; background:#0e1116 !important; border-color:rgba(235,241,248,.13) !important; box-shadow:none !important; }
#aiChat.ch .ch-ib { width:40px; height:42px; bottom:5px; border-radius:11px !important; }
#aiChat.ch #chCtxBtn { right:49px; }
#aiChat.ch #ccChatAttach { right:7px; }
#aiChat.ch :is(.ch-mic,.ch-send) { width:46px; height:48px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.12) !important; }
#aiChat.ch .ch-hint { margin:10px 4px 0 !important; color:var(--rvo-polish-muted); font-size:11px; line-height:1.6; }
#aiChat.ch .ch-q { border-radius:12px !important; padding:11px 12px !important; }
#aiChat.ch .ch-q b { font-weight:600; }
#aiChat.ch .ch-q small { color:var(--rvo-polish-secondary); line-height:1.5; }
#aiChat.ch .ch-state { font-size:11.5px; border:1px solid rgba(255,255,255,.07); box-shadow:none; background:#101318; }
#aiChat.ch .ch-state[data-state="error"] { color:var(--rv-red-soft); border-color:rgba(255,90,95,.24); }

/* Concrete approvals look like an intentional part of the product. */
.bao-plan,.bao-choice {
  background:linear-gradient(145deg,rgba(239,245,253,.045),transparent 50%),#171c23;
  border-color:rgba(231,239,250,.2); border-radius:16px; padding:18px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 8px 24px -16px #000;
}
.bao-plan h3 { font-size:17px; font-weight:600; line-height:1.35; letter-spacing:-.02em; margin:14px 0; }
.bao-plan .rvo-chip { color:#cbd4e0; background:rgba(220,232,248,.065); border:1px solid rgba(220,232,248,.12); padding:5px 9px; font-size:10px; line-height:1.4; }
.bao-plan ol { padding-left:24px; margin:14px 0; }
.bao-plan li { padding:0 0 14px 4px; margin:0 0 14px; border-bottom:1px solid rgba(255,255,255,.075); font-size:13px; line-height:1.8; }
.bao-plan li:last-child { padding-bottom:0; margin-bottom:0; border:0; }
.bao-plan li::marker { color:#bac7d8; font-weight:700; }
.bao-plan > small { color:#aeb9c8; font-size:11px; line-height:1.6; }
.bao-plan .rvo-acts { gap:8px; margin-top:18px; }
.bao-plan [data-bao-confirm] { min-height:46px; border-radius:11px !important; font-size:13px !important; background:linear-gradient(180deg,#f4f6f9,#dce2ea) !important; color:#13171c !important; box-shadow:inset 0 1px 0 #fff,0 3px 10px -7px #000 !important; }
.bao-plan [data-bao-reject] { min-height:46px; border-radius:11px !important; color:#c5cedb !important; background:rgba(255,255,255,.035) !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.1) !important; }
.bao-choice { display:grid; gap:10px; }
.bao-choice > b { font-weight:600; font-size:14px; margin-bottom:4px; }
.bao-choice button { text-align:left; justify-content:flex-start; line-height:1.55; font-size:12px !important; padding:12px !important; border-radius:11px !important; }
#baoActionDock { scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#58616f transparent; }
#rvoServerAudit { padding:12px; border-radius:12px; background:#10141a; }
#rvoServerAudit summary { min-height:34px; cursor:pointer; color:#c4cedc; }
#rvoServerAudit small { color:var(--rvo-polish-secondary); line-height:1.6; }

/* Finishing touches: accessible fields, quieter tasks, deliberate interaction states. */
:is(.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) :is(button,input,textarea,select) { -webkit-tap-highlight-color:transparent; }
:is(.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in,#rvTop) :is(button,a,input,textarea,select,summary):focus-visible {
  outline:2px solid var(--rvo-polish-focus) !important; outline-offset:3px;
}
:is(.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) :is(input:not([type="checkbox"]):not([type="range"]),textarea,select):focus {
  border-color:rgba(227,237,250,.38) !important;
}
:is(.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) button:disabled { opacity:.48; cursor:wait; filter:none !important; transform:none !important; }
.rvo-task { grid-template-columns:44px minmax(0,1fr) 44px; padding:11px 10px; gap:9px; border-radius:12px; }
.rvo-task .nm b { font-size:13px; line-height:1.5; }
.rvo-task .nm small { font-size:11px; line-height:1.6; color:var(--rvo-polish-muted); }
.rvo-task.late .nm small { color:var(--rv-red-soft); }
.rvo-ck,.rvo-x { width:44px; height:44px; }
.rvo-ck { position:relative; width:36px; height:36px; margin:4px; border-width:1px; }
.rvo-ck::before { content:""; position:absolute; inset:-5px; width:44px; height:44px; border-radius:50%; }
.rvo-x { font-size:20px; border-radius:10px; }
.rvo-add :is(input,select),.rvo-ed :is(input,select) { min-height:46px; border-radius:10px; font-size:14px; border-color:rgba(255,255,255,.12); }
.rvo-drop { border-radius:14px; padding:18px; background:#10151b; border-color:rgba(220,232,248,.19); }
.rvo-pick { min-height:64px; background:linear-gradient(145deg,#202731,#181e27); font-size:14px; font-weight:600; }
:is(.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) ::selection { color:#fff; background:#4c586a; }

@media (hover:hover) and (pointer:fine) {
  #rvTop .rvt-tile:hover { transform:translateY(-1px); filter:none; border-color:rgba(255,255,255,.22); box-shadow:0 6px 18px -12px #000; }
  :is(.hm,.ch,.st) :is(.hm-row,.hm-q,.hm-cattile,.hm-task,.ch-q,.st-action):hover { transform:translateY(-1px); filter:brightness(1.055); }
  .bao-plan [data-bao-confirm]:hover { filter:brightness(1.055); transform:translateY(-1px); }
}
@media (max-width:720px) {
  #rvTop .rvt-row { gap:9px; margin-bottom:13px; }
  #rvTop .rvt-tile { min-height:72px; border-radius:15px; gap:7px; }
  #rvTop .rvt-tile .ic .v11-ico { width:23px; height:23px; }
  #rvTop .rvt-tile .lb { font-size:11.5px; }
  :is(.hm,#aiChat.ch,#settingsPage.st,#finance.in) .sx-panel,#s4.bx .bx-panel { padding:17px 15px !important; border-radius:18px !important; }
  .rvo-kpis > div { padding:11px 12px; }
}
@media (max-width:480px) {
  #rvTop .rvt-tiles.rvn-main { gap:6px; }
  #rvTop .rvt-tile { min-height:67px; border-radius:13px; }
  #rvTop .rvt-tiles.rvn-main .rvt-tile .lb { font-size:10.5px; font-weight:500; }
  #rvTop .rvt-greet b { font-size:22px !important; }
  #rvTop .rvt-greet span { font-size:11.5px; }
  #rvTop .rvt-pill { min-height:44px; padding:5px; }
  #rvTop .rvt-bell { width:42px; height:44px; }
  .rvn-seg[data-group="bao"] button { min-height:42px; font-size:11px; }
  #aiChat.ch .pd-stage { height:148px; margin-bottom:14px; }
  #aiChat.ch .pd-stage .pd-hold { right:7px; width:126px; height:136px; }
  #aiChat.ch .pd-stage .pd-plate { left:14px; bottom:19px; max-width:calc(100% - 143px); }
  #aiChat.ch .pd-stage .pd-state { left:12px; top:12px; font-size:8px; padding:5px 8px; }
  #aiChat.ch .pd-stage .pd-plate b { font-size:18px; }
  #aiChat.ch .pd-stage .pd-plate small { font-size:10px; }
  #aiChat.ch .ch-entry { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:6px; padding:6px !important; border-radius:19px; }
  #aiChat.ch .ch-field { grid-column:1 / -1; grid-row:1; }
  #aiChat.ch #chatInput { padding:13px 14px !important; }
  #aiChat.ch :is(.ch-mic,.ch-send) { width:44px; min-width:44px; height:44px; grid-row:2; }
  #aiChat.ch .ch-mic { grid-column:1; }
  #aiChat.ch .ch-send { grid-column:3; }
  #aiChat.ch .ch-ib { width:44px; height:44px; bottom:-50px; }
  #aiChat.ch #chCtxBtn { left:52px; right:auto; }
  #aiChat.ch #ccChatAttach { left:102px; right:auto; }
  #aiChat.ch .ch-bubble { max-width:calc(100% - 40px); padding:11px 12px 8px; font-size:14px; }
  #aiChat.ch .ch-msg { gap:7px; }
  #aiChat.ch .ch-av { width:28px; height:28px; }
  .bao-plan,.bao-choice { padding:14px; }
  .bao-plan h3 { font-size:16px; }
  .bao-plan .rvo-acts > button { width:100%; }
  .rvo-kpis b { font-size:22px; }
  .rvo-kpis small,.rvo-kpis em { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) {
  :is(#rvTop,.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) :is(button,input,textarea,select),.bao-plan { transition:none !important; }
}
html.rv-reduce :is(#rvTop,.hm,#s4.bx,#aiChat.ch,#settingsPage.st,#finance.in) :is(button,input,textarea,select) { transition:none !important; }
@media (forced-colors:active) {
  :is(.bao-plan,.bao-choice,.rvn-seg,#rvTop .rvt-tile) { border:1px solid ButtonText; }
  .bao-plan [data-bao-confirm] { border:2px solid Highlight !important; }
}
