/* =====================================================
   Willett Comms Center — app.css
   Pass 1 redesign: navy/gold/slate scale, system fonts,
   professional component restyle + clickable-nav additions.
   ===================================================== */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Brand scales ── */
  --navy-900: #0a2540;
  --navy-800: #103252;
  --navy-700: #16456b;
  --navy-600: #1d5680;
  --navy-100: #e8eef4;
  --navy-050: #f4f7fb;

  --gold-600: #b8860b;
  --gold-500: #d4a017;
  --gold-400: #e8b84b;
  --gold-100: #fbf1d9;

  /* ── Slate neutral scale ── */
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-050: #f8fafc;

  --white: #ffffff;

  /* ── Semantic ── */
  --success:    #15803d;
  --success-bg: #f0fdf4;
  --warning:    #b45309;
  --warning-bg: #fffbeb;
  --danger:     #b91c1c;
  --danger-bg:  #fef2f2;
  --info:       #1d5680;
  --info-bg:    #eff6ff;

  /* ── Back-compat aliases (existing code references these) ── */
  --blue:       var(--navy-700);
  --blue-dark:  var(--navy-900);
  --blue-light: var(--navy-600);
  --orange:     var(--gold-500);
  --orange-dark:var(--gold-600);
  --near-black: var(--slate-900);
  --gray-light: var(--slate-200);
  --gray-mid:   var(--slate-500);
  --gray-bg:    var(--slate-050);
  --green:      var(--success);
  --red:        var(--danger);
  --text:       var(--slate-900);  /* fixes latent bug: chat bubbles reference var(--text) */
  /* keep these so nothing breaks */
  --green-dark: #137334;
  --purple:     #7c3aed;
  --teal:       #0d9488;
  --amber:      var(--gold-500);
  --amber-bg:   var(--gold-100);

  /* ── Type scale ── */
  --font-head: ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-ui:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --fs-xs:   0.75rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1.0625rem;
  --fs-lg:   1.375rem;
  --fs-xl:   1.75rem;
  --fs-stat: 2.25rem;

  --lh-tight: 1.2;
  --lh-base:  1.5;
  --tracking-caps: 0.06em;

  /* ── Spacing ── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* ── Radii ── */
  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 10px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-lg: 0 10px 20px -3px rgba(15,23,42,.10), 0 4px 8px -4px rgba(15,23,42,.06);

  --border:   1px solid var(--slate-200);
  --header-h: 60px;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--near-black);
  background: var(--gray-bg);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; }

#app { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Header ── */
header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  border-bottom: 1px solid rgba(212,160,23,.25);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 2px 12px rgba(10,37,64,.18);
}
.header-left {
  display: flex; align-items: center; gap: 16px;
}
.header-wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  font-style: normal;
  font-size: 1.25rem;
  letter-spacing: 0;
  color: var(--white);
  text-transform: none;
}
.header-wordmark span { color: var(--gold-400); }
.header-gv-number {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(254,162,15,.25);
  border: 1px solid rgba(254,162,15,.5);
  color: var(--orange);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.header-right {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.82rem; color: rgba(255,255,255,.8);
}
.header-caller { font-weight: 600; color: var(--white); }
.btn-logout {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
}
.btn-logout:hover { background: rgba(255,255,255,.25); }

/* Approvals badge in header */
.approvals-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  background: var(--orange); color: var(--near-black);
  font-size: 0.72rem; font-weight: 800;
  border-radius: 11px;
  padding: 0 5px;
}

/* ── Header subtitle ── */
.header-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,.55);
  letter-spacing: 0.04em;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Nav bar (desktop) ── */
nav#main-nav {
  background: var(--white);
  border-bottom: 2px solid var(--slate-200);
  display: flex;
  align-items: stretch;
  overflow: visible;       /* allow dropdowns to escape */
  position: relative;
  z-index: 80;
}

/* Standalone tab buttons (Dashboard, Admin) */
nav#main-nav > button[data-tab] {
  flex: 0 0 auto;
  padding: 14px 18px;
  border: none; background: transparent;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;    /* overlap the nav border-bottom */
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  position: relative;
}
nav#main-nav > button[data-tab]:hover { color: var(--navy-700); background: var(--slate-050); }
nav#main-nav > button[data-tab].active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
  font-weight: 700;
}

/* ── Nav groups (dropdown trigger + panel) ── */
.nav-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Group trigger button */
.nav-group-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 14px 16px;
  border: none; background: transparent;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-group-btn:hover,
.nav-group:hover .nav-group-btn { color: var(--navy-700); background: var(--slate-050); }
.nav-group-btn.nav-group-active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
  font-weight: 700;
}
.nav-chevron {
  flex-shrink: 0;
  transition: transform 0.15s;
  stroke: currentColor;
}
.nav-group:hover .nav-chevron,
.nav-group.nav-group-open .nav-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  flex-direction: column;
}
/* Show on hover (desktop) */
.nav-group:hover .nav-dropdown,
.nav-group.nav-group-open .nav-dropdown { display: flex; }

/* Dropdown items */
.nav-dropdown button[data-tab] {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 11px 16px;
  border: none; border-bottom: 1px solid var(--slate-100);
  background: transparent;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav-dropdown button[data-tab]:last-child { border-bottom: none; }
.nav-dropdown button[data-tab]:hover { background: var(--slate-050); color: var(--navy-700); }
.nav-dropdown button[data-tab].active {
  background: var(--navy-050);
  color: var(--navy-900);
  font-weight: 700;
}

/* ── Main Content Area ── */
main {
  flex: 1;
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Cards / Panels ── */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none; border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--navy-700); color: var(--white); }
.btn-primary:hover { background: var(--navy-800); }
.btn-orange  { background: var(--gold-500); color: var(--navy-900); }
.btn-orange:hover { background: var(--gold-600); color: var(--white); }
.btn-green {
  background: var(--success); color: var(--white);
}
.btn-green:hover { background: #137334; }
.btn-ghost {
  background: var(--white); color: var(--navy-700);
  border: 1px solid var(--slate-300); box-shadow: none;
}
.btn-ghost:hover { background: var(--slate-050); border-color: var(--navy-600); }
.btn-red { background: var(--danger); color: var(--white); }
.btn-red:hover { background: #a93226; }
.btn-lg { width: 100%; padding: 13px 24px; font-size: var(--fs-base); border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: var(--fs-xs); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Inline SVG icons ── */
.ico { display: inline-block; vertical-align: -2px; flex-shrink: 0; }
.btn .ico { margin-right: 2px; }

/* ── Login Screen ── */
#screen-login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  padding: var(--sp-6);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--navy-050), transparent),
    var(--slate-100);
}

/* Two-panel split */
.login-split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  width: 100%; max-width: 860px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Brand panel */
.login-brand {
  background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: var(--white);
  padding: var(--sp-8) var(--sp-6);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.login-brand::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
}
.login-brand-wordmark {
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 600;
  line-height: 1.15; color: var(--white);
}
.login-brand-wordmark span { color: var(--gold-400); }
.login-brand-rule { width: 40px; height: 2px; background: var(--gold-500); margin: var(--sp-4) 0; }
.login-brand-tag {
  font-family: var(--font-ui); font-size: var(--fs-base); font-weight: 600;
  color: rgba(255,255,255,.92);
}
.login-brand-sub { font-size: var(--fs-sm); color: rgba(255,255,255,.62); margin-top: 4px; }
.login-brand-foot {
  font-size: var(--fs-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

/* Form panel */
.login-box {
  width: 100%; max-width: none;
  background: var(--white);
  border-radius: 0; box-shadow: none;
  padding: var(--sp-8) var(--sp-6);
  display: flex; flex-direction: column; justify-content: center;
}
.login-form-title {
  font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 600;
  color: var(--slate-900); margin-bottom: var(--sp-6);
}

/* Signup card (when visible on its own) */
#signup-box.login-box { box-shadow: var(--shadow-lg); border: var(--border); border-radius: var(--radius-lg); }

/* Stack on mobile */
@media (max-width: 640px) {
  .login-split { grid-template-columns: 1fr; max-width: 420px; }
  .login-brand { padding: var(--sp-6); }
  .login-brand::after {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 3px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-600));
  }
  .login-brand-foot { display: none; }
}

/* Legacy login-logo (signup form) */
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 {
  font-family: var(--font-head); font-size: var(--fs-lg); color: var(--navy-800);
  letter-spacing: 0; text-transform: none; font-weight: 600;
}
.login-logo h1 span { color: var(--gold-500); }
.login-logo p { font-size: var(--fs-sm); color: var(--slate-500); margin-top: 4px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 600;
  color: var(--slate-700); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: var(--tracking-caps);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: var(--fs-base);
  color: var(--slate-900); background: var(--white);
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(29,86,128,.12);
}
.form-group textarea { min-height: 80px; resize: vertical; line-height: 1.5; }

.form-row-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row-inline .form-group { flex: 1; min-width: 180px; }

.form-error-msg {
  background: #fdecea; border: 1px solid #f44336; color: #c62828;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 0.85rem; margin-bottom: 14px; display: none;
}
.form-success-msg {
  background: #e8f5e9; border: 1px solid #4caf50; color: #2e7d32;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 0.85rem; margin-bottom: 14px; display: none;
}
.login-signup-link { text-align: center; margin-top: 16px; font-size: 0.85rem; }
.login-signup-link a { color: var(--blue-light); text-decoration: none; }
.login-signup-link a:hover { text-decoration: underline; }

/* ── Section headings ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.section-header h2 { font-size: 1rem; color: var(--near-black); }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--navy-700);
}
.stat-value {
  font-family: var(--font-head); font-size: var(--fs-stat); font-weight: 600;
  color: var(--navy-800); line-height: 1; margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.stat-value.orange { color: var(--gold-600); }
.stat-value.green  { color: var(--success); }
.stat-value.red    { color: var(--danger); }
.stat-label {
  font-family: var(--font-ui); font-size: var(--fs-xs); color: var(--slate-500);
  text-transform: uppercase; letter-spacing: var(--tracking-caps); font-weight: 600;
}

/* ── Dashboard grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media(max-width: 640px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Tables ── */
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.data-table th {
  background: var(--slate-050); color: var(--slate-500);
  font-family: var(--font-ui);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--tracking-caps);
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--slate-200); white-space: nowrap;
}
.data-table td {
  padding: 10px 12px; font-size: 0.85rem;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--navy-050); cursor: pointer; }
.data-table .no-data td {
  color: var(--gray-mid); font-style: italic; text-align: center;
  padding: 24px; cursor: default;
}
.data-table .no-data td:hover { background: transparent; }

/* ── Status chips — desaturated, muted palette ── */
.status-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.chip-idea,
.chip-draft,
.chip-unverified      { background: var(--slate-100); color: var(--slate-700); border-color: var(--slate-200); }
.chip-drafted,
.chip-drafted-outreach,
.chip-asked,
.chip-interview       { background: var(--info-bg); color: var(--info); border-color: #dbe7f5; }
.chip-approved,
.chip-committed,
.chip-verified,
.chip-sent,
.chip-posted,
.chip-picked-up,
.chip-announced       { background: var(--success-bg); color: var(--success); border-color: #d3ecd9; }
.chip-scheduled       { background: #f3f0fb; color: #5b3da8; border-color: #e6dffa; }
.chip-target,
.chip-pending         { background: var(--warning-bg); color: var(--warning); border-color: #f5e6c8; }
.chip-declined,
.chip-rejected        { background: var(--danger-bg); color: var(--danger); border-color: #f5d3d3; }

/* ── Platform badges ── */
.platform-badge {
  display: inline-block;
  padding: 2px 7px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
}
.plat-ig { background: #e1306c; color: #fff; }
.plat-fb { background: #1877f2; color: #fff; }
.plat-yt { background: #ff0000; color: #fff; }
.plat-x  { background: #000; color: #fff; }

/* ── Endorsement board ── */
.endorse-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.endorse-col-header {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  text-align: center;
}
.col-target     { background: #fef3c7; color: #92400e; }
.col-asked      { background: #dbeafe; color: #1e40af; }
.col-committed  { background: #d1fae5; color: #065f46; }
.col-announced  { background: #dcfce7; color: #166534; border: 2px solid #16a34a; }
.col-declined   { background: #fee2e2; color: #991b1b; }

.endorse-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.endorse-card:hover { box-shadow: var(--shadow); border-color: var(--blue-light); }
.endorse-name { font-weight: 700; font-size: 0.9rem; }
.endorse-org  { font-size: 0.75rem; color: var(--gray-mid); margin-top: 2px; }
.endorse-meta { font-size: 0.72rem; color: var(--gray-mid); margin-top: 4px; }

/* ── Press / Media ── */
.media-filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
}
.media-filter-bar select, .media-filter-bar input {
  padding: 7px 10px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  min-width: 120px;
  -webkit-appearance: none;
}
.media-filter-bar select:focus, .media-filter-bar input:focus {
  outline: none; border-color: var(--blue);
}

/* ── Press outreach bar (GV callout + coming-soon) ── */
.press-outreach-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(25,102,146,.06);
  border: 1px solid rgba(25,102,146,.2);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin-bottom: 14px;
  font-size: 0.82rem;
}
.press-coming-soon {
  color: var(--gray-mid);
  font-style: italic;
  font-size: 0.8rem;
}

/* ── Press county group header ── */
.press-county-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--blue);
  color: var(--white);
  padding: 7px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: 16px;
}
.press-county-header:first-child { margin-top: 0; }
.press-county-label {
  font-family: var(--font-head);
  font-weight: 700; font-size: 0.88rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.press-county-count {
  font-size: 0.75rem; opacity: 0.75;
}
.press-county-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin-left: auto;
}
.press-county-actions .btn-ghost {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.35);
  color: var(--white);
  font-size: 0.75rem; padding: 3px 8px;
}
.press-county-actions .btn-ghost:hover { background: rgba(255,255,255,.28); }
.press-from-pill {
  font-size: 0.72rem; font-weight: 700;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  color: var(--white);
  padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
.press-county-table {
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .press-county-actions { margin-left: 0; width: 100%; }
  .press-outreach-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* click-to-call / click-to-text links */
a.action-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--blue-light); text-decoration: none;
  font-size: 0.82rem; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  transition: background 0.12s;
}
a.action-link:hover { background: rgba(25,102,146,.08); }
a.action-link.call  { color: var(--green); }
a.action-link.text  { color: var(--purple); }
a.action-link.email { color: var(--blue-light); }

/* ── Contacts — Trey's list ── */
.contact-row-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}

/* ── Approval queue ── */
.approval-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--gray-light);
  border-radius: var(--radius); margin-bottom: 10px;
  background: var(--white);
  flex-wrap: wrap;
}
.approval-module-badge {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px;
  background: var(--amber-bg); color: #7a5200;
  white-space: nowrap;
}
.approval-info { flex: 1; font-size: 0.88rem; }
.approval-by   { font-size: 0.75rem; color: var(--gray-mid); }
.approval-actions { display: flex; gap: 6px; }

/* ── Mass text composer ── */
.composer-wrap { background: var(--gray-bg); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.char-count { font-size: 0.75rem; color: var(--gray-mid); text-align: right; margin-top: 4px; }

/* ── Settings panel ── */
.settings-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.settings-row label { font-weight: 600; font-size: 0.85rem; min-width: 220px; }
.settings-row input, .settings-row select {
  flex: 1; min-width: 200px;
  padding: 8px 10px; border: 1.5px solid var(--gray-light); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.9rem;
}
.settings-row input:focus, .settings-row select:focus { outline: none; border-color: var(--blue); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  width: 100%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box h3 { margin-bottom: 4px; color: var(--near-black); }
.modal-footer { display: flex; gap: 10px; margin-top: 16px; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  background: var(--near-black); color: var(--white);
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity 0.3s;
  max-width: 320px;
  pointer-events: none;
}
#toast.visible { opacity: 1; }
#toast.toast-error   { background: var(--red); }
#toast.toast-success { background: var(--green); }

/* ── Role badges ── */
.role-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255,255,255,.3); color: var(--white);
}
.role-team    { background: rgba(254,162,15,.5); color: var(--near-black); border-color: var(--orange); }
.role-admin   { background: rgba(192,57,43,.7); }
.role-viewer  { background: rgba(255,255,255,.15); }

/* ── Empty / loading states ── */
.state-box { text-align: center; padding: 48px 24px; color: var(--gray-mid); }
.state-box .state-icon { font-size: 3rem; margin-bottom: 12px; }
.state-box h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--near-black); }
.state-box p  { font-size: 0.9rem; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pipeline status bar (horizontal strip) ── */
.pipeline-bar {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 14px; align-items: center;
}
.pipeline-step {
  padding: 4px 12px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pipeline-step.active {
  background: var(--blue); color: var(--white); border-color: var(--blue);
}
.pipeline-step:not(.active) {
  background: transparent; color: var(--gray-mid); border-color: var(--gray-light);
}
.pipeline-step:not(.active):hover { border-color: var(--blue); color: var(--blue); }
.pipeline-arrow { color: var(--gray-mid); font-size: 0.75rem; }

/* ── Admin screen ── */
.admin-create-wrap {
  border: 1px solid var(--gray-light); border-radius: var(--radius);
  margin-top: 12px; margin-bottom: 4px;
}
.admin-create-summary {
  padding: 10px 14px; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; color: var(--blue);
  user-select: none;
}
.admin-create-form {
  padding: 16px; border-top: 1px solid var(--gray-light);
  background: var(--gray-bg);
}
.role-select-inline {
  padding: 4px 8px; border: 1.5px solid var(--gray-light);
  border-radius: var(--radius); font-size: 0.82rem;
  font-family: var(--font-body); cursor: pointer;
}
.role-select-inline:focus { outline: none; border-color: var(--blue); }
.pending-notice {
  background: #fff8e1; border: 1px solid var(--orange);
  color: #7a5200; padding: 8px 14px;
  border-radius: var(--radius); font-size: 0.82rem; font-weight: 600;
  margin-bottom: 12px;
}
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ── District News ── */
.news-filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
}
.news-filter-bar select {
  padding: 7px 10px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  min-width: 140px;
  -webkit-appearance: none;
}
.news-filter-bar select:focus { outline: none; border-color: var(--blue); }

.news-date-group { margin-bottom: 20px; }
.news-date-header {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-mid);
  padding: 6px 0 8px;
  border-bottom: 2px solid var(--gray-light);
  margin-bottom: 10px;
}

.news-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-light);
}
.news-item:last-child { border-bottom: none; }

.news-item-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px; flex-wrap: wrap;
}
.news-importance-flag {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--danger); vertical-align: middle; margin-right: 2px;
}
.news-county {
  font-size: 0.75rem; font-weight: 600; color: var(--gray-mid);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.news-headline {
  font-weight: 700; font-size: 0.95rem;
  color: var(--near-black);
  margin-bottom: 4px;
}
.news-summary {
  font-size: 0.85rem; color: var(--gray-mid);
  line-height: 1.5; margin-bottom: 6px;
}
.news-source-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.news-source-name {
  font-size: 0.75rem; color: var(--gray-mid); font-style: italic;
}

/* Nathan in the News section header */
.nathan-news-heading {
  color: var(--orange);
  font-size: 1rem;
}

/* Nathan news item slight left accent */
.nathan-news-item {
  border-left: 3px solid var(--orange);
  padding-left: 10px;
}

/* Category badges */
.news-cat-badge {
  display: inline-block;
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; white-space: nowrap;
}

/* District categories */
.news-cat-agriculture  { background: #d1fae5; color: #065f46; }
.news-cat-development  { background: #dbeafe; color: #1e40af; }
.news-cat-economy      { background: #fef3c7; color: #92400e; }
.news-cat-politics     { background: #ede9fe; color: #5b21b6; }
.news-cat-publicsafety { background: #fee2e2; color: #991b1b; }
.news-cat-weather      { background: #e0f2fe; color: #0369a1; }
.news-cat-other        { background: #f3f4f6; color: #6b7280; }

/* Nathan-specific categories — reuse the palette */
.news-cat-profile        { background: #fff3e0; color: #e65100; }
.news-cat-endorsement    { background: #d1fae5; color: #065f46; }
.news-cat-policy         { background: #ede9fe; color: #5b21b6; }
.news-cat-interview      { background: #dbeafe; color: #1e40af; }
.news-cat-forumdebate    { background: #fce7f3; color: #9d174d; }
.news-cat-oped           { background: #fef3c7; color: #92400e; }
.news-cat-attackrebuttal { background: #fee2e2; color: #991b1b; }
.news-cat-announcement   { background: rgba(254,162,15,.15); color: #7a4a00; border: 1px solid rgba(254,162,15,.4); }

/* ── County Blast tab ── */
.blast-gv-callout {
  font-size: 0.8rem; font-weight: 700;
  background: rgba(254,162,15,.15);
  border: 1px solid rgba(254,162,15,.45);
  color: #7a4a00;
  padding: 4px 12px; border-radius: 20px;
  white-space: nowrap;
}
.blast-gv-active {
  background: rgba(25,102,146,.1);
  border-color: rgba(25,102,146,.35);
  color: var(--blue);
}
.blast-step {
  margin-bottom: 4px;
}
.blast-step-label {
  font-family: var(--font-head);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gray-mid);
  margin-bottom: 8px;
}
.blast-county-select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem;
  min-width: 200px; -webkit-appearance: none;
  background: var(--white); color: var(--near-black);
  transition: border-color 0.15s;
}
.blast-county-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,102,146,.12); }
.blast-county-count {
  font-size: 0.82rem; color: var(--blue); font-weight: 600;
}
.blast-appearances-list {
  margin-top: 6px;
}
.blast-appearance-item {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px solid var(--gray-light);
  font-size: 0.85rem;
}
.blast-appearance-item:last-child { border-bottom: none; }
.blast-appearance-date {
  font-weight: 700; color: var(--blue); white-space: nowrap; min-width: 80px;
}
.blast-appearance-title { flex: 1; }
.blast-appearance-county {
  font-size: 0.75rem; color: var(--gray-mid);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.blast-no-appearances {
  font-size: 0.85rem; color: var(--gray-mid); font-style: italic; padding: 6px 0;
}
.blast-char-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}
.blast-segment-hint {
  font-size: 0.75rem; color: var(--gray-mid);
}
.blast-recipient-summary {
  background: var(--gray-bg);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 0.88rem; margin-bottom: 12px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.blast-from-pill {
  font-size: 0.78rem; font-weight: 700;
  background: rgba(25,102,146,.1);
  border: 1px solid rgba(25,102,146,.3);
  color: var(--blue);
  padding: 3px 10px; border-radius: 20px;
}
.blast-from-missing {
  background: rgba(254,162,15,.15);
  border-color: rgba(254,162,15,.4);
  color: #7a4a00;
}
.blast-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.blast-sms-hint {
  font-size: 0.8rem; color: var(--gray-mid);
  background: var(--amber-bg);
  border: 1px solid rgba(254,162,15,.35);
  border-radius: var(--radius); padding: 8px 12px;
  margin-bottom: 12px; line-height: 1.5;
}
.blast-recipient-list {
  max-height: 340px; overflow-y: auto;
  border: 1px solid var(--gray-light); border-radius: var(--radius);
  padding: 4px 0;
}
.blast-recipient-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid var(--gray-light);
  gap: 10px;
}
.blast-recipient-row:last-child { border-bottom: none; }
.blast-rec-name {
  font-size: 0.88rem; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.blast-rec-sms {
  font-size: 0.88rem; color: var(--purple);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .blast-county-select { min-width: 160px; width: 100%; }
  .blast-actions { flex-direction: column; }
}

/* ── Calendar Grid View ── */

/* View toggle (Grid | List) pill */
.cal-view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-view-btn {
  padding: 5px 13px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-mid);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.cal-view-btn + .cal-view-btn { border-left: 1.5px solid var(--gray-light); }
.cal-view-btn.active {
  background: var(--blue);
  color: var(--white);
}

/* Month navigation bar */
.cal-month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.cal-month-label {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--near-black);
  min-width: 160px;
  text-align: center;
}

/* Comms/Full scope note */
.cal-scope-note { font-size: 0.72rem; color: var(--gray-mid); margin: 4px 0 8px; }

/* Legend */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.cal-legend-chip {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Scroll wrapper — no forced horizontal scroll; grid fills container */
.cal-scroll {
  overflow: visible;
}

/* 7-column grid — desktop: roomy, no horizontal scroll ever */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

/* Day-of-week header */
.cal-grid-dow {
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 6px 2px;
}

/* Individual day cells — roomy on desktop */
.cal-grid-cell {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  min-height: 96px;
  padding: 4px;
  vertical-align: top;
  overflow: hidden;
}
.cal-cell-empty {
  background: var(--gray-bg);
  border-color: transparent;
}
.cal-cell-today {
  border-color: var(--orange);
  background: #fffdf6;
}

/* Day number */
.cal-cell-num {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-mid);
  text-align: right;
  margin-bottom: 2px;
  line-height: 1;
}
.cal-cell-num-today {
  color: var(--orange);
}

/* Item chips inside day cells — titles wrap on desktop */
.cal-day-chip {
  display: block;
  width: 100%;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  cursor: pointer;
  overflow: hidden;
  white-space: normal;
  transition: opacity 0.1s;
}
.cal-day-chip:hover { opacity: 0.8; }

.cal-day-overflow {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gray-mid);
  text-align: right;
  padding-top: 1px;
}

/* Channel colors — used on both legend chips and day chips */
.cal-ch-event    { background: #dbeafe; color: #1e3a8a; }
.cal-ch-social   { background: #fff3cd; color: #7a4a00; }
.cal-ch-press    { background: #d1fae5; color: #065f46; }
.cal-ch-masstext { background: #ede9fe; color: #4c1d95; }
.cal-ch-email    { background: #ccfbf1; color: #0f5246; }
.cal-ch-other    { background: #f3f4f6; color: #6b7280; }

/* ── Agenda view (mobile-first, date-grouped cards) ── */
.cal-agenda { display: flex; flex-direction: column; gap: 18px; }
.cal-agenda-day { display: flex; flex-direction: column; gap: 6px; }
.cal-agenda-date {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: var(--white);
  padding: 6px 0 4px;
  z-index: 2;
  border-bottom: 2px solid var(--gray-light);
}
.cal-agenda-today .cal-agenda-date { color: var(--orange); border-color: var(--orange); }
.cal-agenda-todaylbl {
  background: var(--orange);
  color: #fff;
  font-size: 0.62rem;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.cal-agenda-item {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.12s, transform 0.12s;
  font-family: inherit;
}
.cal-agenda-item:active { transform: scale(0.99); }
.cal-agenda-item:hover  { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.cal-agenda-bar  { width: 5px; flex: none; } /* channel color spine, uses .cal-ch-* bg */
.cal-agenda-body { display: flex; flex-direction: column; gap: 5px; padding: 11px 12px; min-width: 0; flex: 1; }
.cal-agenda-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--near-black);
  line-height: 1.25;
}
.cal-agenda-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-agenda-time  { font-weight: 700; font-size: 0.78rem; color: var(--blue); }
.cal-agenda-allday { font-weight: 700; font-size: 0.78rem; color: var(--gray-mid); }
.cal-agenda-chip  { padding: 1px 8px; border-radius: 9px; font-size: 0.64rem; font-weight: 700; text-transform: uppercase; }
.cal-agenda-owner { font-size: 0.7rem; color: var(--gray-mid); }
/* County: small dot marker — no emoji */
.cal-agenda-county {
  font-size: 0.7rem;
  color: var(--gray-mid);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.cal-agenda-county::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gray-mid);
  flex-shrink: 0;
}

/* ── Week view (desktop 7-col strip) ── */
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-week-col {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  padding: 6px 4px;
  min-height: 120px;
}
.cal-week-today {
  border-color: var(--orange);
  background: #fffdf6;
}
.cal-week-dow {
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 3px 2px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.cal-week-num {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-mid);
  text-align: right;
  margin-bottom: 4px;
  line-height: 1;
}

/* Phone: collapse month chips to dots, no h-scroll */
@media (max-width: 680px) {
  .cal-grid  { min-width: 0; gap: 2px; }
  .cal-grid-cell { min-height: 46px; padding: 2px; }
  .cal-cell-num  { font-size: 0.7rem; }
  .cal-day-chip  {
    width: 7px; height: 7px; padding: 0; border-radius: 50%;
    display: inline-block; margin: 1px;
    text-indent: -9999px; overflow: hidden;
    white-space: nowrap;
  }
  .cal-day-overflow { display: none; }
  .cal-grid-dow { font-size: 0.6rem; padding: 4px 1px; }
  /* Fat-finger view toggle buttons */
  .cal-view-btn { padding: 8px 14px; font-size: 0.85rem; }
  /* Bigger agenda titles on phone */
  .cal-agenda-title { font-size: 1rem; }
}

/* Responsive: narrow screens at 760px handled in the mobile block below */

/* ── Hidden ── */
.hidden { display: none !important; }

/* ── Responsive (consolidated to 760px) ── */
@media (max-width: 760px) {
  main { padding: 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .header-gv-number { display: none; }
}

/* ── Clickable dashboard navigation ─────────────────────── */
#screen-dashboard .stat-card[data-nav],
#screen-dashboard .dash-card-head[data-nav] { cursor: pointer; }

#screen-dashboard .stat-card[data-nav] {
  transition: transform .12s ease, box-shadow .12s ease;
}
#screen-dashboard .stat-card[data-nav]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
}
#screen-dashboard .dash-card-head[data-nav]:hover h2 { text-decoration: underline; }

#screen-dashboard .dash-row:hover { background: var(--slate-100); }

/* keyboard focus ring for role="button" elements */
#screen-dashboard [data-nav]:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* deep-link pulse on the targeted endorsement column header */
@keyframes endorseColFlash {
  0%   { box-shadow: 0 0 0 0 rgba(22,69,107,.55); }
  100% { box-shadow: 0 0 0 8px rgba(22,69,107,0); }
}
.endorse-col-header.endorse-col-flash { animation: endorseColFlash 1.4s ease-out; }

/* ═══════════════════════════════════════════════════════════
   PASS 2 — Mobile-First Responsive (760px system)
   ═══════════════════════════════════════════════════════════ */

/* ── A) Mobile drawer nav ── */
.nav-toggle {
  display: none;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  width: 38px; height: 38px;
  border-radius: var(--radius);
  cursor: pointer; flex: 0 0 auto;
  padding: 0;
}
.nav-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.nav-scrim.open { opacity: 1; pointer-events: auto; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 10px;
  }

  nav#main-nav {
    position: fixed;
    top: var(--header-h); left: 0; bottom: 0;
    width: 78vw; max-width: 320px;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto; overflow-x: hidden;
    background: var(--white);
    border-right: 2px solid var(--gray-light);
    border-bottom: none;
    box-shadow: 4px 0 20px rgba(0,0,0,.18);
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 95;
  }
  nav#main-nav.open { transform: translateX(0); }

  /* Standalone items in drawer */
  nav#main-nav > button[data-tab] {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 14px 18px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--gray-light);
    border-left: 4px solid transparent;
    border-right: none;
    margin-bottom: 0;
  }
  nav#main-nav > button[data-tab].active {
    border-bottom-color: var(--gray-light);
    border-bottom-width: 1px;
    border-left-color: var(--gold-500);
    background: rgba(25,102,146,.06);
  }

  /* Groups in drawer: full-width accordion */
  .nav-group {
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--gray-light);
  }
  .nav-group-btn {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    border-bottom: none;
    border-left: 4px solid transparent;
    margin-bottom: 0;
    justify-content: space-between;
  }
  .nav-group-btn.nav-group-active {
    border-left-color: var(--gold-500);
    background: rgba(25,102,146,.04);
  }

  /* Dropdown = children, shown when group-open in mobile */
  .nav-dropdown {
    position: static;
    display: none;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--slate-100);
    background: var(--slate-050);
  }
  .nav-group.nav-group-open .nav-dropdown { display: flex; }
  /* On mobile, NEVER show dropdown on hover — only on .nav-group-open */
  .nav-group:hover .nav-dropdown { display: none; }
  .nav-group.nav-group-open .nav-dropdown { display: flex; }

  .nav-dropdown button[data-tab] {
    padding: 12px 28px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--slate-100);
  }
  .nav-dropdown button[data-tab].active {
    border-left: 4px solid var(--gold-500);
    padding-left: 24px;
    background: rgba(25,102,146,.06);
    color: var(--navy-900);
  }
  .nav-dropdown button .approvals-badge { margin-left: auto; }
  nav#main-nav > button[data-tab] .approvals-badge { margin-left: auto; }
}

/* ── B) Table → stacked cards ── */
@media (max-width: 760px) {
  .data-table { box-shadow: none; background: transparent; border-radius: 0; }
  .data-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .data-table tr {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .data-table td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border: none !important;
    padding: 5px 0;
    font-size: 0.88rem;
    max-width: none !important;
    white-space: normal !important;
  }
  .data-table td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--gray-mid);
  }
  .data-table td:not([data-label]) { display: block; padding-top: 8px; }
  .data-table td:not([data-label]) .btn { width: 100%; margin: 4px 0 0 !important; }
  .data-table td .contact-row-actions { flex-wrap: wrap; justify-content: flex-end; }
  .data-table tr:hover td { background: transparent; }

  /* Per-container overflow wrappers no longer need inner horizontal scroll */
  #media-list, #contacts-list, #submissions-list, #users-table-wrap { overflow-x: visible !important; }
}

/* ── C) Endorsements accordion ── */
@media (max-width: 760px) {
  .endorse-board { grid-template-columns: 1fr; gap: 0; }
  .endorse-col-header {
    position: sticky; top: var(--header-h); z-index: 5;
    margin: 0; border-radius: 0;
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
  }
  .endorse-col-header::after {
    content: '';
    display: inline-block;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform .15s;
    flex-shrink: 0;
  }
  .endorse-col.collapsed .endorse-col-header::after { transform: rotate(-90deg); }
  .endorse-col.collapsed .endorse-card { display: none; }
  .endorse-col { margin-bottom: 8px; }
  .endorse-card { margin: 8px 0 0; }
}

/* ── D) Calendar mobile toolbar ── */
@media (max-width: 760px) {
  #screen-calendar .section-header { gap: 8px; }
  #screen-calendar .section-header > div { width: 100%; justify-content: space-between; }
  .cal-view-toggle, #cal-scope-toggle { flex: 1; }
  .cal-view-btn { flex: 1; text-align: center; }
  #btn-cal-new { width: 100%; }
  .cal-month-nav { justify-content: center; }
  .cal-month-label { flex: 1; min-width: 0; font-size: 0.9rem; }
  /* Note: cal-grid dot-collapse and cell sizing rules live in the 680px block above */
}

/* ── E) Admin settings overflow ── */
@media (max-width: 760px) {
  .settings-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .settings-row label { min-width: 0; }
  .settings-row input, .settings-row select { min-width: 0; width: 100%; }
}

/* ── F) Global overflow guard + bottom-sheet modals ── */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  main { padding: 12px; }
  .card, .modal-box { word-break: break-word; }

  /* Bottom-sheet modals */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 22px 18px;
  }
}

/* ═══════════════════════════════════════════════════════
   NEWS — 3-column desktop layout
   ═══════════════════════════════════════════════════════ */

.news-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
  padding: 0 0 24px;
}

.news-col {
  background: var(--white, #fff);
  border: 1px solid var(--gray-light, #e5e7eb);
  border-radius: var(--radius-lg, 10px);
  box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
  overflow: hidden;
}

.news-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--near-black, #1a202c);
  background: var(--gray-light, #f3f4f6);
  border-bottom: 1px solid var(--gray-light, #e5e7eb);
  cursor: pointer;
  user-select: none;
}

.news-col-header:hover { background: var(--gray-mid, #d1d5db); }

.news-col-chevron {
  font-size: 0.7rem;
  transition: transform .15s;
  flex-shrink: 0;
  margin-left: 6px;
}

.news-col.news-col-collapsed .news-col-chevron { transform: rotate(-90deg); }

.news-col-body {
  padding: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.news-col.news-col-collapsed .news-col-body { display: none; }

/* Keep news items slim inside columns */
.news-col-body .news-item { padding: 8px 0; }

@media (max-width: 759px) {
  .news-columns-grid { display: none !important; }
}

/* ═══════════════════════════════════════════════════════
   CALENDAR — back-to-month link when focus date is set
   ═══════════════════════════════════════════════════════ */

.cal-focus-back-wrap {
  padding: 8px 0 4px;
}

.cal-focus-back-btn {
  font-size: 0.82rem;
}

/* ═══════════════════════════════════════════════════════
   NOTIFICATION BELL
   ═══════════════════════════════════════════════════════ */

.notif-bell-wrap {
  position: relative;
}

.notif-bell-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.notif-bell-btn:hover { background: rgba(255,255,255,.22); }

.notif-bell-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 18px; height: 18px;
  background: var(--gold-500); color: var(--navy-900);
  font-size: 0.65rem; font-weight: 800;
  border-radius: 9px;
  padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  border: 2px solid var(--navy-800);
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  max-height: 360px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9997;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-050);
  flex-shrink: 0;
}
.notif-panel-title {
  font-family: var(--font-ui);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--slate-700);
}
.notif-mark-read {
  background: none; border: none;
  color: var(--navy-600); font-size: var(--fs-xs);
  cursor: pointer; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  transition: background 0.12s;
}
.notif-mark-read:hover { background: var(--slate-100); }

.notif-list {
  overflow-y: auto;
  flex: 1;
}
.notif-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: var(--fs-sm); color: var(--slate-500);
}
.notif-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-100);
}
.notif-item:last-child { border-bottom: none; }
.notif-item-title {
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--slate-900); margin-bottom: 2px;
}
.notif-item-body {
  font-size: var(--fs-xs); color: var(--slate-500);
  margin-bottom: 4px; line-height: 1.4;
}
.notif-item-time {
  font-size: 0.7rem; color: var(--slate-400);
}

@media (max-width: 400px) {
  .notif-panel { width: calc(100vw - 24px); right: -8px; }
}

/* ═══════════════════════════════════════════════════════════
   TASKS
   ═══════════════════════════════════════════════════════════ */

/* Task list container */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Individual task row */
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-100);
  cursor: pointer;
  transition: background 0.1s;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--navy-050); }

.task-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.task-row-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--near-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-row-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.task-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Assignee initials avatar */
.task-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-800);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  border: 1.5px solid var(--white);
  margin-left: -6px;
  flex-shrink: 0;
}
.task-row-assignees {
  display: flex;
  align-items: center;
  padding-left: 6px; /* compensate negative margin */
}
.task-row-assignees .task-avatar:first-child { margin-left: 0; }

/* Due date */
.task-due {
  font-size: 0.76rem;
  color: var(--gray-mid);
  white-space: nowrap;
}
.task-due-overdue {
  color: var(--danger);
  font-weight: 700;
}

/* Comment count badge */
.task-comment-count {
  font-size: 0.75rem;
  color: var(--gray-mid);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* Tag chip (smaller than status-chip) */
.task-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--navy-100);
  color: var(--navy-700);
  border: 1px solid var(--navy-100);
  text-transform: lowercase;
}

/* Assignee checklist in modal */
.task-assignee-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding: 6px 2px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
}
.task-assignee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
}
.task-assignee-item:hover { background: var(--navy-050); }
.task-assignee-item input[type=checkbox] {
  accent-color: var(--navy-700);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Task comments thread */
.task-comment {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: var(--slate-050);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-100);
}
.task-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.task-comment-body {
  font-size: 0.85rem;
  color: var(--slate-700);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Mobile adjustments */
@media (max-width: 390px) {
  .task-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }
  .task-row-meta {
    width: 100%;
    justify-content: flex-start;
  }
  .task-row-title { white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════
   MESSAGES — native team messaging
   ═══════════════════════════════════════════════════════════ */

/* Two-pane shell */
.msg-shell {
  display: flex;
  height: calc(100vh - var(--header-h) - 48px); /* 48px = nav height */
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── LEFT: sidebar ── */
.msg-sidebar {
  display: flex;
  flex-direction: column;
  width: 300px;
  min-width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--slate-200);
  background: var(--slate-050);
}

.msg-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--slate-200);
  gap: 8px;
  flex-shrink: 0;
}

.msg-sidebar-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.msg-sidebar-actions {
  display: flex;
  gap: 6px;
}

/* Conversation list scrollable area */
.msg-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.msg-conv-items {
  display: flex;
  flex-direction: column;
}

/* Individual conversation row */
.msg-conv-row {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--slate-100);
  transition: background 0.1s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
}
.msg-conv-row:last-child { border-bottom: none; }
.msg-conv-row:hover { background: var(--navy-050); }
.msg-conv-row-active { background: var(--navy-100); }
.msg-conv-row-active:hover { background: var(--navy-100); }

.msg-conv-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msg-conv-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--near-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.msg-conv-time {
  font-size: 0.72rem;
  color: var(--gray-mid);
  flex-shrink: 0;
  white-space: nowrap;
}

.msg-conv-row-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.msg-conv-preview {
  font-size: 0.8rem;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.msg-conv-preview-bold {
  color: var(--near-black);
  font-weight: 600;
}

.msg-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--navy-700);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 5px;
  flex-shrink: 0;
}

/* ── RIGHT: thread pane ── */
.msg-thread-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
}

/* Empty state (no conversation selected) */
.msg-thread-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-mid);
  font-size: 0.88rem;
  text-align: center;
  padding: 32px;
  gap: 4px;
}

/* Thread wrapper (shown when conv is open) */
.msg-thread-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Thread header */
.msg-thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-200);
  background: var(--white);
  flex-shrink: 0;
  min-height: 52px;
}

.msg-back-btn {
  display: none; /* hidden on desktop, shown on mobile */
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--navy-700);
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  flex-shrink: 0;
}
.msg-back-btn:hover { background: var(--slate-100); }

.msg-thread-name {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-thread-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.msg-type-dm {
  background: var(--navy-100);
  color: var(--navy-700);
}
.msg-type-group {
  background: var(--gold-100);
  color: var(--gold-600);
}

/* ── Bubble list (scrollable) ── */
.msg-bubble-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
}

.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Bubble group: wraps sender label + bubble + time */
.msg-bubble-group {
  display: flex;
  flex-direction: column;
  max-width: 72%;
  gap: 3px;
}

.msg-mine {
  align-self: flex-end;
  align-items: flex-end;
}
.msg-theirs {
  align-self: flex-start;
  align-items: flex-start;
}

/* Sender label (others only, shown on first in run) */
.msg-sender-name {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--gray-mid);
  padding: 0 4px;
  margin-bottom: 1px;
  text-transform: none;
}

/* Message bubble */
.msg-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  line-height: 1.45;
  word-break: break-word;
}
.msg-mine .msg-bubble {
  background: var(--navy-700);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.msg-theirs .msg-bubble {
  background: var(--slate-100);
  color: var(--near-black);
  border-bottom-left-radius: 4px;
}

.msg-bubble-body {
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.msg-bubble-time {
  font-size: 0.68rem;
  color: var(--gray-mid);
  padding: 0 4px;
}

/* ── Compose bar ── */
.msg-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
  flex-shrink: 0;
}

.msg-compose-input {
  flex: 1;
  min-height: 38px;
  max-height: 100px;
  padding: 9px 12px;
  border: 1.5px solid var(--slate-300);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--near-black);
  background: var(--white);
  resize: none;
  line-height: 1.4;
  transition: border-color 0.15s;
  overflow-y: auto;
}
.msg-compose-input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(29,86,128,.10);
}

.msg-send-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Mobile: single-pane with slide ── */
.msg-mobile-hidden {
  display: none !important;
}

@media (max-width: 680px) {
  #screen-messages { padding: 0; margin: 0 -16px; }

  .msg-shell {
    border-radius: 0;
    border-left: none;
    border-right: none;
    height: calc(100vh - var(--header-h) - 44px);
  }

  .msg-sidebar {
    width: 100%;
    border-right: none;
  }

  .msg-thread-pane {
    width: 100%;
  }

  .msg-back-btn { display: flex; }

  .msg-bubble-group { max-width: 82%; }

  .msg-sidebar-actions .btn-sm { padding: 6px 10px; font-size: 0.72rem; }
}

@media (max-width: 390px) {
  .msg-compose-input { font-size: 0.85rem; }
  .msg-bubble-body   { font-size: 0.82rem; }
  .msg-conv-row      { padding: 10px 12px; min-height: 54px; }
  .msg-bubble-group  { max-width: 88%; }
}

/* ═══════════════════════════════════════════════════════════════
   CHAT — full-screen native messenger layout
   ─────────────────────────────────────────────────────────────
   Structure:
     #screen-chat
       .chat-shell              ← fills viewport below header
         .chat-topbar           ← sticky top bar
         .chat-history-drawer   ← slide-in left drawer
         .chat-history-backdrop ← scrim behind drawer
         #chat-loading          ← loading bar (hidden when done)
         .chat-thread           ← scrollable bubble area
         .chat-compose          ← fixed bottom input bar
   ═══════════════════════════════════════════════════════════════ */

/* ── Remove default main padding when chat is active ── */
#screen-chat {
  /* stretch past normal main padding so we get edge-to-edge */
  margin: -16px -16px 0;
}

/* ── Shell: full-screen column ── */
.chat-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-h));
  background: var(--slate-050);
  overflow: hidden;
}

/* ── Top bar ── */
.chat-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 56px;
  flex-shrink: 0;
  background: var(--white);
  border-bottom: var(--border);
  box-shadow: var(--shadow-xs);
  z-index: 20;
}

.chat-topbar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-topbar-name {
  font-family: var(--font-head);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-topbar-sub {
  font-size: 0.72rem;
  color: var(--slate-500);
  white-space: nowrap;
}

.chat-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--slate-500);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.chat-topbar-btn:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.chat-topbar-btn--primary {
  background: var(--navy-700);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
}

.chat-topbar-btn--primary:hover {
  background: var(--navy-900);
  color: var(--white);
}

/* Admin steer toggle in topbar */
.chat-steer-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--slate-500);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--slate-100);
  white-space: nowrap;
}

.chat-steer-wrap input { accent-color: var(--navy-700); }

/* ── History drawer ── */
.chat-history-drawer {
  position: absolute;
  top: 56px; /* below topbar */
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--white);
  border-right: var(--border);
  box-shadow: var(--shadow-md);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.22s ease;
}

.chat-history-drawer.hidden {
  transform: translateX(-100%);
  /* override .hidden display:none so transition works */
  display: flex !important;
  pointer-events: none;
}

.chat-history-backdrop {
  position: absolute;
  inset: 56px 0 0 0;
  background: rgba(10,37,64,.32);
  z-index: 29;
  cursor: pointer;
}

.chat-history-backdrop.hidden { display: none; }

.chat-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  border-bottom: var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate-900);
}

.chat-history-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.chat-history-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--slate-700);
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 0;
}

.chat-history-item:hover {
  background: var(--slate-100);
}

.chat-history-item--new {
  color: var(--navy-700);
  font-weight: 600;
  border-bottom: var(--border);
  margin-bottom: 4px;
}

.chat-history-empty {
  display: block;
  padding: 16px;
  font-size: 0.82rem;
  color: var(--slate-500);
  text-align: center;
}

/* ── Loading bar ── */
.chat-loading-bar {
  text-align: center;
  padding: 14px;
  font-size: 0.82rem;
  color: var(--slate-500);
  background: var(--slate-050);
  border-bottom: var(--border);
  display: none;
  flex-shrink: 0;
}

/* ── Thread area ── */
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}

/* ── Bubble rows ── */
.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 2px;
}

.chat-bubble-row--user {
  justify-content: flex-end;
}

.chat-bubble-row--bot {
  justify-content: flex-start;
}

.chat-bubble-row--steer {
  justify-content: flex-end;
}

/* Avatar dot for bot side */
.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-700);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* Bubble wrapper: label + bubble */
.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 72%;
  gap: 2px;
}

.chat-bubble-row--user  .chat-bubble-wrap { align-items: flex-end; }
.chat-bubble-row--bot   .chat-bubble-wrap { align-items: flex-start; }
.chat-bubble-row--steer .chat-bubble-wrap { align-items: flex-end; }

.chat-bubble-meta {
  font-size: 0.68rem;
  color: var(--slate-500);
  padding: 0 4px;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

/* User bubble: navy right */
.chat-bubble--user {
  background: var(--navy-700);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

/* Bot bubble: light left */
.chat-bubble--bot {
  background: var(--white);
  color: var(--slate-900);
  border: var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}

/* Admin steer bubble: purple */
.chat-bubble--steer {
  background: var(--purple);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

/* Timestamp shown below each bubble row */
.chat-bubble-time {
  font-size: 0.65rem;
  color: var(--slate-400);
  padding: 0 4px;
  display: block;
}

/* ── Typing indicator ── */
.chat-typing-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 2px;
}

.chat-typing-bubble {
  background: var(--white);
  border: var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-xs);
}

.chat-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--slate-400);
  animation: chat-dot-bounce 1.2s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Compose bar ── */
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--white);
  border-top: var(--border);
  flex-shrink: 0;
}

.chat-compose-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 14px;
  border: 1.5px solid var(--slate-300);
  border-radius: 22px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  line-height: 1.4;
  resize: none;
  outline: none;
  background: var(--slate-050);
  color: var(--slate-900);
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow-y: auto;
}

.chat-compose-input:focus {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(29,86,128,.12);
  background: var(--white);
}

.chat-compose-input::placeholder { color: var(--slate-400); }

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--navy-700);
  color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.chat-send-btn:hover  { background: var(--navy-900); }
.chat-send-btn:active { transform: scale(0.93); }
.chat-send-btn:disabled { background: var(--slate-300); cursor: not-allowed; transform: none; }

/* ── Desktop: center + constrain width, show sidebar rail ── */
@media (min-width: 768px) {
  #screen-chat { margin: -16px auto 0; max-width: 760px; }

  .chat-shell {
    height: calc(100dvh - var(--header-h));
    border-left: var(--border);
    border-right: var(--border);
    background: var(--white);
  }

  .chat-bubble-wrap { max-width: 62%; }

  .chat-compose { padding: 12px 20px; }

  .chat-thread  { padding: 20px 20px 8px; }
}

/* ── Mobile tight ── */
@media (max-width: 390px) {
  .chat-bubble-wrap { max-width: 84%; }
  .chat-bubble      { font-size: 0.87rem; padding: 9px 12px; }
  .chat-compose-input { font-size: 0.87rem; }
}

/* ════════════════════════════════════════════════════════════
   PHONE BANK
   ════════════════════════════════════════════════════════════ */

/* ── Sub-view pill nav ── */
.pb-subnav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.pb-subnav-btn {
  padding: 8px 20px;
  border: 1.5px solid var(--slate-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-500);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  min-height: 40px;
}
.pb-subnav-btn.active {
  background: var(--navy-700);
  color: var(--white);
  border-color: var(--navy-700);
}
.pb-subnav-btn:not(.active):hover {
  border-color: var(--navy-600);
  color: var(--navy-700);
}

/* ── Filter bar ── */
.pb-filter-bar { padding: 14px 16px; margin-bottom: 14px; }
.pb-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.pb-filter-group { flex: 1 1 140px; min-width: 100px; margin-bottom: 0; }
.pb-filter-group .form-group { margin-bottom: 0; }
.pb-filter-check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
  flex: 0 0 auto;
}
.pb-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
  min-height: 38px;
}
.pb-check-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--navy-700);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Empty / start state ── */
.pb-empty-card {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-mid);
}
.pb-empty-icon { margin-bottom: 16px; }

/* ── Contact card ── */
.pb-contact-card { padding: 20px; }

.pb-contact-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.pb-contact-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.15;
}
.pb-contact-sub {
  font-size: var(--fs-sm);
  color: var(--slate-500);
  margin-top: 2px;
}

/* Tier badge */
.pb-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding: 0 8px;
}
.pb-tier-p1,
.pb-tier-1 { background: var(--danger-bg);   color: var(--danger); }
.pb-tier-p2,
.pb-tier-2 { background: var(--warning-bg);  color: var(--warning); }
.pb-tier-p3,
.pb-tier-3 { background: var(--info-bg);     color: var(--info); }
.pb-tier-inbound { background: var(--gold-100); color: var(--gold-600); }
.pb-tier-other,
.pb-tier-p4,
.pb-tier-0,
.pb-tier-4 { background: var(--slate-100);   color: var(--slate-500); }

/* Tap-to-call link */
.pb-call-link-row {
  margin-bottom: 16px;
}
.pb-call-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-700);
  text-decoration: none;
  padding: 10px 16px;
  background: var(--navy-050);
  border: 1.5px solid var(--navy-100);
  border-radius: var(--radius);
  min-height: 48px;
  transition: background 0.12s, border-color 0.12s;
}
.pb-call-link:hover { background: var(--navy-100); border-color: var(--navy-600); }

/* Detail rows */
.pb-detail-rows {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pb-detail-row {
  display: flex;
  gap: 10px;
  font-size: var(--fs-sm);
  line-height: 1.4;
}
.pb-detail-label {
  flex: 0 0 96px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs);
  padding-top: 1px;
}
.pb-detail-val { color: var(--slate-700); }

/* Call history */
.pb-history-row {
  font-size: var(--fs-xs);
  color: var(--slate-500);
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 14px;
  font-style: italic;
}

/* Outcome buttons */
.pb-outcome-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  margin-bottom: 8px;
}
.pb-outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.pb-outcome-btn {
  padding: 10px 8px;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--slate-700);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  min-height: 44px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pb-outcome-btn:hover {
  border-color: var(--navy-600);
  color: var(--navy-700);
  background: var(--navy-050);
}
.pb-outcome-btn.pb-outcome-selected {
  background: var(--navy-700);
  color: var(--white);
  border-color: var(--navy-700);
}
.pb-outcome-err {
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-bottom: 8px;
}

/* Action row */
.pb-action-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.pb-action-row .btn { flex: 1; min-width: 120px; }

/* ── Stats strip (Roster) ── */
.pb-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.pb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1 1 70px;
  min-width: 60px;
}
.pb-stat-wide {
  flex: 2 1 140px;
  align-items: flex-start;
}
.pb-stat-val {
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1;
}
.pb-stat-lbl {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--slate-500);
}
.pb-leader-row {
  display: block;
  font-size: var(--fs-xs);
  color: var(--slate-700);
  line-height: 1.6;
}

/* ── Roster tap-to-call inline link ── */
.pb-tel-link {
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pb-tel-link:hover { text-decoration: underline; }

/* ── Pagination ── */
.pb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-light);
}
.pb-page-info {
  font-size: var(--fs-xs);
  color: var(--slate-500);
}

/* ── Mobile adjustments ── */
@media (max-width: 680px) {
  .pb-outcome-grid { grid-template-columns: repeat(2, 1fr); }
  .pb-filter-group { flex: 1 1 100%; }
  .pb-action-row .btn { flex: 1 1 100%; }
  .pb-stats-strip { gap: 10px; }
  .pb-stat { flex: 1 1 45%; }
}
@media (max-width: 390px) {
  .pb-contact-name { font-size: 1.25rem; }
  .pb-outcome-grid { grid-template-columns: 1fr 1fr; }
  .pb-call-link { font-size: 1.05rem; }
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE SHELL v2 — compact top bar · bottom tab nav · account drawer
   Built mobile-first. Desktop (≥769px) keeps the existing top nav.
   ════════════════════════════════════════════════════════════════════ */
:root{
  --bn-h: 58px;                              /* bottom nav height (excl. safe area) */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --shell-shadow: 0 1px 2px rgba(10,37,64,.04), 0 4px 16px rgba(10,37,64,.06);
}

/* default (desktop): new chrome hidden */
.topbar-title{ display:none; }
.drawer-account{ display:none; }
#bottom-nav{ display:none; }

/* ───────────────────────── MOBILE (≤768px) ───────────────────────── */
@media (max-width: 768px){

  /* —— compact sticky top bar: [☰] [ screen title ] [🔔] —— */
  header#topbar{
    position: sticky; top:0;
    height: calc(52px + var(--safe-t));
    padding: var(--safe-t) 6px 0 6px;
    gap: 2px; justify-content: space-between;
  }
  header#topbar .header-left{ display:none; }          /* hide desktop wordmark + GV */
  header#topbar .topbar-title{
    display:block; flex:1; min-width:0;
    font-family: var(--font-head); font-weight:700; font-size:1.14rem;
    color:#fff; text-align:center; letter-spacing:.005em;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  header#topbar .nav-toggle{ display:flex; flex:0 0 auto; }
  /* account chrome leaves the bar — lives in the drawer now */
  header#topbar .header-caller,
  header#topbar .role-badge,
  header#topbar .btn-logout{ display:none; }
  header#topbar .header-right{ flex:0 0 auto; gap:0; }

  /* —— content clears the fixed bottom nav —— */
  main{ padding-bottom: calc(var(--bn-h) + var(--safe-b) + 14px); }

  /* —— bottom tab bar —— */
  #bottom-nav{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:120;
    height: calc(var(--bn-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 -2px 16px rgba(10,37,64,.07);
  }
  #bottom-nav.hidden{ display:none; }
  .bn-tab{
    position:relative; flex:1; min-width:0;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
    border:none; background:none; cursor:pointer; padding:7px 0 0;
    color: var(--slate-500); -webkit-tap-highlight-color: transparent;
    transition: color .15s;
  }
  .bn-tab svg{ width:23px; height:23px; transition: stroke .15s, transform .15s; }
  .bn-tab > span:not(.bn-badge){ font-size:.65rem; font-weight:600; letter-spacing:.005em;
    max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .bn-tab:active svg{ transform: scale(.9); }
  .bn-tab.active{ color: var(--navy-800); }
  .bn-tab.active svg{ stroke: var(--orange); }
  .bn-tab.active::before{
    content:""; position:absolute; top:0; left:50%; transform:translateX(-50%);
    width:26px; height:3px; border-radius:0 0 4px 4px; background: var(--orange);
  }
  .bn-badge{
    position:absolute; top:4px; left:calc(50% + 8px);
    min-width:16px; height:16px; padding:0 4px;
    background: var(--orange); color: var(--navy-900);
    font-size:.6rem; font-weight:800; line-height:16px; text-align:center; border-radius:8px;
  }
  .bn-badge.hidden{ display:none; }

  /* —— drawer account header (top of the slide-in menu) —— */
  .drawer-account{
    display:block;
    padding: calc(var(--safe-t) + 18px) 18px 16px;
    background: linear-gradient(165deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color:#fff; margin: 0 0 6px;
  }
  .drawer-brand{ font-family: var(--font-head); font-weight:700; font-size:1.32rem; letter-spacing:.005em; }
  .drawer-brand span{ color: var(--gold-400); }
  .drawer-id{ display:flex; align-items:center; gap:12px; margin-top:15px; }
  .drawer-avatar{
    flex:0 0 auto; width:44px; height:44px; border-radius:50%;
    background: linear-gradient(150deg, var(--gold-400), var(--orange));
    color: var(--navy-900); display:flex; align-items:center; justify-content:center;
    font-weight:800; font-size:1.15rem; text-transform:uppercase;
  }
  .drawer-id-meta{ flex:1; min-width:0; }
  .drawer-id-name{ font-weight:700; font-size:1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .drawer-id-role{ font-size:.7rem; color:rgba(255,255,255,.62); text-transform:uppercase; letter-spacing:.07em; margin-top:1px; }
  .drawer-logout{
    flex:0 0 auto; width:40px; height:40px; border-radius:11px;
    background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); color:#fff;
    display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s;
  }
  .drawer-logout:active{ background:rgba(255,255,255,.25); }
  .drawer-gv{ margin-top:13px; font-size:.76rem; font-weight:700; color: var(--gold-400);
    letter-spacing:.02em; }
  .drawer-gv:empty{ display:none; }

  /* tighten nav rows for thumb reach inside the drawer */
  #main-nav > button[data-tab],
  #main-nav .nav-group-btn,
  #main-nav .nav-dropdown button{ min-height:48px; }
}

/* ───────────────── DESKTOP (≥769px): top nav, no bottom bar ───────────────── */
@media (min-width: 769px){
  .topbar-title{ display:none !important; }
  .drawer-account{ display:none !important; }
  #bottom-nav{ display:none !important; }
}

/* ════════════════════════════════════════════════════════════════════
   CHAT v2 — bound to viewport, slim bar, welcome state, attachments
   ════════════════════════════════════════════════════════════════════ */

/* slim action row: [history]  context  [new] */
.chat-topbar-ctx{
  flex:1; min-width:0; text-align:center;
  font-family: var(--font-head); font-weight:700; font-size:.96rem; color: var(--slate-900);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* ── welcome / empty state ── */
.chat-welcome{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; gap:10px; min-height:100%; padding:32px 26px;
}
.chat-thread:not(.has-messages) .chat-welcome{ display:flex; }
.chat-thread.has-messages .chat-welcome{ display:none; }
.chat-welcome-mark{ font-family:var(--font-head); font-weight:700; font-size:1.7rem; color:var(--navy-800); }
.chat-welcome-mark span{ color: var(--gold-500); }
.chat-welcome-title{ font-family:var(--font-head); font-size:1.45rem; font-weight:700; color:var(--slate-900); margin-top:6px; }
.chat-welcome-sub{ font-size:.9rem; color:var(--slate-500); max-width:300px; line-height:1.5; }
.chat-welcome-chips{ display:flex; flex-direction:column; gap:9px; margin-top:16px; width:100%; max-width:320px; }
.chat-chip{
  background:var(--white); border:1px solid var(--slate-200); border-radius:14px;
  padding:13px 16px; font-size:.88rem; color:var(--slate-700); text-align:left; cursor:pointer;
  box-shadow:0 1px 2px rgba(10,37,64,.04); transition:border-color .15s, transform .1s;
}
.chat-chip:active{ transform:scale(.985); border-color:var(--gold-400); }

/* ── compose: attach button + input + send ── */
.chat-attach-btn{
  flex:0 0 auto; width:40px; height:40px; border-radius:50%; border:none;
  background:var(--slate-100); color:var(--navy-700); display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:background .15s, transform .12s;
}
.chat-attach-btn:active{ transform:scale(.92); background:var(--slate-200); }
.chat-attach-btn.open{ transform:rotate(45deg); background:var(--navy-700); color:#fff; }

/* ── attachment action sheet ── */
.chat-attach-sheet{
  position:absolute; left:10px; right:10px; bottom:74px; z-index:40;
  background:var(--white); border:1px solid var(--slate-200); border-radius:18px;
  box-shadow:0 12px 40px rgba(10,37,64,.18); padding:10px;
  display:grid; grid-template-columns:repeat(4,1fr); gap:6px;
  animation: sheet-up .18s ease;
}
@keyframes sheet-up{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:none;} }
.chat-attach-sheet button{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 4px;
  border:none; background:none; border-radius:12px; cursor:pointer; color:var(--navy-800);
  font-size:.72rem; font-weight:600;
}
.chat-attach-sheet button:active{ background:var(--slate-100); }
.chat-attach-sheet button svg{ color:var(--navy-700); }
.chat-attach-backdrop{ position:fixed; inset:0; z-index:35; }

/* ── pending attachment preview chip ── */
.chat-attach-preview{
  display:flex; align-items:center; gap:10px; margin:0 12px 6px;
  background:var(--navy-050); border:1px solid var(--slate-200); border-radius:12px; padding:8px 10px;
}
.chat-attach-preview img{ width:42px; height:42px; border-radius:8px; object-fit:cover; }
.chat-attach-preview .cap-name{ flex:1; min-width:0; font-size:.82rem; color:var(--slate-700);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-attach-preview .cap-x{ border:none; background:var(--slate-200); color:var(--slate-700);
  width:26px; height:26px; border-radius:50%; cursor:pointer; flex:0 0 auto; font-weight:700; }
.chat-attach-preview.recording{ background:var(--danger-bg); border-color:#fecaca; }
.chat-attach-preview .rec-dot{ width:10px;height:10px;border-radius:50%;background:var(--danger);animation:rec-pulse 1s infinite; }
@keyframes rec-pulse{ 0%,100%{opacity:1;} 50%{opacity:.3;} }

/* attachments inside a bubble */
.chat-bubble .bub-attach img{ max-width:200px; border-radius:12px; display:block; margin-bottom:4px; }
.chat-bubble .bub-attach audio{ width:200px; }
.chat-bubble .bub-attach a{ display:inline-flex; align-items:center; gap:6px; font-size:.84rem; }

/* ── MOBILE: fix the shell between the global top bar and the bottom nav ── */
@media (max-width: 768px){
  #screen-chat{ margin:0; }
  .chat-shell{
    position:fixed; left:0; right:0;
    top: calc(52px + var(--safe-t));
    bottom: calc(var(--bn-h) + var(--safe-b));
    height:auto; border-radius:0;
  }
  .chat-topbar{ height:48px; padding:0 8px; }
}

/* attachments render in BOTH chat + message bubbles */
.msg-bubble .bub-attach img, .chat-bubble .bub-attach img { max-width:200px; border-radius:12px; display:block; margin-bottom:4px; }
.msg-bubble .bub-attach audio, .chat-bubble .bub-attach audio { width:200px; max-width:100%; }
.msg-bubble .bub-attach a, .chat-bubble .bub-attach a { display:inline-flex; align-items:center; gap:6px; font-size:.84rem; text-decoration:underline; }
.msg-bubble .bub-attach .upload-open-btn, .chat-bubble .bub-attach .upload-open-btn{
  appearance:none; border:0; background:transparent; padding:0; color:inherit;
  display:inline-flex; align-items:center; gap:6px; font:inherit; font-size:.84rem;
  text-decoration:underline; cursor:pointer; text-align:left; max-width:220px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.msg-bubble .bub-attach .upload-open-btn:focus-visible, .chat-bubble .bub-attach .upload-open-btn:focus-visible{
  outline:2px solid currentColor; outline-offset:3px; border-radius:4px;
}
.msg-bubble .bub-attach { margin-bottom:3px; }
/* message attach sheet sits above the compose bar */
#msg-attach-sheet { bottom: 70px; }

/* ════════════════════════════════════════════════════════════════════
   MOBILE FIXES — stop iOS input auto-zoom, no horizontal drift,
   remove the stray Google-Voice pill from the header
   ════════════════════════════════════════════════════════════════════ */
/* The campaign Google Voice number does not belong in the global header. */
.header-gv-number, .drawer-gv { display: none !important; }

@media (max-width: 768px){
  /* iOS zooms in when a focused input has font-size < 16px. Force >=16px. */
  input, textarea, select,
  .chat-compose-input, .msg-compose-input,
  .pb-filter-bar input, .data-table input { font-size: 16px !important; }
  /* never let the page drift horizontally (the constant re-centering) */
  html, body, #app, main { max-width: 100vw; overflow-x: hidden; }
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE: task-modal must scroll; assignee rows = big tappable toggles
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px){
  .modal-box { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #modal-task .modal-box { max-height: 90vh; }

  .task-assignee-list { max-height: 210px; overflow-y: auto; gap: 8px; }
  .task-assignee-item {
    min-height: 48px; padding: 9px 12px; border: 1.5px solid var(--slate-200);
    border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .task-assignee-item input[type=checkbox] {
    width: 22px !important; height: 22px !important; accent-color: var(--navy-700);
  }
  .task-assignee-item:active { background: var(--slate-100); }
  /* clear selected state (iOS 16.4+) */
  .task-assignee-item:has(input:checked) {
    background: var(--navy-050); border-color: var(--navy-700); font-weight: 600;
  }
}

/* "Report an issue" nav button */
.nav-feedback-btn {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--slate-500); cursor: pointer; font: inherit;
}
.nav-feedback-btn:hover { color: var(--orange); }
@media (max-width: 768px){
  .nav-feedback-btn { min-height: 48px; padding: 0 16px; border-top: 1px solid var(--slate-100); margin-top: 6px; }
}
.feedback-modal-box { max-width: min(980px, calc(100vw - 28px)); max-height: min(86vh, 860px); overflow-y: auto; }
.feedback-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:12px; }
.feedback-head h3 { margin-bottom:4px; }
.feedback-head p { font-size:0.84rem; color:var(--gray-mid); margin:0; line-height:1.45; }
.feedback-form-grid { display:grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap:10px; }
.feedback-board-wrap { margin-top:16px; border-top:1px solid var(--gray-light); padding-top:14px; }
.feedback-board-title { font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--slate-500); margin-bottom:10px; }
.feedback-board { display:grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap:10px; overflow-x:auto; padding-bottom:4px; }
.feedback-col { background:var(--slate-050,#f8fafc); border:1px solid var(--gray-light); border-radius:12px; padding:8px; min-height:120px; }
.feedback-col-head { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:.78rem; font-weight:800; color:var(--navy-800); margin-bottom:8px; }
.feedback-col-head b { background:var(--white); border:1px solid var(--gray-light); border-radius:999px; padding:1px 7px; font-size:.72rem; }
.feedback-card { background:#fff; border:1px solid var(--gray-light); border-radius:10px; padding:8px; margin-bottom:8px; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.feedback-card-top { display:flex; gap:5px; flex-wrap:wrap; margin-bottom:5px; }
.feedback-type, .feedback-priority { display:inline-flex; border-radius:999px; padding:1px 6px; font-size:.66rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; background:var(--slate-100); color:var(--slate-700); }
.feedback-type.bug, .feedback-priority.urgent { background:#fee2e2; color:#991b1b; }
.feedback-type.improvement, .feedback-priority.high { background:#ffedd5; color:#9a3412; }
.feedback-type.request { background:#dbeafe; color:#1d4ed8; }
.feedback-card-title { font-size:.82rem; font-weight:800; color:var(--navy-900); line-height:1.25; margin-bottom:4px; }
.feedback-card-msg { font-size:.76rem; color:var(--slate-600); line-height:1.3; max-height:3.9em; overflow:hidden; }
.feedback-card-meta { font-size:.7rem; color:var(--gray-mid); margin-top:6px; }
.feedback-empty { color:var(--gray-mid); font-size:.76rem; padding:8px 2px; }
@media (max-width: 768px){
  .feedback-modal-box { max-width: calc(100vw - 16px); max-height: 90vh; }
  .feedback-head { flex-direction:column; }
  .feedback-form-grid { grid-template-columns: 1fr; }
  .feedback-board { grid-template-columns: repeat(6, minmax(180px, 76vw)); }
}
.form-success-msg { color: var(--success); background: var(--success-bg); border: 1px solid #bbf7d0;
  padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 10px; }

/* call-log outcome tag */
.pb-outcome-tag { display:inline-block; padding:2px 8px; border-radius:10px; font-size:.74rem; font-weight:600;
  background:var(--navy-050); color:var(--navy-700); white-space:nowrap; }

/* ───────── Dashboard: greeting + need-to-know cards ───────── */
.dash-greeting { margin: 2px 0 14px; }
.dash-greeting-hi { font-size: 1.4rem; font-weight: 800; color: var(--navy-900); letter-spacing: -0.01em; }
.dash-greeting-sub { font-size: 0.82rem; color: var(--gray-mid); margin-top: 2px; }
.dashboard-priority-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 720px) { .dashboard-priority-grid { grid-template-columns: 1fr; } }
.dash-priority-card .section-header { cursor: pointer; align-items: center; }
.dash-card-link { font-size: 0.78rem; color: var(--blue); font-weight: 700; white-space: nowrap; }
.dash-empty { color: var(--gray-mid); font-size: 0.85rem; padding: 8px 0 2px; }
.dash-task, .dash-agenda { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--gray-light); cursor: pointer; }
.dash-task:last-child, .dash-agenda:last-child { border-bottom: 0; }
.dash-task-title, .dash-agenda-title { font-size: 0.88rem; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-task-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dash-task-due { font-size: 0.78rem; color: var(--gray-mid); white-space: nowrap; }
.dash-task-due.overdue { color: #c0392b; font-weight: 700; }
.dash-agenda-when { font-size: 0.78rem; color: var(--blue); font-weight: 700; flex-shrink: 0; white-space: nowrap; }

/* ════════════════════════════════════════════════════════════
   PRODUCT LANDING PAGE (RallyPoint marketing shell)
   Unauthenticated root. Additive — does not affect the app shell.
   ════════════════════════════════════════════════════════════ */
#screen-landing {
  display: block;
  min-height: 100vh;
  background: var(--white);
  color: var(--slate-900);
  font-family: var(--font-body);
  -webkit-overflow-scrolling: touch;
}
#screen-landing .rp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-sm);
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s;
  text-decoration: none; white-space: nowrap;
}
#screen-landing .rp-btn:active { transform: scale(.98); }
#screen-landing .rp-btn-lg { padding: 13px 26px; font-size: var(--fs-base); }
.rp-btn-primary { background: var(--navy-700); color: #fff; box-shadow: var(--shadow-sm, var(--shadow)); }
.rp-btn-primary:hover { background: var(--navy-800); }
.rp-btn-ghost { background: transparent; color: var(--navy-700); border-color: var(--slate-300); }
.rp-btn-ghost:hover { border-color: var(--navy-600); background: var(--navy-050); }

/* nav */
.rp-lp-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.rp-lp-nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.rp-lp-logo {
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  color: var(--navy-900); letter-spacing: -.01em;
}
.rp-lp-logo span { color: var(--gold-500); }
.rp-lp-logo.small { font-size: 1.15rem; }
.rp-lp-nav-links { display: flex; gap: 26px; }
.rp-lp-nav-links a {
  font-size: var(--fs-sm); font-weight: 600; color: var(--slate-700);
  text-decoration: none;
}
.rp-lp-nav-links a:hover { color: var(--navy-700); }

/* hero */
.rp-lp-hero {
  background:
    radial-gradient(1000px 520px at 12% -8%, var(--navy-050), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, var(--gold-100), transparent 55%),
    var(--white);
  border-bottom: 1px solid var(--slate-100);
}
.rp-lp-hero-inner {
  max-width: 1120px; margin: 0 auto; padding: 72px 24px 84px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.rp-lp-eyebrow {
  display: inline-block; font-family: var(--font-ui); font-size: var(--fs-xs);
  font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--gold-600); margin-bottom: 14px;
}
.rp-lp-h1 {
  font-family: var(--font-head); font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  line-height: 1.08; letter-spacing: -.02em; color: var(--navy-900); margin-bottom: 18px;
}
.rp-lp-sub {
  font-size: var(--fs-md); line-height: 1.55; color: var(--slate-700); max-width: 33em;
}
.rp-lp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.rp-lp-hero-trust {
  margin-top: 26px; font-size: var(--fs-sm); color: var(--slate-500);
  display: flex; align-items: center; gap: 8px;
}
.rp-lp-hero-trust strong { color: var(--slate-700); }
.rp-lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(21,128,61,.15); }

/* dashboard mock */
.rp-lp-hero-art { perspective: 1400px; }
.rp-mock {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden; transform: rotateY(-6deg) rotateX(3deg); transform-origin: center;
}
.rp-mock-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 14px; background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
}
.rp-mock-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.35); }
.rp-mock-bar-title {
  margin-left: 10px; color: rgba(255,255,255,.9); font-size: var(--fs-xs);
  font-weight: 600; letter-spacing: .04em;
}
.rp-mock-body { padding: 18px; background: var(--slate-050); }
.rp-mock-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.rp-mock-stat {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: 9px;
  padding: 12px 10px; text-align: center;
}
.rp-mock-stat b { display: block; font-family: var(--font-head); font-size: 1.45rem; color: var(--navy-800); }
.rp-mock-stat span { font-size: .68rem; color: var(--slate-500); }
.rp-mock-rows { display: flex; flex-direction: column; gap: 8px; }
.rp-mock-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: 8px; padding: 11px 12px;
}
.rp-mock-row i { flex: 1; height: 8px; border-radius: 4px; background: var(--slate-200); }
.rp-mock-row b { width: 38px; height: 8px; border-radius: 4px; background: var(--slate-100); }
.rp-mock-pill { width: 8px; height: 26px; border-radius: 4px; }
.rp-mock-pill.green { background: var(--success); }
.rp-mock-pill.gold  { background: var(--gold-500); }
.rp-mock-pill.navy  { background: var(--navy-600); }

/* sections */
.rp-lp-section { max-width: 1120px; margin: 0 auto; padding: 76px 24px; }
.rp-lp-section-alt { max-width: none; background: var(--navy-050); border-block: 1px solid var(--slate-100); }
.rp-lp-section-alt > * { max-width: 1120px; margin-inline: auto; }
.rp-lp-section-head { text-align: center; max-width: 40em; margin: 0 auto 44px; }
.rp-lp-section-head h2 {
  font-family: var(--font-head); font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  color: var(--navy-900); letter-spacing: -.015em; margin-bottom: 12px;
}
.rp-lp-section-head p { color: var(--slate-500); font-size: var(--fs-md); }

/* feature grid */
.rp-lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rp-feature {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: 12px; padding: 26px 24px; box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.rp-feature:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--slate-300); }
.rp-feature-ico {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-050); color: var(--navy-700); margin-bottom: 16px;
}
.rp-feature-ico svg { width: 22px; height: 22px; }
.rp-feature h3 { font-family: var(--font-head); font-size: 1.12rem; color: var(--navy-900); margin-bottom: 8px; }
.rp-feature p { font-size: var(--fs-sm); line-height: 1.55; color: var(--slate-600, var(--slate-500)); }

/* use cases */
.rp-lp-usecases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rp-usecase {
  background: var(--white); border: 1px solid var(--slate-200);
  border-left: 3px solid var(--gold-500); border-radius: 10px; padding: 22px 22px;
}
.rp-usecase b { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--navy-900); margin-bottom: 5px; }
.rp-usecase span { font-size: var(--fs-sm); line-height: 1.5; color: var(--slate-600, var(--slate-500)); }

/* security */
.rp-lp-security {
  display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: center;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: #fff; border-radius: 16px; padding: 48px 44px;
}
.rp-lp-security .rp-lp-eyebrow { color: var(--gold-400); }
.rp-lp-security h2 { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 20px; color: #fff; }
.rp-lp-checklist { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.rp-lp-checklist li {
  position: relative; padding-left: 30px; font-size: var(--fs-base);
  line-height: 1.5; color: rgba(255,255,255,.85);
}
.rp-lp-checklist li::before {
  content: ''; position: absolute; left: 0; top: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--gold-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5 9-9'/%3E%3C/svg%3E") center/12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5 9-9'/%3E%3C/svg%3E") center/12px no-repeat;
}
.rp-lp-security-badge { display: flex; justify-content: center; color: var(--gold-400); }
.rp-lp-security-badge svg { width: 130px; height: 130px; opacity: .9; }

/* CTA */
.rp-lp-cta { background: var(--navy-050); border-top: 1px solid var(--slate-100); }
.rp-lp-cta-inner { max-width: 720px; margin: 0 auto; padding: 76px 24px; text-align: center; }
.rp-lp-cta-inner h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--navy-900); margin-bottom: 12px; }
.rp-lp-cta-inner p { color: var(--slate-600, var(--slate-500)); font-size: var(--fs-md); margin-bottom: 28px; }
.rp-lp-cta-inner .rp-lp-hero-actions { justify-content: center; }

/* footer */
.rp-lp-foot { background: var(--navy-900); color: rgba(255,255,255,.7); }
.rp-lp-foot-inner {
  max-width: 1120px; margin: 0 auto; padding: 30px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.rp-lp-foot .rp-lp-logo { color: #fff; }
.rp-lp-foot-meta { display: flex; align-items: center; gap: 14px; font-size: var(--fs-xs); }
.rp-lp-foot-ver { opacity: .6; font-variant-numeric: tabular-nums; }

/* login back link + in-app build tag */
.login-back {
  position: absolute; top: 18px; left: 18px;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600;
  color: var(--navy-700); padding: 6px 8px; border-radius: var(--radius-sm);
}
.login-back:hover { background: var(--navy-050); }
#screen-login { position: relative; }
.nav-build-tag {
  margin-top: auto; padding: 14px 4px 4px; font-size: var(--fs-xs);
  color: var(--slate-400, var(--slate-500)); opacity: .7; letter-spacing: .02em;
}

/* responsive */
@media (max-width: 900px) {
  .rp-lp-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .rp-lp-hero-art { order: 2; max-width: 460px; }
  .rp-mock { transform: none; }
  .rp-lp-grid { grid-template-columns: repeat(2, 1fr); }
  .rp-lp-security { grid-template-columns: 1fr; text-align: left; }
  .rp-lp-security-badge { display: none; }
}
@media (max-width: 600px) {
  .rp-lp-nav-links { display: none; }
  .rp-lp-hero-inner { padding: 48px 20px 56px; }
  .rp-lp-section { padding: 56px 20px; }
  .rp-lp-grid, .rp-lp-usecases { grid-template-columns: 1fr; }
  .rp-lp-hero-actions .rp-btn { flex: 1; }
}
