/* ============================================================
   AI Agency Dashboard — Design System
   Dark navy theme, accent #4dabf7
   ============================================================ */

:root {
  --bg-primary:    #0f1117;
  --bg-secondary:  #161b27;
  --bg-card:       #1a2035;
  --bg-card-hover: #1f2744;
  --bg-input:      #1e2438;
  --border:        #2a3352;
  --border-light:  #334066;

  --accent:        #4dabf7;
  --accent-dim:    #2e86d4;
  --accent-glow:   rgba(77, 171, 247, 0.15);

  --text-primary:  #e8eaf6;
  --text-secondary:#8fa3c8;
  --text-muted:    #5a6e94;
  --text-accent:   #4dabf7;

  --green:         #40c057;
  --green-dim:     rgba(64, 192, 87, 0.15);
  --yellow:        #fab005;
  --yellow-dim:    rgba(250, 176, 5, 0.15);
  --red:           #fa5252;
  --red-dim:       rgba(250, 82, 82, 0.15);
  --purple:        #7950f2;
  --purple-dim:    rgba(121, 80, 242, 0.15);

  --sidebar-width: 240px;
  --header-height: 60px;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(77,171,247,0.2);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(77,171,247,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(121,80,242,0.06) 0%, transparent 60%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-card);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.login-logo-img {
  width: 200px;
  height: auto;
  object-fit: contain;
}

.login-logo-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Sidebar logo */
.sidebar-logo {
  width: 160px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  padding: 0.25rem 0;
}

.sidebar-client {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-muted); }

.pin-input {
  letter-spacing: 0.4em;
  font-size: 1.4rem;
  text-align: center;
  font-family: var(--mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--accent);
  color: #0f1117;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
}
.btn-primary:hover {
  background: #74c0fc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-light); color: var(--text-primary); }

.login-error {
  background: var(--red-dim);
  border: 1px solid rgba(250,82,82,0.3);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}
.login-error.visible { display: block; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.client-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.client-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}

.client-info h3 {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 145px;
}
.client-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sidebar-agency {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.agency-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}
.agency-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem;
  margin: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: transparent;
  width: calc(100% - 1rem);
  text-align: left;
}
.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(77,171,247,0.2);
}
.nav-item .nav-icon {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #0f1117;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top header bar ── */
.topbar {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.topbar-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.last-updated {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.refresh-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.85rem;
}
.refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.refresh-btn.spinning { animation: spin 1s linear infinite; }

.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ── Page sections ── */
.page-section {
  padding: 1.5rem;
  display: none;
  animation: fadeIn 0.25s ease;
}
.page-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CARDS & GRIDS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
}
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Stat cards grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover::before { opacity: 1; }

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-value .stat-unit {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 2px;
}

.stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stat-change {
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }
.stat-change.flat { color: var(--text-muted); }

.sparkline-wrapper {
  height: 32px;
  flex: 1;
}

/* Content cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.card-body { padding: 1.25rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Chart containers */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.chart-card .chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.chart-wrap {
  position: relative;
}
.chart-wrap canvas { max-width: 100%; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(42,51,82,0.5);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table td.primary { color: var(--text-primary); font-weight: 500; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-red    { background: var(--red-dim);    color: var(--red); }
.badge-blue   { background: var(--accent-glow); color: var(--accent); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-muted  { background: rgba(90,110,148,0.15); color: var(--text-muted); }

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(42,51,82,0.5);
  font-size: 0.85rem;
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.activity-icon.lead    { background: var(--accent-glow);  color: var(--accent); }
.activity-icon.social  { background: var(--purple-dim);   color: var(--purple); }
.activity-icon.seo     { background: var(--green-dim);    color: var(--green); }
.activity-icon.meeting { background: var(--yellow-dim);   color: var(--yellow); }

.activity-body { flex: 1; }
.activity-text { color: var(--text-secondary); line-height: 1.4; }
.activity-text strong { color: var(--text-primary); }
.activity-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   ACTION ITEMS
   ============================================================ */
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(42,51,82,0.5);
}
.action-item:last-child { border-bottom: none; }
.action-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all var(--transition);
}
.action-checkbox:hover { border-color: var(--accent); }
.action-checkbox.checked {
  background: var(--green);
  border-color: var(--green);
}
.action-body { flex: 1; }
.action-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.action-text.checked { text-decoration: line-through; color: var(--text-muted); }
.action-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4px;
}
.action-owner {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.action-due {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================================
   MEETING CARDS
   ============================================================ */
.meeting-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.meeting-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition);
}
.meeting-card:hover { border-color: var(--border-light); }
.meeting-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 1rem;
}
.meeting-title {
  font-size: 0.9rem;
  font-weight: 600;
}
.meeting-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.meeting-snippet {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}
.meeting-attendees {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.attendee-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ============================================================
   NEXT MEETING CARD
   ============================================================ */
.next-meeting-card {
  background: linear-gradient(135deg, rgba(77,171,247,0.08), rgba(121,80,242,0.08));
  border: 1px solid rgba(77,171,247,0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.next-meeting-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.next-meeting-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.next-meeting-when {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.prep-checklist { display: flex; flex-direction: column; gap: 0.4rem; }
.prep-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.prep-item .check { color: var(--green); font-size: 0.75rem; }
.prep-item .pending { color: var(--text-muted); font-size: 0.75rem; }

/* ============================================================
   CALENDAR STRIP
   ============================================================ */
.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
.cal-day {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  text-align: center;
}
.cal-day.today {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.cal-day-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.cal-day-num {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.cal-posts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-post-dot {
  font-size: 0.6rem;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent-glow);
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-post-dot.linkedin { background: rgba(0,119,181,0.2); color: #4dabf7; }
.cal-post-dot.instagram { background: rgba(225,48,108,0.15); color: #f783ac; }
.cal-post-dot.twitter { background: rgba(29,161,242,0.15); color: #74c0fc; }
.cal-post-dot.facebook { background: rgba(66,103,178,0.15); color: #91a7ff; }

/* ============================================================
   SEO PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  background: var(--bg-secondary);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}
.progress-label span:first-child { color: var(--text-secondary); }
.progress-label span:last-child { color: var(--accent); font-weight: 600; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}
.empty-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.empty-text {
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
}
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-value {
  height: 28px;
  width: 70%;
  border-radius: 6px;
}

/* ============================================================
   OVERLAY / MOBILE SIDEBAR TOGGLE
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}
.sidebar-overlay.visible { display: block; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FUNNEL BARS (pseudo-funnel via bar chart)
   ============================================================ */
.funnel-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
}
.funnel-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.funnel-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 90px;
  flex-shrink: 0;
  text-align: right;
}
.funnel-bar-wrap {
  flex: 1;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.funnel-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.funnel-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 50px;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .three-col  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .calendar-strip { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .hamburger {
    display: flex;
  }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .three-col  { grid-template-columns: 1fr; }
  .page-section { padding: 1rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .two-col    { grid-template-columns: 1fr; }
  .calendar-strip { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.8rem; }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--mono); font-size: 0.85em; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w-full { width: 100%; }

/* ============================================================
   LEADS TABLE ENHANCEMENTS
   ============================================================ */

/* Filter tabs */
.leads-filter-tabs {
  display: flex; gap: .35rem; flex-wrap: wrap;
}
.leads-filter-tab {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-secondary);
  font-size: .78rem; font-weight: 500; padding: .3rem .75rem;
  cursor: pointer; transition: all .15s; font-family: var(--font);
}
.leads-filter-tab:hover { border-color: var(--border-light); color: var(--text-primary); }
.leads-filter-tab.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* ICP match bar */
.icp-match {
  display: flex; align-items: center; gap: .5rem; min-width: 110px;
}
.icp-bar-track {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--border); overflow: hidden;
}
.icp-bar-fill {
  height: 100%; border-radius: 3px; transition: width .3s ease;
}
.icp-pct {
  font-size: .78rem; font-weight: 600; min-width: 34px; text-align: right;
}
.icp-high  { background: var(--green); }
.icp-mid   { background: var(--yellow); }
.icp-low   { background: var(--red); }
.icp-high-text { color: var(--green); }
.icp-mid-text  { color: var(--yellow); }
.icp-low-text  { color: var(--red); }

/* Clickable lead row */
.lead-row { cursor: pointer; }
.lead-row:hover td { background: var(--bg-card-hover); }
.lead-row.expanded td { background: var(--bg-card-hover); border-bottom: none; }

/* Touchpoint badge */
.touch-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-input); border: 1px solid var(--border);
  font-size: .72rem; font-weight: 700; color: var(--text-secondary);
}

/* Detail contact row */
.detail-contact-row {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text-secondary); font-size: .83rem;
}
.detail-contact-row a { color: var(--accent); text-decoration: none; }
.detail-contact-row a:hover { text-decoration: underline; }
.detail-label {
  font-size: .7rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; min-width: 60px;
}

/* ICP note item */
.icp-note-item {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .35rem 0; border-bottom: 1px solid var(--border);
  font-size: .82rem; color: var(--text-secondary); line-height: 1.4;
}
.icp-note-item:last-child { border-bottom: none; }
.icp-note-icon { flex-shrink: 0; margin-top: 1px; }
