/* ── Millarde Team — dual theme: Atelier (light, default) + Rust (dark) ── */
/* Light = original Atelier (warm cream/gold). Dark = Rust (charcoal/rust-orange),
   enabled via :root[data-theme="dark"] (boot script sets data-theme from
   localStorage 'millarde-theme'; default is dark). Token names are identical
   in both blocks. The --ios-* tokens serve the JS-rendered admin/analytics
   panels and inline styles, which used Apple-palette colors pre-Rust — their
   light values restore that palette. */

:root {
  /* Surfaces */
  --bg:          #faf7f0;
  --sidebar:     #f3efe3;
  --card:        #ffffff;
  --elev:        #efeadb;
  --border:      rgba(38,34,26,.10);
  --border-soft: rgba(38,34,26,.07);

  /* Text */
  --text:        #26221a;
  --text-body:   #3c372c;
  --text-2:      #5c5646;
  --text-3:      #8a8270;
  --text-muted:  #a49b85;

  /* Accent (refined gold) */
  --accent:        #8f7420;
  --accent-bright: #c9a227;
  --accent-deep:   #6f5a12;
  --accent-tint:   #ece2c6;
  --accent-grad:   linear-gradient(135deg,#c9a227,#8f7420);

  /* Status */
  --green:      #3a9e6e;
  --green-tint: #e7f3ec;
  --rose:       #b23a6b;
  --rose-tint:  #fdf3f5;
  --away:       #dd9a26;
  --away-text:  #b07a14;
  --away-tint:  rgba(221,154,38,.14);
  --blue:       #0284c7;
  --blue-tint:  rgba(2,132,199,.1);

  /* Role tokens (borders/washes/handles derived from the palette) */
  --hover:              rgba(38,34,26,.04);
  --scrim:              rgba(38,34,26,.3);
  --accent-border:      rgba(143,116,32,.35);
  --accent-border-soft: rgba(143,116,32,.2);
  --accent-wash:        rgba(236,226,198,.5);
  --badge-bg:           rgba(201,162,39,.12);
  --badge-border:       rgba(201,162,39,.4);
  --away-border:        rgba(221,154,38,.35);
  --rose-border:        rgba(178,58,107,.25);
  --rose-wash:          rgba(178,58,107,.08);
  --blue-border:        rgba(2,132,199,.2);
  --handle:             #ddd6c0;

  /* Apple-palette UI (JS-rendered panels + inline styles) */
  --ios-text:       #1d1d1f;
  --ios-gray:       #86868b;
  --ios-gray-2:     #636366;
  --ios-gray-3:     #8e8e93;
  --ios-panel:      #f5f5f7;
  --ios-hover:      #f0f0f5;
  --ios-line:       #d2d2d7;
  --ios-line-soft:  #e5e5ea;
  --ios-green:      #34c759;
  --ios-green-tint: rgba(52,199,89,.15);
  --ios-red:        #ff3b30;
  --ios-red-tint:   rgba(255,59,48,.15);
  --ios-orange:     #ff9500;
  --ios-blue:       #007AFF;
  --ios-select:     #e3f2fd;
  --ios-gray-tint:  rgba(134,134,139,.15);
  --purple:         #5856d6;
  --purple-2:       #af52de;
  --purple-tint:    rgba(175,130,255,.15);

  /* Shadows */
  --shadow-card:     0 2px 8px rgba(38,34,26,.06);
  --shadow-composer: 0 4px 16px rgba(38,34,26,.06);
  --shadow-btn:      0 2px 8px rgba(143,116,32,.3);
  --shadow-popover:  0 12px 40px rgba(38,34,26,.15);
  --shadow-modal:    0 24px 64px rgba(38,34,26,.3);

  /* Fonts */
  --font-display: "Sora", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;
  --font-body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

:root[data-theme="dark"] {
  /* Surfaces */
  --bg:          #1E2020;
  --sidebar:     #171919;
  --card:        #262A2A;
  --elev:        #2E3333;
  --border:      rgba(246,234,224,.12);
  --border-soft: rgba(246,234,224,.08);

  /* Text */
  --text:        #F6EAE0;
  --text-body:   #E9DCCF;
  --text-2:      #B8AEA2;
  --text-3:      #8F887C;
  --text-muted:  #6E6A62;

  /* Accent (rust orange) */
  --accent:        #CE422B;
  --accent-bright: #E8573C;
  --accent-deep:   #F0704F;
  --accent-tint:   rgba(206,66,43,.18);
  --accent-grad:   linear-gradient(135deg,#CE422B,#B03622);

  /* Status */
  --green:      #5FA36F;
  --green-tint: rgba(95,163,111,.15);
  --rose:       #D64541;
  --rose-tint:  rgba(214,69,65,.14);
  --away:       #E0A030;
  --away-text:  #E8B04A;
  --away-tint:  rgba(224,160,48,.14);
  --blue:       #4A9EDB;
  --blue-tint:  rgba(74,158,219,.14);

  /* Role tokens (borders/washes/handles derived from the palette) */
  --hover:              rgba(246,234,224,.04);
  --scrim:              rgba(0,0,0,.5);
  --accent-border:      rgba(206,66,43,.35);
  --accent-border-soft: rgba(206,66,43,.2);
  --accent-wash:        rgba(206,66,43,.30);
  --badge-bg:           rgba(206,66,43,.12);
  --badge-border:       rgba(206,66,43,.4);
  --away-border:        rgba(224,160,48,.35);
  --rose-border:        rgba(214,69,65,.25);
  --rose-wash:          rgba(214,69,65,.08);
  --blue-border:        rgba(74,158,219,.2);
  --handle:             #3A3F3F;

  /* Apple-palette UI (JS-rendered panels + inline styles) */
  --ios-text:       #F6EAE0;
  --ios-gray:       #B8AEA2;
  --ios-gray-2:     #8F887C;
  --ios-gray-3:     #6E6A62;
  --ios-panel:      #1E2020;
  --ios-hover:      rgba(246,234,224,.08);
  --ios-line:       #3A3F3F;
  --ios-line-soft:  rgba(246,234,224,.12);
  --ios-green:      #5FA36F;
  --ios-green-tint: rgba(95,163,111,.15);
  --ios-red:        #D64541;
  --ios-red-tint:   rgba(214,69,65,.15);
  --ios-orange:     #E0A030;
  --ios-blue:       #CE422B;
  --ios-select:     rgba(74,158,219,.14);
  --ios-gray-tint:  rgba(184,174,162,.15);
  --purple:         #9B7EDE;
  --purple-2:       #9B7EDE;
  --purple-tint:    rgba(155,126,222,.15);

  /* Shadows */
  --shadow-card:     0 2px 8px rgba(0,0,0,.35);
  --shadow-composer: 0 4px 16px rgba(0,0,0,.35);
  --shadow-btn:      0 2px 8px rgba(206,66,43,.35);
  --shadow-popover:  0 12px 40px rgba(0,0,0,.5);
  --shadow-modal:    0 24px 64px rgba(0,0,0,.6);

  /* Fonts */
  --font-display: "Sora", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;
  --font-body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font-body); font-size: 15px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

::selection { background: var(--accent-tint); color: var(--accent); }

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

button, input, textarea, select { font-family: inherit; }
input, textarea, select { color: var(--text); }

/* ── Login ── */
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--bg); }
.login-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 18px; padding: 48px 40px; width: 380px; box-shadow: var(--shadow-popover); text-align: center; }
.login-logo { margin-bottom: 16px; }
.login-card h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 28px; color: var(--text); }
.form-group { margin-bottom: 14px; }
.form-group input, .select-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; background: var(--card); outline: none; transition: border-color 0.2s; color: var(--text); }
.form-group input:focus, .select-input:focus { border-color: var(--accent); }
.form-error { color: var(--rose); font-size: 13px; margin-bottom: 12px; }
.btn-primary { width: 100%; padding: 12px; border: none; border-radius: 999px; background: var(--accent-grad); color: #fff; font-family: var(--font-display); font-size: 15px; font-weight: 600; cursor: pointer; transition: filter 0.15s; box-shadow: var(--shadow-btn); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { background: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.btn-small { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; }

/* ── App Layout ── */
.app-layout { display: flex; height: 100vh; overflow: hidden; position: relative; }

/* ── Nav Sidebar (216px app sidebar) ── */
.nav-rail { width: 216px; min-width: 216px; background: var(--sidebar); border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; align-items: stretch; padding: 14px 10px 10px; }
.nav-rail-top { margin-bottom: 10px; padding: 2px 4px 0; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-rail-title { min-width: 0; }
.nav-rail-app { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.nav-rail-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-rail-tabs { flex: 1; display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0; }
.nav-rail-bottom { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 8px 0 0; }
.nav-tab { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; border: none; background: transparent; color: var(--text-2); cursor: pointer; border-radius: 10px; transition: background 0.15s, color 0.15s; font-size: 13.5px; width: 100%; text-align: left; }
.nav-tab svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .75; stroke-width: 2; }
.nav-tab:hover { background: var(--hover); color: var(--text); }
.nav-tab.active { background: var(--accent-tint); color: var(--accent-deep); font-weight: 600; }
.nav-tab.active svg { opacity: 1; stroke: var(--accent-deep); }
.nav-rail-note { margin-top: 8px; background: var(--elev); border-radius: 10px; padding: 10px 12px; font-size: 11px; line-height: 1.5; color: var(--text-3); }
.nav-rail-note a { color: var(--accent); font-weight: 600; text-decoration: none; }
.nav-rail-note a:hover { text-decoration: underline; }

/* ── Main Views ── */
.main-view { flex: 1; display: flex; overflow: hidden; background: var(--bg); }

/* ── Contact List Pane (296px) ── */
.contact-list-pane { width: 296px; min-width: 296px; background: var(--bg); border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; }
.contact-list-header { padding: 16px 14px 12px; border-bottom: 1px solid var(--border-soft); }
.contact-list-header h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.search-input { width: 100%; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; background: var(--card); outline: none; box-shadow: var(--shadow-card); }
.search-input:focus { border-color: var(--accent); }
.contact-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.contact-item { display: flex; align-items: flex-start; padding: 10px 12px; margin: 2px 8px; cursor: pointer; border-radius: 10px; transition: background 0.15s; gap: 10px; position: relative; }
.contact-item:hover { background: var(--hover); }
.contact-item.active { background: var(--accent-tint); }
.contact-item.active .contact-time, .contact-item.active .contact-subtitle { color: var(--text-3); }
.contact-unread { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); flex-shrink: 0; margin-top: 7px; }
.contact-unread.hidden { visibility: hidden; }
.contact-item.active .contact-unread { background: var(--accent); }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-subtitle { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.list-pager { display: flex; justify-content: center; gap: 8px; padding: 8px; border-top: 1px solid var(--border-soft); }
.list-pager button { padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 12px; cursor: pointer; }
.list-pager button.active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.list-pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Message Pane ── */
.message-pane { flex: 1; display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
.message-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--border-soft); background: var(--bg); min-height: 56px; }
.message-header-left { display: flex; align-items: center; min-width: 0; }
.message-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.message-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.message-list { flex: 1; overflow-y: auto; padding: 16px 24px; background: var(--bg); }
.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-3); font-size: 15px; }

/* Chat bubbles — inbound card, outbound accent tint */
.msg-bubble-row { display: flex; margin-bottom: 4px; gap: 8px; align-items: flex-end; }
.msg-bubble-row.outbound { justify-content: flex-end; }
.msg-bubble-row.inbound { justify-content: flex-start; }
.msg-bubble-row > div { max-width: 70%; }
.msg-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4; word-break: break-word; white-space: pre-wrap; }
.msg-bubble.sms.outbound { background: var(--accent-tint); color: var(--text-body); border-bottom-right-radius: 5px; }
.msg-bubble.sms.inbound { background: var(--card); color: var(--text-body); border: 1px solid var(--border-soft); box-shadow: var(--shadow-card); border-bottom-left-radius: 5px; }
.msg-bubble.email.outbound { background: var(--card); color: var(--text-body); border: 1px solid var(--border-soft); box-shadow: var(--shadow-card); border-bottom-right-radius: 5px; }
.msg-bubble.email.inbound { background: var(--card); color: var(--text-body); border: 1px solid var(--border-soft); box-shadow: var(--shadow-card); border-bottom-left-radius: 5px; }
.msg-channel-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; color: var(--text-muted); font-weight: 600; }
.msg-bubble-row.outbound .msg-channel-tag { text-align: right; }
.msg-time { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; text-align: right; }
.msg-bubble-row.inbound .msg-time { text-align: left; }
.msg-date-divider { display: flex; align-items: center; gap: 12px; text-align: center; color: var(--text-muted); font-size: 11px; font-weight: 600; margin: 16px 0 8px; }
.msg-date-divider::before, .msg-date-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
/* Inline images in SMS bubbles */
.msg-inline-img { max-width: 100%; max-height: 300px; border-radius: 12px; margin: 6px 0; display: block; cursor: pointer; }
.msg-inline-img:hover { opacity: 0.9; }
.msg-bubble a { display: block; }

/* 24px sender/contact avatars at the outer edge of bubble rows and in email headers */
.msg-avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: inline-flex; }
.msg-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-avatar-ini { width: 100%; height: 100%; border-radius: 50%; background: var(--accent-tint); color: var(--accent-deep); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.email-msg-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.email-msg-sender { font-size: 11px; font-weight: 600; color: var(--text-2); }

/* Internal notes — staff-only, centered tinted card with dashed border */
.msg-note-card { max-width: 85%; margin: 10px auto; padding: 10px 14px; border: 1px dashed var(--away); background: var(--away-tint); border-radius: 12px; text-align: center; }
.msg-note-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--away-text); margin-bottom: 4px; }
.msg-note-body { font-size: 13.5px; line-height: 1.45; color: var(--text-body); white-space: pre-wrap; word-break: break-word; text-align: left; }
.msg-note-meta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: 10.5px; color: var(--text-muted); }

/* Note composer toggle — accent tint when active so it's obvious this isn't client-facing */
.compose-channel.compose-note-toggle.active { background: var(--away-tint); color: var(--away-text); box-shadow: none; }

/* Compose — r16 card with accent-gradient send circle */
.message-compose { margin: 0 20px 18px; padding: 10px 14px 12px; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-composer); }
.compose-toggle { display: flex; gap: 2px; margin-bottom: 8px; border-radius: 999px; border: none; padding: 2px; background: var(--elev); width: fit-content; }
.compose-channel { padding: 5px 16px; border: none; background: transparent; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-3); transition: all 0.15s; }
.compose-channel.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-card); }
.email-subject-row { margin-bottom: 8px; }
.subject-input { width: 100%; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; outline: none; background: var(--card); }
.subject-input:focus { border-color: var(--accent); }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row textarea { flex: 1; padding: 8px 6px; border: none; border-radius: 12px; font-size: 14px; resize: none; outline: none; max-height: 120px; font-family: inherit; line-height: 1.4; background: transparent; color: var(--text); }
.btn-send { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--accent-grad); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: filter 0.15s; box-shadow: var(--shadow-btn); }
.btn-send svg { width: 16px; height: 16px; }
.btn-send:hover { filter: brightness(1.06); }

/* ── Detail Pane (308px, white r14 cards) ── */
.detail-pane { width: 308px; min-width: 308px; background: var(--bg); border-left: 1px solid var(--border-soft); overflow-y: auto; padding: 16px 14px; }
.detail-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); }
.detail-section { margin-bottom: 12px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); padding: 12px 14px; }
.detail-pane > .detail-section:first-child { background: transparent; border: none; box-shadow: none; padding: 2px 6px 10px; }
.detail-section h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.detail-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.detail-field { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.detail-field:last-child { border-bottom: none; }
.detail-field .label { color: var(--text-3); }
.detail-field .value { font-weight: 500; text-align: right; max-width: 60%; word-break: break-all; color: var(--text); }
.detail-field .value a { color: var(--accent); text-decoration: none; }
.note-item { padding: 10px; background: var(--bg); border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--border-soft); }
.note-item .note-body { font-size: 13px; line-height: 1.4; white-space: pre-wrap; color: var(--text-body); }
.note-item .note-date { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.opp-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.opp-badge.open { background: var(--green-tint); color: var(--green); }
.opp-badge.won { background: var(--accent-tint); color: var(--accent-deep); }
.opp-badge.lost { background: var(--rose-tint); color: var(--rose); }
.opp-badge.abandoned { background: var(--elev); color: var(--text-3); }
.outcome-history-item { padding: 10px; background: var(--bg); border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--border-soft); }
.outcome-status-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.outcome-status-badge.APPROVED { background: var(--green-tint); color: var(--green); }
.outcome-status-badge.REJECTED { background: var(--rose-tint); color: var(--rose); }
.outcome-status-badge.OPT-OUT { background: var(--away-tint); color: var(--away-text); }
.outcome-status-badge.HOLD { background: var(--blue-tint); color: var(--blue); }
.outcome-status-badge.INCOMPLETE { background: var(--elev); color: var(--text-3); }
.outcome-status-badge.NO-SHOW { background: var(--rose-tint); color: var(--rose); }
.rating-stars-display { color: var(--accent-bright); font-size: 13px; letter-spacing: 1px; }

/* ── Next Steps Dropdown ── */
.next-steps-wrapper { position: relative; }
.btn-next-steps { padding: 8px 16px; border: 1px solid var(--accent); border-radius: 999px; background: var(--card); color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-next-steps:hover { background: var(--accent-tint); }
.next-steps-dropdown { display: none; position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-popover); overflow: hidden; z-index: 100; min-width: 180px; }
.next-steps-dropdown.open { display: block; }
.next-steps-dropdown button { display: block; width: 100%; padding: 10px 16px; border: none; background: transparent; text-align: left; font-size: 14px; color: var(--text-body); cursor: pointer; transition: background 0.1s; }
.next-steps-dropdown button:hover { background: var(--hover); }

/* ── Modals ── */
.modal-overlay { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.modal-content { background: var(--card); border-radius: 18px; max-width: 520px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-modal); }
.modal-content.modal-outcome { max-width: 560px; }
.modal-content.modal-small { max-width: 400px; padding: 24px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.modal-header h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0; }
.modal-close { width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--elev); color: var(--text-3); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.modal-close:hover { background: var(--accent-tint); color: var(--accent-deep); }

/* Outcome steps */
.outcome-step { padding: 0 24px 24px; }
.outcome-step .modal-header { padding: 20px 0 12px; }
.outcome-choice { display: flex; gap: 12px; margin-top: 12px; }
.btn-choice { flex: 1; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-showed:hover { border-color: var(--green); background: var(--green-tint); }
.btn-noshow:hover { border-color: var(--rose); background: var(--rose-tint); }

/* Rating form */
.rating-form { margin-top: 8px; }
.rating-category { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.rating-category:last-of-type { border-bottom: none; }
.rating-cat-header h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.rating-desc { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.star-picker { display: flex; gap: 4px; }
.star-picker .star { width: 32px; height: 32px; cursor: pointer; font-size: 24px; color: var(--elev); transition: color 0.1s; user-select: none; }
.star-picker .star.filled { color: var(--accent-bright); }
.star-picker .star:hover { color: var(--accent-bright); }
.rating-comment { margin-top: 8px; }
.rating-comment textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; resize: vertical; min-height: 60px; font-family: inherit; outline: none; background: var(--card); }
.rating-comment textarea:focus { border-color: var(--accent); }
.char-count { font-size: 11px; color: var(--text-3); float: right; margin-top: 4px; }

/* Confirm form */
.confirm-form { padding: 0 0 4px; }
.confirm-status { padding: 12px; background: var(--elev); border-radius: 10px; margin-bottom: 16px; font-size: 14px; text-align: center; color: var(--text-body); }
.confirm-form textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; resize: vertical; font-family: inherit; outline: none; margin-bottom: 16px; background: var(--card); }

/* ── Calendar ── */
.calendar-container { flex: 1; padding: 24px; overflow-y: auto; }
.calendar-header { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 20px; }
.calendar-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; min-width: 200px; text-align: center; }
.cal-nav-btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 14px; cursor: pointer; transition: all 0.15s; }
.cal-nav-btn:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.cal-dow { padding: 10px; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: var(--elev); text-transform: uppercase; letter-spacing: .07em; }
.cal-day { background: var(--card); min-height: 90px; padding: 8px; cursor: pointer; transition: background 0.1s; position: relative; }
.cal-day:hover { background: var(--bg); }
.cal-day.empty { background: var(--bg); cursor: default; }
.cal-day.empty:hover { background: var(--bg); }
.cal-day .day-num { font-size: 13px; font-weight: 600; color: var(--text); }
.cal-day.today .day-num { color: var(--accent); }
.cal-day .day-count { position: absolute; top: 8px; right: 8px; background: var(--accent-grad); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 999px; }
.cal-day .day-events { margin-top: 4px; display: grid; grid-template-columns: repeat(8, 6px); gap: 1px; overflow-y: auto; max-height: 48px; }
.cal-event-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); margin: 1px; }
.cal-event-dot.canceled { background: var(--rose); }

/* Calendar modal */
.cal-event-item { padding: 10px; border-bottom: 1px solid var(--border-soft); }
.cal-event-item:last-child { border-bottom: none; }
.cal-event-name { font-weight: 600; font-size: 14px; }
.cal-event-time { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cal-event-type { font-size: 11px; color: var(--accent); }
.cal-event-status { font-size: 11px; padding: 2px 6px; border-radius: 999px; display: inline-block; margin-top: 4px; }
.cal-event-status.canceled { background: var(--rose-tint); color: var(--rose); }
.cal-event-status.noshow { background: var(--away-tint); color: var(--away-text); }

/* ── Admin ── */
.admin-container { flex: 1; padding: 24px; overflow-y: auto; max-width: 900px; margin: 0 auto; }
.admin-tabs { display: flex; gap: 2px; margin-bottom: 24px; border-radius: 999px; border: none; padding: 2px; background: var(--elev); width: fit-content; }
.admin-tab { padding: 8px 18px; border: none; background: transparent; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-3); transition: all 0.15s; }
.admin-tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-card); }

/* User cards */
.user-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-card); margin-bottom: 8px; }
.user-card-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.user-card-name { font-weight: 600; font-size: 14px; }
.user-card-meta { font-size: 12px; color: var(--text-3); }
.user-card-actions { display: flex; gap: 8px; }
.user-card-actions button { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 12px; cursor: pointer; }
.user-card-actions button:hover { background: var(--hover); }
.user-card-actions .btn-view-as { border-color: var(--accent); color: var(--accent); }

/* Logs */
.log-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.log-time { color: var(--text-3); white-space: nowrap; flex-shrink: 0; font-family: var(--font-mono); font-size: 11.5px; }
.log-user { font-weight: 600; flex-shrink: 0; }
.log-action { flex: 1; }
.log-action-type { display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--elev); color: var(--text-2); margin-right: 4px; }

/* Assign form */
.assign-form { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.assign-form .search-input { width: 250px; }
.assign-form .select-input { width: 200px; }
.assign-result-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.assign-result-item:hover { background: var(--bg); }

/* View-as banner */
.view-as-banner { position: fixed; top: 0; left: 216px; right: 0; background: var(--away); color: #fff; padding: 8px 20px; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 13px; font-weight: 600; z-index: 500; }
.view-as-banner .btn-small { background: rgba(255,255,255,0.25); border-color: transparent; color: #fff; }

/* ── Scrollbar (8px, theme thumb) ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ── Spinner ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Message View Tabs (segmented) ── */
.msg-view-tabs { display: flex; gap: 2px; border-radius: 999px; border: none; padding: 2px; background: var(--elev); }
.msg-view-tab { padding: 5px 14px; border: none; background: transparent; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-3); transition: all 0.15s; }
.msg-view-tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-card); }

/* ── Email Thread View ── */
.email-thread-list { padding: 12px; }
.email-thread-item { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); margin-bottom: 8px; overflow: hidden; cursor: pointer; transition: border-color 0.15s; }
.email-thread-item:hover { border-color: var(--accent-border); }
.email-thread-item.expanded { border-color: var(--accent-border); }
.email-thread-header { display: flex; align-items: center; padding: 12px 14px; gap: 10px; }
.email-thread-indicator { width: 4px; height: 32px; border-radius: 2px; background: var(--accent-bright); flex-shrink: 0; }
.email-thread-indicator.inbound { background: var(--green); }
.email-thread-info { flex: 1; min-width: 0; }
.email-thread-subject { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-thread-preview { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.email-thread-meta { text-align: right; flex-shrink: 0; }
.email-thread-date { font-size: 10.5px; color: var(--text-muted); }
.email-thread-count { font-size: 10px; font-family: var(--font-mono); background: var(--elev); color: var(--text-2); padding: 1px 6px; border-radius: 999px; margin-top: 2px; display: inline-block; }
.email-thread-body { border-top: 1px solid var(--border-soft); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.email-thread-item.expanded .email-thread-body { max-height: 2000px; }
.email-msg { padding: 14px; border-bottom: 1px solid var(--border-soft); }
.email-msg:last-child { border-bottom: none; }
.email-msg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.email-msg-dir { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.email-msg-dir.outbound { background: var(--accent-tint); color: var(--accent-deep); }
.email-msg-dir.inbound { background: var(--green-tint); color: var(--green); }
.email-msg-time { font-size: 10.5px; color: var(--text-muted); }
.email-msg-content { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--text-body); }
.email-reply-bar { padding: 12px 14px; border-top: 1px solid var(--border-soft); background: var(--bg); }
.email-reply-bar textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; resize: vertical; min-height: 60px; font-family: inherit; outline: none; background: var(--card); }
.email-reply-bar textarea:focus { border-color: var(--accent); }
.email-reply-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.email-reply-actions button { padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-reply { border: none; background: var(--accent-grad); color: #fff; box-shadow: var(--shadow-btn); }
.btn-reply:hover { filter: brightness(1.06); }
.btn-reply:disabled { background: var(--text-muted); box-shadow: none; }

/* Admin panel header */
.admin-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-panel-header h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }

/* Admin: AI Screening */
.screening-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.screening-stat { background: var(--card); border: 1px solid var(--border-soft); box-shadow: var(--shadow-card); border-radius: 12px; padding: 10px 16px; min-width: 100px; }
.screening-stat-value { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
.screening-stat-pct { font-size: 12px; font-weight: 500; color: var(--text-3); }
.screening-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 2px; }
.screening-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.screening-filters .select-input { width: auto; padding: 8px 12px; font-size: 13px; }
.screening-card { background: var(--card); border: 1px solid var(--border-soft); box-shadow: var(--shadow-card); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.screening-card.disagree { border-color: var(--away); }
.screening-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.screening-source { background: var(--elev); color: var(--text-2); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; }
.screening-chip { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.screening-chip.chip-pass { background: var(--green-tint); color: var(--green); }
.screening-chip.chip-dq { background: var(--rose-tint); color: var(--rose); }
.screening-date { margin-left: auto; font-size: 12px; color: var(--text-3); }
.screening-client { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); margin-bottom: 8px; }
.screening-summary { font-size: 13px; color: var(--text-body); margin-bottom: 8px; }
.screening-flags, .screening-reasons { font-size: 12px; color: var(--text-body); margin-bottom: 4px; }
.screening-flags ul, .screening-reasons ul { margin: 4px 0 0; padding-left: 18px; }
.screening-flags li { color: var(--rose); }
.screening-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.screening-human { font-size: 12px; font-weight: 600; color: var(--accent); }
.screening-human.disagree { color: var(--away-text); }
.screening-label-btns { display: flex; gap: 8px; margin-left: auto; }
.screening-label-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-2); transition: all 0.15s; }
.screening-label-btn.pass.active { background: var(--green); border-color: var(--green); color: #fff; }
.screening-label-btn.dq.active { background: var(--rose); border-color: var(--rose); color: #fff; }
.screening-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 0; }
.screening-pager-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 13px; cursor: pointer; }
.screening-pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.screening-pager-info { font-size: 12px; color: var(--text-3); }
.screening-rules-section { margin-top: 24px; border-top: 1px solid var(--border-soft); padding-top: 16px; }
.screening-rules-section h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.screening-rules-warning { font-size: 12px; color: var(--away-text); background: var(--away-tint); border: 1px solid var(--away-border); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
#screeningRules { width: 100%; box-sizing: border-box; font-family: var(--font-mono); font-size: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); resize: vertical; }
.screening-rules-footer { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.screening-rules-meta { font-size: 12px; color: var(--text-3); }
.screening-rules-status { font-size: 12px; font-weight: 600; margin-left: auto; }
.screening-rules-status.ok { color: var(--green); }
.screening-rules-status.error { color: var(--rose); }

/* Modal small variant */
.modal-small { max-width: 380px; padding: 24px; }

/* Contact Filters */
.contact-filters { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.filter-chip {
    padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
    border: 1px solid var(--border); background: var(--card); color: var(--text-3); cursor: pointer;
    transition: all .15s; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; font-weight: 600; }

.contact-done-tag {
    display: inline-block; margin-left: 6px; font-size: 10px; color: var(--green);
    background: var(--green-tint); border-radius: 6px; padding: 1px 4px; font-weight: 600;
}

.contact-stub-tag {
    display: inline-block; margin-left: 6px; font-size: 10px; color: var(--rose);
    background: var(--rose-tint); border: 1px solid var(--rose-border); border-radius: 6px; padding: 1px 5px; font-weight: 600;
    letter-spacing: 0.2px;
}

.detail-section.stub-banner {
    background: var(--away-tint); border: 1px solid var(--away-border);
    border-radius: 14px; padding: 10px 12px; color: var(--away-text);
}

/* Template Picker Button */
.compose-template-btn {
    padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
    border: 1px solid var(--border); background: var(--card); color: var(--accent); cursor: pointer;
    transition: all .15s; margin-left: auto;
}
.compose-template-btn:hover { background: var(--accent-tint); border-color: transparent; color: var(--accent-deep); }

/* Template Picker Modal */
.modal-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow-modal); width: 90%; overflow: hidden; }

/* Template list items */
.tpl-pick-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: background .1s;
}
.tpl-pick-item:hover { background: var(--hover); margin: 0 -16px; padding: 10px 16px; }
.tpl-pick-item:last-child { border-bottom: none; }
.tpl-pick-badge {
    display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px;
    border-radius: 6px; flex-shrink: 0; margin-top: 2px; text-transform: uppercase; letter-spacing: .04em;
}
.tpl-pick-badge.sms { background: var(--green-tint); color: var(--green); }
.tpl-pick-badge.email { background: var(--blue-tint); color: var(--blue); }
.tpl-pick-name { font-size: 14px; font-weight: 500; color: var(--text); }
.tpl-pick-preview { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }

/* Email reply button in all-messages view */
.msg-reply-btn {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
    font-size: 11px; color: var(--accent); background: none; border: 1px solid var(--accent);
    border-radius: 999px; padding: 3px 10px; cursor: pointer; transition: all .15s;
}
.msg-reply-btn:hover { background: var(--accent-tint); }

/* Confirmation blobs — 9.5px 700 uppercase status pills */
.confirm-blob {
    display: inline-block; font-size: 9.5px; font-weight: 700; padding: 2px 8px;
    border-radius: 999px; line-height: 1.4; text-transform: uppercase; letter-spacing: .04em;
}
.confirm-blob.confirmed { background: var(--green-tint); color: var(--green); }
.confirm-blob.canceled { background: var(--rose-tint); color: var(--rose); }
.confirm-blob.rescheduled { background: var(--blue-tint); color: var(--blue); }
.confirm-blob.no-response { background: var(--rose-tint); color: var(--rose); }
.confirm-blob.awaiting { background: var(--away-tint); color: var(--away-text); }
.confirm-blob.pending { background: var(--elev); color: var(--text-3); }
.contact-blob-row { margin-bottom: 3px; }

/* Time pinned top-right of the contact row */
.contact-time-bottom { position: absolute; top: 12px; right: 12px; font-size: 10.5px; color: var(--text-muted); margin-top: 0; }
.contact-item.active .contact-time-bottom { color: var(--text-3); }
.contact-item.active .confirm-blob { opacity: 0.9; }
.confirm-blob.skipped { background: var(--elev); color: var(--text-3); }
.confirm-blob.error { background: var(--rose-tint); color: var(--rose); }
.confirm-blob.no-booking { background: var(--elev); color: var(--text-muted); }

/* DND & Blacklist badges */
.dnd-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--rose); color: #fff; margin-left: 6px; vertical-align: middle; }
.blacklist-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--text); color: #fff; margin-left: 6px; vertical-align: middle; }

/* Tag chips */
.tag-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; background: var(--elev); color: var(--text-2); padding: 2px 8px; border-radius: 999px; margin: 2px 4px 2px 0; white-space: nowrap; }
.tag-remove { border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 10px; padding: 0 0 0 2px; line-height: 1; }
.tag-remove:hover { color: var(--rose); }
.detail-tags-row .value { display: flex; flex-wrap: wrap; align-items: center; }
.tag-add-wrap { display: inline-flex; align-items: center; gap: 2px; margin: 2px 0; }
.tag-add-input { width: 90px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; font-size: 11px; outline: none; background: var(--card); }
.tag-add-input:focus { border-color: var(--accent); }
.tag-add-btn { border: none; background: var(--accent-grad); color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 20px; text-align: center; cursor: pointer; padding: 0; }
.tag-add-btn:hover { filter: brightness(1.06); }

/* Blacklist button */
.blacklist-btn { border: none; background: var(--rose); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.blacklist-btn:hover { filter: brightness(1.06); }

/* Tag dropdown select */
.tag-add-select { padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; font-size: 11px; outline: none; background: var(--card); color: var(--text); cursor: pointer; max-width: 140px; }
.tag-add-select:focus { border-color: var(--accent); }

/* ── Info Session Overlays ── */
.btn-conduct-session {
    background: var(--accent-grad);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
    width: 100%;
    box-shadow: var(--shadow-btn);
}
.btn-conduct-session:hover { filter: brightness(1.06); }

.is-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--scrim);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.is-overlay-content {
    background: var(--bg);
    border-radius: 18px;
    width: 94vw;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-modal);
}
.is-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.is-overlay-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}
.is-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

/* Pre-session checklist */
.is-checklist-section { margin-bottom: 24px; }
.is-checklist-section h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.is-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.is-checklist li {
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border-soft);
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-body);
}
.is-checklist li a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.is-checklist li a:hover { text-decoration: underline; }
.is-review-list li {
    padding-left: 28px;
    position: relative;
}
.is-review-list li::before {
    content: '☐';
    position: absolute;
    left: 10px;
    color: var(--text-3);
}
.is-sidebar-body .is-review-list li::before {
    content: none;
}
.is-sidebar-body .is-review-list li {
    padding-left: 0;
}

.btn-conduct {
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-display);
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: var(--accent-grad);
    color: #fff;
    transition: filter .15s;
    box-shadow: var(--shadow-btn);
}
.btn-conduct:hover { filter: brightness(1.06); }

/* 2-pane layout (legacy overlay) */
.is-2pane {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.is-pane-left {
    width: 45%;
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.is-pane-right {
    width: 55%;
    overflow-y: auto;
    padding: 20px 24px;
}
.is-script-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.is-script-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--elev);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-3);
    transition: all .15s;
}
.is-script-tab.active {
    background: var(--card);
    color: var(--accent-deep);
    box-shadow: inset 0 -2px 0 var(--accent);
}
.is-script-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.7;
}
.is-script-placeholder {
    color: var(--text-3);
    font-style: italic;
    text-align: center;
    margin-top: 40px;
}

/* Form sections — white r14 cards */
.is-form-section {
    margin-bottom: 14px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}
.is-form-section h4 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.is-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.is-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    color: var(--text-body);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.is-radio-group label:hover { background: var(--accent-tint); }
.is-radio-group input[type=radio] { accent-color: var(--accent); }
.is-outcome-group { flex-direction: column; }
.is-outcome-group label { padding: 10px 14px; }

.is-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    background: var(--card);
    transition: border-color .15s;
    box-sizing: border-box;
    color: var(--text);
}
.is-textarea:focus { outline: none; border-color: var(--accent); }

/* Casino table */
.is-casino-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}
.is-casino-table th {
    padding: 8px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.is-casino-table th:first-child { text-align: left; padding-left: 12px; }
.is-casino-table td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-body);
}
.is-casino-table td:first-child {
    text-align: left;
    font-weight: 500;
    padding-left: 12px;
}
.is-casino-table tr:hover { background: var(--hover); }
.is-casino-table input[type=radio] { accent-color: var(--accent); }

/* No-show box */
.is-noshow-box {
    margin-top: 10px;
    padding: 12px 16px;
    background: var(--away-tint);
    border-radius: 10px;
    border: 1px solid var(--away-border);
}
.is-noshow-box p { margin: 0 0 8px; font-size: 13px; color: var(--away-text); }
.btn-noshow-mark {
    background: var(--away);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-noshow-mark:hover { filter: brightness(1.06); }

/* Session overlay specific sizing */
.is-session-2pane {
    max-width: 1400px;
    width: 96vw;
    height: 92vh;
}

/* FAQ toggle button */
.is-faq-toggle-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    padding: 6px 0 8px;
    border-bottom: 1px solid var(--border-soft);
    text-align: center;
}
.is-faq-toggle-btn {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--accent);
    transition: all .15s;
}
.is-faq-toggle-btn:hover {
    background: var(--accent-tint);
}

/* Script content styling */
.is-script-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-body);
}
.is-script-content p {
    margin: 0 0 8px;
}
.is-script-content strong {
    color: var(--text);
}
.is-script-content ul {
    margin: 4px 0 12px 0;
    padding-left: 20px;
}
.is-script-content ul li {
    margin-bottom: 4px;
}
.is-script-content hr {
    border: none;
    border-top: 1px solid var(--border-soft);
    margin: 16px 0;
}
.is-script-content a {
    color: var(--accent);
    text-decoration: none;
}
.is-script-content a:hover {
    text-decoration: underline;
}
.is-script-content del {
    color: var(--text-3);
}

/* Conduct Info Session header button — accent pill */
.btn-conduct-session-header {
    background: var(--accent-grad);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
    white-space: nowrap;
    box-shadow: var(--shadow-btn);
}
.btn-conduct-session-header:hover { filter: brightness(1.06); }

/* Acknowledgment items */
.is-ack-item {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border-soft);
}
.is-ack-item p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-body);
}
.is-ack-item:last-child { margin-bottom: 0; }

/* Info Session Results */
.is-result-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.is-result-section {
    margin-bottom: 18px;
}
.is-result-section h4 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-soft);
}
.is-result-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 13px;
    gap: 12px;
}
.is-result-label {
    color: var(--text-3);
    flex-shrink: 0;
    max-width: 55%;
}
.is-result-value {
    text-align: right;
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
}
.is-res-yes {
    color: var(--green);
    font-weight: 600;
}
.is-res-no {
    color: var(--rose);
    font-weight: 600;
}
.is-res-neutral {
    color: var(--blue);
    font-weight: 600;
}
.is-result-casino-table {
    margin-bottom: 10px;
}
.is-result-casino-table th:last-child,
.is-result-casino-table td:last-child {
    text-align: right;
}
.is-result-ts {
    font-size: 12px;
    padding: 3px 0;
    color: var(--text-2);
}
.is-result-ts-time {
    color: var(--text-3);
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
}
.outcome-history-item[data-is-idx] {
    cursor: pointer;
    transition: background .15s;
    padding: 6px 8px;
    border-radius: 8px;
    margin: 0 -8px;
}
.outcome-history-item[data-is-idx]:hover {
    background: var(--bg);
}

/* Inline email thread cards in All view — white card, blue EMAIL tag */
.msg-inline-thread { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); margin: 8px 12px; overflow: hidden; transition: border-color 0.15s; }
.msg-inline-thread:hover { border-color: var(--accent-border); }
.msg-inline-thread.expanded { border-color: var(--accent-border); }
.msg-inline-thread-header { display: flex; align-items: center; padding: 12px 14px; gap: 10px; cursor: pointer; }
.msg-inline-thread-icon { font-size: 0; flex-shrink: 0; }
.msg-inline-thread-icon::before { content: 'EMAIL'; font-size: 9px; font-weight: 700; letter-spacing: .06em; color: var(--blue); background: var(--blue-tint); border: 1px solid var(--blue-border); padding: 2px 7px; border-radius: 6px; }
.msg-inline-thread-info { flex: 1; min-width: 0; }
.msg-inline-thread-subject { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-inline-thread-preview { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.msg-inline-thread-meta { text-align: right; flex-shrink: 0; }
.msg-inline-thread-time { font-size: 10.5px; color: var(--text-muted); display: block; }
.msg-inline-thread-count { font-size: 10px; font-family: var(--font-mono); background: var(--elev); color: var(--text-2); padding: 1px 7px; border-radius: 999px; margin-top: 2px; display: inline-block; }
.msg-inline-thread-chevron { font-size: 18px; color: var(--text-muted); font-weight: 300; transition: transform 0.2s; flex-shrink: 0; }
.msg-inline-thread.expanded .msg-inline-thread-chevron { transform: rotate(90deg); }
.msg-inline-thread-body { border-top: 1px solid var(--border-soft); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.msg-inline-thread.expanded .msg-inline-thread-body { max-height: 3000px; overflow-y: auto; }

/* Email thread readability */
.email-msg.older { opacity: 0.7; border-left: 2px solid var(--border); padding-left: 10px; margin-left: 4px; }
.email-msg.latest { border-left: 2px solid var(--green); padding-left: 10px; margin-left: 4px; }
.email-expand-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; margin-left: 4px; }
.email-expand-btn:hover { text-decoration: underline; }

/* Editable contact fields */
.editable-field { cursor: pointer; transition: background 0.15s, padding 0.15s; border-radius: 4px; }
.editable-field:hover { background: var(--accent-tint); padding: 2px 6px; margin: -2px -6px; }
.edit-inline-input { font-size: 13px; font-weight: 500; border: 1px solid var(--accent); border-radius: 6px; padding: 2px 6px; outline: none; width: 100%; text-align: right; background: var(--card); color: var(--text); }
.edit-save-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--border-soft); padding: 12px 16px; display: flex; justify-content: flex-end; gap: 8px; z-index: 10; }
.edit-save-btn { background: var(--accent-grad); color: #fff; border: none; border-radius: 999px; padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-btn); }
.edit-save-btn:hover { filter: brightness(1.06); }
.edit-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.edit-cancel-btn { background: var(--elev); color: var(--text-2); border: none; border-radius: 999px; padding: 8px 20px; font-size: 13px; font-weight: 500; cursor: pointer; }
.edit-cancel-btn:hover { background: var(--accent-tint); }
.msg-contact-link { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); text-decoration: none; }
.msg-contact-link:hover { text-decoration: underline; }

/* Minimize button */
.is-header-btns { display: flex; gap: 8px; align-items: center; }
.is-minimize-btn { background: none; border: none; font-size: 24px; font-weight: 700; color: var(--text-3); cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; line-height: 1; }
.is-minimize-btn:hover { background: var(--hover); color: var(--text); }
/* Minimized overlay state */
.is-overlay.is-minimized { align-items: flex-end; justify-content: flex-end; background: transparent; pointer-events: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.is-overlay.is-minimized .is-overlay-content { pointer-events: auto; position: fixed; bottom: 20px; right: 20px; width: auto; max-width: 280px; min-width: 200px; height: auto; max-height: 50px; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow-popover); cursor: pointer; transition: all 0.2s ease; }
.is-overlay.is-minimized .is-overlay-content:hover { box-shadow: var(--shadow-modal); transform: translateY(-2px); }
.is-overlay.is-minimized .is-overlay-header { padding: 12px 16px; }
.is-overlay.is-minimized .is-overlay-header h2 { font-size: 14px; }
.is-overlay.is-minimized .is-2pane { display: none; }
.is-overlay.is-minimized .is-header-btns { display: none; }

.is-noshow-warning { background: var(--away-tint); border: 1px solid var(--away-border); border-radius: 8px; padding: 8px 12px; color: var(--away-text); font-size: 12px; font-weight: 600; margin-bottom: 8px; }

/* Add Note — input + accent-tint Add */
.add-note-wrap { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.add-note-input { flex: 1; font-size: 13px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; resize: vertical; font-family: inherit; min-height: 36px; background: var(--card); color: var(--text); }
.add-note-input:focus { border-color: var(--accent); outline: none; }
.add-note-btn { background: var(--accent-tint); color: var(--accent-deep); border: none; border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: filter .15s; }
.add-note-btn:hover { filter: brightness(1.04); }
.add-note-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Stage filter dropdown */
.stage-filter-select { font-size: 11px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); cursor: pointer; max-width: 130px; }
.stage-filter-select:focus { border-color: var(--accent); outline: none; }

/* Skip rejection email toggle */
.skip-email-wrap { margin-top: 12px; padding: 10px 12px; background: var(--away-tint); border: 1px solid var(--away-border); border-radius: 8px; }
.skip-email-label { font-size: 13px; font-weight: 500; color: var(--away-text); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.skip-email-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--rose); }

/* Internal comments */
.internal-comment-item { padding: 10px 12px; margin-bottom: 8px; background: var(--bg); border-radius: 10px; border: 1px solid var(--border-soft); }
.internal-comment-item .note-body { font-size: 13px; color: var(--text-body); line-height: 1.5; }
.internal-comment-item .note-date { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* Opportunity stage rows */
.opp-stage-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-soft); gap: 8px; }
.opp-stage-row:last-child { border-bottom: none; }
.opp-pipeline-label { font-size: 12px; color: var(--text-3); font-weight: 500; min-width: 80px; }
.opp-stage-select { font-size: 13px; font-weight: 500; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); cursor: pointer; max-width: 200px; }
.opp-stage-select:focus { border-color: var(--accent); outline: none; }
.opp-stage-select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Double Bookings ── */
.db-contact-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-card); margin-bottom: 10px; overflow: hidden; transition: border-color 0.15s; }
.db-contact-card:hover { border-color: var(--accent-border); }
.db-contact-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; gap: 12px; }
.db-contact-info { flex: 1; min-width: 0; }
.db-contact-name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-contact-email { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.db-contact-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.db-count-badge { font-size: 11px; font-weight: 600; font-family: var(--font-mono); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.db-count-double { background: var(--away-tint); color: var(--away-text); }
.db-count-triple { background: var(--rose-tint); color: var(--rose); }
.db-contact-link { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 500; white-space: nowrap; }
.db-contact-link:hover { text-decoration: underline; }
.db-chevron { font-size: 18px; color: var(--text-3); transition: transform 0.2s; font-weight: 300; }
.db-contact-card.expanded .db-chevron { transform: rotate(90deg); }
.db-events-dropdown { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.db-contact-card.expanded .db-events-dropdown { max-height: 1000px; }
.db-event-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--border-soft); gap: 12px; }
.db-event-row:first-child { border-top: 1px solid var(--border-soft); }
.db-event-info { flex: 1; min-width: 0; }
.db-event-type { font-size: 14px; font-weight: 600; color: var(--text); }
.db-event-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.db-event-meta strong { color: var(--text); font-weight: 500; }
.db-cancel-btn { padding: 6px 16px; border: none; border-radius: 999px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: filter 0.15s; }
.db-cancel-btn:hover { filter: brightness(1.06); }
.db-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.db-event-type-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.db-group { margin-bottom: 8px; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); }
.db-group-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--elev); cursor: pointer; user-select: none; }
.db-group-header:hover { background: var(--accent-tint); }
.db-group-chevron { font-size: 18px; color: var(--text-3); transition: transform .2s; display: inline-block; transform: rotate(90deg); }
.db-group.collapsed .db-group-chevron { transform: rotate(0deg); }
.db-group.collapsed .db-group-body { display: none; }
.db-group-name { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.db-group-count { font-size: 13px; color: var(--text-2); background: var(--card); padding: 3px 10px; border-radius: 999px; font-family: var(--font-mono); }
.db-group-body { padding: 4px 0; background: var(--card); }
.db-group-body .db-contact-card { border-radius: 0; border-left: none; border-right: none; border-top: none; box-shadow: none; }
.db-group-body .db-contact-card:last-child { border-bottom: none; }

/* Info Session Checklist Sidebar */
.is-sidebar { width: 320px; min-width: 320px; background: var(--bg); border-left: 1px solid var(--border-soft); display: flex; flex-direction: column; overflow-y: auto; }
.is-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--border-soft); }
.is-sidebar-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0; }
.is-sidebar-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.is-sidebar-body .is-checklist-section { margin-bottom: 20px; }
.is-sidebar-body .is-checklist-section h4 { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.is-sidebar-body .is-checklist { list-style: none; padding: 0; margin: 0; }
.is-sidebar-body .is-checklist li { padding: 8px 12px; font-size: 13px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; margin-bottom: 6px; }
.is-sidebar-body .is-checklist label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.is-sidebar-body .is-checklist label a { color: var(--accent); text-decoration: none; }
.is-sidebar-body .is-checklist label a:hover { text-decoration: underline; }
.is-sidebar-check { margin-top: 2px; flex-shrink: 0; accent-color: var(--green); width: 16px; height: 16px; }
.is-sidebar-active .message-pane { max-width: calc(100% - 296px - 308px - 320px); }

/* ── Info Session Inline 3-Pane Layout ── */
.is-session-inline { display: flex; flex-direction: column; flex: 1; overflow: hidden; background: var(--bg); }
.is-session-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border-soft); background: var(--bg); }
.is-session-header-left { display: flex; align-items: center; gap: 16px; }
.is-session-header h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0; }
.is-session-contact-name { font-size: 15px; color: var(--accent); font-weight: 600; text-decoration: none; }
.is-session-contact-name:hover { text-decoration: underline; }
.btn-meet { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-tint); color: var(--blue); border: 1px solid var(--blue-border); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-meet:hover { background: var(--blue-border); }
.btn-end-session { background: var(--rose-tint); color: var(--rose); border: 1px solid var(--rose-border); border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-end-session:hover { background: var(--rose); color: #fff; border-color: var(--rose); }

.is-3pane { display: flex; flex: 1; overflow: hidden; }
.is-3pane .is-pane-left { width: 360px; min-width: 260px; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; overflow: hidden; }
.is-pane-resizer { width: 6px; flex-shrink: 0; cursor: col-resize; background: transparent; transition: background .15s; }
.is-pane-resizer:hover, .is-pane-resizer.dragging { background: var(--accent-tint); }
.is-3pane .is-pane-center { flex: 1; overflow-y: auto; padding: 20px 18px; border-right: 1px solid var(--border-soft); background: var(--bg); }
.is-3pane .is-pane-contact { width: 270px; min-width: 250px; overflow-y: auto; padding: 16px 14px; background: var(--bg); }

/* Script / FAQ segmented control — class-based active state (switchScriptTab toggles .active) */
.is-seg-row { display: flex; gap: 4px; margin: 12px 0 8px; }
.is-seg-tab {
    flex: 1; padding: 6px 0; border-radius: 9px; border: 1px solid var(--border);
    background: var(--card); color: var(--text-2); font-size: 12.5px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.is-seg-tab:hover { background: var(--sidebar); }
.is-seg-tab.active {
    background: var(--accent-grad); color: #fff; border-color: transparent;
    box-shadow: var(--shadow-btn);
}

/* Session form buttons (inline dark styles removed — plain classes now) */
#isSkipToOutcomeBtn {
    display: block; width: 100%; margin-top: 10px; padding: 7px 14px;
    border-radius: 999px; border: 1px solid var(--border); background: var(--bg);
    color: var(--text-3); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
#isSkipToOutcomeBtn:hover { background: var(--sidebar); }
#isSkipBreakupBtn {
    width: 100%; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--card); color: var(--text-body); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
#isOutcomeReason {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
    font-size: 13px; font-family: inherit; resize: vertical; box-sizing: border-box;
}
#isOutcomeReason:focus { outline: none; border-color: var(--accent); }
.is-outcome-reason-label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 5px; }
.is-required-star { color: var(--rose); }

/* Presentation Controls */
.is-presentation-bar { border-top: 1px solid var(--border-soft); padding: 12px 16px; background: var(--card); flex-shrink: 0; }
.is-presentation-btns { display: flex; gap: 8px; justify-content: center; }
.btn-presentation { background: var(--accent-grad); color: #fff; border: none; border-radius: 999px; padding: 10px 24px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; box-shadow: var(--shadow-btn); }
.btn-presentation:hover { filter: brightness(1.06); }
.btn-slide-nav { background: var(--card); color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; }
.btn-slide-nav:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
#isPresentationPreview { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.is-slide-thumb { width: 120px; height: auto; border-radius: 6px; border: 1px solid var(--border-soft); }
.is-slide-counter { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-2); }

/* Session contact pane inherits detail-pane styles */

/* Filmstrip */
.is-filmstrip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.is-film-slide { flex-shrink: 0; width: 100px; cursor: pointer; border-radius: 6px; border: 2px solid transparent; position: relative; opacity: 0.6; transition: all .15s; }
.is-film-slide:hover { opacity: 0.9; }
.is-film-slide.is-film-current { border-color: var(--accent-bright); opacity: 1; }
.is-film-slide img { width: 100%; height: auto; border-radius: 4px; display: block; }
.is-film-num { position: absolute; bottom: 2px; right: 4px; font-size: 10px; font-weight: 700; font-family: var(--font-mono); color: #fff; background: rgba(0,0,0,.6); padding: 1px 5px; border-radius: 4px; }

/* Appointment cards */
.apt-card { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.apt-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.apt-name { font-size: 13px; font-weight: 600; }
.apt-badge { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.apt-canceled { background: var(--rose-tint); color: var(--rose); }
.apt-noshow { background: var(--away-tint); color: var(--away-text); }
.apt-upcoming { background: var(--blue-tint); color: var(--blue); }
.apt-shown { background: var(--green-tint); color: var(--green); }
.apt-host { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.apt-dates { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); }
.apt-dates strong { color: var(--text-body); }
.apt-cancel-reason { font-size: 11px; color: var(--rose); font-style: italic; margin-top: 4px; }
.apt-card-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); }
.apt-cancel-btn { font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--rose); background: var(--card); color: var(--rose); cursor: pointer; transition: all 0.15s; }
.apt-cancel-btn:hover { background: var(--rose); color: #fff; }
.apt-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-toggle-view { background: var(--card); color: var(--text-2); border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-toggle-view:hover { background: var(--elev); color: var(--text); }

/* Back to session small button in message header */
.btn-back-to-session-sm { background: var(--card); color: var(--accent); border: 1px solid var(--accent); padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-back-to-session-sm:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }

/* ── Todos ── */
.todos-container { padding: 24px; max-width: 900px; margin: 0 auto; width: 100%; overflow-y: auto; }
.todos-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; padding: 16px 20px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); }
.todos-header h2 { margin: 0; font-family: var(--font-display); font-size: 20px; color: var(--text); }
.todos-filter-bar { display: flex; gap: 6px; }
.todo-filter-chip {
    padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
    color: var(--text-3); font-size: 12px; cursor: pointer; transition: all .15s;
}
.todo-filter-chip.active, .todo-filter-chip:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
.todos-list { display: flex; flex-direction: column; gap: 8px; }
.todo-card {
    display: flex; justify-content: space-between; align-items: flex-start;
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-card); padding: 14px 16px;
    transition: border-color .15s;
}
.todo-card:hover { border-color: var(--accent-border); }
.todo-card.completed { opacity: 0.6; }
.todo-card-left { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.todo-body { font-size: 12px; color: var(--text-3); margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--text-3); }
.todo-meta span { display: inline-flex; align-items: center; gap: 2px; }
.todo-contact-link { color: var(--accent); text-decoration: none; }
.todo-contact-link:hover { text-decoration: underline; }
.todo-overdue { color: var(--rose) !important; font-weight: 600; }
.todo-card-actions { display: flex; gap: 6px; margin-left: 12px; flex-shrink: 0; }
.todo-complete-btn {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--green); background: transparent;
    color: var(--green); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.todo-complete-btn:hover { background: var(--green); color: #fff; }
.todo-delete-btn {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: transparent;
    color: var(--text-3); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.todo-delete-btn:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

/* Todo contact search results in modal */
.todo-contact-results { max-height: 150px; overflow-y: auto; margin-top: 4px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; }
.todo-contact-result {
    padding: 6px 10px; font-size: 13px; color: var(--text) !important; cursor: pointer; border-radius: 6px;
    transition: background .1s;
}
.todo-contact-result:hover { background: var(--hover); }
.todo-contact-result span { color: var(--text-3) !important; }
.todo-contact-selected {
    display: inline-flex; align-items: center; padding: 4px 10px; background: var(--elev);
    border-radius: 999px; font-size: 13px; color: var(--text-2); margin-top: 4px;
}

/* Contact detail todos */
.todo-detail-item {
    padding: 10px 12px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 10px; margin-bottom: 6px;
}
.todo-detail-item.completed { opacity: 0.6; }
.todo-detail-meta {
    display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--text-3); margin-top: 6px;
}
.todo-detail-meta span { display: inline-flex; align-items: center; gap: 2px; }
.todo-status-badge {
    font-size: 9.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.todo-status-badge.pending { background: var(--away-tint); color: var(--away-text); }
.todo-status-badge.completed { background: var(--green-tint); color: var(--green); }

/* ── Todo modal form fixes ── */
.form-group textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 15px; background: var(--card); outline: none; transition: border-color 0.2s;
    font-family: inherit; resize: vertical; color: var(--text);
}
.form-group textarea:focus { border-color: var(--accent); }

/* Keep todo modal text colors on the white cards */
#newTodoModal .modal-content label { color: var(--text-3); }
#newTodoModal .search-input { color: var(--text); }
#newTodoModal .select-input { color: var(--text); }
#newTodoModal .form-group input { color: var(--text); }
#newTodoError { color: var(--rose); }

/* Breakup email toggle button */
.btn-breakup-toggle:hover { background: var(--elev) !important; }
.btn-breakup-toggle.active { background: var(--rose) !important; border-color: var(--rose) !important; color: #fff !important; }
.btn-breakup-toggle.active:hover { background: var(--rose) !important; filter: brightness(1.06); }

/* ── Notifications View ── */
.notif-container { padding: 24px; max-width: 900px; margin: 0 auto; width: 100%; overflow-y: auto; }
.notif-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.notif-header h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.notif-filter-bar { display: flex; gap: 8px; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }

.notif-card {
    display: flex; align-items: flex-start; gap: 12px;
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card);
    padding: 14px 16px; transition: border-color .15s, opacity .15s;
}
.notif-card:hover { border-color: var(--accent-border); }
.notif-card-dismissed { opacity: .4; }

.notif-card-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.notif-card-body { flex: 1; min-width: 0; }
.notif-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.notif-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.notif-card-text { font-size: 12px; color: var(--text-3); margin-top: 4px; word-break: break-word; }

.notif-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    padding: 2px 8px; border-radius: 999px;
}
.notif-badge-msg { background: var(--blue-tint); color: var(--blue); }
.notif-badge-session { background: var(--away-tint); color: var(--away-text); }

.notif-time { font-size: 10.5px; color: var(--text-muted); }

.notif-card-actions { flex-shrink: 0; }
.notif-action { background: var(--elev) !important; color: var(--text-2) !important; border: none !important; }
.notif-action:hover { background: var(--accent-tint) !important; color: var(--accent-deep) !important; }

/* ── Notification Popup (top-left overlay) ── */
.notif-popup-wrap {
    position: fixed; top: 16px; left: 232px; z-index: 10000;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none; max-width: 360px;
}

.notif-popup {
    pointer-events: auto;
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--card); border: 1px solid var(--border-soft);
    border-radius: 14px; padding: 12px 14px;
    box-shadow: var(--shadow-popover);
    transition: opacity .2s, transform .2s;
    position: relative;
    animation: notifSlideIn .25s ease;
}
@keyframes notifSlideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

.notif-popup-icon { font-size: 20px; flex-shrink: 0; }
.notif-popup-content { flex: 1; min-width: 0; }
.notif-popup-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-popup-body { font-size: 11px; color: var(--text-3); margin-top: 2px; word-break: break-word; max-height: 40px; overflow: hidden; }

.notif-popup-close {
    display: none; position: absolute; top: 6px; right: 8px;
    background: none; border: none; color: var(--text-3); font-size: 18px;
    cursor: pointer; padding: 0 4px; line-height: 1;
}
.notif-popup-close:hover { color: var(--text); }
.notif-popup:hover .notif-popup-close { display: block; }

/* Handoff button */
.apt-handoff-btn { font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); cursor: pointer; transition: all 0.15s; margin-right: 4px; }
.apt-handoff-btn:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
.apt-handoff-btn:disabled { opacity: 0.6; cursor: default; border-color: var(--border); color: var(--text-3); background: var(--card); }

/* ── Time Clock ── */
.tc-container { padding: 24px; max-width: 900px; margin: 0 auto; width: 100%; overflow-y: auto; }
.tc-status-card {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 16px; box-shadow: var(--shadow-card);
    padding: 32px 24px; margin-bottom: 24px; text-align: center;
}
.tc-status-indicator { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.tc-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); }
.tc-status-dot.active { background: var(--green); animation: tcPulse 1.6s ease-in-out infinite; }
@keyframes tcPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.tc-elapsed { font-family: var(--font-mono); font-size: 34px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.tc-clock-btn {
    padding: 14px 48px; border-radius: 999px; border: none;
    font-size: 16px; font-weight: 700; font-family: var(--font-display); cursor: pointer; transition: filter 0.15s;
    background: var(--green); color: #fff;
}
.tc-clock-btn:hover { filter: brightness(1.06); }
.tc-clock-btn.clocked-in { background: var(--rose); }
.tc-clock-btn:disabled { background: var(--text-muted); cursor: not-allowed; }
.tc-note-row { width: 100%; max-width: 400px; }
.tc-section { margin-bottom: 24px; }
.tc-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding: 0 4px;
}
.tc-section-header h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); margin: 0; }
.tc-total-hours { font-size: 15px; font-weight: 700; color: var(--accent); font-family: var(--font-mono); }
.tc-week-nav { display: flex; align-items: center; gap: 8px; }
.tc-week-nav .cal-nav-btn { padding: 4px 12px; font-size: 14px; }
.tc-entries-list { display: flex; flex-direction: column; gap: 6px; }
.tc-entry-row {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; box-shadow: var(--shadow-card);
    padding: 12px 16px; transition: border-color 0.15s;
}
.tc-entry-row:hover { border-color: var(--accent-border); }
.tc-entry-left { display: flex; flex-direction: column; gap: 2px; }
.tc-entry-time { font-size: 14px; font-weight: 600; color: var(--text); }
.tc-entry-note { font-size: 12px; color: var(--text-3); }
.tc-entry-user { font-size: 12px; color: var(--accent); font-weight: 500; }
.tc-entry-duration { font-size: 14px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.tc-entry-active { color: var(--green); font-style: italic; }
.tc-week-summary { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.tc-day-card {
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px;
    padding: 10px 8px; text-align: center;
}
.tc-day-card.today { border-color: var(--accent); background: var(--accent-tint); }
.tc-day-label { font-size: 11px; color: var(--text-3); font-weight: 500; }
.tc-day-hours { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 4px; font-family: var(--font-mono); }
.tc-day-hours.zero { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════
   Rust mockup fidelity pass (2026-08) — Teams Contacts + Info Session
   Values lifted from millarde-mac/design prototype. Later rules win.
   ══════════════════════════════════════════════════════════════════ */

/* ── Sidebar nav rows: 13.5px, r10, icon 16px @ .75, mono count badges ── */
.nav-tab { padding: 8px 12px; }
.nav-tab-label { flex: 1; }
.nav-badge {
    font-family: var(--font-mono); font-size: 10px; font-weight: 600;
    padding: 1px 6px; border-radius: 999px;
    background: var(--accent-tint); color: var(--accent-deep); flex-shrink: 0;
}
.nav-badge-rose { background: var(--rose-tint); color: var(--rose); }

/* Sidebar footer note — full-bleed elev strip */
.nav-rail-note {
    margin: 10px -10px -10px; border-radius: 0; border-top: 1px solid var(--border-soft);
    background: var(--elev); padding: 10px 14px; font-size: 10.5px;
}

/* ── Contact list header: Sora 16/600 title + mono count ── */
.contact-list-header { padding: 16px 14px 10px; }
.contact-list-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.contact-list-header h2 { font-size: 16px; font-weight: 600; margin-bottom: 0; }
.contact-list-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.contact-list-header .search-input { border: 1px solid var(--border-soft); box-shadow: none; margin-bottom: 9px; }

/* Filter chips: 11.5px, gap 5px */
.contact-filters { gap: 5px; margin-top: 0; }
.filter-chip { padding: 4px 11px; font-size: 11.5px; color: var(--text-2); }
.filter-chip.active { font-weight: 600; }
.stage-filter-select { font-size: 11.5px; color: var(--text-2); }

/* Contact rows: r12, 9px 10px pad, 9px gap */
.contact-item { padding: 9px 10px; border-radius: 12px; gap: 9px; margin: 0 6px; }
.contact-list { padding: 6px 0; }
.confirm-blob { padding: 1px 7px; }
.contact-blob-row { margin-bottom: 2px; }
.contact-time-bottom { top: 10px; right: 10px; }

/* ── Thread header: 12px 20px, name + stage/presence line ── */
.message-header { padding: 12px 20px; }
.msg-contact-head { min-width: 0; overflow: hidden; }
.msg-contact-link { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-contact-stage {
    display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3);
    white-space: nowrap; margin-top: 1px;
}
.msg-contact-stage::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0;
}
.msg-contact-stage > span { overflow: hidden; text-overflow: ellipsis; }
.msg-view-tab { padding: 4px 12px; font-size: 11.5px; }
.btn-conduct-session-header { padding: 8px 16px; font-size: 12px; }

/* ── Bubbles: gap 8, outbound accent-tint w/ accent border, 10.5px meta ── */
.msg-bubble-row { margin-bottom: 8px; }
.msg-bubble.sms.outbound { border: 1px solid var(--accent-border-soft); }
.msg-date-divider span {
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 999px;
    padding: 3px 12px; font-size: 11px; font-weight: 600; color: var(--text-muted);
}

/* ── Composer: segmented + separate Template pill ── */
.compose-top-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.compose-top-row .compose-toggle { margin-bottom: 0; }
.compose-channel { padding: 3px 12px; font-size: 11px; }
.compose-template-btn {
    margin-left: 0; padding: 3px 12px; font-size: 11px; font-weight: 600;
    border: 1px solid var(--border); background: var(--card); color: var(--text-2);
}
.compose-template-btn:hover { background: var(--sidebar); border-color: var(--border); color: var(--text); }

/* ── Detail pane cards: label 11px/.08em, field rows 4px pad no hairlines ── */
.detail-section h4 { font-size: 11px; letter-spacing: .08em; }
.detail-field { padding: 4px 0; border-bottom: none; }
.detail-field .value.value-mono { font-family: var(--font-mono); font-size: 12px; }

/* Pipeline Stages: stacked pipeline label + full-width r10 select */
.opp-stage-row { display: block; padding: 0 0 10px; border-bottom: none; }
.opp-stage-row:last-child { padding-bottom: 0; }
.opp-pipeline-label { display: block; font-size: 12px; margin-bottom: 4px; }
.opp-stage-select {
    width: 100%; max-width: none; padding: 7px 10px; border-radius: 10px;
    background: var(--bg); font-size: 13px;
}

/* Notes: hairline-separated entries, accent-tint Add (r10) */
.note-item {
    background: transparent; border: none; border-top: 1px solid var(--border-soft);
    border-radius: 0; padding: 8px 0; margin-bottom: 0;
}
.note-item .note-body { font-size: 12.5px; }
.note-item .note-date { font-size: 10.5px; color: var(--text-muted); }
.add-note-wrap { gap: 6px; margin-bottom: 9px; }
.add-note-input { background: var(--bg); font-size: 12.5px; padding: 7px 11px; min-height: 32px; }
.add-note-btn { border-radius: 10px; padding: 7px 13px; font-size: 12px; }

/* Contact To-Dos: simple rows w/ checkbox-look + amber due */
.todo-detail-item {
    background: transparent; border: none; border-top: 1px solid var(--border-soft);
    border-radius: 0; padding: 8px 0; margin-bottom: 0;
}
.todo-detail-item .todo-title { font-size: 13px; font-weight: 500; color: var(--text-body); }
.todo-detail-meta { margin-top: 4px; }
.todo-detail-meta span:has(.todo-status-badge) { display: none; } /* badge redundant w/ meta */

/* ── Info Session header: 16/600 title, 13.5 contact link, 12px pills ── */
.is-session-header h2 { font-size: 16px; font-weight: 600; }
.is-session-contact-name { font-size: 13.5px; }
.btn-meet { font-size: 12px; padding: 6px 14px; }
.btn-end-session { font-size: 12px; padding: 6px 14px; }
.btn-toggle-view { padding: 6px 14px; }

/* ── Info Session 3-pane: floating columns, gap 14, pad 14px 20px ── */
.is-3pane { gap: 0; padding: 14px 20px; }
.is-3pane .is-pane-left { border-right: none; }
.is-pane-resizer { margin: 0 4px; border-radius: 3px; }
.is-3pane .is-pane-center { border-right: none; margin-right: 14px; padding: 0 4px 0 0; }
.is-3pane .is-pane-contact { width: 270px; min-width: 270px; padding: 0; }

/* Session form cards: label-style headers, plain radios */
.is-form-section { padding: 14px 16px; }
.is-form-section h4 {
    font-family: var(--font-body); font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px;
}
.is-radio-group { gap: 16px; font-size: 13.5px; }
.is-radio-group label { padding: 0; background: transparent; border: none; font-size: 13.5px; }
.is-radio-group label:hover { background: transparent; }
.is-outcome-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.is-outcome-group label { padding: 0; }

/* Casino table: no header bg, 10px labels, tighter rows */
.is-casino-table { margin-top: 0; }
.is-casino-table th { background: transparent; font-size: 10px; padding: 5px 0; width: 60px; }
.is-casino-table th:first-child { padding-left: 0; }
.is-casino-table td { padding: 6px 0; }
.is-casino-table td:first-child { padding-left: 0; }

/* Presentation card: r12 floating card, 5-thumb filmstrip, accent-tint Next */
.is-presentation-bar {
    border-top: none; border: 1px solid var(--border-soft); border-radius: 12px;
    box-shadow: var(--shadow-card); padding: 10px 11px; margin: 0 14px 14px;
}
#isPresentationPreview { display: flex; flex-direction: column; align-items: stretch; gap: 7px; margin-bottom: 9px; }
.is-slide-counter { font-size: 10.5px; color: var(--text-3); }
.is-filmstrip { gap: 6px; padding: 2px 0; }
.is-film-slide { width: 96px; border-radius: 5px; border-width: 1px; }
.is-film-slide.is-film-current { border-width: 2px; border-color: var(--accent-bright); }
.is-film-num { font-size: 10px; padding: 1px 5px; }
.btn-slide-nav { padding: 5px 0; font-size: 11.5px; }
#isNextSlide { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
#isNextSlide:hover { filter: brightness(.97); background: var(--accent-tint); color: var(--accent-deep); }

/* Session right pane: injected checklist / materials cards */
.is-session-check { accent-color: var(--accent); width: 15px; height: 15px; margin-top: 1px; flex-shrink: 0; }
.is-pane-contact .is-checklist li { background: transparent; border: none; padding: 3px 0; margin-bottom: 0; font-size: 12px; }
.is-pane-contact .is-checklist label { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; }
.is-materials-link { display: block; font-size: 12.5px; padding: 3px 0; }

/* Session pane reuses detail cards — tighten like the mockup's 270px rail */
.is-pane-contact .detail-section { padding: 13px 14px; }

/* Detail pane name header: Sora 16/600 plain (mockup) */
.detail-name { font-size: 16px; font-weight: 600; }

/* "Not in CRM" stub tag: 9px rose (mockup) */
.contact-stub-tag { font-size: 9px; padding: 0 5px; border-radius: 5px; }

/* Session pane: name section renders plain like the detail pane */
.is-contact-panel-inner > .detail-section:first-child { background: transparent; border: none; box-shadow: none; padding: 2px 6px 10px; }

/* Session left pane default width 300px (mockup; drag-resize overrides inline) */
.is-3pane .is-pane-left { width: 300px; }

/* Contact To-Dos: amber due dates (mockup), rose stays for overdue */
.todo-due { color: var(--away); font-weight: 600; }

/* Reassign select: never overflow the detail-field row (long member names) */
.detail-field .value #reassignSelect { max-width: 100%; overflow: hidden; }

/* ── Conduct Onboarding view (ob-*) — dual-theme; floating windows ported from
 * millarde-admin remoteplay.css .rp-win* (renamed .ob-win*) ── */

/* Layout: left rail (mini thread + script/slides) + scrollable main column */
.ob-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.ob-col-script { width: 360px; min-width: 260px; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 12px; padding: 14px; overflow: hidden; background: var(--sidebar); }
.ob-col-script .is-script-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ob-col-script .is-script-content { flex: 1; min-height: 0; }
.ob-col-script iframe#obScriptIframe { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.ob-col-main { flex: 1; min-width: 420px; overflow-y: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; }
.ob-col-phone { width: 380px; min-width: 320px; border-left: 1px solid var(--border-soft); overflow-y: auto; padding: 14px; background: var(--sidebar); }
.ob-card-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .02em; margin-bottom: 8px; }

/* Accent-outline pill (Copy onboarding link) */
.ob-btn-link { background: var(--card); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.ob-btn-link:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }
.ob-btn-link:disabled { opacity: .6; cursor: default; }

/* Mini conversation card (col 2, under documents) */
.ob-thread-card { flex: 1 1 auto; min-height: 260px; margin-top: 0; background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; padding: 12px; overflow: hidden; }
.ob-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 2px 6px; }
.ob-thread .msg-bubble { font-size: 12.5px; padding: 7px 11px; }
.ob-thread .msg-bubble-row > div { max-width: 85%; }
.ob-thread .msg-time { font-size: 9.5px; }
.ob-composer { flex: 0 0 auto; display: flex; gap: 6px; align-items: flex-end; margin-top: 8px; border-top: 1px solid var(--border-soft); padding-top: 8px; }
.ob-composer textarea { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 12.5px; resize: none; outline: none; max-height: 90px; font-family: inherit; line-height: 1.4; background: var(--card); color: var(--text); }
.ob-composer textarea:focus { border-color: var(--accent); }
.ob-composer .btn-send { width: 30px; height: 30px; }

/* Conversation card horizontal resizer */
.ob-h-resizer { height: 6px; flex: 0 0 auto; cursor: row-resize; background: transparent; transition: background .15s; margin: 4px 0; border-radius: 3px; }
.ob-h-resizer:hover, .ob-h-resizer.dragging { background: var(--accent-tint); }

/* Script column + presentation (filmstrip reuses .is-film-* classes) */
.ob-film-empty { font-size: 12px; color: var(--text-3); padding: 6px 2px; }

/* Documents grid */
.ob-doc-grid { flex: 0 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ob-empty { grid-column: 1 / -1; padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13.5px; background: var(--card); border: 1px dashed var(--border); border-radius: 12px; }
.ob-doc-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-card); transition: border-color .15s, box-shadow .15s; }
.ob-doc-card:hover { border-color: var(--accent-bright); box-shadow: var(--shadow-popover); }
.ob-doc-thumb { width: 100%; height: 150px; object-fit: contain; background: var(--elev); display: block; }
.ob-doc-pdf-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.ob-doc-pdf-icon { font-size: 30px; line-height: 1; }
.ob-doc-pdf-name { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-doc-pdf { flex: 1; align-self: stretch; width: 100%; min-height: 400px; border: none; border-radius: 10px; background: var(--card); display: block; }
.ob-doc-meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.ob-doc-type { font-size: 12.5px; font-weight: 600; color: var(--text); }

/* Status pills: pending gray / pass green / fail rose; • + ring = locally chosen, unsubmitted */
.ob-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ob-pill.pending { background: var(--elev); color: var(--text-3); }
.ob-pill.pass { background: var(--green-tint); color: var(--green); }
.ob-pill.fail { background: var(--rose-tint); color: var(--rose); }
.ob-pill.ob-pill-link { background: var(--accent-tint); color: var(--accent-deep); }
.ob-pill.ob-pill-chosen { outline: 2px solid var(--accent-bright); outline-offset: 1px; }

/* Offer Letter card (link-out or muted placeholder) */
.ob-offer-card { display: flex; flex-direction: column; text-decoration: none; }
a.ob-offer-card:hover { text-decoration: none; }
.ob-offer-glyph { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 44px; background: var(--elev); }
.ob-offer-muted { cursor: default; opacity: .65; }
.ob-offer-muted:hover { border-color: var(--border-soft); box-shadow: var(--shadow-card); }

/* Submit row */
.ob-docs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ob-docs-head .ob-card-title { margin-bottom: 0; }
.ob-docs-head .ob-review-status { flex: 1; }
.ob-submit-sm { width: auto !important; padding: 6px 14px !important; font-size: 12px !important; }
.ob-review-status { font-size: 12.5px; color: var(--text-3); }
.ob-review-status.ok { color: var(--green); font-weight: 600; }
.ob-review-status.error { color: var(--rose); font-weight: 600; }

/* Remote Play phone card (mount point for onboarding-phone.js) */
.ob-phone-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); padding: 14px; }
#obPhoneContainer { margin-top: 10px; }

/* Document review modal (backdrop blur via .modal-overlay) */
.ob-doc-modal { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-modal); width: 92%; max-width: 860px; height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.ob-doc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.ob-doc-modal-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); }
.ob-doc-modal-btns { display: flex; align-items: center; gap: 8px; }
.ob-doc-modal-body { flex: 1; min-height: 0; display: flex; }
.ob-pin-btn { background: var(--card); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.ob-pin-btn:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: transparent; }

/* Shared doc panel (modal body and pinned window body) */
.ob-doc-panel { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ob-doc-img-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--bg); display: flex; align-items: flex-start; justify-content: center; padding: 10px; }
.ob-doc-img-wrap img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow-card); }
.ob-verdict-bar { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-soft); background: var(--card); }
.ob-verdict-pills { display: flex; gap: 8px; }
.ob-vpill { padding: 6px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.ob-vpill.pass.on { background: var(--green-tint); border-color: var(--green); color: var(--green); }
.ob-vpill.fail.on { background: var(--rose-tint); border-color: var(--rose); color: var(--rose); }
.ob-note-wrap { border-radius: 10px; }
.ob-note-wrap.ob-fail-strip { background: var(--rose-tint); border: 1px solid var(--rose-border); padding: 8px 10px; }
.ob-fail-label { font-size: 11px; font-weight: 600; color: var(--rose); margin-bottom: 5px; }
.ob-note-input { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; font-family: inherit; resize: vertical; outline: none; background: var(--card); color: var(--text); }
.ob-note-input:focus { border-color: var(--accent); }

/* ── Floating windows (.ob-win* — port of remoteplay.css .rp-win*) ──
 * .ob-win-wrap is the fixed wrapper carrying geometry (inline left/top/w/h)
 * and the stack z-index (inline from _obWinRaise); the .ob-win card fills it.
 * ob-win-focus marks the top window (accent ring). Layer sits at z 10010…10060,
 * above .modal-overlay (10000). */
.ob-win-wrap { position: fixed; }
.ob-win-wrap > .ob-win { position: absolute; inset: 0; z-index: 1; }
.ob-win { display: flex; flex-direction: column; min-width: 280px; min-height: 360px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08); overflow: hidden; }
.ob-win.ob-win-focus,
.ob-win-wrap.ob-win-focus > .ob-win { border-color: var(--accent-bright); box-shadow: 0 16px 42px rgba(0,0,0,.20), 0 0 0 3px var(--accent-wash); }
.ob-win-title { flex: 0 0 auto; display: flex; font-family: var(--font-mono); align-items: center; gap: 6px; padding: 6px 8px 6px 10px; border-bottom: 1px solid var(--sidebar); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-body); cursor: grab; user-select: none; }
.ob-win-title:active { cursor: grabbing; }
.ob-win-badge { flex: 0 0 auto; padding: 2px 6px; border-radius: 6px; background: var(--badge-bg); border: 1px solid var(--badge-border); color: var(--accent); font-weight: 600; }
.ob-win-caption { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ob-win-btns { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; }
.ob-win-btn { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 1px 5px; font-size: 11px; line-height: 1.4; cursor: pointer; color: var(--accent); }
.ob-win-btn:hover { background: var(--accent-wash); }
.ob-win-btn.on { background: var(--accent-bright); border-color: var(--accent-bright); color: #fff; }
.ob-win-x { flex: 0 0 auto; border: none; background: transparent; border-radius: 6px; padding: 1px 6px; font-size: 13px; line-height: 1.2; cursor: pointer; color: var(--text-3); }
.ob-win-x:hover { color: var(--rose); background: var(--rose-wash); }
.ob-win-body { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; background: var(--bg); }
.ob-win-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: se-resize; }
.ob-win-resize::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px; border-right: 2px solid var(--handle); border-bottom: 2px solid var(--handle); }
.ob-win-resize:hover::after { border-color: var(--accent-bright); }

/* ── AI Coach card (info-session right rail, above contact panel) ── */
.coach-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-card); padding: 13px 14px; margin-bottom: 12px; }
.coach-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.coach-head h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; margin: 0; }
.coach-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); }
.coach-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.coach-dot.connecting { background: var(--away); animation: coach-pulse 1s infinite; }
.coach-dot.listening { background: var(--green); animation: coach-pulse 1.8s infinite; }
.coach-dot.error { background: var(--rose); }
@keyframes coach-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.coach-start-btn { width: 100%; padding: 9px 0; border: none; border-radius: 999px; background: var(--accent-grad); color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-btn); transition: filter .15s; }
.coach-start-btn:hover:not(:disabled) { filter: brightness(1.06); }
.coach-start-btn:disabled { background: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.coach-start-btn.listening { background: var(--rose-tint); color: var(--rose); border: 1px solid var(--rose-border); box-shadow: none; }
.coach-start-btn.listening:hover { background: var(--rose); color: #fff; border-color: var(--rose); }

.coach-hint { font-size: 10.5px; color: var(--text-3); line-height: 1.45; margin-top: 8px; }
.coach-hint.coach-error-text { color: var(--rose); }
.coach-unsupported { font-size: 11.5px; color: var(--text-muted); background: var(--elev); border-radius: 9px; padding: 8px 10px; margin-top: 8px; text-align: center; }

/* Live transcript: RC = accent-tint left label, Client = card; interims dimmed */
.coach-transcript { margin-top: 10px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.coach-line { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.45; }
.coach-who { flex-shrink: 0; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; margin-top: 1px; }
.coach-line.rc .coach-who { background: var(--accent-tint); color: var(--accent-deep); }
.coach-line.client .coach-who { background: var(--elev); color: var(--text-2); }
.coach-line .coach-text { flex: 1; min-width: 0; color: var(--text-body); overflow-wrap: break-word; }
.coach-line.client .coach-text { background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; padding: 5px 9px; }
.coach-line.interim { opacity: .5; }
.coach-line.interim .coach-text { font-style: italic; }

/* Nudges: amber-tint cards, kind icon prefix, per-nudge dismiss */
.coach-nudges { margin-top: 10px; }
.coach-nudges-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--away-text); margin-bottom: 6px; }
#coachNudgeList { display: flex; flex-direction: column; gap: 6px; }
.coach-nudge { display: flex; align-items: flex-start; gap: 7px; background: var(--away-tint); border: 1px solid var(--away-border); border-radius: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.4; color: var(--text-body); }
.coach-nudge-icon { flex-shrink: 0; font-size: 12px; line-height: 1.4; }
.coach-nudge-text { flex: 1; min-width: 0; overflow-wrap: break-word; }
.coach-nudge-x { flex-shrink: 0; border: none; background: transparent; color: var(--away-text); cursor: pointer; font-size: 13px; line-height: 1.2; padding: 0 2px; border-radius: 5px; }
.coach-nudge-x:hover { color: var(--rose); background: var(--rose-wash); }

/* Script-beat checklist progress: accent gradient bar */
.coach-progress { margin-top: 10px; }
.coach-progress-text { display: block; font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.coach-progress-track { height: 6px; border-radius: 999px; background: var(--elev); overflow: hidden; }
.coach-progress-fill { height: 100%; width: 0%; background: var(--accent-grad); border-radius: 999px; transition: width .4s ease; }

/* AI Coach sessions (contact detail card + review modal) */
.coach-session-item { padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 10px; margin-bottom: 6px; cursor: pointer; transition: border-color .15s; background: var(--card); }
.coach-session-item:hover { border-color: var(--accent-border); }
.coach-session-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.coach-session-date { font-size: 12px; font-weight: 600; color: var(--text); }
.coach-session-adherence { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); font-weight: 600; }
.coach-session-qual { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.coach-modal-meta { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.coach-modal-stat { font-size: 13px; color: var(--text-body); margin-bottom: 6px; }
.coach-modal-tips { font-size: 13px; color: var(--text-body); margin: 10px 0; }
.coach-modal-tips ul { margin: 4px 0 0 18px; }
.coach-modal-transcript { margin-top: 12px; border-top: 1px solid var(--border-soft); padding-top: 10px; font-size: 12.5px; line-height: 1.55; color: var(--text-body); white-space: pre-wrap; }

/* Session views (info-session / onboarding) take the full app width while
   open — the in-app nav rail hides (see _syncFocusRail in app.js). */
.app-layout.focus-session .nav-rail { display: none; }
