/* Timber & Salt Events — warm upscale steakhouse theme.
   Bold, readable typography throughout (no thin fonts — accessibility). */
:root {
  --ink: #221d18;
  --ink-soft: #4a4239;
  --cream: #faf6ef;
  --paper: #fffdf8;
  --line: #ddd2c0;
  --brass: #9a6b23;
  --brass-dark: #7c551a;
  --green: #2e4634;
  --green-dark: #223627;
  --red: #9c3a2b;
  --amber: #b07d1e;
  --shadow: 0 2px 10px rgba(34, 29, 24, 0.12);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}
h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.4em;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
a { color: var(--brass-dark); font-weight: 700; }
button, .btn {
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--green);
  background: var(--green);
  color: #fff;
  padding: 0.5em 1.1em;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
button.secondary, .btn.secondary { background: transparent; color: var(--green); }
button.secondary:hover, .btn.secondary:hover { background: #e9e2d2; }
button.brass { background: var(--brass); border-color: var(--brass); }
button.brass:hover { background: var(--brass-dark); border-color: var(--brass-dark); }
button.danger { background: transparent; border-color: var(--red); color: var(--red); }
button.danger:hover { background: #f6e3de; }
button.small { padding: 0.25em 0.7em; font-size: 0.88rem; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
input, select, textarea {
  font: inherit;
  font-weight: 500;
  padding: 0.5em 0.6em;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
label { display: block; font-weight: 700; font-size: 0.9rem; margin: 0.7em 0 0.25em; color: var(--ink-soft); }
textarea { min-height: 4.5em; resize: vertical; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.45em 0.6em; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 800; }
.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.1rem;
}
.warn {
  background: #fdf1d7;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.error { background: #f9e4df; border: 2px solid var(--red); border-radius: var(--radius); padding: 0.8rem 1rem; font-weight: 700; }
.ok-note { background: #e4efe2; border: 2px solid var(--green); border-radius: var(--radius); padding: 0.8rem 1rem; font-weight: 700; }
.muted { color: var(--ink-soft); }
.small-text { font-size: 0.88rem; }
.badge {
  display: inline-block; padding: 0.1em 0.6em; border-radius: 999px;
  font-size: 0.8rem; font-weight: 800; background: #e9e2d2; color: var(--ink);
}
.badge.starter { background: #f3d9a4; }
.pill-status { font-weight: 800; }

/* ------------------------------------------------------------- header/nav */
header.topbar {
  background: var(--green);
  color: #fff;
  padding: 0.7rem 1.2rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center;
}
header.topbar .brand { font-family: Georgia, serif; font-weight: 700; font-size: 1.25rem; color: #fff; }
header.topbar nav { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-left: auto; }
header.topbar nav button { background: transparent; border-color: transparent; color: #fff; padding: 0.35em 0.8em; }
header.topbar nav button.active { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); }
main { max-width: 1240px; margin: 0 auto; padding: 1.2rem; }

/* ------------------------------------------------------------- pipeline */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 0.8rem; align-items: start; }
.column { background: #efe8d8; border-radius: var(--radius); padding: 0.6rem; min-height: 120px; }
.column h3 { font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0.2rem 0.2rem 0.6rem; }
.event-card {
  background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--brass);
  border-radius: 9px; padding: 0.55rem 0.7rem; margin-bottom: 0.55rem; cursor: pointer; box-shadow: var(--shadow);
}
.event-card:hover { border-color: var(--brass); }
.event-card .name { font-weight: 800; }
.event-card.conflict { border-left-color: var(--red); }
.status-Lead { border-top: 5px solid #8a94a6; }
.status-Qualified { border-top: 5px solid #5b84ae; }
.status-ProposalSent { border-top: 5px solid var(--amber); }
.status-Confirmed { border-top: 5px solid var(--green); }
.status-BalanceDue { border-top: 5px solid #7a4f9d; }
.status-Completed { border-top: 5px solid #3c7a4e; }
.status-Lost { border-top: 5px solid #9c3a2b; }

/* ------------------------------------------------------------- calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-weight: 800; text-align: center; padding: 0.3rem 0; }
.cal-cell { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-height: 96px; padding: 0.3rem; }
.cal-cell.other-month { opacity: 0.45; }
.cal-cell .daynum { font-weight: 800; font-size: 0.85rem; }
.cal-ev { display: block; font-size: 0.78rem; font-weight: 700; border-radius: 6px; padding: 0.12rem 0.35rem; margin-top: 0.25rem; color: #fff; background: var(--green); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.tentative { background: var(--amber); }
.cal-ev.lost { background: #9c3a2b; }

/* ------------------------------------------------------------- layout utils */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.mt { margin-top: 1rem; }
.totals td { border-bottom: none; }
.totals .grand { font-size: 1.15rem; font-weight: 800; border-top: 3px solid var(--ink); }
.hidden { display: none !important; }

/* ------------------------------------------------------------- modal / login */
.overlay {
  position: fixed; inset: 0; background: rgba(24, 20, 16, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50;
}
.dialog { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 430px; width: 100%; padding: 1.6rem; }

/* ------------------------------------------------------------- BEO print */
#print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; inset: 0; padding: 0.5in; background: #fff; }
  #print-area h1 { font-size: 1.5rem; }
  #print-area table { page-break-inside: avoid; }
}
.beo h1 { margin-bottom: 0.1em; }
.beo .beo-meta { font-weight: 700; font-size: 1.05rem; }

/* ------------------------------------------------------------- client page */
.client-wrap { max-width: 640px; margin: 0 auto; padding: 1rem; }
.client-hero { text-align: center; padding: 1.4rem 1rem 0.4rem; }
.client-hero .brand { font-family: Georgia, serif; font-weight: 700; font-size: 2rem; }
.steps { display: flex; gap: 0.4rem; margin: 1rem 0; }
.steps .step { flex: 1; text-align: center; font-weight: 800; font-size: 0.85rem; padding: 0.5rem 0.2rem; border-radius: 8px; background: #e9e2d2; color: var(--ink-soft); }
.steps .step.active { background: var(--green); color: #fff; }
.steps .step.done { background: var(--brass); color: #fff; }
.sig-canvas { border: 2px dashed var(--brass); border-radius: 8px; background: #fff; width: 100%; height: 180px; touch-action: none; }
.sig-typed-preview { font-family: "Snell Roundhand", "Brush Script MT", cursive; font-size: 2rem; padding: 0.4rem 0.6rem; }
.agreement-box { background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 1rem; max-height: 46vh; overflow: auto; white-space: pre-wrap; font-size: 0.95rem; }
.big-check { font-size: 3rem; text-align: center; }
