/* Comfort Home v157 — rust en overzicht op de telefoon + kleine weergavefixes.
   Alleen opmaak; alle functies blijven hetzelfde. Desktop blijft zoals hij was, behalve de vaste kop in grote vensters. */

/* ---------- desktop: vaste kop van grote vensters liet tekst erboven doorschemeren ---------- */
@media (min-width:761px){
  #quoteModal .box>.boxhead,#planningModal .box>.boxhead,#customerModal .box>.boxhead{top:-24px;margin-top:-24px;padding-top:22px}
}

/* offertebouwer: de basisopmaak van de airco-velden ontbrak (labels en selects stonden los onder elkaar) */
.quoteConfigGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}
.quoteConfigGrid .fieldBlock{border:1px solid var(--line,#e3e8ef);border-radius:12px;padding:10px 12px;background:#fff;min-width:0}
.quoteConfigGrid .fieldBlock.full,#unitConfig.fieldBlock{grid-column:1/-1}
.quoteConfigGrid .fieldBlock>label{display:block;font-size:11.5px;font-weight:700;color:var(--mut,#6b7a8c);margin-bottom:6px}
.quoteConfigGrid .fieldBlock select,.quoteConfigGrid .fieldBlock input{width:100%;box-sizing:border-box}
.compactNote{font-size:11.5px;color:var(--mut,#7b8699);line-height:1.4;margin-top:5px}
#unitConfig:empty{display:none}
#quoteModal select{height:auto!important;min-height:44px;padding-top:10px!important;padding-bottom:10px!important;line-height:1.3}

/* alleen op de telefoon */
.chvDate,.chvMoreTiles,.chvAllGood{display:none}

@media (max-width:760px){
  /* nooit meer zijwaarts schuiven */
  html,body{overflow-x:clip}@supports not (overflow:clip){body{overflow-x:hidden}} /* v238.25: hidden op html én body brak het scrollen met de vinger */
  .content,.main{overflow-x:clip}
  .grTabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;margin-right:-14px;padding-right:14px}
  .grTabs::-webkit-scrollbar{display:none}
  .grTabs button{flex:none}

  /* ---------- dashboard: rustig, belangrijkste eerst ---------- */
  #dashboard.active{display:flex!important;flex-direction:column}
  #dashboard>#chvHero{order:1}
  #dashboard>#actie{order:2}
  #dashboard>#qsPlanDash{order:3}
  #dashboard>.ch148-home{order:4}
  #dashboard>.ch148-shortcuts{display:none!important}
  #dashboard>*{margin-top:0!important}
  #dashboard>.card,#dashboard>.ch148-home{margin-bottom:12px!important}
  #dashboard .chvDate{display:block;margin:-6px 2px 10px;font-size:13.5px;font-weight:600;color:#7b8699;order:0}

  /* “Vandaag”-tegels: alleen wat aandacht vraagt, compact in twee kolommen */
  #actie{padding:14px!important}
  #actie>div:first-child{align-items:center!important}
  #actie>div:first-child .small,#actie>div:first-child>span{display:none}
  #actie h3{margin:0;font-size:17px}
  #actie .grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:10px!important}
  #actie .act{display:flex!important;flex-direction:column;align-items:flex-start!important;gap:6px!important;padding:12px!important;border-radius:16px!important;min-height:0!important;text-align:left;border:0!important;background:#f5f7fb!important;box-shadow:none!important}
  #actie .act i{font-size:18px!important;width:auto!important;height:auto!important;background:none!important;font-style:normal}
  #actie .act b{font-size:14px!important;line-height:1.25!important;display:block}
  #actie .act span{font-size:11.5px!important;line-height:1.3!important;color:#7b8699!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #actie .act.chvZero{display:none!important}
  #actie .act.chvHot{background:#fff4e8!important}
  #actie .chvAllGood{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:12px;border-radius:14px;background:#eaf7f0;color:#17663b;font-weight:700;font-size:14px}
  #actie .chvMoreTiles{display:block;grid-column:1/-1;border:0;background:none;color:#1565c0;font-weight:700;font-size:13px;padding:4px 0 0;min-height:0!important;text-align:left}
  #actie.chvShowAll .act.chvZero{display:flex!important;opacity:.6}

  /* snelle acties: één rustige rij */
  #dashboard .ch148-home{display:flex!important;flex-direction:column;gap:12px!important}
  #dashboard .ch148-side{display:contents!important}
  #dashboard .ch148-main{order:1}
  #dashboard .ch148-side>.card:first-child{order:2}
  #dashboard .ch148-side>.card:last-child{order:3}
  #dashboard .quick{display:flex!important;gap:8px!important;overflow-x:auto;scrollbar-width:none;margin:0 -14px!important;padding:2px 14px 4px!important;grid-template-columns:none!important}
  #dashboard .quick::-webkit-scrollbar{display:none}
  #dashboard .quick button,#dashboard .quick .ch151btn{flex:none!important;width:auto!important;min-height:44px!important;height:44px;padding:0 16px!important;border-radius:999px!important;font-size:14px!important;white-space:nowrap}
  #dashboard .quick button[onclick*="'leads'"],#dashboard #ch152VoiceAction{display:none!important}
  #dashboard .ch148-side .card .ch148-head{margin-bottom:10px}
  #dashboard .ch148-home{align-items:stretch!important}
  #dashboard .ch148-home>*,#dashboard .ch148-side>.card{width:100%!important;align-self:stretch!important;max-width:100%!important;min-width:0!important;box-sizing:border-box}
  #dashboard .ch148-side>.card:first-child{overflow:hidden}

  /* ---------- lijsten ---------- */
  /* klanten: rustige kaart, acties in één veegbare rij */
  #customerList .customerRow{display:block!important;padding:14px 0!important;border-bottom:1px solid #eef1f6}
  #customerList .customerRow>div{margin:0 0 2px!important;font-size:14px;color:#41506a}
  #customerList .customerRow>div:first-child b{font-size:16.5px;color:#0b1b33}
  #customerList .customerRow .small{display:inline!important;margin-left:6px;color:#8a96a8}
  #customerList .customerRow .pill{margin-top:4px}
  #customerList .customerRow .rowActions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;overflow:visible;margin:10px 0 0!important;padding-right:0} /* v189: geen schuifstrook meer (die botste met vegen): alle knoppen zichtbaar in rijen van 3 */
  #customerList .customerRow .rowActions::-webkit-scrollbar{display:none}
  #customerList .customerRow .rowActions button{min-width:0;min-height:40px!important;border-radius:999px!important;padding:0 8px!important;font-size:12.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* facturen: kaart per factuur in plaats van brede tabel */
  #invoiceList .qtr.qth{display:none!important}
  #invoiceList,#invoiceList .qtr{min-width:0!important;width:auto!important;overflow:visible!important}
  #invoiceList .qtr>div{min-width:0}
  #invoiceList .qtr{display:grid!important;grid-template-columns:1fr auto!important;grid-template-areas:"nr total" "klant status" "datum act"!important;gap:2px 10px!important;padding:13px 2px!important;border-bottom:1px solid #eef1f6;align-items:center}
  #invoiceList .qtr>div:nth-child(1){grid-area:nr;font-weight:800;color:#0b1b33}
  #invoiceList .qtr>div:nth-child(2){grid-area:klant;font-size:14px;color:#41506a}
  #invoiceList .qtr>div:nth-child(3){grid-area:datum;font-size:12.5px;color:#8a96a8}
  #invoiceList .qtr>div:nth-child(4){grid-area:status;justify-self:end;display:block!important}
  #invoiceList .qtr>div:nth-child(5){grid-area:total;justify-self:end;display:block!important}
  #invoiceList .qtr>div:nth-child(6){display:none}
  #invoiceList .qtr>.rowActions{grid-area:act;justify-self:end;display:flex!important}
  #invoiceList .qtr>.rowActions button{min-height:36px!important;border-radius:999px!important;padding:0 14px!important}

  /* monteurs: lege velden verbergen */
  .monteurFileGrid>div.chvEmpty{display:none!important}
  .monteurFileGrid{grid-template-columns:1fr 1fr!important}

  /* productcatalogus: lucht tussen de regels */
  .catalogItem{background:#fff;border-radius:14px;padding:10px!important;margin:0 0 8px!important;box-shadow:0 1px 3px #0b244712}
  .catalogItem img{border-radius:10px!important}

  /* offerte-regels: omschrijving volledig leesbaar */
  #lines .line{display:grid!important;grid-template-columns:72px 1fr 44px!important;gap:6px!important;padding:10px!important;border:1px solid #e6ebf2;border-radius:14px;margin-bottom:8px!important;background:#fff}
  #lines .line .ld{grid-column:1/-1!important;width:100%!important}
  #lines .line .lq,#lines .line .lp{width:100%!important;min-width:0!important}
  #lines .line>button{width:44px!important;min-width:0!important;padding:0!important}

  /* offerte versturen: knop Versturen altijd in beeld */
  #chMailModal .chmFoot{position:sticky;bottom:0;z-index:3;background:#fff;padding:10px 0 calc(10px + env(safe-area-inset-bottom,0px));margin:0;box-shadow:0 -8px 16px -12px rgba(15,40,80,.25)}
  #chMailModal #chmBody{max-height:42vh}
  #chMailModal .chmFoot #chmSend{flex:1;min-height:50px}

  /* algemene rust: kleinere bijschriften minder fel */
  .page>.title>button.ghost{background:#fff!important}
}

/* v157: lead even oplichten als je hem vanuit het dashboard opent */
@keyframes chFlash{0%,100%{box-shadow:0 1px 3px #0b244712}30%{box-shadow:0 0 0 3px #2f80ed,0 6px 18px #2f80ed33}}
.chFlash{animation:chFlash 1.6s ease}
