/* CRM Dashboard styles */
.crm-badge {
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.06em;
}

/* LAYOUT */
.crm-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
}
.crm-sidebar {
  width: 220px;
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}
.crm-main {
  flex: 1;
  padding: 32px 40px;
  min-width: 0;
}

/* SIDEBAR */
.sidebar-section { padding: 0 12px; margin-bottom: 24px; }
.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.sidebar-item:hover, .sidebar-item--active {
  background: var(--accent-dim);
  color: var(--accent);
}
.sidebar-count {
  margin-left: auto;
  background: rgba(255,255,255,0.07);
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 100px;
}

/* STATS ROW */
.crm-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.crm-stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  min-width: 100px;
  flex: 1;
}
.crm-stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.crm-stat-num--accent { color: var(--accent); }
.crm-stat-label {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* SECTION */
.crm-section {}
.crm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.crm-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

/* FILTERS */
.crm-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn:hover { border-color: rgba(0,212,255,0.3); color: var(--accent); }
.filter-btn--active {
  background: var(--accent-dim);
  border-color: rgba(0,212,255,0.3);
  color: var(--accent);
}

/* TABLE */
.crm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.crm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.crm-table thead tr {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.crm-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}
.crm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--fg);
  vertical-align: middle;
}
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.td-name { font-weight: 600; }
.td-email, .td-phone { color: var(--fg-muted); font-size: 12px; }
.td-message { color: var(--fg-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-date { color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.td-empty {
  text-align: center;
  color: var(--fg-muted);
  padding: 48px 16px !important;
  font-size: 14px;
}
.td-empty a { color: var(--accent); }

.source-badge {
  background: rgba(255,255,255,0.06);
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.appt-badge {
  background: rgba(0,212,255,0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* STATUS SELECT */
.status-select {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.status-select:focus { outline: none; border-color: rgba(0,212,255,0.35); }
.status-select option { background: #14141f; }

/* STATUS PILL */
.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}
.status-pill--pending {
  background: rgba(250,204,21,0.12);
  color: #fbbf24;
}
.status-pill--confirmed, .status-pill--booked {
  background: rgba(0,212,255,0.12);
  color: var(--accent);
}
.status-pill--cancelled {
  background: rgba(239,68,68,0.1);
  color: #f87171;
}

@media (max-width: 768px) {
  .crm-layout { flex-direction: column; }
  .crm-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .crm-main { padding: 20px 16px; }
}
