@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #F7F6F2;
  --white: #FFFFFF;
  --ink: #141210;
  --ink2: #3D3A35;
  --ink3: #8C887F;
  --rule: #E2DFD8;
  --teal: #0D7B6E;
  --teal-light: #E6F4F2;
  --coral: #E85D3A;
  --coral-light: #FDF0EC;
  --yellow: #F5C842;
  --yellow-light: #FEFAE8;
  --yellow-dark: #7a6000;
  --sand: #E8E2D5;
  --radius: 8px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink3);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; border: none; transition: opacity 0.15s; text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:disabled, .btn[disabled] { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--teal); color: white; }
.btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-danger { background: transparent; color: var(--coral); border: 1.5px solid var(--rule); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 6px; }
.btn-warn { color: var(--yellow-dark); border: 1.5px solid var(--rule); background: transparent; }
.btn-resume { color: var(--teal); border: 1.5px solid var(--teal); background: transparent; }

.card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 12px; padding: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink3);
}
.form-input, .form-select {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--white); border: 1.5px solid var(--rule); border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: 16px; color: var(--ink); outline: none;
}
.form-input:focus, .form-select:focus { border-color: var(--teal); }
.form-input::placeholder { color: var(--rule); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.badge-active { background: var(--teal-light); color: var(--teal); }
.badge-paused { background: var(--yellow-light); color: var(--yellow-dark); }
.badge-disconnected { background: var(--sand); color: var(--ink2); }
.badge-pending { background: var(--teal-light); color: var(--teal); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-active .badge-dot { background: var(--teal); }
.badge-paused .badge-dot { background: var(--yellow); }
.badge-disconnected .badge-dot { background: var(--ink3); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px;
  background: var(--white); border-bottom: 1px solid var(--rule);
  position: relative;
}
.topbar-logo { font-size: 20px; font-weight: 900; letter-spacing: -0.03em; color: var(--ink); }
.topbar-logo .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); margin-left: 1px; }
.topbar-actions { display: none; flex-direction: column; gap: 8px; align-items: stretch;
  position: absolute; top: 56px; left: 0; right: 0; background: var(--white);
  padding: 12px 16px; border-bottom: 1px solid var(--rule); z-index: 100;
}
.topbar-actions.open { display: flex; }
.topbar-actions .btn { width: 100%; text-align: center; }
.topbar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1.5px solid var(--rule); border-radius: var(--radius);
  background: transparent; cursor: pointer; font-size: 18px; color: var(--ink);
}

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink3); padding: 12px 16px; background: var(--white); border: 1px solid var(--rule);
}
.table th:first-child { border-radius: 8px 0 0 0; }
.table th:last-child { border-radius: 0 8px 0 0; }
.table td {
  padding: 12px 16px; background: var(--white);
  border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  font-size: 16px;
}
.table .biz-name { font-weight: 700; font-size: 17px; }
.table .biz-owner { font-size: 14px; color: var(--ink3); }
.table .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.template-ok { color: var(--teal); font-size: 14px; font-weight: 500; }
.template-outdated { color: var(--yellow-dark); font-size: 14px; font-weight: 500; }

.stepper { display: flex; align-items: center; gap: 8px; }
.step-circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.step-active { background: var(--teal); color: white; }
.step-done { background: var(--teal); color: white; }
.step-pending { border: 1.5px solid var(--rule); color: var(--ink3); }
.step-line { width: 24px; height: 2px; }
.step-line-done { background: var(--teal); }
.step-line-pending { background: var(--rule); }

.wizard-body { padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; }
.wizard-step { display: none; flex-direction: column; gap: 20px; }
.wizard-step.active { display: flex; }

/* Tag input */
.tag-input-wrapper {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-height: 44px; padding: 6px 10px;
  background: var(--white); border: 1.5px solid var(--rule); border-radius: var(--radius);
  cursor: text;
}
.tag-input-wrapper:focus-within { border-color: var(--teal); }
.tag-input-wrapper input {
  border: none; outline: none; font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--ink); flex: 1; min-width: 80px; background: transparent;
}
.tag-input-wrapper input::placeholder { color: var(--rule); }
.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 16px;
  background: var(--teal-light); color: var(--teal);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.tag-pill button {
  background: none; border: none; cursor: pointer; color: var(--teal);
  font-size: 14px; line-height: 1; padding: 0; opacity: 0.6;
}
.tag-pill button:hover { opacity: 1; }

.qr-card { text-align: center; max-width: 400px; margin: 0 auto; }
.qr-placeholder {
  width: 200px; height: 200px; background: var(--bg); border: 1px solid var(--rule);
  border-radius: 12px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
}
.qr-placeholder img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.qr-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 500;
}
.qr-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.qr-info { border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 16px; text-align: left; }

.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 12px 20px;
  border-radius: var(--radius); font-size: 15px; font-weight: 500; color: white; z-index: 1000;
  animation: fadeIn 0.3s ease;
}
.toast-success { background: var(--teal); }
.toast-error { background: var(--coral); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.page { max-width: 1280px; margin: 0 auto; padding: 16px; }
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: flex-start; justify-content: center; z-index: 999; padding: 16px; overflow-y: auto; }
.confirm-dialog { background: var(--white); border-radius: 12px; padding: 20px; max-width: 400px; width: 100%; margin: auto 0; }
.confirm-dialog h3 { margin-bottom: 12px; }
.confirm-dialog p { color: var(--ink2); font-size: 16px; margin-bottom: 24px; }
.confirm-dialog .actions { display: flex; gap: 12px; justify-content: flex-end; }

/* Edit modal */
.edit-dialog { max-width: 1000px; max-height: none; }
.edit-section-title { font-size: 16px; font-weight: 700; color: var(--ink2); margin: 0 0 4px; letter-spacing: 0; }
.edit-layout { display: flex; flex-direction: column; gap: 20px; margin-top: 16px; }
.edit-col-left, .edit-col-right { display: flex; flex-direction: column; gap: 12px; }
.edit-col-right { padding-top: 16px; border-top: 1px solid var(--rule); }
.edit-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.gcal-section { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }

/* Responsive table wrapper */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Mobile/desktop visibility */
.desktop-only { display: none; }
.mobile-only { display: block; }

/* Client cards (mobile) */
.cards-grid { display: flex; flex-direction: column; gap: 12px; }
.client-card {
  background: var(--white); border: 1px solid var(--rule); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.client-card-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.client-card-meta {
  font-size: 15px; color: var(--ink2); display: flex; align-items: center; gap: 6px;
}
.client-card-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3);
  min-width: 60px;
}
.client-card-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--rule); }

/* Sub-navbar (client edit + contacts pages) */
.sub-navbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}
.sub-navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sub-navbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1.5px solid var(--rule);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.sub-navbar-back:hover { border-color: var(--teal); color: var(--teal); }
.sub-navbar-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.sub-navbar-meta {
  font-size: 13px;
  color: var(--ink3);
}
.sub-navbar-separator {
  color: var(--ink3);
  font-size: 13px;
}
.sub-navbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sub-navbar-breadcrumb {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
}
.sub-navbar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--teal-light);
  color: var(--teal);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
}

/* Edit page layout */
.edit-page-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.edit-page-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
}
.section-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink2);
  margin: 0 0 16px;
  letter-spacing: 0;
}
.section-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.save-bar {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Search bar */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  background: var(--white);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.search-bar input:focus { border-color: var(--teal); }
.search-bar input::placeholder { color: var(--ink3); }
.search-bar-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink3);
  font-size: 14px;
  pointer-events: none;
}

/* Badge variants for contacts */
.badge-ok { background: var(--teal-light); color: var(--teal); }
.badge-warn { background: var(--yellow-light); color: var(--yellow-dark); }
.badge-new { background: var(--coral-light); color: var(--coral); }

/* Dot indicators */
.dot-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.dot-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green { background: var(--teal); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--coral); }


/* Mono font for phone numbers */
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

/* Contact cards (mobile) */
.contact-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.contact-card-name {
  font-weight: 700;
  font-size: 15px;
}
.contact-card-phone {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink3);
}
.contact-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.contact-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}

/* Leads stats bar */
.leads-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.leads-stat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 16px;
  flex: 1;
}
.leads-stat-card .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-coral { background: var(--coral); }
.leads-stat-number {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.leads-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}

/* Badge low (coral) */
.badge-low { background: var(--coral-light); color: var(--coral); }

/* Gcal status on edit page */
.gcal-status-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Desktop */
@media (min-width: 768px) {
  .topbar { height: 60px; padding: 0 32px; }
  .topbar-logo { font-size: 22px; }
  .topbar-actions {
    display: flex; flex-direction: row; gap: 12px; align-items: center;
    position: static; padding: 0; border-bottom: none; background: none;
  }
  .topbar-actions .btn { width: auto; }
  .topbar-toggle { display: none; }
  .page { padding: 32px; }
  .center-page { padding: 0; }
  .overlay { align-items: center; padding: 24px; }
  .confirm-dialog { padding: 32px; }
  .edit-layout { flex-direction: row; gap: 24px; }
  .edit-col-left { flex: 1; }
  .edit-col-right { flex: 1; padding-top: 0; border-top: none; padding-left: 24px; border-left: 1px solid var(--rule); }
  .gcal-section { border-top: 1px solid var(--rule); }
  .desktop-only { display: block; }
  .mobile-only { display: none; }
  .card { padding: 40px; }
  .wizard-body { padding: 32px; }
  /* Sub-navbar responsive */
  .sub-navbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
  }
  /* Edit page 2-column layout */
  .edit-page-body {
    flex-direction: row;
    gap: 24px;
  }
  .edit-page-col { flex: 1; }
  .section-card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .section-card-grid .form-group.full-width {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   CRM Pages
   ============================================================ */
.crm-nav { display: flex; gap: 24px; padding: 0 24px; height: 44px; align-items: center; background: #fff; border-bottom: 1px solid var(--rule); }
.crm-nav a { font-size: 13px; font-weight: 500; color: var(--muted); padding: 10px 0; text-decoration: none; border-bottom: 2px solid transparent; }
.crm-nav a.active { font-weight: 700; color: var(--teal); border-bottom-color: var(--teal); }
.crm-nav a:hover { color: var(--ink); }

.crm-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }

.crm-period-btn { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; border: 1px solid var(--rule); cursor: pointer; background: transparent; color: var(--ink); }
.crm-period-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 600; }
.crm-period-btn:hover:not(.active) { border-color: var(--muted); }

.crm-stat-card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.crm-stat-value { font-size: 32px; font-weight: 900; color: var(--ink); line-height: 1; }
.crm-stat-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.crm-stat-delta { font-size: 13px; font-weight: 600; }
.crm-stat-delta.up { color: var(--teal); }
.crm-stat-delta.down { color: #E74C3C; }
.crm-stat-delta.neutral { color: var(--muted); }
.crm-stat-prev { font-size: 11px; color: var(--muted); }

.crm-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

.crm-period-select { display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--rule); align-items: center; cursor: pointer; font-size: 13px; }
.crm-period-select:hover { border-color: var(--muted); }

.crm-stats-bar { display: flex; gap: 8px; }
.crm-stats-badge { display: inline-flex; gap: 6px; padding: 6px 14px; border-radius: 8px; align-items: center; font-size: 12px; }

.crm-intent-filter { display: flex; gap: 8px; }
.crm-intent-pill { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--rule); background: transparent; }
.crm-intent-pill.active { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 600; }

/* Chat bubbles */
.crm-chat { display: flex; flex-direction: column; gap: 12px; padding: 24px; max-width: 800px; margin: 0 auto; }
.crm-chat-row { display: flex; }
.crm-chat-row.user { justify-content: flex-end; }
.crm-chat-row.bot { justify-content: flex-start; }
.crm-chat-user { background: var(--teal); color: #fff; border-radius: 12px 12px 4px 12px; padding: 10px 14px; max-width: 60%; }
.crm-chat-bot { background: #fff; border: 1px solid var(--rule); border-radius: 12px 12px 12px 4px; padding: 10px 14px; max-width: 60%; color: var(--ink); }
.crm-chat-time { font-size: 10px; margin-top: 4px; }
.crm-chat-user .crm-chat-time { color: rgba(255,255,255,0.5); }
.crm-chat-bot .crm-chat-time { color: var(--muted); }

.crm-event-indicator { display: inline-flex; gap: 4px; align-items: center; font-size: 9px; font-weight: 500; margin-top: 3px; cursor: pointer; }
.crm-event-indicator:hover { opacity: 1; }
.crm-chat-user .crm-event-indicator { color: rgba(255,255,255,0.6); }
.crm-event-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }

/* Events timeline */
.crm-events-panel { background: #FAFAF8; padding: 12px 16px 12px 48px; border-top: 1px solid var(--rule); }
.crm-event-batch { display: flex; flex-direction: column; gap: 4px; }
.crm-event-batch-header { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink); }
.crm-event-batch-details { padding-left: 16px; display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.crm-event-msg { font-style: italic; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }

.crm-tooltip { position: absolute; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 12px; max-width: 280px; z-index: 100; line-height: 1.5; pointer-events: none; }

/* Config modal (CRM contacts/conversations) */
.config-modal { background: #fff; border-radius: 12px; padding: 24px; max-width: 480px; width: 90%; box-shadow: 0 8px 32px rgba(20,18,16,0.12); }
.config-modal-header { display: flex; justify-content: space-between; align-items: center; }
.config-modal-header h4 { margin: 0; font-size: 18px; }
.config-modal-close { cursor: pointer; color: var(--ink3); font-size: 20px; background: none; border: none; padding: 0; }
.config-modal-contact { background: var(--bg); padding: 12px 16px; border-radius: 8px; margin-top: 16px; }
.config-modal-contact-name { font-weight: 700; }
.config-modal-contact-phone { color: var(--ink3); font-size: 12px; margin-top: 4px; }
.config-modal-section { margin-top: 16px; }
.config-modal-label { font-size: 12px; font-weight: 600; color: var(--ink3); margin-bottom: 8px; }
.config-modal-status { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; display: inline-block; }
.config-modal-status-on { background: #E6F4F2; color: var(--teal); }
.config-modal-status-paused { background: #FEFAE8; color: #7A6000; }
.config-modal-status-excluded { background: #FDE8E8; color: #E74C3C; }
.config-modal-status-off { background: var(--bg); color: var(--ink3); }
.config-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.config-modal-actions .btn { width: 100%; text-align: left; cursor: pointer; }
.config-modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.config-modal-footer.has-reset { justify-content: space-between; }
.btn-action-warn { color: #7A6000; border: 1px solid var(--rule); background: transparent; }
.btn-action-danger { color: var(--coral); border: 1.5px solid var(--coral); background: var(--coral-light); }
.config-pause-picker { display: none; padding: 8px 14px; background: #FEFAE8; border-radius: 8px; border: 1px solid #F5C842; }
.config-pause-picker-label { font-size: 11px; color: #7A6000; margin-bottom: 6px; }
.config-pause-picker-btns { display: flex; gap: 6px; }

/* Responsive */
@media (max-width: 768px) {
  .crm-nav { padding: 0 16px; gap: 20px; height: 40px; overflow-x: auto; }
  .crm-nav a { font-size: 12px; white-space: nowrap; }
  .crm-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .crm-stat-value { font-size: 24px; }
  .crm-stat-card { padding: 14px; }
  .crm-chat-user, .crm-chat-bot { max-width: 80%; }
  .crm-events-panel { padding: 8px 14px 12px 14px; }
  .crm-period-btn { padding: 8px 14px; font-size: 13px; }
}
