/* ============================================================
   Aurum Venture · design system
   Paleta da marca (warm neutrals + dourado) usada como pele;
   áreas de dados em superfície de alto contraste pra legibilidade.
   ============================================================ */
:root {
  --cream: #F2EDE3;
  --cream-2: #F7F3EB;
  --surface: #FFFFFF;
  --gold: #B89A63;
  --gold-deep: #9C7D4E;
  --gold-soft: #D6C29B;
  --mocha: #A98C6B;
  --ink: #3E362C;
  --ink-soft: #6B6052;
  --line: #E6DDCB;
  --line-soft: #EFE8DA;
  --ok: #5E7D5A;
  --warn: #B08842;
  --bad: #A6584E;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(62,54,44,.04), 0 8px 24px rgba(62,54,44,.06);
  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; color: var(--ink); margin: 0 0 .3em; letter-spacing: .2px; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--cream-2);
  border-right: 1px solid var(--line);
  padding: 26px 18px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.brand { text-align: center; padding: 6px 0 22px; }
.brand .mono {
  font-family: var(--font-head); font-size: 34px; font-weight: 700;
  letter-spacing: 6px; color: var(--gold-deep); line-height: 1;
}
.brand .wm { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--mocha); margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--line-soft); text-decoration: none; color: var(--ink); }
.nav a.active { background: var(--gold); color: #fff; box-shadow: var(--shadow); }
.nav a .ic { width: 18px; text-align: center; opacity: .9; }
.sidebar .foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12.5px; color: var(--ink-soft); }
.sidebar .foot form { margin-top: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px; gap: 16px;
}
.topbar .crumb { color: var(--ink-soft); font-size: 13px; letter-spacing: .3px; }
.topbar .right { display: flex; align-items: center; gap: 14px; }
.empresa-switch select {
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; background: var(--cream-2); cursor: pointer;
}
.who { font-size: 13px; color: var(--ink-soft); }
.content { padding: 30px 28px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head .sub { color: var(--ink-soft); font-size: 13.5px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .hd { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .hd h3 { margin: 0; }
.card .bd { padding: 18px 20px; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* stat cards */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.stat .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--mocha); }
.stat .val { font-family: var(--font-head); font-size: 32px; font-weight: 700; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.stat .hint { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- table ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--mocha); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--cream-2); }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; letter-spacing: .3px; }
.badge.ativo, .badge.concluida, .badge.done { background: #E8F0E6; color: var(--ok); }
.badge.pausado, .badge.em_andamento, .badge.doing, .badge.enviado { background: #F6ECD6; color: var(--warn); }
.badge.encerrado, .badge.pendente, .badge.todo, .badge.rascunho { background: #F0E7E5; color: var(--bad); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: .15s; }
.btn:hover { text-decoration: none; }
.btn-gold { background: var(--gold); color: #fff; box-shadow: var(--shadow); }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-link { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 12.5px; padding: 4px 6px; font-family: var(--font-body); }
.btn-link:hover { color: var(--bad); }
.btn-icon { background: none; border: 1px solid var(--line); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.btn-icon:hover { background: var(--cream-2); color: var(--ink); }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,154,99,.15); }
.field textarea { resize: vertical; min-height: 80px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { padding: 8px 10px; font-size: 13px; }

/* ---------- misc ---------- */
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }
.empty { text-align: center; color: var(--ink-soft); padding: 26px; font-size: 13.5px; }
.divider-gold { width: 44px; height: 2px; background: var(--gold); border: none; margin: 0 0 14px; }
.progress { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.tag-pill { display: inline-block; font-size: 11.5px; color: var(--mocha); background: var(--cream-2); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: none; }
.flash-erro { background: #F6E9E6; border: 1px solid #E3C6C0; color: var(--bad); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background:
  radial-gradient(1200px 500px at 50% -10%, #fff 0%, var(--cream) 55%); padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(62,54,44,.12); padding: 38px 34px; text-align: center; }
.login-card .mono { font-family: var(--font-head); font-size: 44px; font-weight: 700; letter-spacing: 8px; color: var(--gold-deep); }
.login-card .wm { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--mocha); margin: 6px 0 26px; }
.login-card .field { text-align: left; }

/* ---------- processo / etapas (progresso ao vivo) ---------- */
.proc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.proc-pct-wrap { font-family: var(--font-head); color: var(--gold-deep); line-height: 1; }
#proc-pct { font-size: 32px; font-weight: 700; }
.proc-pct-sign { font-size: 17px; font-weight: 700; margin-left: 1px; }
.proc-bar-track { height: 12px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.proc-bar-track > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 999px; transition: width .55s cubic-bezier(.34,1.2,.4,1); }
.proc-count { font-size: 12.5px; color: var(--ink-soft); margin-top: 9px; }
.etapa-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.etapa-row:last-child { border-bottom: 0; }
.check-etapa { position: relative; flex-shrink: 0; cursor: pointer; display: flex; }
.check-etapa input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-etapa .box { width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; transition: .15s; position: relative; }
.check-etapa:hover .box { border-color: var(--gold); }
.check-etapa input:checked + .box { background: var(--gold); border-color: var(--gold); }
.check-etapa input:checked + .box::after { content: '✓'; color: #fff; font-size: .82rem; position: absolute; top: 0; left: 5px; }
.etapa-titulo { flex: 1; font-size: 14px; color: var(--ink); transition: .15s; }
.etapa-row.done .etapa-titulo { text-decoration: line-through; color: var(--ink-soft); }
.etapa-del { flex-shrink: 0; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .row-2 { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 50px; }
}
