/* ═══════════════════════════════════════════════════════════
   INKHA — estilos do portal do cliente e do painel admin.
   Mesmos tokens da landing, para as áreas logadas não parecerem
   um produto de outra empresa.
   ═══════════════════════════════════════════════════════════ */

:root {
  --black: #010101;
  --navy: #15223D;
  --gold: #FBA212;
  --gray: #E7E7E7;
  --white: #FAFAFA;
  --navy-light: #1d2e52;
  --red-soft: #C0392B;
  --green: #1e8e5a;
  --muted: #6b7280;

  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Tenor Sans', sans-serif;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; }

/* ── Cabeçalho ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6%;
  background: var(--navy);
  color: var(--white);
}
.topbar .logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 900; font-size: 1.35rem; letter-spacing: .25em;
  color: var(--white); text-decoration: none;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; font-size: .85rem; }
.topbar-user { opacity: .85; }

.badge-admin {
  background: var(--gold); color: var(--black);
  padding: .15rem .5rem; border-radius: 3px;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
}

/* ── Layout ── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 2.5rem 6% 5rem; }
.wrap-narrow { max-width: 460px; }

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700; color: var(--navy);
  margin-bottom: .3rem;
}
.page-sub { color: var(--muted); margin-bottom: 2.2rem; font-size: .95rem; }

.section-h {
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 2.2rem 0 .9rem;
}

/* ── Cartões ── */
.card {
  background: #fff;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.card-marca {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700; color: var(--navy);
}
.card-meta { font-size: .82rem; color: var(--muted); }
.card.clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.clickable:hover { border-color: var(--gold); transform: translateY(-1px); }

/* ── Pílulas de status ── */
.pill {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 100px;
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
.pill-navy  { background: rgba(21,34,61,.09);   color: var(--navy); }
.pill-gold  { background: rgba(251,162,18,.16); color: #96610a; }
.pill-green { background: rgba(30,142,90,.13);  color: var(--green); }
.pill-red   { background: rgba(192,57,43,.12);  color: var(--red-soft); }
.pill-gray  { background: rgba(0,0,0,.06);      color: var(--muted); }

/* ── Linha do tempo ── */
.timeline { list-style: none; position: relative; padding-left: 1.6rem; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: .4rem; bottom: .4rem;
  width: 2px; background: var(--gray);
}
.timeline li { position: relative; padding-bottom: 1.5rem; }
.timeline li::before {
  content: ''; position: absolute; left: -1.6rem; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gray);
}
.timeline li.done::before   { background: var(--green); border-color: var(--green); }
.timeline li.atual::before  { background: var(--gold);  border-color: var(--gold);
                              box-shadow: 0 0 0 4px rgba(251,162,18,.2); }
.timeline .t-titulo { font-weight: 700; color: var(--navy); }
.timeline .t-data   { font-size: .78rem; color: var(--muted); }
.timeline .t-desc   { font-size: .9rem; color: #444; margin-top: .2rem; }

/* ── Formulários ── */
label {
  display: block; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--navy); margin-bottom: .4rem;
}
input, select, textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  font-family: inherit; font-size: .95rem;
  background: #fff; color: var(--black);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251,162,18,.15);
}
.field { margin-bottom: 1.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem;
  border: none; border-radius: var(--radius);
  background: var(--navy); color: var(--white);
  font-family: inherit; font-size: .85rem; letter-spacing: .08em;
  cursor: pointer; text-decoration: none;
  transition: background .2s, opacity .2s;
}
.btn:hover:not(:disabled) { background: var(--navy-light); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover:not(:disabled) { background: #e5940c; }
.btn-ghost {
  background: transparent; color: var(--navy);
  border: 1px solid var(--gray);
}
.btn-ghost:hover:not(:disabled) { background: rgba(0,0,0,.03); border-color: var(--navy); }
.btn-sm { padding: .45rem .9rem; font-size: .78rem; }

/* ── Avisos ── */
.alerta {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 1.2rem;
  border: 1px solid;
}
.alerta-erro  { background: rgba(192,57,43,.07); border-color: rgba(192,57,43,.3);  color: #8e2b20; }
.alerta-ok    { background: rgba(30,142,90,.07); border-color: rgba(30,142,90,.3);  color: #14653f; }
.alerta-info  { background: rgba(21,34,61,.05);  border-color: rgba(21,34,61,.18);  color: var(--navy); }

/* ── Tabela do admin ── */
.tabela-wrap { overflow-x: auto; border: 1px solid var(--gray); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  text-align: left; padding: .8rem 1rem;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: rgba(0,0,0,.02);
  border-bottom: 1px solid var(--gray); white-space: nowrap;
}
td { padding: .8rem 1rem; border-bottom: 1px solid rgba(0,0,0,.05); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: rgba(251,162,18,.05); }

/* ── Filtros / métricas ── */
.filtros { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.4rem; }
.filtros input, .filtros select { width: auto; min-width: 170px; padding: .55rem .8rem; font-size: .88rem; }

.metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.metrica { background: #fff; border: 1px solid var(--gray); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.metrica .n { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1; }
.metrica .l { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }
.metrica.alerta-sla .n { color: var(--red-soft); }

/* ── Bloco de conclusão de etapa (ação principal do admin) ── */
.bloco-concluir {
  background: rgba(251,162,18,.06);
  border: 1px solid rgba(251,162,18,.35);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.concluir-etapa-nome {
  font-size: .95rem; color: var(--navy);
  margin-bottom: 1rem; display: flex; align-items: center;
  gap: .5rem; flex-wrap: wrap;
}
.concluir-seta { color: var(--gold); font-size: 1.1rem; }
.concluir-proxima { color: var(--muted); }

.check-linha {
  display: flex; align-items: center; gap: .5rem;
  text-transform: none; letter-spacing: 0;
  font-size: .88rem; color: var(--black);
  margin-bottom: .5rem; cursor: pointer;
}
.check-linha input { width: auto; }

/* ── Estados ── */
.vazio { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.carregando { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: .9rem; }

/* ── Painel lateral (detalhe do pedido no admin) ── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(1,1,1,.45);
  display: none; z-index: 200;
}
.drawer-overlay.active { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(560px, 100%);
  background: var(--white);
  overflow-y: auto;
  padding: 2rem 2rem 4rem;
  box-shadow: -8px 0 32px rgba(0,0,0,.15);
}
.drawer-close {
  position: absolute; top: 1.2rem; right: 1.4rem;
  background: none; border: none; font-size: 1.6rem;
  cursor: pointer; color: var(--muted); line-height: 1;
}

.dados-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem 1.4rem; }
.dado .k { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dado .v { font-size: .95rem; word-break: break-word; }

.lista-arquivos { list-style: none; }
.lista-arquivos li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: .9rem;
}
.lista-arquivos li:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .wrap { padding: 1.8rem 5% 4rem; }
  .card { padding: 1.1rem 1.2rem; }
  .drawer { padding: 1.6rem 1.3rem 3rem; }
  .topbar { padding: .9rem 5%; }
  .topbar-right { font-size: .78rem; gap: .7rem; }
}
