:root{
  /* ===== ProSmart Brand ===== */
  --ps-blue-dark:#0B2C4D;
  --ps-blue:#1F6FB2;
  --ps-orange:#F7941D;

  /* ===== Light theme (default) ===== */
  --bg0:#F5F7FA;
  --bg1:#FFFFFF;
  --card:#FFFFFF;
  --card2:#F7FAFF;
  --text:#0F172A;
  --muted:#64748B;
  --line:rgba(15,23,42,.10);

  /* Back-compat tokens used across UI */
  --brand:var(--ps-orange);
  --brand2:var(--ps-blue);
  --brand3:var(--ps-blue-dark);

  --good:#16a34a;
  --warn:#F7941D;
  --shadow: 0 12px 40px rgba(15,23,42,.10);
}

/* ===== Dark Mode (ProSmart) ===== */
body.theme-dark{
  --bg0:#050A10;
  --bg1:#071626;
  --card:#0A1726;
  --card2:#071120;
  --text:#EAF2FF;
  --muted:#A3B4CC;
  --line:rgba(234,242,255,.10);
  --shadow: 0 12px 40px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: radial-gradient(1200px 800px at 20% 10%, rgba(31,111,178,.18), transparent 55%),
              radial-gradient(900px 700px at 85% 0%, rgba(247,148,29,.16), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  color:var(--text);
}
.app{display:flex; min-height:100%}
.app{position:relative}
.sidebar{
  width:290px; flex:0 0 290px;
  background: linear-gradient(180deg, var(--ps-blue-dark), var(--ps-blue));
  border-right:1px solid var(--line);
  padding:18px 14px;
  display:flex; flex-direction:column;
  gap:14px;
}

/* ===== Sidebar (desktop collapsed) ===== */
body.sidebarClosed .sidebar{
  width:86px; flex-basis:86px;
  padding:18px 10px;
}
body.sidebarClosed .brand{justify-content:center}
body.sidebarClosed .brandText,
body.sidebarClosed .sideSearch,
body.sidebarClosed .menuText,
body.sidebarClosed .menuChevron,
body.sidebarClosed .submenu,
body.sidebarClosed .sideFooter .muted{display:none !important}
body.sidebarClosed .menu{padding:0 2px}
body.sidebarClosed .menuItem{justify-content:center}

/* ===== Sidebar (mobile overlay) ===== */
@media (max-width: 900px){
  .sidebar{
    position:fixed;
    left:0; top:0; bottom:0;
    transform: translateX(-110%);
    transition: transform .22s ease;
    z-index:80;
    box-shadow: var(--shadow);
  }
  body.sidebarMobileOpen .sidebar{ transform: translateX(0); }

  /* Backdrop without extra HTML */
  body.sidebarMobileOpen::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    z-index:70;
  }

  .main{margin-left:0}
}
.brand{display:flex; gap:12px; align-items:center; padding:10px 10px 6px}
.brandLogoWrap{width:40px; height:40px; border-radius:12px; background:rgba(255,255,255,.12); display:grid; place-items:center; overflow:hidden}
.brandLogo{width:34px; height:34px; object-fit:contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));}
.brandName{font-weight:800; letter-spacing:.2px}
.brandSub{font-size:12px; color:rgba(255,255,255,.78)}

.sideSearch{padding:0 10px}
.searchInputWrap{
  background:rgba(255,255,255,.72);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 10px;
  display:flex; align-items:center; gap:10px;
}
body.theme-dark .searchInputWrap{
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.18);
}
.searchIcon{opacity:.9}
.searchIcon svg{width:16px; height:16px;}
.searchInput{
  all:unset;
  flex:1;
  font-size:14px;
  color:var(--text);
}
body.theme-dark .searchInput{color:white}
.kbd{
  font-size:11px;
  padding:4px 8px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.55);
  color:var(--muted);
}
body.theme-dark .kbd{border:1px solid rgba(255,255,255,.2); background:rgba(0,0,0,.18); color:rgba(255,255,255,.85)}

.menu{padding:0 6px; display:flex; flex-direction:column; gap:8px; overflow:auto}
.menuGroupTitle{padding:10px 10px 6px; font-size:12px; color:rgba(255,255,255,.78); text-transform:uppercase; letter-spacing:.12em}
/* RH group collapse (same style as section dropdown) */
.menuGroupBody{display:none; flex-direction:column; gap:8px;}
.menuGroupTitle.open + .menuGroupBody{display:flex;}
.menuGroupTitle.rhGroupToggle{cursor:pointer; display:flex; align-items:center; justify-content:space-between;}
.menuGroupTitle.rhGroupToggle:focus{outline:2px solid rgba(249,115,22,.55); outline-offset:2px; border-radius:10px;}
/* RH group title styled like menuItem (requested) */
.menuGroupTitle.psMenuItemLike{
  padding:10px 10px;
  border-radius:14px;
  text-transform:none;
  letter-spacing:0;
  font-size:16px;
  color:rgba(255,255,255,.92);
  border:1px solid transparent;
  background:rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.menuGroupTitle.psMenuItemLike:hover{ background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.12); }
.menuGroupTitle.psMenuItemLike.open{ background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.16); }
.menuGroupTitle.psMenuItemLike .psGroupLikeInner{ display:flex; align-items:center; gap:10px; min-width:0; }


.menuItem{
  display:flex; align-items:center; gap:10px;
  padding:10px 10px;
  border-radius:14px;
  color:rgba(255,255,255,.92);
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
}
.menuItem:hover{background:rgba(247,148,29,.12); border-color:rgba(255,255,255,.18)}
.menuItem.active{background:rgba(247,148,29,.18); border-color:rgba(255,255,255,.22)}
.menuIcon{width:22px; height:22px; display:grid; place-items:center; background:rgba(0,0,0,.16); border:1px solid rgba(255,255,255,.16); border-radius:10px}
.menuIcon svg{width:16px; height:16px}
.menuIcon svg{width:16px; height:16px}
.menuItem.active .menuIcon{background:rgba(247,148,29,.22); border-color:rgba(255,255,255,.22)}
.menuText{flex:1; font-weight:600; font-size:14px}
.menuChevron{opacity:.7}
.submenu{display:none; flex-direction:column; gap:6px; padding:0 0 0 14px}
.menuItem.open + .submenu{display:flex}
.subItem{padding:9px 10px; border-radius:12px; text-decoration:none; color:rgba(255,255,255,.9); border:1px solid transparent}
.subItem:hover{background:rgba(0,0,0,.12); border-color:rgba(255,255,255,.14)}
.subItem.active{background:rgba(0,0,0,.2); border-color:rgba(255,255,255,.18)}

.sideFooter{margin-top:auto; padding:10px; display:flex; justify-content:space-between; align-items:center}
.pill{font-size:12px; padding:6px 10px; border-radius:999px; background:rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.18)}
.muted{color:rgba(255,255,255,.75); font-size:12px}

.main{flex:1; display:flex; flex-direction:column; min-width:0}
.topbar{
  height:74px;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
}
body.theme-dark .topbar{background:rgba(7,17,32,.55)}
.topbarLeft{display:flex; align-items:center; gap:14px}
.iconBtn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.60);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
body.theme-dark .iconBtn{background:rgba(255,255,255,.04)}
.iconBtn svg{width:18px; height:18px; display:block}
.iconBtn:hover{background:rgba(255,255,255,.06)}
.pageTitle{font-weight:800; font-size:18px}
.breadcrumb{font-size:12px; color:var(--muted); margin-top:2px}
.topbarRight{display:flex; align-items:center; gap:10px}
.chip{font-size:12px; padding:8px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.04)}
.user{display:flex; gap:10px; align-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.04)}
body:not(.theme-dark) .chip,
body:not(.theme-dark) .user{background:rgba(255,255,255,.70)}
.avatar{width:34px; height:34px; border-radius:12px; display:grid; place-items:center; font-weight:800; background:linear-gradient(135deg, rgba(255,45,141,.35), rgba(125,31,179,.35)); border:1px solid rgba(255,255,255,.12)}
body:not(.theme-dark) .avatar{border:1px solid var(--line)}
body.theme-dark .avatar{border:1px solid rgba(255,255,255,.12)}
.avatar{background:linear-gradient(135deg, rgba(31,111,178,.28), rgba(247,148,29,.22))}
.userName{font-weight:700; font-size:13px}
.userRole{font-size:11px; color:var(--muted)}

.content{padding:18px; display:flex; flex-direction:column; gap:14px}

.grid{display:grid; gap:14px}
.grid.cards{grid-template-columns: repeat(12, 1fr)}
.card{background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow: var(--shadow)}
body.theme-dark .card{background:linear-gradient(180deg, rgba(10,23,38,.92), rgba(10,23,38,.62))}
.card.pad{padding:16px}
.cardTitle{font-weight:800; font-size:14px}
.cardSub{color:var(--muted); font-size:12px; margin-top:4px}
.stat{grid-column: span 3; padding:16px}
.kpiHead{display:flex; align-items:center; justify-content:space-between; gap:10px}
.kpiTrend{display:grid; place-items:center; width:34px; height:34px; border-radius:14px; border:1px solid var(--line); background:rgba(247,148,29,.12); color:var(--ps-orange)}
body.theme-dark .kpiTrend{background:rgba(247,148,29,.12)}
.kpiTrend svg{width:18px; height:18px}
.statVal{font-weight:900; font-size:26px; margin-top:10px}
.statTag{margin-top:8px; display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px}
.dot{width:8px; height:8px; border-radius:999px; background:var(--good)}

.toolbar{display:flex; flex-wrap:wrap; gap:10px; align-items:center}
.input{
  background:rgba(255,255,255,.72);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
  min-width:220px;
}
body.theme-dark .input{background:rgba(0,0,0,.22)}
.select{min-width:180px}
.btn{
  border:none;
  background:linear-gradient(135deg, var(--ps-blue-dark), var(--ps-blue));
  color:white;
  padding:10px 14px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
  box-shadow: 0 12px 24px rgba(31,111,178,.18);
}
.btn:hover{filter:brightness(1.02)}
.btn.secondary{background:rgba(255,255,255,.06); border:1px solid var(--line); box-shadow:none}

.btn:disabled,
.btn[aria-disabled="true"]{
  opacity:.55;
  cursor:not-allowed;
  filter:saturate(.7);
}

/* Empty state */
.emptyState{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-start;
}
.emptyIcon{
  width:44px; height:44px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  display:grid;
  place-items:center;
  font-size:18px;
}

/* Lightweight skeleton */
.isLoading .statVal,
.isLoading .cardTitle,
.isLoading .cardSub{
  position:relative;
  color:transparent !important;
  user-select:none;
}
.isLoading .statVal::after,
.isLoading .cardTitle::after,
.isLoading .cardSub::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:12px;
  background:linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
  background-size:200% 100%;
  animation:skeleton 1.1s ease-in-out infinite;
}
@keyframes skeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}

.tableWrap{overflow:auto; border-radius:18px; border:1px solid var(--line)}
.table{width:100%; border-collapse:separate; border-spacing:0; min-width:900px; background:rgba(0,0,0,.18)}
.table th, .table td{padding:12px 12px; border-bottom:1px solid rgba(255,255,255,.08); vertical-align:top}
.table th{position:sticky; top:0; background:rgba(16,18,26,.92); text-align:left; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:rgba(255,255,255,.82)}
.table td{font-size:13px; color:rgba(255,255,255,.92)}
.rowActions{display:flex; gap:8px}
.badge{display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.04); font-size:12px; color:rgba(255,255,255,.9)}

.pager{display:flex; justify-content:space-between; align-items:center; gap:10px}

.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:50}
.modal.open{display:flex}
.modalBackdrop{position:absolute; inset:0; background:rgba(0,0,0,.55)}
.modalCard{position:relative; width:min(820px, 92vw); max-height:86vh; overflow:auto; background:linear-gradient(180deg, rgba(20,24,39,.98), rgba(15,18,32,.92)); border:1px solid rgba(255,255,255,.12); border-radius:22px; box-shadow: var(--shadow)}
.modalHeader{display:flex; justify-content:space-between; align-items:flex-start; padding:16px 16px 10px; border-bottom:1px solid var(--line)}
.modalTitle{font-weight:900}
.modalSub{font-size:12px; color:var(--muted); margin-top:4px}
.modalBody{padding:16px}
.modalFooter{padding:14px 16px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px}
.formGrid{display:grid; grid-template-columns: repeat(12, 1fr); gap:12px}
.formField{grid-column: span 6; display:flex; flex-direction:column; gap:6px}
.label{font-size:12px; color:var(--muted)}

/* ===== Évaluation Équipe (clone UI) ===== */
.evalHeader{display:flex; justify-content:space-between; align-items:flex-end; gap:14px}
.evalHeaderRight{display:flex; align-items:flex-end; gap:10px}
.evalLabelSmall{font-size:12px; color:var(--muted); margin-right:6px}

.evalGroup{margin-top:10px}
.evalGroupHeader{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.14);
  color:var(--text);
  cursor:pointer;
}
.evalGroupHeader:hover{background:rgba(0,0,0,.18)}
.evalGroupLeft{display:flex; align-items:center; gap:10px}
.evalChevron{opacity:.85}
.evalGroupTitle{font-weight:900; letter-spacing:.08em}
.evalGroup.closed .evalChevron{transform: rotate(-90deg)}
.evalGroup.closed .evalGrid{display:none}

.evalGrid{display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:14px}
.evalCard{
  background:linear-gradient(180deg, rgba(20,24,39,.92), rgba(20,24,39,.62));
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 14px;
  box-shadow: var(--shadow);
}
.evalLine{display:flex; flex-direction:column; gap:4px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.06)}
.evalLine:last-child{border-bottom:none}
.evalK{font-size:12px; color:rgba(255,255,255,.78); font-weight:800; text-transform:uppercase; letter-spacing:.06em}
.evalV{font-size:13px; color:rgba(255,255,255,.92); font-weight:700}

/* === Small stats list (TC stats) === */
.statList{display:flex; flex-direction:column; gap:8px}
.statRow{display:flex; align-items:center; justify-content:space-between; gap:10px}
.statRowK{font-size:13px; color:rgba(255,255,255,.88); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

@media (max-width: 980px){
  .evalGrid{grid-template-columns: repeat(1, minmax(0, 1fr))}
  .evalHeader{flex-direction:column; align-items:flex-start}
}

@media (max-width: 980px){
  .sidebar{position:fixed; left:0; top:0; bottom:0; transform: translateX(0); z-index:40}
  body.sidebarClosed .sidebar{transform: translateX(-105%)}
  .main{margin-left:290px}
  body.sidebarClosed .main{margin-left:0}
}
@media (min-width: 981px){
  body.sidebarClosed .sidebar{width:86px; flex-basis:86px}
  body.sidebarClosed .brandText, body.sidebarClosed .sideSearch, body.sidebarClosed .menuText, body.sidebarClosed .menuChevron, body.sidebarClosed .sideFooter .muted, body.sidebarClosed .kbd{display:none}
  body.sidebarClosed .submenu{display:none !important}
  body.sidebarClosed .main{margin-left:0}
}

/* ===== Custom pages (TC / Commercial) ===== */
.headerRow{display:flex; align-items:flex-start; justify-content:space-between; gap:12px}
.filtersGrid{display:grid; grid-template-columns: repeat(12, 1fr); gap:10px}
.filtersGrid .input{grid-column: span 4; min-width:0; width:100%}
.filtersGrid .select{grid-column: span 4; min-width:0; width:100%}

.cardsGrid{display:grid; grid-template-columns: repeat(12, 1fr); gap:14px}
.itemCard{grid-column: span 4; background:rgba(0,0,0,.14); border:1px solid var(--line); border-radius:18px; padding:14px}
.itemTop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px}
.itemTitle{font-weight:900; font-size:14px; line-height:1.25}
.itemActions{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end}
.itemMeta{display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin-top:12px}
.kv{display:flex; flex-direction:column; gap:4px; padding:10px; border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(255,255,255,.03)}
.k{font-size:11px; color:rgba(255,255,255,.74); font-weight:800; text-transform:uppercase; letter-spacing:.06em}
.v{font-size:13px; color:rgba(255,255,255,.92); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.tag{display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.04); font-size:12px; color:rgba(255,255,255,.9)}
.tag.good{border-color: rgba(40,209,124,.55); background:rgba(40,209,124,.12)}
.tag.warn{border-color: rgba(255,204,102,.55); background:rgba(255,204,102,.12)}
.tag.bad{border-color: rgba(255,45,141,.55); background:rgba(255,45,141,.12)}

.tabsRow{display:flex; gap:10px; flex-wrap:wrap}
.tabBtn{border:1px solid var(--line); background:rgba(0,0,0,.14); color:rgba(255,255,255,.92); padding:8px 12px; border-radius:999px; cursor:pointer; font-weight:800}
.tabBtn.active{background:rgba(255,255,255,.08)}

.dealLayout{display:grid; grid-template-columns: 380px 1fr; gap:14px}
.dealList{min-height:420px}
.dealDetail{min-height:420px}
.dealItem{display:flex; flex-direction:column; gap:6px; padding:12px; border:1px solid rgba(255,255,255,.08); border-radius:16px; background:rgba(255,255,255,.03); cursor:pointer}
.dealItem:hover{background:rgba(255,255,255,.05)}
.dealItem.active{border-color: rgba(255,255,255,.22); background:rgba(255,255,255,.06)}
.dealItemTop{display:flex; justify-content:space-between; gap:10px}
.dealItemTitle{font-weight:900; font-size:13px}
.dealItemSub{color:var(--muted); font-size:12px}

@media (max-width: 1200px){
  .filtersGrid .input, .filtersGrid .select{grid-column: span 6}
  .itemCard{grid-column: span 6}
  .dealLayout{grid-template-columns: 1fr}
}
@media (max-width: 720px){
  .filtersGrid .input, .filtersGrid .select{grid-column: span 12}
  .itemCard{grid-column: span 12}
  .itemMeta{grid-template-columns: 1fr}
}

/* ===== Login page ===== */
.authWrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:linear-gradient(135deg, rgba(18,18,20,1), rgba(30,34,40,1));
}
.authCard{
  width:100%;
  max-width:420px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  padding:22px;
  box-shadow:0 20px 45px rgba(0,0,0,0.35);
}
.authBrand{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.authLogo{width:44px;height:44px;border-radius:12px;object-fit:contain;background:rgba(255,255,255,0.08);padding:6px}
.authTitle{font-size:20px;font-weight:700;color:#fff;line-height:1}
.authSub{font-size:12px;color:rgba(255,255,255,0.7)}
.authForm{display:flex;flex-direction:column;gap:10px}
.authError{min-height:18px;color:#ffb4b4;font-size:12px;margin-top:6px}
.authHint{margin-top:10px;display:flex;flex-direction:column;gap:6px}


/* ===== Unified Test: Theme & Compact ===== */
body[data-theme="dark"]{
  background:#0b1220;
  color:#e5e7eb;
}
body[data-theme="dark"] .card{ background:#0f1b2e; border-color:#23324d; }
body[data-theme="dark"] .sidebar{ background:#0f1b2e; border-color:#23324d; }
body[data-theme="dark"] .topbar{ background:#0f1b2e; border-color:#23324d; }
body[data-theme="dark"] input, body[data-theme="dark"] select, body[data-theme="dark"] textarea{
  background:#0b1220; color:#e5e7eb; border-color:#23324d;
}
body[data-theme="dark"] .muted{ color:#9ca3af; }

body[data-compact="1"] .card.pad{ padding:12px; }
body[data-compact="1"] .table td, body[data-compact="1"] .table th{ padding:6px 8px; }



/* ===== Dashboard Advanced ===== */
.svgChart{ display:block; width:100%; height:auto; }
.grid.charts2{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 900px){ .grid.charts2{ grid-template-columns: 1fr; } }

.chartBox{ display:flex; flex-direction:column; gap:8px; }

.barList{ display:flex; flex-direction:column; gap:10px; }
.barRow{ display:grid; grid-template-columns: 1.2fr 3fr auto; gap:10px; align-items:center; }
.barLabel{ font-weight:600; font-size:12px; opacity:.9; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.barTrack{ height:10px; border-radius:999px; background: rgba(255,255,255,.08); overflow:hidden; border:1px solid rgba(255,255,255,.08); }
.barFill{ height:100%; border-radius:999px; background: linear-gradient(90deg, var(--brand2), var(--brand3)); }

.funnel{ display:flex; flex-direction:column; gap:10px; }
.funnelRow{ display:grid; grid-template-columns: 1.2fr 3fr auto; gap:10px; align-items:center; }
.funnelLabel{ font-weight:600; font-size:12px; opacity:.9; }
.funnelTrack{ height:12px; border-radius:12px; background: rgba(255,255,255,.08); overflow:hidden; border:1px solid rgba(255,255,255,.08); }
.funnelFill{ height:100%; border-radius:12px; background: linear-gradient(90deg, var(--good), var(--brand2)); }

.miniTable{ width:100%; border-collapse:collapse; }
.miniTable td{ padding:8px 10px; border-bottom:1px solid rgba(255,255,255,.08); }
.miniKey{ font-weight:700; opacity:.95; }
.miniVal{ text-align:right; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.table.mini td, .table.mini th{ padding:6px 8px; font-size:12px; }

/* --- ProSmart i18n (AR/FR) --- */
.langTag{margin-inline-start:8px;font-size:11px;font-weight:800;letter-spacing:.06em;opacity:.9}

/* Direction switching */
html[dir="rtl"] .app{direction:rtl}
html[dir="rtl"] .sideSearch .kbd{margin-left:0;margin-right:auto}
html[dir="rtl"] .submenu{padding:0 14px 0 0}
html[dir="rtl"] .menuItem{gap:10px}
html[dir="rtl"] .menuChevron{margin-left:0;margin-right:auto}
html[dir="rtl"] .topbarLeft{flex-direction:row-reverse}
html[dir="rtl"] .topbarRight{flex-direction:row-reverse}
html[dir="rtl"] .user{flex-direction:row-reverse}
html[dir="rtl"] .userMeta{text-align:right}
