:root {
  --void: #070605;
  --ink: #100e0c;
  --panel: #161210;
  --panel-2: #1c1814;
  --line: rgba(232,195,154,.16);
  --gold: #e8c39a;
  --gold-2: #c9a078;
  --gold-dim: #8a6d4e;
  --cream: #f4ead8;
  --muted: #9a8e80;
  --green: #7dcea0;
  --red: #e07a6a;
  --white: #fbf6ee;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Outfit", system-ui, sans-serif;
  --shadow: 0 30px 80px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--void); color: var(--cream); }
body { font-family: var(--sans); min-height: 100vh; letter-spacing: -.01em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wordmark {
  font-family: var(--serif); font-size: 28px; font-weight: 500;
  letter-spacing: -.03em; text-decoration: none; color: var(--gold);
  display: inline-flex; align-items: baseline; gap: 10px;
}
.wordmark em { font-style: italic; font-weight: 400; color: var(--cream); }
.wordmark small {
  font-family: var(--sans); font-size: 10px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold-dim); font-weight: 500;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none; font-weight: 500;
  border-radius: 999px; padding: 12px 22px; font-size: 14px;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #1a120c; }
.btn-ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.btn-ink { background: var(--cream); color: var(--ink); }
.btn-green { background: #244033; color: var(--green); }
.btn-danger { background: #3a1e1a; color: var(--red); }
.btn-copper { background: #5a3a22; color: var(--gold); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ===== LANDING ===== */
.lp { background: var(--void); color: var(--cream); }
.lp-nav {
  position: absolute; z-index: 5; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 6vw;
}
.lp-nav nav { display: flex; gap: 22px; align-items: center; }
.lp-nav nav a { text-decoration: none; font-size: 13px; color: var(--cream); opacity: .8; }

.hero-full {
  position: relative; min-height: 100vh; display: grid; align-items: end;
  overflow: hidden;
}
.hero-full img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.hero-full .veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,6,5,.35) 0%, rgba(7,6,5,.15) 35%, rgba(7,6,5,.88) 100%),
    linear-gradient(90deg, rgba(7,6,5,.55), transparent 55%);
}
.hero-copy {
  position: relative; z-index: 2; padding: 0 6vw 8vh; max-width: 1100px;
}
.hero-copy .eyebrow {
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px;
}
.hero-copy h1 {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(48px, 8vw, 104px); line-height: .9; margin: 0 0 18px;
  letter-spacing: -.04em; max-width: 12ch;
  text-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.hero-copy .lead {
  font-size: 18px; max-width: 38ch; color: #e8dcc8; opacity: .88; line-height: 1.45;
}
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.sig {
  display: grid; grid-template-columns: 1.1fr .9fr; min-height: 70vh;
  background: var(--ink);
}
.sig img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }
.sig-copy { padding: 10vh 8vw; display: flex; flex-direction: column; justify-content: center; }
.sig-copy h2 {
  font-family: var(--serif); font-size: clamp(32px, 4vw, 52px); font-weight: 400;
  font-style: italic; margin: 0 0 16px; line-height: 1.05;
}
.sig-copy p { color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 36ch; }

.band {
  padding: 10vh 6vw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  background:
    linear-gradient(180deg, rgba(7,6,5,.82), rgba(7,6,5,.92)),
    url("/assets/gold.jpg") center/cover;
}
.band article {
  background: rgba(16,14,12,.72); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 24px; backdrop-filter: blur(10px);
}
.band h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; margin: 0 0 10px; color: var(--gold); }
.band p { margin: 0; color: #cbbba8; line-height: 1.45; font-size: 15px; }

.prices { padding: 8vh 6vw 10vh; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.prices article {
  border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  background: var(--panel);
}
.prices .amt { font-family: var(--serif); font-size: 40px; color: var(--gold); margin: 8px 0; }
.lp-foot {
  padding: 28px 6vw 48px; display: flex; justify-content: space-between;
  color: var(--gold-dim); font-size: 13px; border-top: 1px solid var(--line);
}

/* ===== AUTH ===== */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-photo { position: relative; overflow: hidden; }
.auth-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 100vh; }
.auth-photo .veil { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(7,6,5,.4)); }
.auth-card-wrap { display: grid; place-items: center; padding: 40px 24px; background: var(--ink); }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 40px; margin: 18px 0 8px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; }
label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dim); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--cream);
  color-scheme: dark;
}
input[type=date]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: invert(86%) sepia(18%) saturate(450%) hue-rotate(2deg) brightness(1.15);
}
.ctrl-hero { display: grid; grid-template-columns: 220px 1fr; gap: 22px; border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 18px; background: var(--panel); }
.ctrl-hero.ok { box-shadow: inset 3px 0 0 var(--green); }
.ctrl-hero.warn { box-shadow: inset 3px 0 0 var(--gold); }
.ctrl-hero.bad { box-shadow: inset 3px 0 0 var(--red); }
.ctrl-score .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dim); }
.ctrl-score .v { font-family: var(--serif); font-size: 72px; line-height: .9; margin: 8px 0; color: var(--gold); }
.ctrl-hero.bad .ctrl-score .v { color: var(--red); }
.ctrl-hero.ok .ctrl-score .v { color: var(--green); }
.ctrl-score .lab { color: var(--cream); }
.ctrl-read p { margin: 0 0 10px; }
.ctrl-read ul { margin: 0; padding-left: 18px; color: var(--muted); }
.w13 { display: flex; align-items: flex-end; gap: 6px; padding: 18px 16px 10px; min-height: 120px; }
.w13-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.w13-bar { width: 100%; max-width: 28px; background: var(--gold); border-radius: 4px 4px 0 0; min-height: 4px; }
.w13-col.neg .w13-bar { background: var(--red); }
.w13-n { font-size: 10px; color: var(--gold-dim); }
.w13-cash { font-size: 9px; color: var(--muted); height: 14px; }
.play { display: grid; gap: 10px; }
.play-item {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  background: var(--panel-2); color: inherit; text-decoration: none;
}
.play-item:hover { border-color: var(--gold); }
.play-n { font-family: var(--serif); font-size: 22px; color: var(--gold); line-height: 1; }
.play-t { font-family: var(--serif); font-size: 18px; color: var(--cream); margin-bottom: 4px; }
.play-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.vitals { display: flex; gap: 6px; align-items: flex-end; height: 64px; padding: 8px 4px 0; }
.vital { flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 56px; }
.vital i { display: block; flex: 1; max-width: 10px; border-radius: 3px 3px 0 0; }
.vital .t { background: var(--gold); }
.vital .ncg { background: var(--cream); opacity: .4; }

.steps {
  display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px;
}
.steps li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--muted); font-size: 13px;
}
.steps li.on { border-color: var(--gold); color: var(--gold); background: rgba(232,195,154,.1); }
.steps li.done { color: var(--cream); }
.steps-n { font-family: var(--serif); font-size: 16px; line-height: 1; }
.list-tools { padding: 12px 18px 8px; }
.list-scroll { max-height: 280px; overflow: auto; }
.list-scroll thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.picks { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.pick {
  font: inherit; text-align: left; color: inherit; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 16px; padding: 18px 16px;
}
.pick-k { display: block; font-family: var(--serif); font-size: 22px; color: var(--cream); font-style: italic; }
.pick-d { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.pick.on { border-color: var(--gold); background: rgba(232,195,154,.1); box-shadow: inset 0 0 0 1px var(--gold); }
.pick.on .pick-k { color: var(--gold); }
.drop {
  display: block; border: 1px dashed rgba(232,195,154,.35); border-radius: 16px;
  padding: 22px 16px; text-align: center; cursor: pointer; color: var(--muted);
  background: var(--panel-2);
}
.drop input { display: none; }
.drop-txt small { display: block; margin-top: 4px; opacity: .7; }
.drop img { max-width: 180px; max-height: 180px; margin: 12px auto 0; border-radius: 10px; display: none; }
.drop img[src] { display: block; }
input.money { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.help { font-size: 13px; color: var(--muted); margin-top: 14px; }
.help a { color: var(--gold); }

/* ===== APP ===== */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--void); }
.side {
  background:
    linear-gradient(180deg, rgba(16,14,12,.92), rgba(7,6,5,.96)),
    url("/assets/gold.jpg") 30% 20%/140%;
  border-right: 1px solid var(--line);
  padding: 22px 12px 16px; display: flex; flex-direction: column; gap: 2px;
}
.side .brand { padding: 4px 12px 18px; }
.side a {
  text-decoration: none; color: #c4b6a6; padding: 8px 12px; border-radius: 10px; font-size: 14px;
}
.side a:hover, .side a.on { background: rgba(232,195,154,.1); color: var(--gold); }
.side a.side-home { font-weight: 560; color: var(--cream); margin-bottom: 8px; }
.side a.side-home.on { color: var(--gold); }
.side-block { display: flex; flex-direction: column; gap: 1px; margin: 8px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.side-label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-dim); padding: 4px 12px 8px; font-weight: 500;
}
.side-foot a { font-size: 13px; color: #9a8e80; }
.side .grow { flex: 1; }
.side .who { font-size: 12px; color: var(--gold-dim); padding: 12px; line-height: 1.4; }
.main {
  padding: 32px 36px 80px;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(232,195,154,.08), transparent 50%),
    var(--void);
}
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.topbar h1 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 40px; margin: 0; letter-spacing: -.03em; }
.topbar p { margin: 6px 0 0; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
}
.stat .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dim); }
.stat .v { font-family: var(--serif); font-size: 28px; margin-top: 8px; color: var(--cream); }
.stat.in .v { color: var(--green); }
.stat.out .v { color: var(--red); }
.stat.warn .v { color: var(--gold); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: auto;
}
.panel h2 {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-dim);
  margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 500;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--gold-dim); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.num { font-variant-numeric: tabular-nums; font-weight: 560; color: var(--gold); }
.muted { color: var(--muted); }

.badge { display: inline-block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.b-aberta { background: rgba(232,195,154,.15); color: var(--gold); }
.b-orcamento { background: rgba(154,142,128,.18); color: var(--muted); }
.b-faturada { background: rgba(232,195,154,.18); color: var(--gold); }
.b-concluida { background: rgba(125,206,160,.15); color: var(--green); }
.b-paga { background: rgba(125,206,160,.15); color: var(--green); }
.b-vencida { background: rgba(224,122,106,.15); color: var(--red); }
.b-cancelada { background: #222; color: var(--muted); }

.flash { border-radius: 12px; padding: 11px 14px; margin: 0 0 16px; font-size: 14px; }
.flash.ok { background: #1a2a22; color: var(--green); }
.flash.err { background: #2a1614; color: var(--red); }
.flash.info { background: var(--panel-2); color: var(--cream); }
.banner-trial { background: rgba(232,195,154,.12); border: 1px solid var(--line); color: var(--gold); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.form-grid { display: grid; gap: 2px; max-width: none; width: 100%; }
.form-grid.wide { max-width: none; width: 100%; }
.editor {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--panel-2); margin: 4px 0 14px;
}
.editor-bar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.editor-bar button {
  border: 0; background: transparent; color: var(--gold); cursor: pointer;
  border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.editor-bar button:hover { background: rgba(232,195,154,.12); }
.editor-area {
  min-height: 220px; padding: 16px 18px; outline: none;
  line-height: 1.5; color: var(--cream);
}
.editor-area:empty:before {
  content: attr(data-placeholder); color: var(--muted);
}
.editor-area ul, .editor-area ol, .prose ul, .prose ol { margin: 8px 0 8px 22px; }
.editor-area p, .prose p { margin: 0 0 10px; }
.prose { color: var(--cream); line-height: 1.5; margin: 10px 0 16px; }
.prose a { color: var(--gold); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pay-sheet {
  max-width: 460px; margin: 8vh auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--shadow);
}
.pay-sheet .amt { font-family: var(--serif); font-size: 48px; color: var(--gold); margin: 8px 0; }
.pix-box { background: var(--ink); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; word-break: break-all; font-size: 13px; color: var(--cream); }

.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: -8px 0 16px; align-items: center; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--gold-dim); }
.cal-dot.in { background: var(--green); }
.cal-dot.out { background: var(--red); }
.cal-dot.warn { background: var(--gold); }
.cal-dot.late { background: #e07a6a; box-shadow: 0 0 0 3px rgba(224,122,106,.2); }
.cal-dot.ok { background: #4a7c62; }
.cal-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dim); padding: 4px 6px; }
.cal-cell {
  display: block; min-height: 92px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; text-decoration: none; color: inherit;
}
.cal-cell.empty { background: transparent; border-color: transparent; min-height: 0; }
.cal-cell.today { border-color: var(--gold); }
.cal-cell.sel { background: var(--panel-2); box-shadow: 0 0 0 1px var(--gold); }
.cal-n { font-family: var(--serif); font-size: 16px; margin-bottom: 4px; }
.cal-ev { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 6px; border-radius: 6px; margin-top: 3px; }
.cal-ev.in { background: rgba(125,206,160,.12); color: var(--green); }
.cal-ev.out { background: rgba(224,122,106,.12); color: var(--red); }
.cal-ev.warn { background: rgba(232,195,154,.12); color: var(--gold); }
.cal-ev.late { background: rgba(224,122,106,.22); color: #f0b4ac; }
.cal-ev.ok { background: rgba(74,124,98,.2); color: #a8d4bc; }
.cal-more { font-size: 10px; color: var(--muted); margin-top: 4px; }
.cal-day { min-height: 200px; }

.features { padding: 0; max-width: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.feat h3 { margin: 0 0 8px; font-family: var(--serif); color: var(--gold); font-weight: 500; }

@media (max-width: 960px) {
  .hero-copy h1 { font-size: 48px; }
  .sig, .band, .prices, .stats, .split, .app-shell, .auth-wrap, .features, .cal-wrap { grid-template-columns: 1fr; }
  .auth-photo { display: none; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .side .grow, .side .who { display: none; }
  .side-block { flex-direction: row; flex-wrap: wrap; border: 0; margin: 0; padding: 0; }
  .side-label { display: none; }
  .main { padding: 18px 14px 48px; }
  .row2, .picks, .ctrl-hero, .steps { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
}
