/* ============================================================
   velo-ui.css — "Velo UI" -ulkoasu (täysin uusi, ei jaa vanhan kanssa)
   Aktivoituu kun .rewo-app saa luokan .ui-velo.
   Raikas, VAALEA harmaa + HIILI-korostus. Tumma EI hallitse.
   Kontrastiturva: vaaleilla pinnoilla tumma teksti, hiili-/värinapeilla
   valkoinen teksti. Ei tummaa tekstiä tummalla, eikä päinvastoin.
   Skooppi: kaikki säännöt .rewo-app.ui-velo alla → vanha ilme ei muutu.
   Pääväriä voi säätää: Asetukset → Ulkoasu (tulostaa --brand/--lime).
   ============================================================ */

/* ---------- 1) TOKENIT ---------- */
.rewo-app.ui-velo{
  --paper:#F4F5F6; --surface:#FFFFFF; --surface-2:#ECEEF0; --surface-3:#E3E6E9;
  --line:#E3E6E9; --line-strong:#CDD2D8;
  --ink:#1B1F23; --ink-2:#3C434A; --muted:#727A82;
  /* aksentti = hiili (graphite). Säädettävissä asetuksista (--brand). */
  --brand:#2B3036; --brand-deep:#23282E; --brand-soft:#EAECEF;
  --lime:#2E7D52; --lime-soft:#E7F1EC;          /* CTA / positiivinen, säädettävissä */
  --orange:#C77D2A; --orange-soft:#F5EADC;
  --blue:#3B6FB0; --blue-soft:#E8EEF6;
  --pos:#2E7D52; --neg:#C0392B; --warn:#C77D2A;
  --r-card:14px; --r-ctrl:10px; --r-pill:999px;
  --bar-h:64px;
  --shadow:0 1px 2px rgba(24,28,33,.05),0 1px 3px rgba(24,28,33,.04);
  --shadow-lift:0 10px 34px rgba(24,28,33,.16);
  --ff:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--paper)!important; color:var(--ink)!important;
  font-family:var(--ff)!important;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
.rewo-app.ui-velo *{ box-sizing:border-box; }
.rewo-app.ui-velo .rewo-main,
.rewo-app.ui-velo .rewo-shell{ background:var(--paper)!important; color:var(--ink)!important; }

/* otsikot */
.rewo-app.ui-velo h1,.rewo-app.ui-velo h2,.rewo-app.ui-velo h3,
.rewo-app.ui-velo .rewo-h1,.rewo-app.ui-velo .rewo-h2,.rewo-app.ui-velo .rewo-h3{
  color:var(--ink)!important; font-weight:800; letter-spacing:-.01em;
}
.rewo-app.ui-velo a{ color:var(--brand); }
.rewo-app.ui-velo .rewo-help,.rewo-app.ui-velo .muted,.rewo-app.ui-velo small{ color:var(--muted)!important; }

/* ---------- 2) YLÄPALKKI (tumma hiili = sim-appbar, vaalea teksti) ---------- */
.rewo-app.ui-velo .rewo-topcard,
.rewo-app.ui-velo .rewo-topbar-v3,
.rewo-app.ui-velo .rewo-hdr-v2{
  background:var(--brand)!important; color:#EAECEF!important;
  border-bottom:1px solid var(--brand-deep)!important; box-shadow:none!important;
}
.rewo-app.ui-velo .rewo-topbar-v3 *{ color:#EAECEF!important; }
.rewo-app.ui-velo .rewo-tb-name,
.rewo-app.ui-velo .rewo-tb-modtitle{ color:#FFFFFF!important; font-weight:800; }
.rewo-app.ui-velo .rewo-topcard-app{
  background:var(--brand-soft)!important; color:var(--ink-2)!important; border:1px solid var(--line)!important;
}
.rewo-app.ui-velo .rewo-tb-btn,
.rewo-app.ui-velo .rewo-tb-bell,
.rewo-app.ui-velo .rewo-tb-envbtn,
.rewo-app.ui-velo .rewo-nav-toggle-btn{
  background:var(--surface-2)!important; color:var(--ink-2)!important; border:1px solid var(--line)!important;
}
.rewo-app.ui-velo .rewo-tb-logo .rewo-tb-velo-logo,
.rewo-app.ui-velo .rewo-tb-logo .rewo-tb-company-logo{ filter:none!important; }
/* Yläpalkin haku (työpöytä): poistettu kelluva taustalaatikko + suurennuslasi; selkea reunallinen kentta, keskitetty */
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-search,
.rewo-app.ui-velo .rewo-tb-search,
.rewo-app.ui-velo .rewo-tb-search-live{
  background:transparent!important; border:none!important; box-shadow:none!important;
  padding:0!important; align-items:center!important; max-width:440px!important;
}
.rewo-app.ui-velo .rewo-tb-search .rewo-tb-sic{ display:none!important; }
.rewo-app.ui-velo .rewo-tb-search input,
.rewo-app.ui-velo #rewo-tb-q{
  background:rgba(255,255,255,.09)!important; color:#F4F5F6!important;
  border:1px solid rgba(255,255,255,.15)!important; border-radius:10px!important;
  padding:9px 14px!important; text-indent:0!important; width:100%!important; box-sizing:border-box!important;
  font-size:14px!important; height:auto!important; line-height:1.3!important;
}
.rewo-app.ui-velo .rewo-tb-search input:focus,
.rewo-app.ui-velo #rewo-tb-q:focus{ border-color:rgba(255,255,255,.4)!important; background:rgba(255,255,255,.14)!important; box-shadow:0 0 0 3px rgba(255,255,255,.08)!important; outline:none!important; }
.rewo-app.ui-velo .rewo-tb-search input::placeholder{ color:#AEB6BF!important; }
.rewo-app.ui-velo .rewo-tb-drop{
  background:var(--surface)!important; border:1px solid var(--line)!important; box-shadow:var(--shadow-lift)!important;
}
.rewo-app.ui-velo .rewo-tb-drop-item{ color:var(--ink)!important; }
.rewo-app.ui-velo .rewo-tb-drop-item:hover{ background:var(--surface-2)!important; }
/* KONTRASTIKORJAUS: pudotusvalikot (avatar-valikko + haun tulokset) ovat topbarin sisalla,
   joten rivin ".rewo-topbar-v3 *{color:#EAECEF}" vaalensi tekstin valkealla pohjalla lukukelvottomaksi.
   Pakotetaan tumma ink naiden paneelien SISALLE (spesifisyys 0,4,0 > topbar-* 0,3,0). */
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-menu,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-menu *,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-drop,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-drop *{ color:var(--ink)!important; }
/* Ryhmaotsikot + rooli-alaotsikko luettavan harmaana (ei liian vaalea). */
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-drop-gh,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-mhead-s,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-drop-empty{ color:var(--muted)!important; }
/* Kirjaudu ulos pysyy punaisena. */
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-mi.danger,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-mi.danger *{ color:#C0341D!important; }
.rewo-app.ui-velo .rewo-tb-badge,
.rewo-app.ui-velo .rewo-bnav-badge{ background:var(--brand)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-tb-envdrop{ background:var(--surface)!important; border:1px solid var(--line)!important; color:var(--ink)!important; }
.rewo-app.ui-velo .rewo-tb-envi{ color:var(--ink-2)!important; }
.rewo-app.ui-velo .rewo-tb-envi:hover{ background:var(--surface-2)!important; }
.rewo-app.ui-velo .rewo-hdr-breadcrumb a{ color:#AEB6BF!important; }
.rewo-app.ui-velo .rewo-hdr-breadcrumb-cur{ color:#FFFFFF!important; }

/* Yläpalkin ikonit (nappien tausta vaalea chip tummalla headerilla = sim) */
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-btn,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-bell,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-envbtn,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-nav-toggle-btn{
  background:#FFFFFF!important; color:var(--ink-2)!important; border:1px solid rgba(255,255,255,.10)!important;
}
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-btn *,
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-bell *{ color:var(--ink-2)!important; }

/* MOBIILI: rivi 1 = velo + haku-ikoni + kello + moduulit + env + avatar. HAKU on toggle-napin takana (aukeaa klikkaamalla). */
@media (max-width:760px){
  .rewo-app.ui-velo .rewo-topcard.rewo-topbar-v3{ flex-wrap:wrap!important; row-gap:9px!important; overflow:visible!important; }
  /* Piilota mobiilin ruuhka: widget-nappi, operaattori-nappi, murupolku, moduuliotsikko. HAKU-TOGGLE nakyviin. */
  .rewo-app.ui-velo .rewo-topbar-v3 #rewo-arrange-btn,
  .rewo-app.ui-velo .rewo-topbar-v3 #rewo-tb-msgbtn,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-tuki,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-hdr-breadcrumb,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-modtitle{ display:none!important; }
  /* Haku-toggle (suurennuslasi) nakyviin rivi 1:lle -> avaa hakukentan klikkaamalla */
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-searchtoggle{ display:inline-flex!important; order:18!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-spacer{ order:10!important; flex:1 1 auto!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-bell{ order:20!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 #rewo-chrome-all{ order:22!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-env,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-envbtn{ order:24!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-avatar,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-user{ order:30!important; }
  /* AVATAR-KORJAUS (mobiili): profiili-nappi rivittyi tummasta palkista valkoiselle sisallolle
     ("avatar putoaa ylareunasta"). Pidetaan avatar palkin sisalla: tumma tausta ulottuu myos
     rivitetylle riville, alapehmuste + pienennetty avatar jotta se mahtuu eika valu sisaltoon. */
  .rewo-app.ui-velo .rewo-topcard.rewo-topbar-v3{ padding-bottom:5px!important; background:var(--brand)!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-user,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-avatar{ flex:0 0 auto!important; }
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-avatar .rewo-tb-av-img,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-user .rewo-tb-av-img,
  .rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-user img{ width:30px!important; height:30px!important; }
  /* HAKU piilossa oletuksena (base .rewo-tb-search{display:none}); aukeaa toggle-napista (is-searchopen -> era-23 vaalea paneeli). Ei enaa aina-nakyvaa tummaa riviaa. */
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen .rewo-tb-drop{ left:0!important; right:0!important; width:100%!important; }
}

/* ---------- 3) TYÖPÖYDÄN SIVUPALKKI (vaalea) ---------- */
.rewo-app.ui-velo .rewo-side,
.rewo-app.ui-velo .rewo-sidebar,
.rewo-app.ui-velo .rewo-leftpanel{
  background:var(--surface)!important; color:var(--ink-2)!important;
  border-right:1px solid var(--line)!important;
}
.rewo-app.ui-velo .rewo-side a,
.rewo-app.ui-velo .rewo-side .rewo-navitem,
.rewo-app.ui-velo .rewo-navitem{ color:var(--ink-2)!important; }
.rewo-app.ui-velo .rewo-side a:hover,
.rewo-app.ui-velo .rewo-navitem:hover{ background:var(--surface-2)!important; color:var(--ink)!important; }
.rewo-app.ui-velo .rewo-side a.on,
.rewo-app.ui-velo .rewo-side a.is-active,
.rewo-app.ui-velo .rewo-navitem.on,
.rewo-app.ui-velo .rewo-navitem.is-active{ background:var(--brand)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-side a.on *,
.rewo-app.ui-velo .rewo-navitem.on *{ color:#fff!important; }
.rewo-app.ui-velo .rewo-side-h,
.rewo-app.ui-velo .rewo-navgroup-h{ color:var(--muted)!important; }

/* ---------- 4) KORTIT ---------- */
.rewo-app.ui-velo .rewo-card,
.rewo-app.ui-velo .rewo-jobcard,
.rewo-app.ui-velo .rewo-stat,
.rewo-app.ui-velo .rewo-widget,
.rewo-app.ui-velo .rewo-vat,
.rewo-app.ui-velo .rewo-lookup,
.rewo-app.ui-velo .rewo-custlookup{
  background:var(--surface)!important; color:var(--ink)!important;
  border:1px solid var(--line)!important; border-radius:var(--r-card)!important;
  box-shadow:var(--shadow)!important;
}
.rewo-app.ui-velo .rewo-widget-h,
.rewo-app.ui-velo .rewo-card > h2,
.rewo-app.ui-velo .rewo-card > h3{ color:var(--ink)!important; }

/* ---------- 5) NAPIT (kontrastiturva) ---------- */
.rewo-app.ui-velo .rewo-btn{
  background:var(--surface)!important; color:var(--ink)!important;
  border:1px solid var(--line-strong)!important; border-radius:var(--r-ctrl)!important;
  font-weight:700;
}
.rewo-app.ui-velo .rewo-btn:hover{ filter:brightness(.98); }
.rewo-app.ui-velo .rewo-btn-primary{ background:var(--brand)!important; border-color:var(--brand)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-btn-approve,
.rewo-app.ui-velo .rewo-btn-lime,
.rewo-app.ui-velo .rewo-btn-save,
.rewo-app.ui-velo .rewo-btn-success{ background:var(--lime)!important; border-color:var(--lime)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-btn-blue{ background:var(--blue)!important; border-color:var(--blue)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-btn-danger{ background:var(--neg)!important; border-color:var(--neg)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-btn-ghost{ background:var(--surface)!important; color:var(--ink)!important; border-color:var(--line-strong)!important; }
.rewo-app.ui-velo .rewo-btn-primary *,
.rewo-app.ui-velo .rewo-btn-lime *,
.rewo-app.ui-velo .rewo-btn-blue *,
.rewo-app.ui-velo .rewo-btn-danger *{ color:#fff!important; }

/* ---------- 6) LOMAKKEET (palstaiset, isot kentät, natiivit pvm/valikot) ---------- */
.rewo-app.ui-velo .rewo-f > span,
.rewo-app.ui-velo .rewo-f > label,
.rewo-app.ui-velo label.rewo-f > span{ color:var(--ink-2)!important; font-weight:700; font-size:12.5px; }
.rewo-app.ui-velo .rewo-f input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.rewo-app.ui-velo .rewo-f select,
.rewo-app.ui-velo .rewo-f textarea,
.rewo-app.ui-velo input[type=text],
.rewo-app.ui-velo input[type=search],
.rewo-app.ui-velo input[type=email],
.rewo-app.ui-velo input[type=tel],
.rewo-app.ui-velo input[type=number],
.rewo-app.ui-velo input[type=date],
.rewo-app.ui-velo input[type=time],
.rewo-app.ui-velo select,
.rewo-app.ui-velo textarea{
  background:var(--surface)!important; color:var(--ink)!important;
  border:1px solid var(--line-strong)!important; border-radius:var(--r-ctrl)!important;
  font-size:16px!important; min-height:46px; padding:11px 12px;
}
.rewo-app.ui-velo .rewo-f textarea,
.rewo-app.ui-velo textarea{ min-height:120px; line-height:1.55; resize:vertical; }
.rewo-app.ui-velo .rewo-f input:focus,
.rewo-app.ui-velo .rewo-f select:focus,
.rewo-app.ui-velo .rewo-f textarea:focus,
.rewo-app.ui-velo input:focus,.rewo-app.ui-velo select:focus,.rewo-app.ui-velo textarea:focus{
  outline:2px solid var(--lime-soft)!important; border-color:var(--lime)!important;
}
.rewo-app.ui-velo input::placeholder,
.rewo-app.ui-velo textarea::placeholder{ color:var(--muted)!important; }
.rewo-app.ui-velo .rewo-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:700px){ .rewo-app.ui-velo .rewo-grid2{ grid-template-columns:1fr; } }

/* Projektin lohkoruudukko: yksi sarake iPad-leveyksiin asti (kaksi saraketta rutistaa
 * sisallon ja jattaa epatasaiset aukot). Vain leveilla naytoilla (>1200px) kaksi saraketta. */
@media (max-width:1200px){
  .rewo-app.ui-velo .rewo-proj-cols.cols-2,
  .rewo-app.ui-velo .rewo-proj-cols.cols-3{ grid-template-columns:1fr !important; }
}

/* ---------- 7) TAULUKOT ---------- */
.rewo-app.ui-velo .rewo-table{ font-variant-numeric:tabular-nums; color:var(--ink)!important; background:var(--surface)!important; }
.rewo-app.ui-velo .rewo-table th{
  text-transform:uppercase; letter-spacing:.05em; font-size:11px; font-weight:800;
  color:var(--muted)!important; background:var(--surface-2)!important; border-bottom:1px solid var(--line)!important;
}
.rewo-app.ui-velo .rewo-table td{ border-bottom:1px solid var(--line)!important; color:var(--ink)!important; }
.rewo-app.ui-velo .rewo-table tbody tr:hover td{ background:var(--surface-2)!important; }
.rewo-app.ui-velo .rewo-tablewrap{ border:1px solid var(--line)!important; border-radius:var(--r-card)!important; background:var(--surface)!important; }

/* MOBIILIKORJAUS: .rewo-tablewrap-taulut (esim. Ostetut tuoterivit) pinoutuvat mobiilissa
 * data-l-otsikoilla (app.css @760 SEKA .rewo-mobile-asetus). Inline min-width:720/780px pakotti
 * pinotun taulun leveaksi -> arvot valuivat ruudun oikealle ulos, sarakeotsikot pystyyn.
 * Kumotaan min-width + vaakascroll (a) kapealla ruudulla ja (b) pakotetussa Mobiilinakymassa
 * (.rewo-mobile, mika tahansa leveys). velo-ui.css lataa viimeisena -> !important voittaa inlinen. */
@media(max-width:760px){
  .rewo-app.ui-velo .rewo-tablewrap{ overflow-x:visible!important; }
  .rewo-app.ui-velo .rewo-tablewrap > .rewo-table{ min-width:0!important; width:100%!important; }
  .rewo-app.ui-velo .rewo-tablewrap > .rewo-table td{ min-width:0!important; }
}
.rewo-app.ui-velo .rewo-main.rewo-mobile .rewo-tablewrap{ overflow-x:visible!important; }
.rewo-app.ui-velo .rewo-main.rewo-mobile .rewo-tablewrap > .rewo-table{ min-width:0!important; width:100%!important; }
.rewo-app.ui-velo .rewo-main.rewo-mobile .rewo-tablewrap > .rewo-table td{ min-width:0!important; }


/* ---------- 8) KPI / TUNNUSLUVUT ---------- */
.rewo-app.ui-velo .rewo-stat,
.rewo-app.ui-velo .rewo-kpi{ background:var(--surface)!important; border:1px solid var(--line)!important; }
.rewo-app.ui-velo .rewo-stat-val,
.rewo-app.ui-velo .rewo-kpi .v{ color:var(--ink)!important; font-variant-numeric:tabular-nums; letter-spacing:-.02em; font-weight:800; }
.rewo-app.ui-velo .rewo-stat-lbl,
.rewo-app.ui-velo .rewo-kpi .l{ color:var(--muted)!important; }
.rewo-app.ui-velo .rewo-kpi.pos .v,.rewo-app.ui-velo .rewo-stat-val.pos{ color:var(--pos)!important; }
.rewo-app.ui-velo .rewo-kpi.neg .v,.rewo-app.ui-velo .rewo-stat-val.neg{ color:var(--neg)!important; }
.rewo-app.ui-velo .rewo-kpi.pos{ border-left:3px solid var(--pos)!important; }
.rewo-app.ui-velo .rewo-kpi.neg{ border-left:3px solid var(--neg)!important; }
/* klikattava mittari (porautuminen lahteeseen) */
.rewo-app.ui-velo .rewo-stat-link{ position:relative; text-decoration:none!important; color:inherit!important;
  cursor:pointer; transition:transform .1s ease, box-shadow .12s ease; }
.rewo-app.ui-velo .rewo-stat-link:hover{ box-shadow:0 4px 14px rgba(24,28,33,.10)!important; transform:translateY(-1px); }
.rewo-app.ui-velo .rewo-stat-link:active{ transform:translateY(0); }
.rewo-app.ui-velo .rewo-stat-chev{ position:absolute; top:10px; right:12px; color:var(--line-strong); font-size:18px; line-height:1; }

/* ---------- 9) PILLIT / BADGET / TILAT ---------- */
.rewo-app.ui-velo .rewo-pill,
.rewo-app.ui-velo .rewo-badge,
.rewo-app.ui-velo .rewo-tag{ border-radius:var(--r-pill)!important; font-weight:700; }
.rewo-app.ui-velo .rewo-pill.pos,.rewo-app.ui-velo .is-pos{ background:var(--lime-soft)!important; color:var(--pos)!important; }
.rewo-app.ui-velo .rewo-pill.warn,.rewo-app.ui-velo .is-warn{ background:var(--orange-soft)!important; color:var(--warn)!important; }
.rewo-app.ui-velo .rewo-pill.info,.rewo-app.ui-velo .is-info{ background:var(--blue-soft)!important; color:var(--blue)!important; }
.rewo-app.ui-velo .rewo-pill.neg,.rewo-app.ui-velo .is-neg{ background:#F7E7E4!important; color:var(--neg)!important; }

/* ---------- 10) VÄLILEHDET / SUBNAV (ml. kelluva projektipalkki) ---------- */
.rewo-app.ui-velo .rewo-tabbar,
.rewo-app.ui-velo .rewo-subnav,
.rewo-app.ui-velo .rewo-proj-tabs-v2{
  background:var(--surface)!important; border:1px solid var(--line)!important; box-shadow:var(--shadow)!important;
}
.rewo-app.ui-velo .rewo-tab,
.rewo-app.ui-velo .rewo-subnav-i,
.rewo-app.ui-velo .rewo-proj-tabs-v2 a{ color:var(--ink-2)!important; font-weight:700; border-radius:var(--r-pill)!important; }
.rewo-app.ui-velo .rewo-tab.on,
.rewo-app.ui-velo .rewo-tab[aria-current=page],
.rewo-app.ui-velo .rewo-subnav-i.on,
.rewo-app.ui-velo .rewo-subnav-i[aria-current=page],
.rewo-app.ui-velo .rewo-proj-tabs-v2 a.is-active{
  background:var(--brand)!important; color:#fff!important;
}

/* ---------- 11) ALAPALKKI (mobiili/tablet) + KAMERA ---------- */
.rewo-app.ui-velo .rewo-bottomnav,
.rewo-app.ui-velo .rewo-bnav-v2{
  background:var(--surface)!important; border-top:1px solid var(--line)!important; box-shadow:0 -2px 12px rgba(24,28,33,.05)!important;
}
.rewo-app.ui-velo .rewo-bnav-btn,
.rewo-app.ui-velo .rewo-navitem-btn{ color:var(--muted)!important; }
/* Aktiivinen tabi = VIHREA (sim: Projektit vihreana), ei charcoal */
.rewo-app.ui-velo .rewo-bnav-btn.is-active,
.rewo-app.ui-velo .rewo-bnav-btn[aria-current=page]{ color:var(--lime)!important; }
.rewo-app.ui-velo .rewo-bnav-btn.is-active .rewo-bnav-ic,
.rewo-app.ui-velo .rewo-bnav-btn[aria-current=page] .rewo-bnav-ic{ color:var(--lime)!important; }
/* Kamera-FAB (oikea luokka rewo-bn-camcircle): oranssi + KOHOLLA + VALKOINEN rengas (sim). */
.rewo-app.ui-velo .rewo-bnav-v2 .rewo-bn-cam .rewo-bn-camcircle{
  background:var(--orange)!important; color:#fff!important;
  border:4px solid var(--surface)!important;
  box-shadow:0 6px 18px rgba(199,125,42,.42), 0 0 0 1px var(--line)!important;
}
/* Sim-tavoitteessa kamera-FAB on ikoni ilman "Kuvaa"-tekstia -> piilota label velo-tilassa */
.rewo-app.ui-velo .rewo-bnav-v2 .rewo-bn-cam .rewo-bn-l{ display:none!important; }

/* ---------- 12) PROJEKTIN HERO (vaalea kortti, hiili-aksentti) ---------- */
.rewo-app.ui-velo .rewo-proj-hero-v2,
.rewo-app.ui-velo .rewo-proj-hero{
  background:var(--surface)!important; color:var(--ink)!important;
  border:1px solid var(--line)!important; border-left:3px solid var(--brand)!important;
  border-radius:var(--r-card)!important; box-shadow:var(--shadow)!important;
}
.rewo-app.ui-velo .rewo-proj-hero-v2 *{ color:var(--ink)!important; }
.rewo-app.ui-velo .rewo-proj-hero-kpis .l,
.rewo-app.ui-velo .rewo-proj-hero-v2 .muted{ color:var(--muted)!important; }

/* ---------- 13) GALLERIA / KUVAT ---------- */
.rewo-app.ui-velo .rewo-gallery-grid{ gap:6px; }
.rewo-app.ui-velo .rewo-gallery-grid img,
.rewo-app.ui-velo .rewo-gallery-grid .rewo-gcell{ border-radius:10px; border:1px solid var(--line)!important; }

/* ---------- 14) LIGHTBOX / MODAALI (yhtenäinen, kaikki lomakkeet) ---------- */
.rewo-velo-scrim{ position:fixed; inset:0; background:rgba(20,24,28,.5); backdrop-filter:blur(2px);
  z-index:100050; display:none; align-items:flex-end; justify-content:center; }
.rewo-velo-scrim.show{ display:flex; }
@media (min-width:701px){ .rewo-velo-scrim{ align-items:center; } }
.rewo-velo-lb{ background:var(--surface); color:var(--ink); width:100%; max-height:88vh;
  border-radius:20px 20px 0 0; display:flex; flex-direction:column; box-shadow:var(--shadow-lift); overflow:hidden; }
@media (min-width:701px){ .rewo-velo-lb{ width:min(640px,92%); max-height:84vh; border-radius:18px; } }
.rewo-velo-lb-head{ display:flex; align-items:center; gap:12px; padding:15px 18px; border-bottom:1px solid var(--line); }
.rewo-velo-lb-head h3{ margin:0; font-size:17px; font-weight:800; flex:1; color:var(--ink); }
.rewo-velo-lb-head .x{ width:32px; height:32px; border-radius:9px; border:1px solid var(--line); background:var(--surface);
  color:var(--ink-2); font-size:16px; cursor:pointer; }
.rewo-velo-lb-body{ flex:1; overflow:auto; padding:18px; }
.rewo-velo-lb-foot{ display:flex; gap:10px; padding:14px 18px; border-top:1px solid var(--line); }
.rewo-velo-lb-foot .rewo-btn{ flex:1; }

/* ---------- 15) YLÄLAIDAN KUITTAUS (toast) + TAUSTALATAUS ---------- */
.rewo-velo-toast{ position:fixed; top:12px; left:50%; transform:translateX(-50%) translateY(-26px);
  background:var(--ink); color:#fff; padding:10px 18px; border-radius:var(--r-pill); font-size:13.5px; font-weight:700;
  box-shadow:var(--shadow-lift); z-index:100060; opacity:0; transition:all .25s ease; pointer-events:none;
  display:flex; align-items:center; gap:8px; white-space:nowrap; }
.rewo-velo-toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.rewo-velo-toast.is-warn{ background:var(--warn); }
.rewo-velo-toast .tk{ color:#8fe3ad; font-weight:900; }
.rewo-velo-loadbar{ position:fixed; top:0; left:0; right:0; height:3px; z-index:100061; overflow:hidden; display:none; }
.rewo-velo-loadbar.show{ display:block; }
.rewo-velo-loadbar i{ position:absolute; height:100%; width:35%; background:var(--brand); border-radius:999px;
  animation:rewoVeloBar 1s ease-in-out infinite; }
@keyframes rewoVeloBar{ 0%{ left:-35%; } 100%{ left:100%; } }
/* offline-jono ilmaisin */
.rewo-velo-queue{ position:fixed; bottom:calc(var(--bar-h) + 12px); left:12px; z-index:100060;
  background:var(--warn); color:#fff; padding:7px 12px; border-radius:var(--r-pill); font-size:12px; font-weight:700;
  box-shadow:var(--shadow-lift); display:none; }
.rewo-velo-queue.show{ display:block; }

/* ---------- 16) SKELETON (taustahaku) ---------- */
.rewo-app.ui-velo .rewo-skel{ background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface-3) 50%,var(--surface-2) 75%);
  background-size:200% 100%; animation:rewoVeloShimmer 1.2s infinite; border-radius:8px; }
@keyframes rewoVeloShimmer{ 0%{ background-position:200% 0; } 100%{ background-position:-200% 0; } }

/* ---------- 17) KÄYNNISTYS-/LATAUSRUUTU ---------- */
.rewo-velo-splash{ position:fixed; inset:0; z-index:100070; background:var(--paper); color:var(--ink);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; transition:opacity .5s ease; }
.rewo-velo-splash.hide{ opacity:0; pointer-events:none; }
.rewo-velo-splash .slogo{ display:flex; align-items:center; gap:12px; font-size:30px; font-weight:800; letter-spacing:-.01em; }
.rewo-velo-splash .slogo .dot{ width:18px; height:18px; border-radius:5px; background:var(--brand); }
.rewo-velo-splash .slogo-img{ width:190px; max-width:62vw; height:auto; display:block; }
.rewo-velo-splash .sbar{ width:160px; height:5px; border-radius:999px; background:var(--surface-3); overflow:hidden; }
.rewo-velo-splash .sbar i{ display:block; height:100%; width:40%; background:var(--brand); border-radius:999px;
  animation:rewoVeloLoad 1.1s ease-in-out infinite; }
@keyframes rewoVeloLoad{ 0%{ margin-left:-40%; } 100%{ margin-left:100%; } }
.rewo-velo-splash .stxt{ font-size:13px; color:var(--muted); font-weight:600; }

/* ---------- 18) KONTRASTI-VARMISTUS (yleiset varotoimet) ---------- */
/* mikään tumma teksti tummalla / vaalea vaalealla ei jää: pakota luettavuus
   yleisillä sisältöalueilla. */
.rewo-app.ui-velo .rewo-main p,
.rewo-app.ui-velo .rewo-main li,
.rewo-app.ui-velo .rewo-main td,
.rewo-app.ui-velo .rewo-main span:not(.rewo-pill):not(.rewo-badge):not(.rewo-tag){ color:inherit; }
.rewo-app.ui-velo .rewo-main{ color:var(--ink)!important; }
/* selaimen autofill ei tummenna kenttää */
.rewo-app.ui-velo input:-webkit-autofill{ -webkit-text-fill-color:var(--ink); -webkit-box-shadow:0 0 0 100px var(--surface) inset; }

/* ---------- 19) RESPONSIIVISUUS (3 selkeää rajaa) ---------- */
@media (max-width:700px){
  .rewo-app.ui-velo .rewo-card{ padding:14px!important; }
}
@media (min-width:701px) and (max-width:1024px){
  .rewo-app.ui-velo .rewo-grid2{ grid-template-columns:1fr 1fr; }
}

/* ============================================================
   20) NAVIGAATIO-RUNKO (mobiili/tablet) — drawer + kamera-FAB + hampurilainen
   JS rakentaa elementit (velo-ui.js); CSS tässä. Näkyvät vain ≤1024px.
   ============================================================ */
.rewo-velo-drawer-scrim{ position:fixed; inset:0; background:rgba(20,24,28,.5); z-index:100040;
  opacity:0; pointer-events:none; transition:opacity .2s ease; }
.rewo-velo-drawer-scrim.show{ opacity:1; pointer-events:auto; }
.rewo-velo-drawer{ position:fixed; top:0; left:0; bottom:0; width:82%; max-width:300px; background:#FFFFFF;
  color:#3C434A; z-index:100041; transform:translateX(-100%); transition:transform .24s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column; box-shadow:8px 0 30px rgba(24,28,33,.18); border-right:1px solid #E3E6E9; }
.rewo-velo-drawer.show{ transform:translateX(0); }
.rewo-velo-drawer .dwhead{ display:flex; align-items:center; gap:9px; padding:calc(16px + env(safe-area-inset-top,0px)) 16px 14px; color:#1B1F23;
  font-weight:800; font-size:17px; border-bottom:1px solid #E3E6E9; }
.rewo-velo-drawer .dwhead .dot{ width:11px; height:11px; border-radius:3px; background:var(--brand,#2B3036); }
.rewo-velo-drawer .dwhead .x{ margin-left:auto; width:32px; height:32px; border-radius:9px; border:1px solid #E3E6E9;
  background:#fff; color:#3C434A; font-size:16px; cursor:pointer; }
.rewo-velo-drawer .dwbody{ flex:1; overflow:auto; padding:8px 8px 22px; -webkit-overflow-scrolling:touch; }
.rewo-velo-drawer .dwsl{ font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.07em;
  color:#727A82; padding:14px 12px 6px; }
.rewo-velo-drawer .dwa{ display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:9px;
  color:#3C434A; font-size:13.5px; font-weight:600; cursor:pointer; text-decoration:none; }
.rewo-velo-drawer .dwa .di{ width:20px; text-align:center; font-size:15px; }
.rewo-velo-drawer .dwa:active,.rewo-velo-drawer .dwa:hover{ background:#ECEEF0; color:#1B1F23; }
.rewo-velo-drawer .dwa.on{ background:var(--brand,#2B3036); color:#fff; }

/* kamera-FAB — kiinteä, keskellä, alapalkin yläpuolella */
.rewo-velo-cam{ position:fixed; left:50%; transform:translateX(-50%); bottom:calc(var(--bar-h,64px) - 18px);
  width:58px; height:58px; border-radius:50%; background:var(--brand,#2B3036); color:#fff; border:3px solid #fff;
  display:grid; place-items:center; font-size:25px; cursor:pointer; z-index:100039;
  box-shadow:0 6px 18px rgba(24,28,33,.3); padding-bottom:env(safe-area-inset-bottom,0); }
.rewo-velo-cam:active{ transform:translateX(-50%) scale(.94); }

/* hampurilainen — kiinteä, oikea alareuna */
.rewo-velo-burger{ position:fixed; right:14px; bottom:calc(var(--bar-h,64px) + env(safe-area-inset-bottom,0px) + 12px);
  width:50px; height:50px; border-radius:16px; background:#fff; color:#1B1F23; border:1px solid #E3E6E9;
  display:grid; place-items:center; font-size:21px; cursor:pointer; z-index:100039; box-shadow:var(--shadow-lift); }
.rewo-velo-burger:active{ filter:brightness(.96); }

/* kameravalikon ruudukko (lightboxissa) */
.rewo-velo-camgrid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.rewo-velo-camgrid a{ display:flex; flex-direction:column; align-items:center; gap:9px; text-decoration:none;
  background:#fff; border:1px solid #E3E6E9; border-radius:14px; padding:16px 12px; color:#1B1F23; font-weight:700; font-size:12.5px; }
.rewo-velo-camgrid a .ci{ width:46px; height:46px; border-radius:13px; display:grid; place-items:center; font-size:23px; background:#ECEEF0; }

/* näytä navigaatio-runko vain mobiilissa/tabletissa */
@media (min-width:1025px){ .rewo-velo-cam,.rewo-velo-burger{ display:none; } }

/* ============================================================
   21) KATTAVUUS & KONTRASTI — viela teemattomat komponentit vaaleiksi.
   Varmistaa: ei tummaa tekstia tummalla, helppolukuisuus kaikkialla.
   ============================================================ */
/* pikalisays (Uusi …) -tyokalut + popup */
.rewo-app.ui-velo .rewo-ent-add,
.rewo-app.ui-velo .rewo-ent-edit{ background:var(--surface-2)!important; color:var(--ink)!important;
  border:1px solid var(--line-strong)!important; border-radius:var(--r-ctrl)!important; font-weight:700; text-decoration:none; }
.rewo-app.ui-velo .rewo-ent-add:hover,
.rewo-app.ui-velo .rewo-ent-edit:hover{ background:var(--surface-3)!important; }
.rewo-app.ui-velo .rewo-ent-pop,
.rewo-app.ui-velo .rewo-ent-box,
.rewo-app.ui-velo [class^="rewo-ent-"][class*="pop"],
.rewo-app.ui-velo .rewo-popover{ background:var(--surface)!important; color:var(--ink)!important;
  border:1px solid var(--line)!important; border-radius:var(--r-card)!important; box-shadow:var(--shadow-lift)!important; }
.rewo-app.ui-velo .en-f,
.rewo-app.ui-velo .rewo-ent-pop input,
.rewo-app.ui-velo .rewo-ent-box input{ background:var(--surface)!important; color:var(--ink)!important; border:1px solid var(--line-strong)!important; }
.rewo-app.ui-velo .rewo-ent-save{ background:var(--lime)!important; color:#fff!important; border:0!important; border-radius:var(--r-ctrl)!important; font-weight:700; }

/* lomakkeen tallennuspalkki (sticky) — vaalea, ei vihrea hohto */
.rewo-app.ui-velo .rewo-formfoot{ border-top:1px solid var(--line); padding-top:14px; }
.rewo-app.ui-velo .rewo-main.rewo-mobile .rewo-formfoot{
  background:linear-gradient(to top, var(--paper) 72%, rgba(244,245,246,0))!important; }

/* details / summary -paneelit */
.rewo-app.ui-velo details{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-card); }
.rewo-app.ui-velo summary,
.rewo-app.ui-velo .rewo-ff-det>summary,
.rewo-app.ui-velo .rewo-pl-grp>summary{ color:var(--ink)!important; font-weight:700; }
.rewo-app.ui-velo .rewo-pl-grp>summary::before{ color:var(--muted)!important; }

/* kassavirtarivit / -listat */
.rewo-app.ui-velo .rewo-cf2-row,
.rewo-app.ui-velo .rewo-cf-row{ background:var(--surface)!important; color:var(--ink)!important;
  border:1px solid var(--line)!important; border-radius:var(--r-ctrl)!important; text-decoration:none; }
.rewo-app.ui-velo .rewo-cf2-row:hover,
.rewo-app.ui-velo .rewo-cf-row:hover{ background:var(--surface-2)!important; }
.rewo-app.ui-velo .rewo-stat-sub{ color:var(--muted)!important; }

/* huomiolaatikot / tyhjatilat */
.rewo-app.ui-velo .rewo-note,
.rewo-app.ui-velo .rewo-empty,
.rewo-app.ui-velo .rewo-callout,
.rewo-app.ui-velo .rewo-info{ background:var(--surface-2)!important; color:var(--ink)!important; border:1px solid var(--line)!important; }
.rewo-app.ui-velo .rewo-note a,.rewo-app.ui-velo .rewo-info a{ color:var(--brand)!important; }

/* Talentti (rewo-tp) upotettuna ERP:iin — peruskenttien luettavuus vaalealla */
.rewo-app.ui-velo .rewo-tp{ color:var(--ink)!important; }
.rewo-app.ui-velo .rewo-tp-card{ background:var(--surface)!important; color:var(--ink)!important; border:1px solid var(--line)!important; }
.rewo-app.ui-velo .rewo-tp input:not([type=checkbox]):not([type=radio]),
.rewo-app.ui-velo .rewo-tp select,
.rewo-app.ui-velo .rewo-tp textarea{ background:var(--surface)!important; color:var(--ink)!important; border:1px solid var(--line-strong)!important; }
.rewo-app.ui-velo .rewo-tp-btn-primary{ background:var(--brand)!important; color:#fff!important; border-color:var(--brand)!important; }

/* yleinen varmistin: linkit kortin sisalla eivat jaa alleviivattuna sinisena */
.rewo-app.ui-velo .rewo-card a:not(.rewo-btn):not(.rewo-pill){ color:var(--brand); }

/* ── era 12: ohjaava etusivukortti "Mitä seuraavaksi" ── */
.rewo-app.ui-velo .rewo-guide{ border-left:3px solid #2B3036 !important; }
.rewo-app.ui-velo .rewo-guide-lead{ margin:2px 0 12px !important; font-size:14px !important; color:#1B1F23 !important; line-height:1.5 !important; }
.rewo-app.ui-velo .rewo-guide-lead strong{ color:#1B1F23 !important; font-weight:800 !important; }
.rewo-app.ui-velo .rewo-guide-rows{ display:flex !important; flex-direction:column !important; gap:6px !important; }
.rewo-app.ui-velo .rewo-guide-row{ display:flex !important; align-items:center !important; gap:10px !important; padding:10px 12px !important; border:1px solid #E3E6E9 !important; border-radius:10px !important; background:#fff !important; text-decoration:none !important; color:#1B1F23 !important; transition:background .12s,border-color .12s !important; }
.rewo-app.ui-velo .rewo-guide-row:hover{ background:#F4F5F6 !important; border-color:#D7DBDF !important; }
.rewo-app.ui-velo .rewo-guide-row.urgent{ border-left:3px solid #C0392B !important; }
.rewo-app.ui-velo .rewo-guide-row.info{ border-left:3px solid #3B6FB0 !important; }
.rewo-app.ui-velo .rewo-guide-ic{ font-size:15px !important; flex-shrink:0 !important; }
.rewo-app.ui-velo .rewo-guide-tx{ flex:1 !important; min-width:0 !important; font-size:13.5px !important; font-weight:600 !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; }
.rewo-app.ui-velo .rewo-guide-meta{ font-size:11.5px !important; color:#727A82 !important; flex-shrink:0 !important; white-space:nowrap !important; }
.rewo-app.ui-velo .rewo-guide-ch{ color:#9AA1A8 !important; font-size:16px !important; flex-shrink:0 !important; }

/* ════════════════════════════════════════════════════════════
   era 13: PROJEKTIN YHTEENVETO — asettelu rakennettu uusiksi (velo).
   Korvaa vanhan jaykan widget-ruudukon robustilla fluid-asettelulla:
   - auto-fit minmax -> varma 1/2/3 saraketta naytön mukaan (myos iPad)
   - ei sisallon leikkausta (overflow nakyy), leveat taulukot scrollaavat
   - align-items:start -> lyhyet widgetit eivat veny tyhjiksi
   ════════════════════════════════════════════════════════════ */
.rewo-app.ui-velo .rewo-widget-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap:18px !important;
  align-items:start !important;
  margin-bottom:18px !important;
}
.rewo-app.ui-velo .rewo-widget{
  background:#FFFFFF !important;
  border:1px solid #E3E6E9 !important;
  border-radius:14px !important;
  box-shadow:0 1px 3px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05) !important;
  overflow:visible !important;
  min-height:0 !important;
}
/* Leveat taulukot/sisalto widgetin sisalla: vaakascroll, ei riko ruudukkoa */
.rewo-app.ui-velo .rewo-widget-body{ max-width:100% !important; overflow-x:auto !important; }
/* span2 turvallisesti */
.rewo-app.ui-velo .rewo-widget.span2{ grid-column:span 2 !important; }
@media (max-width:680px){
  .rewo-app.ui-velo .rewo-widget-grid{ grid-template-columns:1fr !important; }
  .rewo-app.ui-velo .rewo-widget.span2{ grid-column:1 / -1 !important; }
}
/* Raahaus-/resize-jaljet velo-pinnoille (yhtenainen ilme) */
.rewo-app.ui-velo .rewo-widget.is-dragging{ box-shadow:0 8px 32px rgba(0,0,0,.16) !important; }
.rewo-app.ui-velo .rewo-widget.drag-over{ border-color:#2B3036 !important; background:#F4F5F6 !important; }

/* ── era 15: projektin Yhteenveto — tyon kuvaus kokoontaitettavaksi (ei jattiblokkina alussa) ── */
.rewo-app.ui-velo .rewo-proj-desc-details{ margin-top:14px !important; padding:14px 16px !important; }
.rewo-app.ui-velo .rewo-proj-desc-details > summary{ cursor:pointer !important; list-style:none !important; font-weight:800 !important; font-size:14px !important; color:#1B1F23 !important; display:flex !important; align-items:center !important; gap:8px !important; user-select:none !important; }
.rewo-app.ui-velo .rewo-proj-desc-details > summary::-webkit-details-marker{ display:none !important; }
.rewo-app.ui-velo .rewo-proj-desc-details > summary::after{ content:'▸' !important; margin-left:auto !important; color:#9AA1A8 !important; font-size:13px !important; transition:transform .15s !important; }
.rewo-app.ui-velo .rewo-proj-desc-details[open] > summary::after{ transform:rotate(90deg) !important; }
.rewo-app.ui-velo .rewo-proj-desc-hint{ font-weight:600 !important; font-size:11.5px !important; color:#9AA1A8 !important; }
.rewo-app.ui-velo .rewo-proj-desc-details[open] .rewo-proj-desc-hint{ display:none !important; }
.rewo-app.ui-velo .rewo-proj-desc-body{ color:#3A4248 !important; font-size:13.5px !important; }

/* ── era 16: widgetit raahattaviksi + koon saadettaviksi (selkeat kahvat, ei piilotettu) ── */
.rewo-app.ui-velo .rewo-widget-drag-handle{ cursor:grab !important; color:#9AA1A8 !important; opacity:1 !important; font-size:13px !important; padding:0 2px !important; }
.rewo-app.ui-velo .rewo-widget-drag-handle:active{ cursor:grabbing !important; }
.rewo-app.ui-velo .rewo-widget.is-dragging{ opacity:.5 !important; outline:2px dashed #2B3036 !important; }
.rewo-app.ui-velo .rewo-widget.drag-over{ outline:2px solid #2E7D52 !important; outline-offset:2px !important; }
.rewo-app.ui-velo .rewo-widget-action-btn{ background:#ECEEF0 !important; border:1px solid #E3E6E9 !important; color:#3A4248 !important; border-radius:7px !important; width:26px !important; height:26px !important; line-height:1 !important; cursor:pointer !important; font-size:13px !important; }
.rewo-app.ui-velo .rewo-widget-action-btn:hover{ background:#E3E6E9 !important; color:#1B1F23 !important; }
.rewo-app.ui-velo .rewo-widget-width-btn{ font-weight:700 !important; }
.rewo-app.ui-velo .rewo-widget{ position:relative !important; }
.rewo-app.ui-velo .rewo-widget-resize{ position:absolute !important; right:3px !important; bottom:3px !important; width:18px !important; height:18px !important; cursor:ns-resize !important; opacity:1 !important; z-index:3 !important; background:linear-gradient(135deg,transparent 0 45%,#C2C8CE 45% 55%,transparent 55% 70%,#C2C8CE 70% 80%,transparent 80%) !important; border-radius:0 0 8px 0 !important; }
.rewo-app.ui-velo .rewo-widget-resize:hover{ background:linear-gradient(135deg,transparent 0 45%,#2B3036 45% 55%,transparent 55% 70%,#2B3036 70% 80%,transparent 80%) !important; }
.rewo-app.ui-velo .rewo-widget.span2{ grid-column:span 2 !important; }
.rewo-app.ui-velo .rewo-widget.span3{ grid-column:span 3 !important; }
@media (max-width:1024px){ .rewo-app.ui-velo .rewo-widget.span3{ grid-column:span 2 !important; } }
@media (max-width:700px){ .rewo-app.ui-velo .rewo-widget.span2,.rewo-app.ui-velo .rewo-widget.span3{ grid-column:auto !important; } }

/* ── era 17: poista mobiilista vasemman alan widget-lisays-FAB (+) ── */
@media (max-width:1024px){ #rewo-widget-fab, .rewo-app.ui-velo .rewo-widget-fab{ display:none !important; } }
/* erillinen velo-kamera + kelluva hampurilainen poistettu JS:ssa; piilota myos CSS:lla varmuudeksi */
#rewo-velo-cam, #rewo-velo-burger{ display:none !important; }

/* ── era 18: VAIHE 3 — Perustiedot selkeammaksi + vastuuhenkilot palstoittain (view+edit) ── */
/* Kentat 2 palstaan widgetin sisalla (>=701px); ryhmaotsikot + muokkaustila + yhteyshenkilot koko leveydelta */
@media (min-width:701px){
  .rewo-app.ui-velo .rewo-widget .rewo-view{ display:grid !important; grid-template-columns:1fr 1fr !important; gap:0 26px !important; align-items:start !important; }
  .rewo-app.ui-velo .rewo-widget .rewo-view-grouph{ grid-column:1 / -1 !important; }
  .rewo-app.ui-velo .rewo-widget .rewo-view-row.rewo-ie.is-editing{ grid-column:1 / -1 !important; }
  .rewo-app.ui-velo .rewo-widget .rewo-viewcontacts,
  .rewo-app.ui-velo .rewo-widget .rewo-view > h2,
  .rewo-app.ui-velo .rewo-widget .rewo-view > .rewo-viewtext{ grid-column:1 / -1 !important; }
}
/* Rivit siisteiksi palstasoluiksi */
.rewo-app.ui-velo .rewo-widget .rewo-view-row{ border-bottom:1px solid #ECEEF0 !important; padding:7px 0 !important; gap:14px !important; }
.rewo-app.ui-velo .rewo-widget .rewo-view-l{ color:#727A82 !important; font-weight:600 !important; font-size:12.5px !important; }
.rewo-app.ui-velo .rewo-widget .rewo-view-v{ color:#1B1F23 !important; font-size:13.5px !important; }
/* Ryhmaotsikot selkeiksi */
.rewo-app.ui-velo .rewo-widget .rewo-view-grouph{ font-size:11px !important; font-weight:800 !important; letter-spacing:.05em !important; text-transform:uppercase !important; color:#2B3036 !important; margin:16px 0 6px !important; padding-bottom:5px !important; border-bottom:2px solid #E3E6E9 !important; }
.rewo-app.ui-velo .rewo-widget .rewo-view-grouph:first-child{ margin-top:2px !important; }
/* Vastuuhenkilot/yhteyshenkilot vierekkaisiksi korteiksi */
.rewo-app.ui-velo .rewo-widget .rewo-viewcontacts{ display:grid !important; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)) !important; gap:10px !important; margin-top:6px !important; }
.rewo-app.ui-velo .rewo-widget .rewo-vcontact{ border:1px solid #E3E6E9 !important; border-radius:10px !important; background:#fff !important; padding:10px 12px !important; display:flex !important; flex-direction:column !important; gap:3px !important; }
.rewo-app.ui-velo .rewo-widget .rewo-vc-name{ font-weight:700 !important; color:#1B1F23 !important; }
.rewo-app.ui-velo .rewo-widget .rewo-vc-title{ color:#727A82 !important; font-size:12px !important; }
.rewo-app.ui-velo .rewo-widget .rewo-vc-item{ font-size:12.5px !important; }

/* ── era 21: ylapalkin haku tummalla palkilla — teksti valkoiseksi, pystykeskitys, matalampi palkki ── */
.rewo-app.ui-velo .rewo-topcard.rewo-topbar-v3{ min-height:44px !important; padding-top:0 !important; align-items:center !important; }
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-search{ align-self:center !important; margin-top:0 !important; margin-bottom:0 !important; }
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-search input,
.rewo-app.ui-velo #rewo-tb-q{
  color:#fff !important; background:rgba(255,255,255,.11) !important;
  border:1px solid rgba(255,255,255,.22) !important; border-radius:9px !important;
  height:32px !important; padding:0 12px !important; line-height:32px !important; box-sizing:border-box !important;
}
.rewo-app.ui-velo .rewo-topbar-v3 .rewo-tb-search input::placeholder,
.rewo-app.ui-velo #rewo-tb-q::placeholder{ color:rgba(255,255,255,.62) !important; }
.rewo-app.ui-velo #rewo-tb-q:focus{ border-color:rgba(255,255,255,.40) !important; box-shadow:0 0 0 3px rgba(255,255,255,.12) !important; background:rgba(255,255,255,.12) !important; outline:none !important; }

/* ── era 23: mobiilihaun korjaus — haku aukeaa palkin ALLE; velo-ui:n .rewo-tb-search{background:transparent!important}
   teki paneelista lapinakyvan ja era-21:n valkoinen teksti katosi vaalealle sivutaustalle.
   Mobiilissa: kiintea VAALEA paneeli + TUMMA teksti (velo-teema). Korkeampi spesifisyys (.is-searchopen) → voittaa. ── */
@media (max-width:760px){
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen .rewo-tb-search,
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen .rewo-tb-search-live{
    display:flex !important; position:absolute !important; left:8px !important; right:8px !important; top:100% !important;
    width:auto !important; max-width:none !important; margin-top:6px !important; z-index:200001 !important;
    background:#FFFFFF !important; border:1px solid var(--line,#E3E6E9) !important; border-radius:12px !important;
    box-shadow:0 14px 34px rgba(0,0,0,.22) !important; padding:8px !important; box-sizing:border-box !important;
  }
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen .rewo-tb-search input,
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen #rewo-tb-q{
    color:var(--ink,#1B1F23) !important; background:#FFFFFF !important;
    border:1px solid var(--line,#E3E6E9) !important; border-radius:9px !important;
    height:38px !important; line-height:38px !important; padding:0 12px !important; width:100% !important;
  }
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen .rewo-tb-search input::placeholder,
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen #rewo-tb-q::placeholder{ color:var(--muted,#6B7680) !important; }
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen #rewo-tb-q:focus{
    border-color:var(--brand,#2B3036) !important; box-shadow:0 0 0 3px rgba(43,48,54,.12) !important; background:#FFFFFF !important; outline:none !important;
  }
  /* Pudotusvalikko (hakutulokset) myos vaaleaksi ja luettavaksi */
  .rewo-app.ui-velo .rewo-topbar-v3.is-searchopen .rewo-tb-drop{
    background:#FFFFFF !important; border:1px solid var(--line,#E3E6E9) !important; color:var(--ink,#1B1F23) !important;
  }
}

/* ── era 22: ohje "?" -nappi (rewo_erp_ohje) — pieni pyorea otsikkotasolle, avaa lightbox-ohjeen ── */
.rewo-ohje-q{ display:inline-flex !important; align-items:center !important; justify-content:center !important; width:20px !important; height:20px !important; min-width:20px !important; padding:0 !important; margin-left:7px !important; border-radius:50% !important; border:1px solid #D7DCE0 !important; background:#ECEEF0 !important; color:#5B6166 !important; font-size:12px !important; font-weight:800 !important; line-height:1 !important; cursor:pointer !important; vertical-align:middle !important; flex:0 0 auto !important; box-shadow:none !important; }
.rewo-ohje-q:hover{ background:#2B3036 !important; color:#fff !important; border-color:#2B3036 !important; }
.rewo-ohje-q:focus{ outline:2px solid rgba(43,48,54,.35) !important; outline-offset:1px !important; }
/* Ohje-lightboxin sisalto siistiksi */
.rewo-ohje-lb .rewo-lb-body{ font-size:14px !important; line-height:1.6 !important; color:#2A2F34 !important; }

/* ── era 23: valikon hakukenttä (Etsi moduulia / Etsi osiota) korostettu + siisti — pohja teki siita vaalean tekstin lapinakyvalla (havisi vaalealla drawerilla) ── */
.rewo-app.ui-velo .rewo-sb-search{ padding:12px 12px 8px !important; }
.rewo-app.ui-velo .rewo-sb-si{ left:22px !important; color:#6B7378 !important; font-size:14px !important; }
.rewo-app.ui-velo .rewo-sb-q{
  background:#FFFFFF !important; border:1px solid #D5DADE !important; color:#1B1F23 !important;
  border-radius:10px !important; padding:9px 12px 9px 32px !important; font-size:13px !important;
  box-shadow:0 1px 2px rgba(16,24,32,.04) !important;
}
.rewo-app.ui-velo .rewo-sb-q::placeholder{ color:#7A828A !important; opacity:1 !important; }
.rewo-app.ui-velo .rewo-sb-q:focus{ border-color:#2C5F2D !important; box-shadow:0 0 0 3px rgba(44,95,45,.14) !important; }

/* ── era 24: VAIHE 6 — napit + muokkaus selkeammaksi koko sovelluksessa ── */
/* Perusnappi: selkea reuna, nakyva hover/active/focus (ei enaa lahes nakymaton brightness-hover) */
.rewo-app.ui-velo .rewo-btn{ transition:background .12s,border-color .12s,box-shadow .12s,transform .06s !important; }
.rewo-app.ui-velo .rewo-btn:hover{ background:var(--surface-2) !important; border-color:var(--muted) !important; filter:none !important; }
.rewo-app.ui-velo .rewo-btn:active{ transform:translateY(1px) !important; }
.rewo-app.ui-velo .rewo-btn:focus-visible{ outline:2px solid var(--brand) !important; outline-offset:2px !important; }
/* Primary (paatoiminto) selkeasti taytetty + tummempi hover */
.rewo-app.ui-velo .rewo-btn-primary{ box-shadow:0 1px 2px rgba(16,24,32,.14) !important; }
.rewo-app.ui-velo .rewo-btn-primary:hover{ background:var(--brand-deep) !important; border-color:var(--brand-deep) !important; filter:none !important; }
/* CTA / tallenna / hyvaksy: rauhallinen vihrea, selkea hover */
.rewo-app.ui-velo .rewo-btn-approve:hover,
.rewo-app.ui-velo .rewo-btn-lime:hover,
.rewo-app.ui-velo .rewo-btn-save:hover,
.rewo-app.ui-velo .rewo-btn-success:hover{ filter:brightness(.94) !important; }
.rewo-app.ui-velo .rewo-btn-blue:hover{ filter:brightness(.94) !important; }
.rewo-app.ui-velo .rewo-btn-danger:hover{ filter:brightness(.94) !important; }
/* Toissijainen (ghost): selkeampi reuna + sama nakyva hover */
.rewo-app.ui-velo .rewo-btn-ghost{ background:var(--surface) !important; color:var(--ink) !important; border-color:var(--line-strong) !important; box-shadow:0 1px 1px rgba(16,24,32,.03) !important; }
.rewo-app.ui-velo .rewo-btn-ghost:hover{ background:var(--surface-2) !important; border-color:var(--muted) !important; }
/* Pienet napit: yhtenainen, riittavan iso kosketusalue */
.rewo-app.ui-velo .rewo-btn-sm{ font-weight:700 !important; }
/* Disabled selkeasti himmenetty */
.rewo-app.ui-velo .rewo-btn:disabled,
.rewo-app.ui-velo .rewo-btn.is-disabled{ opacity:.5 !important; cursor:not-allowed !important; box-shadow:none !important; transform:none !important; }
/* MUOKKAUS selkeammaksi: aktiivinen muokkaustila erottuu (projekti-layout / copilot) */
.rewo-app.ui-velo .rewo-pl-edit.is-on,
.rewo-app.ui-velo .cop-editbtn[aria-pressed="true"],
.rewo-app.ui-velo .rewo-btn.is-editing-on{ background:var(--brand) !important; border-color:var(--brand) !important; color:#fff !important; }
/* Inline-muokattava arvo: vahvempi vihje (kynakursori + alleviivaus) */
.rewo-app.ui-velo .rewo-ie:not(.is-editing) .rewo-ie-val{ border-bottom:1px dashed var(--line-strong) !important; }
.rewo-app.ui-velo .rewo-ie:not(.is-editing) .rewo-ie-val:hover{ border-bottom-color:var(--brand) !important; background:var(--brand-soft) !important; border-radius:4px !important; }

/* ── era 25: hieman valia lohkojen valiin (pinotut osiokortit eivat aivan kiinni) ── */
.rewo-app.ui-velo .rewo-tp-card{ margin-bottom:16px !important; }
.rewo-app.ui-velo .rewo-tp-card + .rewo-tp-card{ margin-top:0 !important; }
/* aikataulu/osio-kortit pinossa */
.rewo-app.ui-velo .rewo-sched-card,
.rewo-app.ui-velo .rewo-sec-card,
.rewo-app.ui-velo .rewo-widget + .rewo-widget{ margin-top:0 !important; }
.rewo-app.ui-velo .rewo-sched-card{ margin-bottom:16px !important; }

/* ══ era 26 ══════════════════════════════════════════════════════════ */

/* (4) VALIKKORIVIT: pohjan .ui-v2 .rewo-side teki tekstista haalean (saman varisen kuin tausta).
   Normaali = tumma luettava teksti; HOVER = kaanteinen hiili-tausta + valkoinen teksti. */
.rewo-app.ui-velo .rewo-navitem,
.rewo-app.ui-velo .rewo-side .rewo-navitem,
.rewo-app.ui-velo #rewo-sb-nav .rewo-navitem{ color:var(--ink-2)!important; border-radius:8px!important; }
.rewo-app.ui-velo .rewo-navitem:not(.is-active) *,
.rewo-app.ui-velo .rewo-side .rewo-navitem:not(.is-active) *{ color:var(--ink-2)!important; }
.rewo-app.ui-velo .rewo-navitem:hover,
.rewo-app.ui-velo .rewo-side .rewo-navitem:hover,
.rewo-app.ui-velo #rewo-sb-nav .rewo-navitem:hover{ background:var(--brand)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-navitem:hover *,
.rewo-app.ui-velo .rewo-side .rewo-navitem:hover *,
.rewo-app.ui-velo #rewo-sb-nav .rewo-navitem:hover *{ color:#fff!important; }

/* (2) OSTOLASKU · Kohdistus ja kasittely — velo-ilme kaikkiin render-polkuihin (ei vain .vd-ok) */
.rewo-app.ui-velo .rewo-po-assign3{ display:flex!important; flex-direction:column!important; gap:0!important; }
.rewo-app.ui-velo .rewo-po-col{ padding:11px 0!important; border-bottom:1px solid var(--line)!important; min-height:0!important; }
.rewo-app.ui-velo .rewo-po-col:last-child{ border-bottom:none!important; }
.rewo-app.ui-velo .rewo-po-col-l{ display:block!important; font-size:11px!important; font-weight:700!important; letter-spacing:.05em; text-transform:uppercase; color:var(--muted)!important; margin:0 0 7px!important; }
.rewo-app.ui-velo .rewo-livesearch-input,
.rewo-app.ui-velo .rewo-po-col select{ width:100%!important; background-color:#fff!important; border:1px solid var(--line-strong)!important; border-radius:9px!important; padding:9px 11px 9px 36px!important; font-size:13.5px!important; color:var(--ink)!important; box-sizing:border-box!important; }
.rewo-app.ui-velo .rewo-po-col select{ padding-left:11px!important; }
.rewo-app.ui-velo .rewo-livesearch-input:focus,
.rewo-app.ui-velo .rewo-po-col select:focus{ border-color:var(--lime)!important; box-shadow:0 0 0 3px var(--lime-soft)!important; outline:none!important; }
.rewo-app.ui-velo .rewo-po-actions-row{ display:flex!important; gap:8px!important; flex-wrap:wrap!important; margin:0!important; }
.rewo-app.ui-velo .rewo-po-btn-secondary{ display:inline-flex!important; align-items:center; gap:6px; background:var(--surface)!important; border:1px solid var(--line-strong)!important; color:var(--ink)!important; border-radius:9px!important; padding:9px 14px!important; font-size:13px!important; font-weight:700!important; text-decoration:none!important; cursor:pointer; transition:background .12s,border-color .12s; }
.rewo-app.ui-velo .rewo-po-btn-secondary:hover{ background:var(--surface-2)!important; border-color:var(--muted)!important; }
.rewo-app.ui-velo .rewo-po-gc{ display:flex!important; gap:9px; align-items:flex-start; background:#FBF1E3!important; border:1px solid #EAD7BC!important; border-radius:10px!important; padding:11px 13px!important; font-size:12.5px!important; line-height:1.45; color:var(--ink-2)!important; margin:12px 0 0!important; }
.rewo-app.ui-velo .rewo-po-facts{ display:flex!important; flex-direction:column!important; gap:4px!important; }
.rewo-app.ui-velo .rewo-fblock{ margin-top:14px!important; }
.rewo-app.ui-velo .rewo-fsub{ font-size:14px!important; font-weight:800!important; color:var(--ink)!important; margin:0 0 10px!important; }
/* kortin otsikkorivi (Kohdistus ja kasittely + Analysoi) tasaus */
.rewo-app.ui-velo .rewo-tp-cardhead{ display:flex!important; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px!important; }
.rewo-app.ui-velo .rewo-tp-cardhead .rewo-h3{ font-size:15px!important; font-weight:800!important; color:var(--ink)!important; }

/* (3) LOHKOVALIT: pieni rako ostolaskun pinotuille korteille (ei aivan kiinni) */
.rewo-app.ui-velo .ok-det-col-main > .rewo-card,
.rewo-app.ui-velo .ok-det-col-main > .ok-card{ margin-bottom:14px!important; }
/* YLEINEN pieni rako pinotuille korteille koko sovelluksessa (ettei lohkot ole kiinni). */
.rewo-app.ui-velo .rewo-card + .rewo-card{ margin-top:12px; }
/* Ostolaskun (laskun kierto) pino säilytetään tiiviinä — omat margin-bottomit hoitavat välin. */
.rewo-app.ui-velo .ok-card + .ok-card,
.rewo-app.ui-velo .vd-ok .rewo-card + .rewo-card,
.rewo-app.ui-velo .ok-det-col-main .rewo-card + .rewo-card,
.rewo-app.ui-velo .ok-det-col-doc .rewo-card + .rewo-card{ margin-top:0!important; }

/* Asetussivu (ja muut pinotut kortit) — pieni rako ettei kortit ole kiinni toisissaan.
   Ohittaa yllä olevan flush-säännön vain asetusnäkymän sisällä. */
.rewo-app.ui-velo .rewo-set-content .rewo-card + .rewo-card,
.rewo-app.ui-velo .rewo-set-content .rewo-card + .rewo-form,
.rewo-app.ui-velo .rewo-set-content .rewo-form + .rewo-card{ margin-top:16px!important; }
.rewo-app.ui-velo .rewo-set-content > .rewo-card{ margin-bottom:0; }

/* ══ era 27: YLEINEN MODUULILAYOUT v2 — leveys (1-3 palstaa) + korkeus kulmasta + palvelintallennus ══
   Oletus = taysleveys (span 6) => sama kuin ennen, ei regressiota. Grid mahdollistaa leveyssaadon. */
.rewo-app.ui-velo .rewo-mod-wrap{ display:grid !important; grid-template-columns:repeat(6,1fr) !important; gap:16px !important; align-items:start !important; padding:4px 0 !important; }
.rewo-app.ui-velo .rewo-mod-toggle-bar{ grid-column:1 / -1 !important; }
/* TARKEA: kaikki muu kuin paneeli/placeholder = taysleveys, ettei grid kutista sisaltoa */
.rewo-app.ui-velo .rewo-mod-wrap > *:not(.rewo-mod-panel):not(.rewo-mod-placeholder){ grid-column:1 / -1 !important; }
.rewo-app.ui-velo .rewo-mod-panel{ grid-column:span 6; margin:0 !important; position:relative; }
.rewo-app.ui-velo .rewo-mod-panel[data-mw="3"]{ grid-column:span 3; }
.rewo-app.ui-velo .rewo-mod-panel[data-mw="2"]{ grid-column:span 2; }
.rewo-app.ui-velo .rewo-mod-placeholder{ grid-column:span 6; border:2px dashed var(--line-strong); border-radius:12px; background:var(--brand-soft); }
.rewo-app.ui-velo .rewo-mod-placeholder[data-mw="3"]{ grid-column:span 3; }
.rewo-app.ui-velo .rewo-mod-placeholder[data-mw="2"]{ grid-column:span 2; }
@media (max-width:1024px){
  .rewo-app.ui-velo .rewo-mod-wrap{ grid-template-columns:1fr !important; }
  .rewo-app.ui-velo .rewo-mod-panel,
  .rewo-app.ui-velo .rewo-mod-panel[data-mw],
  .rewo-app.ui-velo .rewo-mod-placeholder,
  .rewo-app.ui-velo .rewo-mod-placeholder[data-mw]{ grid-column:1 / -1 !important; }
}
/* korkeus ei katoa: skrollaa jos asetettu korkeus on sisaltoa pienempi */
.rewo-app.ui-velo .rewo-mod-body{ overflow:auto !important; }
/* kulmakahva (leveys + korkeus) — vain muokkaustilassa */
.rewo-app.ui-velo .rewo-mod-rz2{ position:absolute; right:5px; bottom:5px; width:22px; height:22px; cursor:nwse-resize; display:none; z-index:6; border-radius:0 0 13px 0; touch-action:none; background:linear-gradient(135deg,transparent 0 38%,var(--line-strong) 38% 50%,transparent 50% 62%,var(--line-strong) 62% 74%,transparent 74%); }
.rewo-app.ui-velo .rewo-mod-arrange .rewo-mod-panel .rewo-mod-rz2{ display:block; }
.rewo-app.ui-velo .rewo-mod-arrange .rewo-mod-panel .rewo-mod-rz2:hover{ background:linear-gradient(135deg,transparent 0 38%,var(--brand) 38% 50%,transparent 50% 62%,var(--brand) 62% 74%,transparent 74%); }
.rewo-app.ui-velo .rewo-mod-panel.is-resizing{ outline:2px solid var(--lime); outline-offset:-1px; }
/* muokkaustilan ilme + napit veloksi */
.rewo-app.ui-velo .rewo-mod-toggle-btn{ background:var(--surface)!important; border:1px solid var(--line-strong)!important; color:var(--ink)!important; border-radius:9px!important; font-weight:700!important; padding:8px 14px!important; cursor:pointer; }
.rewo-app.ui-velo .rewo-mod-toggle-btn:hover{ background:var(--surface-2)!important; border-color:var(--muted)!important; }
.rewo-app.ui-velo .rewo-mod-toggle-btn.is-active{ background:var(--brand)!important; border-color:var(--brand)!important; color:#fff!important; }
.rewo-app.ui-velo .rewo-mod-grip{ background:var(--surface-2)!important; border-bottom:1px solid var(--line)!important; }
.rewo-app.ui-velo .rewo-mod-grip-t{ color:var(--ink)!important; font-weight:700; }
.rewo-app.ui-velo .rewo-mod-collapse{ color:var(--muted)!important; background:transparent!important; border:none!important; cursor:pointer; }
.rewo-app.ui-velo .rewo-mod-arrange .rewo-mod-panel{ outline:1px dashed var(--line-strong); outline-offset:2px; border-radius:14px; }

/* ── 3.5.540: Globaali rako lohkojen väliin (selkeämpi asettelu) ────────── */
.rewo-app.ui-velo .rewo-card{ margin-bottom:16px !important; }
.rewo-app.ui-velo .rewo-card:last-child{ margin-bottom:0 !important; }
.rewo-app.ui-velo .rewo-roleblock{ margin-top:16px; }
.rewo-app.ui-velo .vd-proj{ margin-bottom:16px; }
.rewo-app.ui-velo .rewo-widget .rewo-card{ margin-bottom:0 !important; }

/* ============================================================
   Jaetut komponentit (3.5.703): taloustiivistelmä + kohteet.
   Skooppi .rewo-app.ui-velo → ei muuta vanhaa ilmettä.
   ============================================================ */
.rewo-app.ui-velo .rewo-finsum{background:var(--surface,#fff);border:1px solid var(--line,#E3E6E9);border-radius:14px;padding:14px;margin:0 0 16px;position:relative}
.rewo-app.ui-velo .rewo-finsum-h{display:flex;align-items:center;gap:8px;margin:0 0 10px}
.rewo-app.ui-velo .rewo-finsum-h .ey{font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:var(--muted,#727A82)}
.rewo-app.ui-velo .rewo-finsum-h .ti{font-size:15px;font-weight:800;color:var(--ink,#1B1F23)}
.rewo-app.ui-velo .rewo-fintiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(min-width:720px){.rewo-app.ui-velo .rewo-fintiles{grid-template-columns:repeat(4,1fr)}}
.rewo-app.ui-velo .rewo-ft{background:var(--surface-2,#ECEEF0);border-radius:12px;padding:11px}
.rewo-app.ui-velo .rewo-ft .l{font-size:11px;font-weight:700;color:var(--muted,#727A82);display:flex;align-items:center;gap:5px}
.rewo-app.ui-velo .rewo-ft .v{font-size:17px;font-weight:800;margin-top:3px;font-variant-numeric:tabular-nums;color:var(--ink,#1B1F23)}
.rewo-app.ui-velo .rewo-ft .k{font-size:11px;font-weight:700;margin-top:2px}
.rewo-app.ui-velo .rewo-ft .k.pos{color:var(--pos,#2E7D52)}
.rewo-app.ui-velo .rewo-ft .k.neg{color:#B23B3B}
.rewo-app.ui-velo .rewo-ft .k.muted{color:var(--muted,#727A82)}
.rewo-app.ui-velo .rewo-ft .microbar{height:6px;border-radius:999px;background:#dfe3e6;overflow:hidden;margin-top:8px;display:flex}
.rewo-app.ui-velo .rewo-ft .microbar i{display:block;height:100%}
.rewo-app.ui-velo .rewo-stack{margin-top:12px}
.rewo-app.ui-velo .rewo-stack .bar{height:20px;border-radius:8px;overflow:hidden;display:flex;background:#dfe3e6}
.rewo-app.ui-velo .rewo-stack .bar i{display:block;height:100%}
.rewo-app.ui-velo .rewo-stack .lg{display:flex;justify-content:space-between;font-size:11px;font-weight:700;margin-top:6px}
.rewo-app.ui-velo .rewo-stack .lg .a{color:var(--pos,#2E7D52)}
.rewo-app.ui-velo .rewo-stack .lg .b{color:#C77D2A}
.rewo-app.ui-velo .rewo-finsum-foot{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.rewo-app.ui-velo .rewo-kohde{border:1px solid var(--line,#E3E6E9);border-radius:14px;background:var(--surface,#fff);margin-bottom:12px;overflow:hidden}
.rewo-app.ui-velo .rewo-kohde-h{display:flex;align-items:center;gap:10px;padding:12px 13px}
.rewo-app.ui-velo .rewo-kohde-h .ic{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:18px;flex:none;color:#fff;background:#3B6FB0}
.rewo-app.ui-velo .rewo-kohde-h .m{flex:1;min-width:0}
.rewo-app.ui-velo .rewo-kohde-h .t{font-size:14.5px;font-weight:800;margin:0}
.rewo-app.ui-velo .rewo-kohde-h .s{font-size:12px;color:var(--muted,#727A82)}
.rewo-app.ui-velo .rewo-kohde-h .sum{text-align:right;flex:none}
.rewo-app.ui-velo .rewo-kohde-h .sum .v{font-size:14px;font-weight:800}
.rewo-app.ui-velo .rewo-kohde-h .sum .l{font-size:10.5px;color:var(--muted,#727A82)}
.rewo-app.ui-velo .rewo-kohde-job{display:flex;align-items:center;gap:10px;padding:10px 13px;border-top:1px solid var(--line,#E3E6E9)}
.rewo-app.ui-velo .rewo-devnote{font-size:12px;color:#3B6FB0;background:#EAF0F7;border:1px solid #cfe0f2;border-radius:10px;padding:8px 12px;margin:0 0 10px}
/* 3.5.704 — kohteen detalji + työlista + KP-yhteenveto (jaettu komponentti) */
.rewo-app.ui-velo .rewo-kohde>summary::-webkit-details-marker{display:none}
.rewo-app.ui-velo .rewo-kohde-detail{padding:0 13px 13px}
.rewo-app.ui-velo .rewo-kohde-jobs{margin:4px 0 10px;position:relative}
.rewo-app.ui-velo .rewo-kohde-jobrow{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--line,#E3E6E9);border-radius:10px;background:var(--surface-2,#ECEEF0);margin-bottom:7px;text-decoration:none;color:var(--ink,#1B1F23)}
.rewo-app.ui-velo .rewo-kohde-jobrow .pill{font-size:10.5px;font-weight:800;padding:3px 8px;border-radius:999px;flex:none}
.rewo-app.ui-velo .rewo-kohde-jobrow .pill.h{background:#EAF0F7;color:#3B6FB0}
.rewo-app.ui-velo .rewo-kohde-jobrow .pill.u{background:#E8F1EB;color:#2E7D52}
.rewo-app.ui-velo .rewo-kohde-jobrow .t{flex:1;min-width:0;font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rewo-app.ui-velo .rewo-kohde-jobrow .r{font-size:11.5px;font-weight:700;color:var(--orange,#C77D2A);flex:none}

/* Kohde-tyyppi-välilehdet projektilistassa (3.5.704) */
.rewo-app.ui-velo .rewo-kohdetabs{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0 2px 12px}
.rewo-app.ui-velo .rewo-kt-tab{border:1px solid var(--line,#E3E6E9);background:var(--surface,#fff);color:var(--muted,#727A82);
  font-weight:800;font-size:12.5px;padding:8px 13px;border-radius:999px;cursor:pointer;white-space:nowrap}
.rewo-app.ui-velo .rewo-kt-tab.is-on{background:var(--accent,#2B3036);color:#fff;border-color:var(--accent,#2B3036)}
.rewo-app.ui-velo .rewo-kt-kp{margin-left:auto;border:1px solid var(--line,#E3E6E9);background:var(--surface,#fff);
  color:var(--ink,#1B1F23);font-weight:700;font-size:12.5px;padding:8px 11px;border-radius:10px}
.rewo-app.ui-velo .proj-row-wrap.rewo-kt-off{display:none!important}

/* Kohde-detalji + työlista (3.5.704) */
.rewo-app.ui-velo .rewo-kohde-detail{padding:12px 13px;border-top:1px solid var(--line,#E3E6E9)}
.rewo-app.ui-velo .rewo-kohde-jobs{margin:4px 0 6px}
.rewo-app.ui-velo .rewo-kohde-jobrow{display:flex;align-items:center;gap:10px;padding:9px 4px;border-bottom:1px solid var(--line,#E3E6E9);text-decoration:none;color:var(--ink,#1B1F23)}
.rewo-app.ui-velo .rewo-kohde-jobrow:last-child{border-bottom:0}
.rewo-app.ui-velo .rewo-kohde-jobrow .pill{font-size:10.5px;font-weight:800;padding:3px 9px;border-radius:999px;flex:none}
.rewo-app.ui-velo .rewo-kohde-jobrow .pill.h{background:#EAF0F7;color:#3B6FB0}
.rewo-app.ui-velo .rewo-kohde-jobrow .pill.u{background:#E8F1EB;color:#2E7D52}
.rewo-app.ui-velo .rewo-kohde-jobrow .t{flex:1;min-width:0;font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rewo-app.ui-velo .rewo-kohde-jobrow .r{font-size:11.5px;font-weight:700;color:var(--muted,#727A82);flex:none}

/* KPI-mittaristo-widget (3.5.705) */
.rewo-app.ui-velo .rewo-kpicat{margin:0 0 12px}
.rewo-app.ui-velo .rewo-kpicat-h{font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:var(--accent,#2B3036);margin:0 0 7px}
.rewo-app.ui-velo .rewo-kpigrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media(min-width:640px){.rewo-app.ui-velo .rewo-kpigrid{grid-template-columns:repeat(4,1fr)}}
.rewo-app.ui-velo .rewo-kpicard{background:var(--surface-2,#ECEEF0);border-radius:12px;padding:11px;text-decoration:none;display:block}
.rewo-app.ui-velo a.rewo-kpicard{transition:background .12s}
.rewo-app.ui-velo a.rewo-kpicard:hover{background:#E3E6E9}
.rewo-app.ui-velo .rewo-kpicard .v{display:block;font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.1}
.rewo-app.ui-velo .rewo-kpicard .l{display:block;font-size:11px;color:var(--muted,#727A82);font-weight:600;margin-top:3px}
