/* FOURMI THINK — Barbeiro: Home "A cadeira" (barber-home.js). Identidade Marinho & Latão. Só no Barbeiro. */
#workspace:not(:is([data-profession="barber"],[data-profession="other"])) #bh-hero,#workspace:not(:is([data-profession="barber"],[data-profession="other"])) #bh-day,#workspace:not(:is([data-profession="barber"],[data-profession="other"])) #bh-after,#workspace:not(:is([data-profession="barber"],[data-profession="other"])) #bh-gaps-host,#workspace:not(:is([data-profession="barber"],[data-profession="other"])) .bh-check,#workspace:not(:is([data-profession="barber"],[data-profession="other"])) .bh-undo{display:none!important}
#workspace:is([data-profession="barber"],[data-profession="other"]){--bh-navy:#0d1b2e;--bh-navy2:#16263d;--bh-deep:#0a1626;--bh-brass:#d4a853;--bh-brass2:#e8c77d;--bh-cta:#f0c13a;--bh-paper:#fffdf8;--bh-cream:#f5f1e8;--bh-ink:#14201b;--bh-muted:#5f6b66;--bh-line:#e7dfcd;--bh-green:#1f7a50;--bh-done:#26374f}
#workspace:is([data-profession="barber"],[data-profession="other"]) .bottom-nav{background:var(--bh-deep);border-color:#d4a85340}

/* Esconde o que a nova Home substitui (os elementos continuam no HTML e seus IDs não mudam). */
#home-screen.bh-on .barber-hero-badge,#home-screen.bh-on .barber-hero-copy,#home-screen.bh-on .barber-hero-metrics,#home-screen.bh-on .barber-home-cta,#home-screen.bh-on #th-next,
#home-screen.bh-on .barber-free-heading,#home-screen.bh-on #barber-home-free-slots,#home-screen.bh-on .home-month-heading,#home-screen.bh-on .home-month-summary{display:none!important}
#home-screen.bh-empty>:not(.barber-home-hero):not(#bh-day){display:none!important}

/* Topo marinho com a foto do polo */
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-home-hero{padding:0 18px 22px;background-color:var(--bh-navy);
  background-image:linear-gradient(90deg,rgba(13,27,46,.96) 0%,rgba(13,27,46,.86) 40%,rgba(13,27,46,.45) 68%,rgba(13,27,46,.12) 100%),linear-gradient(180deg,rgba(13,27,46,.5) 0%,rgba(13,27,46,0) 22%,rgba(13,27,46,0) 46%,rgba(13,27,46,.96) 78%),url('assets/barber-home-pole.jpg');
  background-image:linear-gradient(90deg,rgba(13,27,46,.96) 0%,rgba(13,27,46,.86) 40%,rgba(13,27,46,.45) 68%,rgba(13,27,46,.12) 100%),linear-gradient(180deg,rgba(13,27,46,.5) 0%,rgba(13,27,46,0) 22%,rgba(13,27,46,0) 46%,rgba(13,27,46,.96) 78%),image-set(url('assets/barber-home-pole.webp') type('image/webp'),url('assets/barber-home-pole.jpg') type('image/jpeg'));
  background-position:center,center,right -60px top;background-size:cover,cover,auto 100%;background-repeat:no-repeat;border-radius:0 0 30px 30px}
#bh-hero{display:grid;justify-items:start;color:#fffdf8}
.bh-rule{display:flex;align-items:center;gap:8px;width:100%;margin:14px 0 6px;color:var(--bh-brass2);font-size:.68rem;font-weight:850;letter-spacing:.22em;text-transform:uppercase}
.bh-rule:after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(212,168,83,.6),transparent)}
.bh-hi{margin:0;color:rgba(255,253,248,.74);font-size:.9rem}
.bh-name{margin:0 0 8px;max-width:100%;overflow-wrap:anywhere;color:#fff;font-family:Literata,Georgia,"Iowan Old Style",serif;font-size:clamp(1.8rem,8.6vw,2.15rem);font-weight:700;line-height:1.05;text-shadow:0 2px 14px rgba(0,0,0,.35)}
.bh-next{width:100%;margin-top:16px;padding:14px;border-radius:22px;background:var(--bh-paper);color:var(--bh-ink);box-shadow:0 16px 32px rgba(0,0,0,.28)}
.bh-next-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.bh-next-top h2{margin:0;color:#8a6a24;font-size:.7rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.bh-when{flex:none;padding:4px 10px;border-radius:999px;background:#f4ead3;color:#6b5118;font-size:.74rem;font-weight:850}
.bh-when.is-now{background:#e3f2e9;color:#1d6b45}
.bh-next-row{display:flex;align-items:center;gap:12px;margin:10px 0 12px}
.bh-ava{display:grid;place-items:center;flex:none;width:46px;height:46px;overflow:hidden;border-radius:50%;background:#efe7d4;color:#5c4614;font-size:.92rem;font-weight:900}
.bh-ava img{width:100%;height:100%;object-fit:cover}
.bh-next-who{display:grid;min-width:0;flex:1}
.bh-next-who strong{overflow:hidden;font-size:1.1rem;white-space:nowrap;text-overflow:ellipsis}
.bh-next-who span{color:var(--bh-muted);font-size:.82rem}
.bh-next-time{display:grid;justify-items:end;flex:none}
.bh-next-time b{font-family:Literata,Georgia,serif;font-size:1.4rem;font-variant-numeric:tabular-nums}
.bh-next-time span{color:var(--bh-muted);font-size:.8rem;font-weight:700}
.bh-next-empty{margin:8px 0 12px;color:var(--bh-muted);font-size:.9rem}
.bh-next-actions{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr);gap:8px}
.bh-next-actions.is-one{grid-template-columns:1fr}
.bh-btn{display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:0 10px;border:1px solid var(--bh-line);border-radius:14px;background:#fff;color:var(--bh-ink);font:inherit;font-size:.88rem;font-weight:800;white-space:nowrap;text-decoration:none;cursor:pointer}
.bh-btn span{overflow:hidden;text-overflow:ellipsis}
.bh-btn.is-dark{border-color:var(--bh-navy);background:var(--bh-navy);color:#fffdf8}
.bh-btn:active,.bh-gap:active,.bh-step:active,.bh-kpi:active,.bh-month:active{transform:scale(.98)}

#home-screen.bh-on svg{flex:none}
#bh-hero svg,#bh-day svg,#bh-after svg,#bh-gaps-host svg,.bh-check svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
:is(.bh-btn,.bh-gap,.bh-step,.bh-first,.bh-call,.bh-kpi,.bh-month,.bh-check):focus-visible{outline:3px solid var(--bh-brass);outline-offset:2px}

/* Cartões abaixo do topo */
#bh-day,#bh-after{display:grid;gap:12px;margin-top:14px}
#bh-after:empty{display:none}
.bh-card{min-width:0;padding:14px;border:1px solid var(--bh-line);border-radius:22px;background:var(--bh-paper);color:var(--bh-ink)}
.bh-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:2px 8px;margin-bottom:10px}
.bh-head h2{margin:0;font-size:1rem;font-weight:850}
.bh-head small{color:var(--bh-muted);font-size:.76rem;font-weight:650}
.bh-muted{margin:0;color:var(--bh-muted);font-size:.82rem}


.bh-gaps{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:8px}
.bh-gap{display:grid;justify-items:start;gap:1px;min-height:52px;padding:9px 11px;border:1.5px dashed #5aa47c;border-radius:14px;background:#f1f8f3;color:var(--bh-ink);font:inherit;text-align:left;cursor:pointer}
.bh-gap b{font-size:.98rem;font-variant-numeric:tabular-nums}
.bh-gap small{color:#2d6b4b;font-size:.72rem;font-weight:750}

.bh-back{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid #f0eadb}
.bh-back:nth-child(2){border-top:0}
.bh-back .bh-ava{width:38px;height:38px;font-size:.8rem}
.bh-back-who{display:grid;flex:1;min-width:0}
.bh-back-who strong{overflow:hidden;font-size:.92rem;white-space:nowrap;text-overflow:ellipsis}
.bh-back-who small{color:#9a3f2d;font-size:.76rem;font-weight:700}
.bh-call{display:flex;align-items:center;gap:6px;flex:none;min-height:38px;padding:0 13px;border-radius:999px;background:#e5f4ea;color:#17683f;font-size:.82rem;font-weight:850;text-decoration:none}
.bh-back .bh-muted{flex:none;font-size:.74rem}


.bh-step{display:flex;align-items:center;gap:10px;width:100%;padding:10px 0;border:0;border-top:1px solid #f0eadb;background:none;color:var(--bh-ink);font:inherit;text-align:left;cursor:pointer}
.bh-head+.bh-step{border-top:0}
.bh-step-ic{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:var(--bh-navy);color:var(--bh-brass)}
.bh-step.is-done .bh-step-ic{background:#e3f2e9;color:var(--bh-green)}
.bh-step-copy{display:grid;flex:1;min-width:0}
.bh-step-copy strong{font-size:.92rem}.bh-step-copy small{color:var(--bh-muted);font-size:.78rem}
.bh-step>svg{color:var(--bh-muted)}
.bh-first{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;margin-top:10px;border:0;border-radius:16px;background:linear-gradient(180deg,#f4cb4c,#e1ad28);color:#1c1606;font:inherit;font-size:.98rem;font-weight:900;cursor:pointer}
.bh-first svg{stroke-width:2.4}

/* Lista "Hoje" já existente, no mesmo tom */
#home-screen.bh-on .barber-today-panel{margin-top:12px;border:1px solid var(--bh-line);border-radius:22px;background:var(--bh-paper)}
#home-screen.bh-on #barber-today-title{font-family:Literata,Georgia,serif}

@media (prefers-reduced-motion:reduce){.bh-btn,.bh-gap,.bh-step,.bh-kpi,.bh-check{transition:none}.bh-undo{animation:none}}
@media (max-width:350px){
  #workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-home-hero{padding:0 14px 18px}
  .bh-next{padding:12px}.bh-next-actions{grid-template-columns:1fr}
  .bh-kpi{padding:10px}.bh-kpi b{font-size:1.3rem}.bh-kpi-l{font-size:.74rem}.bh-kpi-l i{width:26px;height:26px}
}

/* Lote 3 — mesma estrutura da Home do Professor */
.bh-sub{max-width:28ch;margin:0;color:rgba(255,253,248,.84);font-size:.92rem;line-height:1.4;text-shadow:0 1px 10px rgba(0,0,0,.3)}
.bh-kpis4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%;margin-top:12px}
.bh-kpi{display:grid;align-content:start;gap:2px;min-width:0;min-height:108px;padding:12px;border:1px solid rgba(232,199,125,.28);border-radius:20px;background:rgba(10,22,38,.62);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fffdf8;font:inherit;text-align:left;cursor:pointer;transition:transform 140ms ease}
.bh-kpi-l{display:flex;align-items:center;gap:8px;font-size:.8rem;font-weight:800;line-height:1.2}
.bh-kpi-l i{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:10px;background:rgba(212,168,83,.16);color:var(--bh-brass2)}
#bh-hero .bh-kpi-l svg{width:16px;height:16px}
.bh-kpi b{margin-top:6px;font-size:1.55rem;font-weight:800;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.1}
.bh-kpi small{color:rgba(255,253,248,.72);font-size:.72rem;font-weight:700}
.bh-kpi small em{font-style:normal;font-weight:850}.bh-kpi small em.is-up{color:#7fd6a4}.bh-kpi small em.is-down{color:#f0a48f}

.bh-attn{display:grid;gap:4px}
.bh-attn-top{display:flex;align-items:center;gap:11px;margin-bottom:4px}
.bh-attn-ic{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;background:#f8e9d0;color:#8a5a12}
.bh-attn-copy{display:grid;min-width:0}
.bh-attn-copy strong{font-size:.95rem}.bh-attn-copy small{color:var(--bh-muted);font-size:.78rem}
.bh-attn .bh-back:nth-child(2){border-top:1px solid #f0eadb}

#bh-gaps-host:empty{display:none}
#bh-gaps-host{margin-top:6px;padding-top:12px;border-top:1px solid #f0eadb}
#bh-gaps-host .bh-head{margin-bottom:8px}
#bh-gaps-host h3{margin:0;font-size:.92rem;font-weight:850}
#bh-gaps-host .bh-gaps{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))}
#bh-gaps-host .bh-gap{min-height:46px;padding:7px 10px}

.bh-row{display:flex;align-items:center;gap:8px}
.bh-row>.barber-timeline-item{flex:1;min-width:0}
.bh-check{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1.6px solid var(--bh-navy);border-radius:50%;background:#f3f5f8;color:var(--bh-navy);cursor:pointer;transition:transform 140ms ease}
.bh-check:active{transform:scale(.94)}.bh-check:disabled{opacity:.5}

.bh-month{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:62px;padding:12px 16px;border:1px solid var(--bh-line);border-radius:18px;background:var(--bh-paper);color:var(--bh-ink);font:inherit;text-align:left;cursor:pointer}
.bh-month span{display:grid;gap:2px;min-width:0}
.bh-month small{color:var(--bh-muted);font-size:.8rem;font-weight:700}
.bh-month strong{font-size:1rem;font-variant-numeric:tabular-nums}
.bh-month svg{transition:transform 200ms ease}
.bh-month[aria-expanded="true"] svg{transform:rotate(90deg)}
#home-screen.bh-on:not(.bh-month-open) #bm-month,#home-screen.bh-on:not(.bh-month-open) #bm-evolution{display:none!important}

.bh-undo{position:fixed;left:50%;bottom:calc(100px + env(safe-area-inset-bottom));z-index:60;display:flex;align-items:center;gap:4px;width:min(calc(100vw - 24px),436px);padding:8px 8px 8px 16px;border-radius:16px;background:var(--bh-navy,#0d1b2e);color:#fffdf8;font-size:.9rem;box-shadow:0 18px 40px rgba(0,10,20,.35);transform:translateX(-50%);animation:bh-up 220ms ease both}
.bh-undo[hidden]{display:none}
.bh-undo span{flex:1;min-width:0}
.bh-undo button{min-height:44px;padding:0 12px;border:0;border-radius:10px;background:transparent;color:#f0c768;font:inherit;font-weight:850;cursor:pointer}
@keyframes bh-up{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}

/* Lista "Hoje" no tamanho do Professor; com ✓, o selo "Aguardando finalização" sai (o próprio ✓ diz isso) */
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-item{grid-template-columns:40px 10px 36px minmax(0,1fr) auto 8px;gap:7px;min-height:72px;padding:10px 0;border-bottom-color:#f0eadb}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-time strong{font-size:.9rem}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-copy strong{font-size:.9rem;color:var(--bh-ink)}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-copy small{margin-top:2px;font-size:.76rem}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-status{max-width:118px;gap:5px}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-status .status-pill{padding:4px 9px;font-size:.64rem}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .barber-timeline-status>small{font-size:.64rem}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row{border-bottom:1px solid #f0eadb}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row:last-child{border-bottom:0}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row>.barber-timeline-item{grid-template-columns:40px 10px 36px minmax(0,1fr) auto;border-bottom:0}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row .status-pill,#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row .barber-timeline-item>i{display:none}

/* Atenção necessária: cartão claro, como no Professor */
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .ta-home{border-color:var(--bh-line);background:var(--bh-paper);box-shadow:0 12px 30px rgba(0,0,0,.22);color:var(--bh-ink)}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .ta-home h2,#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .ta-home-row{color:var(--bh-ink)}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .ta-home-cta{color:var(--bh-navy)}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row .barber-timeline-status{max-width:78px}
#workspace:is([data-profession="barber"],[data-profession="other"]) #home-screen.bh-on .bh-row .barber-timeline-status>small{white-space:normal;text-align:right;line-height:1.2}
