/* ============================================================
   FlowCRM — Main Stylesheet
   File: css/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600&display=swap');

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

:root {
  --blue: #1A73E8; --blue-light: #E8F0FE; --blue-dark: #1557B0;
  --green: #1E8E3E; --green-light: #E6F4EA;
  --red: #D93025; --red-light: #FCE8E6;
  --amber: #F9AB00; --amber-light: #FEF3CD;
  --purple: #7B1FA2; --purple-light: #F3E5F5;
  --teal: #00897B; --teal-light: #E0F2F1;
  --gray1: #F8F9FA; --gray2: #F1F3F4; --gray3: #E8EAED;
  --gray4: #BDC1C6; --gray5: #80868B; --gray6: #5F6368;
  --text: #202124; --text2: #3C4043; --text3: #5F6368;
  --border: #DADCE0; --white: #fff;
  --shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  --shadow-md: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
  --radius: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --font: 'Google Sans', 'Inter', -apple-system, sans-serif;
  --sidebar-w: 220px; --header-h: 56px;
}

body {
  font-family: var(--font);
  background: var(--gray1);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray5); }

/* ── Header ─────────────────────────────────────────────── */
.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: var(--sidebar-w);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}

.logo-mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #1A73E8, #4285F4);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.search-bar {
  flex: 1;
  max-width: 720px;
  position: relative;
}

.search-bar input {
  width: 100%;
  height: 40px;
  background: var(--gray1);
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 0 44px 0 18px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  transition: .2s;
  outline: none;
}

.search-bar input:focus {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,115,232,.2);
}

.search-bar input::placeholder { color: var(--gray5); }

.search-icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--gray5);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray6);
  transition: .15s;
  position: relative;
  font-size: 18px;
}

.icon-btn:hover { background: var(--gray2); }

.notif-badge {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A73E8, #34A853);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── App Body ─────────────────────────────────────────── */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 8px 0 16px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray5);
  padding: 12px 16px 4px;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  height: 40px;
  border-radius: var(--radius);
  margin: 1px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray6);
  transition: background .12s, color .12s;
  position: relative;
  text-decoration: none;
  user-select: none;
}

.nav-item:hover { background: var(--gray2); color: var(--text); }
.nav-item.active { background: var(--blue-light); color: var(--blue); }

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item .count {
  margin-left: auto;
  font-size: 11px;
  background: var(--blue);
  color: white;
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 600;
}

.nav-item .count.red { background: var(--red); }

.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Main Content ─────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn .18s ease; }

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

.page-inner { padding: 24px; }

/* ── Page Header ─────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title { font-size: 22px; font-weight: 500; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--gray5); margin-top: 2px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .12s, border-color .12s;
  color: var(--text2);
  white-space: nowrap;
}

.btn:hover { background: var(--gray2); border-color: var(--gray4); }
.btn.primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { background: var(--red); color: white; border-color: var(--red); }
.btn.success { background: var(--green); color: white; border-color: var(--green); }

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-sm {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

/* ── Stats Grid ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}

.stat-icon {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.stat-label {
  font-size: 11px;
  color: var(--gray5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  margin: 6px 0 4px;
  line-height: 1;
}

.stat-change { font-size: 12px; display: flex; align-items: center; gap: 3px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── Grids ───────────────────────────────────────────── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ── Charts ─────────────────────────────────────────── */
.chart-container {
  height: 140px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0 2px;
}

.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: .25s;
  cursor: pointer;
}

.bar:hover { filter: brightness(.88); }
.bar-label { font-size: 10px; color: var(--gray5); }
.bar-val { font-size: 9px; color: var(--gray6); font-weight: 600; }

/* ── Progress ────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--gray3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

/* ── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
}

.badge.blue   { background: var(--blue-light); color: var(--blue); }
.badge.green  { background: var(--green-light); color: var(--green); }
.badge.red    { background: var(--red-light); color: var(--red); }
.badge.amber  { background: var(--amber-light); color: #B06000; }
.badge.purple { background: var(--purple-light); color: var(--purple); }
.badge.teal   { background: var(--teal-light); color: var(--teal); }
.badge.gray   { background: var(--gray2); color: var(--gray6); }

/* ── Tags ────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px;
}

.tag.green { background: var(--green-light); color: var(--green); }
.tag.amber { background: var(--amber-light); color: #B06000; }
.tag.red   { background: var(--red-light); color: var(--red); }

/* ── Table ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray5);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  background: var(--gray1);
  white-space: nowrap;
}

td { padding: 12px 16px; border-bottom: 1px solid var(--gray3); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray1); }

/* ── Kanban ──────────────────────────────────────────── */
.kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-col { flex-shrink: 0; width: 220px; }

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.kanban-title { font-size: 12px; font-weight: 600; }
.kanban-count { font-size: 11px; border-radius: 10px; padding: 1px 7px; }

.kanban-body {
  background: var(--gray2);
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 300px;
  padding: 8px;
}

.kcard {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: box-shadow .15s, transform .15s;
}

.kcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kcard:active { cursor: grabbing; }
.kcard-name { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.kcard-company { font-size: 11px; color: var(--gray5); margin-bottom: 8px; }

.kcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kcard-value { font-size: 12px; font-weight: 600; color: var(--green); }

.score-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gray3); display: inline-block; margin: 0 1px; }
.score-dot.filled { background: var(--amber); }

/* ── Dialer ──────────────────────────────────────────── */
.dialer {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  width: 240px;
  text-align: center;
}

.dialer-display {
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.dialer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.dial-btn {
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background .1s;
  color: var(--text);
}

.dial-btn:hover { background: var(--gray1); }
.dial-btn:active { transform: scale(.95); }
.dial-btn.call { background: var(--green); color: white; border-color: var(--green); border-radius: 22px; }
.dial-btn.call:hover { background: #1a7c35; }

/* ── Call Cards ─────────────────────────────────────── */
.call-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1px;
}

.call-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

/* ── WhatsApp Chat ───────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 500px;
}

.chat-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--white);
}

.chat-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray3);
  display: flex;
  gap: 10px;
  align-items: center;
  transition: background .1s;
}

.chat-item:hover { background: var(--gray1); }
.chat-item.active { background: var(--blue-light); }

.chat-av {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.chat-main { display: flex; flex-direction: column; background: #ECE5DD; }

.chat-top {
  background: var(--white);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg {
  max-width: 65%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.msg.in  { background: var(--white); align-self: flex-start; border-top-left-radius: 2px; }
.msg.out { background: #DCF8C6; align-self: flex-end; border-top-right-radius: 2px; }
.msg-time { font-size: 10px; color: var(--gray5); margin-top: 3px; text-align: right; }

.chat-input-bar {
  background: var(--white);
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--border);
}

.chat-input-bar input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 14px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}

/* ── Calendar ────────────────────────────────────────── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 4px;
}

.cal-header {
  text-align: center;
  font-size: 11px;
  color: var(--gray5);
  font-weight: 600;
  padding: 4px 0;
}

.cal-day {
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background .1s;
  position: relative;
}

.cal-day:hover { background: var(--gray2); }
.cal-day.today { background: var(--blue); color: white; font-weight: 600; }
.cal-day.other { color: var(--gray4); }

.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--red);
}

.cal-day.today::after { background: white; }

/* ── Settings ────────────────────────────────────────── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray3);
}

.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 14px; color: var(--text); }
.settings-desc { font-size: 12px; color: var(--gray5); margin-top: 2px; }

.toggle {
  width: 36px; height: 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  position: relative;
  flex-shrink: 0;
}

.toggle.on  { background: var(--blue); }
.toggle.off { background: var(--gray4); }

.toggle::after {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.toggle.on::after  { left: 18px; }
.toggle.off::after { left: 2px; }

/* ── Tabs ────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: var(--gray5);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  font-weight: 500;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── AI Badge ─────────────────────────────────────────── */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #7B1FA2, #3949AB);
  color: white;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

.ai-card {
  background: linear-gradient(135deg, #F3E5F5, #EDE7F6);
  border-color: #CE93D8;
}

/* ── Profile ─────────────────────────────────────────── */
.profile-cover {
  height: 120px;
  background: linear-gradient(135deg, #1A73E8, #4285F4, #34A853);
}

.profile-av {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EA4335, #FBBC04);
  border: 4px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: white;
  font-weight: 600;
  margin-top: -40px;
  margin-left: 24px;
}

.profile-info { padding: 12px 24px 24px; }
.profile-name { font-size: 22px; font-weight: 500; }
.profile-role { font-size: 13px; color: var(--gray5); margin-top: 2px; }

/* ── Call Popup ──────────────────────────────────────── */
.call-popup {
  position: fixed;
  top: 68px; right: 16px;
  width: 300px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-md);
  z-index: 500;
  animation: slideIn .3s ease;
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.pulse-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #4CAF50);
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: white;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(30,142,62,.5); }
  70%  { box-shadow: 0 0 0 10px rgba(30,142,62,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,142,62,0); }
}

.call-popup-name { font-size: 17px; font-weight: 500; text-align: center; }
.call-popup-sub  { font-size: 12px; color: var(--gray5); text-align: center; margin: 4px 0 14px; }

.call-popup-actions { display: flex; gap: 10px; }

.call-accept, .call-decline {
  flex: 1;
  height: 42px;
  border-radius: 21px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: background .15s;
}

.call-accept  { background: var(--green); color: white; }
.call-accept:hover { background: #1a7c35; }
.call-decline { background: var(--red); color: white; }
.call-decline:hover { background: #c62828; }

/* ── FAB ─────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background .15s, transform .15s;
  z-index: 200;
  font-size: 26px;
  line-height: 1;
}

.fab:hover { background: var(--blue-dark); transform: scale(1.07); }

/* ── Form Inputs ─────────────────────────────────────── */
.form-input {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,115,232,.15);
}

.filter-select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  font-family: var(--font);
  font-size: 13px;
  background: white;
  cursor: pointer;
  color: var(--text);
  outline: none;
}

.filter-select:focus { border-color: var(--blue); }

/* ── Activity Timeline ───────────────────────────────── */
.activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray3);
}

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

.activity-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  margin-top: 1px;
}

.activity-text { flex: 1; font-size: 13px; color: var(--text2); line-height: 1.4; }
.activity-text b { color: var(--text); font-weight: 500; }
.activity-time { font-size: 11px; color: var(--gray5); flex-shrink: 0; margin-top: 3px; white-space: nowrap; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { position: fixed; left: -220px; top: var(--header-h); height: calc(100vh - var(--header-h)); width: 220px; z-index: 200; transition: left .25s; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-md); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { display: none; }
  .page-inner { padding: 16px; }
}
