
/* PowerFlowCheck-style ribbon icon polish: visual-only upgrade */
:root{
  --gc-rib-top:#12253d;
  --gc-rib-bot:#0d1d31;
  --gc-rib-tab:#162b45;
  --gc-rib-tab-border:#254463;
  --gc-rib-sep:#355472;
  --gc-icon-box:#183451;
  --gc-icon-box-2:#10273e;
  --gc-icon-border:#496885;
  --gc-icon-border-hover:#78aee5;
  --gc-icon-fill:#eef5fb;
  --gc-label:#dce7f3;
  --gc-label-soft:#aab9c9;
}

/* Upgrade the embedded offline icon font stack where available. */
.ti{
  font-family:"Segoe Fluent Icons","Segoe MDL2 Assets","Segoe UI Symbol","Arial Unicode MS",Arial,sans-serif!important;
  font-weight:500!important;
}
.ti::before{display:block;line-height:1;transform:translateY(-.25px)}

.ribbon{
  background:linear-gradient(180deg,var(--gc-rib-top) 0%, var(--gc-rib-bot) 100%)!important;
  border-bottom:1px solid #1d344d!important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.03), 0 1px 0 rgba(0,0,0,.25);
}
.ribbon-tabs{
  height:24px!important;
  background:linear-gradient(180deg,#17304d 0%, #13263c 100%)!important;
  border-bottom:1px solid #203a56;
}
.rtab{
  padding:0 12px!important;
  font-size:11px!important;
  font-weight:600;
  color:#9db0c4!important;
  border-right:1px solid var(--gc-rib-tab-border)!important;
  letter-spacing:.2px;
}
.rtab:hover{background:rgba(255,255,255,.04);color:#d8e4ef!important}
.rtab.active{
  background:linear-gradient(180deg,#1c6fb2 0%, #195d95 100%)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);
}
.ribbon-tools{
  padding:5px 8px 4px!important;
  gap:2px!important;
  align-items:flex-start!important;
  background:transparent!important;
  scrollbar-width:thin;
}
.rgroup{
  gap:4px!important;
  padding:2px 8px 14px!important;
  border-right:1px solid rgba(73,104,133,.45)!important;
}
.rgroup:last-of-type{border-right:0!important}
.rsep{
  width:1px!important;
  height:50px!important;
  margin:0 6px!important;
  background:linear-gradient(180deg,rgba(117,153,186,.08) 0%, rgba(64,93,121,.9) 18%, rgba(64,93,121,.9) 82%, rgba(117,153,186,.08) 100%)!important;
}
.rtool{
  min-width:58px!important;
  max-width:62px;
  min-height:54px!important;
  padding:2px 6px 5px!important;
  gap:6px!important;
  border:1px solid transparent!important;
  border-radius:6px!important;
  justify-content:flex-start!important;
  color:var(--gc-label)!important;
  background:transparent!important;
}
.rtool:hover{
  background:rgba(255,255,255,.035)!important;
  border-color:rgba(102,131,160,.28)!important;
}
.rtool i{
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid var(--gc-icon-border)!important;
  border-radius:5px!important;
  background:linear-gradient(180deg,var(--gc-icon-box) 0%, var(--gc-icon-box-2) 100%)!important;
  color:var(--gc-icon-fill)!important;
  font-size:12px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.18)!important;
}
.rtool:hover i{
  border-color:var(--gc-icon-border-hover)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(120,174,229,.08), 0 2px 4px rgba(0,0,0,.2)!important;
}
.rtool.active,
.rtool.gc-tool-active{
  background:rgba(28,79,126,.18)!important;
  border-color:rgba(104,163,224,.36)!important;
}
.rtool.active i,
.rtool.gc-tool-active i{
  background:linear-gradient(180deg,#214a73 0%, #173858 100%)!important;
  border-color:#8cb8e7!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(140,184,231,.12), 0 2px 5px rgba(0,0,0,.25)!important;
}
.rtool.snap-off{
  background:rgba(255,107,107,.06)!important;
  border-color:rgba(255,107,107,.25)!important;
  color:#ffd0d0!important;
}
.rtool.snap-off i{
  border-color:rgba(255,107,107,.6)!important;
  background:linear-gradient(180deg,#5a2323 0%, #41191b 100%)!important;
}
.rtool span{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  width:100%;
  min-height:21px;
  font-size:9px!important;
  line-height:1.15!important;
  text-align:center!important;
  color:var(--gc-label)!important;
  white-space:normal!important;
  letter-spacing:.08px;
}
.rtool:hover span{color:#f1f6fb!important}
.rgroup-label{
  bottom:0!important;
  left:6px!important;
  right:6px!important;
  font-size:8px!important;
  font-weight:700!important;
  color:#7e95ab!important;
  letter-spacing:.45px!important;
}

/* Match the same framed icon treatment in the canvas quick toolbar. */
.canvas-toolbar{
  padding:5px!important;
  gap:5px!important;
  background:rgba(13,29,49,.96)!important;
  border-color:#284460!important;
  box-shadow:0 6px 18px rgba(0,0,0,.28)!important;
}
.ctool{
  width:32px!important;
  height:30px!important;
  border-color:transparent!important;
  border-radius:5px!important;
}
.ctool i{
  width:22px;height:22px;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--gc-icon-border);border-radius:5px;
  background:linear-gradient(180deg,var(--gc-icon-box) 0%, var(--gc-icon-box-2) 100%);
  color:var(--gc-icon-fill);font-size:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.18);
}
.ctool:hover i{border-color:var(--gc-icon-border-hover)}
.ctool.active i{background:linear-gradient(180deg,#214a73 0%, #173858 100%);border-color:#8cb8e7;color:#fff}

/* Optional light-mode compatibility if the app later toggles one. */
body.light-mode .ribbon,
body.theme-light .ribbon{background:linear-gradient(180deg,#edf3fa 0%, #dfe7f1 100%)!important;border-bottom-color:#b4c2d2!important}
body.light-mode .ribbon-tabs,
body.theme-light .ribbon-tabs{background:linear-gradient(180deg,#edf3fa 0%, #d9e2ee 100%)!important;border-bottom-color:#b8c6d6!important}
body.light-mode .rtab,
body.theme-light .rtab{color:#43566a!important;border-right-color:#c4d0dc!important}
body.light-mode .rtab:hover,
body.theme-light .rtab:hover{background:rgba(44,89,133,.06)!important;color:#183a5d!important}
body.light-mode .rtool,
body.theme-light .rtool{color:#21384f!important}
body.light-mode .rtool:hover,
body.theme-light .rtool:hover{background:rgba(23,57,91,.05)!important;border-color:rgba(55,92,126,.18)!important}
body.light-mode .rtool i,
body.theme-light .rtool i{background:linear-gradient(180deg,#ffffff 0%, #e6edf5 100%)!important;border-color:#9eb2c5!important;color:#17314d!important}
body.light-mode .rtool span,
body.theme-light .rtool span{color:#243b51!important}
body.light-mode .rgroup-label,
body.theme-light .rgroup-label{color:#5b7188!important}
body.light-mode .rsep,
body.theme-light .rsep{background:linear-gradient(180deg,rgba(82,108,134,.06) 0%, rgba(126,147,169,.95) 18%, rgba(126,147,169,.95) 82%, rgba(82,108,134,.06) 100%)!important}
body.light-mode .canvas-toolbar,
body.theme-light .canvas-toolbar{background:rgba(248,250,253,.96)!important;border-color:#b7c6d4!important}
body.light-mode .ctool i,
body.theme-light .ctool i{background:linear-gradient(180deg,#ffffff 0%, #e7eef6 100%)!important;border-color:#9eb2c5!important;color:#17314d!important}
