@font-face {
  font-family: "DejaVu Sans";
  font-style: normal;
  font-weight: 100 600;
  font-display: swap;
  src: url("/fonts/DejaVuSans.woff2") format("woff2"),
       url("/fonts/DejaVuSans.ttf") format("truetype");
}
@font-face {
  font-family: "DejaVu Sans";
  font-style: normal;
  font-weight: 601 900;
  font-display: swap;
  src: url("/fonts/DejaVuSans-Bold.woff2") format("woff2"),
       url("/fonts/DejaVuSans-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-700-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/montserrat-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/montserrat-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/montserrat-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/playfair-display-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/playfair-display-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/playfair-display-latin-700-italic.woff2") format("woff2");
}

:root {
  --bg0: #121417;
  --bg1: #121417;
  --panel: #1A1C1F;
  --panel-2: #1A1C1F;
  --glass: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #F7F8FA;
  --muted: #9A9A9A;
  --soft: #D0D0D0;
  --gold: #C9A13B;
  --gold-2: #D4B15A;
  --gold-deep: #A8872A;
  --navy: #132A43;
  --brand-black: #0B0B0C;
  --sidebar-w: 240px;
  --charcoal: #2B2B2E;
  --cream: #f6efe4;
  --radius: 18px;
  --danger: #f07171;
  --overdue: #f07171;
  --sans: "DejaVu Sans", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "DejaVu Sans", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --label: "DejaVu Sans", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { color-scheme: dark; }
html[data-theme="cream"] { color-scheme: light; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg0);
  min-height: 100%;
  overflow: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg0);
}
body::after { display: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  min-height: 100dvh;
  padding: 12px;
  gap: 12px;
  box-sizing: border-box;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  background: var(--navy);
  border-right: 1px solid rgba(255,255,255,0.06);
  color: #e8eef4;
  z-index: 30;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(19, 42, 67, 0.18);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}
.brand-block {
  background: var(--brand-black);
  margin: -16px -12px 10px;
  padding: 16px 14px 14px;
  border-radius: 24px 24px 0 0;
}
.wordmark {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  gap: 8px 10px;
  padding: 2px 2px 0;
  border-bottom: 0;
  cursor: pointer;
  min-width: 0;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 40px;
  background: var(--brand-black);
  box-shadow: none;
}
.logo-mark.mini {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 7px;
}
.pin-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  margin: 0 auto 12px;
  display: block;
  box-shadow: none;
  background: var(--brand-black);
}
.monogram {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(212, 176, 106, 0.28));
}
.monogram svg { width: 100%; height: 100%; display: block; }
.wordmark-text { min-width: 0; width: 100%; }
.wordmark-name {
  margin: 0;
  font-family: "Montserrat", var(--label);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark-name .rock { font-weight: 700; color: #fff; }
.wordmark-name .homes { font-weight: 500; color: #C9A13B; }
.wordmark-tagline {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-family: "Montserrat", var(--label);
  font-weight: 500;
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 239, 228, 0.78);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.wordmark-tagline::before,
.wordmark-tagline::after {
  content: "";
  flex: 1 1 8px;
  height: 1px;
  background: #C9A13B;
  opacity: 0.9;
  min-width: 8px;
}
.wordmark-name .amp {
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 1px;
  text-transform: none;
}
.wordmark-sub {
  margin: 5px 0 0;
  font-family: var(--label);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.credentials {
  margin: 8px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cred-block {
  padding: 0 2px 0 8px;
  border-left: 1px solid rgba(212, 176, 106, 0.35);
}
.cred-name {
  margin: 0;
  font-family: var(--label);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cream, #f6efe4);
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.cred-title, .cred-meta {
  margin: 2px 0 0;
  font-family: var(--label);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(246, 234, 211, 0.58);
  font-weight: 500;
  line-height: 1.35;
}
.cred-prc {
  margin: 1px 0 0;
  font-family: var(--label);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: rgba(246, 234, 211, 0.58);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.side-nav { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.side-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-radius: 11px;
  cursor: pointer;
}
.side-link:hover { background: rgba(255,255,255,0.06); }
.side-link.active {
  background: rgba(201, 161, 59, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 #C9A13B;
  border-radius: 11px;
}
.side-link.active .side-link-label,
.side-link.active .side-ico { color: #fff; }
.side-link.soon { opacity: 0.58; cursor: default; }
.side-link.soon:hover { background: transparent; }
.side-ico { width: 16px; text-align: center; color: rgba(247, 248, 250, 0.7); font-size: 12px; }
.side-link.active .side-ico { color: #C9A13B; }
.side-link-label { flex: 1; font-size: 13px; font-weight: 600; }
.side-count {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
}
.soon-tag {
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212,176,106,0.3);
  border-radius: 999px;
  padding: 2px 5px;
  white-space: nowrap;
}

.side-urgency {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 2px 0 4px;
}
.side-urgency-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--glass);
  font-size: 11px;
  color: var(--soft);
}
.side-urgency-item strong {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.side-urgency-item.urgent { background: rgba(184, 60, 70, 0.22); }
.side-urgency-item.due_soon { background: rgba(37, 99, 168, 0.26); }

.side-cols {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 4px;
  min-height: 0;
  flex: 0 0 auto;
  overflow: visible;
}
.side-col {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 2px 6px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--soft);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
}
.side-col:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-col.active {
  background: rgba(201, 161, 59, 0.14);
  box-shadow: inset 3px 0 0 #C9A13B;
  color: #fff;
}
.side-col .sdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
  background: currentColor;
}
.side-col-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-col strong { font-weight: 700; color: inherit; font-variant-numeric: tabular-nums; }
.side-col[data-stage="new"] .sdot { background: #5BB87A; }
.side-col[data-stage="follow_up"] .sdot { background: #C9B05A; }
.side-col[data-stage="qualified"] .sdot { background: #5BA8C8; }
.side-col[data-stage="not_interested"] .sdot { background: #C45C5C; }
.side-col[data-stage="resale"] .sdot { background: #B89A74; }
.side-col[data-stage="site_tripping"] .sdot { background: #D1B05A; }
.side-col[data-stage="reserved"] .sdot { background: #4F8A66; }
.side-col[data-stage="condo"] .sdot { background: #8B7AC0; }
.side-col[data-stage="other_projects"] .sdot { background: #8AAA5A; }
.side-col[data-stage="other_developers"] .sdot { background: #5B86C0; }
.side-col[data-stage="all"] .sdot { background: #C9A13B; }
.sidebar-foot { padding-top: 4px; border-top: 1px solid var(--line); margin-top: auto; flex: 0 0 auto; }
.side-link.gear { color: var(--gold-2); }

/* ---- Main ---- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-y: auto;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 18px 10px;
}
.menu-btn { display: none; }
.mobile-brand { display: none; }
.mobile-brand .monogram.mini { width: 32px; height: 32px; flex: 0 0 32px; color: var(--gold); }
.mobile-brand .wordmark-name { font-size: 13px; }
.mobile-brand .wordmark-sub { margin-top: 2px; letter-spacing: 0.22em; font-size: 8px; }
.title-block { display: flex; align-items: center; gap: 6px; min-width: 0; }
.page-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.06em;
  cursor: pointer;
  line-height: 1.1;
  color: var(--ink);
}
.page-title:hover, .edit-title-btn:hover { color: var(--gold-2); }
.edit-title-btn { color: var(--muted); font-size: 13px; }

.urgency-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 280px;
  min-width: 0;
}
.upill {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--soft);
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.upill:hover { border-color: var(--line-2); background: rgba(255,255,255,0.07); }
.upill.active {
  background: rgba(212, 176, 106, 0.14);
  border-color: rgba(212, 176, 106, 0.4);
  color: var(--gold-2);
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.search input {
  width: min(240px, 32vw);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.55);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input:focus, select:focus, textarea:focus, input:focus {
  outline: 2px solid color-mix(in srgb, #C9A13B 55%, transparent);
  outline-offset: 1px;
  border-color: #C9A13B;
}
.gear-mobile { display: none; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  padding: 8px 13px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { background: rgba(255,255,255,0.09); }
.btn.primary {
  background: #C9A13B;
  border-color: #C9A13B;
  color: #0B0B0C;
  box-shadow: none;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); border-color: rgba(240, 113, 113, 0.35); }
.btn.ghost { background: transparent; }
.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 8px;
}
.icon-btn:hover { background: var(--glass); color: var(--ink); }
.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
}
.theme-toggle .theme-ico { line-height: 1; }
html[data-theme="dark"] .theme-toggle .moon,
html:not([data-theme]) .theme-toggle .moon { display: none; }
html[data-theme="cream"] .theme-toggle .sun { display: none; }


.udot, .urgency-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 22%, transparent);
}
.udot { position: relative; top: 0; }
.udot.urgent, .urgency-dot.urgent { background: #C45C5C; color: #C45C5C; }
.udot.due_soon, .urgency-dot.due_soon { background: #5B86C0; color: #5B86C0; }
.udot.this_week, .urgency-dot.this_week { background: #C9B05A; color: #C9B05A; }
.udot.later, .urgency-dot.later { background: #4F8A66; color: #4F8A66; }
.udot.none, .urgency-dot.none { background: #7A7A7A; color: #7A7A7A; box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset; }

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 18px 12px;
}
.stat-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  min-width: 0;
}
.stat-tile.tint-new,
.stat-tile.tint-urgent,
.stat-tile.tint-trip,
.stat-tile.tint-reserved {
  border: 0;
  border-top: 2px solid #C9A13B;
  backdrop-filter: none;
  box-shadow: 0 8px 18px rgba(19, 42, 67, 0.12);
  background: var(--navy);
  border-radius: 16px;
}
.stat-tile.tint-new .stat-label,
.stat-tile.tint-urgent .stat-label,
.stat-tile.tint-trip .stat-label,
.stat-tile.tint-reserved .stat-label {
  color: #fff;
}
.stat-tile.tint-new .stat-value,
.stat-tile.tint-urgent .stat-value,
.stat-tile.tint-trip .stat-value,
.stat-tile.tint-reserved .stat-value {
  color: #C9A13B;
}
.stat-tile.tint-new .stat-icon,
.stat-tile.tint-urgent .stat-icon,
.stat-tile.tint-trip .stat-icon,
.stat-tile.tint-reserved .stat-icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.stat-copy { flex: 1; min-width: 0; }
.stat-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.stat-value {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  color: #fff;
}
.stat-icon svg { width: 20px; height: 20px; display: block; }
.stat-icon.pink { background: rgba(232, 80, 140, 0.22); color: #f472b6; }
.stat-icon.red { background: rgba(226, 75, 75, 0.22); color: #f87171; }
.stat-icon.teal { background: rgba(34, 196, 196, 0.2); color: #2dd4bf; }
.stat-icon.purple { background: rgba(150, 90, 230, 0.22); color: #c084fc; }

/* ---- Workspace panels ---- */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 2.55fr) minmax(220px, 0.95fr);
  gap: 12px;
  padding: 0 18px 16px;
}
.panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 8px;
}
.panel-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.panel-meta {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 10px 12px;
}

/* Follow-ups */
.fu-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.fu-row:hover { background: rgba(255,255,255,0.05); }
.fu-copy { flex: 1; min-width: 0; }
.fu-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fu-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.fu-tags { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.fu-when {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
  flex: 0 0 auto;
}
.fu-when.urgent { color: #f87171; }
.fu-action {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-note {
  margin: 18px 8px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* Avatars and tags */
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  flex: 0 0 26px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06);
}
.tag-chip, .page-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #2B2B2E;
  color: #f6efe4;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-chip a, .page-tag a { color: inherit; text-decoration: none; }
.tag-chip:hover, .tag-chip:focus-within, .page-tag:hover, .page-tag:focus-within {
  border-color: var(--gold);
}
.tag-chip a:hover, .page-tag a:hover { text-decoration: none; }
.stage-tag {
  display: inline-flex;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.stage-tag[data-stage="new"] { color: #86efac; background: rgba(52, 140, 90, 0.22); }
.stage-tag[data-stage="follow_up"] { color: #f6d48a; background: rgba(184, 137, 61, 0.22); }
.stage-tag[data-stage="qualified"] { color: #7dd3fc; background: rgba(14, 116, 144, 0.28); }
.stage-tag[data-stage="not_interested"] { color: #fca5a5; background: rgba(153, 50, 50, 0.28); }
.stage-tag[data-stage="resale"] { color: #e7d3b0; background: rgba(122, 101, 72, 0.3); }
.stage-tag[data-stage="site_tripping"] { color: #fcd34d; background: rgba(180, 130, 30, 0.25); }
.stage-tag[data-stage="reserved"] { color: #6ee7b7; background: rgba(16, 120, 80, 0.28); }
.stage-tag[data-stage="condo"] { color: #c4b5fd; background: rgba(76, 70, 150, 0.32); }
.stage-tag[data-stage="other_projects"] { color: #bef264; background: rgba(80, 100, 30, 0.28); }
.stage-tag[data-stage="other_developers"] { color: #93c5fd; background: rgba(30, 60, 100, 0.32); }

/* Pipeline */
.pipeline-lanes {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 10px 12px;
}
.lane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid transparent;
}
.lane.drag-over { border-color: rgba(212, 176, 106, 0.5); background: rgba(212, 176, 106, 0.06); }
.lane-head {
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.lane-title h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  color: var(--soft);
}
.lane-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lane-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.lane-tab {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.lane-tab:hover { color: var(--ink); }
.lane-tab.active {
  background: rgba(212, 176, 106, 0.16);
  color: var(--gold-2);
}
.lane-tools { padding: 0 8px 4px; }
.ni-filter, .ni-hidden { font-size: 10.5px; color: var(--muted); }
.ni-filter select {
  font: inherit;
  font-size: 10.5px;
  background: rgba(8,12,24,0.6);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 4px;
}
.lane-cards {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 6px 8px;
}

.card {
  background: rgba(22, 30, 54, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 8px 8px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.card.dragging { opacity: 0.45; transform: none; }
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.card-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.sample-tag {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-2);
  background: rgba(212, 176, 106, 0.14);
  border-radius: 999px;
  padding: 1px 5px;
}
.card-status {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-status.urgent { color: #f87171; }
.card-status.due_soon { color: #93c5fd; }
.card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 2px 6px;
}
.tag.proceeded { color: #86efac; background: rgba(16, 120, 80, 0.28); }
.tag.rescheduled { color: #fcd34d; background: rgba(180, 130, 30, 0.25); }
.tag.cancelled { color: #fca5a5; background: rgba(153, 50, 50, 0.28); }
.tag.agent { color: #e9d5ff; background: rgba(120, 70, 180, 0.32); }
.buyers-badge { font-size: 10px; color: #6ee7b7; font-weight: 700; }
.move-to { display: none; }
.move-to select {
  width: 100%;
  font: inherit;
  font-size: 11px;
  background: rgba(8,12,24,0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 6px;
}
.empty-state {
  margin: 16px 6px;
  color: #5b6680;
  text-align: center;
  font-size: 11.5px;
}
.empty-state svg {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
  display: block;
  color: #5b6680;
}
.empty-state p { margin: 0; }

/* Trippings */
.trip-group-label {
  margin: 8px 6px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.trip-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.trip-row:hover { background: rgba(255,255,255,0.05); }
.trip-copy { flex: 1; min-width: 0; }
.trip-top { display: flex; align-items: center; gap: 8px; }
.trip-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.trip-when {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.trip-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #12182c;
  color: var(--ink);
  border: 1px solid var(--line-2);
  padding: 10px 16px;
  border-radius: 12px;
  z-index: 60;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.toast[hidden] { display: none !important; }
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.55);
  z-index: 25;
}

@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.5fr); }
  .panel.trippings { grid-column: 1 / -1; min-height: 240px; }
}

@media (max-width: 860px), (pointer: coarse) {
  .move-to { display: block; }
  .menu-btn, .gear-mobile { display: inline-flex; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .sidebar {
    position: fixed;
    inset: 10px auto 10px 10px;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
    height: auto;
    max-height: calc(100dvh - 20px);
  }
  .sidebar.open { transform: translateX(0); }
  .page-title { font-size: 18px; }
  .top-actions { width: 100%; margin-left: 0; flex-wrap: wrap; justify-content: flex-end; }
  .urgency-pills { flex: 1 1 100%; }
  .search { flex: 1 1 auto; }
  .search input { width: 100%; min-width: 0; }
  .topbar { padding: 10px 12px 8px; }
  .stats {
    grid-template-columns: 1fr 1fr;
    padding: 0 12px 10px;
  }
  .stat-value { font-size: 24px; }
  .workspace {
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 0 12px 16px;
    gap: 10px;
  }
  .panel { flex: 0 0 auto; min-height: 280px; }
  .panel.pipeline { min-height: 400px; }
  .pipeline-lanes {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .lane {
    flex: 0 0 78%;
    scroll-snap-align: start;
    max-height: none;
  }
}

/* ---- Modals (dark glass) ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.62);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: min(540px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  background: #12182c;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.modal.wide { width: min(640px, 100%); }
.modal.narrow { width: min(430px, 100%); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
  position: sticky;
  top: 0;
  background: #12182c;
  z-index: 1;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 750;
}
.modal-lead-name { margin: 0 0 4px; font-weight: 700; }
.modal-body {
  padding: 8px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 16px;
  position: sticky;
  bottom: 0;
  background: #12182c;
}
.modal .modal-body { padding-bottom: 16px; }
.spacer { flex: 1; }
.form-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal label, .select-field .field-label, .opt-block label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.modal input, .modal select, .modal textarea,
.opt-block input, .opt-add input, .col-edit-row input {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8, 12, 24, 0.7);
}
.modal .row, .opt-block .row, .lead-page-card .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 560px) {
  .modal .row, .opt-block .row, .lead-page-card .row { grid-template-columns: 1fr; }
}
.hint, .hint.compact { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.form-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 650; }
.req { color: var(--danger); }
.select-field { display: flex; flex-direction: column; gap: 4px; }
.add-option { display: flex; gap: 6px; }
.add-option input { flex: 1; }
.add-option button, .opt-add button, .opt-row button, .col-edit-row button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--ink);
  padding: 7px 10px;
  cursor: pointer;
}
.opt-block { display: flex; flex-direction: column; gap: 8px; }
.opt-block h3 {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 750;
}
.opt-list { display: flex; flex-direction: column; gap: 6px; }
.opt-row, .col-edit-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.opt-row input, .col-edit-row input { flex: 1; }
.opt-row .danger, .col-edit-row .danger, button.danger { color: var(--danger); }
.opt-children { padding: 6px 0 6px 16px; display: flex; flex-direction: column; gap: 6px; }
.opt-add { display: flex; gap: 6px; }
.opt-add input { flex: 1; }
.lead-page-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.lead-page-card .page-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lead-page-card .page-card-head label.active-toggle {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.people-edit .row { margin-bottom: 8px; }

/* ---- Cream theme ---- */
html[data-theme="cream"] {
  --bg0: #F7F8FA;
  --bg1: #F7F8FA;
  --panel: #FFFFFF;
  --panel-2: #FFFFFF;
  --glass: rgba(19, 42, 67, 0.04);
  --line: rgba(30, 30, 30, 0.1);
  --line-2: rgba(30, 30, 30, 0.16);
  --ink: #1E1E1E;
  --muted: #6B6B6B;
  --soft: #1E1E1E;
  --shadow: 0 8px 24px rgba(19, 42, 67, 0.08);
}

html[data-theme="cream"] body::before { background: var(--bg0); }
html[data-theme="cream"] body::after { display: none; }

html[data-theme="cream"] .sidebar {
  background: var(--navy);
  color: #e8eef4;
  box-shadow: 0 10px 30px rgba(19, 42, 67, 0.16);
  border: 0;
}
html[data-theme="cream"] .topbar {
  background: transparent;
  color: var(--ink);
  margin: 0;
  padding-top: 8px;
}
html[data-theme="cream"] .wordmark-name,
html[data-theme="cream"] .cred-name,
html[data-theme="cream"] .side-link,
html[data-theme="cream"] .side-col,
html[data-theme="cream"] .side-urgency-item,
html[data-theme="cream"] .side-urgency-item strong,
html[data-theme="cream"] .admin-name {
  color: #e8eef4;
}
html[data-theme="cream"] .page-title,
html[data-theme="cream"] .edit-title-btn {
  color: #1E1E1E;
}
html[data-theme="cream"] .cred-title,
html[data-theme="cream"] .cred-meta,
html[data-theme="cream"] .cred-prc,
html[data-theme="cream"] .admin-role {
  color: rgba(232, 238, 244, 0.62);
}
html[data-theme="cream"] .page-title:hover,
html[data-theme="cream"] .edit-title-btn:hover { color: #132A43; }
html[data-theme="cream"] .upill {
  background: #fff;
  color: #1E1E1E;
  border-color: rgba(30, 30, 30, 0.12);
}
html[data-theme="cream"] .upill:hover { background: #F7F8FA; }
html[data-theme="cream"] .upill.active {
  color: #1E1E1E;
  border-color: #132A43;
  background: #fff;
}
html[data-theme="cream"] .search input {
  background: #fff;
  color: #1E1E1E;
  border-color: rgba(30, 30, 30, 0.12);
}
html[data-theme="cream"] .btn {
  background: #fff;
  color: #1E1E1E;
}
html[data-theme="cream"] .btn:hover { background: #F7F8FA; }
html[data-theme="cream"] .btn.primary { background: #C9A13B; border-color: #C9A13B; color: #0B0B0C; }
html[data-theme="cream"] .theme-toggle,
html[data-theme="cream"] .icon-btn { color: #6B6B6B; }
html[data-theme="cream"] .side-link.active,
html[data-theme="cream"] .side-col.active {
  background: rgba(201, 161, 59, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 #C9A13B;
}
html[data-theme="cream"] .panel,
html[data-theme="cream"] .card,
html[data-theme="cream"] .board-col,
html[data-theme="cream"] .lane {
  background: #fff;
}
html[data-theme="cream"] .card {
  border-color: rgba(19, 42, 67, 0.08);
  background: #fff;
}

html[data-theme="cream"] .udot.none,
html[data-theme="cream"] .urgency-dot.none {
  box-shadow: 0 0 0 1px rgba(28, 23, 16, 0.16) inset;
}

html[data-theme="cream"] .fu-row:hover,
html[data-theme="cream"] .trip-row:hover { background: rgba(70, 50, 20, 0.05); }

html[data-theme="cream"] .avatar {
  box-shadow: 0 0 0 2px rgba(28, 23, 16, 0.06);
}

html[data-theme="cream"] .lane {
  background: rgba(255, 255, 255, 0.45);
}
html[data-theme="cream"] .lane.drag-over {
  border-color: rgba(184, 137, 61, 0.55);
  background: rgba(212, 176, 106, 0.12);
}
html[data-theme="cream"] .lane-tab {
  background: rgba(255, 255, 255, 0.55);
}
html[data-theme="cream"] .ni-filter select {
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="cream"] .card {
  background: rgba(255, 255, 255, 0.9);
}

html[data-theme="cream"] .stat-icon.pink { background: rgba(232, 80, 140, 0.16); color: #be185d; }
html[data-theme="cream"] .stat-icon.red { background: rgba(226, 75, 75, 0.16); color: #b91c1c; }
html[data-theme="cream"] .stat-icon.teal { background: rgba(13, 148, 136, 0.16); color: #0f766e; }
html[data-theme="cream"] .stat-icon.purple { background: rgba(150, 90, 230, 0.16); color: #6d28d9; }

html[data-theme="cream"] .fu-when.urgent,
html[data-theme="cream"] .card-status.urgent { color: #b91c1c; }
html[data-theme="cream"] .card-status.due_soon { color: #1d4ed8; }

html[data-theme="cream"] .stage-tag[data-stage="new"] { color: #166534; background: rgba(52, 140, 90, 0.16); }
html[data-theme="cream"] .stage-tag[data-stage="follow_up"] { color: #92400e; background: rgba(184, 137, 61, 0.2); }
html[data-theme="cream"] .stage-tag[data-stage="qualified"] { color: #075985; background: rgba(14, 116, 144, 0.16); }
html[data-theme="cream"] .stage-tag[data-stage="not_interested"] { color: #991b1b; background: rgba(153, 50, 50, 0.14); }
html[data-theme="cream"] .stage-tag[data-stage="resale"] { color: #6b4f2a; background: rgba(122, 101, 72, 0.18); }
html[data-theme="cream"] .stage-tag[data-stage="site_tripping"] { color: #92400e; background: rgba(180, 130, 30, 0.18); }
html[data-theme="cream"] .stage-tag[data-stage="reserved"] { color: #065f46; background: rgba(16, 120, 80, 0.16); }
html[data-theme="cream"] .stage-tag[data-stage="condo"] { color: #5b21b6; background: rgba(76, 70, 150, 0.16); }
html[data-theme="cream"] .stage-tag[data-stage="other_projects"] { color: #3f6212; background: rgba(80, 100, 30, 0.16); }
html[data-theme="cream"] .stage-tag[data-stage="other_developers"] { color: #1e40af; background: rgba(30, 60, 100, 0.14); }

html[data-theme="cream"] .tag.proceeded { color: #166534; background: rgba(16, 120, 80, 0.16); }
html[data-theme="cream"] .tag.rescheduled { color: #92400e; background: rgba(180, 130, 30, 0.18); }
html[data-theme="cream"] .tag.cancelled { color: #991b1b; background: rgba(153, 50, 50, 0.14); }
html[data-theme="cream"] .tag.agent { color: #6b21a8; background: rgba(120, 70, 180, 0.16); }

html[data-theme="cream"] .toast,
html[data-theme="cream"] .modal,
html[data-theme="cream"] .modal-head,
html[data-theme="cream"] .modal-foot {
  background: #fffaf2;
}
html[data-theme="cream"] .nav-scrim,
html[data-theme="cream"] .modal-backdrop {
  background: rgba(40, 28, 12, 0.38);
}
html[data-theme="cream"] .modal {
  box-shadow: 0 24px 60px rgba(70, 50, 20, 0.18);
}
html[data-theme="cream"] .modal input,
html[data-theme="cream"] .modal select,
html[data-theme="cream"] .modal textarea,
html[data-theme="cream"] .opt-block input,
html[data-theme="cream"] .opt-add input,
html[data-theme="cream"] .col-edit-row input {
  background: rgba(255, 255, 255, 0.9);
}
html[data-theme="cream"] .add-option button,
html[data-theme="cream"] .opt-add button,
html[data-theme="cream"] .opt-row button,
html[data-theme="cream"] .col-edit-row button {
  background: rgba(255, 255, 255, 0.8);
}
html[data-theme="cream"] .lead-page-card {
  background: rgba(255, 255, 255, 0.7);
}

/* Keep colored tag chips readable but still tinted on cream */

/* ---- View switch, assignees, cold, quick actions, board, pin ---- */
.view-switch {
  display: inline-flex;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}
.view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--soft);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  cursor: pointer;
}
.view-btn.active {
  background: rgba(212, 176, 106, 0.16);
  color: var(--gold-2);
}
.assignee-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}
.apill {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--soft);
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.apill.active {
  background: rgba(212, 176, 106, 0.14);
  border-color: rgba(212, 176, 106, 0.4);
  color: var(--gold-2);
}
html[data-theme="cream"] .view-btn,
html[data-theme="cream"] .apill { color: #ece4d6; border-color: rgba(246, 239, 228, 0.14); background: rgba(255,255,255,0.06); }
html[data-theme="cream"] .view-switch { border-color: rgba(246, 239, 228, 0.14); }
html[data-theme="cream"] .view-btn.active,
html[data-theme="cream"] .apill.active { color: var(--gold-2); background: rgba(212, 176, 106, 0.16); }

.assignee-mark {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(212, 176, 106, 0.45);
  color: var(--gold-2);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.cold-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #7dd3fc;
  opacity: 0.8;
  background: rgba(56, 150, 200, 0.12);
  border-radius: 999px;
  padding: 1px 6px;
}
html[data-theme="cream"] .cold-tag { color: #0369a1; background: rgba(14, 116, 144, 0.12); opacity: 0.9; }
.side-urgency-item.cold { background: rgba(37, 99, 168, 0.18); }

.quick-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.qbtn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--soft);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  text-decoration: none;
}
.qbtn:hover { border-color: var(--gold); color: var(--gold-2); }

.card-notes, .board-card .card-notes {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-status.urgent, .board-card .card-status.urgent { color: #f87171; }
html[data-theme="cream"] .card-status.urgent { color: #b91c1c; }

.workspace.hidden-view, .board-view[hidden] { display: none !important; }
.board-view {
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 0 18px 16px;
  display: flex;
}
.board-cols {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.board-col {
  flex: 0 0 260px;
  max-width: 280px;
  min-width: 230px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
  scroll-snap-align: start;
}
.board-col.drag-over { border-color: rgba(212, 176, 106, 0.5); background: rgba(212, 176, 106, 0.06); }
.board-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 8px;
}
.board-col-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-col-head .lane-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.board-col .lane-tools { padding: 0 10px 6px; }
.board-col-cards {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 8px 10px;
}
.board-card h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.board-card .move-to { display: none; }

.done-pop {
  position: fixed;
  z-index: 70;
  width: min(320px, calc(100vw - 24px));
  background: var(--panel-2, #12182c);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.done-pop[hidden] { display: none !important; }
.done-pop-title { margin: 0; font-weight: 750; font-size: 15px; }
.done-pop label { font-size: 12px; font-weight: 650; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.done-pop input {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 12, 24, 0.55);
}
html[data-theme="cream"] .done-pop { background: #fff; }
html[data-theme="cream"] .done-pop input { background: #fff; }
.done-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #121417;
}
.pin-gate[hidden] { display: none !important; }
.pin-card {
  width: min(400px, 100%);
  background: #0B0B0C;
  color: #F7F8FA;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  text-align: center;
}
.pin-card .wordmark-name { font-size: 22px; letter-spacing: 0.04em; justify-content: center; }
.pin-card .wordmark-tagline { margin: 8px 0 16px; font-size: 7.5px; color: rgba(246, 239, 228, 0.75); }
.pin-card h1 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f6efe4;
}
.pin-lead { margin: 0 0 16px; color: rgba(246, 234, 211, 0.62); font-size: 13px; }
.pin-card form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.pin-card label { color: rgba(246, 234, 211, 0.7); font-size: 12px; font-weight: 650; display: flex; flex-direction: column; gap: 4px; }
.pin-card input {
  font: inherit;
  font-size: 22px;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(246, 239, 228, 0.16);
  background: rgba(0,0,0,0.28);
  color: #f6efe4;
}
.pin-card .btn { margin-top: 6px; width: 100%; justify-content: center; }
html[data-theme="cream"] .pin-gate {
  background: #F7F8FA;
}

@media (max-width: 860px), (pointer: coarse) {
  .view-switch { margin-left: auto; }
  .assignee-pills { flex: 1 1 100%; }
  .board-view { padding: 0 12px 16px; }
  .board-col { flex-basis: 78%; }
  .wordmark-name { font-size: 12.5px; letter-spacing: 0.12em; }
}

/* ---- Admin block, mini calendar, calendar page ---- */
.admin-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 2px;
}
.admin-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 44px;
  overflow: hidden;
  background: var(--navy);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
}
.admin-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-photo img[hidden] { display: none !important; }
.admin-initials {
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #fff;
}
.admin-photo img:not([hidden]) + .admin-initials { display: none; }
.admin-copy { min-width: 0; }
.admin-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #f3f7fb;
  line-height: 1.25;
}
.admin-role {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(232, 238, 244, 0.62);
  font-weight: 500;
}

.side-cols {
  flex: 0 0 auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
}
.mini-cal {
  flex: 0 0 auto;
  margin: 4px 2px 6px;
  background: #fff;
  color: #1E1E1E;
  border-radius: 12px;
  padding: 6px 8px 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.mini-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}
.mini-cal-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 750;
  color: #1E1E1E;
  text-align: center;
  flex: 1;
}
.mini-cal-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1E1E1E;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.mini-cal-nav:hover { background: var(--glass); }
.cal-weekdays,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.cal-weekdays span {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7a8ea0;
  padding: 2px 0 4px;
}
.cal-day {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1E1E1E;
  min-height: 28px;
  padding: 2px 0 3px;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
}
.cal-day:hover { background: var(--glass); }
.cal-day.muted { color: #b0bcc8; }
.cal-day.today { background: rgba(19, 42, 67, 0.12); font-weight: 800; }
.cal-day.selected { background: #132A43; color: #fff; }
.cal-day.selected .cal-dots span { box-shadow: 0 0 0 1px #fff; }
.cal-dots {
  display: flex;
  gap: 2px;
  min-height: 6px;
  justify-content: center;
}
.cal-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: block;
}
.cal-dots .tripping { background: #3aa0c8; }
.cal-dots .followup { background: #1f6f8b; }
.cal-dots .urgent { background: #e08a2c; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e6edf3;
  font-size: 9.5px;
  font-weight: 650;
  color: #5b7388;
}
.cal-legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.cal-legend .tripping { background: #3aa0c8; }
.cal-legend .followup { background: #1f6f8b; }
.cal-legend .urgent { background: #e08a2c; }

.mini-cal .cal-weekdays span {
  font-size: 8px;
  padding: 0 0 1px;
}
.mini-cal .cal-day {
  min-height: 17px;
  padding: 0;
  font-size: 9.5px;
  border-radius: 4px;
  gap: 0;
}
.mini-cal .cal-dots {
  min-height: 5px;
  gap: 1px;
}
.mini-cal .cal-dots span {
  width: 4px;
  height: 4px;
}
.mini-cal .cal-legend {
  margin-top: 3px;
  padding-top: 3px;
  font-size: 8.5px;
  gap: 3px 8px;
}

.calendar-page {
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 0 18px 16px;
  display: flex;
}
.calendar-page[hidden] { display: none !important; }
.cal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 12px;
  width: 100%;
  min-height: 0;
}
.cal-grid-card,
.cal-day-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  min-height: 0;
  overflow: auto;
}
.cal-grid-card .mini-cal-head h3 { font-size: 18px; color: inherit; }
.cal-grid-card .mini-cal-nav { color: inherit; width: 32px; height: 32px; font-size: 16px; }
.cal-grid-card .cal-weekdays span { font-size: 11px; padding: 8px 0; }
.cal-grid-card .cal-day {
  min-height: 64px;
  font-size: 13px;
  color: inherit;
  padding: 6px 4px;
}
.cal-grid-card .cal-dots span { width: 7px; height: 7px; }
.cal-grid-card .cal-legend { font-size: 12px; color: var(--muted); }
.cal-day-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 750;
}
.cal-item {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-item:hover { background: var(--glass); }
.cal-item-top { display: flex; align-items: center; gap: 8px; }
.cal-item-name { font-weight: 700; font-size: 13.5px; }
.cal-item-meta { font-size: 12px; color: var(--muted); }
.cal-empty { margin: 12px 0; color: var(--muted); font-size: 13px; }

body[data-page="calendar"] .stats,
body[data-page="calendar"] .workspace,
body[data-page="calendar"] .board-view,
body[data-page="calendar"] .view-switch,
body[data-page="calendar"] .assignee-pills,
body[data-page="calendar"] .urgency-pills,
body[data-page="calendar"] .search,
body[data-page="calendar"] .edit-title-btn,
body[data-page="calendar"] #add-lead,
body[data-page="calendar"] #leads-calendar {
  display: none !important;
}
body[data-page="buyers"] .stats,
body[data-page="buyers"] .workspace,
body[data-page="buyers"] .board-view,
body[data-page="buyers"] .view-switch,
body[data-page="buyers"] .urgency-pills,
body[data-page="buyers"] .search,
body[data-page="buyers"] .edit-title-btn,
body[data-page="buyers"] #add-lead,
body[data-page="buyers"] #leads-calendar,
body[data-page="buyers"] #calendar-page {
  display: none !important;
}

.admin-photo-edit {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-photo-edit .admin-photo { box-shadow: 0 0 0 2px rgba(19,42,67,0.12); }
html[data-theme="dark"] .admin-photo-edit .admin-photo { box-shadow: 0 0 0 2px rgba(255,255,255,0.12); }

html[data-theme="cream"] .view-btn,
html[data-theme="cream"] .apill { color: #2c4a66; border-color: rgba(19, 42, 67, 0.12); background: #fff; }
html[data-theme="cream"] .view-switch { border-color: rgba(19, 42, 67, 0.12); }
html[data-theme="cream"] .view-btn.active,
html[data-theme="cream"] .apill.active { color: #1E1E1E; background: rgba(19, 42, 67, 0.08); }

html[data-theme="cream"] .modal,
html[data-theme="cream"] .modal-head,
html[data-theme="cream"] .modal-foot,
html[data-theme="cream"] .toast,
html[data-theme="cream"] .done-pop {
  background: #fff;
  color: #1E1E1E;
}

@media (max-width: 1100px) {
  .cal-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 860px), (pointer: coarse) {
  .shell { padding: 0; gap: 0; }
  .sidebar { border-radius: 18px; }
  .brand-block { border-radius: 18px 18px 0 0; }
  .calendar-page { padding: 0 12px 16px; }
  .admin-block { padding-top: 8px; }
}

.sidebar .side-col { color: rgba(232, 238, 244, 0.88); }
.sidebar .side-urgency-item { color: #e8eef4; background: rgba(255,255,255,0.06); }
.sidebar .side-urgency-item strong { color: #fff; }
.sidebar .sidebar-foot { border-top-color: rgba(255,255,255,0.1); }

html[data-theme="cream"] .mobile-brand .wordmark-name { color: #111; }
html[data-theme="cream"] .mobile-brand .wordmark-name .rock { color: #111; }
html[data-theme="cream"] .mobile-brand .wordmark-name .homes { color: #C9A13B; }
html[data-theme="cream"] .mobile-brand .wordmark-sub { color: #C9A13B; }

.main { border-radius: 18px; }

/* ---- v9: FB page switcher, bottom calendar, notes ---- */
.title-stack { display: flex; flex-direction: column; min-width: 0; }
.page-subtitle {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
  max-width: 320px;
}
.fb-page-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  z-index: 45;
  flex: 0 0 auto;
}
.fb-page-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(320px, 46vw);
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(19, 42, 67, 0.1);
}
.fb-page-btn { border-color: #C9A13B; }
.fb-page-btn:hover { border-color: #C9A13B; }
.fb-page-btn[aria-expanded="true"] { border-color: #C9A13B; box-shadow: 0 0 0 3px rgba(201, 161, 59, 0.22); }
.fb-page-caret { color: #C9A13B; opacity: 1; }
.fb-page-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 11px;
  background: #8aa0b4;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
.fb-page-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-page-caret { font-size: 12px; opacity: 0.7; margin-left: 2px; }
.fb-page-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--panel);
  border: 1px solid var(--line-2);
  flex: 0 0 auto;
  white-space: nowrap;
}
.fb-page-open[hidden] { display: none !important; }
.fb-page-open:hover { border-color: #C9A13B; }
.fb-page-menu {
  position: fixed;
  min-width: 280px;
  max-width: 360px;
  max-height: min(70vh, 440px);
  overflow: auto;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(19, 42, 67, 0.2);
  z-index: 80;
  padding: 6px;
}
.fb-page-menu[hidden] { display: none !important; }
.fb-page-option {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.fb-page-option:hover { background: var(--glass); }
.fb-page-option.active { background: rgba(42, 90, 134, 0.16); }
.fb-page-option .fb-page-dot { flex: 0 0 10px; width: 10px; height: 10px; }

html[data-theme="cream"] .fb-page-btn,
html[data-theme="cream"] .fb-page-open,
html[data-theme="cream"] .fb-page-menu {
  background: #fff;
  color: #1E1E1E;
}

.leads-calendar {
  flex: 0 0 auto;
  min-height: 410px;
  height: 420px;
  padding: 0 18px 16px;
  display: flex;
}
body[data-page="leads"] .workspace,
body[data-page="leads"] .board-view {
  flex: 0 0 auto;
  min-height: 340px;
  height: 370px;
}
.leads-calendar .cal-grid-card .cal-day,
.calendar-page .cal-grid-card .cal-day {
  min-height: 44px;
  padding: 4px 2px;
}

.cal-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cal-day-head h2 { margin: 0; }
.cal-day-head .btn { flex: 0 0 auto; }

/* Note and urgency color codes on the calendar */
.cal-dots .urgent, .cal-legend i.urgent, .note-swatch.urgent { background: #e05656; }
.cal-dots .due_soon, .cal-legend i.due_soon, .note-swatch.due_soon { background: #3b82c8; }
.cal-dots .this_week, .cal-legend i.this_week, .note-swatch.this_week { background: #e3c14a; }
.cal-dots .later, .cal-legend i.later, .note-swatch.later { background: #4F8A66; }
.cal-dots .none, .cal-legend i.none, .note-swatch.none { background: #d5dbe2; box-shadow: 0 0 0 1px rgba(19,42,67,0.18) inset; }
.cal-dots .tripping, .cal-legend i.tripping, .note-swatch.tripping { background: #3aa0c8; }
.cal-dots .followup, .cal-legend i.followup { background: #1f6f8b; }

.note-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}
.note-colors {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.note-colors legend {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.note-colors label {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  font-weight: 650;
  cursor: pointer;
}
.cal-item.note .cal-item-name { font-weight: 700; }
.cal-note-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 860px), (pointer: coarse) {
  .fb-page-switch { flex: 1 1 100%; margin: 0; }
  .fb-page-btn { max-width: none; width: auto; flex: 1; }
  .leads-calendar { padding: 0 12px 16px; min-height: 320px; }
  .page-subtitle { max-width: none; }
}

/* ---- v10: Rockhomes wordmark, dual admins, buyers dashboard ---- */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 2px 2px;
}
.admin-list .admin-block { padding: 0; }
.admin-list .admin-photo { width: 36px; height: 36px; flex-basis: 36px; }
.admin-list .admin-name { font-size: 12px; }
.admin-list .admin-role { font-size: 10px; }

.buyers-page {
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 0 18px 16px;
  display: flex;
}
.buyers-page[hidden] { display: none !important; }
.buyers-card {
  flex: 1;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px 18px 8px;
  overflow: auto;
}
.buyers-table {
  width: 100%;
  border-collapse: collapse;
}
.buyers-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
}
.buyers-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
}
.buyers-row { cursor: pointer; }
.buyers-row:hover { background: var(--glass); }
.buyers-empty {
  margin: 28px 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  line-height: 1.45;
}
.buyers-dash-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
}
.buyers-dash-link:hover { opacity: 1; text-decoration: underline; }
.lane-head .buyers-dash-link,
.board-col-head .buyers-dash-link { margin-left: auto; }

#nav-buyers .side-link-label {
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

@media (max-width: 860px), (pointer: coarse) {
  .buyers-page { padding: 0 12px 16px; }
  .buyers-table { font-size: 13px; }
  .wordmark-name { font-size: 13px; letter-spacing: 0.02em; }
}



/* ---- v10 palette lock: black brand, navy sidebar/tiles, gold accents only ---- */
.fb-page-btn { border-color: #C9A13B; }
.fb-page-caret { color: #C9A13B; opacity: 1; }
html[data-theme="cream"] .fb-page-btn { border-color: #C9A13B; color: #1E1E1E; }
html[data-theme="cream"] .fb-page-caret { color: #C9A13B; }
html[data-theme="cream"] .wordmark-name .homes,
.wordmark-name .homes { color: #C9A13B; }
.logo-mark { background: #0B0B0C; }
@media (max-width: 860px), (pointer: coarse) {
  .brand-block { border-radius: 0; }
}


/* ---- v10 spacing: more whitespace, roomier rows, header wrap ---- */
body { line-height: 1.5; }
.shell { padding: 20px; gap: 24px; }
.topbar { gap: 12px 16px; padding: 16px 24px 14px; align-items: center; }
.urgency-pills {
  flex: 1 1 100%;
  order: 10;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.upill { padding: 7px 12px; line-height: 1.4; }
.assignee-pills { gap: 8px; }
.page-title { line-height: 1.3; }
.stats { gap: 24px; padding: 4px 24px 20px; }
.stat-tile { padding: 18px 20px; }
.workspace { gap: 24px; padding: 0 24px 24px; }
.board-view { padding: 0 24px 24px; }
.board-cols { gap: 16px; }
.leads-calendar { padding: 0 24px 24px; min-height: 430px; height: 440px; }
.calendar-page { padding: 0 24px 24px; }
.buyers-page { padding: 0 24px 24px; }
.buyers-card { padding: 20px 22px 16px; }
.buyers-table th { padding: 12px 16px 14px; }
.buyers-table td { padding: 16px; line-height: 1.5; }
.panel-head { padding: 16px 20px 12px; }
.panel-body { padding: 8px 16px 16px; }
.fu-row, .trip-row { padding: 12px 10px; gap: 12px; line-height: 1.5; }
.fu-name, .trip-name, .fu-note, .trip-note { line-height: 1.5; }
.card {
  padding: 16px 18px;
  gap: 8px;
}
.card h3 {
  line-height: 1.5;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-cards, .board-col-cards { gap: 12px; padding: 8px 10px 14px; }
.lane-head, .board-col-head { padding: 14px 14px 10px; gap: 8px; flex-wrap: wrap; }
.board-col-head { align-items: flex-start; }
body[data-page="leads"] .workspace,
body[data-page="leads"] .board-view {
  flex: 0 0 auto;
  min-height: 420px;
  height: auto;
}

.side-nav { gap: 4px; margin: 10px 0 8px; }
.side-link { padding: 8px 10px; min-height: 36px; line-height: 1.4; }
.side-urgency { gap: 6px; margin: 6px 0 8px; }
.side-urgency-item { min-height: 32px; padding: 6px 10px; }
.side-cols { gap: 2px; margin: 0 0 8px; }
.side-col {
  min-height: 32px;
  padding: 6px 8px;
  line-height: 1.4;
  box-sizing: border-box;
}
.admin-list { gap: 12px; padding: 10px 2px 8px; }
.admin-name, .admin-role, .cred-name, .cred-title, .cred-meta, .cred-prc { line-height: 1.45; }
.credentials { margin: 10px 2px 4px; gap: 8px; }
.sidebar-foot { padding-top: 8px; }

.pin-card { padding: 32px 32px 28px; }
.pin-card form { gap: 14px; }
.pin-lead, .pin-card label { line-height: 1.5; }
.pin-card h1 { line-height: 1.3; margin-bottom: 8px; }

@media (max-width: 860px), (pointer: coarse) {
  .shell { padding: 0; gap: 0; }
  .topbar { padding: 14px 16px 12px; }
  .stats { gap: 16px; padding: 4px 16px 16px; }
  .workspace { gap: 16px; padding: 0 16px 16px; }
  .board-view, .leads-calendar, .buyers-page, .calendar-page { padding: 0 16px 16px; }
  .top-actions { width: 100%; margin-left: 0; }
}


/* ---- v10 type hierarchy (DejaVu Sans) ---- */
body { font-size: 14px; }
.page-title { font-size: 29px; font-weight: 700; letter-spacing: 0.01em; }
.page-subtitle { font-size: 15px; font-weight: 500; max-width: 560px; line-height: 1.45; }
.panel-head h2,
.cal-day-head h2,
.calendar-page .panel-head h2,
.leads-calendar .panel-head h2,
.buyers-card h2,
.buyers-page h2 { font-size: 18.5px; font-weight: 700; letter-spacing: 0; }
.lane-title h3,
.board-col-head h3,
.buyers-table th { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.card h3,
.fu-name,
.trip-name { font-size: 15.5px; font-weight: 700; }
.stat-value { font-size: 32px; font-weight: 700; }
.stat-label { font-size: 14px; font-weight: 600; }
.side-link-label,
#nav-buyers .side-link-label { font-size: 15px; font-weight: 650; letter-spacing: 0.02em; }
.side-col { font-size: 14px; font-weight: 600; }
.btn { font-size: 14px; }

/* small meta: 12.5px minimum */
.panel-meta,
.fu-when,
.fu-action,
.trip-meta,
.lane-count,
.board-col-head .lane-count,
.side-count,
.cred-title,
.cred-meta,
.cred-prc,
.admin-role,
.admin-list .admin-role,
.sample-tag,
.stage-tag,
.tag,
.buyers-dash-link,
.soon-tag,
.hint,
.hint.compact,
.card-status,
.card-meta,
.fu-note,
.trip-note { font-size: 12.5px; }
.admin-name,
.admin-list .admin-name,
.cred-name { font-size: 14px; }
.pin-card h1 { font-size: 28px; font-weight: 700; }
.pin-lead, .pin-card label { font-size: 14px; }

@media (max-width: 860px), (pointer: coarse) {
  .page-title { font-size: 28px; }
  .stat-value { font-size: 30px; }
  .buyers-table { font-size: 14px; }
}


/* ---- v10 type overflow fixes ---- */
.card-top {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "avatar spacer mark dot"
    "name name name name";
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  min-width: 0;
}
.card-id { display: contents; overflow: visible; }
.card-id .avatar { grid-area: avatar; }
.card-id h3,
.card h3 {
  grid-area: name;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.assignee-mark { grid-area: mark; flex: 0 0 auto; }
.card-top > .urgency-dot { grid-area: dot; flex: 0 0 auto; }
.fu-name, .trip-name {
  white-space: normal;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-title, .board-col-head { flex-wrap: wrap; align-items: baseline; }
.lane-title .buyers-dash-link,
.board-col-head .buyers-dash-link {
  flex: 1 1 100%;
  margin-left: 0;
  display: block;
  white-space: normal;
  font-size: 12.5px;
  font-weight: 650;
  margin-top: 2px;
}


/* ---- v11: bigger brand, merged admins, single-line card names ---- */
.brand-block .logo-mark {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 14px;
}
.brand-block .wordmark-name {
  font-size: 20px;
  letter-spacing: 0.02em;
  font-family: "Montserrat", var(--label);
}
.brand-block .wordmark-tagline {
  font-size: 7.5px;
}
.admin-prc {
  margin: 1px 0 0;
  font-size: 12.5px;
  color: rgba(232, 238, 244, 0.62);
  line-height: 1.45;
}
html[data-theme="cream"] .admin-prc { color: rgba(232, 238, 244, 0.62); }
.card-top {
  display: grid !important;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "avatar spacer mark dot"
    "name name name name";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  min-width: 0;
  width: 100%;
}
.card-id { display: contents !important; overflow: visible; }
.card-id .avatar { grid-area: avatar; }
.card-id h3,
.card h3 {
  grid-area: name;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  overflow-wrap: normal;
  word-break: normal;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}
.assignee-mark { grid-area: mark; flex: 0 0 auto; }
.card-top > .urgency-dot { grid-area: dot; flex: 0 0 auto; }
#credentials[hidden] { display: none !important; }

@media (max-width: 860px), (pointer: coarse) {
  .title-block { flex-wrap: wrap; width: 100%; }
  .title-stack { flex: 1 1 100%; }
  .fb-page-switch { margin-left: 0; }
}

/* ---- v12 preview: sidebar FB page, workspaces, mini calendar, admin avatars, bot management ---- */
:root { --sidebar-w: 272px; }
.side-label {
  margin: 0 0 6px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 177, 90, 0.9);
}
.side-section { margin: 4px 0 12px; }
.sidebar .fb-page-switch { margin-left: 0; width: 100%; flex-wrap: wrap; z-index: 2; }
.sidebar .fb-page-btn {
  width: 100%;
  max-width: none;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(201, 161, 59, 0.75);
  font-size: 14px;
  padding: 10px 14px 10px 12px;
  box-shadow: none;
}
.sidebar .fb-page-btn:hover { background: rgba(255, 255, 255, 0.1); }
.sidebar .fb-page-name { flex: 1; text-align: left; }
.sidebar .fb-page-open { margin-top: 6px; color: #fff; background: transparent; border-color: rgba(255,255,255,0.18); }
.fb-page-switch.is-idle { opacity: 0.45; }
.fb-page-switch.is-idle::after {
  content: "Not used in Bot Management";
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0 4px;
  font-size: 10.5px;
  color: rgba(232, 238, 244, 0.7);
}
html[data-theme="cream"] .sidebar .fb-page-btn { background: rgba(255,255,255,0.06); color: #fff; }

.sidebar .side-nav { margin: 0 0 12px; gap: 3px; }
.sidebar .side-nav .side-link { padding: 9px 10px; }
.sidebar .side-nav .side-link-label { font-size: 13px; line-height: 1.3; }
.side-ico.emoji { font-size: 15px; width: 20px; color: inherit; }
.sidebar .side-link.active .side-ico.emoji { color: inherit; }

.side-cal { margin: 0 0 12px; }
.side-cal-head { display: flex; align-items: center; justify-content: space-between; }
.side-cal-head .side-label { margin-bottom: 6px; }
.side-cal-expand {
  appearance: none;
  border: 1px solid rgba(201, 161, 59, 0.6);
  background: transparent;
  color: #D4B15A;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  margin-bottom: 6px;
}
.side-cal-expand:hover { background: rgba(201, 161, 59, 0.14); }
.side-cal.expanded .side-cal-expand { background: #C9A13B; color: #0B0B0C; }
.sidebar .mini-cal { margin: 0; padding: 8px 8px 6px; border-radius: 14px; }
.sidebar .mini-cal .mini-cal-head h3 { font-size: 12px; }
.sidebar .mini-cal .cal-day { min-height: 22px; font-size: 10.5px; padding-top: 2px; }
.sidebar .mini-cal .cal-weekdays span { font-size: 9px; }
.sidebar .mini-cal .cal-dots span { width: 5px; height: 5px; }
.cal-legend.compact { font-size: 8.5px; gap: 3px 7px; color: #5b7388; }
.cal-legend.compact i { width: 6px; height: 6px; margin-right: 3px; }
.cal-dots .tripping, .cal-legend i.tripping, .note-swatch.tripping { background: #9b6ee0; }

.side-filters { margin: 0 0 10px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 8px; }
.side-filters summary {
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(232, 238, 244, 0.85);
  padding: 4px 6px;
  border-radius: 8px;
}
.side-filters summary::-webkit-details-marker { display: none; }
.side-filters summary::before { content: "▸"; color: #D4B15A; margin-right: 8px; display: inline-block; transition: transform 0.15s; }
.side-filters[open] summary::before { transform: rotate(90deg); }
.side-filters summary:hover { background: rgba(255,255,255,0.06); }
.side-filters .side-urgency { margin-top: 6px; }

.sidebar .sidebar-foot { margin-top: auto; padding-top: 8px; }
.side-admins {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 10px 2px 2px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.side-admins .admin-list { padding: 0 2px; gap: 10px; }

/* Round admin avatars: faces centered, never cut off at the top */
.admin-list .admin-photo,
.admin-photo-edit .admin-photo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  background: linear-gradient(145deg, #1b3a5c, #0f2236);
  box-shadow: 0 0 0 2px #C9A13B, 0 0 0 4px rgba(201, 161, 59, 0.18);
}
.admin-photo img {
  object-fit: cover;
  object-position: 50% 28%;
}
.admin-initials { color: #D4B15A; font-size: 14px; letter-spacing: 0.06em; }
.admin-list .admin-name { font-size: 13px; }
.admin-list .admin-role { font-size: 11px; }
.admin-list .admin-prc { font-size: 11px; line-height: 1.35; }

/* Medium calendar panel */
.cal-pop-scrim {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.45);
  z-index: 60;
}
.cal-pop-scrim[hidden], .cal-pop[hidden] { display: none !important; }
.cal-pop {
  position: fixed;
  top: 24px;
  left: calc(var(--sidebar-w) + 36px);
  width: min(760px, calc(100vw - var(--sidebar-w) - 72px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  z-index: 70;
  background: #fff;
  color: #1E1E1E;
  border-radius: 20px;
  border-top: 3px solid #C9A13B;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  padding: 18px 20px 20px;
  box-sizing: border-box;
}
.cal-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-pop-head h2 { margin: 0; font-size: 22px; font-weight: 800; color: #132A43; }
.cal-pop-actions { display: flex; align-items: center; gap: 8px; }
.cal-pop .btn { background: #fff; color: #132A43; border: 1px solid rgba(19,42,67,0.18); }
.cal-pop .btn:hover { background: #F7F8FA; }
.cal-pop .btn.primary { background: #C9A13B; border-color: #C9A13B; color: #0B0B0C; }
.cal-pop .cal-collapse { color: #132A43; border: 1px solid rgba(19,42,67,0.18); width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.cal-pop-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
.cal-pop-grid .mini-cal-head h3 { font-size: 16px; color: #132A43; }
.cal-pop-grid .mini-cal-nav { width: 30px; height: 30px; font-size: 16px; color: #132A43; }
.cal-pop-grid .cal-weekdays span { font-size: 11px; padding: 6px 0; }
.cal-pop-grid .cal-day { min-height: 42px; font-size: 13px; padding-top: 5px; }
.cal-pop-grid .cal-dots span { width: 6px; height: 6px; }
.cal-pop-grid .cal-legend { font-size: 11px; }
.cal-pop-side { min-width: 0; border-left: 1px solid #e6edf3; padding-left: 18px; }
.cal-pop-side .cal-day-head h3 { margin: 0; font-size: 15px; font-weight: 750; color: #132A43; }
.cal-pop .cal-item { color: #1E1E1E; border-color: #e6edf3; }
.cal-pop .cal-item:hover { background: #F7F8FA; }
.cal-pop .cal-item-meta, .cal-pop .cal-empty { color: #6B6B6B; }
.cal-item-note { font-size: 12px; color: var(--muted); display: block; white-space: pre-wrap; }
.sched-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 12px;
  background: #F7F8FA;
  border: 1px solid #e6edf3;
  border-radius: 14px;
}
.sched-form[hidden] { display: none !important; }
.sched-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #3b4a5a; }
.sched-form input, .sched-form textarea {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: #1E1E1E;
  background: #fff;
  border: 1px solid rgba(19,42,67,0.18);
  border-radius: 10px;
  padding: 8px 10px;
}
.sched-form input:focus, .sched-form textarea:focus { outline: 2px solid rgba(201,161,59,0.5); border-color: #C9A13B; }
.sched-colors { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sched-colors legend { font-size: 12px; font-weight: 700; color: #3b4a5a; margin-bottom: 6px; padding: 0; }
.sched-colors label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(19,42,67,0.16);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.sched-colors input { position: absolute; opacity: 0; pointer-events: none; }
.sched-colors label:has(input:checked) { border-color: #C9A13B; box-shadow: 0 0 0 2px rgba(201,161,59,0.3); background: #fffaf0; }
.sched-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cal-pop .form-error { margin: 0; }

/* Bot Management placeholder */
.bots-page { flex: 1; min-height: 0; min-width: 0; padding: 0 24px 24px; display: flex; }
.bots-page[hidden] { display: none !important; }
body[data-page="bots"] .stats,
body[data-page="bots"] .workspace,
body[data-page="bots"] .board-view,
body[data-page="bots"] .view-switch,
body[data-page="bots"] .assignee-pills,
body[data-page="bots"] .urgency-pills,
body[data-page="bots"] .search,
body[data-page="bots"] .edit-title-btn,
body[data-page="bots"] #add-lead,
body[data-page="bots"] #leads-calendar,
body[data-page="bots"] #calendar-page,
body[data-page="bots"] #buyers-page { display: none !important; }
.bots-card {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid #C9A13B;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 30px;
  align-self: flex-start;
}
.bots-hero { display: flex; align-items: center; gap: 16px; }
.bots-emoji { font-size: 40px; width: 64px; height: 64px; display: grid; place-items: center; background: rgba(201,161,59,0.14); border-radius: 18px; }
.bots-hero h2 { margin: 0; font-size: 26px; font-weight: 800; }
.bots-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.bots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.bots-tile { border: 1px dashed var(--line-2); border-radius: 16px; padding: 18px; }
.bots-tile-title { margin: 0; font-weight: 750; font-size: 15px; }
.bots-tile-who { margin: 6px 0 0; font-size: 12px; color: var(--gold-2); font-weight: 700; letter-spacing: 0.04em; }

/* The sidebar mini calendar replaces the big calendar under the leads board */
body[data-page="leads"] #leads-calendar { display: none !important; }

@media (max-width: 860px), (pointer: coarse) {
  .cal-pop {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-height: 88dvh;
    border-radius: 20px 20px 0 0;
    padding: 16px 14px 20px;
  }
  .cal-pop-body { grid-template-columns: 1fr; }
  .cal-pop-side { border-left: 0; padding-left: 0; border-top: 1px solid #e6edf3; padding-top: 12px; }
  .bots-page { padding: 0 12px 16px; }
  .bots-grid { grid-template-columns: 1fr; }
  .bots-card { padding: 20px; }
}

/* ---- v12 preview: stat icons, project colors, lane headers ---- */
.stats .stat-icon,
.stat-tile .stat-icon,
.stat-tile.tint-new .stat-icon,
.stat-tile.tint-urgent .stat-icon,
.stat-tile.tint-trip .stat-icon,
.stat-tile.tint-reserved .stat-icon,
html[data-theme="cream"] .stat-tile .stat-icon {
  background: #FBF7EC !important;
  color: #C9A24A !important;
  border-radius: 50% !important;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  box-shadow: 0 0 0 2px rgba(201, 162, 74, 0.45), 0 4px 12px rgba(0, 0, 0, 0.18);
}
.stat-tile .stat-icon svg { stroke: #C9A24A; color: #C9A24A; width: 21px; height: 21px; }

/* Project tags: each project's own color, white text, everywhere */
.tag-chip.proj-tag,
html[data-theme="cream"] .tag-chip.proj-tag {
  background: var(--proj, #2B2B2E) !important;
  color: #fff !important;
  border-color: transparent;
  font-size: 10.5px;
  padding: 3px 9px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}
.tag-chip.proj-tag a { color: #fff !important; }
.tag-chip.proj-tag:hover, .tag-chip.proj-tag:focus-within { border-color: rgba(255,255,255,0.7); }
.trip-tags { margin-top: 4px; display: flex; }
.buyer-proj { margin-right: 6px; }

/* Lead cards: subtle tint of the project color so projects read at a glance */
.card.has-proj {
  background: linear-gradient(0deg, color-mix(in srgb, var(--proj) 16%, transparent), color-mix(in srgb, var(--proj) 16%, transparent)), var(--card-base, rgb(22, 30, 54));
  box-shadow: inset 4px 0 0 var(--proj), var(--shadow);
}
html[data-theme="cream"] .card.has-proj {
  background: color-mix(in srgb, var(--proj) 9%, #ffffff);
  box-shadow: inset 4px 0 0 var(--proj), 0 4px 14px rgba(19,42,67,0.08);
}
/* The Glens: very light green card + dark green tag */
.card.has-proj[data-proj="the-glens"] {
  background: linear-gradient(0deg, rgba(120, 200, 140, 0.16), rgba(120, 200, 140, 0.16)), var(--card-base, rgb(22, 30, 54));
}
html[data-theme="cream"] .card.has-proj[data-proj="the-glens"] { background: #EEF7F0; }

/* Lead Stages: white headers on dark, gold when selected */
.lane-title h3, .board-col-head h3 { color: #fff; }
.lane-count { color: rgba(255,255,255,0.75); }
.lane-tab { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); }
.lane-tab:hover { color: #fff; }
.lane-tab.active { color: #D4B15A; background: rgba(201, 161, 59, 0.18); box-shadow: inset 0 0 0 1px rgba(201,161,59,0.5); }
html[data-theme="cream"] .lane-title h3 { color: #132A43; }
html[data-theme="cream"] .lane-tab { color: #3b4a5a; background: rgba(19,42,67,0.06); }
html[data-theme="cream"] .lane-tab.active { color: #8a6a14; background: rgba(201,161,59,0.18); }

/* Sidebar foot: compact row so admins fit at the bottom */
.sidebar .sidebar-foot { display: flex; gap: 4px; }
.sidebar .sidebar-foot .side-link { flex: 1; padding: 7px 8px; }
.sidebar .sidebar-foot .side-link-label { font-size: 12px; }

/* Stat tiles follow the selected FB page color (navy on All pages) */
body[data-fbpage]:not([data-fbpage="all"]) .stat-tile,
html[data-theme="cream"] body[data-fbpage]:not([data-fbpage="all"]) .stat-tile {
  background: var(--page-color, var(--navy)) !important;
  border-top-color: #C9A13B;
}
body[data-fbpage]:not([data-fbpage="all"]) .stat-tile .stat-label,
body[data-fbpage]:not([data-fbpage="all"]) .stat-tile .stat-value { color: #fff !important; }

/* Tighter sidebar so the admins fit at the bottom */
.sidebar .side-section { margin: 2px 0 8px; }
.sidebar .side-nav { margin-bottom: 8px; gap: 1px; }
.sidebar .side-nav .side-link { padding: 7px 10px; }
.sidebar .side-cal { margin-bottom: 8px; }
.sidebar .mini-cal .cal-day { min-height: 20px; }
.sidebar .side-filters { margin-bottom: 4px; padding-top: 4px; }
.sidebar .sidebar-foot { padding-top: 4px; }
.sidebar .side-admins { margin-top: 4px; padding-top: 6px; }
.sidebar .side-admins .admin-list { gap: 8px; }
.sidebar .side-label { margin-bottom: 4px; }
.sidebar .brand-block { margin-bottom: 8px; padding-bottom: 10px; }
.sidebar .fb-page-switch { flex-wrap: wrap; gap: 6px; }
.sidebar .fb-page-btn { flex: 1 1 150px; width: auto; }
.sidebar .fb-page-open { margin-top: 0; flex: 0 0 auto; }
.sidebar .side-nav #nav-buyers .side-link-label { font-size: 13px; font-weight: 600; letter-spacing: 0; }

/* ===== Round 2 preview ===== */
/* Logo row: R mark left, wordmark + tagline right, solid black block */
.sidebar .brand-block {
  background: #0B0B0C;
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(201, 161, 59, 0.35);
}
.sidebar .brand-block .wordmark {
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 0;
}
.sidebar .brand-block .logo-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(201, 161, 59, 0.55), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.sidebar .brand-block .wordmark-text { width: auto; flex: 1 1 auto; min-width: 0; }
.sidebar .brand-block .wordmark-name { font-size: 21px; letter-spacing: 0.03em; line-height: 1.05; }
.sidebar .brand-block .wordmark-tagline {
  display: block;
  margin: 5px 0 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  text-align: left;
  color: rgba(246, 239, 228, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .brand-block .wordmark-tagline::first-letter { text-transform: uppercase; }
.sidebar .brand-block .wordmark-tagline::before,
.sidebar .brand-block .wordmark-tagline::after { content: none; display: none; }

/* Modals sit above the calendar panel */
.modal-backdrop { z-index: 90; }

/* Generic custom dropdown */
.pick { position: relative; display: inline-block; }
.pick[hidden] { display: none !important; }
.pick-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  max-width: 100%;
}
.pick.open .pick-btn, .pick-btn:hover { border-color: #C9A13B; }
.pick-caret { color: #C9A13B; font-size: 11px; }
.pick-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  z-index: 95;
  background: #fff;
  color: #1E1E1E;
  border: 1px solid rgba(19, 42, 67, 0.14);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  padding: 5px;
  max-height: 260px;
  overflow: auto;
}
.pick-menu[hidden] { display: none !important; }
.pick-opt {
  appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.pick-opt:hover { background: #F2F4F7; }
.pick-opt.active { background: rgba(201, 161, 59, 0.16); }
.pick.small .pick-btn { font-size: 10.5px; padding: 4px 8px; border-radius: 8px; gap: 4px; background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.18); width: 100%; justify-content: space-between; }
.pick.small .pick-label { color: rgba(255,255,255,0.6); font-weight: 600; }
.pick.small .pick-value { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.small .pick-opt { font-size: 12px; padding: 7px 9px; }
.pick.small .pick-menu { min-width: 170px; }
html[data-theme="cream"] .pick.small .pick-btn { background: #fff; color: #1E1E1E; border-color: rgba(19,42,67,0.18); }
html[data-theme="cream"] .pick.small .pick-label { color: #6B6B6B; }
.others-tools { display: flex; flex-direction: column; gap: 5px; padding: 0 8px 6px; }
.others-tools .pick { width: 100%; }

/* Trip source tags */
.trip-src-tag {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  color: #fff;
}
.trip-src-tag.inbox { background: #5b4bb7; }
.trip-src-tag.walk_in { background: #0f766e; }
.trip-src-tag.referral { background: #b45309; }
.trip-src-tag.call { background: #1d4ed8; }
.pick-opt .trip-src-tag { font-size: 12px; padding: 3px 10px; }
.trip-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag.scheduled { color: #ddd6fe; background: rgba(124, 92, 220, 0.3); }
.cal-pop .tag.scheduled { color: #5b21b6; background: rgba(124, 92, 220, 0.14); }
.cal-pop .tag.rescheduled { color: #92400e; background: rgba(180, 130, 30, 0.16); }
.cal-pop .tag.cancelled { color: #b91c1c; background: rgba(153, 50, 50, 0.12); }
.cal-pop .tag.proceeded { color: #166534; background: rgba(16, 120, 80, 0.14); }

/* Tripping dots: purple; cancelled = hollow ring */
.cal-dots .tripping { background: #8b5cf6; }
.cal-legend i.tripping { background: #8b5cf6; }
.cal-dots .tripping_cancelled { background: transparent; box-shadow: inset 0 0 0 1.5px #8b5cf6; }
.cal-item.trip .cal-item-top { flex-wrap: wrap; }
.cal-item.trip.is-cancelled .cal-item-name { text-decoration: line-through; opacity: 0.7; }

/* Calendar panel: two action buttons + tripping detail card */
.cal-day-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.cal-day-btns .btn { padding: 7px 11px; font-size: 12.5px; }
.cal-pop .cal-day-head { flex-wrap: wrap; }
.trip-detail {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #F6F3FF;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-left: 4px solid #8b5cf6;
}
.trip-detail[hidden] { display: none !important; }
.trip-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trip-detail-title { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #1E1E1E; }
.trip-detail-close { color: #132A43; width: 28px; height: 28px; }
.trip-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 4px; }
.trip-detail-when { margin: 0 0 8px; font-size: 12px; color: #5b5b6b; font-weight: 600; }
.trip-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.trip-facts div { min-width: 0; }
.trip-facts dt { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6d5aa8; }
.trip-facts dd { margin: 1px 0 0; font-size: 13px; color: #1E1E1E; overflow-wrap: anywhere; }
.trip-facts .muted { color: #9aa3ad; }
.trip-detail-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

/* Trip modal extras */
.trip-source-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.trip-source-row .field-label { font-size: 12.5px; font-weight: 700; }
.trip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.trip-grid label { min-width: 0; }
.hint-inline { font-weight: 500; color: var(--muted); font-size: 11px; }

/* ---- The Glens palette ---- */
body[data-fbpage="the-glens"] { --page-color: #1B5E20 !important; }
.tag-chip.proj-tag[data-proj="the-glens"] { background: #1B5E20 !important; }
.card.has-proj[data-proj="the-glens"] {
  --proj: #388E3C;
  background: linear-gradient(0deg, rgba(56, 142, 60, 0.2), rgba(56, 142, 60, 0.2)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #388E3C, var(--shadow);
}
.card.has-proj[data-proj="the-glens"]:hover { border-color: #388E3C; }
html[data-theme="cream"] .card.has-proj[data-proj="the-glens"] {
  background: #E7FFEA;
  box-shadow: inset 4px 0 0 #388E3C, 0 4px 14px rgba(19,42,67,0.08);
}
body[data-fbpage="the-glens"] .lane-tab.active {
  background: #C7FFCF;
  color: #1B5E20;
  box-shadow: inset 0 0 0 1px #388E3C;
}
body[data-fbpage="the-glens"] .lane-tab:hover { color: #C7FFCF; }
body[data-fbpage="the-glens"] .sidebar .fb-page-btn { border-color: #388E3C; box-shadow: inset 0 0 0 1px #388E3C; }
body[data-fbpage="the-glens"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #388E3C; }
body[data-fbpage="the-glens"] .cal-day:not(.selected):has(.cal-dots span) { background: #C7FFCF; }
body[data-fbpage="the-glens"] .fu-row:hover,
body[data-fbpage="the-glens"] .trip-row:hover { box-shadow: inset 3px 0 0 #388E3C; }

@media (max-width: 860px), (pointer: coarse) {
  .trip-grid, .trip-facts { grid-template-columns: 1fr 1fr; }
  .cal-day-btns .btn { padding: 8px 12px; }
}
.trip-src-tag[hidden] { display: none !important; }

/* ---- Southwind palette (official presentation) ---- */
body[data-fbpage="southwind"] { --page-color: #113555 !important; }
.tag-chip.proj-tag[data-proj="southwind"] { background: #113555 !important; box-shadow: inset 0 0 0 1px rgba(0, 175, 172, 0.55); }
.card.has-proj[data-proj="southwind"] {
  --proj: #00AFAC;
  background: linear-gradient(0deg, rgba(0, 175, 172, 0.16), rgba(0, 175, 172, 0.16)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #00AFAC, var(--shadow);
}
.card.has-proj[data-proj="southwind"]:hover { border-color: #00AFAC; }
html[data-theme="cream"] .card.has-proj[data-proj="southwind"] {
  background: #E6F6FB;
  box-shadow: inset 4px 0 0 #00AFAC, 0 4px 14px rgba(19,42,67,0.08);
}
body[data-fbpage="southwind"] .stat-tile { border-top-color: #00AFAC !important; }
body[data-fbpage="southwind"] .lane-tab.active { background: #CDEBFA; color: #113555; box-shadow: inset 0 0 0 1px #00AFAC; }
body[data-fbpage="southwind"] .lane-tab:hover { color: #CDEBFA; }
body[data-fbpage="southwind"] .sidebar .fb-page-btn { border-color: #00AFAC; box-shadow: inset 0 0 0 1px #00AFAC; }
body[data-fbpage="southwind"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #00AFAC; }
body[data-fbpage="southwind"] .cal-day:not(.selected):has(.cal-dots span) { background: #CDEBFA; }
body[data-fbpage="southwind"] .fu-row:hover,
body[data-fbpage="southwind"] .trip-row:hover { box-shadow: inset 3px 0 0 #00AFAC; }

/* ---- Cerulean palette (official logo #18ADD5) ---- */
body[data-fbpage="cerulean"] { --page-color: #0B7FA3 !important; }
.tag-chip.proj-tag[data-proj="cerulean"] { background: #0B7FA3 !important; }
.card.has-proj[data-proj="cerulean"] {
  --proj: #18ADD5;
  background: linear-gradient(0deg, rgba(24, 173, 213, 0.16), rgba(24, 173, 213, 0.16)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #18ADD5, var(--shadow);
}
.card.has-proj[data-proj="cerulean"]:hover { border-color: #18ADD5; }
html[data-theme="cream"] .card.has-proj[data-proj="cerulean"] {
  background: #E3F6FC;
  box-shadow: inset 4px 0 0 #18ADD5, 0 4px 14px rgba(19,42,67,0.08);
}
body[data-fbpage="cerulean"] .stat-tile { border-top-color: #18ADD5 !important; }
body[data-fbpage="cerulean"] .lane-tab.active { background: #B8E9F7; color: #0B5F7A; box-shadow: inset 0 0 0 1px #18ADD5; }
body[data-fbpage="cerulean"] .lane-tab:hover { color: #B8E9F7; }
body[data-fbpage="cerulean"] .sidebar .fb-page-btn { border-color: #18ADD5; box-shadow: inset 0 0 0 1px #18ADD5; }
body[data-fbpage="cerulean"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #18ADD5; }
body[data-fbpage="cerulean"] .cal-day:not(.selected):has(.cal-dots span) { background: #B8E9F7; }
body[data-fbpage="cerulean"] .fu-row:hover,
body[data-fbpage="cerulean"] .trip-row:hover { box-shadow: inset 3px 0 0 #18ADD5; }

/* ---- Stat-tile icons themed per page (gold stays for All pages / others) ---- */
.stat-tile .stat-icon svg { stroke-width: 2.2; }
body[data-fbpage="the-glens"] .stat-tile .stat-icon,
body[data-fbpage="southwind"] .stat-tile .stat-icon,
body[data-fbpage="cerulean"] .stat-tile .stat-icon { color: #fff !important; }
body[data-fbpage="the-glens"] .stat-tile .stat-icon svg,
body[data-fbpage="southwind"] .stat-tile .stat-icon svg,
body[data-fbpage="cerulean"] .stat-tile .stat-icon svg { stroke: #fff; color: #fff; stroke-width: 2.4; width: 22px; height: 22px; }
body[data-fbpage="the-glens"] .stat-tile .stat-icon { background: #388E3C !important; box-shadow: 0 0 0 2px #C7FFCF, 0 4px 12px rgba(0,0,0,0.25) !important; }
body[data-fbpage="southwind"] .stat-tile .stat-icon { background: #00AFAC !important; box-shadow: 0 0 0 2px #CDEBFA, 0 4px 12px rgba(0,0,0,0.25) !important; }
body[data-fbpage="cerulean"] .stat-tile .stat-icon { background: #18ADD5 !important; box-shadow: 0 0 0 2px #B8E9F7, 0 4px 12px rgba(0,0,0,0.25) !important; }
body[data-fbpage="the-glens"] .stat-tile .stat-icon svg,
body[data-fbpage="southwind"] .stat-tile .stat-icon svg,
body[data-fbpage="cerulean"] .stat-tile .stat-icon svg { width: 24px; height: 24px; stroke-width: 2.6; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45)); }
/* #18ADD5 is too light under a white icon on the #0B7FA3 tile, so use a deeper cerulean circle */
body[data-fbpage="cerulean"] .stat-tile .stat-icon { background: #065F7C !important; }

/* ---- Page logo badge in the header ---- */
.page-logo-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 6px 12px;
  margin-right: 10px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 6px 16px rgba(0,0,0,0.3);
  box-sizing: border-box;
}
.page-logo-badge[hidden] { display: none !important; }
.page-logo-badge img { display: block; height: 44px; width: auto; max-width: 150px; object-fit: contain; }
body[data-page="bots"] .page-logo-badge { display: none !important; }
html[data-theme="cream"] .page-logo-badge { box-shadow: 0 0 0 1px rgba(19,42,67,0.1), 0 4px 12px rgba(19,42,67,0.1); }
@media (max-width: 860px), (pointer: coarse) {
  .page-logo-badge { height: 42px; padding: 4px 8px; border-radius: 10px; margin-right: 8px; }
  .page-logo-badge img { height: 34px; max-width: 110px; }
  .title-block .title-stack { flex: 1 1 0; min-width: 0; }
}

/* ---- Havila palette (sampled from logo: #163A16 dark, #4EA230 bright, #427E26 mid) ---- */
body[data-fbpage="havila"] { --page-color: #163A16 !important; }
.tag-chip.proj-tag[data-proj="havila"] { background: #163A16 !important; box-shadow: inset 0 0 0 1px rgba(78, 162, 48, 0.6); }
.card.has-proj[data-proj="havila"] {
  --proj: #4EA230;
  background: linear-gradient(0deg, rgba(78, 162, 48, 0.15), rgba(78, 162, 48, 0.15)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #4EA230, var(--shadow);
}
.card.has-proj[data-proj="havila"]:hover { border-color: #4EA230; }
html[data-theme="cream"] .card.has-proj[data-proj="havila"] { background: #EEF8E9; box-shadow: inset 4px 0 0 #4EA230, 0 4px 14px rgba(19,42,67,0.08); }
body[data-fbpage="havila"] .stat-tile { border-top-color: #4EA230 !important; }
body[data-fbpage="havila"] .lane-tab.active { background: #D6F0C9; color: #163A16; box-shadow: inset 0 0 0 1px #4EA230; }
body[data-fbpage="havila"] .lane-tab:hover { color: #D6F0C9; }
body[data-fbpage="havila"] .sidebar .fb-page-btn { border-color: #4EA230; box-shadow: inset 0 0 0 1px #4EA230; }
body[data-fbpage="havila"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #4EA230; }
body[data-fbpage="havila"] .cal-day:not(.selected):has(.cal-dots span) { background: #D6F0C9; }
body[data-fbpage="havila"] .fu-row:hover,
body[data-fbpage="havila"] .trip-row:hover { box-shadow: inset 3px 0 0 #4EA230; }
body[data-fbpage="havila"] .stat-tile .stat-icon { background: #427E26 !important; color: #fff !important; box-shadow: 0 0 0 2px #D6F0C9, 0 4px 12px rgba(0,0,0,0.3) !important; }
body[data-fbpage="havila"] .stat-tile .stat-icon svg { stroke: #fff; color: #fff; width: 24px; height: 24px; stroke-width: 2.6; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45)); }
@media (max-width: 860px), (pointer: coarse) {
  .title-block .title-stack { flex: 1 1 100%; }
  .page-logo-badge { margin: 0 0 4px; }
}


/* ---- Princeton Heights: PRINCETON blue #356595, HEIGHTS steel blue #7CA9BE ---- */
body[data-fbpage="princeton-heights"] { --page-color: #356595 !important; }
.tag-chip.proj-tag[data-proj="princeton-heights"] { background: #356595 !important; box-shadow: inset 0 0 0 1px rgba(124,169,190,0.6); }
.card.has-proj[data-proj="princeton-heights"] {
  --proj: #7CA9BE;
  background: linear-gradient(0deg, rgba(124,169,190,0.14), rgba(124,169,190,0.14)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #7CA9BE, var(--shadow);
}
.card.has-proj[data-proj="princeton-heights"]:hover { border-color: #7CA9BE; }
html[data-theme="cream"] .card.has-proj[data-proj="princeton-heights"] { background: #EAF3F8; box-shadow: inset 4px 0 0 #7CA9BE, 0 4px 14px rgba(19,42,67,0.08); }
body[data-fbpage="princeton-heights"] .stat-tile { border-top-color: #7CA9BE !important; }
body[data-fbpage="princeton-heights"] .lane-tab.active { background: #CFE3EE; color: #356595; box-shadow: inset 0 0 0 1px #7CA9BE; }
body[data-fbpage="princeton-heights"] .lane-tab:hover { color: #CFE3EE; }
body[data-fbpage="princeton-heights"] .sidebar .fb-page-btn { border-color: #7CA9BE; box-shadow: inset 0 0 0 1px #7CA9BE; }
body[data-fbpage="princeton-heights"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #7CA9BE; }
body[data-fbpage="princeton-heights"] .cal-day:not(.selected):has(.cal-dots span) { background: #CFE3EE; }
body[data-fbpage="princeton-heights"] .fu-row:hover,
body[data-fbpage="princeton-heights"] .trip-row:hover { box-shadow: inset 3px 0 0 #7CA9BE; }
body[data-fbpage="princeton-heights"] .stat-tile .stat-icon { background: #1E3F66 !important; color: #fff !important; box-shadow: 0 0 0 2px #CFE3EE, 0 4px 12px rgba(0,0,0,0.3) !important; }
body[data-fbpage="princeton-heights"] .stat-tile .stat-icon svg { stroke: #fff; color: #fff; width: 24px; height: 24px; stroke-width: 2.6; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.45)); }

/* ---- Ventura Real: script slate #455F6C, sun gold #F2D225, Pueblo Solana red #6C1E24 ---- */
body[data-fbpage="ventura-real"] { --page-color: #455F6C !important; }
.tag-chip.proj-tag[data-proj="ventura-real"] { background: #455F6C !important; box-shadow: inset 0 0 0 1px rgba(242,210,37,0.6); }
.card.has-proj[data-proj="ventura-real"] {
  --proj: #F2D225;
  background: linear-gradient(0deg, rgba(242,210,37,0.14), rgba(242,210,37,0.14)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #F2D225, var(--shadow);
}
.card.has-proj[data-proj="ventura-real"]:hover { border-color: #F2D225; }
html[data-theme="cream"] .card.has-proj[data-proj="ventura-real"] { background: #FFF9E0; box-shadow: inset 4px 0 0 #D9B814, 0 4px 14px rgba(19,42,67,0.08); }
body[data-fbpage="ventura-real"] .stat-tile { border-top-color: #F2D225 !important; }
body[data-fbpage="ventura-real"] .lane-tab.active { background: #FBEBA5; color: #455F6C; box-shadow: inset 0 0 0 1px #F2D225; }
body[data-fbpage="ventura-real"] .lane-tab:hover { color: #FBEBA5; }
body[data-fbpage="ventura-real"] .sidebar .fb-page-btn { border-color: #F2D225; box-shadow: inset 0 0 0 1px #F2D225; }
body[data-fbpage="ventura-real"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #F2D225; }
body[data-fbpage="ventura-real"] .cal-day:not(.selected):has(.cal-dots span) { background: #FBEBA5; }
body[data-fbpage="ventura-real"] .fu-row:hover,
body[data-fbpage="ventura-real"] .trip-row:hover { box-shadow: inset 3px 0 0 #F2D225; }
body[data-fbpage="ventura-real"] .stat-tile .stat-icon { background: #6C1E24 !important; color: #fff !important; box-shadow: 0 0 0 2px #F2D225, 0 4px 12px rgba(0,0,0,0.3) !important; }
body[data-fbpage="ventura-real"] .stat-tile .stat-icon svg { stroke: #fff; color: #fff; width: 24px; height: 24px; stroke-width: 2.6; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.45)); }

/* ---- Pineview: Pine green #017337, view lime #4FA800 ---- */
body[data-fbpage="fine-space-pineview"] { --page-color: #017337 !important; }
.tag-chip.proj-tag[data-proj="fine-space-pineview"] { background: #017337 !important; box-shadow: inset 0 0 0 1px rgba(79,168,0,0.6); }
.card.has-proj[data-proj="fine-space-pineview"] {
  --proj: #4FA800;
  background: linear-gradient(0deg, rgba(79,168,0,0.14), rgba(79,168,0,0.14)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #4FA800, var(--shadow);
}
.card.has-proj[data-proj="fine-space-pineview"]:hover { border-color: #4FA800; }
html[data-theme="cream"] .card.has-proj[data-proj="fine-space-pineview"] { background: #EEF9E3; box-shadow: inset 4px 0 0 #4FA800, 0 4px 14px rgba(19,42,67,0.08); }
body[data-fbpage="fine-space-pineview"] .stat-tile { border-top-color: #4FA800 !important; }
body[data-fbpage="fine-space-pineview"] .lane-tab.active { background: #D5F0B5; color: #017337; box-shadow: inset 0 0 0 1px #4FA800; }
body[data-fbpage="fine-space-pineview"] .lane-tab:hover { color: #D5F0B5; }
body[data-fbpage="fine-space-pineview"] .sidebar .fb-page-btn { border-color: #4FA800; box-shadow: inset 0 0 0 1px #4FA800; }
body[data-fbpage="fine-space-pineview"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #4FA800; }
body[data-fbpage="fine-space-pineview"] .cal-day:not(.selected):has(.cal-dots span) { background: #D5F0B5; }
body[data-fbpage="fine-space-pineview"] .fu-row:hover,
body[data-fbpage="fine-space-pineview"] .trip-row:hover { box-shadow: inset 3px 0 0 #4FA800; }
body[data-fbpage="fine-space-pineview"] .stat-tile .stat-icon { background: #004D25 !important; color: #fff !important; box-shadow: 0 0 0 2px #D5F0B5, 0 4px 12px rgba(0,0,0,0.3) !important; }
body[data-fbpage="fine-space-pineview"] .stat-tile .stat-icon svg { stroke: #fff; color: #fff; width: 24px; height: 24px; stroke-width: 2.6; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.45)); }

/* ---- New Leaf: deep green #1C3D1E, Wood Estates brown #694A2B ---- */
body[data-fbpage="new-leaf"] { --page-color: #1C3D1E !important; }
.tag-chip.proj-tag[data-proj="new-leaf"] { background: #1C3D1E !important; box-shadow: inset 0 0 0 1px rgba(165,123,76,0.6); }
.card.has-proj[data-proj="new-leaf"] {
  --proj: #A57B4C;
  background: linear-gradient(0deg, rgba(165,123,76,0.14), rgba(165,123,76,0.14)), rgb(22, 30, 54);
  box-shadow: inset 4px 0 0 #A57B4C, var(--shadow);
}
.card.has-proj[data-proj="new-leaf"]:hover { border-color: #A57B4C; }
html[data-theme="cream"] .card.has-proj[data-proj="new-leaf"] { background: #F5EEE5; box-shadow: inset 4px 0 0 #694A2B, 0 4px 14px rgba(19,42,67,0.08); }
body[data-fbpage="new-leaf"] .stat-tile { border-top-color: #A57B4C !important; }
body[data-fbpage="new-leaf"] .lane-tab.active { background: #E6D5BF; color: #1C3D1E; box-shadow: inset 0 0 0 1px #A57B4C; }
body[data-fbpage="new-leaf"] .lane-tab:hover { color: #E6D5BF; }
body[data-fbpage="new-leaf"] .sidebar .fb-page-btn { border-color: #A57B4C; box-shadow: inset 0 0 0 1px #A57B4C; }
body[data-fbpage="new-leaf"] .sidebar .side-link.active { box-shadow: inset 3px 0 0 #A57B4C; }
body[data-fbpage="new-leaf"] .cal-day:not(.selected):has(.cal-dots span) { background: #E6D5BF; }
body[data-fbpage="new-leaf"] .fu-row:hover,
body[data-fbpage="new-leaf"] .trip-row:hover { box-shadow: inset 3px 0 0 #A57B4C; }
body[data-fbpage="new-leaf"] .stat-tile .stat-icon { background: #694A2B !important; color: #fff !important; box-shadow: 0 0 0 2px #E6D5BF, 0 4px 12px rgba(0,0,0,0.3) !important; }
body[data-fbpage="new-leaf"] .stat-tile .stat-icon svg { stroke: #fff; color: #fff; width: 24px; height: 24px; stroke-width: 2.6; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.45)); }

/* Site trippings: keep the name readable; status tag wraps under it */
.trip-row .trip-copy { min-width: 0; flex: 1 1 auto; }
.trip-row .trip-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.trip-row .trip-name {
  flex: 1 1 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block !important;
  -webkit-line-clamp: unset;
}
.trip-row .trip-top .tag { flex: 0 0 auto; }

/* Device-specific small links under Admins (empty on most devices) */
.side-extras[hidden] { display: none !important; }
.side-extras { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.side-extra-link {
  font-size: 10px; letter-spacing: .08em; font-weight: 600; text-decoration: none;
  color: var(--muted, #8a8f98); opacity: .7; padding: 2px 6px; border-radius: 6px;
  border: 1px solid transparent;
}
.side-extra-link:hover, .side-extra-link:focus-visible { opacity: 1; border-color: currentColor; }

/* Per-person login picker */
.pin-people { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.pin-people[hidden], #pin-form[hidden] { display: none !important; }
.pin-person {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2, rgba(255,255,255,.03));
  color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, transform .15s;
}
.pin-person:hover, .pin-person:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.pin-person-photo { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--gold); color: #1a1405; font-weight: 700; position: relative; }
.pin-person-photo img { width: 100%; height: 100%; object-fit: cover; }
.pin-person-photo img[hidden] { display: none; }
.pin-person-photo img:not([hidden]) + .admin-initials { display: none; }
.pin-person-name { font-weight: 700; font-size: 16px; }
.pin-person-sub { font-size: 11px; color: var(--muted); }
.pin-who { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; cursor: pointer; margin-bottom: 6px; align-self: center; }
.pin-who:hover { color: var(--text, inherit); border-color: var(--gold); }
.pin-person-photo .admin-initials { color: #1a1405 !important; font-size: 20px; }
.side-extra-link { font-size: 11px; opacity: .85; }
