/* ================================
   Vexchat - Clean White Theme
   Palette (aprox. da logo):
   - Orange: #FF4D00
   - Dark:   #231F20
   - Gray:   #6B7280
================================ */
:root{
  --bg:#ffffff;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --line2:#f1f5f9;
  --accent:#ff4d00;
  --accent2:#ea491a;
  --shadow: 0 10px 30px rgba(17,24,39,.08);
}

*{ box-sizing:border-box; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body{ margin:0; background:var(--bg); color:var(--text); }

.wrap{ max-width:1200px; margin:0 auto; padding:0 16px; }
.grid{ display:grid; gap:16px; grid-template-columns:1fr; padding:18px 16px 28px; }
@media(min-width:980px){ .grid{ grid-template-columns: 1.05fr .95fr; } }

/* Top bar */
.topbar{
  position:sticky; top:0; z-index:10;
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; }
.brand{ display:flex; gap:12px; align-items:center; }
.brand-logo{ height:34px; width:auto; }
.brand-title{ font-weight:900; line-height:1.1; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:2px; }
.top-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.btn{
  border:0; border-radius:12px; padding:10px 12px;
  font-weight:800; cursor:pointer;
  background:var(--accent); color:white;
}
.btn:hover{ filter: brightness(0.98); }
.btn-secondary{
  background:#fff; color:var(--text);
  border:1px solid var(--line);
}
.btn-secondary:hover{ background:#fafafa; }

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding:14px;
}
.card h2{ margin:0 0 10px; font-size:16px; }

label{ display:block; font-size:12px; color:var(--muted); margin:10px 0 6px; }

input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  outline:none;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(255,77,0,.55);
  box-shadow: 0 0 0 4px rgba(255,77,0,.10);
}
textarea{ min-height:92px; resize:vertical; }

.hint{ margin-top:6px; font-size:12px; color:var(--muted); }
.sep{ height:1px; background:var(--line2); margin:14px 0; }
.sep.soft{ background:var(--line); opacity:.8; }

.grid2{ display:grid; gap:10px; grid-template-columns: 1fr; }
@media(min-width:720px){ .grid2{ grid-template-columns: 1fr 1fr; } }
.grid3{ display:grid; gap:10px; grid-template-columns: 1fr; }
@media(min-width:720px){ .grid3{ grid-template-columns: 1fr 1fr 1fr; } }

/* Toggle row */
.row-inline{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.toggle{ display:flex; align-items:center; gap:8px; }
.toggle input{ width:18px; height:18px; }

/* Addons */
.addons{ display:grid; gap:10px; }
.addon{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
}
.addon-title{ font-weight:900; }
.addon-desc{ font-size:12px; color:var(--muted); margin:4px 0 10px; }

/* Quote */
.quote{ background:#fff; }
.quote-head{ display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:flex-start; }
.quote-brand{ display:flex; gap:12px; align-items:flex-start; }
.quote-logo{ height:34px; width:auto; margin-top:2px; }
.quote-title{ margin:0; font-size:18px; }
.quote-meta{ font-size:12px; color:var(--muted); margin-top:4px; }
.badges{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.badge{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(255,77,0,.08);
  color: #7a2b10;
  border:1px solid rgba(255,77,0,.20);
}

.quote-id{ min-width:170px; text-align:right; }
.quote-id-label{ font-size:12px; color:var(--muted); }
.quote-id-value{ font-size:18px; font-weight:900; color:var(--text); }

.tbl{ width:100%; border-collapse:collapse; font-size:13px; }
.tbl th, .tbl td{ padding:10px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
.tbl th{ font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.r{ text-align:right; }

.total-label{ font-weight:900; }
.total-value{ font-weight:900; color:var(--accent); }

.small{ font-size:12px; color:var(--muted); }

/* KPIs (internal) */
.kpis{ display:grid; gap:10px; grid-template-columns:1fr; }
@media(min-width:720px){ .kpis{ grid-template-columns: 1fr 1fr; } }
.kpi{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
}
.kpi .k{ font-size:12px; color:var(--muted); }
.kpi .v{ font-size:18px; font-weight:900; margin-top:4px; }
.kpi .s{ font-size:12px; color:var(--muted); margin-top:2px; }

/* Terms + Footer */
.terms-title{ font-weight:900; margin-bottom:6px; }
.terms ul{ margin:0; padding-left:18px; color:var(--muted); }
.terms li{ margin:6px 0; }
.footer{ font-size:12px; color:var(--muted); white-space:pre-wrap; }

/* Print */
@media print{
  .no-print{ display:none !important; }
  body{ background:#fff; }
  .wrap{ max-width:unset; margin:0; padding:0; }
  .card{ border:0; box-shadow:none; border-radius:0; }
  .kpis.internal{ display:none; } /* por padrão, oculta na impressão */
}
