/* ========================================================
   RCN Email Blaster — application stylesheet
   Brand: Realcognita (sand bg, brand green, gunmetal text)
   ======================================================== */

@import url("colors_and_type.css");

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--rcn-font-sans);
  font-size: 14px;
  color: var(--rcn-fg-1);
  background: var(--rcn-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

::selection { background: rgba(38, 207, 123, 0.25); }

/* === Icon ============================================== */
.icon {
  display: inline-block;
  vertical-align: -2px;
  flex-shrink: 0;
  color: currentColor;
}

/* === Buttons =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 0;
  cursor: pointer;
  transition: all 200ms var(--rcn-ease-standard);
  white-space: nowrap;
  user-select: none;
}
.btn:focus-visible {
  outline: 3px solid rgba(38, 207, 123, 0.35);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--rcn-brand-green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--rcn-green-500);
  box-shadow: 0 10px 24px -10px rgba(38, 207, 123, 0.55);
}
.btn-primary:active { background: var(--rcn-green-600); }
.btn-secondary {
  background: #fff;
  color: var(--rcn-fg-1);
  border: 1px solid rgba(17, 20, 17, 0.14);
}
.btn-secondary:hover { background: var(--rcn-sand-100); border-color: rgba(17, 20, 17, 0.22); }
.btn-ghost {
  background: transparent;
  color: var(--rcn-fg-1);
}
.btn-ghost:hover { background: rgba(17, 20, 17, 0.06); }
.btn-danger {
  background: #fff;
  color: var(--rcn-danger);
  border: 1px solid rgba(243, 18, 96, 0.32);
}
.btn-danger:hover { background: rgba(243, 18, 96, 0.06); border-color: var(--rcn-danger); }
.btn-onDark {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-onDark:hover { background: rgba(255, 255, 255, 0.14); }
.btn-sm { font-size: 12px; padding: 7px 12px; gap: 6px; }
.btn-lg { font-size: 14px; padding: 13px 22px; }
.btn-block { display: flex; width: 100%; }
.btn-square { padding: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* === Pill ============================================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.pill-sent    { background: rgba(31, 183, 108, 0.12); color: #137548; }
.pill-pending { background: rgba(245, 165, 36, 0.15); color: #7A4F00; }
.pill-failed  { background: rgba(243, 18, 96, 0.10); color: #A8013F; }
.pill-opened  { background: rgba(70, 187, 232, 0.14); color: #155F7B; }
.pill-draft   { background: rgba(17, 20, 17, 0.06); color: var(--rcn-fg-2); }
.pill-neutral { background: rgba(17, 20, 17, 0.06); color: var(--rcn-fg-2); }
.pill-scheduled { background: rgba(0, 164, 158, 0.14); color: #006D69; }
.pill-held      { background: rgba(58, 63, 58, 0.10); color: #3A3F3A; }
.pill-cancelled { background: rgba(17, 20, 17, 0.04); color: var(--rcn-fg-3); }

/* Contact lifecycle pills */
.pill-new        { background: rgba(70, 187, 232, 0.14); color: #155F7B; }
.pill-contacted  { background: rgba(245, 165, 36, 0.15); color: #7A4F00; }
.pill-engaged    { background: rgba(38, 207, 123, 0.14); color: #137548; }
.pill-replied    { background: rgba(0, 164, 158, 0.14); color: #006D69; }
.pill-booked     { background: rgba(99, 91, 255, 0.14); color: #3730A3; }
.pill-handed-over{ background: rgba(31, 183, 108, 0.20); color: #0A5C35; }
.pill-dnc        { background: rgba(243, 18, 96, 0.10); color: #A8013F; }
.pill-unqualified{ background: rgba(17, 20, 17, 0.06); color: var(--rcn-fg-2); }

/* Sequence + task + reply pills */
.pill-active     { background: rgba(31, 183, 108, 0.12); color: #137548; }
.pill-paused     { background: rgba(245, 165, 36, 0.15); color: #7A4F00; }
.pill-archived   { background: rgba(17, 20, 17, 0.04); color: var(--rcn-fg-3); }
.pill-open       { background: rgba(70, 187, 232, 0.14); color: #155F7B; }
.pill-done       { background: rgba(31, 183, 108, 0.12); color: #137548; }
.pill-skipped    { background: rgba(17, 20, 17, 0.06); color: var(--rcn-fg-2); }
.pill-overdue    { background: rgba(243, 18, 96, 0.10); color: #A8013F; }
.pill-unread     { background: rgba(38, 207, 123, 0.16); color: #0E5234; }
.pill-replied    { background: rgba(0, 164, 158, 0.14); color: #006D69; }

/* ----- Contacts list ------------------------------------- */
.contacts-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.contacts-toolbar .search {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.contacts-toolbar .search .input { padding-left: 36px; width: 100%; }
.contacts-toolbar .search .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--rcn-fg-3);
}
.contacts-toolbar .seg {
  display: inline-flex;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.12);
  border-radius: 9999px;
  padding: 3px;
}
.contacts-toolbar .seg button {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-fg-2);
  border-radius: 9999px;
  cursor: pointer;
}
.contacts-toolbar .seg button.active { background: var(--rcn-fg-1); color: #fff; }

.contact-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.contact-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(17, 20, 17, 0.05);
  color: var(--rcn-fg-2);
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
}

/* ----- Contact detail ----------------------------------- */
.contact-detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
@media (max-width: 920px) { .contact-detail { grid-template-columns: 1fr; } }
.contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.contact-header .ident {
  display: flex;
  align-items: center;
  gap: 16px;
}
.contact-header .ident .who h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.contact-header .ident .who .role {
  font-size: 14px;
  color: var(--rcn-fg-2);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.contact-header .ident .who .role .at {
  color: var(--rcn-fg-3);
  margin: 0 2px;
}
.contact-header .actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-section {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.contact-section .head {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
  background: var(--rcn-sand-50);
}
.contact-section .head .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.contact-section .head .label .icon { color: var(--rcn-brand-green); }
.contact-section .body { padding: 16px 20px 20px; }

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
}
@media (max-width: 540px) { .kv-grid { grid-template-columns: 1fr; } }
.kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.kv .k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.kv .v {
  font-size: 14px;
  font-weight: 500;
  color: var(--rcn-fg-1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kv .v.muted { color: var(--rcn-fg-3); font-weight: 400; }
.kv .v a { color: var(--rcn-blue-500); font-weight: 500; }
.kv .v a:hover { text-decoration: underline; }

.signal {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
}
.signal:last-child { border-bottom: 0; }
.signal-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(38, 207, 123, 0.12);
  color: var(--rcn-green-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.signal-icon.warm  { background: rgba(245, 165, 36, 0.16); color: #7A4F00; }
.signal-icon.cool  { background: rgba(70, 187, 232, 0.14); color: #155F7B; }
.signal-icon.fire  { background: rgba(243, 18, 96, 0.10); color: #A8013F; }
.signal-body { flex: 1; min-width: 0; }
.signal-body .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.signal-body .meta {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 2px;
  line-height: 1.5;
}

.tech-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-chip {
  background: rgba(17, 20, 17, 0.05);
  color: var(--rcn-fg-2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.tech-chip.competitor {
  background: rgba(243, 18, 96, 0.08);
  color: #A8013F;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bullet-list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--rcn-fg-2);
}
.bullet-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rcn-brand-green);
  margin-top: 8px;
}

.notes-block {
  font-size: 13px;
  line-height: 1.6;
  color: var(--rcn-fg-2);
  white-space: pre-wrap;
}
.notes-empty { color: var(--rcn-fg-3); font-style: italic; }

.engagement-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.engagement-stats .stat-mini {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}
.engagement-stats .stat-mini .k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.engagement-stats .stat-mini .v {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--rcn-fg-1);
  line-height: 1;
  margin-top: 4px;
}

.recent-emails .table tbody tr { cursor: pointer; }

/* Inline reply thread card on EmailDetail */
.reply-thread-card {
  border-left: 3px solid var(--rcn-brand-green);
  padding: 18px 22px 20px;
}
.reply-thread-card.outgoing {
  border-left-color: var(--rcn-blue-400);
  background: var(--rcn-sand-50);
}
.reply-thread-card.outgoing .reply-thread-marker {
  background: rgba(70, 187, 232, 0.14);
  color: #155F7B;
}
.reply-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.reply-thread-marker {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(38, 207, 123, 0.16);
  color: #0E5234;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reply-thread-meta { flex: 1; min-width: 0; }
.reply-thread-meta .who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.reply-thread-meta .who strong { font-size: 14px; color: var(--rcn-fg-1); }
.reply-thread-meta .who .email { font-size: 12px; color: var(--rcn-fg-3); }
.reply-thread-meta .when { font-size: 12px; color: var(--rcn-fg-3); margin-top: 1px; }
.reply-thread-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.reply-thread-subject {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-top: 14px;
  color: var(--rcn-fg-1);
}
.reply-thread-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--rcn-fg-2);
  margin-top: 6px;
  white-space: pre-wrap;
}

/* ============================================================
   SEQUENCES
   ============================================================ */
.seq-list-card { overflow: hidden; }
.seq-row-name { font-weight: 600; color: var(--rcn-fg-1); font-size: 14px; }
.seq-row-desc {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 2px;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seq-metric { display: flex; flex-direction: column; gap: 2px; }
.seq-metric .v { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.seq-metric .k { font-size: 11px; color: var(--rcn-fg-3); }

/* Sequence detail */
.seq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.seq-header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.seq-header .desc { font-size: 14px; color: var(--rcn-fg-2); max-width: 560px; }
.seq-header .actions { display: inline-flex; gap: 8px; }

.seq-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 760px) { .seq-metrics { grid-template-columns: repeat(2, 1fr); } }

.seq-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seq-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}
.seq-step .step-marker {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(38, 207, 123, 0.12);
  color: var(--rcn-green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}
.seq-step.task .step-marker  { background: rgba(70, 187, 232, 0.16); color: #155F7B; }
.seq-step.wait .step-marker  {
  background: transparent;
  border: 2px dashed rgba(17, 20, 17, 0.18);
  color: var(--rcn-fg-3);
}
.seq-step .step-card {
  flex: 1;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
}
.seq-step.wait .step-card {
  background: transparent;
  border: 1px dashed rgba(17, 20, 17, 0.16);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--rcn-fg-3);
  font-weight: 500;
  padding: 10px 16px;
}
.seq-step .step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.seq-step .step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seq-step.task .step-label { color: var(--rcn-blue-500); }
.seq-step .step-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--rcn-fg-3);
  background: var(--rcn-sand-100);
  padding: 2px 8px;
  border-radius: 9999px;
}
.seq-step .step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  line-height: 1.4;
}
.seq-step .step-preview {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.seq-step .step-actions {
  display: inline-flex;
  gap: 4px;
}

/* Vertical connector line down the side */
.seq-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -12px;
  width: 2px;
  background: rgba(17, 20, 17, 0.06);
  z-index: 0;
}
.seq-step .step-marker { position: relative; z-index: 1; }

/* ============================================================
   TASKS
   ============================================================ */
.task-row .task-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(70, 187, 232, 0.14);
  color: #155F7B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-row .task-icon.call     { background: rgba(38, 207, 123, 0.14); color: var(--rcn-green-600); }
.task-row .task-icon.email    { background: rgba(70, 187, 232, 0.14); color: #155F7B; }
.task-row .task-icon.linkedin { background: rgba(0, 164, 158, 0.16);  color: #006D69; }
.task-row .task-icon.custom   { background: rgba(245, 165, 36, 0.16); color: #7A4F00; }
.task-row.done .task-title { text-decoration: line-through; color: var(--rcn-fg-3); }
.task-row.done .task-icon  { background: rgba(17, 20, 17, 0.05); color: var(--rcn-fg-3); }
.task-due {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-due .absolute { font-weight: 500; color: var(--rcn-fg-1); font-variant-numeric: tabular-nums; font-size: 13px; }
.task-due .relative { font-size: 11px; color: var(--rcn-fg-3); }
.task-due.overdue .absolute { color: var(--rcn-danger); }
.task-due.overdue .relative { color: var(--rcn-danger); font-weight: 600; }
.task-actions {
  display: inline-flex;
  gap: 4px;
}

/* ============================================================
   REPLIES (unified inbox)
   ============================================================ */
.replies-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.inbox-tabs {
  margin-bottom: 12px;
}
.replies-toolbar .search {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.replies-toolbar .search .input { padding-left: 36px; width: 100%; }
.replies-toolbar .search .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--rcn-fg-3);
}
.reply-card {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 150ms var(--rcn-ease-standard), box-shadow 150ms;
}
.reply-card:hover {
  border-color: rgba(17, 20, 17, 0.2);
  box-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.06);
}
.reply-card.unread {
  border-left: 3px solid var(--rcn-brand-green);
  padding-left: 13px;
}
.reply-card > .avatar { flex-shrink: 0; }
.reply-card .reply-body { flex: 1; min-width: 0; }
.reply-card .who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
  min-width: 0;
}
.reply-card .who .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  white-space: nowrap;
}
.reply-card.unread .who .name { color: var(--rcn-green-700); }
.reply-card .who .email {
  font-size: 12px;
  color: var(--rcn-fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reply-card .reply-subject {
  font-size: 14px;
  font-weight: 500;
  color: var(--rcn-fg-1);
  margin-bottom: 2px;
}
.reply-card .reply-snippet {
  font-size: 13px;
  color: var(--rcn-fg-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reply-card .reply-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.reply-card .reply-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reply-card .reply-time {
  font-size: 11px;
  color: var(--rcn-fg-3);
  white-space: nowrap;
}
.reply-card .reply-actions {
  display: inline-flex;
  gap: 6px;
}
.reply-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--rcn-fg-3);
  background: var(--rcn-sand-100);
  padding: 2px 8px;
  border-radius: 9999px;
}
.reply-tag.paused {
  background: rgba(245, 165, 36, 0.14);
  color: #7A4F00;
}
.reply-tag.auto {
  background: rgba(99, 102, 120, 0.12);
  color: var(--rcn-fg-3);
}
.reply-card .reply-tag { margin-top: 6px; }

/* Manage-cadence modal: snooze / stop-&-suppress actions on an inbox reply. */
.cadence-action {
  border: 1px solid var(--rcn-border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cadence-action.danger {
  border-color: rgba(209, 63, 63, 0.35);
  background: rgba(209, 63, 63, 0.04);
}
.cadence-action-title { font-weight: 600; font-size: 14px; }
.cadence-action-sub { font-size: 12.5px; color: var(--rcn-fg-3); line-height: 1.4; }
.cadence-snooze-row { display: flex; gap: 8px; align-items: center; }
.cadence-snooze-row .input { flex: 1; }

/* ============================================================
   SUPPRESSION + AUDIT (settings tabs)
   ============================================================ */
.suppression-warning {
  background: rgba(243, 18, 96, 0.06);
  border: 1px solid rgba(243, 18, 96, 0.25);
  color: #A8013F;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 22px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.suppression-warning .icon { color: var(--rcn-danger); flex-shrink: 0; margin-top: 2px; }
.suppression-warning .reason {
  font-weight: 500;
  margin-top: 2px;
  color: rgba(168, 1, 63, 0.78);
  font-size: 12px;
}

.audit-actor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

/* ============================================================
   UNSUBSCRIBE FOOTER (Compose insert)
   ============================================================ */
.editor-body .unsub-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 20, 17, 0.12);
  font-size: 12px;
  line-height: 1.5;
  color: var(--rcn-fg-3);
}
.editor-body .unsub-footer a {
  color: var(--rcn-blue-500);
  font-weight: 600;
  text-decoration: underline;
}
.unsub-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rcn-sand-100);
  color: var(--rcn-fg-2);
  border: 0;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms var(--rcn-ease-standard);
}
.unsub-button:hover { background: rgba(17, 20, 17, 0.08); color: var(--rcn-fg-1); }
.unsub-button.on {
  background: rgba(70, 187, 232, 0.12);
  color: #155F7B;
}

/* Bounce expand row in EmailDetail timeline */
.bounce-expand {
  margin-top: 12px;
  background: var(--rcn-sand-50);
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}
.bounce-expand .head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-danger);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bounce-expand .body {
  font-family: var(--rcn-font-mono);
  font-size: 12px;
  color: var(--rcn-fg-2);
  margin-top: 8px;
  line-height: 1.55;
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 20, 17, 0.06);
}
.auto-suppression-row {
  margin-top: 12px;
  background: var(--rcn-sand-100);
  border: 1px solid rgba(245, 165, 36, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #7A4F00;
}
.auto-suppression-row .icon { color: var(--rcn-warning); flex-shrink: 0; }

/* ============================================================
   APPOINTMENTS
   ============================================================ */
.appt-day { margin-bottom: 22px; }
.appt-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 10px;
  padding: 0 2px;
}
.appt-day-date {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.appt-day-date .dow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.appt-day-date .dnum {
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.appt-day-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--rcn-fg-3);
}
.appt-list { display: flex; flex-direction: column; gap: 10px; }
.appt-card {
  display: flex;
  align-items: stretch;
  padding: 14px 18px;
  gap: 18px;
}
.appt-time {
  flex-shrink: 0;
  text-align: right;
  padding-right: 14px;
  border-right: 1px solid rgba(17, 20, 17, 0.06);
  min-width: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.appt-time .time {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rcn-fg-1);
  font-variant-numeric: tabular-nums;
}
.appt-time .dur {
  font-size: 11px;
  color: var(--rcn-fg-3);
  margin-top: 2px;
}
.appt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.appt-subject {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--rcn-fg-1);
}
.appt-attendees {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rcn-fg-2);
  flex-wrap: wrap;
}
.appt-attendees span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.appt-attendees .muted { color: var(--rcn-fg-3); }
.appt-attendees .sep { color: var(--rcn-fg-3); font-weight: 500; }
.appt-meta-line {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--rcn-fg-3);
  font-weight: 500;
  flex-wrap: wrap;
  margin-top: 2px;
}
.appt-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .appt-card { flex-direction: column; }
  .appt-time { text-align: left; border-right: 0; border-bottom: 1px solid rgba(17,20,17,.06); padding: 0 0 10px; }
  .appt-actions { flex-wrap: wrap; }
}

/* ============================================================
   SLOT PICKER
   ============================================================ */
.slot-picker { padding: 20px 22px 4px; }
.slot-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.slot-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.slot-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
}
.slot-subtitle {
  font-size: 13px;
  color: var(--rcn-fg-2);
  margin-top: 2px;
}
.slot-tz {
  font-size: 12px;
  color: var(--rcn-fg-2);
  background: var(--rcn-sand-100);
  padding: 6px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.slot-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
}
.slot-row:first-of-type { border-top: 0; padding-top: 0; }
.slot-row-grid { align-items: flex-start; }
.slot-row-label {
  width: 110px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  padding-top: 6px;
}
.slot-rep-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.slot-rep {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  background: #fff;
  border: 1.5px solid rgba(17, 20, 17, 0.10);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  transition: border-color 150ms var(--rcn-ease-standard), background 150ms;
}
.slot-rep:hover { border-color: rgba(17, 20, 17, 0.22); }
.slot-rep.selected {
  border-color: var(--rcn-brand-green);
  background: rgba(38, 207, 123, 0.06);
}
.slot-rep.unavailable { opacity: 0.55; cursor: not-allowed; }
.slot-rep-meta { display: flex; flex-direction: column; }
.slot-rep-meta .name { font-size: 12px; font-weight: 600; color: var(--rcn-fg-1); }
.slot-rep-meta .role { font-size: 10px; color: var(--rcn-fg-3); }
.slot-rep-dot {
  width: 7px; height: 7px; border-radius: 50%;
  margin-left: 4px;
}
.slot-rep-dot.on  { background: var(--rcn-brand-green); }
.slot-rep-dot.off { background: rgba(17, 20, 17, 0.18); }

.slot-date-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.slot-date-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rcn-sand-50);
  border: 1px solid rgba(17, 20, 17, 0.06);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.slot-today {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rcn-brand-green);
  background: rgba(38, 207, 123, 0.14);
  padding: 1px 6px;
  border-radius: 9999px;
}
.slot-date-jump {
  font-size: 12px;
  padding: 7px 10px;
  max-width: 150px;
}

.slot-grid-wrap { flex: 1; min-height: 140px; position: relative; }
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid rgba(17, 20, 17, 0.12);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: all 120ms var(--rcn-ease-standard);
}
.slot .slot-time {
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.slot:hover:not([disabled]) {
  border-color: var(--rcn-brand-green);
  background: rgba(38, 207, 123, 0.04);
}
.slot.selected {
  background: var(--rcn-brand-green);
  border-color: var(--rcn-brand-green);
  color: #fff;
}
.slot.past, .slot.taken {
  background: var(--rcn-sand-50);
  color: var(--rcn-fg-3);
  cursor: not-allowed;
  border-color: rgba(17, 20, 17, 0.06);
}
.slot.past .slot-time, .slot.taken .slot-time {
  text-decoration: line-through;
}
.slot.conflict {
  background: rgba(243, 18, 96, 0.06);
  border-color: rgba(243, 18, 96, 0.35);
  color: #A8013F;
}
.slot.conflict .slot-time { text-decoration: none; }
.slot-badge {
  position: absolute;
  top: -8px;
  right: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(17, 20, 17, 0.08);
  color: var(--rcn-fg-3);
  padding: 2px 6px;
  border-radius: 9999px;
}
.slot-badge.conflict {
  background: var(--rcn-danger);
  color: #fff;
}

.slot-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: var(--rcn-sand-50);
  border: 1px solid rgba(17, 20, 17, 0.06);
  border-radius: 12px;
  font-size: 13px;
  color: var(--rcn-fg-2);
}
.slot-state .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.slot-state .meta {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 2px;
}
.slot-state-loading .icon.spin {
  animation: spin 1s linear infinite;
  color: var(--rcn-brand-green);
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.slot-state-error {
  background: rgba(243, 18, 96, 0.05);
  border-color: rgba(243, 18, 96, 0.18);
  color: #A8013F;
}
.slot-state-error .icon { color: var(--rcn-danger); }
.slot-state-empty .icon { color: var(--rcn-fg-3); }
.slot-state-conflict {
  margin-top: 14px;
  background: rgba(243, 18, 96, 0.05);
  border-color: rgba(243, 18, 96, 0.18);
  color: #A8013F;
}
.slot-state-conflict .icon { color: var(--rcn-danger); }

.slot-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 0 6px;
  margin-top: 12px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
}

/* ============================================================
   CONFIRMATION PREVIEW
   ============================================================ */
.conf-preview { padding: 20px 22px 6px; }
.conf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 10px;
}
.conf-grid > * { min-width: 0; }
@media (max-width: 700px) { .conf-grid { grid-template-columns: 1fr; } }
.conf-card {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.conf-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--rcn-sand-50);
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.conf-card-head .icon { color: var(--rcn-brand-green); }
.conf-edit {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--rcn-blue-500);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.conf-edit:hover { background: rgba(70, 187, 232, 0.08); }
.conf-email-meta { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.conf-email-meta .row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.conf-email-meta .row .k {
  width: 64px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.conf-email-meta .row .v {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rcn-fg-1);
}
.conf-email-body {
  padding: 16px 18px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--rcn-fg-1);
  border-top: 1px solid rgba(17, 20, 17, 0.04);
}
.conf-email-body p { margin: 0 0 10px; }
.conf-email-body .signature {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-2);
  font-size: 12px;
}
.conf-teams-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #5059C9 0%, #4148A2 100%);
  color: #fff;
  padding: 10px 18px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.conf-teams-cta:hover { filter: brightness(1.08); }

.conf-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.conf-meta { padding: 12px 16px; }
.conf-meta .meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(17, 20, 17, 0.04);
  gap: 12px;
  font-size: 13px;
  min-width: 0;
}
.conf-meta .meta-row:last-child { border-bottom: 0; }
.conf-meta .meta-row .k {
  color: var(--rcn-fg-3);
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}
.conf-meta .meta-row .v {
  color: var(--rcn-fg-1);
  font-weight: 500;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conf-meta .muted { color: var(--rcn-fg-3); font-weight: 400; }
.conf-teams-link {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.conf-teams-link code {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  background: var(--rcn-sand-100);
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--rcn-fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conf-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 6px;
  margin-top: 16px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  align-items: center;
  flex-wrap: wrap;
}
.conf-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  flex: 1;
  min-width: 220px;
}
.conf-state.success {
  background: rgba(38, 207, 123, 0.08);
  border: 1px solid rgba(38, 207, 123, 0.30);
  color: #137548;
}
.conf-state.success .icon { color: var(--rcn-brand-green); }
.conf-state.failed {
  background: rgba(243, 18, 96, 0.06);
  border: 1px solid rgba(243, 18, 96, 0.25);
  color: #A8013F;
}
.conf-state.failed .icon { color: var(--rcn-danger); }
.conf-state .title { font-weight: 600; }
.conf-state .meta { font-size: 12px; opacity: 0.85; margin-top: 1px; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.dash-greeting {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--rcn-fg-1);
}
.dash-subtitle {
  font-size: 14px;
  color: var(--rcn-fg-2);
  margin: 6px 0 0;
  line-height: 1.5;
}
.dash-range-seg { flex-shrink: 0; }

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 920px) { .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .dash-kpi-grid { grid-template-columns: 1fr; } }
.dash-kpi {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  padding: 16px 18px 14px;
}
.dash-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dash-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-fg-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dash-kpi-delta {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 9999px;
}
.dash-kpi-delta.up   { background: rgba(38, 207, 123, 0.12); color: #137548; }
.dash-kpi-delta.down { background: rgba(243, 18, 96, 0.10); color: #A8013F; }
.dash-kpi-delta.flat { background: rgba(17, 20, 17, 0.05); color: var(--rcn-fg-3); }
.dash-kpi-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--rcn-fg-1);
  margin-bottom: 8px;
}
.dash-kpi-value .suffix {
  font-size: 18px;
  color: var(--rcn-fg-3);
  margin-left: 1px;
  font-weight: 500;
}

.dash-row-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 920px) { .dash-row-grid { grid-template-columns: 1fr; } }
.dash-card {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dash-card-head {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(17, 20, 17, 0.04);
}
.dash-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dash-card-link {
  background: transparent;
  border: 0;
  color: var(--rcn-blue-500);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.dash-card-link:hover { background: rgba(70, 187, 232, 0.08); }
.dash-card-body { padding: 16px 18px; }

.dash-cap-line {
  height: 6px;
  background: rgba(17, 20, 17, 0.06);
  border-radius: 9999px;
  margin-top: 10px;
  overflow: hidden;
}
.dash-cap-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 400ms var(--rcn-ease-standard);
}

.dash-meeting-list {
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  padding: 4px 18px 14px;
  display: flex;
  flex-direction: column;
}
.dash-meeting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 20, 17, 0.04);
}
.dash-meeting-row:last-child { border-bottom: 0; }
.dash-meeting-row .meta { flex: 1; min-width: 0; }
.dash-meeting-row .who {
  font-size: 13px; font-weight: 600; color: var(--rcn-fg-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-meeting-row .when {
  font-size: 11px; color: var(--rcn-fg-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-meeting-row .when-time {
  text-align: right;
  flex-shrink: 0;
}
.dash-meeting-row .when-time .day {
  font-size: 11px;
  font-weight: 600;
  color: var(--rcn-fg-2);
  letter-spacing: 0.02em;
}
.dash-meeting-row .when-time .time {
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-brand-green);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.dash-deliv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.04);
}
.dash-deliv-row:last-child { border-bottom: 0; }
.dash-deliv-row span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rcn-fg-1);
  font-weight: 500;
}
.dash-deliv-row span:last-child { color: var(--rcn-fg-3); font-size: 12px; }

.dash-seq-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.04);
}
.dash-seq-row:last-child { border-bottom: 0; }
.dash-seq-rank {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.dash-seq-meta { flex: 1; min-width: 0; }
.dash-seq-meta .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-seq-meta .enrolled { font-size: 11px; color: var(--rcn-fg-3); margin-top: 2px; }
.dash-seq-stats {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}
.dash-seq-stats > div { text-align: center; }
.dash-seq-stats .k {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.dash-seq-stats .v {
  font-size: 14px;
  font-weight: 700;
  color: var(--rcn-fg-2);
  font-variant-numeric: tabular-nums;
}
.dash-seq-stats .primary .v { color: var(--rcn-brand-green); }

.dash-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.04);
}
.dash-contact-row:last-child { border-bottom: 0; }
.dash-contact-row .meta { flex: 1; min-width: 0; }
.dash-contact-row .name { font-size: 13px; font-weight: 600; color: var(--rcn-fg-1); }
.dash-contact-row .company { font-size: 11px; color: var(--rcn-fg-3); margin-top: 1px; }
.dash-contact-row .signals {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}
.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(17, 20, 17, 0.05);
  color: var(--rcn-fg-2);
  font-size: 10px;
  font-weight: 700;
}
.signal-pill.replied { background: rgba(38, 207, 123, 0.16); color: #0E5234; }

/* ============================================================
   EXTERNAL BOOKING PAGE (prospect-facing, no app shell)
   ============================================================ */
.ext-page {
  min-height: 100vh;
  background: var(--rcn-bg);
  display: flex;
  flex-direction: column;
  font-family: var(--rcn-font-sans);
}
.ext-nav {
  background: #fff;
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ext-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rcn-fg-1);
}
.ext-nav-brand img { height: 28px; width: 28px; object-fit: contain; }
.ext-nav-back {
  background: var(--rcn-sand-100);
  border: 1px solid rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-2);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ext-nav-back:hover { background: var(--rcn-sand-200); color: var(--rcn-fg-1); }

.ext-main { flex: 1; padding: 40px 24px; }
.ext-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 800px) { .ext-shell { grid-template-columns: 1fr; } }

.ext-rep-card {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 16px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  height: fit-content;
}
.ext-rep-card .avatar { width: 56px; height: 56px; font-size: 18px; }
.ext-rep-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.ext-rep-title {
  font-size: 13px;
  color: var(--rcn-fg-2);
  font-weight: 500;
  margin-top: -8px;
}
.ext-rep-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--rcn-fg-2);
  margin-top: 4px;
}
.ext-rep-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ext-rep-meta .icon { color: var(--rcn-fg-3); }
.ext-rep-blurb {
  font-size: 13px;
  line-height: 1.55;
  color: var(--rcn-fg-2);
  padding-top: 12px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  margin-top: 4px;
}
.ext-trust {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  font-size: 12px;
  color: var(--rcn-fg-3);
}
.ext-trust > div { display: inline-flex; align-items: center; gap: 8px; }
.ext-trust .icon { color: var(--rcn-brand-green); }

.ext-stage {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 16px;
  padding: 32px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
}

.ext-stepper {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ext-stepper li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-fg-3);
}
.ext-stepper li .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.ext-stepper li.active .dot {
  background: var(--rcn-brand-green);
  color: #fff;
}
.ext-stepper li.done .dot {
  background: rgba(38, 207, 123, 0.18);
  color: #137548;
}
.ext-stepper li.active { color: var(--rcn-fg-1); }
.ext-stepper li.done { color: var(--rcn-fg-2); }
.ext-stepper li + li::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: rgba(17, 20, 17, 0.10);
  margin-right: 4px;
}

.ext-pane { display: flex; flex-direction: column; flex: 1; }
.ext-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.ext-lead {
  font-size: 14px;
  color: var(--rcn-fg-2);
  line-height: 1.55;
  margin: 0 0 18px;
}

.ext-date-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ext-slot-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.ext-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  margin-top: auto;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
}

.ext-form { display: flex; flex-direction: column; gap: 14px; max-width: 540px; }
.ext-tos {
  font-size: 11px;
  color: var(--rcn-fg-3);
  padding: 8px 0;
  line-height: 1.5;
}

.ext-confirmed {
  align-items: center;
  text-align: center;
}
.ext-confirmed-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(38, 207, 123, 0.14);
  color: var(--rcn-brand-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 16px;
}
.ext-confirmation-card {
  background: var(--rcn-sand-50);
  border: 1px solid rgba(17, 20, 17, 0.06);
  border-radius: 14px;
  padding: 18px 22px;
  max-width: 520px;
  width: 100%;
  margin: 18px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.ext-cc-row { display: flex; gap: 14px; align-items: flex-start; }
.ext-cc-row > .icon { color: var(--rcn-brand-green); margin-top: 2px; flex-shrink: 0; }
.ext-cc-title { font-size: 14px; font-weight: 600; color: var(--rcn-fg-1); }
.ext-cc-meta { font-size: 12px; color: var(--rcn-fg-3); margin-top: 2px; }
.ext-actions { margin: 22px auto 0; max-width: 520px; width: 100%; }
.ext-action-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  margin-bottom: 10px;
}
.ext-action-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.ext-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.14);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  text-decoration: none;
}
.ext-action-pill:hover { background: var(--rcn-sand-100); border-color: var(--rcn-brand-green); }

.ext-footer {
  font-size: 11px;
  color: var(--rcn-fg-3);
  text-align: center;
  padding: 22px;
}

/* === Fields ============================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.field-hint { font-size: 12px; color: var(--rcn-fg-3); }
.field-error { font-size: 12px; color: var(--rcn-danger); }
.input, .select, .textarea {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--rcn-fg-1);
  outline: none;
  transition: border-color 150ms var(--rcn-ease-standard), box-shadow 150ms var(--rcn-ease-standard);
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2311140f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  cursor: pointer;
}
.input::placeholder, .textarea::placeholder { color: rgba(17, 20, 17, 0.32); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--rcn-brand-green);
  box-shadow: 0 0 0 3px rgba(38, 207, 123, 0.16);
}
.input-error { border-color: var(--rcn-danger); }
.input-error:focus { box-shadow: 0 0 0 3px rgba(243, 18, 96, 0.18); }
.input-bare {
  background: transparent;
  border: 0;
  padding: 8px 0;
}
.input-bare:focus { box-shadow: none; }
/* Compact width for numeric inputs (e.g. the daily send cap). Global because it
   sits on an <InputNumber> component, which scoped CSS can't target. */
.input-cap { max-width: 100px; }

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.checkbox input { accent-color: var(--rcn-brand-green); width: 14px; height: 14px; }

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(17, 20, 17, 0.16);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 200ms;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 200ms;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle.on { background: var(--rcn-brand-green); }
.toggle.on::after { transform: translateX(16px); }

/* === Card ============================================== */
.card {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 14px;
  box-shadow: 0 0 5px 0 rgb(0 0 0 / 0.02), 0 2px 10px 0 rgb(0 0 0 / 0.05);
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.card-body { padding: 22px; }
.card-footer {
  padding: 16px 22px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* === App layout ======================================== */
.app {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 100vh;
  padding-top: 72px;
}
.app.no-sidebar { grid-template-columns: 1fr; }

/* === Sidebar =========================================== */
.sidebar {
  background: var(--rcn-gunmetal-700);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  width: 240px;
  overflow: hidden;
  transition: width 220ms var(--rcn-ease-standard);
  flex-shrink: 0;
}
.sidebar-compose {
  margin: 8px 16px 18px;
}
.sidebar-compose .btn-primary { width: 100%; padding: 12px 20px; font-size: 14px; }
.sidebar-nav {
  flex: 1;
  min-height: 0; /* allow the nav to shrink below its content so it scrolls instead of pushing the account block out */
  overflow-y: auto;
  padding: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Blend the scrollbar into the dark sidebar: transparent track, faint thumb (Firefox). */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
/* WebKit/Blink: same blended treatment — invisible track, barely-there thumb until hover. */
.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26);
}
.sidebar-nav .section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 16px 12px 8px 20px;
}
/* Collapsible category header: reuses .section typography, adds a toggle affordance. */
.sidebar-nav .section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: color 120ms var(--rcn-ease-standard);
}
.sidebar-nav .section-toggle:hover { color: rgba(255, 255, 255, 0.7); }
.sidebar-nav .section-toggle .section-chevron {
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 160ms var(--rcn-ease-standard);
}
.sidebar-nav .section-toggle.collapsed .section-chevron { transform: rotate(-90deg); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: all 150ms var(--rcn-ease-standard);
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.nav-item.active {
  background: rgba(38, 207, 123, 0.14);
  color: var(--rcn-green-300);
}
.nav-item.active .icon { color: var(--rcn-brand-green); }
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 600;
}
.nav-item.active .badge {
  background: var(--rcn-brand-green);
  color: #fff;
}
.nav-item .badge.urgent {
  background: rgba(243, 18, 96, 0.20);
  color: #FFC1D5;
}
.nav-item.active .badge.urgent {
  background: var(--rcn-danger);
  color: #fff;
}
.nav-item .badge.fresh {
  background: var(--rcn-brand-green);
  color: #fff;
}
.nav-item.active .badge.fresh {
  background: var(--rcn-brand-green);
  color: #fff;
}
.sidebar-user {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.sidebar-user-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: left;
  transition: background 150ms;
}
.sidebar-user-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.sidebar-user-toggle .avatar { flex-shrink: 0; }
.sidebar-user-toggle .who {
  flex: 1;
  min-width: 0;
}
.sidebar-user-toggle .who .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-toggle .who .role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}
.sidebar-user-popup {
  display: none;
  position: fixed;
  z-index: 500;
  background: #252d3a;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  min-width: 180px;
}
.sidebar-user-popup.open { display: block; }
.sidebar-popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
  transition: background 120ms;
}
.sidebar-popup-item:hover { background: rgba(255, 255, 255, 0.08); }

/* === Avatar ============================================ */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2FD982 0%, #00A49E 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }

/* === Top bar =========================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--rcn-bg, #F0EAE3);
  z-index: 100;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
  height: 72px;
  flex-shrink: 0;
  box-sizing: border-box;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.topbar-brand img {
  height: 30px;
  width: 30px;
  object-fit: contain;
}
.topbar-brand-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.topbar-product {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  display: block;
  line-height: 1.3;
}
.topbar-parent {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
  display: block;
  line-height: 1.3;
}
.topbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(17, 20, 17, 0.10);
  flex-shrink: 0;
  margin: 0 8px;
}
.topbar h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.topbar .crumb {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  margin-bottom: 4px;
}
.topbar .crumb-trail {
  display: flex;
  align-items: center;
  gap: 7px;
}
.topbar .crumb-trail a {
  color: var(--rcn-fg-3);
  text-decoration: none;
  transition: color 150ms var(--rcn-ease-standard, ease);
}
.topbar .crumb-trail a:hover {
  color: var(--rcn-brand-green, #137548);
}
.topbar .crumb-sep {
  opacity: 0.55;
}
.topbar .spacer { flex: 1; }

/* === Notification bell + panel ============================ */
.notif-wrap {
  position: relative;
}
.notif-bell {
  background: transparent;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rcn-fg-2);
  position: relative;
  transition: background 120ms var(--rcn-ease-standard), color 120ms var(--rcn-ease-standard);
}
.notif-bell:hover { background: rgba(17, 20, 17, 0.06); color: var(--rcn-fg-1); }
.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--rcn-bg);
}
.notif-dot.urgent { background: var(--rcn-danger); }
.notif-dot.fresh  { background: var(--rcn-brand-green); }

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.10);
  border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.3);
  z-index: 100;
  overflow: hidden;
  max-height: 540px;
  display: flex;
  flex-direction: column;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
}
.notif-head .title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.notif-head .mark-all {
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-blue-500);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.notif-head .mark-all:hover { background: rgba(70, 187, 232, 0.08); }

.notif-body {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0 8px;
}
.notif-bucket {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  padding: 12px 16px 6px;
}
.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 100ms var(--rcn-ease-standard);
}
.notif-item:hover { background: var(--rcn-sand-50); }
.notif-item.unread { background: rgba(38, 207, 123, 0.05); }
.notif-item.unread:hover { background: rgba(38, 207, 123, 0.10); }
.notif-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon.fresh  { background: rgba(38, 207, 123, 0.14); color: #137548; }
.notif-icon.info   { background: rgba(70, 187, 232, 0.14); color: #155F7B; }
.notif-icon.urgent { background: rgba(243, 18, 96, 0.10);  color: #A8013F; }
.notif-icon.warn   { background: rgba(245, 165, 36, 0.16); color: #7A4F00; }

.notif-body-row {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  line-height: 1.4;
}
.notif-meta {
  font-size: 12px;
  color: var(--rcn-fg-3);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-time {
  font-size: 11px;
  color: var(--rcn-fg-3);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.notif-unread-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rcn-brand-green);
}

.notif-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--rcn-fg-3);
}
.notif-empty .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(38, 207, 123, 0.12);
  color: var(--rcn-brand-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.notif-empty .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  margin-bottom: 4px;
}
.notif-empty .meta { font-size: 12px; }
.topbar .search {
  position: relative;
  width: 320px;
  max-width: 30vw;
}
.topbar .search .input { padding-left: 36px; width: 100%; }
.topbar .search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rcn-fg-3);
}

/* === Screen ============================================ */
.screen {
  padding: 28px 32px 64px;
  width: 100%;
}
.layout-compact .screen {
  max-width: 1280px;
  margin: 0 auto;
}

/* === Stat tiles ======================================== */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--rcn-fg-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--rcn-fg-1);
  line-height: 1;
}
.stat-delta {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-delta.up { color: #137548; }
.stat-delta.down { color: #A8013F; }
.stat-delta.flat { color: var(--rcn-fg-3); }
.stat .accent {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.stat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === Filter row ======================================== */
.filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-row .search { flex: 1; min-width: 220px; position: relative; }
.filter-row .search .input { padding-left: 36px; width: 100%; }
.filter-row .search .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--rcn-fg-3);
}
.filter-row .select { background: #fff; cursor: pointer; }

/* Enrolled-grid search box on the Sequence detail page (global so the .icon on the child Icon is reachable). */
.seq-enroll-search { flex: 1; min-width: 200px; max-width: 340px; position: relative; }
.seq-enroll-search .input { padding-left: 36px; width: 100%; }
.seq-enroll-search .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--rcn-fg-3);
}
.filter-row .seg,
.contacts-toolbar .seg,
.replies-toolbar .seg,
.seg {
  display: inline-flex;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.12);
  border-radius: 9999px;
  padding: 3px;
}
.filter-row .seg button,
.contacts-toolbar .seg button,
.replies-toolbar .seg button,
.seg > button {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-fg-2);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 150ms var(--rcn-ease-standard);
}
.filter-row .seg button.active,
.contacts-toolbar .seg button.active,
.replies-toolbar .seg button.active,
.seg > button.active {
  background: var(--rcn-fg-1);
  color: #fff;
}

/* === Table ============================================= */
.table-card { overflow: hidden; }
.table-density-compact .table th,
.table-density-compact .table td { padding-top: 8px; padding-bottom: 8px; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}
.table thead th {
  background: var(--rcn-sand-100);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  border-bottom: 1px solid rgba(17, 20, 17, 0.08);
  white-space: nowrap;
}
.table thead th:first-child { padding-left: 22px; }
/* Sortable column headers (SortableTh): clickable, with an arrow on the active column. */
.table thead th.th-sort { cursor: pointer; user-select: none; transition: color 120ms var(--rcn-ease-standard); }
.table thead th.th-sort:hover { color: var(--rcn-fg-1); }
.table thead th.th-sort.active { color: var(--rcn-fg-1); }
.th-sort-in { display: inline-flex; align-items: center; gap: 5px; }
.th-sort-arrow { display: inline-flex; align-items: center; min-width: 12px; color: var(--rcn-brand-green); }
/* Search box that sits above a grid (filter-as-you-type). */
.grid-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  max-width: 360px;
  flex: 1 1 260px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.1);
  border-radius: 10px;
  color: var(--rcn-fg-3);
}
.grid-search:focus-within { border-color: var(--rcn-brand-green); }
.grid-search input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--rcn-fg-1);
  width: 100%;
}
.table tbody tr {
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
  cursor: pointer;
  transition: background 120ms var(--rcn-ease-standard);
}
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--rcn-sand-50); }
.table tbody td:first-child { padding-left: 22px; }
.table .subject {
  font-weight: 600;
  color: var(--rcn-fg-1);
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table .preview {
  font-size: 12px;
  color: var(--rcn-fg-3);
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  display: block;
}
.table .recipient {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table .recipient .email {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 1px;
}
.table .recipient .name { font-weight: 500; }
.table .ts {
  color: var(--rcn-fg-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row-actions {
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
}
.icon-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  border-radius: 6px;
  color: var(--rcn-fg-2);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(17, 20, 17, 0.06); color: var(--rcn-fg-1); }
.icon-btn.danger:hover { color: var(--rcn-danger); }

/* === Compose =========================================== */
.compose-card { display: flex; flex-direction: column; }
.compose-head {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.compose-meta {
  padding: 4px 22px;
  display: flex;
  flex-direction: column;
}
.compose-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
}
.compose-row .label {
  width: 80px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
  flex-shrink: 0;
}
.compose-row .value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.compose-row input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 4px 0;
  font-size: 14px;
  outline: none;
  min-width: 200px;
}
.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(38, 207, 123, 0.12);
  color: #137548;
  padding: 4px 6px 4px 10px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
}
.recipient-chip .x {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  padding: 2px;
  border-radius: 50%;
  opacity: 0.6;
}
.recipient-chip .x:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.cc-toggle {
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-blue-500);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.cc-toggle:hover { background: rgba(70, 187, 232, 0.08); }

.editor-toolbar {
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
  flex-wrap: wrap;
}
.editor-toolbar .icon-btn { padding: 7px; }
.editor-toolbar .sep {
  width: 1px;
  height: 18px;
  background: rgba(17, 20, 17, 0.12);
  margin: 0 4px;
}
.merge-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(38, 207, 123, 0.10);
  color: #137548;
  border: 0;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.merge-button:hover { background: rgba(38, 207, 123, 0.18); }

.editor-body {
  padding: 24px;
  min-height: 320px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--rcn-fg-1);
  outline: none;
  position: relative;
}
.editor-body[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: rgba(17, 20, 17, 0.32);
}
.editor-body .merge {
  background: rgba(38, 207, 123, 0.16);
  color: #0E5234;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92em;
  font-family: var(--rcn-font-mono);
}

.attachments {
  margin: 0 22px 18px;
  border: 1.5px dashed rgba(17, 20, 17, 0.16);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.attachments .hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rcn-fg-3);
}
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rcn-sand-100);
  padding: 6px 10px 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}
.attachment .icon { color: var(--rcn-fg-3); }
.attachment .x {
  background: transparent;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: var(--rcn-fg-3);
  border-radius: 4px;
}
.attachment .x:hover { color: var(--rcn-fg-1); background: rgba(0,0,0,0.06); }

.compose-actions {
  padding: 16px 22px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--rcn-sand-50);
  border-radius: 0 0 14px 14px;
  flex-wrap: wrap;
}
.compose-actions .spacer { flex: 1; }
.compose-readonly-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--rcn-fg-2);
  font-style: italic;
}

/* Schedule popover anchored to the Schedule button (Compose) */
.schedule-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 60;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.10);
  border-radius: 12px;
  padding: 14px;
  width: 320px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.schedule-pop .head {
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.schedule-pop .quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.schedule-pop .quick button {
  background: var(--rcn-sand-100);
  border: 1px solid rgba(17, 20, 17, 0.06);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--rcn-fg-2);
  transition: all 150ms var(--rcn-ease-standard);
}
.schedule-pop .quick button:hover {
  background: rgba(38, 207, 123, 0.10);
  color: #137548;
  border-color: rgba(38, 207, 123, 0.30);
}
.schedule-pop input[type="datetime-local"] {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--rcn-fg-1);
  outline: none;
  font-family: inherit;
}
.schedule-pop input[type="datetime-local"]:focus {
  border-color: var(--rcn-brand-green);
  box-shadow: 0 0 0 3px rgba(38, 207, 123, 0.16);
}
.schedule-pop .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.schedule-pop .foot .when {
  font-size: 12px;
  color: var(--rcn-fg-3);
}

/* When-due column in Scheduled table */
.due {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.due .absolute {
  font-weight: 500;
  color: var(--rcn-fg-1);
  font-variant-numeric: tabular-nums;
}
.due .relative {
  font-size: 11px;
  color: var(--rcn-fg-3);
}
.due.overdue .absolute { color: var(--rcn-danger); }

/* Scheduled-table action buttons (always visible, not hover-only) */
.sched-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.sched-actions .btn { padding: 6px 10px; font-size: 11px; }

/* === Toast ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--rcn-gunmetal-700);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), 0 0 1px rgba(0,0,0,0.3);
  pointer-events: auto;
  animation: toastIn 300ms var(--rcn-ease-out);
}
@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.toast .accent {
  width: 8px; height: 8px; border-radius: 50%;
}

/* === Modal ============================================= */
.modal-scrim {
  position: fixed; inset: 0;
  background: rgba(35, 39, 34, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: #fff;
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px 0 rgb(0 0 0 / 0.08), 0 30px 60px 0 rgb(0 0 0 / 0.2);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Wizard modal (vertical stepper + form pane) */
.modal.wizard {
  max-width: 880px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}
.modal.wizard form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.wizard-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.wizard-stepper {
  overflow-y: auto;
}
.wizard-pane {
  overflow-y: auto;
}
@media (max-width: 640px) {
  .wizard-body { grid-template-columns: 1fr; }
  .wizard-stepper { border-right: 0; border-bottom: 1px solid rgba(17,20,17,.06); }
}
.wizard-stepper {
  background: var(--rcn-sand-50);
  border-right: 1px solid rgba(17, 20, 17, 0.06);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wizard-step {
  position: relative;
  background: transparent;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--rcn-fg-2);
  transition: background 120ms var(--rcn-ease-standard), color 120ms;
  font-family: inherit;
}
.wizard-step:hover {
  background: rgba(17, 20, 17, 0.04);
  color: var(--rcn-fg-1);
}
.wizard-step.active {
  background: #fff;
  color: var(--rcn-fg-1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(38, 207, 123, 0.20);
}
.wizard-step .num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: background 120ms, color 120ms;
}
.wizard-step.active .num {
  background: var(--rcn-brand-green);
  color: #fff;
}
.wizard-step.done .num {
  background: rgba(38, 207, 123, 0.18);
  color: #137548;
}
.wizard-step-label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wizard-step-label .title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.wizard-step-label .meta {
  display: block;
  font-size: 11px;
  color: var(--rcn-fg-3);
  margin-top: 1px;
}
.wizard-step.has-error .num {
  background: rgba(243, 18, 96, 0.16);
  color: var(--rcn-danger);
}
.wizard-step.has-error .wizard-step-label .title { color: var(--rcn-danger); }
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 25px;
  top: 100%;
  width: 2px;
  height: 2px;
  background: rgba(17, 20, 17, 0.10);
}

.wizard-pane {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.wizard-pane-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.wizard-pane-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 4px 0 4px;
}
.wizard-pane-lead {
  font-size: 13px;
  color: var(--rcn-fg-2);
  line-height: 1.5;
  margin: 0 0 18px;
}
.wizard-pane-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) { .wizard-pane-fields { grid-template-columns: 1fr; } }
.wizard-pane-full { grid-column: 1 / -1; }

.wizard-foot {
  padding: 14px 24px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--rcn-sand-50);
}
.wizard-foot .step-counter {
  font-size: 12px;
  color: var(--rcn-fg-3);
  font-weight: 500;
}

/* === Sign-In =========================================== */
.signin {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.signin-brand {
  background: var(--rcn-gunmetal-700);
  color: #fff;
  padding: 56px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.signin-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 110% -10%, rgba(38, 207, 123, 0.3) 0%, transparent 55%),
    radial-gradient(80% 60% at -10% 110%, rgba(0, 164, 158, 0.25) 0%, transparent 60%);
  pointer-events: none;
}
.signin-brand > * { position: relative; z-index: 1; }
.signin-brand .logo { display: flex; align-items: center; gap: 12px; }
.signin-brand .logo img { height: 48px; width: 48px; object-fit: contain; display: block; }
.signin-brand .logo-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}
.brand-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 2px;
}
.signin-brand .tagline {
  margin-top: auto;
  max-width: 460px;
}
.signin-brand .tagline .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcn-green-300);
}
.signin-brand .tagline h1 {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 16px 0 0;
  color: #fff;
}
.signin-brand .tagline p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 18px 0 0;
  max-width: 440px;
}
.signin-feature-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.signin-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.signin-feature-list li .icon {
  color: var(--rcn-green-300);
  flex-shrink: 0;
}
.signin-brand .footer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 36px;
}

.signin-form {
  background: var(--rcn-bg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.signin-form-inner {
  width: 100%;
  max-width: 400px;
}
.signin-form .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcn-brand-green);
}
.signin-form h2 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
  line-height: 1.1;
}
.signin-form .lead {
  font-size: 15px;
  color: var(--rcn-fg-2);
  line-height: 1.6;
  margin: 0;
}

/* Local sign-in form fields. These MUST be global (not in SignIn.razor.css):
   the classes sit on Blazor components (<EditForm>, <InputText>), and scoped
   CSS isolation never applies a component's scope attribute to the rendered
   element, so a scoped rule here silently no-ops. */
.signin-form-fields {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.password-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.forgot-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--rcn-blue-500);
  text-decoration: none;
}
.password-wrap { position: relative; }
.password-input {
  padding-right: 38px;
  width: 100%;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--rcn-fg-3);
  border-radius: 6px;
}
.field-error-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-error-sso { margin-top: 18px; }
.remember-check { margin-top: 2px; }
.signin-submit {
  margin-top: 6px;
  width: 100%;
}
.sso-link { text-decoration: none; }

/* Forgot-password / set-password forms — global for the same reason as
   .signin-form-fields: they sit on <EditForm> components, which scoped CSS
   can't target (the scope attribute is never added to a child component). */
.recovery-form,
.auth-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sso-btn {
  margin-top: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.14);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rcn-fg-1);
  cursor: pointer;
  transition: all 200ms var(--rcn-ease-standard);
}
.sso-btn:hover {
  border-color: var(--rcn-brand-green);
  box-shadow: 0 10px 24px -10px rgba(38, 207, 123, 0.35);
}
.sso-btn .ms-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.signin-form .trust {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.signin-form .trust .row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--rcn-fg-2);
}
.signin-form .trust .row .icon { color: var(--rcn-brand-green); flex-shrink: 0; }
.signin-form .help {
  margin-top: 36px;
  font-size: 12px;
  color: var(--rcn-fg-3);
  text-align: center;
}
.signin-form .help a { color: var(--rcn-blue-500); font-weight: 600; }
.signin-form .help a:hover { text-decoration: underline; }

/* Divider between local sign-in and SSO */
.signin-divider {
  position: relative;
  margin: 26px 0 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rcn-fg-3);
}
.signin-divider::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: rgba(17, 20, 17, 0.10);
}
.signin-divider span {
  position: relative;
  background: var(--rcn-bg);
  padding: 0 12px;
}

/* Password strength meter (Register) */
.pw-meter {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
}
.pw-meter .bar {
  height: 4px;
  flex: 1;
  background: rgba(17, 20, 17, 0.08);
  border-radius: 2px;
  transition: background-color 200ms;
}
.pw-meter .bar.s1 { background: var(--rcn-danger); }
.pw-meter .bar.s2 { background: var(--rcn-warning); }
.pw-meter .bar.s3 { background: var(--rcn-blue-400); }
.pw-meter .bar.s4 { background: var(--rcn-brand-green); }
.pw-meter .pw-label {
  margin-left: 8px;
  font-weight: 600;
  color: var(--rcn-fg-3);
  min-width: 40px;
}

/* Role picker cards (Register) */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 540px) { .role-grid { grid-template-columns: 1fr; } }
.role-card {
  position: relative;
  text-align: left;
  background: #fff;
  border: 1.5px solid rgba(17, 20, 17, 0.10);
  border-radius: 10px;
  padding: 14px 14px 16px;
  cursor: pointer;
  transition: background-color 180ms var(--rcn-ease-standard),
              border-color 180ms var(--rcn-ease-standard),
              box-shadow 180ms var(--rcn-ease-standard);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.role-card:hover { border-color: rgba(17, 20, 17, 0.22); }
.role-card.selected {
  border-color: var(--rcn-brand-green);
  background: rgba(38, 207, 123, 0.06);
  box-shadow: 0 0 0 3px rgba(38, 207, 123, 0.14);
}
.role-card .role-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(38, 207, 123, 0.12);
  color: var(--rcn-green-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.role-card .role-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.role-card .role-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--rcn-fg-3);
}
.role-card .role-radio {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(17, 20, 17, 0.18);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 180ms var(--rcn-ease-standard);
}
.role-card .role-radio.on {
  background: var(--rcn-brand-green);
  border-color: var(--rcn-brand-green);
}

@media (max-width: 800px) {
  .signin { grid-template-columns: 1fr; }
  .signin-brand { padding: 32px 24px; min-height: 280px; }
  .signin-form { padding: 32px 24px; }
}

/* === Email detail ====================================== */
.detail-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
.detail-email .preview {
  padding: 28px 32px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--rcn-fg-1);
}
.detail-email .preview h4 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
}
.detail-email .preview p { margin: 0 0 14px; }
.detail-email .preview ul { padding-left: 18px; margin: 0 0 14px; list-style: disc; }
.detail-email .preview li { margin-bottom: 4px; }
.detail-email .preview .signature {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-2);
  font-size: 13px;
}
.detail-meta-card .card-body { padding-top: 16px; padding-bottom: 16px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
  gap: 16px;
  font-size: 13px;
}
.meta-row:last-child { border-bottom: 0; }
.meta-row .k {
  color: var(--rcn-fg-3);
  font-weight: 500;
  white-space: nowrap;
}
.meta-row .v {
  color: var(--rcn-fg-1);
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 32px;
  bottom: -2px;
  width: 1.5px;
  background: rgba(17, 20, 17, 0.1);
}
.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(70, 187, 232, 0.16);
  color: #155F7B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.timeline-dot.sent { background: rgba(38, 207, 123, 0.16); color: #137548; }
.timeline-dot.failed { background: rgba(243, 18, 96, 0.12); color: var(--rcn-danger); }
.timeline-dot.click  { background: rgba(0, 164, 158, 0.14); color: #006D69; }
.timeline-dot.replied{ background: rgba(38, 207, 123, 0.18); color: #0E5234; box-shadow: 0 0 0 2px rgba(38, 207, 123, 0.18); }
.timeline-content .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.timeline-content .meta {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 2px;
}

/* === Templates ========================================= */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.template-card {
  background: #fff;
  border: 1px solid rgba(17, 20, 17, 0.08);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 180ms var(--rcn-ease-standard);
}
.template-card:hover {
  border-color: var(--rcn-brand-green);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.08);
}
.template-card .name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rcn-fg-1);
}
.template-card .subj {
  font-size: 12px;
  color: var(--rcn-fg-3);
  font-weight: 500;
}
.template-card .body-preview {
  font-size: 13px;
  color: var(--rcn-fg-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  min-height: 60px;
}
.template-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--rcn-fg-3);
}
.template-card .foot .tag {
  background: rgba(38, 207, 123, 0.10);
  color: #137548;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* === Settings ========================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: flex-start;
}
.settings-nav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav button {
  background: transparent;
  border: 0;
  text-align: left;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--rcn-fg-2);
  border-radius: 8px;
  cursor: pointer;
}
.settings-nav button.active {
  background: rgba(38, 207, 123, 0.12);
  color: #137548;
}
.settings-nav button:not(.active):hover {
  background: rgba(17, 20, 17, 0.04);
  color: var(--rcn-fg-1);
}
.settings-section { display: flex; flex-direction: column; gap: 16px; }
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  padding: 16px 22px;
  align-items: center;
  border-bottom: 1px solid rgba(17, 20, 17, 0.05);
}
.settings-row:last-child { border-bottom: 0; }
.settings-row .label-block .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rcn-fg-1);
}
.settings-row .label-block .desc {
  font-size: 12px;
  color: var(--rcn-fg-3);
  margin-top: 2px;
  max-width: 340px;
  line-height: 1.45;
}
.users-table .role-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(17, 20, 17, 0.06);
  color: var(--rcn-fg-2);
}
.users-table .role-tag.admin {
  background: rgba(0, 164, 158, 0.12);
  color: #006D69;
}

/* === Responsive ======================================== */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}
.mobile-toggle:hover { background: rgba(17,20,17,.06); }

/* Mobile drawer scrim — always fixed (only ever a mobile overlay).
   Must be position:fixed at ALL widths so it doesn't eat a grid column. */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(35, 39, 34, 0.55);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms;
}
.sidebar-scrim.open { opacity: 1; pointer-events: auto; }

@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 300ms var(--rcn-ease-out);
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: inline-flex; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .topbar .search { width: 200px; }
  .detail-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    border-bottom: 1px solid rgba(17,20,17,.08);
    padding-bottom: 4px;
  }
  .settings-nav button { white-space: nowrap; }
  .compose-row .label { width: 60px; font-size: 11px; }
  .table-wrap { overflow-x: auto; }
  .topbar { padding: 14px 18px; }
  .screen { padding: 18px 18px 56px; }
}
@media (max-width: 540px) {
  .topbar h1 { font-size: 17px; }
  .topbar .search { display: none; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .filter-row .seg, .filter-row .select { font-size: 12px; }
  .compose-actions .btn { font-size: 12px; padding: 8px 14px; }
  .editor-toolbar { padding: 8px 14px; }
  .compose-head, .compose-meta, .editor-body, .compose-actions { padding-left: 16px; padding-right: 16px; }
  .attachments { margin-left: 16px; margin-right: 16px; }
}
