/* Extra styles for staff leads UI and email mockups. Same tokens as site.css. */
.notice-ok {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 0 22px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line));
  background: color-mix(in srgb, var(--ok) 12%, var(--surface));
  border-radius: 16px; color: var(--text); font-size: 15px;
}
.notice-ok b { color: var(--text); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.badge.warn { color: var(--accent-text, var(--accent)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.consent {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  margin: 8px 0 18px;
}
.consent input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.consent label { font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.consent label a { color: var(--accent); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.captcha-box {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); max-width: 320px;
  font-size: 13px; color: var(--muted);
}
.captcha-box .box {
  width: 22px; height: 22px; border-radius: 4px; border: 2px solid var(--line-2); background: var(--bg);
}
.captcha-box strong { color: var(--text); font-size: 12px; letter-spacing: .04em; }
.join-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.join-pills a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  font-weight: 800; font-size: 14px; color: var(--muted);
}
.join-pills a.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* Staff */
.staff-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.staff-top { border-bottom: 1px solid var(--line); background: var(--header-bg, var(--bg)); }
.staff-top .top-row { min-height: 64px; }
.staff-who { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.staff-who .ava {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text); font-weight: 900; font-size: 12px;
}
.staff-login {
  min-height: calc(100vh - 68px);
  display: grid; place-items: center; padding: 48px 20px 80px;
  position: relative;
}
.staff-login::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 78% 18%, rgba(244, 196, 24, .12), transparent 70%),
    radial-gradient(40% 50% at 18% 30%, rgba(25, 128, 95, .18), transparent 70%);
}
.login-card {
  position: relative; width: min(460px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px); padding: 36px 32px 28px;
}
.login-card h1 { font-size: 34px; margin: 8px 0 8px; }
.staff-only {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text, var(--accent));
  font-size: 12px; font-weight: 900; letter-spacing: .02em;
}
.or-row { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 8px 0 16px; }
.or-row::before, .or-row::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.google { width: 100%; background: #fff; color: #111; border: 0; }
.btn.full { width: 100%; }
.login-foot { margin-top: 22px; font-size: 13px; color: var(--faint); text-align: center; }
.login-foot a { color: var(--muted); }

/* Dashboard */
.dash { padding: 28px 0 60px; }
.dash-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
.dash-head h1 { font-size: 40px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.kpi .n { font-size: 28px; font-weight: 900; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.search {
  min-width: 240px; flex: 1; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
}
.chip-btn {
  min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 13px; color: var(--muted);
}
.chip-btn.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status.new { background: rgba(244,196,24,.16); color: var(--accent); }
.status.contacted { background: rgba(255,255,255,.08); color: var(--text); }
.status.invited { background: rgba(25,128,95,.22); color: #8ee0bf; }
.status.converted { background: rgba(111,219,164,.16); color: var(--ok); }
.status.rejected { background: rgba(255,122,102,.14); color: var(--danger); }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
table.leads { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.leads th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 800; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
table.leads td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.leads tr:last-child td { border-bottom: 0; }
table.leads tr:hover td { background: rgba(255,255,255,.03); }
table.leads tr.active td { background: rgba(244,196,24,.07); }
.name-cell b { display: block; font-size: 15px; }
.name-cell small { color: var(--muted); }
.phone-ltr { direction: ltr; unicode-bidi: isolate; font-weight: 700; }

/* Drawer */
.dash-layout { display: grid; grid-template-columns: 1fr 400px; gap: 16px; align-items: start; }
.drawer { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; position: sticky; top: 84px; }
.drawer h2 { font-size: 22px; margin: 0 0 4px; }
.meta-grid { display: grid; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.meta-grid div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.meta-grid div:last-child { border-bottom: 0; }
.meta-grid dt { color: var(--muted); }
.meta-grid dd { margin: 0; font-weight: 800; text-align: end; }
.notes { margin-top: 14px; }
.note { background: var(--bg-2); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 8px; color: var(--muted); }
.note b { color: var(--text); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Dialog overlay */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 80; padding: 24px; }
.dialog {
  width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.dialog h2 { font-size: 26px; margin: 0 0 8px; }
.warn-pii { font-size: 13.5px; color: var(--muted); background: rgba(244,196,24,.08); border: 1px solid rgba(244,196,24,.25); border-radius: 14px; padding: 12px 14px; margin: 14px 0; }

/* Email */
.email-frame { min-height: 100vh; background: #ece7dc; color: #1a1a16; display: grid; place-items: start center; padding: 40px 16px 60px; }
.email-chrome { width: min(720px, 100%); }
.email-bar { background: #fff; border-radius: 16px 16px 0 0; padding: 14px 18px; font-size: 13px; color: #555; border: 1px solid #ddd6c6; border-bottom: 0; }
.email-bar b { color: #111; }
.email-body {
  background: #fff; border: 1px solid #ddd6c6; border-radius: 0 0 16px 16px;
  padding: 0; overflow: hidden;
}
.email-inner { padding: 28px 28px 32px; background: #0d0e0c; color: #f6f3ec; font-family: 'Cairo', system-ui, sans-serif; }
.email-inner .mark { height: 28px; margin-bottom: 18px; }
.email-inner h1 { font-size: 26px; margin: 0 0 8px; }
.email-inner p { color: #a8a59c; margin: 0 0 14px; }
.email-cta { display: inline-flex; margin-top: 8px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .dash-layout { grid-template-columns: 1fr; }
  .drawer { position: static; }
}

/* Built-form extras */
.status.stale, .badge.stale { background: rgba(255,122,102,.16); color: var(--danger); }
table.leads tr.stale td { box-shadow: inset 3px 0 0 var(--danger); }
.form-error {
  display: none; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,122,102,.12); border: 1px solid rgba(255,122,102,.3); color: #ffc4b8; font-weight: 700;
}
.form-error.on { display: block; }
.btn.whatsapp {
  background: #1f9e5b; color: #fff; border: 0;
}
.choice.soon { opacity: .55; pointer-events: none; }
.choice[hidden], .field[hidden] { display: none !important; }
.invite-copy { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; font-size: 14px; }
.cf-turnstile { margin-bottom: 18px; }
.staff-error { color: var(--danger); font-size: 14px; margin: 0 0 12px; min-height: 1.2em; }
@media (max-width: 700px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  table.leads { font-size: 13px; }
}
