/* RAD CRM — brand palette (override per-client via config.js --brand custom property) */
:root {
  --bg-page: #F4F6F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F9FAFB;
  --bg-card-deep: #EEF1F5;
  --bg-sidebar: #0D3264;
  --bg-input: #FFFFFF;
  --bg-input-light: #FFFFFF;
  --accent: #F06020;
  --accent-bright: #FF7030;
  --accent-dim: rgba(240, 96, 32, 0.12);
  --accent-glow: rgba(240, 96, 32, 0.25);
  --accent-light: rgba(240, 96, 32, 0.06);
  --navy: #1C62A8;
  --green: #2D6440;
  --green-dim: rgba(45, 100, 64, 0.12);
  --yellow: #D97706;
  --yellow-dim: rgba(217, 119, 6, 0.15);
  --red: #DC2626;
  --red-dim: rgba(220, 38, 38, 0.12);
  --blue: #1C62A8;
  --blue-dim: rgba(28, 98, 168, 0.12);
  --teal: #3BBCAA;
  --teal-dim: rgba(59, 188, 170, 0.12);
  /* Text on light cards */
  --text-on-card: #1F2937;
  --text-on-card-secondary: #4B5563;
  --text-on-card-muted: #6B7280;
  /* Text on light page */
  --text-page: #111827;
  --text-page-secondary: #4B5563;
  --text-page-muted: #6B7280;
  /* Legacy aliases for components that use these */
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --border-light: rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-page);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-layout.no-shell {
  display: block;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo h1 {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.sidebar-logo span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  display: block;
  margin-top: 2px;
  font-weight: 400;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a.active {
  color: #FFFFFF;
  background: var(--accent-dim);
  border-left-color: var(--accent);
}

.sidebar-nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-nav .nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: capitalize;
}

.sidebar-logout {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}

.sidebar-logout:hover { color: var(--red); }

/* Main content */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 28px 36px;
  min-width: 0;
  background: var(--bg-page);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main-content:has(.stats-row),
.main-content:has(.import-page),
.main-content:has(.cd-scrollable-panel),
.main-content:has(.seq-template-card),
.main-content:has(.campaigns-grid),
.main-content:has(.sourcing-page),
.main-content:has(.dash-page) {
  overflow: auto;
}

/* Inbox content panel: a single containerized card per tab holding trainer strip + intro + table/cards.
   Follows the canonical container-scroll pattern — the panel fills remaining height,
   panel-body scrolls internally, table headers stay sticky to the panel-body. */

/* Flex chain: .inbox-page → #followupsTableWrap → .inbox-panel.
   Each must be a flex:1 / min-height:0 column container so the panel actually fills
   the height left by .page-header + .tab-bar, instead of growing past the viewport. */
.inbox-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#followupsTableWrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.inbox-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.inbox-panel-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-deep);
  flex-shrink: 0;
}
.inbox-panel-header > *:last-child { margin-bottom: 0; }
.inbox-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}
.inbox-panel-body.cards { padding: 16px 18px 20px; }
.inbox-panel .data-table { width: 100%; }
/* sticky thead is inherited from the global .data-table rule in tables.css; no override needed */

/* Campaign detail contacts tab — fills remaining height, table scrolls internally */
.cd-fixed-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.page-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-page);
  letter-spacing: -0.02em;
}

.page-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-on-card);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover { background: var(--accent-bright); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-card-deep);
  color: var(--text-on-card-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-on-card);
  border-color: var(--border-hover);
}

.btn-danger {
  background: #c0392b;
  color: #FFFFFF;
}

.btn-danger:hover { background: #a93226; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

.page-header .btn-primary {
  box-shadow: 0 1px 3px rgba(240, 96, 32, 0.3);
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text-on-card);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.12);
}

select { cursor: pointer; appearance: auto; }
textarea { resize: vertical; min-height: 72px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-card-secondary);
  margin-bottom: 6px;
}

.field-group { margin-bottom: 16px; }
.field-group:last-child { margin-bottom: 0; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-page);
}

.filter-bar .search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.1);
}

.filter-bar .search-input::placeholder {
  color: var(--text-page-muted);
}

.filter-bar select {
  width: auto;
  min-width: 140px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-page);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-new { background: var(--blue-dim); color: var(--blue); }
.badge-active { background: var(--green-dim); color: var(--green); }
.badge-warning { background: var(--yellow-dim); color: var(--yellow); }
.badge-error { background: var(--red-dim); color: var(--red); }
.badge-complete { background: var(--teal-dim); color: var(--teal); }
.badge-action { background: var(--accent-dim); color: var(--accent); font-weight: 600; animation: pulse-badge 2s ease-in-out infinite; }
@keyframes pulse-badge { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.badge-default { background: var(--accent-dim); color: var(--accent-bright); }
.badge-amber { background: rgba(180, 83, 9, 0.12); color: #B45309; font-weight: 600; }

/* Accordion cards */
.accordion { display: flex; flex-direction: column; gap: 8px; }
.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.accordion-item:hover { border-color: var(--border); }
.accordion-item.error { border-left: 3px solid var(--red); }
.accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.accordion-header:hover { background: var(--bg-card-deep); }
.accordion-chevron {
  flex-shrink: 0;
  stroke: var(--text-on-card-muted);
  transition: transform 0.15s;
}
.accordion-item.open > .accordion-header > .accordion-chevron { transform: rotate(90deg); stroke: var(--accent); }
.accordion-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.accordion-title-main {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-on-card);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.accordion-title-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-on-card-secondary);
  text-decoration: none;
}
a.accordion-title-sub:hover { color: var(--accent); text-decoration: underline; }
.accordion-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}
.accordion-body {
  display: none;
  padding: 4px 14px 14px 40px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card-deep);
}
.accordion-item.open > .accordion-body { display: block; }

/* Stat cards row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-on-card-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.stat-card .stat-value {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-on-card);
  letter-spacing: -0.02em;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-on-card-secondary);
  margin-top: 2px;
}

/* Login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: #0D3264;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(240, 96, 32, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(240, 96, 32, 0.06) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30h60M30 0v60' stroke='%23ffffff' stroke-width='0.3' opacity='0.04'/%3E%3C/svg%3E");
  z-index: 0;
}

.login-accent {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55%;
  height: 140%;
  background: linear-gradient(135deg, rgba(240, 96, 32, 0.08) 0%, rgba(240, 96, 32, 0.02) 100%);
  transform: skewX(-12deg);
  border-left: 1px solid rgba(240, 96, 32, 0.15);
  z-index: 0;
}

.login-card {
  background: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo-icon {
  width: 44px;
  height: 44px;
  background: #0D3264;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.login-logo-icon svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.login-card h1 {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0D3264;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.login-card .login-subtitle {
  font-size: 14px;
  color: #6B7280;
  text-align: center;
  margin-bottom: 32px;
  font-weight: 400;
}

.login-card .field-group label {
  color: #374151;
  font-weight: 500;
  font-size: 13px;
}

.login-card input[type="email"],
.login-card input[type="password"] {
  background: #F9FAFB;
  border: 1px solid #D1D5DB;
  color: #111827;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 8px;
}

.login-card input:focus {
  background: #FFFFFF;
  border-color: #F06020;
  box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.12);
}

.login-card input::placeholder {
  color: #9CA3AF;
}

.login-card .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 8px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(240, 96, 32, 0.3);
  letter-spacing: -0.01em;
}

.login-card .btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 4px 12px rgba(240, 96, 32, 0.4);
  transform: translateY(-1px);
}

.login-error {
  background: #FEF2F2;
  color: #DC2626;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

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

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #9CA3AF;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-page);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  min-width: 260px;
  max-width: 380px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-page-muted);
  gap: 12px;
  font-size: 14px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-on-card-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fade-in 0.15s ease;
  backdrop-filter: blur(4px);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-on-card);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-on-card-muted);
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--text-on-card); }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Action bar for bulk actions */
.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 16px;
  min-height: 49px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.action-bar .selected-count {
  font-size: 13px;
  color: var(--text-on-card-secondary);
  font-weight: 500;
}

.action-bar .selected-count strong {
  color: var(--accent);
}

/* Custom checkbox styling */
.row-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.data-table th.col-check,
.data-table td.col-check {
  width: 40px;
  text-align: center;
  padding-left: 12px;
  padding-right: 4px;
}

.data-table td.col-check {
  cursor: default;
}

/* Activity feed */
.activity-feed {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-icon svg {
  width: 16px;
  height: 16px;
}

.activity-icon.icon-email { background: var(--blue-dim); color: var(--blue); }
.activity-icon.icon-classify { background: var(--accent-dim); color: var(--accent-bright); }
.activity-icon.icon-status { background: var(--yellow-dim); color: var(--yellow); }
.activity-icon.icon-followup { background: var(--teal-dim); color: var(--teal); }
.activity-icon.icon-send { background: var(--green-dim); color: var(--green); }
.activity-icon.icon-error { background: var(--red-dim); color: var(--red); }
.activity-icon.icon-default { background: var(--accent-dim); color: var(--accent-bright); }

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 13px;
  color: var(--text-on-card-secondary);
  line-height: 1.5;
}

.activity-text strong {
  color: var(--text-on-card);
  font-weight: 600;
}

.activity-time {
  font-size: 11px;
  color: var(--text-on-card-muted);
  margin-top: 3px;
}

/* Tabs */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-bar button {
  background: none;
  border: none;
  padding: 10px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-card-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.tab-bar button:hover { color: var(--text-on-card-secondary); }

.tab-bar button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-logo span, .sidebar-nav a span, .sidebar-user-info, .sidebar-nav .nav-badge { display: none; }
  .sidebar-logo h1 { font-size: 14px; }
  .sidebar-nav a { justify-content: center; padding: 12px; }
  .main-content { margin-left: 60px; padding: 16px; }

  .login-card { padding: 36px 24px; }
  .login-accent { display: none; }
}

/* Campaign Wizard */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.wz-step {
  color: var(--text-on-card-muted);
  font-weight: 500;
}

.wz-step.active {
  color: var(--accent);
  font-weight: 700;
}

.wz-sep {
  color: var(--text-on-card-muted);
}

.round-type-tiles {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.round-type-tile {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  background: var(--bg-card);
  transition: border-color 0.15s, background 0.15s;
}

.round-type-tile:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.round-type-tile.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.round-type-tile .tile-label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
  color: var(--text-on-card);
}

.round-type-tile .tile-sub {
  font-size: 11px;
  color: var(--text-on-card-muted);
}

.wizard-contact-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.wizard-contact-count {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.wizard-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wizard-table-wrap .data-table {
  margin: 0;
  border: none;
  width: 100%;
}

.wizard-table-wrap .data-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-card-deep);
  z-index: 10;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-card);
  color: var(--text-on-card);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.stat-label {
  font-size: 11px;
  color: var(--text-on-card-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-on-card);
  margin-top: 6px;
}

.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: #A855F7; }
.badge-orange { background: var(--accent-dim); color: var(--accent); }
.badge-gray { background: rgba(156, 163, 175, 0.12); color: var(--text-on-card-muted); }

/* ═══════════════════════════════════════════════════════════════════
   CLUTCH SALES PLAYBOOK — COACHING SURFACES
   ═══════════════════════════════════════════════════════════════════ */

/* ── Trainer's Corner Strip (Follow-up Queue) ── */
.trainer-strip {
  background: linear-gradient(135deg, rgba(30,58,138,0.08) 0%, rgba(99,102,241,0.06) 100%);
  border: 1px solid rgba(99,102,241,0.25);
  border-left: 3px solid #6366F1;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}
.trainer-strip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
}
.trainer-strip-icon { font-size: 16px; flex-shrink: 0; }
.trainer-strip-title { font-weight: 700; font-size: 13px; color: #6366F1; flex: 1; }
.trainer-strip-toggle { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.trainer-strip-body { padding: 0 16px 14px; }
.trainer-strip-text { font-size: 13.5px; color: var(--text-page); line-height: 1.55; margin: 0 0 10px; }
.trainer-strip-text strong { color: var(--text); }
.trainer-strip-text em { font-style: italic; }
.trainer-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.trainer-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-page); cursor: pointer; }
.trainer-check input { accent-color: #6366F1; }

/* Trainer objection buttons (Needs Response tab) */
.trainer-objection-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.trainer-objection-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.trainer-obj-btn {
  padding: 5px 12px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-on-card); font-size: 12px;
  cursor: pointer; transition: all 0.15s;
}
.trainer-obj-btn:hover { border-color: #6366F1; color: #6366F1; }
.trainer-obj-btn.active { background: #6366F1; color: #fff; border-color: #6366F1; }
.trainer-obj-script { margin-top: 10px; }
.trainer-obj-script-inner {
  background: rgba(99,102,241,0.07);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px;
  padding: 12px 14px;
}
.trainer-obj-script-q {
  font-size: 14px; font-weight: 600; color: var(--text-on-card);
  font-style: italic; margin-bottom: 8px; line-height: 1.5;
}
.trainer-obj-script-note { font-size: 12px; color: var(--text-on-card-muted); line-height: 1.4; }

/* ── Stage Transition Coaching Card ── */
.coaching-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid rgba(99,102,241,0.35);
  border-left: 4px solid #6366F1;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 9999;
  animation: slideInCard 0.3s ease;
  overflow: hidden;
}
@keyframes slideInCard {
  from { transform: translateX(340px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.coaching-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: rgba(99,102,241,0.08);
  border-bottom: 1px solid rgba(99,102,241,0.15);
}
.coaching-card-icon { font-size: 15px; }
.coaching-card-title { font-weight: 700; font-size: 13px; color: #6366F1; flex: 1; }
.coaching-card-close {
  background: none; border: none; font-size: 16px; color: var(--text-muted);
  cursor: pointer; padding: 0 2px; line-height: 1;
}
.coaching-card-body {
  font-size: 13px; color: var(--text-on-card); line-height: 1.5;
  padding: 12px 14px;
}
.coaching-card-body strong { color: var(--text); }
.coaching-card-checklist { padding: 0 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.coaching-card-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-page); cursor: pointer; }
.coaching-card-check input { accent-color: #6366F1; margin-top: 2px; flex-shrink: 0; }
.coaching-card-cta {
  display: block; width: calc(100% - 28px); margin: 0 14px 12px;
  padding: 8px; background: #6366F1; color: #fff;
  border: none; border-radius: 6px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; text-align: center;
}
.coaching-card-cta:hover { background: #4F46E5; }

/* ── Playbook Tab in Detail Panel ── */
.pb-panel { display: flex; flex-direction: column; gap: 0; }
.pb-section {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.pb-section:last-child { border-bottom: none; }
.pb-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #6366F1; margin-bottom: 4px;
}
.pb-section-sub { font-size: 12px; color: var(--text-on-card-muted); margin-bottom: 10px; line-height: 1.4; }
.pb-section-sub em { font-style: italic; }

/* Buyer Stage Track */
.pb-stage-track {
  display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px;
}
.pb-stage-pill {
  padding: 4px 10px; border-radius: 20px;
  border: 1.5px solid var(--pill-color, var(--border));
  background: transparent; color: var(--text-on-card);
  font-size: 11.5px; cursor: pointer; transition: all 0.15s;
}
.pb-stage-pill:hover { background: var(--pill-color); color: #fff; opacity: 0.85; }
.pb-stage-pill.active { background: var(--pill-color); color: #fff; font-weight: 700; }
.pb-stage-hint { font-size: 12px; color: var(--text-on-card-muted); font-style: italic; min-height: 18px; }

/* Quick Qualification */
.pb-qual-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pb-qual-label { font-size: 12px; font-weight: 600; color: var(--text-on-card-secondary); width: 70px; flex-shrink: 0; }
.pb-qual-btns { display: flex; gap: 5px; }
.pb-qual-btn {
  padding: 4px 10px; border-radius: 5px; font-size: 12px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-on-card); cursor: pointer; transition: all 0.12s;
}
.pb-qual-btn:hover { border-color: #6366F1; }
.pb-qual-btn.active { background: #6366F1; color: #fff; border-color: #6366F1; font-weight: 600; }
.pb-readiness {
  margin-top: 8px; font-size: 12.5px; padding: 6px 12px;
  border-radius: 20px; display: inline-block;
}
.pb-readiness-not-ready  { background: rgba(239,68,68,0.1);  color: #DC2626; }
.pb-readiness-nurture    { background: rgba(245,158,11,0.1); color: #D97706; }
.pb-readiness-pursue     { background: rgba(99,102,241,0.1); color: #6366F1; }
.pb-readiness-close      { background: rgba(16,185,129,0.1); color: #059669; }

/* Objection section */
.pb-obj-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pb-obj-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 12.5px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-on-card); cursor: pointer; transition: all 0.15s;
}
.pb-obj-btn:hover { border-color: #6366F1; color: #6366F1; }
.pb-obj-btn.active { background: #6366F1; color: #fff; border-color: #6366F1; font-weight: 600; }
.pb-obj-script { background: rgba(99,102,241,0.06); border: 1px solid rgba(99,102,241,0.2); border-radius: 8px; overflow: hidden; }
.pb-obj-script-inner { padding: 12px 14px; }
.pb-obj-script-q { font-size: 13.5px; font-weight: 600; font-style: italic; color: var(--text-on-card); line-height: 1.5; margin-bottom: 8px; }
.pb-obj-script-note { font-size: 12px; color: var(--text-on-card-muted); line-height: 1.4; margin-bottom: 10px; }
.pb-obj-log-btn {
  padding: 5px 12px; border-radius: 5px; font-size: 12px;
  background: rgba(99,102,241,0.1); color: #6366F1; border: 1px solid rgba(99,102,241,0.3);
  cursor: pointer;
}
.pb-obj-log-btn:hover { background: #6366F1; color: #fff; }
.pb-obj-log { margin-top: 12px; }
.pb-obj-log-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-on-card-muted); margin-bottom: 6px; }
.pb-obj-log-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
.pb-obj-badge { background: rgba(99,102,241,0.1); color: #6366F1; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.pb-obj-log-date { color: var(--text-on-card-muted); font-size: 11px; }

/* ── Daily Trainer Card (Dashboard) ── */
.daily-trainer-card {
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(30,58,138,0.07) 0%, rgba(99,102,241,0.05) 100%);
  border: 1px solid rgba(99,102,241,0.2);
}
.dt-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.dt-header-left { flex: 1; }
.dt-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #6366F1; display: block; margin-bottom: 4px;
}
.dt-title { font-size: 18px; font-weight: 700; color: var(--text-on-card); margin: 0 0 4px; }
.dt-essence { font-size: 13.5px; color: var(--text-on-card-secondary); font-style: italic; margin: 0; line-height: 1.4; }
.dt-dismiss { background: none; border: none; font-size: 18px; color: var(--text-muted); cursor: pointer; padding: 0; }
.dt-body { display: flex; flex-direction: column; gap: 16px; }
.dt-practices-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-on-card-muted); }
.dt-practices { display: flex; flex-direction: column; gap: 8px; }
.dt-practice {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text-on-card); line-height: 1.45; cursor: pointer;
}
.dt-practice input { accent-color: #6366F1; margin-top: 3px; flex-shrink: 0; }
.dt-practice.done { text-decoration: line-through; opacity: 0.5; }
.dt-pulse { padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.dt-pulse-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-on-card-muted); margin-bottom: 8px; }
.dt-pulse-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: 6px; overflow: hidden; }
.dt-pulse-bar { height: 100%; background: linear-gradient(90deg, #6366F1, #10B981); border-radius: 3px; transition: width 0.6s ease; }
.dt-pulse-text { font-size: 12.5px; color: var(--text-on-card-muted); }

/* ── Sequence Templates Playbook Sidebar ── */
.seq-template-card-split {
  display: flex;
  gap: 0;
  padding: 0 !important;
  overflow: hidden;
}
.seq-template-main {
  flex: 1;
  padding: 16px 18px;
  min-width: 0;
}
.seq-playbook-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(30,58,138,0.06) 0%, rgba(99,102,241,0.04) 100%);
  border-left: 2px solid rgba(99,102,241,0.2);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.seq-pb-chapter { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6366F1; }
.seq-pb-essence { font-size: 12.5px; font-style: italic; color: var(--text-on-card-secondary); line-height: 1.4; border-left: 2px solid #6366F1; padding-left: 8px; }
.seq-pb-rules-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-on-card-muted); }
.seq-pb-rules { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 5px; }
.seq-pb-rules li { font-size: 12px; color: var(--text-on-card-secondary); line-height: 1.4; }
