:root {
  --ink: #0b0b0f;
  --surface: #14141b;
  --surface2: #1b1b24;
  --line: #2a2a35;
  --text: #ece8df;
  --muted: #9c978b;
  --gold: #d6aa4b;
  --gold-d: #a8832f;
  --ok: #5fb37c;
  --hot: #e0834a;
  --warn: #d9b34a;
  --cool: #6c9bd1;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: .01em; margin: 0 0 .4em; }
h1 { font-size: 1.7rem; margin-top: .4em; }
h2 { font-size: 1.2rem; margin-top: 1.6em; display: flex; align-items: center; gap: .5em; }
h3 { font-size: 1rem; color: var(--gold); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 64px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.count { background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; font: .8rem system-ui; padding: 1px 10px; color: var(--gold); }

.top { position: sticky; top: 0; z-index: 5; background: rgba(11,11,15,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: Georgia, serif; font-size: 1.15rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand small { color: var(--muted); font: .78rem system-ui; letter-spacing: .08em; text-transform: uppercase; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.brand.big { font-size: 1.5rem; margin-bottom: 18px; justify-content: center; }
.search { flex: 1 1 260px; display: flex; gap: 6px; order: 3; }
.search input { flex: 1; }
nav { display: flex; gap: 4px; margin-left: auto; }
nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: .92rem; }
nav a.on, nav a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.out { margin: 0; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .9rem; }

input, textarea, select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--gold-d); outline-offset: 0; border-color: var(--gold-d); }
textarea { resize: vertical; line-height: 1.45; }
textarea[readonly] { color: var(--muted); }
.search button { background: var(--surface2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0 14px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); color: var(--text); padding: 9px 16px; border-radius: 10px; font: inherit; font-size: .92rem; cursor: pointer; text-decoration: none; min-height: 40px; }
.btn:hover { border-color: var(--gold-d); text-decoration: none; }
.btn.gold { background: var(--gold); color: #17130a; border-color: var(--gold); font-weight: 600; }
.btn.gold:hover { background: #e3b95a; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.card .name { font-family: Georgia, serif; font-size: 1.1rem; color: var(--text); }
.why { margin: .5em 0 .3em; }
.draft { margin: 8px 0 10px; font-size: .98rem; background: #0f0f15; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; align-items: flex-start; gap: 12px; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.actions { margin-top: 4px; }
.prop[data-status="enviada"], .prop[data-status="recusada"], .prop[data-status="expirada"] { opacity: .65; }

.badge { display: inline-block; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); vertical-align: middle; }
.badge.st-fechando { color: #1a1306; background: var(--gold); border-color: var(--gold); }
.badge.st-quente { color: #1a0f06; background: var(--hot); border-color: var(--hot); }
.badge.st-morno { color: #1a1606; background: var(--warn); border-color: var(--warn); }
.badge.st-upsell { color: #07121a; background: var(--cool); border-color: var(--cool); }
.badge.st-cliente { color: #07170d; background: var(--ok); border-color: var(--ok); }
.src { display: inline-block; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin: 2px 4px 0 0; }

.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.chip { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--text); }
.chip b { font: 600 1.7rem Georgia, serif; }
.chip span { color: var(--muted); font-size: .85rem; }
.chip:hover { border-color: var(--gold-d); text-decoration: none; }
.chip.st-fechando { border-left-color: var(--gold); } .chip.st-quente { border-left-color: var(--hot); } .chip.st-morno { border-left-color: var(--warn); }
.chip.st-upsell { border-left-color: var(--cool); } .chip.st-cliente { border-left-color: var(--ok); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.tab { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
.tab b { color: var(--text); margin-left: 4px; }
.tab.on, .tab:hover { color: var(--text); border-color: var(--gold-d); background: var(--surface2); text-decoration: none; }
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.line:last-child { border-bottom: 0; }
.line:hover { background: var(--surface2); text-decoration: none; }
.line .name { font-family: Georgia, serif; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; color: var(--muted); }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.plain { list-style: none; padding: 0; margin: 8px 0 0; }
.plain li { padding: 3px 0; }
.timeline { list-style: none; padding: 0; margin: 12px 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 8px 0 8px 18px; display: grid; grid-template-columns: 112px auto 1fr; gap: 8px; align-items: baseline; font-size: .93rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-d); }
.timeline time { color: var(--muted); font-size: .8rem; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { color: var(--muted); font-weight: 500; font-size: .82rem; }
.tbl th.num, .tbl td.num { text-align: right; }

body.bare { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(420px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.login h1 { font-size: 1.4rem; }
.stack { display: grid; gap: 12px; margin-top: 14px; }

@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  nav { order: 2; margin-left: 0; width: 100%; overflow-x: auto; }
  .btn { flex: 1 1 auto; }
}

.contact { margin: .15em 0 .35em; font-size: .98rem; color: var(--text); display: flex; flex-wrap: wrap; gap: 2px 0; }
.contact .ph { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 600; }
.contact .em { color: var(--text); word-break: break-all; }
.contact .sep { color: var(--muted); white-space: pre; }
.line .contact { font-size: .9rem; margin: .1em 0 .2em; }

.warn { color: var(--hot); font-weight: 600; }

.tag { display: inline-block; background: #2a2210; color: var(--gold); border: 1px solid var(--gold-d); border-radius: 999px; padding: 1px 10px; font-size: .78rem; }
.ia { margin: .2em 0 .4em; }
details.read, details.mail { margin: .4em 0; }
details summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
details.mail input, details.mail textarea { margin-top: 8px; font-size: .92rem; }
.pre { white-space: pre-wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--text); margin-top: 6px; }
.check input { width: auto; }

.push { border-color: var(--gold-d); }
.push .btn { margin-top: 6px; }
