/* Estilos próprios do app-inquilino. Os tokens e as primitivas vêm de css/tokens.css (gerado).

   Densidade deste app: calma e guiada. Diferente do admin (denso e operacional), aqui a pessoa
   entra poucas vezes, num momento de ansiedade, e precisa de uma resposta clara por tela. */

/* ===== Autenticação ===== */

.auth-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: var(--s-4);
  background: radial-gradient(120% 130% at 50% -10%, rgba(34, 197, 94, .2), transparent 60%), var(--pine-2);
}
.auth-card {
  width: min(400px, 100%); background: #fff; border-radius: 22px; padding: var(--s-6);
  box-shadow: var(--shadow-lift);
}
.auth-logo { display: block; margin: 0 auto var(--s-4); }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; text-align: center; }
.auth-card > p { color: var(--muted); font-size: 14px; margin: 0 0 var(--s-5); text-align: center; }
.auth-card .btn { width: 100%; }
.auth-footer { text-align: center; margin: var(--s-4) 0 0; }

.consent {
  display: flex; gap: var(--s-3); align-items: flex-start;
  background: var(--porcelain); border-radius: 14px; padding: var(--s-3) var(--s-4);
  font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer;
}
.consent input {
  width: 20px; height: 20px; min-height: 20px; flex-shrink: 0; margin-top: 1px; accent-color: var(--moss);
}

/* ===== Estrutura ===== */

.topbar {
  background: var(--pine-2); color: var(--porcelain);
  padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  flex-wrap: wrap;
  position: sticky; top: 0; z-index: 20;
}
.topbar-brand {
  font-family: var(--display); font-weight: 700; font-size: 18px;
  display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0;
}
.topbar-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.topbar-actions .btn { min-height: 40px; padding: 8px 16px; font-size: 13.5px; white-space: nowrap; }
@media (pointer: coarse) { .topbar-actions .btn { min-height: var(--touch); } }
.btn-signout { background: transparent; color: var(--porcelain); border: 1px solid var(--line-d); }
.btn-signout:hover { background: rgba(255, 255, 255, .1); }

/* O que sobrou no cabeçalho é a marca e o "Sair": em telas estreitas os dois cabem lado a lado. A
   regra que empilhava as ações numa linha própria (docs/auditoria-plataforma.md, UX-INQ-06) saiu
   junto com o botão de WhatsApp que a motivava — o canal agora é a bolinha flutuante. */

main { max-width: 780px; margin: 0 auto; padding: var(--s-5) var(--s-4) var(--s-8); }
.cards { display: flex; flex-direction: column; gap: var(--s-4); }

.card-title { font-size: 17px; margin: 0; }
.card-subtitle {
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: var(--s-5) 0 var(--s-2); font-family: var(--sans); font-weight: 600;
}

/* ===== Jornada, o centro da tela ===== */

.card-journey {
  background: linear-gradient(160% 120% at 100% 0%, rgba(34, 197, 94, .1), transparent 55%), #fff;
}
.journey-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); flex-wrap: wrap; }
.journey-eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 600; margin: 0 0 4px;
}
.journey-headline { font-size: clamp(20px, 3.6vw, 26px); margin: 0; line-height: 1.2; }
.journey-subline { color: var(--muted); font-size: 14.5px; margin: var(--s-2) 0 0; max-width: 52ch; }

.journey-progress { margin-top: var(--s-4); }
.journey-progress-bar {
  height: 8px; background: var(--porcelain-2); border-radius: 100px; overflow: hidden;
}
.journey-progress-bar span {
  display: block; height: 100%; background: var(--moss); border-radius: 100px;
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
@media (prefers-reduced-motion: reduce) { .journey-progress-bar span { transition: none; } }
.journey-progress-label { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.journey-expectation {
  font-size: 13.5px; color: var(--moss-text); background: var(--cream);
  border-radius: 12px; padding: 10px 14px; margin: var(--s-4) 0 0;
}

.timeline { list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.timeline-step { display: flex; gap: var(--s-3); padding-bottom: var(--s-4); position: relative; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
  content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--line);
}
.timeline-step:last-child::before { display: none; }
.timeline-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--porcelain-2); color: var(--muted); border: 2px solid #fff;
}
.timeline-done .timeline-dot { background: var(--moss); color: #fff; }
.timeline-current .timeline-dot { background: var(--gold); color: var(--pine); }
.timeline-blocked .timeline-dot { background: var(--coral); color: #fff; }
.timeline-content { padding-top: 3px; }
.timeline-label { font-weight: 600; margin: 0; font-size: 14.5px; }
.timeline-pending .timeline-label { color: var(--muted); font-weight: 500; }
.timeline-note { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; max-width: 52ch; }
.timeline-owner { margin-top: 8px; }

.journey-identity {
  margin: var(--s-5) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.journey-identity-sep { opacity: .5; }

/* ===== O que depende de você ===== */

.todo-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.todo-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  background: var(--porcelain); border-radius: 14px; padding: var(--s-3) var(--s-4); flex-wrap: wrap;
}
.todo-item-title { font-weight: 600; margin: 0; font-size: 14.5px; }
.todo-item-hint { color: var(--muted); font-size: 13px; margin: 3px 0 0; max-width: 48ch; }
.todo-item .btn { flex-shrink: 0; }

.todo-clear { display: flex; align-items: center; gap: var(--s-3); }
.todo-clear-icon {
  width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--moss-text);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.todo-clear-title { font-weight: 600; margin: 0; font-size: 14.5px; }
.todo-clear-hint { color: var(--muted); font-size: 13px; margin: 2px 0 0; }

/* ===== Contrato ===== */

.contract-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s-3); margin: var(--s-4) 0;
}
.figure { background: var(--porcelain); border-radius: 14px; padding: var(--s-3) var(--s-4); }
.figure-value {
  font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--pine);
  font-variant-numeric: tabular-nums;
}
.figure-label { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.kv-list { margin: 0; display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 10px var(--s-4); }
.kv-list dt { color: var(--muted); font-size: 13.5px; }
.kv-list dd { margin: 0; font-size: 14px; }
@media (max-width: 520px) {
  .kv-list { grid-template-columns: 1fr; gap: 2px; }
  .kv-list dd { margin-bottom: 10px; }
}

/* ===== Morada 90 ===== */

.morada90-banner {
  background: var(--cream); border-radius: 16px; padding: var(--s-4); margin: var(--s-3) 0 var(--s-4);
}
.morada90-banner.is-over { background: rgba(255, 106, 0, .09); }
.morada90-count {
  font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--pine); margin: 0;
}
.morada90-deadline { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.inline-note {
  background: var(--cream); color: var(--moss-text); border-radius: 12px;
  padding: 10px 14px; font-size: 13.5px; margin-top: var(--s-3);
}

/* ===== Documentos e assistência ===== */

.doc-list, .assist-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.doc-item, .assist-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--line);
}
.doc-item:last-child, .assist-item:last-child { border-bottom: none; }
.assist-item { justify-content: space-between; }
.doc-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--porcelain-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doc-text { flex: 1; min-width: 0; }
.doc-type { font-weight: 600; margin: 0; font-size: 14px; }
.doc-meta, .assist-meta { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; word-break: break-word; }
.assist-title { font-weight: 600; margin: 0; font-size: 14px; }
.assist-desc { color: var(--muted); font-size: 13px; margin: 2px 0 0; max-width: 46ch; }

/* ===== FAQ ===== */

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: none; }
.faq-question {
  cursor: pointer; padding: var(--s-3) 0; font-weight: 600; font-size: 14.5px;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: var(--touch);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+'; font-size: 20px; color: var(--muted); font-weight: 400; flex-shrink: 0; line-height: 1;
}
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer { color: var(--muted); font-size: 13.5px; margin: 0 0 var(--s-3); max-width: 60ch; }

/* ===== Impressão do resumo do contrato ===== */

@media print {
  .topbar, .no-print, .card-journey, .card-todo, .card-morada90,
  .card-documents, .card-assistance, .card-faq, .toast-host { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; }
}

/* ===== Limites da garantia ===== */

.limites { margin: var(--s-4) 0; border-top: 1px solid var(--line); padding-top: var(--s-3); }
.limites-titulo {
  cursor: pointer; font-weight: 600; font-size: 14px; list-style: none;
  display: flex; align-items: center; justify-content: space-between; min-height: var(--touch);
}
.limites-titulo::-webkit-details-marker { display: none; }
.limites-titulo::after { content: '+'; font-size: 18px; color: var(--muted); }
.limites[open] .limites-titulo::after { content: '−'; }

.limites-lista { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.limites-lista li { display: flex; flex-direction: column; gap: 2px; }
.limites-lista strong { font-size: 14px; font-weight: 600; }
.limites-lista span { color: var(--muted); font-size: 13.5px; max-width: 68ch; }
