/* ==========================================================================
   MYND Outreach — design system
   Visual language shared with the MYND Masterclass platform: deep navy
   scale, pink single-action accent, pill buttons, soft-lifted cards, band
   heroes. Behaviour is untouched here -- this file only changes how the
   class names the page scripts already emit are painted.
   ========================================================================== */

:root {
  /* ---- brand core (new deeper scale) -------------------------------- */
  --navy: #253c74;
  --navy-600: #1d3060;
  --navy-700: #16244a;
  --navy-800: #101a36;
  --navy-900: #0a1226;
  --pink: #ee3897;
  --pink-600: #d42a83;
  --pink-050: #fdeaf4;
  --blue: #0c4da2;
  --blue-400: #4a90d9;
  --blue-050: #eaf2fc;

  /* ---- neutrals ------------------------------------------------------ */
  --paper: #ffffff;
  --paper-alt: #f5f7fc;
  --paper-3: #eef2f9;
  --line: #e1e7f2;
  --line-soft: #edf1f8;
  --ink: #16203a;
  --ink-soft: #3d4a66;
  --muted: #6b7896;
  --muted-light: #9aa5bd;

  /* ---- semantic -------------------------------------------------------*/
  --ok: #0f9d6e;
  --ok-050: #e6f6f0;
  --warn: #d98500;
  --warn-050: #fdf3e2;
  --stop: #d23b3b;
  --stop-050: #fbeaea;

  /* rgb tuples for the tokens above, so tints/shades can be built with rgba() */
  --navy-rgb: 37, 60, 116;
  --pink-rgb: 238, 56, 151;
  --blue-rgb: 12, 77, 162;
  --ok-rgb: 15, 157, 110;
  --warn-rgb: 217, 133, 0;
  --stop-rgb: 210, 59, 59;
  --muted-rgb: 107, 120, 150;

  /* ---- legacy names --------------------------------------------------
     Every custom-property name this app shipped with before the redesign
     still exists here, pointed at the new scale, because the page
     scripts read these exact names out of inline styles. Do not rename
     or remove any of them. */
  --navy-dark: var(--navy-700);
  --navy-light: var(--blue);
  --pink-dark: var(--pink-600);
  --body: var(--ink-soft);
  --bg: var(--paper-alt);
  --surface: var(--paper);
  --danger: var(--stop);
  --danger-rgb: var(--stop-rgb);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(16, 26, 54, .14);
  --shadow-sm: 0 2px 10px rgba(16, 26, 54, .06);

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 72px;
  --content-max: 1500px;
  --content-pad: clamp(20px, 3vw, 40px);

  --font-head: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur: 200ms;
}

* , *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }

p { margin: 0 0 12px; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

small, .text-sm { font-size: 12.5px; }
.text-muted { color: var(--muted); }
.text-body { color: var(--body); }

img, svg { display: block; max-width: 100%; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

/* ---- focus-visible ------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- scrollbar (subtle, webkit) ------------------------------------------ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--navy-rgb), .25); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--navy-rgb), .4); }

/* ==========================================================================
   App shell: sidebar + topbar
   ========================================================================== */

body.mynd-app { display: flex; min-height: 100vh; }

.mynd-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(10, 18, 38, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255, 255, 255, .08);
  color: var(--surface);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width var(--dur) var(--ease-out);
}

.mynd-brand {
  padding: 26px 24px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mynd-brand-mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--surface);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mynd-brand-mark i {
  color: var(--pink);
  font-size: 15px;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(238, 56, 151, .14);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.mynd-brand-sub {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--pink);
  margin-top: 8px;
  margin-left: 40px;
  text-transform: uppercase;
}

.mynd-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.mynd-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .68);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  white-space: nowrap;
}

.mynd-nav-item i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }

.mynd-nav-item:hover { background: rgba(255, 255, 255, .06); color: var(--surface); text-decoration: none; }

.mynd-nav-item.active {
  background: linear-gradient(90deg, rgba(238, 56, 151, .18), rgba(238, 56, 151, .04));
  color: var(--surface);
}

.mynd-nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 6px; bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: var(--pink);
}

.mynd-nav-foot {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 11.5px;
  color: rgba(255, 255, 255, .4);
}

.mynd-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--dur) var(--ease-out);
}

.mynd-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  background: rgba(10, 18, 38, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--content-pad);
}

.mynd-topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }

.mynd-topbar-brand {
  display: flex; align-items: center; gap: 12px;
  padding-right: 16px; margin-right: 2px;
  border-right: 1px solid rgba(255, 255, 255, .14);
  flex-shrink: 0;
}

.mynd-topbar-brand i {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(238, 56, 151, .14); color: var(--pink);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}

.mynd-topbar h1 {
  font-size: 17px; font-weight: 700; margin: 0; color: var(--surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mynd-topbar-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }

.mynd-content {
  padding: var(--content-pad);
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .mynd-sidebar { width: var(--sidebar-w-collapsed); }
  .mynd-sidebar .mynd-brand-sub,
  .mynd-sidebar .mynd-nav-label,
  .mynd-sidebar .mynd-nav-foot { display: none; }
  .mynd-sidebar .mynd-brand-mark span { display: none; }
  .mynd-main { margin-left: var(--sidebar-w-collapsed); }
  .mynd-nav-item { justify-content: center; padding: 12px; gap: 0; }
  .mynd-nav-item.active::before { left: 4px; }
}

/* ---- topbar widgets ------------------------------------------------------ */

.mynd-inbox-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.mynd-inbox-btn:hover { background: rgba(255, 255, 255, .14); transform: translateY(-1px); }

.mynd-badge-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--pink);
  color: var(--surface);
  font-size: 10.5px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--navy-900);
}

.mynd-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--blue-400));
  color: var(--surface);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  position: relative;
}

.mynd-user-menu-wrap { position: relative; }

.mynd-user-menu {
  position: absolute;
  top: 50px; right: 0;
  min-width: 220px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 8px;
  z-index: 50;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.mynd-user-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.mynd-user-menu-email {
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  word-break: break-all;
}

.mynd-user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.mynd-user-menu-item:hover { background: var(--bg); }
.mynd-user-menu-item.danger { color: var(--danger); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: var(--pink); color: var(--surface);
  box-shadow: 0 10px 30px rgba(238, 56, 151, .34);
}
.btn-primary:hover:not(:disabled) {
  background: var(--pink-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(238, 56, 151, .4);
}

.btn-navy { background: var(--navy); color: var(--surface); }
.btn-navy:hover:not(:disabled) { background: var(--navy-dark); transform: translateY(-2px); }

.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { background: var(--bg); border-color: rgba(var(--navy-rgb), .3); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--body); }
.btn-ghost:hover:not(:disabled) { background: var(--bg); }

.btn-danger { background: var(--surface); color: var(--danger); border-color: rgba(var(--danger-rgb), .35); }
.btn-danger:hover:not(:disabled) { background: rgba(var(--danger-rgb), .06); }

.btn-sm { height: 34px; padding: 0 15px; font-size: 12.5px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ==========================================================================
   Forms
   ========================================================================== */

label, .field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.field { margin-bottom: 18px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], input[type="url"], textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

input::placeholder, textarea::placeholder { color: var(--muted); }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .14);
}

textarea { resize: vertical; min-height: 90px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7896'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 32px;
}

.field-error { color: var(--danger); font-size: 12px; margin-top: 6px; }
.field-hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

.checkbox-row { display: flex; align-items: center; gap: 9px; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--pink); }

.search-input-wrap { position: relative; }
.search-input-wrap i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px;
}
.search-input-wrap input { padding-left: 36px; }

/* ==========================================================================
   Cards, page header, grid
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.card + .card { margin-top: 24px; }

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

.card-header h2 { margin: 0; }
.card-header-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-header h1 { margin-bottom: 6px; letter-spacing: -0.02em; }
.page-header p { color: var(--muted); margin: 0; font-size: 14px; }

.row { display: flex; gap: 24px; }
.col { flex: 1; min-width: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1280px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .grid-6, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
}

.divider { height: 1px; background: var(--line); margin: 24px 0; border: none; }

/* ---- KPI card ------------------------------------------------------------ */

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.kpi-trend { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.kpi-trend.up { color: var(--ok); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend svg { display: block; }
.kpi-card > svg { margin-top: 4px; }

/* ==========================================================================
   Hero band -- dashboard top, and the analytics page header (scoped to
   body.page-analytics so the plain .page-header on every other page,
   which page-*.js writes into with the same class name, is unaffected)
   ========================================================================== */

.mynd-band {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(238, 56, 151, .22), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(12, 77, 162, .4), transparent 58%),
    linear-gradient(142deg, var(--navy-800), var(--navy-900) 62%, #060c1a);
  color: var(--surface);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px) clamp(28px, 4vw, 40px);
  margin-bottom: 28px;
  overflow: hidden;
}

.mynd-band__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.mynd-band__k {
  font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: #ff86c4; margin-bottom: 10px;
}
.mynd-band h1 {
  font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.025em; line-height: 1.08; color: var(--surface); margin-bottom: 0;
}
.mynd-band h1 span {
  background: linear-gradient(97deg, #ee3897, #ff7ab8 42%, #6fa8ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mynd-band p { color: rgba(255, 255, 255, .72); max-width: 64ch; margin: 10px 0 0; font-size: 14.5px; line-height: 1.6; }
.mynd-band .kpis { display: flex; gap: 32px; flex-wrap: wrap; }
.mynd-band .kpi b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 26px; line-height: 1; }
.mynd-band .kpi span {
  display: block; font-family: var(--font-head); font-weight: 600; font-size: 10.5px; letter-spacing: .13em;
  text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-top: 5px;
}

body.page-analytics .page-header {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(238, 56, 151, .22), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(12, 77, 162, .4), transparent 58%),
    linear-gradient(142deg, var(--navy-800), var(--navy-900) 62%, #060c1a);
  color: var(--surface);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 40px);
  margin-bottom: 28px;
  align-items: center;
}
body.page-analytics .page-header h1 {
  font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; color: var(--surface);
  background: linear-gradient(97deg, #ee3897, #ff7ab8 42%, #6fa8ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}
body.page-analytics .page-header h1::before {
  content: 'Overview';
  display: block;
  font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: #ff86c4; margin-bottom: 10px;
  -webkit-text-fill-color: #ff86c4;
}
body.page-analytics .page-header p { color: rgba(255, 255, 255, .72); }
body.page-analytics .range-select { background: rgba(255, 255, 255, .08); }
body.page-analytics .range-btn { color: rgba(255, 255, 255, .78); }
body.page-analytics .range-btn.active { background: var(--surface); color: var(--navy); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; }

table.mynd-table, table.data-table { width: 100%; border-collapse: collapse; }

.mynd-table thead th, .data-table thead th, .data-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.mynd-table tbody td, .data-table tbody td, .data-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--body);
  vertical-align: middle;
}

.mynd-table tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: none; }

.mynd-table tbody tr.clickable, .data-table tbody tr.clickable { cursor: pointer; transition: background var(--dur) var(--ease-out); }
.mynd-table tbody tr.clickable:hover, .data-table tbody tr.clickable:hover { background: var(--bg); }

.mynd-table .cell-primary { font-weight: 700; color: var(--ink); }
.mynd-table .cell-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.th-check, .td-check { width: 40px; }

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.table-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Form controls default to full width, which is right inside a field but wrong
   in a toolbar, where they should sit side by side and only take the room they
   need. */
.table-toolbar select,
.table-toolbar input[type="search"],
.table-toolbar input[type="text"] { width: auto; min-width: 168px; }
.table-toolbar .search-input-wrap { flex: 0 0 auto; }
@media (max-width: 860px) {
  .table-toolbar-left, .table-toolbar-right { width: 100%; }
  .table-toolbar select, .table-toolbar input[type="search"] { flex: 1 1 168px; }
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--navy-900);
  color: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 16px;
}

.bulk-bar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bulk-bar .btn-secondary { background: rgba(255, 255, 255, .1); color: var(--surface); border-color: rgba(255, 255, 255, .2); }
.bulk-bar .btn-secondary:hover { background: rgba(255, 255, 255, .16); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

.pagination-btns { display: flex; gap: 8px; }

/* ==========================================================================
   Pills / badges
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill-green { background: var(--ok-050); color: var(--ok); }
.pill-amber { background: var(--warn-050); color: var(--warn); }
.pill-pink  { background: var(--pink-050); color: var(--pink-dark); }
.pill-red   { background: var(--stop-050); color: var(--danger); }
.pill-grey  { background: var(--paper-3); color: var(--muted); }

.badge-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--pink-050);
  color: var(--pink-dark);
  font-size: 11.5px;
  font-weight: 700;
}

.badge-source i { font-size: 10px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.mynd-toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.mynd-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--navy-900);
  color: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.mynd-toast.show { opacity: 1; transform: translateY(0); }

.mynd-toast i.toast-icon { margin-top: 1px; font-size: 15px; }
.mynd-toast.ok i.toast-icon { color: var(--ok); }
.mynd-toast.error i.toast-icon { color: #ff9a9a; }
.mynd-toast.info i.toast-icon { color: var(--blue-400); }

.mynd-toast-msg { flex: 1; line-height: 1.4; }

.mynd-toast-close {
  background: none; border: none; color: rgba(255, 255, 255, .6);
  cursor: pointer; font-size: 13px; padding: 2px;
}
.mynd-toast-close:hover { color: var(--surface); }

/* ==========================================================================
   Modal / dialog
   ========================================================================== */

.mynd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 24, .55);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.mynd-backdrop.show { opacity: 1; }

.mynd-modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  transform: translateY(10px) scale(.98);
  transition: transform var(--dur) var(--ease-out);
}

.mynd-backdrop.show .mynd-modal { transform: translateY(0) scale(1); }

.mynd-modal.wide { max-width: 760px; }
.mynd-modal.xwide { max-width: 960px; }

.mynd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.mynd-modal-header h2 { margin: 0; font-size: 18px; }

.mynd-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 16px; padding: 6px;
  border-radius: 6px;
}
.mynd-modal-close:hover { background: var(--bg); color: var(--ink); }

.mynd-modal-body { padding: 24px 26px; overflow-y: auto; }

.mynd-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.mynd-modal-footer.spread { justify-content: space-between; }

/* ---- confirm dialog specific ------------------------------------------- */
.confirm-body { color: var(--body); font-size: 13.5px; line-height: 1.6; }

/* ==========================================================================
   Slide-over drawer
   ========================================================================== */

.mynd-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 24, .4);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.mynd-drawer-backdrop.show { opacity: 1; }

.mynd-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(10, 18, 38, .25);
  z-index: 91;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease-out);
}

.mynd-drawer.show { transform: translateX(0); }

.mynd-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px;
  background: var(--navy-900);
  color: var(--surface);
  flex-shrink: 0;
}

.mynd-drawer-header h2, .mynd-drawer-header h3 { color: var(--surface); }

.mynd-drawer-body { padding: 24px 26px; overflow-y: auto; flex: 1; }

.mynd-drawer-footer {
  display: flex; gap: 10px; padding: 18px 26px;
  border-top: 1px solid var(--line); flex-shrink: 0;
}

/* ---- drawer header is a dark strip (contact drawer), so the contact
   name/email and the reused modal-close button need light-on-dark
   overrides, and the loading skeleton needs a light-on-dark shimmer ---- */
.mynd-drawer-header .drawer-contact-name { color: var(--surface); }
.mynd-drawer-header .drawer-contact-email { color: rgba(255, 255, 255, .65); }
.mynd-drawer-header .mynd-modal-close { color: rgba(255, 255, 255, .7); }
.mynd-drawer-header .mynd-modal-close:hover { background: rgba(255, 255, 255, .12); color: var(--surface); }
.mynd-drawer-header .skeleton-block {
  background: linear-gradient(90deg, rgba(255, 255, 255, .1) 25%, rgba(255, 255, 255, .22) 37%, rgba(255, 255, 255, .1) 63%);
  background-size: 400% 100%;
}

/* ==========================================================================
   Empty state / skeleton loaders
   ========================================================================== */

.mynd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  gap: 6px;
}

.mynd-empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--pink-050);
  color: var(--pink);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.mynd-empty h3 { margin-bottom: 4px; }
.mynd-empty p { color: var(--muted); max-width: 360px; margin-bottom: 18px; }

.skeleton-block {
  background: linear-gradient(90deg, var(--line) 25%, var(--paper-3) 37%, var(--line) 63%);
  background-size: 400% 100%;
  border-radius: 8px;
  animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-block { animation: none; background: var(--line); }
}

.skeleton-row { display: flex; gap: 16px; align-items: center; padding: 14px 0; }
.skeleton-row .skeleton-block:first-child { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skeleton-row .skeleton-line { height: 12px; flex: 1; }

/* ==========================================================================
   Timeline (contact drawer)
   ========================================================================== */

.mynd-timeline { position: relative; padding-left: 22px; }

.mynd-timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--line);
}

.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px; top: 3px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--blue);
}

.timeline-item.tl-sent::before { border-color: var(--blue); }
.timeline-item.tl-opened::before { border-color: var(--ok); }
.timeline-item.tl-replied::before { border-color: var(--pink); background: var(--pink); }
.timeline-item.tl-bounced::before, .timeline-item.tl-failed::before { border-color: var(--danger); background: var(--danger); }

.timeline-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.timeline-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timeline-body { font-size: 12.5px; color: var(--body); margin-top: 6px; }

/* ==========================================================================
   Progress bar (mailbox health + merge-field preflight) -- 6px pill,
   pink to blue gradient fill, one of the signature moves carried over
   from the masterclass module-progress bar.
   ========================================================================== */

.progress-track { height: 6px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.progress-fill {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--pink), var(--blue-400));
  transition: width var(--dur) var(--ease-out);
}
.progress-fill.warn { background: var(--warn); }
.progress-fill.danger { background: var(--danger); }

/* ==========================================================================
   Utilities
   ========================================================================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 99px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--body);
}

.stat-inline { display: flex; gap: 28px; flex-wrap: wrap; }
.stat-inline .stat-value { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--ink); }
.stat-inline .stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.stack-lg > * + * { margin-top: 24px; }

/* ==========================================================================
   Dashboard-specific lists
   ========================================================================== */

.queue-list, .mailbox-health-list, .activity-list { display: flex; flex-direction: column; }

.queue-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.queue-item:last-child { border-bottom: none; }
.queue-item-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.queue-item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.queue-item-time { font-size: 12px; color: var(--blue); font-weight: 700; white-space: nowrap; }

.mailbox-health-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.mailbox-health-row:first-child { padding-top: 0; }
.mailbox-health-row:last-child { border-bottom: none; padding-bottom: 0; }
.mailbox-health-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mailbox-health-email { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.mailbox-health-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

.activity-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-3); color: var(--blue); font-size: 13px;
}
.activity-icon-sent, .activity-icon-scheduled { background: var(--blue-050); color: var(--blue); }
.activity-icon-opened, .activity-icon-completed { background: var(--ok-050); color: var(--ok); }
.activity-icon-replied { background: var(--pink-050); color: var(--pink-dark); }
.activity-icon-bounced, .activity-icon-failed { background: var(--stop-050); color: var(--danger); }
.activity-icon-paused, .activity-icon-stopped, .activity-icon-unsubscribed { background: var(--paper-3); color: var(--muted); }

.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13.5px; color: var(--ink); }
.activity-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.skeleton-wrap { display: flex; flex-direction: column; }

/* ==========================================================================
   Contact drawer
   ========================================================================== */

.drawer-section { margin-bottom: 26px; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

.drawer-contact-head { display: flex; align-items: center; gap: 14px; }
.drawer-contact-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--blue-400));
  color: var(--surface); font-family: var(--font-head); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.drawer-contact-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--ink); }
.drawer-contact-email { font-size: 12.5px; color: var(--muted); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.detail-item-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.detail-item-value { font-size: 13px; color: var(--ink); font-weight: 600; word-break: break-word; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.enrollment-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.enrollment-row:last-child { border-bottom: none; }
.enrollment-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.enrollment-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ==========================================================================
   Import modal
   ========================================================================== */

.import-wizard { display: flex; flex-direction: column; gap: 4px; }

.import-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.import-step {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted);
}
.import-step .import-step-dot {
  width: 24px; height: 24px; border-radius: 50%; background: var(--paper-3); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 11.5px;
}
.import-step.active { color: var(--ink); }
.import-step.active .import-step-dot { background: var(--navy); color: var(--surface); }
.import-step.done .import-step-dot { background: var(--ok); color: var(--surface); }
.import-step-sep { width: 24px; height: 1px; background: var(--line); }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--blue); background: var(--blue-050); }
.dropzone i { font-size: 26px; color: var(--blue); margin-bottom: 12px; display: block; }
.dropzone strong { color: var(--ink); }

.mapping-table-wrap { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.mapping-table { width: 100%; border-collapse: collapse; }
.mapping-table th { position: sticky; top: 0; background: var(--surface); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mapping-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; vertical-align: middle; }
.mapping-table tr:last-child td { border-bottom: none; }
.mapping-table select { padding: 7px 10px; font-size: 12.5px; }

.import-result-summary { display: flex; gap: 28px; margin-bottom: 18px; flex-wrap: wrap; }
.import-error-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.import-error-row { padding: 9px 14px; font-size: 12.5px; border-bottom: 1px solid var(--line); color: var(--danger); }
.import-error-row:last-child { border-bottom: none; }

/* ==========================================================================
   Chart (dashboard SVG chart + tooltip)
   ========================================================================== */

.mynd-chart-wrap { position: relative; }

.mynd-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--navy-900);
  color: var(--surface);
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity var(--dur) var(--ease-out);
  white-space: nowrap;
  z-index: 5;
}

.mynd-chart-tooltip.show { opacity: 1; }
.mynd-chart-tooltip strong { display: block; margin-bottom: 4px; font-size: 12.5px; }
.mynd-chart-tooltip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }

.chart-legend { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.chart-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--body); font-weight: 600; }
.chart-legend-item .dot { width: 9px; height: 9px; border-radius: 50%; }

/* ==========================================================================
   Mailbox list (mailboxes.html) -- .mbx-list already sets its own flex gap
   in that page's inline stylesheet, so the stacked-card margin is zeroed
   here to avoid doubling the gap between mailbox cards.
   ========================================================================== */

.mbx-list > .card + .card { margin-top: 0; }

/* ==========================================================================
   Login page (legacy .login-* helpers -- login.html builds its own
   self-contained .signin__* split screen, restyled directly in that
   file's inline stylesheet; these rules are kept, restyled to the new
   scale, in case another page ever reuses this shell)
   ========================================================================== */

.login-shell { display: flex; min-height: 100vh; }

.login-side {
  flex: 1;
  color: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 90% 0%, rgba(238, 56, 151, .22), transparent 60%),
    radial-gradient(800px 520px at 0% 100%, rgba(12, 77, 162, .4), transparent 58%),
    linear-gradient(142deg, var(--navy-800), var(--navy-900) 62%, #060c1a);
}

.login-brand-mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.01em;
}

.login-brand-sub {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--pink);
  margin-top: 6px;
  text-transform: uppercase;
}

.login-statement {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  margin: 40px 0 36px;
  max-width: 420px;
  color: var(--surface);
}
.login-statement span {
  background: linear-gradient(97deg, #ee3897, #ff7ab8 42%, #6fa8ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.login-proof { display: flex; flex-direction: column; gap: 14px; max-width: 380px; }

.login-proof-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, .72);
  line-height: 1.5;
}

.login-proof-item i { color: #ff86c4; margin-top: 3px; font-size: 13px; }

.login-side-panel {
  flex: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin-bottom: 6px; }
.login-card .login-card-sub { color: var(--muted); margin-bottom: 32px; }

.login-error {
  background: var(--stop-050);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
}

.login-error.show { display: block; }

@media (max-width: 900px) {
  .login-side { display: none; }
}

/* ==========================================================================
   AI features -- sequence writer/rewriter, deliverability, inbox triage,
   reply drafting, ICP scoring. Added alongside the Gemini wiring in
   page-sequence.js, page-inbox.js and page-contacts.js.
   ========================================================================== */

/* Classification / triage tags (inbox row + thread pane) */
.ai-tag {
  display: inline-flex; align-items: center; margin-left: 8px;
  padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; white-space: nowrap;
}
.ai-tag-green { background: var(--ok-050); color: var(--ok); }
.ai-tag-blue  { background: var(--blue-050); color: var(--blue); }
.ai-tag-navy  { background: rgba(var(--navy-rgb), .1); color: var(--navy); }
.ai-tag-grey  { background: var(--paper-3); color: var(--muted); }
.ai-tag-amber { background: var(--warn-050); color: var(--warn); }
.ai-tag-red   { background: var(--stop-050); color: var(--danger); }

.ai-row-summary { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; font-size: 12px; color: var(--blue); }
.ai-row-summary i { margin-top: 2px; color: var(--pink); font-size: 11px; }

.inbox-detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* AI triage panel + reply draft modal (inbox) */
.ai-panel-summary { margin-bottom: 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.ai-panel-action { margin-bottom: 12px; font-size: 13px; color: var(--body); }
.ai-rerun-btn { margin-top: 4px; }
.ai-draft-notice {
  display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px;
  background: var(--pink-050); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 12.5px; color: var(--ink-soft);
}
.ai-draft-notice i { margin-top: 2px; color: var(--pink); }

/* "Write this sequence with AI" banner (sequence editor, Steps tab) */
.ai-write-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px 28px; margin-bottom: 20px;
}
.ai-write-banner-text { flex: 1; min-width: 0; }
.ai-write-banner-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); }
.ai-write-banner-title i { color: var(--pink); }
.ai-write-banner-body { max-width: 520px; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* Per-step / per-variant AI menu dropdown */
.ai-menu { position: relative; display: inline-block; }
.ai-menu-caret { margin-left: 2px; font-size: 9px; }
.ai-menu-list {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  min-width: 210px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.ai-menu.open .ai-menu-list { display: block; }
.ai-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px;
  border: none; background: none; border-radius: 6px; text-align: left;
  font-size: 13px; color: var(--body); cursor: pointer;
}
.ai-menu-item:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.ai-menu-item:disabled { opacity: .5; cursor: not-allowed; }
.ai-menu-item i { width: 14px; font-size: 12px; color: var(--pink); }

/* Deliverability check modal: score dial, grouped issues, wins */
.ai-deliverability { display: flex; flex-direction: column; }
.ai-score-dial { display: block; }
.ai-deliverability-top { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.ai-deliverability-verdict-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ai-deliverability-verdict-text { margin-top: 3px; font-size: 17px; font-weight: 700; color: var(--ink); }
.ai-deliverability-verdict-text::first-letter { text-transform: uppercase; }
.ai-score-group-title { margin: 16px 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ai-issue { margin-bottom: 8px; padding: 10px 14px; background: var(--paper-3); border-left: 4px solid var(--line); border-radius: 0 8px 8px 0; }
.ai-issue-high { border-left-color: var(--danger); }
.ai-issue-medium { border-left-color: var(--warn); }
.ai-issue-low { border-left-color: var(--muted); }
.ai-issue-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.ai-issue-fix { margin-top: 3px; font-size: 12.5px; color: var(--body); }
.ai-wins { margin-top: 18px; }
.ai-wins-title { margin-bottom: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ai-wins ul { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ai-wins li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ok); }
.ai-wins li i { margin-top: 2px; }

/* Subject line suggestions modal */
.ai-subject-list { display: flex; flex-direction: column; }
.ai-subject-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ai-subject-row:last-child { border-bottom: none; }
.ai-subject-text { flex: 1; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.ai-subject-text:hover { color: var(--pink-dark); text-decoration: underline; }

/* ICP score column (contacts table) */
.icp-bar-wrap { display: flex; align-items: center; gap: 8px; }
.icp-bar { flex-shrink: 0; width: 64px; height: 6px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.icp-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--blue-400)); }
.icp-bar-num { font-size: 12px; font-weight: 700; color: var(--ink); }

/* Merge-field preflight check (sequence activation modal) -- one block
   per missing token, a 6px pink-to-blue progress bar, and a warning
   line for a token that isn't a real merge field. */
.preflight-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.preflight-row:first-child { padding-top: 0; }
.preflight-row:last-child { border-bottom: none; padding-bottom: 0; }
.preflight-row strong { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 13.5px; }
.preflight-bar { height: 6px; border-radius: 99px; background: var(--paper-3); overflow: hidden; margin-top: 8px; }
.preflight-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--blue-400)); }
.preflight-unknown {
  margin: 0 0 8px;
  padding: 8px 12px; background: var(--warn-050); border-left: 3px solid var(--warn);
  border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Late corrections after looking at the real screens.
   -------------------------------------------------------------------------- */

/* The inbox filter row: keep the switch label on one line and let the select
   take the remaining room, rather than the label wrapping to two lines. */
.inbox-toolbar-row { display: flex; align-items: center; gap: 10px; }
.inbox-toolbar-row select { flex: 1 1 auto; min-width: 0; }
.inbox-toolbar-row .text-sm { white-space: nowrap; }

/* An email body in the sequence editor is prose, so give it prose spacing
   instead of the tight default the browser applies inside a contenteditable. */
.step-body-editor p { margin: 0 0 12px; }
.step-body-editor p:last-child { margin-bottom: 0; }
