/* ════════════════════════════════════════════════════════════
   O RANCHO — painel de tarefas + hub do Roger
   Identidade herdada do hub-roger.html: salão de fazenda à noite,
   lareira, madeira, couro, brasa. Tokens IDÊNTICOS (PLANO_V1 §9).
   Regras: CSP sem inline · zero emoji de interface · UMA cor de
   ação (brasa) · alvos ≥48px · grade de 8px · reduced-motion.
   ════════════════════════════════════════════════════════════ */

:root {
  /* ── DIA NO RANCHO (light) ── */
  --bg:        #efe4d2;
  --bg2:       #e7d9c2;
  --surface:   #fbf5ea;
  --surface2:  #f4ead8;
  --text:      #3a2a1b;
  --muted:     #7a6142;   /* mais escuro que o hub (#8a7256): AA pleno em texto pequeno (auditado 15/07) */
  --line:      #e0cfb4;

  --ember:     #e8590c;   /* brasa — A cor de ação */
  --fire:      #ff7a18;
  --fire-soft: #ffb35c;
  --brass:     #c9962f;
  --leather:   #8a4b2a;
  --clay:      #c06a4a;
  --pine:      #5e7d52;
  --atraso:    #c0392b;   /* atrasadas — igual ao matinal */
  --ok:        #5e7d52;

  --ember-soft: #f6dcc2;
  --brass-soft: #f3e6c4;
  --clay-soft:  #f4d9cc;
  --pine-soft:  #dfe7d4;
  --leather-soft:#ecd9c8;

  --radius: 18px;
  --glow: rgba(232, 89, 12, 0.0);
  --sombra-card: 0 2px 0 rgba(0,0,0,.04);
}

/* ── LAREIRA ACESA (dark — padrão) ── */
html.dark {
  --bg:        #17110c;
  --bg2:       #120d08;
  --surface:   #241a12;
  --surface2:  #2c2017;
  --text:      #f3e7d3;
  --muted:     #b39d80;   /* AA 6.5 sobre superfície — auditado */
  --line:      #38291c;

  --ember-soft: #3a261a;
  --brass-soft: #3a2f18;
  --clay-soft:  #3a241c;
  --pine-soft:  #233022;
  --leather-soft:#33241a;
  --atraso:    #e05a4b;   /* mais claro no escuro — contraste AA sobre superfície */

  --glow: rgba(232, 89, 12, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.sprite { display: none; }

html, body { background: var(--bg2); overflow-x: clip; max-width: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; background: transparent; border: none; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
input, select { font-family: inherit; font-size: 1rem; color: var(--text); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--fire); outline-offset: 3px; border-radius: 10px;
}
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ── palco ── */
.rancho {
  position: relative;
  overflow-x: clip;
  width: 100%;
  padding: 0 0 128px;   /* respiro pra nav de baixo + FAB */
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255,122,24,0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 12% 30%, rgba(138,75,42,0.10), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 70%, rgba(94,125,82,0.08), transparent 55%),
    var(--bg);
  min-height: 100vh;
}
.rancho::before {
  content:''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: repeating-linear-gradient(92deg,
    rgba(120,80,40,0) 0px, rgba(120,80,40,0) 26px,
    rgba(90,55,25,0.022) 27px, rgba(120,80,40,0) 29px);
  opacity: .7;
}
.rancho > * { position: relative; z-index: 1; }
.rancho::after {
  content:''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--glow), transparent 70%);
  animation: firelight 6s ease-in-out infinite;
}
@keyframes firelight { 0%,100% { opacity:.55; } 45% { opacity:1; } 70% { opacity:.7; } }

/* ── toggle tema ── */
.toggle {
  position: fixed; top: 16px; right: 16px; z-index: 1000;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--fire);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
  transition: transform .3s ease;
}
.toggle:active { transform: scale(.9); }

/* ── cabeçalho + lareira (portado do hub) ── */
header { text-align: center; padding: 48px 24px 0; }
.brand {
  font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: clamp(2.1rem, 7vw, 3.2rem); letter-spacing: .02em;
  color: var(--text); line-height: 1.05;
}
.brand .acc { color: var(--fire); font-style: italic; font-weight: 700; }
.greet {
  margin-top: 8px; font-size: .8rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}

.hearth {
  position: relative; width: 100%; max-width: 760px; margin: 16px auto 0;
  height: 84px; display: flex; align-items: flex-end; justify-content: center;
}
.logs {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 170px; height: 16px;
  background: linear-gradient(180deg, var(--leather), #2e1a0d);
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4), inset 0 2px 3px rgba(255,170,90,.25);
}
.logs::before {
  content:''; position: absolute; top:-7px; left: 20px; width: 128px; height: 14px;
  background: linear-gradient(180deg, #6f3f22, #28160b);
  border-radius: 8px; transform: rotate(-3deg);
  box-shadow: inset 0 2px 3px rgba(255,150,70,.2);
}
.fire-wrap { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  width: 150px; height: 72px; filter: blur(.4px); }
.flame {
  position: absolute; bottom: 0; left: 50%; display: block;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: bottom center; mix-blend-mode: screen;
  animation: flicker 1.6s ease-in-out infinite;
}
.flame.f1 { width: 78px; height: 70px; margin-left:-39px;
  background: radial-gradient(circle at 50% 78%, #ff9d3c 0%, #ff7a18 38%, #e8590c 62%, rgba(232,89,12,0) 78%);
  animation-duration: 1.9s; }
.flame.f2 { width: 50px; height: 54px; margin-left:-40px;
  background: radial-gradient(circle at 50% 78%, #ffd27a 0%, #ff9d3c 45%, rgba(255,122,24,0) 75%);
  animation-duration: 1.4s; animation-delay:-.4s; }
.flame.f3 { width: 46px; height: 50px; margin-left:-6px;
  background: radial-gradient(circle at 50% 78%, #ffe6a8 0%, #ffb35c 45%, rgba(255,122,24,0) 75%);
  animation-duration: 1.7s; animation-delay:-.9s; }
.flame.f4 { width: 26px; height: 36px; margin-left:-13px;
  background: radial-gradient(circle at 50% 80%, #fff3d0 0%, #ffd27a 50%, rgba(255,180,90,0) 80%);
  animation-duration: 1.2s; animation-delay:-.6s; }
@keyframes flicker {
  0%,100% { transform: translateX(-2px) scaleY(1)    scaleX(1);   opacity:.92; }
  25%     { transform: translateX(2px)  scaleY(1.08) scaleX(.94); opacity:1;   }
  50%     { transform: translateX(-1px) scaleY(.96)  scaleX(1.05);opacity:.86; }
  75%     { transform: translateX(3px)  scaleY(1.05) scaleX(.97); opacity:.97; }
}
.hearth::after {
  content:''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 110px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,140,40,.35), transparent 70%);
  animation: firelight 3.2s ease-in-out infinite; pointer-events: none;
}
.embers { position: absolute; bottom: 16px; left:0; right:0; height: 72px; pointer-events:none; }
.ember {
  position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; display: block;
  background: #ffb15c; box-shadow: 0 0 6px 1px rgba(255,150,60,.8);
  animation: rise linear infinite; opacity: 0;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(-70px) translateX(var(--drift,8px)) scale(.3); opacity: 0; }
}
.ember:nth-child(1){ left:42%; animation-duration:3.4s; animation-delay:0s;   --drift:-12px;}
.ember:nth-child(2){ left:48%; animation-duration:2.8s; animation-delay:.7s;  --drift:10px; }
.ember:nth-child(3){ left:53%; animation-duration:3.9s; animation-delay:1.3s; --drift:16px; }
.ember:nth-child(4){ left:46%; animation-duration:3.1s; animation-delay:2.0s; --drift:-8px; }
.ember:nth-child(5){ left:57%; animation-duration:4.2s; animation-delay:.4s;  --drift:6px;  }
.ember:nth-child(6){ left:39%; animation-duration:3.6s; animation-delay:1.7s; --drift:-16px;}
.mantle {
  width: 100%; max-width: 760px; margin: 4px auto 0; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--ember) 30%, var(--fire) 50%, var(--ember) 70%, transparent);
  opacity: .55; animation: firelight 4s ease-in-out infinite;
}

/* ── layout ── */
.wrapper { max-width: 680px; margin: 0 auto; padding: 8px 20px 0; }
.tela { animation: sobe .4s ease both; }
@keyframes sobe { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform:none; } }

.fala { font-size: 1rem; color: var(--text); margin: 24px 2px 4px; }
.fala b { color: var(--fire); }
.nota { font-size: .8rem; color: var(--muted); margin: 0 2px 16px; }
.vazio { font-size: .9rem; color: var(--muted); padding: 16px 2px; }
.aviso-off {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 12px;
  background: var(--brass-soft); color: var(--text); font-size: .8rem;
  border: 1px dashed var(--brass);
}

/* rótulo de seção — ferro de marcar (do hub, sem estilo inline) */
.label { display: flex; align-items: center; gap: 12px; margin: 32px 0 14px; }
.iron {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.18);
}
.iron-ember   { background: var(--ember-soft);   color: var(--ember); }
.iron-brass   { background: var(--brass-soft);   color: var(--brass); }
.iron-pine    { background: var(--pine-soft);    color: var(--pine); }
.iron-clay    { background: var(--clay-soft);    color: var(--clay); }
.iron-atraso  { background: var(--clay-soft);    color: var(--atraso); }
.label h2 {
  font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: 1.35rem; letter-spacing: .02em; color: var(--text);
}
.label .ln { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.label .cnt { font-size: .7rem; color: var(--muted); letter-spacing: .1em; }

/* ── tarefa (a "rês") ── */
.rez {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--ember);
  border-radius: 14px; padding: 12px 14px 12px 12px; margin-bottom: 10px;
  box-shadow: var(--sombra-card);
  animation: sobe .35s ease both;
}
.rez-atrasada { border-left-color: var(--atraso); }
.rez-proxima  { border-left-color: var(--brass); }
.rez-feita    { border-left-color: var(--ok); opacity: .62; }
.rez-feita .rez-titulo { text-decoration: line-through; }

.marca {
  width: 48px; height: 48px; flex-shrink: 0; margin: -2px 0 0 -4px;
  display: flex; align-items: center; justify-content: center;
}
.marca::before {
  content: ''; position: absolute;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--muted); background: transparent;
  transition: background .15s, border-color .15s;
}
.marca .ic { position: relative; color: transparent; transition: color .15s; }
.rez-feita .marca::before { background: var(--ok); border-color: var(--ok); }
.rez-feita .marca .ic { color: #fff; }
.marca:active { transform: scale(.88); }

/* o corpo é um botão (abre o editor) — tem que parecer texto, não botão */
.rez-corpo {
  flex: 1; min-width: 0; padding: 4px 0 0; text-align: left;
  background: transparent; border: none; font-family: inherit; color: inherit;
  cursor: pointer; border-radius: 10px; transition: opacity .15s;
}
.rez-corpo:active { opacity: .6; }
.rez-titulo { font-size: 1rem; font-weight: 600; line-height: 1.4; overflow-wrap: break-word; }
.rez-chips { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rez-chips:empty, .rez-contexto:empty { display: none; }
.rez-contexto { font-size: .8rem; color: var(--muted); margin-top: 5px; line-height: 1.45; overflow-wrap: break-word; }

.chip {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: .04em; padding: 2px 9px; border-radius: 20px; white-space: nowrap;
}
.chip-data   { background: var(--atraso); color: #fff; }
.chip-hora   { background: var(--brass); color: #221a06; }
.chip-repete { background: var(--leather-soft); color: var(--leather); }
html.dark .chip-repete { color: #d8a87e; }
.chip-area-casa    { background: var(--pine-soft);  color: var(--pine); }
.chip-area-mirian  { background: var(--clay-soft);  color: var(--clay); }
.chip-area-pz      { background: var(--ember-soft); color: var(--ember); }
.chip-area-pessoal { background: var(--brass-soft); color: #7a5a14; }
html.dark .chip-area-casa   { color: #9fc08a; }
html.dark .chip-area-mirian { color: #e0a183; }
html.dark .chip-area-pz     { color: #ffa25e; }
html.dark .chip-area-pessoal{ color: #e8c46a; }

/* botão de detalhe (arquivo/preço/pago) no card — só visão Roger de colaborador */
.rez-detalhe[hidden] { display: none; }  /* display de classe vence [hidden] — trava explícita (gotcha conhecido) */
.rez-detalhe {
  width: 44px; height: 44px; flex-shrink: 0; align-self: center; margin-right: -4px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: 12px;
}
.rez-detalhe:active { transform: scale(.9); }
html.dark .rez-detalhe { color: var(--brass); }

.iron-leather { background: var(--leather-soft); color: var(--leather); }
html.dark .iron-leather { color: #c98d5f; }

/* chips de pagamento (só o Roger vê) */
.chip-pago   { background: var(--pine-soft);  color: var(--ok); }
.chip-apagar { background: var(--clay-soft);  color: var(--atraso); }
html.dark .chip-pago   { color: #9fc08a; }
html.dark .chip-apagar { color: #e0a183; }

/* ── gates ── */
.gate {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--brass); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--sombra-card);
}
.gate strong { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); margin-bottom: 3px; }
.gate p { font-size: .95rem; line-height: 1.45; }

/* ── cards de app (o hub absorvido) ── */
.card {
  display: block; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 16px; color: var(--text);
  box-shadow: var(--sombra-card);
  transition: transform .3s cubic-bezier(.34,1.4,.64,1), box-shadow .3s, border-color .25s;
}
.card:active { transform: scale(.985); }
.card:hover { transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(40,20,5,.28), 0 0 24px -6px rgba(255,122,24,.35);
  border-color: var(--fire); }

.strip { display: block; height: 56px; position: relative; overflow: hidden; }
.strip::after {
  content:''; position: absolute; inset: -50%;
  background: radial-gradient(circle, rgba(255,225,180,.5), transparent 52%);
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer {
  0%,100% { transform: translate(-38%,-18%); opacity:.35; }
  50%     { transform: translate(38%,18%);   opacity:.7;  }
}
.pat-dots  { background-image: radial-gradient(circle, rgba(255,240,220,.5) 1.5px, transparent 1.5px); background-size: 16px 16px; }
.pat-grid  { background-image: linear-gradient(rgba(255,240,220,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,240,220,.25) 1px, transparent 1px); background-size: 22px 22px; }
.pat-rope  { background-image: repeating-linear-gradient(45deg, rgba(255,235,210,.18) 0 6px, transparent 6px 12px); }
.pat-plank { background-image: repeating-linear-gradient(90deg, rgba(60,30,10,.10) 0 1px, transparent 1px 38px); }

.strip-app  { background-color: #b3470c; background-image: linear-gradient(135deg, #ff9d3c 0%, #e8590c 55%, #9a3412 100%); }
.strip-dash { background-color: #a4782a; background-image: linear-gradient(135deg, #e6b75a 0%, #c9962f 50%, #8a5a18 100%); }
.strip-love { background-color: #a55840; background-image: linear-gradient(135deg, #d98a6a 0%, #c06a4a 50%, #8a3f2a 100%); }
.strip-pine { background-color: #567349; background-image: linear-gradient(135deg, #7fa06e 0%, #5e7d52 50%, #3c5733 100%); }
.strip-wood { background-color: #7a4527; background-image: linear-gradient(135deg, #a9714a 0%, #8a4b2a 50%, #4d2914 100%); }

.card .body { display: flex; align-items: center; gap: 14px; padding: 12px 16px 14px; }
.mono {
  width: 52px; height: 52px; border-radius: 14px; margin-top: -34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.45rem;
  background: var(--surface); position: relative; z-index: 2;
  box-shadow: 0 6px 16px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,180,90,.1);
}
.mono-app  { color: var(--ember); }
.mono-dash { color: var(--brass); }
.mono-love { color: var(--clay); }
.mono-pine { color: var(--pine); }
.mono-wood { color: var(--leather); }
html.dark .mono-wood { color: #c98d5f; }

.card .txt { flex: 1; min-width: 0; }
.card .txt strong { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.card .txt span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.card .seta { color: var(--muted); opacity: .5; }
.card:hover .seta { color: var(--fire); opacity: 1; }

.pill {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); background: rgba(255,255,255,.92);
}
.pill-live { color: #2d6a2d; }
.pill-live::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%;
  background:#3fa63f; margin-right:5px; vertical-align: middle; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63,166,63,.6); } 70% { box-shadow: 0 0 0 7px rgba(63,166,63,0); } 100% { box-shadow: 0 0 0 0 rgba(63,166,63,0); }
}
.pill-proto { color: #9a5b18; }
.pill-soon  { color: #5a6b3c; }

/* ── rodapé ── */
footer { text-align: center; padding: 48px 24px 0; }
footer .quote {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1.1rem; color: var(--muted); max-width: 440px; margin: 0 auto 12px;
}
footer .sig { font-size: .72rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
footer .sig b { color: var(--fire); }

/* ── FAB (brasa — a ação da tela) ── */
.fab {
  position: fixed; right: 18px; bottom: 88px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(160deg, var(--fire), var(--ember));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(232,89,12,.45), 0 2px 8px rgba(0,0,0,.3);
  transition: transform .2s ease;
}
.fab:active { transform: scale(.88); }

/* ── nav de baixo (zona do polegar) ── */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
  display: flex; justify-content: space-around; align-items: stretch;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(0,0,0,.18);
}
.abas[hidden] { display: none; }
.aba {
  position: relative; flex: 1; max-width: 140px; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); border-radius: 12px;
  transition: color .2s;
}
.aba[hidden] { display: none; }
.aba span { font-size: .66rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.aba.ativa { color: var(--fire); }
.aba:active .ic { transform: translateY(-2px); }
.aba .ic { transition: transform .15s ease; }
.bolha {
  position: absolute; top: 4px; right: calc(50% - 22px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
  background: var(--atraso); color: #fff; font-size: .62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── véu + folha (nova tarefa / chave) ── */
.veu[hidden], .toast[hidden], .bolha[hidden] { display: none; }  /* display das classes vence o atributo hidden — trava explícita */
.veu {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(10,6,3,.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: veuEntra .2s ease both;
}
@keyframes veuEntra { from { opacity: 0; } to { opacity: 1; } }
.folha {
  width: 100%; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  animation: folhaSobe .25s cubic-bezier(.16,1,.3,1) both;
}
@keyframes folhaSobe { from { transform: translateY(40px); opacity:.4; } to { transform: none; opacity:1; } }
.folha-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.folha h2 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.4rem; }
.folha h2 .ic-titulo { color: var(--brass); margin-right: 4px; }
.fechar { width: 48px; height: 48px; margin: -10px -10px 0 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.folha label { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.folha input, .folha select {
  display: block; width: 100%; margin-top: 5px;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; min-height: 48px;
}
.folha input:focus, .folha select:focus { border-color: var(--fire); outline: none; box-shadow: 0 0 0 3px rgba(255,122,24,.15); }
.linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* link do arquivo no popup de detalhe */
.link-arquivo {
  display: flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 0 16px; margin-bottom: 14px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--line);
  color: var(--leather); font-weight: 600; font-size: .9rem;
}
html.dark .link-arquivo { color: #d8a87e; }
.link-arquivo:active { transform: scale(.99); }
.link-arquivo[hidden] { display: none; }

/* toggle pago / não-pago */
.pago-linha { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pago-linha > span { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toggle-pago {
  position: relative; display: inline-flex; align-items: center; gap: 0;
  width: 150px; height: 40px; border-radius: 22px;
  background: var(--clay-soft); border: 1px solid var(--line);
  transition: background .2s;
}
.toggle-pago i {
  position: absolute; top: 3px; left: 3px; width: 72px; height: 32px; border-radius: 18px;
  background: var(--atraso); transition: transform .2s, background .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.toggle-pago.on { background: var(--pine-soft); }
.toggle-pago.on i { transform: translateX(72px); background: var(--ok); }
.toggle-pago b {
  flex: 1; z-index: 1; text-align: center; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; transition: color .2s;
}
.toggle-pago .lbl-nao { color: #fff; }
.toggle-pago .lbl-sim { color: var(--muted); }
.toggle-pago.on .lbl-nao { color: var(--muted); }
.toggle-pago.on .lbl-sim { color: #fff; }
.campo-roger[hidden] { display: none; }

/* leitura do detalhe (colaborador — vê valor e status, não edita) */
.det-leitura[hidden] { display: none; }
.det-linha {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px; border-top: 1px solid var(--line);
}
.det-linha:first-child { border-top: none; }
.det-linha > span { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.det-linha > b:not(.badge-status) { font-size: 1.1rem; font-weight: 700; font-family: 'Cormorant Garamond', serif; }
.det-linha > b.badge-status {
  font-family: 'DM Sans', sans-serif; font-size: .8rem; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; background: var(--clay-soft); color: var(--atraso);
}
.badge-status.pago { background: var(--pine-soft); color: var(--ok); }
html.dark .badge-status { color: #e0a183; }
html.dark .badge-status.pago { color: #9fc08a; }
.acao {
  display: block; width: 100%; min-height: 52px; margin-top: 6px;
  background: #c94a08;   /* brasa profunda: branco AA 4.7 (auditado) — o brilho vem do inset */
  color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: .03em;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,180,90,.4), 0 8px 22px rgba(232,89,12,.35);
  transition: transform .15s ease;
}
.acao:active { transform: scale(.97); }

/* excluir — discreto de propósito (ação destrutiva não compete com o Salvar) */
.excluir {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; margin-top: 10px;
  color: var(--atraso); font-size: .85rem; font-weight: 600; border-radius: 12px;
}
.excluir[hidden] { display: none; }
.excluir:active { background: var(--clay-soft); }

/* bloco de pagamento editável (Roger, tarefa de colaborador) */
.bloco-pagamento[hidden] { display: none; }
.bloco-pagamento {
  border-top: 1px solid var(--line); margin-top: 4px; padding-top: 16px;
}

/* ── toast ── */
.toast {
  position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%);
  z-index: 1200; max-width: 90vw;
  background: var(--text); color: var(--bg);
  font-size: .85rem; font-weight: 600; padding: 10px 18px; border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  animation: sobe .25s ease both;
}

@media (min-width: 720px) {
  .fab { right: calc(50% - 340px); }
}

@media (prefers-reduced-motion: reduce) {
  .flame, .ember, .rancho::after, .hearth::after, .mantle, .strip::after,
  .tela, .rez, .veu, .folha, .toast, .pill-live::before { animation: none !important; }
  .card, .fab, .acao, .marca { transition: none !important; }
}
