/* Lakeside Tent Co — dashboard styles.
   Brand tokens mirror the public site: cream + sage + forest green + Playfair/Inter. */

:root {
  --bg:        #f4efe6;
  --paper:     #fdfaf4;
  --paper-2:   #f7f1e3;
  --ink:       #1a1611;
  --ink-soft:  #3a342b;
  --muted:     #6e6557;
  --line:      #e0d7c4;
  --line-soft: #ece3d1;
  --accent:        #2f5743;   /* forest — primary buttons, headlines */
  --accent-dark:   #244536;
  --accent-tint:   #e6ece7;
  --sage:          #9caa86;
  --sage-soft:     #d9e0cf;
  --rose:          #b54a5d;   /* danger */
  --rose-soft:     #fbe9ec;
  --blue:          #4a6e9e;   /* "sent" */
  --blue-soft:     #e7eefb;
  --gold:          #b58a3a;   /* "reviewed" */
  --gold-soft:     #f7ead8;
  --radius:    9px;
  --shadow-sm: 0 1px 2px rgba(60,50,40,0.06);
  --shadow-md: 0 4px 14px rgba(60,50,40,0.08);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; color: var(--ink); margin: 0 0 12px; }
h1 { font-size: 1.8rem; letter-spacing: -0.005em; }
h2 { font-size: 1.25rem; margin-top: 0; }
h3 { font-size: 1.05rem; margin-top: 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.right { text-align: right; }
code { background: var(--paper-2); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }

/* ============ top bar ============ */
/* Brand-forward header — mirrors the public site's forest + cream wordmark. */
.topbar {
  background: #15322a;                /* forest, matches public site --bg */
  border-bottom: 1px solid rgba(247, 239, 217, 0.08);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 30;
}
.topbar__brand { display: flex; align-items: baseline; gap: 14px; }
.topbar__brand .brand {
  font-family: var(--font-serif); font-weight: 500; font-size: 1.5rem;
  color: #f7efd9;                     /* cream, same as public site --ink */
  text-decoration: none; letter-spacing: 0.02em;
}
.topbar__brand .brand:hover { color: #fff; }
.topbar__tag {
  /* Matches the brand wordmark: serif, cream, no italic. Smaller size + a
     thin divider keeps the visual hierarchy (Lakeside Tent Co | Studio). */
  font-family: var(--font-serif); font-style: normal; font-weight: 500;
  font-size: 1.25rem; letter-spacing: 0.02em;
  color: #f7efd9;
  border-left: 1px solid rgba(247, 239, 217, 0.25); padding-left: 14px;
}
.topbar__right { display: flex; align-items: center; gap: 20px; }
.topbar__user { color: rgba(247, 239, 217, 0.7); font-size: 0.92rem; }
.topbar__right .btn-link { color: rgba(247, 239, 217, 0.85); font-size: 0.92rem; text-decoration: none; }
.topbar__right .btn-link:hover { color: #fff; text-decoration: underline; }

/* ============ shell layout ============ */
.shell { display: flex; min-height: calc(100vh - 60px); }
.content { flex: 1; padding: 28px 36px; max-width: 1280px; width: 100%; }

/* ============ sidebar ============ */
.sidebar {
  width: 220px;
  background: var(--paper-2);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 60px; align-self: flex-start;
  min-height: calc(100vh - 60px);
}
.sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink-soft); font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.sidebar a:hover { background: var(--sage-soft); color: var(--ink); }
.sidebar a.is-active {
  background: var(--accent); color: #fff;
}
.sidebar__count {
  position: relative;
  display: inline-block;
  margin: -28px 18px 4px auto;
  background: var(--rose); color: #fff;
  font-size: 0.72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 12px;
  align-self: flex-end;
}
.sidebar__spacer { flex: 1; }
.sidebar__home {
  font-size: 0.85rem; color: var(--muted) !important;
  border-top: 1px solid var(--line); padding-top: 16px !important; margin-top: 8px;
}
.sidebar__home:hover { background: transparent !important; color: var(--accent) !important; }

/* ============ page head ============ */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head__actions { display: flex; gap: 10px; align-items: center; }
.page-head__search { display: flex; gap: 8px; align-items: center; }
.page-head__search input[type="search"] {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; min-width: 260px; font-family: inherit; font-size: 0.95rem;
  background: var(--paper);
}
.page-head__search input[type="search"]:focus {
  outline: none; border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.crumb { color: var(--muted); font-size: 0.85rem; margin: 0 0 6px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

/* ============ status tabs ============ */
.status-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
  flex-wrap: wrap;
}
.status-tabs a {
  text-decoration: none; padding: 10px 16px;
  color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.status-tabs a.is-active {
  color: var(--accent); border-bottom-color: var(--accent);
}
.status-tabs a:hover { color: var(--ink); }

/* ============ cards ============ */
/* Default card = mid-forest (#6b8f7c — between the visualizer ground sage
   #a8c188 and the brand forest accent #2f5743). Action cards override below:
     .card--notes  — paper, for the textarea you type into
     .card--send   — sage gradient, for the outbound action
*/
.card {
  background: #6b8f7c;
  border: none;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  color: #f7efd9;                   /* cream text — the BG is too dark for dark ink */
}
.card h2  { color: #f7efd9; }
.card h3  { color: #f7efd9; }
.card a   { color: #f7efd9; text-decoration: underline; }
.card a:hover { color: #fff; }
.card .muted   { color: rgba(247, 239, 217, 0.72); }
.card .small   { color: rgba(247, 239, 217, 0.85); }
.card strong   { color: #f7efd9; }
.card em       { color: rgba(247, 239, 217, 0.85); }
/* Tables keep their cream background (defined in /* tables */ block above),
   so text inside the table must NOT inherit the card's cream color — restore
   the normal dark ink. Same for em / strong / muted INSIDE the table. */
.card .table thead th { color: var(--muted); }
.card .table tbody td { color: var(--ink); }
.card .table tfoot td { color: var(--ink); }
.card .table strong   { color: var(--ink); }
.card .table em       { color: var(--muted); }
.card .table .muted   { color: var(--muted); }
/* Status pill chips already coloured — leave as-is */

.card--notes {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}
.card--notes h2,
.card--notes h3 { color: var(--ink); }
.card--notes a  { color: var(--accent); text-decoration: none; }
.card--notes .muted { color: var(--muted); }

/* ============ tables ============ */
.table {
  width: 100%; border-collapse: collapse;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table thead th {
  background: var(--paper-2); text-align: left; font-weight: 600;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.table tbody td {
  padding: 14px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--sage-soft); }
.table tfoot td {
  padding: 14px; background: var(--paper-2); border-top: 1px solid var(--line); font-size: 0.95rem;
}
.table.table--items td { padding: 12px 14px; }

/* ============ status badges ============ */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.03em;
}
.badge--inbox    { background: var(--gold-soft);  color: var(--gold); }
.badge--reviewed { background: var(--sage-soft);  color: var(--accent-dark); }
.badge--sent     { background: var(--blue-soft);  color: var(--blue); }
.badge--accepted { background: var(--accent);     color: #fff; }
.badge--rejected { background: var(--rose-soft);  color: var(--rose); }
.badge--archived { background: var(--line-soft);  color: var(--muted); }

/* ============ buttons + links ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem; font-weight: 500;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--sage); color: var(--ink); }
.btn--small { padding: 6px 12px; font-size: 0.85rem; }
.btn--block { width: 100%; justify-content: center; }
.btn-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font-family: inherit; font-size: 0.92rem; font-weight: 500;
  text-decoration: none;
}
.btn-link:hover { color: var(--accent-dark); text-decoration: underline; }
.btn-link.danger { color: var(--rose); }
.btn-link.danger:hover { color: #8e3548; }

/* ============ definition lists ============ */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: 0.85rem; padding-top: 2px; }
.dl dd { margin: 0; }
.dl dd.multiline { white-space: pre-wrap; }

/* ============ grids ============ */
.grid { display: grid; gap: 20px; }
.grid--quote { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) { .grid--quote { grid-template-columns: 1fr; } }

/* ============ forms ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 500; font-size: 0.88rem; color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field input[type="number"], .field input[type="password"],
.field input[type="search"], .field textarea, .field select {
  font-family: inherit; font-size: 0.95rem;
  padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-row .field { margin-bottom: 0; }
@media (min-width: 900px) { .form-row { grid-template-columns: repeat(4, 1fr); } }
.form-card { padding: 24px 26px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.form-error {
  display: none; background: var(--rose-soft); color: var(--rose);
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 0.92rem;
}
.form-error.show { display: block; }

/* ============ link-to-customer panel ============ */
.link-customer { margin-top: 14px; }
.link-customer summary { list-style: none; }
.link-customer__form { margin-top: 12px; padding: 14px; background: var(--paper-2); border-radius: var(--radius); border: 1px solid var(--line-soft); }
.link-customer__form label { display: block; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 6px; }
.link-customer__form select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); font-family: inherit; font-size: 0.95rem;
  margin-bottom: 10px;
}
.link-customer__form .or { text-align: center; color: var(--muted); margin: 10px 0; font-size: 0.85rem; }
.linked { background: var(--accent-tint); padding: 10px 14px; border-radius: var(--radius); margin-top: 12px; }

/* ============ status form (radio chips) ============ */
.status-form .radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; margin-bottom: 8px; cursor: pointer; }
.status-form .radio input { accent-color: var(--accent); }

/* ============ notes form ============ */
.notes-form textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-family: inherit; font-size: 0.95rem; min-height: 90px; margin-bottom: 12px;
}
.notes-form textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--accent-tint); }

/* ============ "Your event includes" list ============ */
.event-includes { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.event-includes li { padding: 6px 0; border-bottom: 1px solid var(--line-soft); break-inside: avoid; }
@media (max-width: 720px) { .event-includes { columns: 1; } }

/* ============ empty state ============ */
.empty-state {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 28px; text-align: center; color: var(--muted);
}
.empty-state h2 { color: var(--ink-soft); }

/* ============ alerts ============ */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.92rem; }
.alert--warn    { background: var(--gold-soft);  color: var(--gold);        border: 1px solid #e0c89c; }
.alert--success { background: var(--accent-tint);color: var(--accent-dark); border: 1px solid #b6c9b7; }
.alert--error   { background: var(--rose-soft); color: var(--rose);         border: 1px solid #ecc0c8; }
.alert code { background: rgba(0,0,0,0.05); }

/* ============ Send-to-customer card ============ */
/* Sage-tinted to read as the primary outbound action — distinct from the
   read-only cards above it. */
.card--send {
  background: linear-gradient(180deg, #f4f6ee 0%, var(--paper) 100%);
  border: 1px solid var(--sage-soft);
}
.card--send h2 {
  color: var(--accent);
  font-style: italic;
}
.card--send textarea {
  width: 100%; min-height: 90px; margin-bottom: 12px;
  font-family: var(--font-body); font-size: 14px; line-height: 1.5;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  resize: vertical;
}
.card--send textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}

/* ============ login page ============ */
.login-page {
  background: var(--bg);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 36px 30px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow-md);
}
.login-card__brand { font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem; letter-spacing: 0.3px; }
.login-card__tag { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.login-card h1 { font-size: 1.4rem; margin-bottom: 18px; }
.login-card .field input { width: 100%; }
.login-card .btn--block { margin-top: 10px; }
