/* === DEMO BANNER === */
.demo-banner {
  background: var(--accent-dim);
  border-bottom: 1px solid var(--accent);
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--fg-muted);
}
.demo-banner a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}

/* === HEADER === */
.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.dash-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.dash-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}
.dash-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
}
.dash-tag {
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-display);
}
.dash-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: var(--bg-card); color: var(--fg); }
.nav-btn.active { background: var(--accent-dim); color: var(--accent); }
.dash-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.biz-name {
  font-size: 14px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-weight: 500;
}
.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }

/* === MAIN LAYOUT === */
.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 100px;
}

/* === TAB SYSTEM === */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === SECTION HEADER === */
.dash-section-header {
  margin-bottom: 24px;
}
.dash-section-header h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--fg);
}
.section-sub {
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* === STATS ROW === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(232,255,46,0.3); }
.stat-card-icon { font-size: 24px; }
.stat-card-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-card-label {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 3px;
}

/* === OVERVIEW GRID === */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* === CARDS === */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.dash-card.full-width { width: 100%; }
.dash-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-card-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}
.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  padding: 0;
}
.card-body { padding: 0; }

/* === LIST ITEMS === */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-elevated); }
.list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  font-family: var(--font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-sub {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-meta {
  font-size: 12px;
  color: var(--fg-muted);
  flex-shrink: 0;
  text-align: right;
}

/* === STATUS BADGES === */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-green { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-yellow { background: rgba(234,179,8,0.15); color: #facc15; }
.badge-red { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-muted { background: var(--bg-elevated); color: var(--fg-muted); border: 1px solid var(--border); }
.badge-accent { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent); }

/* === TABLE VIEW (calls, appts, leads) === */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.data-table td {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.td-muted { color: var(--fg-muted); font-size: 13px; }
.td-mono { font-family: var(--font-display); font-size: 13px; color: var(--fg-muted); }

/* === STATUS SELECT === */
.status-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: var(--font-display);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.status-select:hover { border-color: var(--fg-muted); }

/* === CALL SUMMARY DETAIL === */
.call-summary-text {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  max-width: 360px;
}

/* === AI BADGE === */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 100px;
}

/* === EMPTY STATE === */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--fg-muted);
}
.empty-state-icon { font-size: 32px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* === SKELETON LOADING === */
.skeleton-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skeleton-list::before,
.skeleton-list::after {
  content: '';
  display: block;
  height: 40px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === MOBILE NAV === */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}
.mobile-nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 10px;
  font-family: var(--font-body);
  transition: color 0.15s;
}
.mobile-nav-btn.active { color: var(--accent); }
.mnav-icon { font-size: 20px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .dash-nav { display: none; }
  .mobile-nav { display: flex; }
  .biz-name { display: none; }
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) { display: none; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-card-num { font-size: 22px; }
  .dash-main { padding: 20px 12px 100px; }
  .data-table th:nth-child(3),
  .data-table td:nth-child(3) { display: none; }
}
