/* Sistema do escritório · Hilkner Advogados
   Identidade: preto, dourado, fundo off-white; Lato no texto, Cormorant Garamond nos títulos.
   Fontes hospedadas no próprio sistema (nada é carregado do Google). */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }

:root {
  --preto: #0D0D0D;
  --preto-2: #141414;
  --ouro: #C9A646;
  --ouro-claro: #F1E3A0;
  --ouro-botao: #F3E9B5;
  --ouro-texto: #7D5F17;
  --fundo: #F7F6F2;
  --fundo-2: #EFEDE6;
  --branco: #FFFFFF;
  --texto: #141414;
  --texto-2: #4A4A48;
  --texto-3: #6B6A66;
  --borda: #E4E1D8;
  --borda-2: #D6D2C6;
  --linha: #EFEDE6;
  --side-texto: #D9D6CC;
  --side-quieto: #A8A59B;
  --amber-bg: #FDF1D2; --amber-tx: #7A4A00; --amber-bd: #EBC56A;
  --green-bg: #E5F3EA; --green-tx: #1C5E36;
  --red-bg: #FDE8E6;   --red-tx: #9B1C1C;
  --blue-bg: #E7EEF8;  --blue-tx: #1F4E8C;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: var(--ouro-texto); }
a:hover { color: #5C4510; }
:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; }
img { max-width: 100%; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }

/* ---------- estrutura ---------- */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 248px; max-width: 100%; background: var(--preto); color: var(--side-texto); padding: 28px 16px 24px; display: flex; flex-direction: column; gap: 28px; }
.side-logo { display: block; padding: 0 12px; }
.side-logo img { width: 128px; height: auto; display: block; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--side-texto); text-decoration: none; font-size: 14px; }
.nav a:hover { background: #1A1812; color: var(--side-texto); }
.nav a[aria-current="page"] { color: var(--ouro-claro); background: #211D13; font-weight: 700; }
.nav-badge { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--ouro); color: var(--texto); border-radius: 999px; padding: 1px 8px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 0 12px; }
.side-foot p { margin: 0; font-size: 12px; color: var(--side-quieto); line-height: 1.6; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ouro); color: var(--texto); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.who-text { display: flex; flex-direction: column; line-height: 1.3; }
.who-name { font-size: 14px; color: #F2EFE6; }
.who-role { font-size: 12px; color: var(--side-quieto); }
.logout { margin: 0; }
.logout button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid #3A362B; color: var(--side-texto); border-radius: 8px; min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; cursor: pointer; }
.logout button:hover { border-color: var(--ouro); color: var(--ouro-claro); }

.main { flex: 999 1 560px; min-width: 0; padding: 28px 40px 48px; display: flex; flex-direction: column; gap: 24px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.search { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; padding: 0 14px; min-height: 44px; color: var(--texto-3); }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; font: inherit; background: transparent; color: var(--texto); }
.search:focus-within { outline: 3px solid var(--ouro); outline-offset: 2px; }

/* ---------- cabeçalho da página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0; font-size: 13px; color: var(--texto-3); }
.title { margin: 4px 0 0; font-family: var(--serif); font-weight: 600; font-size: 42px; line-height: 1.1; }
.rule { width: 56px; height: 2px; background: var(--ouro); margin-top: 14px; }
.lead-text { margin: 0; font-size: 14px; color: var(--texto-2); max-width: 680px; }

/* ---------- cartões ---------- */
.card { background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card--dashed { border-style: dashed; border-color: #B5B1A5; }
.card--soft { background: var(--fundo); border-color: var(--linha); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.card h2, .h2 { margin: 0; font-size: 18px; font-weight: 700; }
.card h3, .h3 { margin: 0; font-size: 15px; font-weight: 700; }
.muted { color: var(--texto-3); }
.muted-2 { color: var(--texto-2); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.m0 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-list { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.col-detail { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---------- números de resumo ---------- */
.tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.tile { flex: 1 1 150px; display: flex; flex-direction: column; gap: 4px; background: var(--branco); border: 1px solid var(--borda); border-radius: 12px; padding: 18px 20px; text-decoration: none; color: var(--texto); }
a.tile:hover { border-color: var(--ouro); color: var(--texto); }
.tile-label { font-size: 13px; color: var(--texto-2); }
.tile-num { font-size: 32px; font-weight: 700; line-height: 1.2; }
.tile-note { font-size: 12px; color: var(--texto-3); }
.tile--alert .tile-num { color: var(--red-tx); }
.stat { flex: 1 1 160px; background: var(--fundo); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 26px; font-weight: 700; }

/* ---------- listas clicáveis ---------- */
.list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.list-link { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--texto); align-items: center; }
.list-link:hover { background: var(--fundo); color: var(--texto); }
.list-link[aria-current="true"] { background: #FFFBEF; outline: 2px solid var(--ouro); }
.list-main { display: flex; flex-direction: column; min-width: 0; }
.list-title { font-weight: 700; }
.list-sub { font-size: 13px; color: var(--texto-3); }
.lines > li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.lines > li:last-child { border-bottom: 0; }
.lines { list-style: none; margin: 0; padding: 0; }
.when { flex: none; width: 96px; font-size: 13px; color: var(--texto-3); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--texto-3); font-size: 12px; font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--borda); }
.table td { padding: 10px; border-bottom: 1px solid var(--linha); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .sub { display: block; font-size: 12px; color: var(--texto-3); }
.table--min640 { min-width: 640px; }
.table--min760 { min-width: 760px; }

/* ---------- selos ---------- */
.chip { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip--amber { background: var(--amber-bg); color: var(--amber-tx); border: 1px solid var(--amber-bd); }
.chip--green { background: var(--green-bg); color: var(--green-tx); }
.chip--red { background: var(--red-bg); color: var(--red-tx); }
.chip--blue { background: var(--blue-bg); color: var(--blue-tx); }
.chip--neutral { background: var(--fundo); color: var(--texto-2); border: 1px solid var(--borda); font-weight: 400; }
.chip--gold { background: var(--ouro); color: var(--texto); }
.chip--demo { font-size: 12px; font-weight: 700; color: var(--amber-tx); background: var(--amber-bg); border: 1px solid var(--amber-bd); border-radius: 999px; padding: 4px 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- botões e formulários ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--borda-2); background: var(--branco); color: var(--texto); font: inherit; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ouro); color: var(--texto); }
.btn--primary { background: var(--preto-2); color: var(--ouro-botao); border-color: var(--preto-2); font-weight: 700; }
.btn--primary:hover { background: #000; color: var(--ouro-claro); }
.btn--danger { color: var(--red-tx); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn--pill { border-radius: 999px; min-height: 40px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--pill[aria-current="page"] { background: var(--preto-2); color: var(--ouro-botao); border-color: var(--preto-2); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: inline; margin: 0; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-row > .field, .row > .field { flex: 1 1 200px; }
.row > .field { flex: 0 1 240px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--texto-2); }
.input, .select, .textarea { font: inherit; font-size: 15px; border: 1px solid var(--borda-2); border-radius: 8px; padding: 10px 12px; background: var(--branco); color: var(--texto); width: 100%; min-height: 44px; }
.textarea { resize: vertical; min-height: 88px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--preto-2); }
details.more > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ouro-texto); }
details.more[open] > summary { margin-bottom: 10px; }

/* ---------- avisos ---------- */
.flash { border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 700; }
.flash--ok { background: var(--green-bg); color: var(--green-tx); }
.flash--erro { background: var(--red-bg); color: var(--red-tx); }
.flash--info { background: var(--blue-bg); color: var(--blue-tx); }
.notice { background: var(--fundo); border: 1px solid var(--linha); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.notice--amber { background: #FFFBEF; border-color: var(--amber-bd); }
.notice--red { background: var(--red-bg); border-color: #F3B8B1; color: var(--red-tx); }
.notice--blue { background: var(--blue-bg); border-color: #C7D6EC; color: var(--blue-tx); }
.notice p { margin: 0; }
.fase2-banner { background: var(--blue-bg); color: var(--blue-tx); font-size: 13px; font-weight: 700; text-align: center; padding: 8px 16px; }

/* ---------- quadro (kanban) ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.board-col { flex: 1 0 240px; min-width: 240px; background: var(--fundo-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.board-col h2 { margin: 0; font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; }
.board-card { background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.board-card--alert { border-color: var(--amber-bd); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- linha do tempo e etapas ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.timeline li:last-child { border-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps li { flex: 1 1 120px; background: var(--fundo); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.steps li.done { background: var(--green-bg); color: var(--green-tx); }
.steps li.current { background: #FFFBEF; outline: 2px solid var(--ouro); font-weight: 700; }
.week { display: flex; flex-wrap: wrap; gap: 10px; }
.day { flex: 1 1 160px; background: var(--branco); border: 1px solid var(--borda); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.day--today { border-color: var(--ouro); box-shadow: inset 0 3px 0 var(--ouro); }
.day h3 { margin: 0; font-size: 13px; }
.day-item { font-size: 13px; border-left: 3px solid var(--borda-2); padding-left: 8px; }
.day-item--feriado { border-color: var(--red-tx); color: var(--red-tx); }
.day-item--final { border-color: var(--preto-2); font-weight: 700; }
.day-item--interno { border-color: var(--ouro); }
.day-item--reuniao { border-color: var(--blue-tx); }
.day-item--financeiro { border-color: var(--green-tx); }

/* ---------- peça (prévia) ---------- */
.doc-preview { background: var(--branco); border: 1px solid var(--borda); border-radius: 8px; padding: 28px 32px; font-family: Georgia, serif; font-size: 15px; line-height: 1.7; display: flex; flex-direction: column; gap: 10px; }
.doc-preview h3 { font-family: var(--sans); font-size: 15px; margin: 8px 0 0; }
.doc-preview h4 { font-family: var(--sans); font-size: 14px; margin: 6px 0 0; }
.doc-preview p { margin: 0; }
.mark-conferir { background: #FFF3C4; border-left: 3px solid var(--ouro); padding: 4px 10px; font-family: var(--sans); font-size: 13px; font-weight: 700; }
.mark-bloqueio { background: var(--red-bg); border-left: 3px solid var(--red-tx); color: var(--red-tx); padding: 4px 10px; font-family: var(--sans); font-size: 13px; font-weight: 700; }
.pre { white-space: pre-line; }

/* ---------- ficha (dados) ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 24px; margin: 0; }
.facts dt { font-size: 12px; color: var(--texto-3); font-weight: 700; }
.facts dd { margin: 2px 0 0; }

/* ---------- login ---------- */
.auth-body { min-height: 100vh; background: var(--preto); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--branco); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-logo { display: block; margin: 0 auto 8px; width: 140px; }
.auth-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; max-width: 420px; }
.qr { display: block; width: 200px; height: 200px; margin: 0 auto; background: var(--branco); }
.secret { font-family: ui-monospace, monospace; font-size: 14px; background: var(--fundo); padding: 8px 10px; border-radius: 8px; word-break: break-all; }

/* ---------- fase 2: área do cliente e relatório ---------- */
.portal { min-height: 100vh; background: var(--fundo); font-size: 16px; line-height: 1.55; }
.portal-top { background: var(--preto); padding: 16px 24px; }
.portal-inner { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--side-texto); font-size: 14px; }
.portal-main { max-width: 960px; margin: 0 auto; padding: 28px 20px 48px; display: flex; flex-direction: column; gap: 20px; }
.report { background: var(--branco); border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; }
.report-head { background: var(--preto); padding: 24px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; color: var(--side-texto); }
.report-month { margin: 2px 0 0; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ouro-claro); }
.report-body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { flex: 1 1 45%; }
  .main { padding: 20px 16px 40px; }
  .title { font-size: 34px; }
  .card { padding: 18px 16px; }
  .doc-preview { padding: 18px; }
}

/* ---------- impressão (relatório da PJ) ---------- */
@media print {
  .no-print, .side, .topbar, .fase2-banner { display: none !important; }
  body { background: #fff; }
}

/* lista em forma de cartão: conteúdo alinhado à esquerda */
.card.list-link { align-items: stretch; justify-content: flex-start; }
.lines > li { align-items: baseline; }
.board-card .chip, .notice .chip { white-space: normal; }
.page-head .row { flex-wrap: nowrap; align-items: flex-end; }

/* menu recolhível no celular (só quando o script carregou) */
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu-toggle { display: none; background: none; border: 1px solid #3A362B; color: var(--ouro-claro); border-radius: 8px; min-height: 40px; padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) {
  .side { padding: 16px; gap: 16px; }
  .side-logo img { width: 92px; }
  .js .menu-toggle { display: inline-flex; align-items: center; }
  .js .side:not(.is-open) .nav, .js .side:not(.is-open) .side-foot { display: none; }
}
