/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: #1d1d1f; background: #fff; -webkit-font-smoothing: antialiased; }

/* ── Login ── */
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #f5f5f7; }
.login-card { background: #fff; border-radius: 18px; padding: 48px 40px; width: 380px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); text-align: center; }
.login-logo { margin-bottom: 16px; }
.login-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 28px; color: #1d1d1f; }
.form-group { margin-bottom: 14px; }
.form-group input, .select-input { width: 100%; padding: 12px 16px; border: 1px solid #d2d2d7; border-radius: 10px; font-size: 15px; background: #f5f5f7; outline: none; transition: border-color 0.2s; }
.form-group input:focus, .select-input:focus { border-color: #007AFF; background: #fff; }
.form-error { color: #ff3b30; font-size: 13px; margin-bottom: 12px; }
.btn-primary { width: 100%; padding: 12px; border: none; border-radius: 10px; background: #007AFF; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: #0066d6; }
.btn-primary:disabled { background: #a0a0a5; cursor: not-allowed; }
.btn-small { padding: 6px 14px; border: none; border-radius: 8px; background: #007AFF; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }

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

/* ── Nav Rail ── */
.nav-rail { width: 68px; min-width: 68px; background: #f5f5f7; border-right: 1px solid #e5e5ea; display: flex; flex-direction: column; align-items: center; padding: 12px 0; }
.nav-rail-top { margin-bottom: 8px; }
.nav-rail-tabs { flex: 1; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 0 6px; }
.nav-rail-bottom { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 0 6px; }
.nav-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: none; background: transparent; color: #86868b; cursor: pointer; border-radius: 10px; transition: all 0.15s; font-size: 10px; width: 100%; }
.nav-tab svg { stroke-width: 1.8; }
.nav-tab:hover { background: #e8e8ed; color: #1d1d1f; }
.nav-tab.active { background: #007AFF; color: #fff; }
.nav-tab.active svg { stroke: #fff; }

/* ── Main Views ── */
.main-view { flex: 1; display: flex; overflow: hidden; }

/* ── Contact List Pane ── */
.contact-list-pane { width: 300px; min-width: 300px; background: #fafafa; border-right: 1px solid #e5e5ea; display: flex; flex-direction: column; }
.contact-list-header { padding: 16px; border-bottom: 1px solid #e5e5ea; }
.contact-list-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.search-input { width: 100%; padding: 8px 12px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; background: #fff; outline: none; }
.search-input:focus { border-color: #007AFF; }
.contact-list { flex: 1; overflow-y: auto; }
.contact-item { display: flex; align-items: center; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f0f0f0; transition: background 0.1s; gap: 10px; }
.contact-item:hover { background: #eef1f5; }
.contact-item.active { background: #007AFF; color: #fff; }
.contact-item.active .contact-time, .contact-item.active .contact-subtitle { color: rgba(255,255,255,0.8); }
.contact-unread { width: 8px; height: 8px; border-radius: 50%; background: #007AFF; flex-shrink: 0; }
.contact-unread.hidden { visibility: hidden; }
.contact-item.active .contact-unread { background: #fff; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-subtitle { font-size: 11px; color: #86868b; 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 #e5e5ea; }
.list-pager button { padding: 4px 12px; border: 1px solid #d2d2d7; border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; }
.list-pager button.active { background: #007AFF; color: #fff; border-color: #007AFF; }
.list-pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Message Pane ── */
.message-pane { flex: 1; display: flex; flex-direction: column; background: #fff; min-width: 0; }
.message-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #e5e5ea; background: #fafafa; min-height: 56px; }
.message-header h3 { font-size: 16px; font-weight: 600; }
.message-list { flex: 1; overflow-y: auto; padding: 16px 20px; background: #fff; }
.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: #86868b; font-size: 15px; }

/* iMessage bubbles */
.msg-bubble-row { display: flex; margin-bottom: 4px; }
.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: 18px; font-size: 14px; line-height: 1.4; word-break: break-word; white-space: pre-wrap; }
.msg-bubble.sms.outbound { background: #007AFF; color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.sms.inbound { background: #e9e9eb; color: #1d1d1f; border-bottom-left-radius: 4px; }
.msg-bubble.email.outbound { background: #34c759; color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.email.inbound { background: #f0f0f0; color: #1d1d1f; border-bottom-left-radius: 4px; }
.msg-channel-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; opacity: 0.7; }
.msg-time { font-size: 10px; color: #86868b; margin-top: 2px; text-align: right; }
.msg-bubble-row.inbound .msg-time { text-align: left; }
.msg-date-divider { text-align: center; color: #86868b; font-size: 12px; margin: 16px 0 8px; }
/* 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; }

/* Compose */
.message-compose { padding: 12px 16px; border-top: 1px solid #e5e5ea; background: #fafafa; }
.compose-toggle { display: flex; gap: 0; margin-bottom: 8px; border-radius: 8px; overflow: hidden; border: 1px solid #d2d2d7; width: fit-content; }
.compose-channel { padding: 6px 16px; border: none; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; color: #86868b; transition: all 0.15s; }
.compose-channel.active { background: #007AFF; color: #fff; }
.email-subject-row { margin-bottom: 8px; }
.subject-input { width: 100%; padding: 8px 12px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; outline: none; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row textarea { flex: 1; padding: 10px 14px; border: 1px solid #d2d2d7; border-radius: 18px; font-size: 14px; resize: none; outline: none; max-height: 120px; font-family: inherit; line-height: 1.4; }
.compose-row textarea:focus { border-color: #007AFF; }
.btn-send { width: 38px; height: 38px; border-radius: 50%; border: none; background: #007AFF; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s; }
.btn-send:hover { background: #0066d6; }

/* ── Detail Pane ── */
.detail-pane { width: 340px; min-width: 340px; background: #fafafa; border-left: 1px solid #e5e5ea; overflow-y: auto; padding: 20px; }
.detail-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #86868b; }
.detail-section { margin-bottom: 20px; }
.detail-section h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: #86868b; margin-bottom: 8px; font-weight: 600; }
.detail-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.detail-field { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.detail-field .label { color: #86868b; }
.detail-field .value { font-weight: 500; text-align: right; max-width: 60%; word-break: break-all; }
.detail-field .value a { color: #007AFF; text-decoration: none; }
.note-item { padding: 10px; background: #fff; border-radius: 10px; margin-bottom: 8px; border: 1px solid #e5e5ea; }
.note-item .note-body { font-size: 13px; line-height: 1.4; white-space: pre-wrap; }
.note-item .note-date { font-size: 11px; color: #86868b; margin-top: 4px; }
.opp-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.opp-badge.open { background: #e8f5e9; color: #2e7d32; }
.opp-badge.won { background: #e3f2fd; color: #1565c0; }
.opp-badge.lost { background: #fce4ec; color: #c62828; }
.opp-badge.abandoned { background: #f5f5f5; color: #757575; }
.outcome-history-item { padding: 10px; background: #fff; border-radius: 10px; margin-bottom: 8px; border: 1px solid #e5e5ea; }
.outcome-status-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.outcome-status-badge.APPROVED { background: #d4edda; color: #155724; }
.outcome-status-badge.REJECTED { background: #f8d7da; color: #721c24; }
.outcome-status-badge.OPT-OUT { background: #fff3cd; color: #856404; }
.outcome-status-badge.HOLD { background: #cce5ff; color: #004085; }
.outcome-status-badge.INCOMPLETE { background: #e2e3e5; color: #383d41; }
.outcome-status-badge.NO-SHOW { background: #f5c6cb; color: #721c24; }
.rating-stars-display { color: #ff9500; font-size: 13px; letter-spacing: 1px; }

/* ── Next Steps Dropdown ── */
.next-steps-wrapper { position: relative; }
.btn-next-steps { padding: 8px 16px; border: 1px solid #007AFF; border-radius: 8px; background: #fff; color: #007AFF; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-next-steps:hover { background: #007AFF; color: #fff; }
.next-steps-dropdown { display: none; position: absolute; top: 100%; right: 0; margin-top: 4px; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); 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; cursor: pointer; transition: background 0.1s; }
.next-steps-dropdown button:hover { background: #f5f5f7; }

/* ── Outcome Modal ── */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #fff; border-radius: 16px; max-width: 520px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,0.16); }
.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-size: 18px; font-weight: 700; }
.modal-close { width: 28px; height: 28px; border-radius: 50%; border: none; background: #e8e8ed; color: #86868b; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: #d2d2d7; }

/* 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: 2px solid #e5e5ea; border-radius: 12px; background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-showed:hover { border-color: #34c759; background: #f0faf3; }
.btn-noshow:hover { border-color: #ff3b30; background: #fff5f5; }

/* Rating form */
.rating-form { margin-top: 8px; }
.rating-category { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.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: #86868b; margin-bottom: 8px; }
.star-picker { display: flex; gap: 4px; }
.star-picker .star { width: 32px; height: 32px; cursor: pointer; font-size: 24px; color: #d2d2d7; transition: color 0.1s; user-select: none; }
.star-picker .star.filled { color: #ff9500; }
.star-picker .star:hover { color: #ffb340; }
.rating-comment { margin-top: 8px; }
.rating-comment textarea { width: 100%; padding: 10px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; resize: vertical; min-height: 60px; font-family: inherit; outline: none; }
.rating-comment textarea:focus { border-color: #007AFF; }
.char-count { font-size: 11px; color: #86868b; float: right; margin-top: 4px; }

/* Confirm form */
.confirm-form { padding: 0 0 4px; }
.confirm-status { padding: 12px; background: #f5f5f7; border-radius: 10px; margin-bottom: 16px; font-size: 14px; text-align: center; }
.confirm-form textarea { width: 100%; padding: 10px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; resize: vertical; font-family: inherit; outline: none; margin-bottom: 16px; }

/* ── 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-size: 22px; font-weight: 700; min-width: 200px; text-align: center; }
.cal-nav-btn { padding: 8px 16px; border: 1px solid #d2d2d7; border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; transition: all 0.15s; }
.cal-nav-btn:hover { background: #f5f5f7; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #e5e5ea; border-radius: 12px; overflow: hidden; }
.cal-dow { padding: 10px; text-align: center; font-size: 12px; font-weight: 600; color: #86868b; background: #fafafa; text-transform: uppercase; }
.cal-day { background: #fff; min-height: 90px; padding: 8px; cursor: pointer; transition: background 0.1s; position: relative; }
.cal-day:hover { background: #f5f5f7; }
.cal-day.empty { background: #fafafa; cursor: default; }
.cal-day.empty:hover { background: #fafafa; }
.cal-day .day-num { font-size: 13px; font-weight: 600; color: #1d1d1f; }
.cal-day.today .day-num { color: #007AFF; }
.cal-day .day-count { position: absolute; top: 8px; right: 8px; background: #007AFF; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 10px; }
.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: #007AFF; margin: 1px; }
.cal-event-dot.canceled { background: #ff3b30; }

/* Calendar modal */
.cal-event-item { padding: 10px; border-bottom: 1px solid #f0f0f0; }
.cal-event-item:last-child { border-bottom: none; }
.cal-event-name { font-weight: 600; font-size: 14px; }
.cal-event-time { font-size: 12px; color: #86868b; margin-top: 2px; }
.cal-event-type { font-size: 11px; color: #007AFF; }
.cal-event-status { font-size: 11px; padding: 2px 6px; border-radius: 4px; display: inline-block; margin-top: 4px; }
.cal-event-status.canceled { background: #fce4ec; color: #c62828; }
.cal-event-status.noshow { background: #fff3cd; color: #856404; }

/* ── Admin ── */
.admin-container { flex: 1; padding: 24px; overflow-y: auto; max-width: 900px; margin: 0 auto; }
.admin-tabs { display: flex; gap: 0; margin-bottom: 24px; border-radius: 10px; overflow: hidden; border: 1px solid #d2d2d7; width: fit-content; }
.admin-tab { padding: 10px 20px; border: none; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: #86868b; transition: all 0.15s; }
.admin-tab.active { background: #007AFF; color: #fff; }
.admin-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-panel-header h3 { font-size: 18px; font-weight: 700; }

/* User cards */
.user-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border: 1px solid #e5e5ea; border-radius: 12px; margin-bottom: 8px; }
.user-card-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: #007AFF; 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: #86868b; }
.user-card-actions { display: flex; gap: 8px; }
.user-card-actions button { padding: 6px 12px; border: 1px solid #d2d2d7; border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; }
.user-card-actions button:hover { background: #f5f5f7; }
.user-card-actions .btn-view-as { border-color: #007AFF; color: #007AFF; }

/* Logs */
.log-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.log-time { color: #86868b; white-space: nowrap; flex-shrink: 0; }
.log-user { font-weight: 600; flex-shrink: 0; }
.log-action { flex: 1; }
.log-action-type { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #e8e8ed; 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: #fff; border: 1px solid #e5e5ea; border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.assign-result-item:hover { background: #f5f5f7; }

/* View-as banner */
.view-as-banner { position: fixed; top: 0; left: 68px; right: 0; background: #ff9500; 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); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7c7cc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0a0a5; }

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


/* ── Message View Tabs ── */
.msg-view-tabs { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid #d2d2d7; }
.msg-view-tab { padding: 5px 14px; border: none; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; color: #86868b; transition: all 0.15s; }
.msg-view-tab.active { background: #007AFF; color: #fff; }

/* ── Email Thread View ── */
.email-thread-list { padding: 12px; }
.email-thread-item { background: #fff; border: 1px solid #e5e5ea; border-radius: 12px; margin-bottom: 8px; overflow: hidden; cursor: pointer; transition: box-shadow 0.15s; }
.email-thread-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.email-thread-item.expanded { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.email-thread-header { display: flex; align-items: center; padding: 12px 14px; gap: 10px; }
.email-thread-indicator { width: 4px; height: 32px; border-radius: 2px; background: #007AFF; flex-shrink: 0; }
.email-thread-indicator.inbound { background: #34c759; }
.email-thread-info { flex: 1; min-width: 0; }
.email-thread-subject { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-thread-preview { font-size: 12px; color: #86868b; 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: 11px; color: #86868b; }
.email-thread-count { font-size: 10px; background: #e8e8ed; color: #636366; padding: 1px 6px; border-radius: 8px; margin-top: 2px; display: inline-block; }
.email-thread-body { border-top: 1px solid #f0f0f0; 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 #f5f5f7; }
.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: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.email-msg-dir.outbound { background: #007AFF; color: #fff; }
.email-msg-dir.inbound { background: #e8f5e9; color: #2e7d32; }
.email-msg-time { font-size: 11px; color: #86868b; }
.email-msg-content { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: #333; }
.email-reply-bar { padding: 12px 14px; border-top: 1px solid #e5e5ea; background: #fafafa; }
.email-reply-bar textarea { width: 100%; padding: 10px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; resize: vertical; min-height: 60px; font-family: inherit; outline: none; }
.email-reply-bar textarea:focus { border-color: #007AFF; }
.email-reply-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.email-reply-actions button { padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-reply { border: none; background: #007AFF; color: #fff; }
.btn-reply:hover { background: #0066d6; }
.btn-reply:disabled { background: #a0a0a5; }

/* 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-size:16px; font-weight:600; }

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

/* App Switcher */
.app-switcher-wrap { position: relative; }
.app-switcher-dropdown {
    display: none; position: absolute; top: 44px; left: 0;
    background: #fff; border: 1px solid #e5e5ea; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12); min-width: 180px; z-index: 9999;
    padding: 6px 0; overflow: hidden;
}
.app-switcher-dropdown.open { display: block; }
.app-switcher-title {
    font-size: 11px; font-weight: 600; color: #86868b; text-transform: uppercase;
    letter-spacing: .5px; padding: 8px 14px 4px;
}
.app-switcher-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    font-size: 14px; color: #1d1d1f; text-decoration: none; transition: background .15s;
}
.app-switcher-item:hover { background: #f5f5f7; }
.app-switcher-item.active { font-weight: 600; color: #007AFF; }
.app-switcher-icon { font-size: 16px; width: 22px; text-align: center; }

/* Contact Filters */
.contact-filters { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.filter-chip {
    padding: 4px 12px; border-radius: 16px; font-size: 12px; font-weight: 500;
    border: 1px solid #d2d2d7; background: #fff; color: #86868b; cursor: pointer;
    transition: all .15s; white-space: nowrap;
}
.filter-chip:hover { border-color: #007AFF; color: #007AFF; }
.filter-chip.active { background: #007AFF; color: #fff; border-color: #007AFF; }

.contact-done-tag {
    display: inline-block; margin-left: 6px; font-size: 10px; color: #34c759;
    background: rgba(52,199,89,.1); border-radius: 4px; padding: 1px 4px; font-weight: 600;
}

/* Template Picker Button */
.compose-template-btn {
    padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 500;
    border: 1px solid #d2d2d7; background: #fff; color: #007AFF; cursor: pointer;
    transition: all .15s; margin-left: auto;
}
.compose-template-btn:hover { background: #007AFF; color: #fff; }

/* Template Picker Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.modal-card { background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.18); width: 90%; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #e5e5ea; }
.modal-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #86868b; padding: 0 4px; }
.modal-close:hover { color: #1d1d1f; }

/* Template list items */
.tpl-pick-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid #f0f0f2; cursor: pointer; transition: background .1s;
}
.tpl-pick-item:hover { background: #f5f5f7; 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: 600; padding: 2px 6px;
    border-radius: 4px; color: #fff; flex-shrink: 0; margin-top: 2px;
}
.tpl-pick-badge.sms { background: #34c759; }
.tpl-pick-badge.email { background: #5856d6; }
.tpl-pick-name { font-size: 14px; font-weight: 500; color: #1d1d1f; }
.tpl-pick-preview { font-size: 12px; color: #86868b; 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: #007AFF; background: none; border: 1px solid #007AFF;
    border-radius: 6px; padding: 3px 10px; cursor: pointer; transition: all .15s;
}
.msg-reply-btn:hover { background: #007AFF; color: #fff; }

/* Confirmation blobs */
.confirm-blob {
    display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px;
    border-radius: 10px; color: #fff; line-height: 1.3;
}
.confirm-blob.confirmed { background: #34c759; }
.confirm-blob.canceled { background: #ff3b30; }
.confirm-blob.rescheduled { background: #ff9500; }
.confirm-blob.no-response { background: #8e8e93; }
.confirm-blob.awaiting { background: #007AFF; }
.confirm-blob.pending { background: #d2d2d7; color: #636366; }
.contact-blob-row { margin-bottom: 2px; }

/* Time moved to bottom */
.contact-time-bottom { font-size: 10px; color: #aeaeb2; margin-top: 3px; }
.contact-item.active .contact-time-bottom { color: rgba(255,255,255,0.7); }
.contact-item.active .confirm-blob { opacity: 0.9; }
.confirm-blob.skipped { background: #c7c7cc; color: #48484a; }
.confirm-blob.error { background: #ff453a; }
.confirm-blob.no-booking { background: #e5e5ea; color: #8e8e93; }


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

/* Tag chips */
.tag-chip { display:inline-flex; align-items:center; gap:2px; font-size:11px; background:#e5e5ea; color:#1c1c1e; padding:2px 8px; border-radius:12px; margin:2px 4px 2px 0; white-space:nowrap; }
.tag-remove { border:none; background:none; color:#86868b; cursor:pointer; font-size:10px; padding:0 0 0 2px; line-height:1; }
.tag-remove:hover { color:#ff3b30; }
.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 #d2d2d7; border-radius:8px; font-size:11px; outline:none; }
.tag-add-input:focus { border-color:#007AFF; }
.tag-add-btn { border:none; background:#007AFF; 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 { background:#005ecb; }

/* Blacklist button */
.blacklist-btn { border:none; background:#ff3b30; color:#fff; font-size:11px; font-weight:600; padding:4px 10px; border-radius:6px; cursor:pointer; }
.blacklist-btn:hover { background:#d63029; }

/* Tag dropdown select */
.tag-add-select { padding:3px 6px; border:1px solid #d2d2d7; border-radius:8px; font-size:11px; outline:none; background:#fff; color:#1c1c1e; cursor:pointer; max-width:140px; }
.tag-add-select:focus { border-color:#007AFF; }


/* ── Info Session Overlays ── */
.btn-conduct-session {
    background: linear-gradient(135deg, #5856d6, #007aff);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    width: 100%;
}
.btn-conduct-session:hover { opacity: .85; }

.is-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.is-overlay-content {
    background: #fff;
    border-radius: 16px;
    width: 94vw;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.is-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5ea;
    flex-shrink: 0;
}
.is-overlay-header h2 {
    margin: 0;
    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-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: 8px;
    background: #f5f5f7;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}
.is-checklist li a {
    color: #007aff;
    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: #86868b;
}
.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;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #5856d6, #007aff);
    color: #fff;
    transition: opacity .15s;
}
.btn-conduct:hover { opacity: .85; }

/* 2-pane layout */
.is-2pane {
    display: flex;
    flex: 1;
    overflow: hidden;
}
.is-pane-left {
    width: 45%;
    border-right: 1px solid #e5e5ea;
    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 #e5e5ea;
    flex-shrink: 0;
}
.is-script-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f5f5f7;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #86868b;
    transition: all .15s;
}
.is-script-tab.active {
    background: #fff;
    color: #1d1d1f;
    box-shadow: inset 0 -2px 0 #007aff;
}
.is-script-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.7;
}
.is-script-placeholder {
    color: #86868b;
    font-style: italic;
    text-align: center;
    margin-top: 40px;
}

/* Form sections */
.is-form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f2f2f7;
}
.is-form-section:last-child { border-bottom: none; }
.is-form-section h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1d1d1f;
}
.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: 8px;
    background: #f5f5f7;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.is-radio-group label:hover { background: #e8e8ed; }
.is-radio-group input[type=radio] { accent-color: #007aff; }
.is-outcome-group { flex-direction: column; }
.is-outcome-group label { padding: 10px 14px; }

.is-textarea {
    width: 100%;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    background: #fafafa;
    transition: border-color .15s;
    box-sizing: border-box;
}
.is-textarea:focus { outline: none; border-color: #007aff; }

/* 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: 11px;
    color: #86868b;
    background: #f5f5f7;
    border-bottom: 2px solid #e5e5ea;
}
.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 #f2f2f7;
}
.is-casino-table td:first-child {
    text-align: left;
    font-weight: 500;
    padding-left: 12px;
}
.is-casino-table tr:hover { background: #fafafe; }
.is-casino-table input[type=radio] { accent-color: #007aff; }

/* No-show box */
.is-noshow-box {
    margin-top: 10px;
    padding: 12px 16px;
    background: #fff3cd;
    border-radius: 10px;
    border: 1px solid #ffc107;
}
.is-noshow-box p { margin: 0 0 8px; font-size: 13px; color: #856404; }
.btn-noshow-mark {
    background: #ff9500;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-noshow-mark:hover { opacity: .85; }

/* 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: #fff;
    padding: 6px 0 8px;
    border-bottom: 1px solid #f2f2f7;
    text-align: center;
}
.is-faq-toggle-btn {
    background: #f5f5f7;
    border: 1px solid #d1d1d6;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #007aff;
    transition: all .15s;
}
.is-faq-toggle-btn:hover {
    background: #e8e8ed;
}

/* Script content styling */
.is-script-content {
    font-size: 14px;
    line-height: 1.7;
    color: #1d1d1f;
}
.is-script-content p {
    margin: 0 0 8px;
}
.is-script-content strong {
    color: #1d1d1f;
}
.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 #e5e5ea;
    margin: 16px 0;
}
.is-script-content a {
    color: #007aff;
    text-decoration: none;
}
.is-script-content a:hover {
    text-decoration: underline;
}
.is-script-content del {
    color: #86868b;
}


/* Conduct Info Session header button */
.btn-conduct-session-header {
    background: linear-gradient(135deg, #5856d6, #007aff);
    color: #fff;
    border: none;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
}
.btn-conduct-session-header:hover { opacity: .85; }


/* Acknowledgment items */
.is-ack-item {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f9f9fb;
    border-radius: 10px;
    border: 1px solid #e5e5ea;
}
.is-ack-item p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #1d1d1f;
}
.is-ack-item:last-child { margin-bottom: 0; }


/* Info Session Results */
.is-result-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e5ea;
}
.is-result-section {
    margin-bottom: 18px;
}
.is-result-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #1d1d1f;
    padding-bottom: 6px;
    border-bottom: 1px solid #f2f2f7;
}
.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: #86868b;
    flex-shrink: 0;
    max-width: 55%;
}
.is-result-value {
    text-align: right;
    color: #1d1d1f;
    font-weight: 500;
    word-break: break-word;
}
.is-res-yes {
    color: #34c759;
    font-weight: 600;
}
.is-res-no {
    color: #ff3b30;
    font-weight: 600;
}
.is-res-neutral {
    color: #007aff;
    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: #636366;
}
.is-result-ts-time {
    color: #86868b;
    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: #f5f5f7;
}

/* Inline email thread cards in All view */
.msg-inline-thread { background: #fff; border: 1px solid #e5e5ea; border-radius: 12px; margin: 8px 12px; overflow: hidden; transition: box-shadow 0.15s; }
.msg-inline-thread:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.msg-inline-thread.expanded { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.msg-inline-thread-header { display: flex; align-items: center; padding: 10px 14px; gap: 10px; cursor: pointer; }
.msg-inline-thread-icon { font-size: 20px; flex-shrink: 0; }
.msg-inline-thread-info { flex: 1; min-width: 0; }
.msg-inline-thread-subject { font-size: 13px; font-weight: 600; color: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-inline-thread-preview { font-size: 12px; color: #86868b; 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: 11px; color: #86868b; display: block; }
.msg-inline-thread-count { font-size: 10px; background: #34c759; color: #fff; padding: 1px 7px; border-radius: 8px; margin-top: 2px; display: inline-block; }
.msg-inline-thread-chevron { font-size: 18px; color: #c7c7cc; 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 #f0f0f0; 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 #e0e0e0; padding-left: 10px; margin-left: 4px; }
.email-msg.latest { border-left: 2px solid #34c759; padding-left: 10px; margin-left: 4px; }
.email-expand-btn { background: none; border: none; color: #007AFF; 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: #f0f0f5; padding: 2px 6px; margin: -2px -6px; }
.edit-inline-input { font-size: 13px; font-weight: 500; border: 1px solid #007AFF; border-radius: 4px; padding: 2px 6px; outline: none; width: 100%; text-align: right; background: #fff; color: #1d1d1f; }
.edit-save-bar { position: sticky; bottom: 0; background: #f9f9fb; border-top: 1px solid #e0e0e5; padding: 12px 16px; display: flex; justify-content: flex-end; gap: 8px; z-index: 10; }
.edit-save-btn { background: #007AFF; color: #fff; border: none; border-radius: 6px; padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.edit-save-btn:hover { background: #0066d6; }
.edit-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.edit-cancel-btn { background: #e8e8ed; color: #1d1d1f; border: none; border-radius: 6px; padding: 8px 20px; font-size: 13px; font-weight: 500; cursor: pointer; }
.edit-cancel-btn:hover { background: #d8d8dd; }
.msg-contact-link { font-size: 16px; font-weight: 700; color: #007AFF; text-decoration: none; }
.msg-contact-link:hover { text-decoration: underline; }

/* Minimize button */
.is-header-btns { display: flex; gap: 4px; align-items: center; }
.is-minimize-btn { background: none; border: none; font-size: 24px; font-weight: 700; color: #86868b; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; line-height: 1; }
.is-minimize-btn:hover { background: #f0f0f5; color: #1d1d1f; }
/* 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: 0 4px 24px rgba(0,0,0,0.18); cursor: pointer; transition: all 0.2s ease; }
.is-overlay.is-minimized .is-overlay-content:hover { box-shadow: 0 6px 32px rgba(0,0,0,0.25); 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: #fff3cd; border: 1px solid #ffc107; border-radius: 6px; padding: 8px 12px; color: #856404; font-size: 12px; font-weight: 600; margin-bottom: 8px; }

/* Add Note */
.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 #d1d1d6; border-radius: 6px; padding: 8px 10px; resize: vertical; font-family: inherit; min-height: 36px; }
.add-note-input:focus { border-color: #007AFF; outline: none; }
.add-note-btn { background: #007AFF; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.add-note-btn:hover { background: #0066d6; }
.add-note-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Stage filter dropdown */
.stage-filter-select { font-size: 11px; padding: 4px 8px; border: 1px solid #d1d1d6; border-radius: 6px; background: #fff; color: #1d1d1f; cursor: pointer; max-width: 130px; }
.stage-filter-select:focus { border-color: #007AFF; outline: none; }

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

/* Internal comments */
.internal-comment-item { padding: 10px 12px; margin-bottom: 8px; background: #f5f5f7; border-radius: 8px; border: 1px solid #e8e8ed; }
.internal-comment-item .note-body { font-size: 13px; color: #1d1d1f; line-height: 1.5; }
.internal-comment-item .note-date { font-size: 11px; color: #86868b; 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 #f0f0f0; }
.opp-stage-row:last-child { border-bottom: none; }
.opp-pipeline-label { font-size: 12px; color: #86868b; font-weight: 500; min-width: 80px; }
.opp-stage-select { font-size: 13px; font-weight: 500; padding: 4px 8px; border: 1px solid #d1d1d6; border-radius: 6px; background: #fff; color: #1d1d1f; cursor: pointer; max-width: 200px; }
.opp-stage-select:focus { border-color: #007AFF; outline: none; }
.opp-stage-select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Double Bookings ── */
.db-contact-card { background: #fff; border: 1px solid #e5e5ea; border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: box-shadow 0.15s; }
.db-contact-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.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: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-contact-email { font-size: 12px; color: #86868b; 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; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.db-count-double { background: rgba(255,149,0,0.14); color: #ff9500; }
.db-count-triple { background: rgba(255,59,48,0.14); color: #ff3b30; }
.db-contact-link { font-size: 12px; color: #007AFF; text-decoration: none; font-weight: 500; white-space: nowrap; }
.db-contact-link:hover { text-decoration: underline; }
.db-chevron { font-size: 18px; color: #86868b; 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 #f2f2f7; gap: 12px; }
.db-event-row:first-child { border-top: 1px solid #e5e5ea; }
.db-event-info { flex: 1; min-width: 0; }
.db-event-type { font-size: 14px; font-weight: 600; color: #1d1d1f; }
.db-event-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 12px; color: #86868b; }
.db-event-meta strong { color: #1d1d1f; font-weight: 500; }
.db-cancel-btn { padding: 6px 16px; border: none; border-radius: 8px; background: #ff3b30; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity 0.15s; }
.db-cancel-btn:hover { opacity: 0.85; }
.db-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.db-event-type-label { font-size: 12px; color: #86868b; margin-top: 2px; }
.db-group { margin-bottom: 8px; border: 1px solid #2a2a2e; border-radius: 10px; overflow: hidden; }
.db-group-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #1a1a1e; cursor: pointer; user-select: none; }
.db-group-header:hover { background: #222226; }
.db-group-chevron { font-size: 18px; color: #86868b; 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: #f5f5f7; flex: 1; }
.db-group-count { font-size: 13px; color: #86868b; background: #2a2a2e; padding: 3px 10px; border-radius: 12px; }
.db-group-body { padding: 4px 0; }
.db-group-body .db-contact-card { border-radius: 0; border-left: none; border-right: none; border-top: none; }
.db-group-body .db-contact-card:last-child { border-bottom: none; }

/* Info Session Checklist Sidebar */
.is-sidebar { width: 320px; min-width: 320px; background: #f5f5f7; border-left: 1px solid #e5e5ea; 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 #e5e5ea; }
.is-sidebar-header h3 { 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: 6px 0; font-size: 13px; }
.is-sidebar-body .is-checklist label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.is-sidebar-body .is-checklist label a { color: #0071e3; 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: #34c759; width: 16px; height: 16px; }
.is-sidebar-active .message-pane { max-width: calc(100% - 300px - 340px - 320px); }

/* ── Info Session Inline 3-Pane Layout ── */
.is-session-inline { display: flex; flex-direction: column; flex: 1; overflow: hidden; background: #fff; }
.is-session-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #e5e5ea; background: #fafafa; }
.is-session-header-left { display: flex; align-items: center; gap: 16px; }
.is-session-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.is-session-contact-name { font-size: 15px; color: #4a9eff; font-weight: 500; text-decoration: none; } .is-session-contact-name:hover { text-decoration: underline; }
.btn-meet { display: inline-flex; align-items: center; gap: 6px; background: #1a73e8; color: #fff; border: none; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-meet:hover { background: #1557b0; }
.btn-end-session { background: #ff3b30; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-end-session:hover { background: #d63029; }

.is-3pane { display: flex; flex: 1; overflow: hidden; }
.is-3pane .is-pane-left { width: 50%; border-right: 1px solid #e5e5ea; display: flex; flex-direction: column; overflow: hidden; }
.is-3pane .is-pane-center { width: 25%; overflow-y: auto; padding: 20px 18px; border-right: 1px solid #e5e5ea; }
.is-3pane .is-pane-contact { width: 25%; overflow-y: auto; padding: 20px 18px; background: #fafafa; }

/* Presentation Controls */
.is-presentation-bar { border-top: 1px solid #e5e5ea; padding: 12px 16px; background: #f5f5f7; flex-shrink: 0; }
.is-presentation-btns { display: flex; gap: 8px; justify-content: center; }
.btn-presentation { background: #0071e3; color: #fff; border: none; border-radius: 8px; padding: 10px 24px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; }
.btn-presentation:hover { background: #005bb5; }
.btn-slide-nav { background: #2a2a2e; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; }
.btn-slide-nav:hover { background: #3a3a3e; }
#isPresentationPreview { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.is-slide-thumb { width: 120px; height: auto; border-radius: 6px; border: 1px solid #e5e5ea; }
.is-slide-counter { font-size: 14px; font-weight: 600; color: #333; }

/* 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: #0071e3; 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; color: #fff; background: rgba(0,0,0,0.6); padding: 1px 5px; border-radius: 4px; }

/* Appointment cards */
.apt-card { background: #f5f5f7; border: 1px solid #e5e5ea; border-radius: 8px; 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: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.apt-canceled { background: rgba(255,59,48,0.12); color: #ff3b30; }
.apt-noshow { background: rgba(255,149,0,0.12); color: #ff9500; }
.apt-upcoming { background: rgba(0,113,227,0.12); color: #0071e3; }
.apt-shown { background: rgba(52,199,89,0.12); color: #34c759; }
.apt-host { font-size: 12px; color: #86868b; margin-bottom: 4px; }
.apt-dates { display: flex; gap: 16px; font-size: 12px; color: #86868b; }
.apt-dates strong { color: #333; }
.apt-cancel-reason { font-size: 11px; color: #ff3b30; font-style: italic; margin-top: 4px; }
.apt-card-actions { display: flex; align-items: center; gap: 6px; }
.apt-cancel-btn { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 4px; border: 1px solid #ff3b30; background: #fff; color: #ff3b30; cursor: pointer; transition: all 0.15s; }
.apt-cancel-btn:hover { background: #ff3b30; color: #fff; }
.apt-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-toggle-view { background: #2a3a4e; color: #8bb8e8; border: 1px solid #3a5a7c; padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-toggle-view:hover { background: #3a5a7c; color: #fff; }

/* Back to session small button in message header */
.btn-back-to-session-sm { background: #1a3a5c; color: #8bb8e8; border: 1px solid #2a5a8c; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-back-to-session-sm:hover { background: #2a5a8c; color: #fff; }

/* ── Todos ── */
.todos-container { padding: 24px; max-width: 900px; margin: 0 auto; width: 100%; }
.todos-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; padding: 16px 20px; background: #1c1c1e; border: 1px solid #2c2c2e; border-radius: 12px; }
.todos-header h2 { margin: 0; font-size: 20px; color: #f5f5f7; }
.todos-filter-bar { display: flex; gap: 6px; }
.todo-filter-chip {
    padding: 6px 14px; border-radius: 20px; border: 1px solid #3a3a3e; background: transparent;
    color: #86868b; font-size: 12px; cursor: pointer; transition: all .15s;
}
.todo-filter-chip.active, .todo-filter-chip:hover { background: #007AFF; color: #fff; border-color: #007AFF; }
.todos-list { display: flex; flex-direction: column; gap: 8px; }
.todo-card {
    display: flex; justify-content: space-between; align-items: flex-start;
    background: #1c1c1e; border: 1px solid #2c2c2e; border-radius: 10px; padding: 14px 16px;
    transition: border-color .15s;
}
.todo-card:hover { border-color: #3a3a3e; }
.todo-card.completed { opacity: 0.6; }
.todo-card-left { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 600; color: #f5f5f7; margin-bottom: 4px; }
.todo-body { font-size: 12px; color: #86868b; margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: #86868b; }
.todo-meta span { display: inline-flex; align-items: center; gap: 2px; }
.todo-contact-link { color: #007AFF; text-decoration: none; }
.todo-contact-link:hover { text-decoration: underline; }
.todo-overdue { color: #ff453a !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: 8px; border: 1px solid #34c759; background: transparent;
    color: #34c759; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.todo-complete-btn:hover { background: #34c759; color: #fff; }
.todo-delete-btn {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid #48484a; background: transparent;
    font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.todo-delete-btn:hover { background: #ff453a; border-color: #ff453a; }

/* Todo contact search results in modal */
.todo-contact-results { max-height: 150px; overflow-y: auto; margin-top: 4px; }
.todo-contact-result {
    padding: 6px 10px; font-size: 13px; color: #f5f5f7; cursor: pointer; border-radius: 6px;
    transition: background .1s;
}
.todo-contact-result:hover { background: #2c2c2e; }
.todo-contact-selected {
    display: inline-flex; align-items: center; padding: 4px 10px; background: #2c2c2e;
    border-radius: 6px; font-size: 13px; color: #f5f5f7; margin-top: 4px;
}

/* Contact detail todos */
.todo-detail-item {
    padding: 10px 12px; background: #1c1c1e; border: 1px solid #2c2c2e; border-radius: 8px; margin-bottom: 6px;
}
.todo-detail-item.completed { opacity: 0.6; }
.todo-detail-meta {
    display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: #86868b; margin-top: 6px;
}
.todo-detail-meta span { display: inline-flex; align-items: center; gap: 2px; }
.todo-status-badge {
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; text-transform: uppercase;
}
.todo-status-badge.pending { background: #ff9f0a33; color: #ff9f0a; }
.todo-status-badge.completed { background: #34c75933; color: #34c759; }

/* ── Todo modal form fixes ── */
.form-group textarea {
    width: 100%; padding: 12px 16px; border: 1px solid #d2d2d7; border-radius: 10px;
    font-size: 15px; background: #f5f5f7; outline: none; transition: border-color 0.2s;
    font-family: inherit; resize: vertical; color: #1d1d1f;
}
.form-group textarea:focus { border-color: #007AFF; background: #fff; }

/* Fix todo modal text colors for white-background modals */
#newTodoModal .modal-content label { color: #1d1d1f; }
#newTodoModal .search-input { color: #1d1d1f; }
#newTodoModal .select-input { color: #1d1d1f; }
#newTodoModal .form-group input { color: #1d1d1f; }
.todo-contact-results { background: #f5f5f7; border-radius: 8px; }
.todo-contact-result { color: #1d1d1f !important; }
.todo-contact-result span { color: #86868b !important; }
.todo-contact-selected { background: #e8e8ed; color: #1d1d1f; }
#newTodoError { color: #ff3b30; }

/* Breakup email toggle button */
.btn-breakup-toggle.active { background: #ff3b30 !important; border-color: #ff3b30 !important; color: #fff !important; }
.btn-breakup-toggle:hover { background: #3a3a3e; }
.btn-breakup-toggle.active:hover { background: #d63029 !important; }
