/* ═══════════════════════════════════════════════════════════════════════════
   BLACK DIAMOND OS — STYLES
   Phase 1: Sidebar shell + design tokens
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────────────────────────────── */
:root {
  /* ── LIGHT THEME — Black Diamond HQ ──────────────────────────────────── */

  /* Surfaces */
  --bg:          #F8F7F4;   /* warm white page background                    */
  --surface:     #EEECEA;   /* off-white sidebar / panel backgrounds         */
  --card:        #FFFFFF;   /* white card surfaces                           */
  --card-hover:  #F9F8F5;   /* subtle card hover                             */
  --border:      #E3E1D9;   /* light gray borders                            */
  --border-soft: #EAE8E1;   /* softer dividers                               */

  /* Brand */
  --gold:        #C9A84C;   /* Black Diamond gold — nav active, CTAs, KPIs  */
  --gold-light:  #DFC06E;   /* lighter gold accent                           */
  --gold-dim:    rgba(201, 168, 76, 0.10);  /* gold tint backgrounds         */

  /* Text */
  --text:        #1C1B18;   /* charcoal — primary readable text              */
  --text-2:      #6B6965;   /* medium gray — secondary / labels              */
  --text-3:      #A09E99;   /* light gray — hints / placeholders             */

  /* Semantic */
  --red:         #C94B3E;   /* real warnings / errors only                   */
  --red-dim:     rgba(201, 75, 62, 0.08);
  --green:       #2D8A57;   /* success / on-track only                       */
  --green-dim:   rgba(45, 138, 87, 0.10);
  --blue:        #3A7DC4;
  --blue-dim:    rgba(58, 125, 196, 0.10);
  --orange:      #C4722A;
  --orange-dim:  rgba(196, 114, 42, 0.10);
  --purple:      #8B5EC4;
  --purple-dim:  rgba(139, 94, 196, 0.10);

  /* Layout */
  --sidebar-w:           240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h:            56px;
  --bottom-nav-h:        64px;

  /* Shape */
  --radius:    8px;
  --radius-sm: 5px;
  --radius-lg: 12px;

  /* Shadow — lighter for white-card surfaces */
  --shadow:    0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 4px  rgba(0, 0, 0, 0.06);

  /* Motion */
  --t: 0.2s ease;

  /* Legacy aliases */
  --black:      var(--bg);
  --dark:       var(--surface);
  --muted:      var(--text-2);
  --white:      var(--text);
  --shadow-old: var(--shadow);

  /* Form-theme tokens */
  --bg-input:    #FFFFFF;   /* editable controls: inputs, selects, textareas */
  --bg-subtle:   #F4F3EF;   /* info/status panels, section backgrounds       */
  --bg-hover:    #F0EEE8;   /* row hover / doc-row containers                */
  --bg-card:     #FFFFFF;   /* card surfaces                                 */
  --text-primary: #1C1B18;  /* primary readable text (= --text)              */
  --text-muted:  #6B6965;   /* helper / hint text (= --text-2)               */
  --border-light: #E3E1D9;  /* subtle dividers (= --border)                  */
  --accent:      var(--gold);
  --accent-bg:   var(--gold-dim);
}

/* ── DARK MODE — restore original dark theme when OS prefers it ────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0a0a0a;
    --surface:     #141414;
    --card:        #1a1a1a;
    --card-hover:  #202020;
    --border:      #272727;
    --border-soft: #333333;
    --gold:        #C9A84C;
    --gold-light:  #DFC06E;
    --gold-dim:    rgba(201, 168, 76, 0.13);
    --text:        #EEEEE8;
    --text-2:      #999994;
    --text-3:      #555552;
    --red:         #D95F52;
    --red-dim:     rgba(217, 95, 82, 0.13);
    --green:       #4AAD78;
    --green-dim:   rgba(74, 173, 120, 0.13);
    --blue:        #4A8FD4;
    --blue-dim:    rgba(74, 143, 212, 0.13);
    --orange:      #D4824A;
    --orange-dim:  rgba(212, 130, 74, 0.13);
    --purple:      #9B6ED4;
    --purple-dim:  rgba(155, 110, 212, 0.13);
    --shadow:      0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-sm:   0 2px 8px  rgba(0, 0, 0, 0.3);
    --bg-input:    #1e1e1e;
    --bg-subtle:   #141414;
    --bg-hover:    #1a1a1a;
    --bg-card:     #1a1a1a;
    --text-primary: #EEEEE8;
    --text-muted:  #999994;
    --border-light: #272727;
  }
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;        /* shell handles scroll; page-content scrolls */
}
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; outline: none; }
/* ── HQ global form-control dark theme ─────────────────────────────────── */
/* Scoped to .modal and .tab-content so we don't bleed into generated SPW   */
/* pages, print views, index_review.html, or other intentionally light UIs. */
.modal input:not([type=checkbox]):not([type=radio]):not([type=range]),
.modal textarea,
.modal select,
.tab-content input:not([type=checkbox]):not([type=radio]):not([type=range]),
.tab-content textarea,
.tab-content select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.modal input::placeholder, .tab-content input::placeholder,
.modal textarea::placeholder, .tab-content textarea::placeholder {
  color: var(--text-3);
}
.modal input:focus, .modal textarea:focus, .modal select:focus,
.tab-content input:focus, .tab-content textarea:focus, .tab-content select:focus {
  border-color: var(--gold);
  outline: none;
}
.modal input:disabled, .modal textarea:disabled, .modal select:disabled,
.tab-content input:disabled, .tab-content textarea:disabled, .tab-content select:disabled {
  background: var(--surface);
  color: var(--text-3);
  cursor: not-allowed;
  opacity: 0.7;
}
/* Modal-input utility class (used in listing period modals etc.) */
.modal-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
}
.modal-input::placeholder { color: var(--text-3); }
.modal-input:focus { border-color: var(--gold); outline: none; }

/* ── APP SHELL ──────────────────────────────────────────────────────────── */
/* Sidebar + main side-by-side, full viewport height */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ────────────────────────────────────────────────────────────── */
/* Sidebar is deliberately locked to a light/cream Black Diamond treatment,
   independent of the app's light/dark theme tokens (prefers-color-scheme),
   for consistent brand contrast regardless of OS theme. */
.sidebar {
  --sidebar-bg:          #FAF8F2;
  --sidebar-border:      #E5E0D0;
  --sidebar-text:        #211F1B;
  --sidebar-text-muted:  #78725F;
  --sidebar-hover-bg:    rgba(28, 27, 24, 0.05);
  --sidebar-active-bg:   rgba(201, 168, 76, 0.18);
  --sidebar-active-text: #8A6A22;
  --sidebar-gold:        #C9A84C;

  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 200;
  transition: width var(--t);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--sidebar-border);
  min-height: var(--topbar-h);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-diamond {
  width: 28px;
  height: 28px;
  background: var(--sidebar-gold);
  border-radius: 4px;
  transform: rotate(45deg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-diamond-inner {
  width: 12px;
  height: 12px;
  background: var(--sidebar-bg);
  border-radius: 2px;
}
.brand-text {
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--t);
}
.brand-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--sidebar-active-text);
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.brand-text p {
  font-size: 10px;
  color: var(--sidebar-text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 1px;
}
.sidebar.collapsed .brand-text { opacity: 0; pointer-events: none; }

/* Nav scroll area */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

/* HQ Startup Hardening (2026-08-31): nav-pending defense-in-depth.
   The sidebar's <nav class="sidebar-nav"> starts with class "nav-pending" in
   the markup (index.html). NavigationService.applyToSidebar() removes it (and
   adds "nav-ready") the moment role-based visibility has been computed and
   applied — normally within the same synchronous startup tick. Until that
   happens, group headings and nav items stay hidden and a single "Loading
   navigation..." placeholder is shown instead, so the sidebar is never seen
   in a half-initialized, apparently-broken state (headings with no items).
   This does not change what any role can see — it only delays first paint
   of the (already role-correct) nav items until they are ready. */
.nav-loading-placeholder {
  display: none;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--sidebar-text-muted, #78725F);
}
.sidebar-nav.nav-pending .nav-loading-placeholder { display: block; }
.sidebar-nav.nav-pending .nav-group-label,
.sidebar-nav.nav-pending .nav-item { display: none; }


/* Nav group */
.nav-group { margin-bottom: 2px; }
.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-text-muted);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 10px 18px 4px;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--t);
}
.sidebar.collapsed .nav-group-label { opacity: 0; }

/* Nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  width: 100%;
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: color var(--t), background var(--t);
}
.nav-item:hover { color: var(--sidebar-text); background: var(--sidebar-hover-bg); }
.nav-item.active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 5px; bottom: 5px;
  width: 3px;
  background: var(--sidebar-gold);
  border-radius: 0 2px 2px 0;
}
.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-label {
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--t);
}
.sidebar.collapsed .nav-label { opacity: 0; }

/* Nav badge (for future urgent counts) */
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  flex-shrink: 0;
  transition: opacity var(--t);
}
.sidebar.collapsed .nav-badge { opacity: 0; }

/* Sidebar footer */
.sidebar-footer {
  flex-shrink: 0;
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
}
.collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: none;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-sm);
  color: var(--sidebar-text-muted);
  font-size: 12px;
  transition: all var(--t);
  white-space: nowrap;
  overflow: hidden;
}
.collapse-btn:hover { border-color: var(--sidebar-gold); color: var(--sidebar-active-text); }
.collapse-icon { font-size: 14px; flex-shrink: 0; transition: transform 0.3s ease; }
.sidebar.collapsed .collapse-icon { transform: rotate(180deg); }
.collapse-label { opacity: 1; transition: opacity var(--t); }
.sidebar.collapsed .collapse-label { opacity: 0; }

/* ── APP MAIN ───────────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ── TOPBAR ─────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.menu-btn {
  display: none;           /* hidden on desktop, shown on mobile */
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 16px;
  transition: all var(--t);
}
.menu-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.date-badge {
  font-size: 12px;
  color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}
.date-badge strong { color: var(--gold); font-weight: 500; }
.quick-add-btn {
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  transition: background var(--t);
  white-space: nowrap;
}
.quick-add-btn:hover { background: var(--gold-light); }

/* ── PAGE CONTENT ───────────────────────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.18s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MOBILE SIDEBAR OVERLAY ─────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ── BOTTOM NAVIGATION (mobile only) ───────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--bottom-nav-h);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  min-width: 54px;
  transition: color var(--t);
}
.bnav-icon { font-size: 20px; line-height: 1; }
.bnav-item.active { color: var(--gold); }

/* ── MODAL SHELL ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  box-shadow: var(--shadow);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
}
.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 14px;
  transition: all var(--t);
}
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1 1 auto; }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

/* Modal form helpers */
.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 6px;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── TOAST ──────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--gold);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  transition: background var(--t);
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold-light); }
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 12px;
  padding: 7px 14px;
  transition: all var(--t);
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Aliases used by existing content HTML */
.btn-add {
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  transition: background var(--t);
}
.btn-add:hover { background: var(--gold-light); }
.btn-sm {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  font-size: 11px;
  padding: 5px 10px;
  transition: all var(--t);
}
.btn-sm:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold {
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  transition: background var(--t);
}
.btn-gold:hover { background: var(--gold-light); }
.btn-outline {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  padding: 10px 16px;
  transition: all var(--t);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── INPUTS ─────────────────────────────────────────────────────────────── */
.input,
.search-input,
.notes-input {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  padding: 7px 11px;
  width: 100%;
  transition: border-color var(--t);
}
.input:focus, .search-input:focus, .notes-input:focus { border-color: var(--gold); outline: none; }
.input::placeholder, .search-input::placeholder, .notes-input::placeholder { color: var(--text-3); }

.search-input { width: 200px; }

.notes-input {
  resize: vertical;
  min-height: 60px;
  line-height: 1.6;
  font-family: inherit;
}

.select-input {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  padding: 7px 28px 7px 11px;
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23555552' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--t);
}
.select-input:focus { border-color: var(--gold); outline: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT CSS — unchanged from Phase 0 (all section-level styles below)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   PROPERTY & CLIENT CARDS (Phase 3)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-group-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  min-width: 42px;
}
.filter-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Property cards grid ────────────────────────────────────────────────── */
.property-cards,
.client-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

/* ── Card base ──────────────────────────────────────────────────────────── */
.property-card,
.client-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--t), box-shadow var(--t);
  position: relative;
}
.property-card:hover,
.client-card:hover {
  border-color: var(--border-soft);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* Card head: badges + agent */
.pc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.pc-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.pc-agent {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Address / Name */
.pc-address {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* Goal line (buyers) */
.cc-goal {
  font-size: 13px;
  color: var(--text);
}

/* Detail row: price + seller / range + area */
.pc-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-2);
}
.pc-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
}
.pc-divider { color: var(--text-3); }
.pc-seller  { color: var(--text-2); }

/* Info row: next action + deadline */
.pc-info-row {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-info-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}
.pc-info-icon { flex-shrink: 0; }

/* Deadline states */
.pc-deadline { font-size: 12px; color: var(--text-2); }
.pc-deadline-urgent { color: var(--red);    font-weight: 600; }
.pc-deadline-warn   { color: var(--orange); font-weight: 500; }

/* Notes */
.pc-notes {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer: edit + delete */
.pc-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}
.pc-btn {
  font-size: 12px;
  padding: 5px 12px;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.cards-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}
.cards-empty-icon { font-size: 36px; margin-bottom: 10px; }
.cards-empty-text { font-size: 14px; }

/* ── SECTION TITLE ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
}
.section-title span { color: var(--gold); }

/* ── CARDS ──────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.card-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.gold-bg   { background: var(--gold-dim);  color: var(--gold);   }
.red-bg    { background: var(--red-dim);   color: var(--red);    }
.green-bg  { background: var(--green-dim); color: var(--green);  }
.blue-bg   { background: var(--blue-dim);  color: var(--blue);   }
.purple-bg { background: var(--purple-dim);color: var(--purple); }
.orange-bg { background: var(--orange-dim);color: var(--orange); }

.card h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ── TASK ITEMS ─────────────────────────────────────────────────────────── */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-item input[type="checkbox"] {
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.task-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  transition: color var(--t);
}
.task-item.done .task-text { text-decoration: line-through; color: var(--text-3); }
.priority-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.p-urgent { background: var(--red-dim);    color: var(--red);    }
.p-high   { background: var(--orange-dim); color: var(--orange); }
.p-normal { background: var(--gold-dim);   color: var(--gold);   }
.p-low    { background: rgba(255,255,255,0.05); color: var(--text-3); }

/* ── TABLES ─────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.table-toolbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.toolbar-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  flex: 1;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  transition: all var(--t);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  background: rgba(255,255,255,0.02);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.tbl td { border-top: 1px solid var(--border); padding: 10px 12px; vertical-align: top; }
.tbl tr:hover td { background: rgba(255,255,255,0.015); }
.tbl td[contenteditable="true"] {
  cursor: text;
  outline: none;
  border-radius: 4px;
  transition: background 0.15s;
  min-width: 80px;
}
.tbl td[contenteditable="true"]:focus {
  background: rgba(201,168,76,0.08);
  outline: 1px solid var(--gold);
}

/* ── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.s-active   { background: var(--green-dim);  color: var(--green);  }
.s-pending  { background: var(--orange-dim); color: var(--orange); }
.s-coming   { background: var(--blue-dim);   color: var(--blue);   }
.s-expired  { background: var(--red-dim);    color: var(--red);    }
.s-closed   { background: var(--purple-dim); color: var(--purple); }
.s-hot      { background: var(--red-dim);    color: var(--red);    }
.s-warm     { background: var(--orange-dim); color: var(--orange); }
.s-cold     { background: var(--blue-dim);   color: var(--blue);   }
.s-done     { background: rgba(255,255,255,0.05); color: var(--text-3); }
.s-sold     { background: rgba(139,92,246,0.12);  color: #a78bfa; }     /* purple — terminal/closed */
.s-new      { background: var(--gold-dim);   color: var(--gold);   }
.s-review   { background: var(--purple-dim); color: var(--purple); }
.s-contract { background: var(--green-dim);  color: var(--green);  }

/* ── DEADLINE URGENCY ───────────────────────────────────────────────────── */
.deadline-warn { color: var(--red);    font-weight: 600; }
.deadline-soon { color: var(--orange); }

/* ── DELETE BUTTON ──────────────────────────────────────────────────────── */
.del-btn {
  background: none;
  border: none;
  color: var(--border-soft);
  cursor: pointer;
  font-size: 13px;
  padding: 0 4px;
  transition: color var(--t);
}
.del-btn:hover { color: var(--red); }

/* ── STATS ROW ──────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-card-muted {
  opacity: 0.55;
}
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ── KANBAN ─────────────────────────────────────────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kanban-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kanban-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-head span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.kanban-count {
  background: var(--surface);
  border-radius: 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
}
.kanban-body { padding: 10px; }
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.kanban-card:last-child { margin-bottom: 0; }
.kanban-card .kc-name { font-weight: 500; margin-bottom: 3px; }
.kanban-card .kc-meta { font-size: 11px; color: var(--text-2); }
/* New-card flash — applied by Quick Add after task creation */
@keyframes kanban-new-flash {
  0%   { background: var(--accent-light, #e8f4fd); border-color: var(--accent, #2563eb); }
  100% { background: var(--surface); border-color: var(--border); }
}
.kanban-card--new {
  animation: kanban-new-flash 2s ease-out forwards;
}

/* ── BRAIN DUMP ─────────────────────────────────────────────────────────── */
.braindump-area {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.braindump-area textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  padding: 14px;
  resize: vertical;
  width: 100%;
  min-height: 160px;
  outline: none;
  transition: border-color var(--t);
}
.braindump-area textarea:focus { border-color: var(--gold); }
.braindump-area textarea::placeholder { color: var(--text-3); }
.bd-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.bd-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.bd-bucket {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.bd-bucket-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bd-bucket-body { padding: 10px 14px; }
.bd-item {
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.bd-item:last-child { border-bottom: none; }
.bd-bullet { color: var(--gold); margin-top: 2px; flex-shrink: 0; }

/* ── ROUTINE CARDS ──────────────────────────────────────────────────────── */
.routine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.routine-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.routine-head {
  background: var(--gold-dim);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.routine-head h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.routine-body { padding: 14px 16px; }
.routine-step {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: flex-start;
}
.routine-step:last-child { border-bottom: none; }
.step-num {
  background: var(--gold-dim);
  color: var(--gold);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── PERSONAL / ADMIN ───────────────────────────────────────────────────── */
.personal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* ── INFO BANNER ────────────────────────────────────────────────────────── */
.info-banner {
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--gold-light);
  line-height: 1.6;
}
.info-banner strong { color: var(--gold); }

/* ── DIVIDER ────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── SCROLLBAR ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════════════
   HOME EXECUTIVE DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Metric Row ─────────────────────────────────────────────────────────── */
.home-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.home-metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t);
}
.home-metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.home-metric-gold::before   { background: var(--gold);   }
.home-metric-red::before    { background: var(--red);    }
.home-metric-blue::before   { background: var(--blue);   }
.home-metric-orange::before { background: var(--orange); }
.home-metric-purple::before { background: var(--purple); }
.home-metric-card:hover { border-color: var(--border-soft); }

.hm-icon  { font-size: 16px; margin-bottom: 4px; }
.hm-num   {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  line-height: 1;
  color: var(--text);
  font-weight: 300;
}
.hm-label {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 2px;
}

/* ── Home Grid ──────────────────────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  align-items: start;
}
.home-col-main,
.home-col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Widget card tweaks ─────────────────────────────────────────────────── */
.home-widget { padding: 16px; }

.hw-header {
  margin-bottom: 12px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.hw-header h3 {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-2);
}
.hw-add-btn {
  width: 24px;
  height: 24px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 50%;
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t);
  flex-shrink: 0;
}
.hw-add-btn:hover { background: var(--gold); color: var(--bg); }
.hw-nav-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  transition: color var(--t);
  flex-shrink: 0;
}
.hw-nav-btn:hover { color: var(--gold-light); }

/* ── Widget rows (live data items) ─────────────────────────────────────── */
.hw-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.hw-row:last-child { border-bottom: none; }
.hw-row.urgent { background: rgba(217, 95, 82, 0.04); border-radius: 4px; padding: 9px 8px; margin: 0 -8px; }
.hw-row.warn   { background: rgba(212, 130, 74, 0.04); border-radius: 4px; padding: 9px 8px; margin: 0 -8px; }

.hw-row-main { flex: 1; min-width: 0; }
.hw-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.hw-meta {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
}
.hw-meta em { color: var(--gold); font-style: normal; }
.hw-alert {
  font-size: 11px;
  color: var(--orange);
  margin-top: 3px;
}
.hw-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.hw-days {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
}
.hw-days.urgent { color: var(--red); }
.hw-days.warn   { color: var(--orange); }
.hw-sub {
  font-size: 10px;
  color: var(--text-3);
}
.hw-urgency-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gold-dim);
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.hw-empty {
  font-size: 12px;
  color: var(--text-3);
  padding: 10px 0;
  text-align: center;
}

/* ── Widget input row ───────────────────────────────────────────────────── */
.hw-input-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.hw-input-row .input { font-size: 12px; padding: 6px 10px; }

/* ── Section label ──────────────────────────────────────────────────────── */
.hw-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--text-2);
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sidebar becomes an off-canvas overlay on mobile */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w) !important;   /* override collapsed state */
    transform: translateX(-100%);
    transition: transform var(--t);
    box-shadow: var(--shadow);
    z-index: 210;                                      /* open drawer above .bottom-nav (200) so Sign out is reachable */
    padding-bottom: env(safe-area-inset-bottom, 0px);  /* keep the account row clear of the phone home indicator */
  }
  .sidebar.mobile-open { transform: translateX(0); }

  /* Main fills full width */
  .app-main { margin-left: 0 !important; }
  .page-content { padding: 14px; padding-bottom: calc(var(--bottom-nav-h) + 16px); }

  /* Show mobile controls */
  .bottom-nav { display: block; }
  .menu-btn   { display: flex; }

  /* Hide desktop-only topbar elements */
  .date-badge  { display: none; }

  /* Grid collapses */
  .card-grid     { grid-template-columns: 1fr; }
  .kanban        { grid-template-columns: 1fr; }
  .routine-grid  { grid-template-columns: 1fr; }
  .personal-grid { grid-template-columns: 1fr; }
  .bd-results    { grid-template-columns: 1fr; }
  .stats-row     { grid-template-columns: repeat(2, 1fr); }
  .search-input  { width: 100%; }
  .section-title { font-size: 22px; }

  /* Home dashboard */
  .home-metrics { grid-template-columns: repeat(2, 1fr); }
  .home-grid    { grid-template-columns: 1fr; }

  /* Card views */
  .property-cards,
  .client-cards { grid-template-columns: 1fr; }
  .filter-bar   { gap: 8px; }
  .filter-group { gap: 5px; }

  /* Toast above bottom nav */
  #toast { bottom: calc(var(--bottom-nav-h) + 12px); }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMAND CENTER — CC R1
   Action-first daily view. All classes prefixed cc-.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── PAGE WRAPPER ────────────────────────────────────────────────────────── */
#cc-root {
  max-width: 900px;
  margin: 0 auto;
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.cc-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cc-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.cc-subtitle {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}
.cc-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cc-gen-time {
  font-size: 11px;
  color: var(--text-3);
}
.cc-refresh-btn {
  background: none;
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
  white-space: nowrap;
}
.cc-refresh-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── SUMMARY CARDS ───────────────────────────────────────────────────────── */
.cc-summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
.cc-summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  transition: border-color var(--t), background var(--t);
}
.cc-summary-card:hover {
  background: var(--surface);
  border-color: var(--border-soft);
}
.cc-summary-card--active {
  border-color: var(--border-soft);
}
.cc-summary-icon {
  font-size: 18px;
  margin-bottom: 6px;
  line-height: 1;
}
.cc-summary-count {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--text);
  line-height: 1;
}
.cc-summary-card--active .cc-summary-count {
  color: var(--gold);
}
.cc-summary-label {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  line-height: 1.3;
}

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.cc-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.cc-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── EMPTY STATES ────────────────────────────────────────────────────────── */
.cc-empty {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
  padding: 6px 0;
}

/* ── ROW LIST ────────────────────────────────────────────────────────────── */
.cc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cc-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  background: var(--surface);
  transition: background var(--t);
  min-width: 0;   /* prevents flex overflow */
}
.cc-row:hover { background: var(--card-hover); }

/* Urgency left-border colors */
.cc-row--critical { border-left-color: var(--red); }
.cc-row--warning  { border-left-color: var(--orange); }
.cc-row--info     { border-left-color: var(--blue); }

.cc-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cc-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}
.cc-row-meta {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
  word-break: break-word;
}
.cc-row-notes {
  color: var(--text-2);
  font-style: italic;
}
.cc-row-context {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.35;
  margin-top: 1px;
  word-break: break-word;
}
.cc-row-alert {
  font-size: 11px;
  font-weight: 500;
  color: var(--orange);
  line-height: 1.4;
}
.cc-row--critical .cc-row-alert { color: var(--red); }
.cc-row--info     .cc-row-alert { color: var(--blue); }

.cc-row-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  color: var(--text-3);
  margin-right: 4px;
  white-space: nowrap;
  vertical-align: middle;
}
.cc-row-actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 1px;
}

/* ── ACTION LINKS ────────────────────────────────────────────────────────── */
.cc-link {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 0;
  text-decoration: none;
  transition: color var(--t);
  white-space: nowrap;
}
.cc-link:hover { color: var(--gold-light); }
.cc-no-link {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}

/* ── URGENCY BADGES ──────────────────────────────────────────────────────── */
.cc-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.cc-badge--critical { background: var(--red-dim);    color: var(--red);    }
.cc-badge--warning  { background: var(--orange-dim); color: var(--orange); }
.cc-badge--info     { background: var(--blue-dim);   color: var(--blue);   }
.cc-badge--low      { background: rgba(255,255,255,0.05); color: var(--text-3); }

/* ── OVERFLOW / VIEW ALL ─────────────────────────────────────────────────── */
.cc-overflow {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.cc-view-all {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── TEAM ACCOUNTABILITY GRID ────────────────────────────────────────────── */
.cc-team-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cc-team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border-left: 3px solid transparent;
  flex-wrap: wrap;
}
.cc-team-row:hover { background: var(--card-hover); }
.cc-team-row--alert { border-left-color: var(--orange); }
.cc-team-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  min-width: 120px;
}
.cc-team-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}
.cc-team-stat {
  font-size: 12px;
  color: var(--text-3);
}
.cc-team-stat strong { color: var(--text-2); font-weight: 600; }
.cc-team-stat--alert strong { color: var(--red); }
.cc-team-stat--review strong { color: var(--purple); }
.cc-team-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 10px;
  font-style: italic;
}

/* ── RECENT ACTIVITY ─────────────────────────────────────────────────────── */
.cc-activity-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cc-activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 0;
}
.cc-activity-row:hover { background: var(--card-hover); }
.cc-activity-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.cc-activity-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cc-activity-title {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}
.cc-activity-time {
  font-size: 11px;
  color: var(--text-3);
}

/* ── CALENDAR ────────────────────────────────────────────────────────────── */
.cc-calendar-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cc-calendar-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 0;
}
.cc-calendar-row:hover { background: var(--card-hover); }
.cc-calendar-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  min-width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 1px;
}
.cc-calendar-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cc-calendar-title {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}
.cc-calendar-loc {
  font-size: 11px;
  color: var(--text-3);
}

/* ── ERROR STATE ─────────────────────────────────────────────────────────── */
.cc-error {
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.5;
}

/* ── RESPONSIVE: Command Center ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .cc-summary-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .cc-section {
    padding: 14px 14px;
  }
  .cc-header-top {
    flex-direction: column;
    gap: 8px;
  }
  .cc-header-meta {
    flex-direction: row;
    gap: 10px;
  }
  .cc-team-name { min-width: 80px; }
  .cc-calendar-time { min-width: 70px; }
}
@media (max-width: 480px) {
  .cc-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .cc-row {
    flex-direction: column;
    gap: 8px;
  }
  .cc-row-actions { padding-top: 0; }
  .cc-team-row { flex-direction: column; gap: 6px; }
  .cc-activity-row { gap: 8px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   GLOBAL SEARCH OVERLAY — GS R1
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Body lock — prevents scroll when overlay is open ── */
.gs-body-lock {
  overflow: hidden;
}

/* ── Topbar search button ── */
.gs-open-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 6px 10px;
  transition: background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
  flex-shrink: 0;
}
.gs-open-btn:hover {
  background: var(--card-hover);
  border-color: var(--border-soft);
  color: var(--text);
}
.gs-btn-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.gs-btn-label {
  font-size: 13px;
}
.gs-btn-shortcut {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  flex-shrink: 0;
}

/* ── Backdrop ── */
.gs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 600;   /* above modal (500), below toast (9999) */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.gs-backdrop--open {
  opacity: 1;
  pointer-events: all;
}

/* ── Panel ── */
.gs-panel {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255,255,255,0.04);
  width: 100%;
  max-width: 700px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header / Input row ── */
.gs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gs-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  transition: border-color var(--t);
  min-width: 0;
}
.gs-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-dim);
}
.gs-input-icon {
  color: var(--text-3);
  font-size: 14px;
  flex-shrink: 0;
}
.gs-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 10px 0;
  min-width: 0;
}
.gs-input::placeholder {
  color: var(--text-3);
}
.gs-hint-badge {
  font-size: 11px;
  color: var(--text-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: inherit;
}
.gs-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  flex-shrink: 0;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.gs-close:hover {
  background: var(--card-hover);
  border-color: var(--border-soft);
  color: var(--text);
}

/* ── Results container ── */
.gs-results {
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
}
.gs-results::-webkit-scrollbar         { width: 6px; }
.gs-results::-webkit-scrollbar-track   { background: transparent; }
.gs-results::-webkit-scrollbar-thumb   { background: var(--border-soft); border-radius: 3px; }
.gs-results::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Guidance / empty state ── */
.gs-guidance {
  padding: 28px 24px 32px;
  text-align: center;
}
.gs-guidance-hint {
  color: var(--text-2);
  font-size: 13px;
  margin: 0 0 18px;
}
.gs-guidance-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.gs-guidance-grid span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-2);
}

/* ── No-results state ── */
.gs-no-results {
  padding: 36px 24px;
  text-align: center;
}
.gs-no-results-msg {
  color: var(--text);
  font-size: 14px;
  margin: 0 0 8px;
}
.gs-no-results-msg strong {
  color: var(--gold);
}
.gs-no-results-hint {
  color: var(--text-2);
  font-size: 12px;
  margin: 0;
}

/* ── Error state ── */
.gs-error {
  color: var(--red);
  font-size: 13px;
  padding: 24px;
  text-align: center;
  margin: 0;
}

/* ── Entity group ── */
.gs-group {
  border-bottom: 1px solid var(--border);
}
.gs-group:last-child {
  border-bottom: none;
}

/* ── Group header (icon + label + count) ── */
.gs-group-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 5px;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
.gs-group-icon {
  font-size: 12px;
  line-height: 1;
}
.gs-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  flex: 1;
}
.gs-group-count {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

/* ── Result row — base ── */
.gs-result-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 16px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: default;
  font-family: inherit;
  transition: background var(--t);
  position: relative;
  box-sizing: border-box;
}

/* ── Navigable rows ── */
.gs-result-row--nav {
  cursor: pointer;
}
.gs-result-row--nav:hover {
  background: var(--surface);
}

/* ── Keyboard-active state (gold left-bar accent) ── */
.gs-result-row--active {
  background: var(--surface);
  outline: none;
}
.gs-result-row--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

/* ── Non-navigable rows — informational only ── */
.gs-result-row--info {
  opacity: 0.55;
  cursor: default;
  padding-right: 36px;  /* room for ℹ badge */
}
.gs-result-row--info:hover {
  background: transparent;  /* not clickable — no hover highlight */
}

/* ── Non-navigable info badge ── */
.gs-row-info-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-3);
  opacity: 0.6;
  font-style: normal;
}

/* ── Row content ── */
.gs-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}
.gs-row-subtitle {
  font-size: 11.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}
.gs-row-excerpt {
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

/* ── Meta row ── */
.gs-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

/* ── Tags ── */
.gs-tag {
  font-size: 10px;
  border-radius: 3px;
  padding: 2px 6px;
  white-space: nowrap;
  line-height: 1.4;
}
.gs-tag--status {
  background: var(--blue-dim);
  color: var(--blue);
}
.gs-tag--assigned {
  background: var(--gold-dim);
  color: var(--gold);
}
.gs-tag--module {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
}
.gs-tag--field {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-style: italic;
}

/* ── Overflow indicator ── */
.gs-overflow {
  font-size: 11px;
  color: var(--text-3);
  padding: 5px 16px 10px;
  font-style: italic;
}

/* ════════════════════════════
   RESPONSIVE — Mobile 375px
   ════════════════════════════ */

/* Hide label + shortcut on small screens; icon only */
@media (max-width: 480px) {
  .gs-btn-label,
  .gs-btn-shortcut {
    display: none;
  }
  .gs-open-btn {
    padding: 6px 8px;
  }
}

/* Bottom-sheet style on mobile */
@media (max-width: 600px) {
  .gs-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .gs-panel {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .gs-header {
    padding: 14px 12px;
  }
  .gs-hint-badge {
    display: none;
  }
  .gs-result-row {
    padding: 10px 12px;
  }
  .gs-group-header {
    padding: 8px 12px 5px;
  }
  .gs-guidance {
    padding: 20px 16px 24px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT RELATIONSHIPS TAB (R3-M3)
   Prefix: cr-*
   ═══════════════════════════════════════════════════════════════════════════ */

.cr-layout {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Section shell ────────────────────────────────────────────────────────── */
.cr-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cr-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.cr-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  flex: 1;
}

.cr-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
}

/* ── Card grid ────────────────────────────────────────────────────────────── */
.cr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
}

.cr-card {
  background: var(--bg-2);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Navigable cards show a subtle hover state */
.cr-card--nav:hover { background: var(--bg-3); transition: background 0.12s; }

/* Info-only cards (offers) are slightly dimmed — no hover highlight */
.cr-card--info { opacity: 0.8; }

.cr-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.4;
  word-break: break-word;
}

.cr-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.cr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--text-2);
  white-space: nowrap;
}

.cr-badge--done     { opacity: 0.5; }
.cr-badge--pri-high   { background: rgba(239,68,68,.15);  color: #f87171; }
.cr-badge--pri-normal { background: var(--bg-3);          color: var(--text-2); }
.cr-badge--pri-low    { background: rgba(59,130,246,.10); color: var(--text-3); }

.cr-meta-item {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

/* ── Navigation button (inside card) ─────────────────────────────────────── */
.cr-nav-btn {
  align-self: flex-start;
  margin-top: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 9px;
  transition: border-color 0.15s, color 0.15s;
}
.cr-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.cr-empty {
  padding: 16px 14px;
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}

/* ── Closed transactions collapse toggle ──────────────────────────────────── */
.cr-closed-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-3);
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.cr-closed-toggle:hover        { background: var(--bg-1); color: var(--text-1); }
.cr-closed-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.cr-chevron {
  font-size: 9px;
  flex-shrink: 0;
  color: var(--text-3);
}

.cr-closed-cards { border-top: 1px solid var(--border); }

/* ── Activity summary ─────────────────────────────────────────────────────── */
.cr-act-summary {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-act-count-row {
  display: flex;
  align-items: baseline;
}

.cr-act-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}

.cr-act-label {
  font-size: 12px;
  color: var(--text-3);
}

.cr-act-recent {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}
.cr-act-recent strong { color: var(--text-1); font-weight: 500; }

.cr-timeline-btn {
  align-self: flex-start;
  margin-top: 4px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}
.cr-timeline-btn:hover { text-decoration-color: var(--accent); }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .cr-layout { padding: 10px; gap: 10px; }
  .cr-grid   { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════════════
   COMMAND PALETTE (C3 — 2026-07-17)
   Keyboard-first command launcher. Opened by ⌘N/Ctrl+N or + Quick Add button.
   Reuses gs-body-lock scroll-lock class from GS R1.
   z-index 700 — above Global Search (600), below toast (9999).
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Backdrop ─────────────────────────────────────────────────────────────── */
.cp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 700;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cp-backdrop--open {
  opacity: 1;
  pointer-events: all;
}

/* ── Panel ────────────────────────────────────────────────────────────────── */
.cp-panel {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04);
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header (input row) ───────────────────────────────────────────────────── */
.cp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cp-input-icon {
  font-size: 15px;
  color: var(--text-2);
  flex-shrink: 0;
  line-height: 1;
}
.cp-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  caret-color: var(--gold);
  min-width: 0;
}
.cp-input::placeholder { color: var(--text-3); }
.cp-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  flex-shrink: 0;
}
.cp-close:hover { color: var(--text); background: var(--card-hover); }

/* ── Command list ─────────────────────────────────────────────────────────── */
.cp-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0 8px;
}

/* Category label */
.cp-cat-header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 16px 4px;
}

/* Command row */
.cp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  padding: 8px 16px 8px 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: background 0.12s ease, border-left-color 0.12s ease;
}
.cp-row:hover,
.cp-row--active {
  background: var(--card-hover);
  border-left-color: var(--gold);
}
.cp-row-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  line-height: 1;
}
.cp-row-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.cp-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.cp-row-subtitle {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.3;
}

/* Empty / no-results state */
.cp-empty {
  padding: 28px 16px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

/* ── Mobile (≤ 600px) ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Sheet slides up from bottom on mobile */
  .cp-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .cp-panel {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 80vh;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MISSION CONTROL (MC-C1)
   Operational home page — renders from widget registry
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Quick Actions strip ──────────────────────────────────────────────────── */
.mc-quick-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.mc-qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.mc-qa-btn:hover {
  background: var(--card-hover);
  border-color: var(--border-soft);
}
.mc-qa-btn:active {
  transform: scale(0.97);
}

/* ── Needs Immediate Attention section ───────────────────────────────────── */
.mc-urgent-section {
  margin: 16px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.mc-urgent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.mc-urgent-icon {
  font-size: 15px;
}
.mc-urgent-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  flex: 1;
}
.mc-urgent-count {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
}
.mc-urgent-count--zero {
  background: var(--border);
  color: var(--text-2);
}
.mc-urgent-body {
  padding: 4px 0;
  min-height: 48px;
}
.mc-urgent-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-2);
}
.mc-urgent-empty-icon {
  font-size: 16px;
  color: var(--green);
}

/* ── Widget grid ─────────────────────────────────────────────────────────── */
.mc-widget-section {
  padding: 0 20px;
}
.mc-widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 8px 0 16px;
}
.mc-widget-no-widgets {
  grid-column: 1 / -1;
  padding: 24px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

/* ── Widget card ─────────────────────────────────────────────────────────── */
.mc-widget-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.mc-widget-card:hover {
  border-color: var(--border-soft);
}
.mc-widget-card--collapsed .mc-widget-body {
  display: none;
}

/* Card header */
.mc-widget-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mc-widget-title-area {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.mc-widget-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.mc-widget-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-widget-count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--gold);
  color: #000;
  flex-shrink: 0;
}
.mc-widget-count--zero {
  background: var(--border);
  color: var(--text-3);
}
.mc-widget-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mc-widget-refreshed {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
}
.mc-widget-collapse-btn {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.mc-widget-collapse-btn:hover {
  color: var(--text-2);
  background: var(--border);
}

/* ── Widget reorder / hide controls (MC-Customize) ───────────────────────── */
.mc-widget-move-btn,
.mc-widget-hide-btn {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.mc-widget-move-btn:hover,
.mc-widget-hide-btn:hover {
  color: var(--text-2);
  background: var(--border);
}
.mc-widget-move-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.mc-widget-hide-btn:hover {
  color: #c0392b;
}

/* ── Customize bar ────────────────────────────────────────────────────────── */
.mc-customize-bar {
  padding: 4px 0 10px;
}
.mc-customize-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  transition: border-color 0.15s, color 0.15s;
}
.mc-customize-toggle:hover {
  border-color: var(--gold);
  color: var(--text);
}
.mc-customize-panel {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mc-customize-label {
  font-size: 11px;
  color: var(--text-3);
}
.mc-customize-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
}
.mc-customize-chip:hover {
  border-color: var(--gold);
}
.mc-customize-reset {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  margin-left: auto;
}
.mc-customize-reset:hover {
  color: var(--text);
}

/* Updated sub-label */
.mc-widget-updated-row {
  font-size: 10px;
  color: var(--text-3);
  padding: 3px 14px;
  background: var(--surface);
}

/* Card body */
.mc-widget-body {
  flex: 1;
  padding: 4px 0;
  min-height: 60px;
}
.mc-widget-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  text-align: center;
}
.mc-widget-empty-icon {
  font-size: 20px;
  color: var(--text-3);
  margin-bottom: 2px;
}
.mc-widget-empty-text {
  font-size: 12px;
  color: var(--text-2);
}
.mc-widget-empty-note {
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
}
.mc-widget-error {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--red);
}
/* PF-QA1A: Listings count summary banner */
.mc-listing-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 10px;
  flex-wrap: wrap;
}
.mc-listing-banner--centered {
  justify-content: center;
  padding: 12px 16px;
}
.mc-listing-stat {
  font-size: 12px;
  color: var(--text-2);
}
.mc-listing-stat strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.mc-listing-stat--warn strong {
  color: var(--gold);
}
.mc-listing-stat--ok strong {
  color: var(--green);
}
.mc-listing-stat--missing strong {
  color: var(--text-2);
}
.mc-listing-divider {
  color: var(--border);
  font-size: 12px;
}

/* Card footer — View All */
.mc-widget-footer {
  padding: 8px 14px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.mc-widget-view-all {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.mc-widget-view-all:hover {
  color: var(--text);
  background: var(--border);
}

/* ── Activity Feed section ───────────────────────────────────────────────── */
.mc-activity-section {
  margin: 0 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.mc-activity-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.mc-activity-icon {
  font-size: 14px;
}
.mc-activity-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}
.mc-activity-body {
  padding: 4px 0;
  min-height: 60px;
}
.mc-activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}
.mc-activity-note {
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
}

/* ── Activity Feed rows (C5) ─────────────────────────────────────────────── */
.mc-activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.mc-activity-row:last-child {
  border-bottom: none;
}
.mc-activity-row--clickable {
  cursor: pointer;
}
.mc-activity-row--clickable:hover {
  background: var(--surface);
}
.mc-activity-row-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.85;
}
.mc-activity-row-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mc-activity-row-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-activity-row-meta {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-activity-overflow {
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── MC item rows (_mcBuildItemRow) ─────────────────────────────────────── */
.mc-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.mc-item-row:last-child {
  border-bottom: none;
}
.mc-item-row--clickable {
  cursor: pointer;
}
.mc-item-row--clickable:hover {
  background: var(--surface);
}
.mc-item-row--critical {
  border-left: 3px solid var(--danger, #dc2626);
  padding-left: 11px;
}
.mc-item-row--high {
  border-left: 3px solid var(--warning, #d97706);
  padding-left: 11px;
}
.mc-item-urgency-icon {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
  width: 16px;
  text-align: center;
}
.mc-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.mc-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.mc-item-subtitle {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ── Moving Truck widget (PF-TRUCK1) ─────────────────────────────────────── */
.mc-truck-status-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mc-truck-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mc-truck-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.mc-truck-row:last-child { border-bottom: none; }
.mc-truck-row:hover { background: var(--surface-2); }
.mc-truck-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mc-truck-row-title { font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-truck-row-sub   { font-size: 11px; color: var(--text-3); }
.mc-truck-empty {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--green);
}

/* ── Widget item overflow (personal-tasks, C4-stab) ─────────────────────── */
.mc-widget-overflow {
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
  text-align: center;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.mc-widget-overflow:hover {
  color: var(--text-2);
}

/* ── Mobile (≤ 768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mc-quick-actions {
    padding: 12px 14px 10px;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .mc-quick-actions::-webkit-scrollbar { display: none; }
  .mc-qa-btn { flex-shrink: 0; }

  .mc-urgent-section {
    margin: 12px 14px;
  }
  .mc-widget-section {
    padding: 0 14px;
  }
  .mc-widget-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .mc-activity-section {
    margin: 0 14px 20px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   DOCUMENTS V1 — PF-LISTINGS2
   ══════════════════════════════════════════════════════════════════════════════ */

.pdoc-wrap {
  padding: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.pdoc-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.pdoc-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.pdoc-header-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pdoc-usage-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 6px;
  overflow: hidden;
}
.pdoc-usage-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.pdoc-usage-fill.pdoc-usage-warn { background: var(--red); }
.pdoc-storage-warn {
  font-size: 0.78rem;
  color: var(--red);
  margin-bottom: 12px;
}

/* Drop zone */
.pdoc-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px 20px 20px;
  text-align: center;
  margin-bottom: 20px;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.pdoc-drop-zone.pdoc-drop-active {
  border-color: var(--accent);
  background: var(--accent-light, rgba(99,102,241,0.06));
}
.pdoc-drop-icon { font-size: 2rem; margin-bottom: 8px; }
.pdoc-drop-label { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.pdoc-drop-or { font-size: 0.8rem; color: var(--text-muted); margin: 8px 0; }
.pdoc-upload-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pdoc-cat-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
}
.pdoc-browse-btn {
  display: inline-block;
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.pdoc-browse-btn:hover { opacity: 0.88; }
.pdoc-drop-hint { font-size: 0.75rem; color: var(--text-muted); }

/* Document list */
.pdoc-list { display: flex; flex-direction: column; gap: 10px; }
.pdoc-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 32px 0;
}
.pdoc-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.pdoc-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pdoc-file-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.pdoc-file-info { flex: 1; min-width: 0; }
.pdoc-file-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-word;
  margin-bottom: 4px;
}
.pdoc-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pdoc-cat-badge {
  font-size: 0.72rem;
  background: var(--accent-light, rgba(99,102,241,0.1));
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
}
.pdoc-size, .pdoc-date { font-size: 0.78rem; color: var(--text-muted); }

.pdoc-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.pdoc-btn {
  padding: 5px 11px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-sidebar);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.pdoc-btn:hover { background: var(--border); }
.pdoc-btn-danger { color: var(--red); border-color: var(--red); }
.pdoc-btn-danger:hover { background: rgba(239,68,68,0.08); }

.pdoc-notes-row { margin-top: 10px; }
.pdoc-notes-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-sidebar);
  color: var(--text-primary);
  font-size: 0.82rem;
  box-sizing: border-box;
}
.pdoc-notes-input:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .pdoc-wrap { padding: 12px; }
  .pdoc-row-main { flex-wrap: wrap; }
  .pdoc-row-actions { width: 100%; justify-content: flex-start; margin-top: 8px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MARKETING V1 — PF-LISTINGS2
   ══════════════════════════════════════════════════════════════════════════════ */

.pmkt-wrap {
  padding: 20px;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pmkt-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.pmkt-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.pmkt-section-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.pmkt-progress {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pmkt-progress-bar {
  height: 3px;
  background: var(--border);
  overflow: hidden;
}
.pmkt-progress-fill {
  height: 100%;
  background: var(--green, #22c55e);
  transition: width 0.3s ease;
}

/* Checklist */
.pmkt-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
  padding: 8px 0;
}
.pmkt-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  user-select: none;
}
.pmkt-check-item:last-child { border-bottom: none; }
.pmkt-check-item:hover { background: var(--bg-sidebar); }
.pmkt-check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.pmkt-check-label {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.pmkt-check-done .pmkt-check-label {
  text-decoration: line-through;
  color: var(--text-muted);
}
.pmkt-check-tick {
  font-size: 0.85rem;
  color: var(--green, #22c55e);
  font-weight: 700;
}

/* Links */
.pmkt-links-list {
  padding: 4px 0;
}
.pmkt-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.pmkt-link-row:last-child { border-bottom: none; }
.pmkt-link-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 130px;
  flex-shrink: 0;
}
.pmkt-link-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pmkt-link-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-sidebar);
  color: var(--text-primary);
  font-size: 0.83rem;
  min-width: 0;
}
.pmkt-link-input:focus {
  outline: none;
  border-color: var(--accent);
}
.pmkt-link-open {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}
.pmkt-link-open:hover { text-decoration: underline; }

/* Notes */
.pmkt-notes {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 14px 18px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.6;
  font-family: inherit;
}
.pmkt-notes:focus { outline: none; }

@media (max-width: 600px) {
  .pmkt-wrap { padding: 12px; gap: 16px; }
  .pmkt-check-grid { grid-template-columns: 1fr 1fr; }
  .pmkt-link-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pmkt-link-label { min-width: unset; }
  .pmkt-link-input-wrap { width: 100%; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   AUTH SCREEN (M2 — Pilot Authentication)
   Full-page login wall shown when BD_ENV.features.authentication = true
   and the user is not signed in.
   ═══════════════════════════════════════════════════════════════════════════ */

#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;  /* above everything including toast (9999) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.as-backdrop {
  position: absolute;
  inset: 0;
  background: #09090b;  /* matches app background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.as-card {
  background: #111113;
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
}

/* Brand */
.as-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.as-diamond {
  width: 36px;
  height: 36px;
  background: var(--gold, #d4af37);
  transform: rotate(45deg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.as-diamond-inner {
  width: 16px;
  height: 16px;
  background: #111113;
  transform: rotate(0deg);
  border-radius: 2px;
}

.as-brand-text h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold, #d4af37);
  margin: 0;
  line-height: 1.2;
}

.as-brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted, #71717a);
  margin: 2px 0 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Headings */
.as-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary, #e4e4e7);
  margin: 0 0 6px;
}

.as-sub {
  font-size: 0.82rem;
  color: var(--text-muted, #71717a);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Fields */
.as-field {
  margin-bottom: 16px;
}

.as-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary, #a1a1aa);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.as-input {
  width: 100%;
  padding: 10px 14px;
  background: #1a1a1d;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary, #e4e4e7);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.as-input:focus {
  outline: none;
  border-color: rgba(212,175,55,0.5);
}

.as-input::placeholder {
  color: var(--text-muted, #71717a);
}

/* Buttons */
.as-btn-primary {
  width: 100%;
  padding: 12px 20px;
  background: var(--gold, #d4af37);
  color: #09090b;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 8px;
}

.as-btn-primary:hover:not(:disabled) { opacity: 0.9; }
.as-btn-primary:active:not(:disabled) { transform: scale(0.98); }
.as-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.as-btn-ghost {
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-muted, #71717a);
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  margin-top: 6px;
}

.as-btn-ghost:hover { color: var(--text-secondary, #a1a1aa); }

/* Error / Success */
.as-error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.as-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  color: #4ade80;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* Blocked / Unlinked message */
.as-block-msg {
  text-align: center;
  padding: 24px 8px;
}

.as-block-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.as-block-msg p {
  color: var(--text-secondary, #a1a1aa);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

/* Footer */
.as-footer {
  margin-top: 28px;
  font-size: 0.7rem;
  color: var(--text-muted, #71717a);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Sidebar logout button (shown when auth is active) */
.as-sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 8px 8px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  gap: 10px;
}

.as-sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.as-sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary, #e4e4e7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-sidebar-user-role {
  font-size: 0.7rem;
  color: var(--text-muted, #71717a);
  margin-top: 1px;
}

.as-logout-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--text-muted, #71717a);
  font-size: 0.82rem;
  padding: 5px 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.as-logout-btn:hover {
  color: var(--text-secondary, #a1a1aa);
  border-color: rgba(255,255,255,0.2);
}

@media (max-width: 480px) {
  .as-card {
    padding: 32px 20px 24px;
    border-radius: 12px;
  }
}

/* ── MY TASKS PAGE (AP-3) ──────────────────────────────────────────────────── */

.mt-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.mt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.mt-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mt-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary, #f4f4f5);
  margin: 0;
}

.mt-badge {
  background: rgba(255,255,255,0.08);
  color: var(--text-muted, #a1a1aa);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
}

.mt-btn-add {
  background: var(--accent, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.mt-btn-add:hover { opacity: 0.85; }

/* Sections */
.mt-section {
  margin-bottom: 6px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.06);
}

.mt-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.mt-section-header:hover { background: rgba(255,255,255,0.04); }

.mt-section-arrow {
  font-size: 0.65rem;
  color: var(--text-muted, #71717a);
  width: 12px;
}

.mt-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #71717a);
  flex: 1;
}

.mt-section-overdue  .mt-section-title { color: #ef4444; }
.mt-section-today    .mt-section-title { color: #f59e0b; }
.mt-section-upcoming .mt-section-title { color: var(--text-muted, #71717a); }

.mt-section-count {
  font-size: 0.72rem;
  color: var(--text-muted, #71717a);
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1px 7px;
}

.mt-section-body { padding: 0 0 4px; }

.mt-collapsed .mt-section-body { display: none; }

/* Task rows */
.mt-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}

.mt-task-row:hover { background: rgba(255,255,255,0.03); }

.mt-task-done { opacity: 0.45; }
.mt-task-done .mt-task-title { text-decoration: line-through; }

/* Checkbox */
.mt-checkbox-wrap {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding-top: 2px;
}

.mt-checkbox { display: none; }

.mt-checkbox-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.mt-checkbox:checked + .mt-checkbox-mark {
  background: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
}

.mt-checkbox:checked + .mt-checkbox-mark::after {
  content: '✓';
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.mt-checkbox-wrap:hover .mt-checkbox-mark {
  border-color: rgba(255,255,255,0.5);
}

/* Task content */
.mt-task-content { flex: 1; min-width: 0; }

.mt-task-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mt-priority-icon { font-size: 0.8rem; flex-shrink: 0; }

.mt-task-title {
  font-size: 0.9rem;
  color: var(--text-primary, #f4f4f5);
  line-height: 1.4;
  word-break: break-word;
}

.mt-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.mt-due {
  font-size: 0.72rem;
  color: var(--text-muted, #71717a);
}

.mt-due-overdue { color: #ef4444; font-weight: 600; }
.mt-due-today   { color: #f59e0b; font-weight: 600; }

.mt-entity-link {
  font-size: 0.72rem;
  color: var(--accent, #3b82f6);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.mt-entity-link:hover { text-decoration: underline; }

.mt-assignee {
  font-size: 0.72rem;
  color: var(--text-muted, #71717a);
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1px 6px;
}

.mt-task-notes {
  font-size: 0.75rem;
  color: var(--text-muted, #71717a);
  margin-top: 4px;
  line-height: 1.4;
}

/* Empty state */
.mt-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted, #71717a);
}

.mt-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.mt-empty p { font-size: 0.9rem; margin: 0; }

@media (max-width: 600px) {
  .mt-page { padding: 12px 10px 40px; }
  .mt-task-title { font-size: 0.85rem; }
}

/* ── Property Marketing Suite — SPW card + QR modal (PM-1, PM-2) ───────────── */
.pmkt-spw-card { border: 2px solid var(--accent-gold, #d4a017) !important; }
.pmkt-spw-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pmkt-spw-label { min-width: 130px; font-size: 13px; font-weight: 600; color: var(--text-primary); flex-shrink: 0; }
.pmkt-spw-mls-tag { font-size: 10px; font-weight: 700; background: #e8f4fd; color: #1a6fa8; border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
.pmkt-spw-input-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 200px; }
.pmkt-spw-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.pmkt-spw-live { background: #d4edda; color: #155724; }
.pmkt-spw-none { background: #f8d7da; color: #721c24; }
.pmkt-spw-hint { font-size: 11px; color: var(--text-muted); margin: 4px 0 0; font-style: italic; }

/* ── SPW v2 Content Fields ── */
.pmkt-spw-content-fields { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.pmkt-spw-cf-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 12px; }
.pmkt-spw-cf-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.pmkt-spw-cf-label { flex-shrink: 0; width: 120px; font-size: 12px; color: var(--text-muted); padding-top: 8px; line-height: 1.3; }
.pmkt-spw-cf-input { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: inherit; background: var(--bg-input, #fff); color: var(--text-primary); }
.pmkt-spw-cf-input:focus { border-color: var(--accent); outline: none; }
.pmkt-spw-cf-textarea { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: inherit; background: var(--bg-input, #fff); color: var(--text-primary); resize: vertical; }
.pmkt-spw-cf-textarea:focus { border-color: var(--accent); outline: none; }
.pmkt-spw-cf-oh-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.pmkt-spw-cf-oh { padding: 7px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: inherit; background: var(--bg-input, #fff); color: var(--text-primary); }
.pmkt-spw-cf-oh:focus { border-color: var(--accent); outline: none; }
.pmkt-spw-cf-oh-sep { color: var(--text-muted); font-size: 13px; }
.pmkt-spw-cf-subheading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.pmkt-spw-cf-hint { font-size: 11px; color: var(--text-muted); margin: 0 0 10px; font-style: italic; padding-left: 130px; }
.pmkt-spw-docs-empty { font-size: 12px; color: var(--text-muted); padding: 6px 0 8px; font-style: italic; }
.pmkt-spw-doc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; background: var(--bg-hover, #f9f9f9); border: 1px solid var(--border-light); border-radius: 5px; padding: 7px 10px; }
.pmkt-spw-doc-num { flex-shrink: 0; width: 18px; font-size: 11px; color: var(--text-muted); text-align: right; }
.pmkt-spw-doc-label { flex: 2; min-width: 0; }
.pmkt-spw-doc-url { flex: 3; min-width: 0; }
.pmkt-spw-doc-type { flex-shrink: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; font-family: inherit; background: var(--bg-input, #fff); color: var(--text-primary); }
.pmkt-spw-doc-remove { flex-shrink: 0; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 3px; line-height: 1; }
.pmkt-spw-doc-remove:hover { background: var(--danger-bg, #fff0f0); color: var(--danger, #c0392b); }
.pmkt-spw-cf-add-btn { margin-top: 6px; padding: 6px 14px; background: none; border: 1px dashed var(--border); border-radius: 4px; font-size: 12px; color: var(--text-muted); cursor: pointer; font-family: inherit; }
.pmkt-spw-cf-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg, #fdf9f0); }
/* MLS source tag — only shown when a field was populated from MLS */
.pmkt-spw-src-tag { display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: 0.04em; color: #4a7fb5; background: #e8f0fa; border: 1px solid #c3d6f0; border-radius: 3px; padding: 1px 4px; margin-left: 4px; vertical-align: middle; line-height: 1.4; text-transform: uppercase; }
/* Connect MLS informational panel */
.pmkt-mls-connect-panel { margin-top: 20px; padding: 12px 14px; background: var(--bg-subtle, #f8f8f8); border: 1px solid var(--border); border-radius: 6px; }
.pmkt-mls-connect-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.pmkt-mls-connect-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.pmkt-mls-connect-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; color: var(--text-muted); background: var(--bg-input, #fff); font-family: inherit; cursor: not-allowed; opacity: 0.65; }
.pmkt-mls-connect-refresh { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; color: var(--text-muted); background: var(--bg-input, #fff); font-family: inherit; cursor: not-allowed; opacity: 0.65; margin-left: 6px; }
.pmkt-qr-btn { padding: 4px 10px; font-size: 12px; font-weight: 700; background: var(--accent-gold, #d4a017); color: #fff; border: none; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.pmkt-qr-btn:disabled { background: #ccc; cursor: not-allowed; }

/* QR Modal */
.pmkt-qr-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9000; display: flex; align-items: center; justify-content: center; }
.pmkt-qr-modal-box { background: var(--surface); border-radius: 12px; padding: 28px 24px 24px; text-align: center; max-width: 380px; width: 90%; position: relative; box-shadow: 0 8px 32px rgba(0,0,0,.25); }
.pmkt-qr-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }
.pmkt-qr-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.pmkt-qr-url { font-size: 11px; color: var(--text-muted); word-break: break-all; margin-bottom: 16px; }
.pmkt-qr-canvas { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.pmkt-qr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.pmkt-qr-download, .pmkt-qr-copy { padding: 8px 18px; border: none; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pmkt-qr-download { background: var(--accent-gold, #d4a017); color: #fff; }
.pmkt-qr-copy { background: var(--surface-alt, #f0f0f0); color: var(--text-primary); }

/* ── PM-Phase2: SPW Publish Controls ─────────────────────────────────────── */
.pmkt-spw-slug { font-size: 11px; color: var(--text-muted); font-family: monospace;
                  background: var(--surface-alt, #f5f5f5); padding: 3px 8px; border-radius: 5px; }
.pmkt-spw-no-hero { background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px;
                    padding: 8px 14px; font-size: 13px; color: #7a5c00; margin-bottom: 12px; }
.pmkt-spw-stale-warn { background: #fff3e0; border: 1px solid #ffb74d; border-radius: 8px;
                       padding: 8px 14px; font-size: 13px; color: #7a4300; margin-bottom: 12px; }
.pmkt-spw-btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.pmkt-spw-publish-btn { padding: 7px 16px; border: none; border-radius: 8px;
                         font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.pmkt-spw-publish-btn.pmkt-spw-publish { background: var(--text); color: var(--card); }
.pmkt-spw-publish-btn.pmkt-spw-republish { background: var(--gold); color: var(--card); }
.pmkt-spw-publish-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pmkt-spw-unpublish-btn { padding: 7px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px;
                            font-size: 12px; color: #888; cursor: pointer; background: transparent;
                            font-weight: 500; transition: border-color 0.2s, color 0.2s; }
.pmkt-spw-unpublish-btn:hover { border-color: #c62828; color: #c62828; }
.pmkt-spw-status-msg { padding: 10px 14px; border-radius: 8px; font-size: 13px;
                         margin-top: 12px; word-break: break-all; }
.pmkt-spw-status-ok  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.pmkt-spw-status-err { background: #fce4e4; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Custom Domain card ────────────────────────────────────────────────────── */
.pmkt-domain-card { margin-top: 20px; padding: 16px 18px; background: var(--bg-subtle, #f9f9f9); border: 1px solid var(--border); border-radius: 8px; }
.pmkt-domain-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 6px; }
.pmkt-domain-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }
.pmkt-domain-suggestions { margin-bottom: 14px; }
.pmkt-domain-suggestions-label { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.pmkt-domain-suggestions-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pmkt-domain-sugg-pill { padding: 4px 10px; background: #fff; border: 1.5px solid var(--accent-gold, #d4a017); border-radius: 20px; font-size: 11.5px; color: var(--accent-gold, #d4a017); font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s; }
.pmkt-domain-sugg-pill:hover { background: var(--accent-gold, #d4a017); color: #fff; }
.pmkt-domain-sugg-empty { font-size: 11px; color: var(--text-muted); font-style: italic; }
.pmkt-domain-sugg-note { font-size: 10.5px; color: var(--text-muted); margin: 0; font-style: italic; }
.pmkt-domain-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pmkt-domain-label { flex-shrink: 0; width: 72px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.pmkt-domain-input { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 13px; font-family: inherit; background: var(--bg-input, #fff); color: var(--text-primary); }
.pmkt-domain-input:focus { border-color: var(--accent); outline: none; }
.pmkt-domain-status-wrap { display: flex; align-items: center; gap: 8px; flex: 1; }
.pmkt-domain-status-select { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; font-family: inherit; background: var(--bg-input, #fff); color: var(--text-primary); }
.pmkt-domain-badge { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 2px 8px; }
.pmkt-domain-badge-ok { background: #d4edda; color: #155724; }
.pmkt-domain-canonical { margin-top: 6px; margin-bottom: 12px; font-size: 11.5px; color: var(--text-muted); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.pmkt-domain-canonical-label { font-weight: 600; white-space: nowrap; }
.pmkt-domain-canonical-val { word-break: break-all; }
.pmkt-domain-canonical-live { color: #155724; font-weight: 600; }
.pmkt-domain-avail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pmkt-domain-avail-btn { padding: 6px 13px; border: 1px solid var(--border); border-radius: 5px; font-size: 12px; color: var(--text-muted); background: var(--bg-input, #fff); font-family: inherit; cursor: not-allowed; opacity: 0.6; }
.pmkt-domain-avail-hint { font-size: 10.5px; color: var(--text-muted); font-style: italic; }

/* ══════════════════════════════════════════════════════════════════════════════
   LISTINGS VIEW TOGGLE + CARD/TABLE/PIPELINE VIEWS
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── View toggle bar ─────────────────────────────────────────────────────────── */
.ls-view-toggle { display: flex; gap: 6px; align-items: center; }
.ls-view-btn {
  padding: 5px 12px; border-radius: 6px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text-2); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.ls-view-btn:hover { border-color: var(--accent-gold, #c9a84c); color: var(--text-1); }
.ls-view-btn.active {
  background: var(--accent-gold, #c9a84c); border-color: var(--accent-gold, #c9a84c);
  color: var(--text); font-weight: 600;
}

/* ── Card grid ───────────────────────────────────────────────────────────────── */
.ls-view-cards .ls-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* ── Listing card ────────────────────────────────────────────────────────────── */
.ls-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  display: flex;
  flex-direction: column;
}
.ls-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.10); transform: translateY(-2px); }

/* Hero image */
.ls-card-hero {
  position: relative;
  height: 160px;
  background: var(--surface-2, #f5f5f5);
  overflow: hidden;
}
.ls-card-hero-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ls-card-hero-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--text-3, #bbb);
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}
.ls-card-status {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; padding: 3px 8px; border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* Card body */
.ls-card-body { padding: 14px 14px 10px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ls-card-address {
  font-weight: 600; font-size: 14px; color: var(--text-1);
  line-height: 1.3; word-break: break-word;
}
.ls-card-price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ls-card-price { font-size: 15px; font-weight: 700; color: var(--text-1); }
.ls-card-agent { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.ls-card-details { font-size: 11px; color: var(--text-2); }

/* Chips row */
.ls-card-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ls-chip {
  font-size: 10px; padding: 2px 7px; border-radius: 4px; font-weight: 500;
  background: var(--surface-2, #f5f5f5); color: var(--text-2);
  border: 1px solid var(--border);
}
.ls-chip-dom { background: #ede7d9; color: #7a5c2e; border-color: #dfd0b3; }
.ls-chip-leads { background: #e3f0e8; color: #276139; border-color: #b8dcc3; }
.ls-chip-spw { border-color: #b3cde0; }
.ls-chip-attn { background: #fff3cd; color: #856404; border-color: #ffc107; font-weight: 600; }
.ls-card-mls { font-size: 11px; color: var(--text-3); margin: 2px 0 4px; }
.pb-attn-count { display: inline-flex; align-items: center; justify-content: center;
  background: #e53935; color: #fff; border-radius: 10px; font-size: 11px;
  font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; vertical-align: middle; }
.ls-spw-both    { background: #e8f0fb; color: #1a4d8f; }
.ls-spw-branded { background: var(--text); color: var(--gold); }
.ls-spw-unbranded { background: #f0f0f0; color: #555; }

/* Deadline chips */
.ls-card-deadline { font-size: 10px; padding: 2px 7px; border-radius: 4px; background: #f5f5f5; color: var(--text-2); }
.ls-dl-urgent { background: #fce4e4; color: #c62828; border: 1px solid #ef9a9a; font-weight: 600; }
.ls-dl-warn   { background: #fff8e1; color: #8a6000; border: 1px solid #ffe082; }

/* Next action */
.ls-card-next { font-size: 11px; color: var(--text-2); line-height: 1.4; margin-top: 2px; }

/* Marketing progress bar */
.ls-card-mkt {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.ls-card-mkt-track {
  flex: 1; height: 5px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.ls-card-mkt-fill {
  height: 100%; background: var(--accent-gold, #c9a84c); border-radius: 99px;
  transition: width .4s;
}
.ls-card-mkt-pct { font-size: 10px; color: var(--text-3); min-width: 28px; text-align: right; }

/* Card footer */
.ls-card-footer {
  padding: 8px 14px 10px;
  border-top: 1px solid var(--border);
  display: flex; gap: 6px; justify-content: flex-end;
}

/* ── Table view ──────────────────────────────────────────────────────────────── */
.ls-view-table .ls-table-wrap { overflow-x: auto; padding: 20px; }
.ls-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--surface, #fff); border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ls-table thead th {
  padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-3); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border); background: var(--surface-2, #fafafa);
  white-space: nowrap;
}
.ls-table tbody .ls-trow td {
  padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.ls-table tbody .ls-trow:last-child td { border-bottom: none; }
.ls-table tbody .ls-trow:hover td { background: var(--surface-2, #fafafa); }
.ls-t-addr { max-width: 220px; word-break: break-word; font-weight: 500; }
.ls-t-next { max-width: 200px; color: var(--text-2); }

/* ── Pipeline (kanban) view ──────────────────────────────────────────────────── */
.ls-view-pipeline .ls-pipeline {
  display: flex; gap: 14px; overflow-x: auto;
  padding: 20px; align-items: flex-start;
}
.ls-pipeline-col {
  flex: 0 0 220px; display: flex; flex-direction: column; gap: 8px;
}
.ls-pipeline-col-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 4px;
}
.ls-pipe-count {
  font-size: 12px; font-weight: 700; color: var(--text-3);
  background: var(--surface-2, #f0f0f0); padding: 1px 7px; border-radius: 9px;
}
.ls-pipeline-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.ls-pipe-card {
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px; cursor: pointer;
  transition: box-shadow .15s; display: flex; flex-direction: column; gap: 4px;
}
.ls-pipe-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.10); }
.ls-pipe-addr { font-size: 12px; font-weight: 600; color: var(--text-1); line-height: 1.3; }
.ls-pipe-price { font-size: 12px; font-weight: 700; color: var(--text-1); }
.ls-pipe-next { font-size: 11px; color: var(--text-2); }
.ls-pipe-meta { display: flex; gap: 8px; font-size: 10px; color: var(--text-3); flex-wrap: wrap; }
.ls-pipe-bar {
  height: 3px; background: var(--border); border-radius: 99px;
  overflow: hidden; margin-top: 4px;
}
.ls-pipe-bar-fill {
  height: 100%; background: var(--accent-gold, #c9a84c); border-radius: 99px;
}
.ls-pipe-empty { font-size: 12px; color: var(--text-3); padding: 8px 4px; font-style: italic; }

/* ── SPW / Property Marketing — form field contrast fix (2026-08-27) ──────
   Scoped to pmkt-/pdoc- classes only. Fixes white-bg inputs on dark theme.  */
.pmkt-spw-cf-input,
.pmkt-spw-cf-textarea,
.pmkt-spw-cf-oh,
.pmkt-link-input,
.pmkt-domain-input,
.pmkt-domain-status-select,
.pmkt-spw-doc-type,
.pdoc-cat-select,
.pdoc-notes-input {
  background: var(--bg-input);
  color: #EEEEE8;
  border-color: var(--border-soft);
}
.pmkt-spw-cf-input::placeholder,
.pmkt-spw-cf-textarea::placeholder,
.pmkt-spw-cf-oh::placeholder,
.pmkt-link-input::placeholder,
.pmkt-domain-input::placeholder,
.pdoc-notes-input::placeholder {
  color: #666660;
}
.pmkt-spw-cf-input:focus,
.pmkt-spw-cf-textarea:focus,
.pmkt-spw-cf-oh:focus,
.pmkt-link-input:focus,
.pmkt-domain-input:focus,
.pmkt-domain-status-select:focus,
.pmkt-spw-doc-type:focus,
.pdoc-cat-select:focus,
.pdoc-notes-input:focus {
  border-color: #C9A84C;
  outline: none;
}
.pmkt-spw-cf-input:disabled,
.pmkt-spw-cf-textarea:disabled,
.pmkt-link-input:disabled,
.pmkt-domain-input:disabled {
  background: var(--bg-subtle);
  color: #555552;
  cursor: not-allowed;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ── SPW / Property Marketing — light-panel text contrast fix (2026-08-27) ─
   Panels with light (#f8-f9f9) backgrounds render near-white text (from
   undefined --text-primary/--text-muted vars). Force readable dark values.  */

/* MLS Integration panel */
.pmkt-mls-connect-panel,
.pmkt-mls-connect-title,
.pmkt-mls-connect-desc {
  color: #222220;
}
.pmkt-mls-connect-btn,
.pmkt-mls-connect-refresh {
  background: #f0f0ee;
  color: #444440;
  border-color: #ccc;
}

/* Custom Domain card */
.pmkt-domain-card {
  color: #222220;
}
.pmkt-domain-card-title { color: #111110; }
.pmkt-domain-card-desc  { color: #444440; }
.pmkt-domain-suggestions-label { color: #555550; }
.pmkt-domain-sugg-note  { color: #666660; }
.pmkt-domain-sugg-empty { color: #666660; }
.pmkt-domain-label      { color: #444440; }
.pmkt-domain-canonical  { color: #444440; }
.pmkt-domain-canonical-label { color: #222220; }
.pmkt-domain-canonical-val   { color: #333330; }
.pmkt-domain-avail-hint { color: #666660; }

/* SPW row labels, slug, and hint text */
.pmkt-spw-label  { color: #111110; }
.pmkt-spw-slug   { color: #555550; }
.pmkt-spw-hint   { color: #555550; }

/* Branded/unbranded URL read-only display fields */
.pmkt-link-input[readonly],
.pmkt-link-input[disabled] {
  background: #f4f4f2;
  color: #333330;
  border-color: #ddd;
  cursor: default;
}

/* ─────────────────────────────────────────────────────────────────────────── */

/* ── SPW Upload UX — floor plan + doc upload widgets (2026-08-27) ───────────*/
.pmkt-fp-widget { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pmkt-fp-filename { font-size: 12px; color: #333330; flex-shrink: 0; }
.pmkt-fp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pmkt-fp-upload-btn { cursor: pointer; }
.pmkt-fp-or { font-size: 11px; color: #888; flex-shrink: 0; }
.pmkt-fp-url-input { flex: 1; min-width: 180px; }
.pmkt-spw-cf-btn { display: inline-block; padding: 5px 11px; border: 1px solid var(--border, #ccc); border-radius: 4px; background: var(--bg-input, #fff); color: var(--text, #222); font-size: 12px; font-family: inherit; cursor: pointer; line-height: 1.4; }
.pmkt-spw-cf-btn:hover { border-color: var(--accent, #C9A84C); color: var(--accent, #C9A84C); }
.pmkt-spw-doc-remove-btn { background: none; border: none; color: #888; cursor: pointer; font-size: 14px; padding: 2px 6px; line-height: 1; border-radius: 3px; }
.pmkt-spw-doc-remove-btn:hover { background: #fff0f0; color: #c0392b; }
/* Doc rows — new layout */
.pmkt-spw-doc-row { background: var(--bg-hover, #f9f9f9); border: 1px solid var(--border-light, #e8e8e8); border-radius: 5px; padding: 10px; margin-bottom: 8px; }
.pmkt-spw-doc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pmkt-spw-doc-file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pmkt-spw-doc-filename { font-size: 12px; color: #333330; }
.pmkt-spw-doc-url-input { flex: 1; min-width: 160px; }
.pmkt-spw-doc-visibility { display: flex; align-items: center; gap: 10px; }
.pmkt-spw-doc-toggle-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #444440; cursor: pointer; }
.pmkt-spw-doc-toggle-label input[type=checkbox] { cursor: pointer; }
.pmkt-spw-doc-vis-note { font-size: 11px; border-radius: 3px; padding: 2px 6px; }
.pmkt-spw-doc-vis-public { background: #e8f5e9; color: #2e7d32; }
.pmkt-spw-doc-vis-private { background: #f5f5f5; color: #888; }
/* MLS coming soon badge */
.pmkt-mls-coming-soon-badge { display: inline-block; font-size: 10px; font-weight: 600; background: #f0f0ee; color: #888; border: 1px solid #ddd; border-radius: 10px; padding: 2px 8px; margin-left: 8px; letter-spacing: 0.04em; vertical-align: middle; }
/* ─────────────────────────────────────────────────────────────────────────── */

/* ── Phase 3: Share Links, Campaign Captions, Flyer, OH Registration ─────── */
/* Share Links */
.msh-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.msh-row:last-of-type { border-bottom: none; }
.msh-label { width: 130px; min-width: 130px; font-size: 12px; font-weight: 600; color: #555; padding-top: 8px; }
.msh-empty { font-size: 12px; color: #bbb; padding-top: 8px; font-style: italic; }
.msh-val-wrap { flex: 1; display: flex; gap: 8px; align-items: flex-start; }
.msh-input { flex: 1; border: 1px solid #e0e0e0; border-radius: 6px; padding: 7px 10px; font-size: 13px; background: #fafafa; color: #333; }
.msh-textarea { flex: 1; border: 1px solid #e0e0e0; border-radius: 6px; padding: 7px 10px; font-size: 12px; background: #fafafa; color: #333; resize: vertical; min-height: 72px; line-height: 1.5; }
.msh-copy-btn { background: var(--text); color: var(--card); border: none; border-radius: 6px; padding: 7px 14px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.msh-copy-btn:hover { background: #333; }
.msh-email-row { margin-top: 12px; }
.msh-email-btn { display: inline-block; background: #f0ede8; color: var(--text); border: 1px solid #ddd; border-radius: 6px; padding: 8px 16px; font-size: 13px; text-decoration: none; }
.msh-email-btn:hover { background: #e8e3dc; }
/* Campaign Captions */
.mcc-section .pmkt-section-sub { font-size: 12px; color: #999; margin-left: 8px; }
.mcc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.mcc-card { border: 1px solid #e8e8e8; border-radius: 10px; padding: 14px; background: #fafafa; display: flex; flex-direction: column; gap: 10px; }
.mcc-card-head { display: flex; align-items: center; gap: 8px; }
.mcc-emoji { font-size: 18px; }
.mcc-title { font-size: 13px; font-weight: 700; flex: 1; }
.mcc-canva-btn { background: #7c3aed; color: #fff; border: none; border-radius: 5px; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.mcc-canva-btn:hover { background: #6d28d9; }
.mcc-caption { width: 100%; border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px 10px; font-size: 12px; background: #fff; color: #333; resize: vertical; line-height: 1.5; }
.mcc-copy-btn { background: var(--text); color: var(--card); border: none; border-radius: 6px; padding: 7px 14px; font-size: 12px; cursor: pointer; align-self: flex-start; }
.mcc-copy-btn:hover { background: #333; }
/* Printable Flyer */
.mfl-desc { font-size: 13px; color: #666; margin: 0 0 12px; line-height: 1.5; }
.mfl-preview-btn { background: var(--text); color: var(--card); border: none; border-radius: 7px; padding: 10px 20px; font-size: 14px; cursor: pointer; }
.mfl-preview-btn:hover { background: #333; }
/* OH Registration */
.moh-export-btn { background: #f0ede8; color: #333; border: 1px solid #ddd; border-radius: 5px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.moh-export-btn:hover { background: #e8e3dc; }
.moh-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.moh-input { border: 1px solid #e0e0e0; border-radius: 6px; padding: 7px 10px; font-size: 13px; min-width: 140px; }
.moh-add-btn { background: var(--text); color: var(--card); border: none; border-radius: 6px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.moh-add-btn:hover { background: #333; }
.moh-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.moh-table th { text-align: left; font-size: 11px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 8px; border-bottom: 1px solid #e8e8e8; }
.moh-table td { padding: 7px 8px; border-bottom: 1px solid #f5f5f5; color: #333; }
.moh-del-btn { background: none; border: none; color: #ccc; cursor: pointer; font-size: 14px; padding: 2px 6px; }
.moh-del-btn:hover { color: #e53e3e; }
.moh-count { font-size: 12px; color: #999; margin-top: 4px; }
.moh-empty { font-size: 13px; color: #bbb; font-style: italic; padding: 8px 0; }

/* ── Pipeline Forecast Panel (Phase D) ─────────────────────────────────────── */
.pf-forecast-panel { display:flex; align-items:stretch; gap:0; background:var(--bg-2); border:1px solid var(--border); border-radius:10px; padding:0; margin-bottom:16px; overflow:hidden; }
.pf-forecast-metric { flex:1; display:flex; flex-direction:column; gap:3px; padding:12px 16px; min-width:0; }
.pf-forecast-label { font-size:11px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; color:var(--text-3); }
.pf-forecast-value { font-size:18px; font-weight:700; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pf-forecast-value.pf-green { color:var(--green); }
.pf-forecast-value.pf-blue { color:var(--accent); }
.pf-forecast-value.pf-muted { color:var(--text-2); }
.pf-forecast-note { font-size:11px; font-weight:400; color:var(--text-3); }
.pf-forecast-divider { width:1px; background:var(--border); flex-shrink:0; }
@media (max-width: 600px) { .pf-forecast-panel { flex-wrap:wrap; } .pf-forecast-metric { min-width:50%; } .pf-forecast-divider { display:none; } }
