/* Owner Hub + Client Portal. Same colors and fonts as the website. */
:root {
  --bg: #f7f4ee;
  --bg-tint: #efeae0;
  --card: #fffdf9;
  --ink: #1d2b27;
  --ink-soft: #52605b;
  --green: #2f5d50;
  --green-dark: #1f4238;
  --sage: #a9bfb2;
  --clay: #c9825e;
  --line: #e2dccf;
  --red: #b4432f;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, sans-serif; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
a { color: var(--green); }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
.error { color: var(--red); min-height: 1.2em; margin: 0; font-size: 0.9rem; }

.logo { display: flex; align-items: center; gap: 10px; font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.25rem; text-decoration: none; color: var(--ink); }
.logo-mark { width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--sage), var(--green) 70%);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.35); }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #fff; border: 2px solid var(--green);
  border-radius: 999px; padding: 9px 18px; font: 600 0.9rem "Inter", sans-serif;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-danger { background: transparent; color: var(--red); border-color: transparent; }
.btn-danger:hover { background: #f6e3de; border-color: #f6e3de; }
.btn-small { padding: 5px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; }
label { display: grid; gap: 4px; font-weight: 500; font-size: 0.88rem; }
input, select, textarea {
  font: inherit; color: inherit; background: #fff; width: 100%;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); border-color: var(--green); }
textarea { min-height: 90px; resize: vertical; }

/* Sign in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 10px 30px rgba(29,43,39,.08); }
.auth-card h1 { margin: 12px 0 0; }
.auth-card .muted { margin: 0; }
.back { font-size: 0.88rem; text-align: center; text-decoration: none; color: var(--ink-soft); }

/* Layout */
.app { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--card); border-right: 1px solid var(--line); padding: 22px 14px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { padding: 0 10px; }
.sidebar-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--green); padding: 0 10px; margin: 10px 0 8px; }
#tabs { display: grid; gap: 2px; }
#tabs button, .logout { text-align: left; background: none; border: 0; font: 500 0.93rem "Inter", sans-serif;
  color: var(--ink-soft); padding: 9px 12px; border-radius: 10px; cursor: pointer; }
#tabs button:hover { background: var(--bg); color: var(--ink); }
#tabs button.active { background: var(--bg-tint); color: var(--green-dark); font-weight: 600; }
.logout { margin-top: auto; }
.logout:hover { color: var(--red); }
.view { padding: 32px 36px 64px; max-width: 1100px; width: 100%; min-width: 0; margin: 0 auto; }
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.view-head p { margin: 0; }

/* Cards & stats */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-num { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat-label { color: var(--ink-soft); font-size: 0.85rem; }
.bar { height: 8px; background: var(--bg-tint); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }

/* Checklist */
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-head h2 { margin: 0; }
.check-list { list-style: none; margin: 12px 0 0; padding: 0; }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }
.check-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: none; }
.check-item span { flex: 1; }
.check-item.done span { color: var(--ink-soft); text-decoration: line-through; }
.check-item .row-actions { opacity: 0; transition: opacity .15s; }
.check-item:hover .row-actions, .check-item:focus-within .row-actions { opacity: 1; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; border-radius: 99px; padding: 1px 8px; margin-left: 6px;
  background: var(--bg-tint); color: var(--ink-soft); text-decoration: none; vertical-align: 1px; }
.tag-cost { background: #f7e6dc; color: #8a4a2c; }
.tag-login { background: #e3ece7; color: var(--green-dark); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
  font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td select { padding: 5px 8px; width: auto; }
.caption-cell { max-width: 320px; white-space: pre-wrap; color: var(--ink-soft); }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--bg-tint); white-space: nowrap; }
.pill-active, .pill-approved, .pill-posted { background: #dfeae3; color: var(--green-dark); }
.pill-lead, .pill-awaiting_approval, .pill-scheduled { background: #f3ead8; color: #7a5a1f; }
.pill-changes_requested { background: #f6e3de; color: var(--red); }
.empty { text-align: center; color: var(--ink-soft); padding: 28px 10px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { width: auto; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.saved { color: var(--green); font-weight: 600; font-size: 0.88rem; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-size: 0.85rem; }
dialog { border: 0; border-radius: 18px; padding: 26px; width: min(640px, calc(100vw - 32px));
  box-shadow: 0 30px 60px rgba(29,43,39,.25); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(29,43,39,.35); }
ol.steps { padding-left: 20px; margin: 8px 0 0; }
ol.steps li { margin-bottom: 6px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.feature-list div { background: var(--bg); border-radius: 12px; padding: 14px; }
.feature-list p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

/* Phone */
@media (max-width: 800px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sidebar { min-width: 0; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; }
  .sidebar-label { display: none; }
  #tabs { display: flex; overflow-x: auto; width: 100%; order: 3; gap: 4px; }
  #tabs button { white-space: nowrap; }
  .logout { margin: 0 0 0 auto; }
  .view { padding: 20px 16px 48px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid, .feature-list { grid-template-columns: 1fr; }
  .check-item .row-actions { opacity: 1; }
}
