/* ===========================================================================
   Telas
   =========================================================================== */

/* --- Abertura -------------------------------------------------------------
   Flex com flex-basis, não grid auto-fit: o handoff registra que a grade
   gerava uma terceira coluna vazia em telas largas.                        */

.landing {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 56px);
  align-items: flex-start;
}

.landing__main { flex: 1 1 400px; min-width: 0; }
.landing__aside { flex: 1 1 330px; max-width: 400px; }
.landing__full { flex: 1 1 100%; }

.hero__title { margin: 18px 0 16px; }
.hero__title .red { color: var(--brand-red); }

.hero__title .under {
  color: var(--action);
  position: relative;
  white-space: nowrap;
}

.hero__title .under::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.06em;
  height: 0.16em;
  background: var(--brand-green);
  opacity: 0.55;
  border-radius: var(--r-pill);
  transform-origin: left;
  animation: drawLine 700ms var(--ease) 420ms backwards;
}

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.guarantees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px 32px;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.guarantee__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 600 14px/1.3 var(--font-ui);
  color: var(--ink-2);
  margin-bottom: 6px;
}
.guarantee__text { font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* Cartão lateral "Por onde começar". Sem position:sticky — removido a pedido
   do cliente, conforme o handoff. */
.starter { padding: 26px; }
.starter__list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.starter__foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-2);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* --- Cartão de tipo ------------------------------------------------------- */

.opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 17px;
  border-radius: var(--r-opt);
  border: 1px solid var(--line);
  background: var(--surface-alt);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease),
    border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.opt:hover { transform: translateY(-2px); box-shadow: var(--sh-card-hover); border-color: var(--action-hover-border); }
.opt[aria-pressed='true'] { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }

.opt__name { font: 700 17px/1.25 var(--font-display); color: var(--ink-2); display: block; }
.opt__desc { display: block; font-size: 13.5px; line-height: 1.5; color: var(--muted); margin-top: 4px; }

/* A regra fica em linha própria: ao lado do título ela colidia. */
.opt__rule { margin-top: 10px; color: oklch(0.48 0.018 60); }

.opt--danger { background: var(--danger-soft-bg); border-color: var(--danger-soft-border); }
.opt--danger .opt__name { color: var(--danger); }
.opt--danger .opt__desc { color: var(--denuncia-body); }
.opt--danger .opt__rule { color: var(--action-on-soft); }

.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }

/* --- Amparo legal --------------------------------------------------------- */

.legal { padding: clamp(24px, 4vw, 36px); margin-top: clamp(28px, 4vw, 48px); }
.legal__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.legal__marks { display: flex; gap: 5px; }
.legal__marks .dia { width: 8px; height: 8px; }

.legal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.legal__card {
  padding: 18px 18px 20px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-top: 4px solid var(--c, var(--line-2));
  border-radius: var(--r-inner);
}

.legal__norma { font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.04em; color: var(--c); }
.legal__title { font: 700 17px/1.25 var(--font-display); color: var(--ink-2); margin: 8px 0 7px; }
.legal__text { font-size: 13.5px; line-height: 1.6; color: var(--body); }

/* --- FAQ ------------------------------------------------------------------ */

.faq { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 48px); margin-top: clamp(28px, 4vw, 48px); }
.faq__intro { flex: 1 1 280px; max-width: 420px; }
.faq__list { flex: 1 1 460px; display: flex; flex-direction: column; gap: 10px; }

.faq__mini {
  margin-top: 22px;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
}

.acc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  box-shadow: var(--sh-soft);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  overflow: hidden;
}

.acc.is-open { border-color: var(--action-soft-border); box-shadow: var(--sh-open); }

.acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  text-align: left;
  font: 600 15.5px/1.4 var(--font-ui);
  color: var(--ink-2);
}

.acc__mark {
  width: 28px; height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink-3);
  font-size: 17px;
  line-height: 1;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
}

/* O "+" gira e vira "×". */
.acc.is-open .acc__mark { background: var(--action); color: #fff; transform: rotate(45deg); }

.acc__body { padding: 0 18px 18px; }
.acc__body p { border-top: 1px solid var(--line-3); padding-top: 14px; font-size: 14.5px; line-height: 1.65; color: var(--body); animation: riseIn 260ms var(--ease); }

/* --- Formulário ----------------------------------------------------------- */

.form__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.form__step { font: 500 12px/1.3 var(--font-mono); letter-spacing: 0.06em; color: var(--muted); }
.form__type { font: 700 15px/1.2 var(--font-display); color: var(--ink-2); }

.progress { height: 4px; background: var(--line-3); border-radius: var(--r-pill); overflow: hidden; margin-bottom: 20px; }
.progress > i { display: block; height: 100%; background: var(--action); border-radius: var(--r-pill); transition: width 220ms ease; }

.section + .section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-3); }
.section__head { display: flex; align-items: baseline; gap: 11px; }
.section__n { font: 500 13px/1 var(--font-mono); color: var(--muted); }
.section__lead { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 8px 0 20px; }

.ident-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.ident-row .opt { flex: 1 1 240px; }

.ident-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.opt[aria-pressed='true'] .ident-dot { background: var(--action); border-color: var(--action); }

.summary { border: 1px solid var(--line); border-radius: var(--r-inner); overflow: hidden; }
.summary__row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-3); }
.summary__row:last-child { border-bottom: none; }
.summary__k { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.summary__v { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--body);
}

.consent__box {
  width: 20px; height: 20px;
  flex: none;
  margin-top: 1px;
  border: 1.5px solid var(--line-2);
  border-radius: 5px;
  background: var(--surface);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
  position: relative;
}

.consent[aria-pressed='true'] .consent__box { background: var(--action); border-color: var(--action); }
.consent[aria-pressed='true'] .consent__box::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-3);
}

.form__nav-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form__hint { font-size: 13px; color: var(--muted); }
.form__foot { margin-top: 20px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* --- Confirmação ---------------------------------------------------------- */

.proto-card { padding: 26px; text-align: center; margin: 24px 0; }
.proto-code {
  font: 500 clamp(22px, 5vw, 30px) / 1.1 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 12px 0 16px;
  word-break: break-word;
}

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.step-card { padding: 18px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-inner); }
.step-card__n { font: 500 12px/1 var(--font-mono); color: var(--action); }
.step-card__t { font: 700 15.5px/1.3 var(--font-display); color: var(--ink-2); margin: 8px 0 6px; }
.step-card__d { font-size: 13px; line-height: 1.55; color: var(--muted); }

/* --- Acompanhamento ------------------------------------------------------- */

.track-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.track-bar .input { flex: 1 1 220px; font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }

.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 20px; }

.tl { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.tl__rail { display: flex; flex-direction: column; align-items: center; }

.tl__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--line-2);
  flex: none;
  margin-top: 5px;
}
.tl__line { width: 2px; flex: 1; background: var(--line-3); min-height: 22px; }

.tl.is-done .tl__dot { background: var(--action); }
.tl.is-done .tl__line { background: var(--action); }
.tl.is-now .tl__dot { background: var(--brand-orange); box-shadow: 0 0 0 4px var(--warning-soft-bg); }

.tl__body { padding-bottom: 22px; }
.tl__t { font: 700 15.5px/1.3 var(--font-display); color: var(--ink-2); }
.tl.is-todo .tl__t { color: var(--muted); }
.tl__d { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin-top: 3px; }
.tl__date { font: 500 11.5px/1.4 var(--font-mono); color: var(--muted); margin-top: 5px; }

.msg-box { padding: 16px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--r-inner); margin-bottom: 12px; }
.msg-box__meta { font: 500 11.5px/1.4 var(--font-mono); color: var(--muted); margin-bottom: 6px; }
.msg-box__text { font-size: 14px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-box--mine { background: var(--action-soft-bg-2); border-color: var(--action-soft-border); }

/* --- Painel kanban -------------------------------------------------------- */

.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel__audit { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 24px 0; }

.metric {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.metric:hover { transform: translateY(-2px); box-shadow: var(--sh-card-hover); }
.metric__v { font: 500 28px/1 var(--font-mono); color: var(--ink); }
.metric__v.is-alert { color: var(--danger); }
.metric__k { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-top: 8px; }
.metric__n { font-size: 12px; color: var(--muted); margin-top: 2px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.filter {
  padding: 9px 15px;
  min-height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font: 600 13px/1 var(--font-ui);
  color: var(--muted);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.filter:hover { border-color: var(--action-hover-border); color: var(--action); }
.filter.is-on { background: var(--action-soft-bg); color: var(--action-on-soft); border-color: var(--action-soft-border-2); }

/* Só o quadro rola na horizontal — nunca a página. */
.board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.column {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  display: flex;
  flex-direction: column;
  max-height: 72vh;
}

.column__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--line-2));
  border-radius: var(--r-inner) var(--r-inner) 0 0;
  background: var(--surface-alt-2);
}

.column__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.column__name { font: 700 14.5px/1.2 var(--font-display); color: var(--ink-2); }
.column__count { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.column__sla { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.column__body { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.column__empty { padding: 22px 8px; text-align: center; font-size: 12.5px; color: var(--muted); }

.kcard {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: var(--r-input);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--sh-card-hover); }
.kcard.is-selected { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }

/* Urgente: destaque vermelho, conforme pedido. */
.kcard.is-urgent { border-left-color: var(--brand-red); background: var(--danger-soft-bg); }
.kcard.is-urgent:hover { box-shadow: 0 10px 22px rgba(225, 53, 74, 0.18); }

.kcard.is-late { border-left-color: var(--danger); }

/* Reaberto: laranja, entre o normal e o urgente. */
.kcard.is-retorno { border-left-color: var(--brand-orange); background: var(--warning-soft-bg); }

/* Ticket interno: faixa tracejada — sinaliza circulação restrita. */
.kcard.is-interno { border-left-style: dashed; border-left-color: oklch(0.55 0.13 300); }

/* Conversa interna do comitê. */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
}

.chat__msg {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-3);
  border-radius: var(--r-input);
}

.chat__meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.chat__meta strong { color: var(--ink-3); }
.chat__text { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

.kcard__top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.kcard__proto { font: 500 11.5px/1.3 var(--font-mono); color: var(--muted); }
.kcard__text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin: 6px 0 8px;
}
.kcard__foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); }
.kcard__sla.is-late { color: var(--danger); font-weight: 700; }

/* --- Inspetor ------------------------------------------------------------- */

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(460px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -14px 0 40px rgba(60, 45, 40, 0.14);
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: riseIn 240ms var(--ease);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt-2);
}

.drawer__body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer__section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-3); }
.drawer__label { font: 600 12.5px/1.3 var(--font-ui); color: var(--ink-3); margin-bottom: 10px; display: block; }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(60, 45, 40, 0.34);
  z-index: 55;
  animation: riseIn 200ms var(--ease);
}

.fase-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--surface-alt);
  font-size: 14px;
  color: var(--body);
  margin-bottom: 8px;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.fase-btn:hover:not(:disabled) { border-color: var(--action-hover-border); }
.fase-btn__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--line-2)); flex: none; }
.fase-btn.is-current { border-color: var(--c); background: var(--surface); font-weight: 700; color: var(--ink-2); }
.fase-btn.is-past { border-style: dashed; color: var(--muted); }
.fase-btn:disabled { cursor: not-allowed; }
.fase-btn:disabled:not(.is-current):not(.is-past) { opacity: 0.45; }

.audit-list { font-size: 12.5px; color: var(--muted); }
.audit-list li { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-3); list-style: none; }
.audit-list li:last-child { border-bottom: none; }

/* --- Login ---------------------------------------------------------------- */

.login { padding: 30px 26px; }

@media (max-width: 560px) {
  .summary__row { grid-template-columns: 1fr; gap: 3px; }
  .column { flex: 0 0 84vw; }
  .drawer { width: 100vw; }
}
