/* ============================================
   BADANTI — Design System v2
   Aesthetic: Modern Healthcare SaaS
   Palette: Ocean Blue → Teal gradient
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&family=Sora:wght@300;400;500;600;700;800&display=swap');

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

:root {
  /* Ocean Blue → Teal palette */
  --primary: #0C8CE9;
  --primary-hover: #0A7AD4;
  --primary-dark: #0862A8;
  --primary-light: #5CB8FF;
  --primary-50: #EFF8FF;
  --primary-100: #D1ECFF;
  --primary-200: #A3D9FF;
  --accent: #10B981;
  --accent-light: #D1FAE5;
  --accent-hover: #059669;
  --secondary: #6366F1;
  --secondary-light: #E0E7FF;

  /* Neutrals — cool-toned */
  --bg: #F0F4F8;
  --bg-elevated: #F7F9FC;
  --surface: #FFFFFF;
  --surface-hover: #FAFBFD;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Status */
  --success: #10B981;
  --success-bg: #D1FAE5;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --danger: #EF4444;
  --danger-bg: #FEE2E2;
  --info: #3B82F6;
  --info-bg: #DBEAFE;

  /* Shadows — modern layered */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 4px 6px -1px rgba(15,23,42,0.07), 0 2px 4px -2px rgba(15,23,42,0.05);
  --shadow-md: 0 10px 30px -5px rgba(15,23,42,0.08), 0 4px 10px -6px rgba(15,23,42,0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15,23,42,0.12), 0 8px 16px -8px rgba(15,23,42,0.06);
  --shadow-glow: 0 0 24px rgba(12,140,233,0.18);
  --shadow-card: 0 1px 3px rgba(15,23,42,0.04), 0 6px 16px rgba(15,23,42,0.03);

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 0.68, 0, 1);
  --duration: 0.2s;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: 'Sora', sans-serif; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }
.font-sans { font-family: 'Sora', sans-serif; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.15rem; }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* --- Layout --- */
.page { display: flex; min-height: 100vh; }
.page-full { flex-direction: column; }

/* --- Sidebar --- */
.sidebar {
  width: 272px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFC 100%);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(15,23,42,0.03);
}
.sidebar-admin {
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  border-right: none;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.main { flex: 1; margin-left: 272px; }

/* --- Sidebar logo --- */
.sidebar-logo {
  padding: 0.25rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.75rem;
}
.sidebar-admin .sidebar-logo { border-bottom-color: rgba(255,255,255,0.06); }
.sidebar-logo h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-admin .sidebar-logo h2 {
  background: linear-gradient(135deg, #5CB8FF 0%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-logo h2 a {
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.sidebar-logo span {
  display: block;
  font-size: 0.68rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.2rem;
}
.sidebar-admin .sidebar-logo span { color: rgba(255,255,255,0.3); }

/* --- Nav items --- */
.nav-section {
  padding: 1.25rem 1.75rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.sidebar-admin .nav-section { color: rgba(255,255,255,0.2); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.75rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover {
  background: var(--primary-50);
  color: var(--primary);
  border-left-color: var(--primary-100);
}
.nav-item.active {
  background: linear-gradient(90deg, var(--primary-50), transparent);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}
.sidebar-admin .nav-item { color: rgba(255,255,255,0.5); }
.sidebar-admin .nav-item:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85); border-left-color: rgba(255,255,255,0.12); }
.sidebar-admin .nav-item.active { background: linear-gradient(90deg, rgba(12,140,233,0.12), transparent); color: #5CB8FF; border-left-color: #5CB8FF; }
.nav-icon { font-size: 1.1rem; width: 22px; text-align: center; opacity: 0.85; }
.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(12,140,233,0.3);
}

/* --- Topbar --- */
.topbar {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}
.topbar-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.topbar-search { position: relative; }
.topbar-search input {
  padding: 0.5rem 0.9rem 0.5rem 2.4rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  width: 260px;
  background: var(--bg);
  color: var(--text);
  transition: all var(--duration) var(--ease);
}
.topbar-search input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: var(--shadow-glow);
}
.topbar-search::before {
  content: '';
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
}
.topbar-search::after {
  content: '';
  position: absolute;
  left: 1.7rem;
  top: 62%;
  width: 5px; height: 2px;
  background: var(--text-muted);
  transform: rotate(45deg);
  border-radius: 1px;
}
.notif-bell {
  position: relative;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
}
.notif-bell:hover { background: var(--primary-50); }
.notif-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 9px; height: 9px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* --- Content --- */
.content { padding: 2rem; max-width: 1200px; }
.content-wide { padding: 2rem; }

/* --- Grid --- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
}

/* --- Flex --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-05 { gap: 0.5rem; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* --- Card --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s var(--ease);
  position: relative;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-200); }
.card-flat { box-shadow: none; border: none; background: var(--bg); }

/* --- Card with accent bar --- */
.card-accent {
  border-left: 4px solid var(--primary);
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}
.card-accent-success { border-left-color: var(--success); }
.card-accent-warning { border-left-color: var(--warning); }
.card-accent-danger { border-left-color: var(--danger); }
.card-accent-info { border-left-color: var(--info); }
.card-accent-muted { border-left-color: var(--text-muted); }

/* --- Welcome / Hero card --- */
.card-hero {
  background: linear-gradient(135deg, #EFF8FF 0%, #D1ECFF 40%, #E0F2FE 100%);
  border: 1px solid var(--primary-100);
  position: relative;
  overflow: hidden;
}
.card-hero::before {
  content: '';
  position: absolute;
  top: -60%; right: -15%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(12,140,233,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.card-hero::after {
  content: '';
  position: absolute;
  bottom: -40%; left: -10%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

/* --- Stat Card --- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.stat-card:hover::after { opacity: 1; }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.stat-value { font-family: 'Sora', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.15rem; }
.stat-change { font-size: 0.75rem; margin-top: 0.5rem; font-weight: 600; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0A7AD4 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(12,140,233,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #0A7AD4 0%, #0862A8 100%); color: white; box-shadow: 0 6px 20px rgba(12,140,233,0.35); transform: translateY(-1px); }
.btn-secondary {
  background: var(--primary-50);
  color: var(--primary);
  border: 1.5px solid var(--primary-200);
}
.btn-secondary:hover { background: var(--primary-100); color: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { background: var(--bg); color: var(--text); border-color: var(--text-muted); }
.btn-success { background: linear-gradient(135deg, #10B981, #059669); color: white; box-shadow: 0 2px 10px rgba(16,185,129,0.3); }
.btn-success:hover { background: linear-gradient(135deg, #059669, #047857); color: white; transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; box-shadow: 0 2px 8px rgba(239,68,68,0.3); }
.btn-danger:hover { background: linear-gradient(135deg, #DC2626, #B91C1C); color: white; }
.btn-warning { background: linear-gradient(135deg, #F59E0B, #D97706); color: white; }
.btn-ghost { background: none; border: none; color: var(--text-secondary); padding: 0.4rem 0.75rem; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 0.95rem; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius);
  background: none;
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration) var(--ease);
}
.btn-icon:hover { background: var(--bg); border-color: var(--text-muted); }

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.badge-primary { background: var(--primary-100); color: var(--primary-dark); }
.badge-success { background: var(--success-bg); color: #065F46; }
.badge-warning { background: var(--warning-bg); color: #92400E; }
.badge-danger { background: var(--danger-bg); color: #991B1B; }
.badge-info { background: var(--info-bg); color: #1E40AF; }
.badge-neutral { background: #F1F5F9; color: var(--text-secondary); }
.badge-accent { background: var(--accent-light); color: #065F46; }

/* --- Avatar --- */
.avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
  color: var(--primary-dark);
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
}
.avatar-sm { width: 34px; height: 34px; font-size: 0.72rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar-rose { background: linear-gradient(135deg, #FDE8F0, #FBCFE8); color: #9D174D; }
.avatar-blue { background: linear-gradient(135deg, #DBEAFE, #93C5FD); color: #1E3A8A; }
.avatar-amber { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #78350F; }
.avatar-admin { background: linear-gradient(135deg, #1E293B, #334155); color: #5CB8FF; }
.avatar-green { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #064E3B; }

/* --- Form --- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--surface);
  color: var(--text);
  transition: all var(--duration) var(--ease);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12,140,233,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-row { display: flex; gap: 1rem; }
.form-row > * { flex: 1; }
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  accent-color: var(--primary);
  width: 16px; height: 16px;
  cursor: pointer;
}

/* --- Radio pills --- */
.radio-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.radio-pill {
  padding: 0.45rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: flex; align-items: center; gap: 0.4rem;
  font-weight: 500;
}
.radio-pill:hover { border-color: var(--primary-light); background: var(--primary-50); }
.radio-pill.selected {
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(12,140,233,0.12);
}

/* --- Table --- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
table { width: 100%; border-collapse: collapse; }
thead { background: linear-gradient(180deg, var(--bg-elevated), var(--bg)); }
th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr { transition: background 0.15s var(--ease); }
tr:hover td { background: var(--primary-50); }

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
}
.tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* --- Chat --- */
.chat-layout { display: flex; height: calc(100vh - 53px); }
.chat-list {
  width: 340px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface);
}
.chat-list-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}
.chat-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.chat-contact:hover { background: var(--primary-50); }
.chat-contact.active { background: linear-gradient(90deg, var(--primary-50), transparent); border-left: 3px solid var(--primary); }
.chat-contact-info { flex: 1; min-width: 0; }
.chat-contact-name { font-weight: 600; font-size: 0.9rem; }
.chat-contact-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact-time { font-size: 0.68rem; color: var(--text-muted); }
.chat-contact-unread {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(12,140,233,0.3);
}
.chat-main { flex: 1; display: flex; flex-direction: column; background: var(--bg-elevated); }
.chat-header {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
}
.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-bubble {
  max-width: 60%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.55;
}
.chat-bubble .chat-time {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.chat-bubble.sent {
  background: linear-gradient(135deg, var(--primary), #0A7AD4);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 12px rgba(12,140,233,0.25);
}
.chat-bubble.sent .chat-time { color: rgba(255,255,255,0.6); }
.chat-bubble.received {
  background: var(--surface);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}
.chat-proposal {
  background: linear-gradient(135deg, var(--primary-50), var(--surface));
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  max-width: 70%;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}
.chat-proposal h4 { color: var(--primary-dark); margin-bottom: 0.5rem; }
.chat-input-bar {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: var(--surface);
}
.chat-input-bar input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
}
.chat-input-bar input:focus { outline: none; border-color: var(--primary); background: var(--surface); }

/* --- Timeline / Journal --- */
.timeline { position: relative; padding-left: 2.25rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 4px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-200), var(--border));
}
.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.25rem;
  top: 0.5rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--surface);
  z-index: 1;
  margin-left: 3px;
  box-shadow: 0 0 0 3px rgba(12,140,233,0.12);
}
.timeline-item.upcoming::before {
  background: var(--border);
  border-color: var(--bg);
  box-shadow: none;
}
.timeline-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-top: 0.35rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease);
}
.timeline-content:hover { box-shadow: var(--shadow-sm); transform: translateX(4px); }
.timeline-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --- Stars --- */
.stars { color: var(--warning); font-size: 0.88rem; letter-spacing: 1px; }
.stars-lg { font-size: 1.15rem; }

/* --- Progress --- */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s var(--ease);
}

/* --- Divider --- */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* --- Landing page --- */
.landing-nav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 0.85rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226,232,240,0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}
.landing-nav .logo {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-hero {
  background: linear-gradient(160deg, #0F172A 0%, #0C3547 25%, #0C8CE9 55%, #10B981 100%);
  color: white;
  padding: 7rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -100px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}
.landing-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -50px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.landing-hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: 3.4rem;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.landing-hero p { font-size: 1.1rem; opacity: 0.85; max-width: 560px; margin: 0 auto 2.5rem; line-height: 1.7; }
.landing-features {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease);
  background: var(--surface);
  border: 1px solid var(--border);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); border-color: var(--primary-200); }
.feature-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
}
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.landing-cta {
  background: linear-gradient(135deg, var(--primary-50), var(--bg));
  padding: 5rem 2rem;
  text-align: center;
}

/* --- Login --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(160deg, #0F172A 0%, #0C3547 50%, var(--primary) 100%);
  border-radius: 0 0 48px 48px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
}
.login-card h1 { text-align: center; margin-bottom: 0.3rem; }
.login-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; font-size: 0.9rem; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.social-btn {
  width: 100%;
  padding: 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.88rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--duration) var(--ease);
  margin-bottom: 0.6rem;
  color: var(--text);
  font-weight: 500;
}
.social-btn:hover { background: var(--bg); border-color: var(--text-muted); box-shadow: var(--shadow-sm); }

/* --- Filter bar --- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}

/* --- Checkin circle --- */
.checkin-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  margin: 0 auto;
  border: 4px solid;
  transition: all 0.3s var(--ease);
}
.checkin-circle.active {
  background: var(--success-bg);
  border-color: var(--success);
  box-shadow: 0 0 0 8px rgba(16,185,129,0.08);
}
.checkin-circle.inactive {
  background: var(--primary-50);
  border-color: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 0 8px rgba(12,140,233,0.06);
}
.checkin-circle.inactive:hover {
  box-shadow: 0 0 0 12px rgba(12,140,233,0.12), var(--shadow-glow);
  transform: scale(1.05);
}

/* --- Upload area --- */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  background: var(--bg-elevated);
}
.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(12,140,233,0.06);
}

/* --- Step indicator --- */
.step-list { display: flex; flex-direction: column; gap: 1.5rem; }
.step-item { display: flex; gap: 1rem; align-items: flex-start; }
.step-number {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0A7AD4);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(12,140,233,0.25);
  font-family: 'Sora', sans-serif;
}

/* --- Bar chart (simple CSS) --- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: 180px;
  padding: 1rem 0;
}
.bar-chart .bar {
  width: 44px;
  border-radius: 8px 8px 0 0;
  transition: all 0.4s var(--ease);
  position: relative;
}
.bar-chart .bar:hover { opacity: 0.85; transform: scaleY(1.03); transform-origin: bottom; }
.bar-chart .bar.muted { background: linear-gradient(180deg, var(--primary-200), var(--primary-100)); }
.bar-chart .bar.current { background: linear-gradient(180deg, var(--primary), var(--accent)); box-shadow: 0 4px 16px rgba(12,140,233,0.3); }

/* --- Spacing --- */
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; } .p-2 { padding: 1rem; } .p-3 { padding: 1.5rem; }

/* --- Misc --- */
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.relative { position: relative; }
.opacity-50 { opacity: 0.5; }
.line-through { text-decoration: line-through; color: var(--text-muted); }
.list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.15s var(--ease);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--primary-50); margin: 0 -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; border-radius: var(--radius-sm); }

/* --- Smooth page transition --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.content, .content-wide { animation: fadeUp 0.45s var(--ease); }

/* --- Footer --- */
.landing-footer {
  background: #0F172A;
  color: rgba(255,255,255,0.6);
  padding: 3rem 2rem 2rem;
  font-size: 0.85rem;
}
.landing-footer a { color: rgba(255,255,255,0.8); }
.landing-footer a:hover { color: white; }
.landing-footer h4 { color: white; font-size: 0.95rem; margin-bottom: 0.75rem; }

/* --- Testimonial --- */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s var(--ease);
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  font-family: 'Sora', sans-serif;
  font-size: 4rem;
  color: var(--primary-100);
  position: absolute;
  top: 0.5rem; left: 1.25rem;
  line-height: 1;
}
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* --- Pricing / Plan card --- */
.plan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s var(--ease);
}
.plan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.plan-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}
.plan-card.featured::before {
  content: 'Populaire';
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 1rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plan-price {
  font-family: 'Sora', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 1rem 0 0.25rem;
}
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

/* --- Notification item --- */
.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
  border-bottom: 1px solid var(--border-light);
}
.notif-item:hover { background: var(--primary-50); }
.notif-item.unread { background: var(--primary-50); border-left: 3px solid var(--primary); }

/* --- Metric row --- */
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}
.metric-row:last-child { border-bottom: none; }

/* Demo badge - displayed on all prototype pages */
body::after {
  content: "Prototype démo";
  position: fixed;
  bottom: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
  pointer-events: none;
}

/* ====================================================
   RESPONSIVE — tablette & mobile
   ==================================================== */

/* Hamburger button (injected by responsive.js on dashboards) */
.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text);
  margin-right: 0.5rem;
}
.menu-toggle:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary-200); }

/* Sidebar backdrop on mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  z-index: 95;
  backdrop-filter: blur(2px);
}

/* Mobile menu toggle for landing nav */
.landing-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* ===== Tablette (<= 1024px) ===== */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .topbar-search input { width: 180px; }
  .landing-hero h1 { font-size: 2.6rem; }
  .landing-nav { padding: 0.75rem 1.25rem; }
  .landing-nav .btn { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
  .content, .content-wide { padding: 1.5rem; }
  .chat-list { width: 280px; }
  .chat-bubble { max-width: 75%; }
  .chat-proposal { max-width: 85%; }
}

/* ===== Mobile (<= 768px) ===== */
@media (max-width: 768px) {
  /* Sidebar drawer behaviour */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    width: 260px;
    box-shadow: 8px 0 32px rgba(15,23,42,0.18);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

  /* Topbar */
  .topbar { padding: 0.6rem 1rem; gap: 0.5rem; }
  .topbar-title { font-size: 0.95rem; }
  .topbar-search { display: none; }
  .topbar-actions { gap: 0.5rem; }

  /* Content */
  .content, .content-wide { padding: 1rem; }
  .grid { gap: 1rem; }

  /* Landing nav: stack with toggle */
  .landing-nav { padding: 0.7rem 1rem; flex-wrap: wrap; }
  .landing-nav-toggle { display: inline-flex; }
  .landing-nav > .flex {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.4rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    margin-top: 0.6rem;
  }
  .landing-nav.open > .flex { display: flex; }
  .landing-nav .btn { width: 100%; text-align: center; }

  /* Hero */
  .landing-hero { padding: 4rem 1.25rem 4rem; }
  .landing-hero h1 { font-size: 2rem; line-height: 1.2; }
  .landing-hero p { font-size: 1rem; }
  .landing-hero .flex { flex-direction: column; }
  .landing-hero .btn { width: 100%; }

  /* Sections */
  .landing-features { padding: 3rem 1.25rem; }
  .landing-cta { padding: 3rem 1.25rem; }
  .landing-cta .flex { flex-direction: column; }
  .landing-cta .btn { width: 100%; }
  section[id] { padding: 3rem 1.25rem !important; }

  /* Footer */
  .landing-footer { padding: 2.5rem 1.25rem 1.5rem; }

  /* Login / Inscription */
  .login-page { padding: 1.5rem 1rem; align-items: flex-start; }
  .login-card { padding: 1.5rem; max-width: 100%; }
  .form-row { display: flex; flex-direction: column; gap: 0.75rem; }

  /* Chat */
  .chat-layout { flex-direction: column; height: auto; min-height: calc(100vh - 53px); }
  .chat-list { width: 100%; max-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
  .chat-bubble { max-width: 88%; }
  .chat-proposal { max-width: 95%; }

  /* Plan / pricing cards */
  .plan-card.featured { transform: none; }

  /* Tables overflow */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Demo badge smaller on mobile */
  body::after { font-size: 9px; padding: 4px 9px; bottom: 8px; right: 8px; }
}

/* ===== Petit mobile (<= 420px) ===== */
@media (max-width: 420px) {
  .landing-hero h1 { font-size: 1.7rem; }
  .feature-icon { width: 52px; height: 52px; font-size: 1.3rem; }
  .stat-card { padding: 1rem; }
  .card { padding: 1rem; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
}
