/* Kriu Studio Semanal — identidade própria: tinta escura, papel quente, coral "kriu" e etiquetas de laboratório em mono. */
:root {
  --ink: #1D1A2F; --ink-2: #3A3654; --muted: #6B6680; --line: #E4DED3; --line-2: #EFEAE1;
  --bg: #F7F4EF; --card: #FFFFFF; --coral: #FF5A36; --coral-d: #D9401F; --coral-l: #FFE6DF;
  --lime: #D9F26B; --teal: #0E8A6C; --teal-l: #DDF3EC; --amber: #B26A00; --amber-l: #FFF1D6;
  --red: #C62F2F; --red-l: #FBE3E3; --blue: #2F6BFF; --blue-l: #E3EBFF; --violet: #7B3DEB; --violet-l: #EFE6FF;
  --r: 14px; --r-s: 9px; --sh: 0 1px 2px rgba(29,26,47,.06), 0 6px 20px -8px rgba(29,26,47,.14);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); overflow-x: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 750; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estrutura ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand small { display: block; font: 600 10px/1 var(--mono); letter-spacing: .14em; color: var(--coral); text-transform: uppercase; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip-user { font-size: 12px; background: rgba(255,255,255,.1); padding: 4px 10px; border-radius: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.btn-sair { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 20px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
main { padding: 16px 14px 110px; max-width: 1180px; margin: 0 auto; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px -10px rgba(29,26,47,.2); }
.tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 600;
  color: var(--muted); background: none; border: 0; padding: 4px 2px; border-radius: 10px; cursor: pointer; min-width: 0; position: relative; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .on { color: var(--coral-d); }
.tabbar .on svg { stroke: var(--coral); }
.badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font: 700 11px/18px var(--sans); justify-content: center; }
.tabbar .badge { position: absolute; top: 0; right: calc(50% - 22px); }

@media (min-width: 960px) {
  /* a coluna escura é pintada no fundo do grid: a barra nunca parece cortada em página longa */
  .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); background: linear-gradient(to right, var(--ink) var(--side), var(--bg) var(--side)); }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 22px 14px; overflow-y: auto; }
  .side .brand { padding: 0 8px 22px; }
  .side nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #CFCBE0; text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
  .side nav a svg { width: 19px; height: 19px; stroke: #9C97B5; }
  .side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .side nav a.on { background: rgba(255,90,54,.16); color: #fff; }
  .side nav a.on svg { stroke: var(--coral); }
  .side nav .badge { margin-left: auto; }
  .side .foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 14px 8px 0; font-size: 13px; color: #CFCBE0; }
  .side .foot b { display: block; color: #fff; }
  .side .foot button { margin-top: 10px; }
  .topbar, .tabbar { display: none; }
  main { padding: 28px 32px 60px; width: 100%; }
  h1 { font-size: 28px; }
}

/* ---------- Componentes ---------- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 16px; }
.head .t { flex: 1 1 240px; min-width: 0; }
.head .acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.kicker { font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--coral-d); margin-bottom: 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); min-width: 0; }
.card + .card { margin-top: 12px; }
.card h2 { margin-bottom: 10px; }
.grid { display: grid; gap: 12px; }
.g2, .g3, .g4 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.sp { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 14px; border-radius: 11px; font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 40px; }
.btn:hover { border-color: #CFC7B9; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.pri { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.pri:hover { background: var(--coral-d); border-color: var(--coral-d); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ok { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.warn { background: var(--amber-l); border-color: #F1D29A; color: #7A4800; }
.btn.bad { background: #fff; border-color: #EDB9B9; color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.s { padding: 6px 10px; min-height: 34px; font-size: 13px; border-radius: 9px; }
.btn.big { padding: 14px 20px; font-size: 16px; min-height: 52px; border-radius: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.full { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.rascunho { background: #EEEDF3; color: #57536B; }
.pill.aguardando { background: var(--amber-l); color: #8A5300; }
.pill.ajuste { background: #FFE5D6; color: #B03F0B; }
.pill.aprovado { background: var(--teal-l); color: #08664F; }
.pill.reprovado { background: var(--red-l); color: var(--red); }
.pill.publicado { background: var(--blue-l); color: #1F4FC4; }
.pill.pausado { background: #EEEDF3; color: #57536B; }
.pill.novo { background: var(--coral-l); color: var(--coral-d); }
.pill.conversa { background: var(--blue-l); color: #1F4FC4; }
.pill.orcamento { background: var(--amber-l); color: #8A5300; }
.pill.fechado { background: var(--teal-l); color: #08664F; }
.pill.perdido { background: #EEEDF3; color: #57536B; }
.code { font: 700 12px/1 var(--mono); background: var(--ink); color: var(--lime); padding: 4px 7px; border-radius: 6px; letter-spacing: .03em; white-space: nowrap; }
.code.ad { background: var(--violet); color: #fff; }
.code.none { background: var(--line-2); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.tag i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; background: var(--coral); }
.fmt { font: 700 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--sh); text-decoration: none; display: block; min-width: 0; }
.kpi .n { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi.hot { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.hot .l { color: #CFCBE0; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 960px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.hero { background: var(--ink); color: #fff; border-radius: 18px; padding: 18px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255,90,54,.22); }
.hero h2 { font-size: 20px; margin-bottom: 4px; position: relative; z-index: 1; }
.hero p { color: #D6D2E6; position: relative; z-index: 1; }
.hero .btn { position: relative; z-index: 1; margin-top: 14px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line-2); padding: 11px 0; display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.list > li:first-child { border-top: 0; padding-top: 2px; }
.list .grow { flex: 1; min-width: 0; }
.list a.grow { text-decoration: none; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tabs { display: flex; gap: 4px; background: #ECE7DE; padding: 4px; border-radius: 12px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--ink-2); }
.inp, textarea.inp, select.inp { width: 100%; border: 1px solid #DAD3C7; border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 42px; }
textarea.inp { min-height: 64px; resize: vertical; line-height: 1.5; }
.inp:focus { outline: 2px solid var(--coral); outline-offset: 0; border-color: var(--coral); }
.counter { font: 600 12px var(--mono); color: var(--muted); text-align: right; margin-top: 3px; }
.counter.over { color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.aviso { background: var(--amber-l); border: 1px solid #F1D29A; color: #6D4200; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.aviso.info { background: var(--blue-l); border-color: #C5D4FF; color: #1D3D99; }
.aviso.ok { background: var(--teal-l); border-color: #B7E3D5; color: #08664F; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; stroke: var(--coral); margin-bottom: 6px; }

/* ---------- Calendário ---------- */
.weeknav { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; margin-bottom: 14px; }
.weeknav .lbl { flex: 1; text-align: center; font-weight: 750; font-size: 15px; min-width: 0; }
.weeknav .lbl small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.weeknav .btn { min-width: 40px; padding: 8px; }
.cal { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.day { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-width: 0; transition: background .15s, border-color .15s; }
.day.hoje { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral-l); }
.day.alvo { background: var(--coral-l); border-color: var(--coral); border-style: dashed; }
.day .dh { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.day .dh b { font-size: 14px; }
.day .dh span { font: 600 12px var(--mono); color: var(--muted); }
.day .fer { font-size: 11.5px; font-weight: 700; color: #8A5300; background: var(--amber-l); padding: 2px 7px; border-radius: 6px; margin-bottom: 6px; display: inline-block; }
.day .vazio { font-size: 12.5px; color: #A7A1B6; padding: 6px 0; }
.pc { display: block; text-decoration: none; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--coral); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; cursor: grab; }
.pc:hover { border-color: #CFC7B9; }
.pc.arrastando { opacity: .4; }
.pc .top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.pc .tema { font-weight: 650; font-size: 13.5px; line-height: 1.35; margin-bottom: 6px; }
.pc .tag { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pc .tag i { flex: none; }
.pc .bot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: space-between; }
@media (min-width: 960px) {
  .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .day { min-height: 320px; padding: 8px; }
  .day .dh { flex-direction: column; gap: 0; }
  .pc .tema { font-size: 12.5px; }
  .pc .bot .btn-dia { display: none; }
  .pc .bot { flex-direction: column; align-items: flex-start; }
  .pc .top .fmt { font-size: 10px; }
}

/* ---------- Editor ---------- */
.ed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ed-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .ed-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.ed-bar { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; box-shadow: var(--sh); }
.ed-bar .btn { flex: 1 1 140px; }
@media (min-width: 960px) { .ed-bar .btn { flex: 0 1 auto; } }
.copybox { position: relative; }
.copybox .btn { position: absolute; top: 6px; right: 6px; }
.roteiro-linha { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.roteiro-linha:first-child { border-top: 0; }
.roteiro-linha .tm { font: 700 12px var(--mono); color: var(--coral-d); flex: 0 0 74px; padding-top: 2px; }
.linkbox { display: flex; gap: 6px; align-items: center; background: var(--bg); border: 1px dashed #CFC7B9; border-radius: 10px; padding: 8px 10px; font: 12px var(--mono); min-width: 0; }
.linkbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist li { font-size: 13px; }
.hist .quando { font: 600 12px var(--mono); color: var(--muted); white-space: nowrap; }
.comentario { background: #FFE5D6; border-left: 4px solid var(--coral); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* Prévia no formato do Instagram */
.ig { background: #fff; border: 1px solid #DBDBDB; border-radius: 12px; max-width: 380px; margin: 0 auto; overflow: hidden; font-size: 14px; color: #111; }
.ig .ih { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.ig .av { width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(var(--coral), var(--lime), var(--violet), var(--coral)); padding: 2px; }
.ig .av i { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--ink); border: 2px solid #fff; }
.ig .ih b { font-size: 13.5px; }
.ig .ih small { display: block; font-size: 11.5px; color: #737373; }
.ig .img { aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; color: #fff; position: relative; background: var(--ink); }
.ig .img.reels { aspect-ratio: 9 / 14; }
.ig .img .faixa { position: absolute; top: 16px; left: 16px; font: 700 11px var(--mono); letter-spacing: .12em; background: rgba(255,255,255,.16); padding: 4px 8px; border-radius: 6px; }
.ig .img .dots { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; letter-spacing: 3px; font-size: 10px; opacity: .8; }
.ig .img h4 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.ig .acts { display: flex; gap: 14px; padding: 10px 12px 4px; }
.ig .acts svg { width: 24px; height: 24px; stroke: #111; }
.ig .cap { padding: 4px 12px 12px; white-space: pre-line; line-height: 1.4; overflow-wrap: anywhere; }
.ig .cap .mais { color: #737373; cursor: pointer; background: none; border: 0; padding: 0; }
.ig .ad-cta { display: flex; justify-content: space-between; align-items: center; background: #EFF3FF; color: #0F4FD8; font-weight: 700; padding: 10px 12px; font-size: 13.5px; border-top: 1px solid #DBDBDB; }
.ig .ad-cta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Leads ---------- */
.funil { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.funil button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 4px; cursor: pointer; text-align: center; min-width: 0; }
.funil button b { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.funil button span { font-size: 11px; font-weight: 650; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funil button.on { border-color: var(--coral); background: var(--coral-l); }
.lead-li { text-decoration: none; display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line-2); }
.lead-li:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex: none; font-size: 14px; }
.chat { background: #ECE5DA; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto; }
.msg { max-width: 84%; padding: 7px 10px 5px; border-radius: 10px; font-size: 14px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.msg.lead { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.msg.nos { background: #DCF5C6; align-self: flex-end; border-top-right-radius: 2px; }
.msg small { display: block; text-align: right; font-size: 10.5px; color: #6E7B66; margin-top: 2px; }
.etapas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .etapas { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.etapas button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 2px; font-size: 12px; font-weight: 700; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etapas button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.kanban { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .kanban { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kanban .col { background: #EFEAE1; border-radius: 14px; padding: 8px; min-width: 0; }
.kanban .col h3 { font-size: 13px; padding: 4px 4px 8px; display: flex; justify-content: space-between; }
.kanban .kc { display: block; background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; text-decoration: none; border: 1px solid var(--line); font-size: 13px; }

/* ---------- Resultados / gráficos ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 0 0; border-bottom: 1px solid var(--line); }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.bars .b i { display: block; width: 100%; max-width: 38px; background: var(--coral); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b em { font-style: normal; font: 700 12px var(--mono); color: var(--ink-2); margin-bottom: 4px; }
.bars-x { display: flex; gap: 10px; }
.bars-x span { flex: 1; text-align: center; font: 600 11px var(--mono); color: var(--muted); padding-top: 5px; min-width: 0; white-space: nowrap; overflow: hidden; }
.hb { margin: 0; padding: 0; list-style: none; }
.hb li { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 34px; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.hb .tr { background: var(--line-2); border-radius: 4px; height: 14px; overflow: hidden; }
.hb .tr i { display: block; height: 100%; background: var(--coral); border-radius: 0 4px 4px 0; }
.hb b { font: 700 13px var(--mono); text-align: right; }
.tip { position: fixed; z-index: 90; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; pointer-events: none; box-shadow: var(--sh); max-width: 220px; }
.tbl-wrap { overflow-x: auto; max-width: 100%; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl td.n { font: 700 13px var(--mono); text-align: right; }
.decisao { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.decisao.repetir { background: var(--teal-l); color: #08664F; }
.decisao.abandonar { background: var(--red-l); color: var(--red); }
.decisao.testar { background: var(--amber-l); color: #8A5300; }
@media (max-width: 699px) {
  .tbl.resp thead { display: none; }
  .tbl.resp tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.resp td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 3px 0; text-align: right; }
  .tbl.resp td::before { content: attr(data-l); font-size: 12px; color: var(--muted); font-weight: 700; text-align: left; flex: none; }
  .tbl.resp td.n { text-align: right; }
}

/* ---------- Folha (modal) e avisos ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(29,26,47,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet h2 { margin-bottom: 12px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; padding: 22px; } }
.toasts { position: fixed; left: 12px; right: 12px; bottom: 86px; z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--sh); max-width: 420px; text-align: center; }
.toast.erro { background: var(--red); }
@media (min-width: 960px) { .toasts { bottom: 20px; left: auto; right: 20px; align-items: flex-end; } }

/* Data no formato dd/mm/aaaa por cima do seletor nativo */
.data-br { position: relative; display: block; }
.data-br .rot { display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.data-br .rot svg { width: 18px; height: 18px; stroke: var(--muted); }
.data-br input[type=date] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.data-br input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

.perm { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm th, .perm td { padding: 7px 4px; border-bottom: 1px solid var(--line-2); text-align: center; }
.perm th:first-child, .perm td:first-child { text-align: left; }
.perm .s { color: var(--teal); font-weight: 800; }
.perm .n { color: #B9B3C6; }
.sel-dias { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cad-li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) 40px; gap: 6px; align-items: center; margin-bottom: 8px; }
.cad-li .inp { padding: 8px; min-height: 40px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; }
.col-main { min-width: 0; }
.g2 > .card, .g3 > .card, .g4 > .card, .grid > .card { margin-top: 0; }
