/* Web fonts loaded via <link> in HTML head for performance */

:root {
  --red: #C0392B;
  --red-dark: #922B21;
  --red-light: #E74C3C;
  --red-pale: #FADBD8;
  --white: #ffffff;
  --off-white: #FDF9F9;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-800: #1F2937;
  --dark: #0F0F0F;
  --success: #16A34A;
  --warning: #D97706;
  --info: #2563EB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(192,57,43,0.10);
  --shadow-lg: 0 8px 32px rgba(192,57,43,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--gray-800);
  font-size: 15px;
  line-height: 1.6;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; }

a { color: var(--red); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--red-dark); }

/* ===== NAVBAR ===== */
.navbar-investmart {
  background: var(--white);
  border-bottom: 2px solid var(--red-pale);
  padding: 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-investmart .navbar-brand {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red) !important;
  padding: 1rem 0;
  letter-spacing: -0.5px;
}
.navbar-investmart .navbar-brand span { color: var(--dark); }
.navbar-investmart .nav-link {
  color: var(--gray-600) !important;
  font-weight: 500;
  padding: 1.1rem 1rem !important;
  transition: var(--transition);
  position: relative;
}
.navbar-investmart .nav-link:hover,
.navbar-investmart .nav-link.active {
  color: var(--red) !important;
}
.navbar-investmart .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--red);
  border-radius: 2px 2px 0 0;
}
.navbar-investmart .btn-navbar {
  background: var(--red);
  color: var(--white) !important;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.2rem !important;
  font-weight: 600;
  margin-left: 0.5rem;
}
.navbar-investmart .btn-navbar:hover { background: var(--red-dark); }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 250px;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.sidebar-brand h5 {
  font-family: var(--font-head);
  color: var(--red);
  margin: 0;
  font-size: 1rem;
}
.sidebar .nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.7rem 1.5rem;
  color: var(--gray-600);
  font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item .nav-link.active {
  color: var(--red);
  background: var(--red-pale);
  border-left-color: var(--red);
}
.sidebar .nav-item .nav-link i { width: 18px; text-align: center; font-size: 1rem; }
.sidebar-section {
  padding: 1rem 1.5rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.main-content {
  margin-left: 250px;
  min-height: 100vh;
  padding: 2rem;
  transition: var(--transition);
}

/* ===== CARDS ===== */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}
.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.1rem 1.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Stat Cards */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card.red { border-left: 4px solid var(--red); }
.stat-card.green { border-left: 4px solid var(--success); }
.stat-card.blue { border-left: 4px solid var(--info); }
.stat-card.orange { border-left: 4px solid var(--warning); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.red { background: var(--red-pale); color: var(--red); }
.stat-icon.green { background: #D1FAE5; color: var(--success); }
.stat-icon.blue { background: #DBEAFE; color: var(--info); }
.stat-icon.orange { background: #FEF3C7; color: var(--warning); }
.stat-body label { font-size: 0.78rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.stat-body .value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; margin: 0; color: var(--dark); }

/* ===== PRODUCT CARDS ===== */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card .badge-roi {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--red);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-head);
}
.product-card img {
  width: 100%; height: 200px;
  object-fit: cover;
}
.product-card .card-body { padding: 1.2rem; }
.product-card .category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 0.3rem;
}
.product-card h5 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.product-card .roi-info {
  background: var(--off-white);
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  margin: 0.7rem 0;
}
.product-card .roi-info .roi-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}
.product-card .roi-info .roi-row strong { color: var(--red); }

/* ===== BUTTONS ===== */
.btn-red {
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: var(--transition);
}
.btn-red:hover { background: var(--red-dark); color: white; }
.btn-red-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.3rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-red-outline:hover { background: var(--red); color: white; }

/* ===== FORMS ===== */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.form-label { font-weight: 600; font-size: 0.88rem; color: var(--gray-600); }

/* ===== TABLES ===== */
.table-investmart thead th {
  background: var(--gray-50);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  border-bottom: 2px solid var(--gray-200);
  padding: 0.85rem 1rem;
}
.table-investmart tbody td { padding: 0.85rem 1rem; vertical-align: middle; }
.table-investmart tbody tr:hover { background: var(--off-white); }

/* ===== BADGES ===== */
.badge-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-completed { background: #DBEAFE; color: #1E40AF; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-paid { background: #EDE9FE; color: #5B21B6; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 50%, var(--red-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -200px; right: -200px;
}
.auth-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -150px; left: -100px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}
.auth-logo {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  text-align: center;
  margin-bottom: 0.3rem;
}
.auth-logo span { color: var(--dark); }

/* ===== WALLET BAR ===== */
.wallet-bar {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  border-radius: var(--radius);
  padding: 1.5rem;
  color: white;
  margin-bottom: 1.5rem;
}
.wallet-bar .wallet-item { text-align: center; }
.wallet-bar .wallet-item label { font-size: 0.75rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; display: block; }
.wallet-bar .wallet-item .amount { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; }
.wallet-bar .divider { border-left: 1px solid rgba(255,255,255,0.2); }

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--dark);
}
.page-header .breadcrumb {
  margin: 0;
  font-size: 0.82rem;
}
.breadcrumb-item.active { color: var(--red); }

/* ===== ALERTS ===== */
.alert { border-radius: var(--radius-sm); border: none; font-weight: 500; }
.alert-success { background: #D1FAE5; color: #065F46; }
.alert-danger { background: #FEE2E2; color: #991B1B; }
.alert-warning { background: #FEF3C7; color: #92400E; }
.alert-info { background: #DBEAFE; color: #1E40AF; }

/* ===== HOMEPAGE HERO ===== */
.hero-section {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 60%, #FF6B6B 100%);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1.2rem; position: relative; }
.hero-section p { font-size: 1.1rem; opacity: 0.9; max-width: 540px; position: relative; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; position: relative; flex-wrap: wrap; }
.hero-stat label { font-size: 0.75rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; display: block; }
.hero-stat .val { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); height: 100vh; top: 0; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .hero-section h1 { font-size: 2rem; }
  .stat-card .value { font-size: 1.2rem; }
  .wallet-bar .wallet-item .amount { font-size: 1rem; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
  .sidebar-overlay.show { display: block; }
}

/* ===== MISC ===== */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-400); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.progress { height: 8px; border-radius: 4px; }
.progress-bar.bg-red { background: var(--red) !important; }
.text-red { color: var(--red) !important; }
.bg-red { background: var(--red) !important; }
.border-red { border-color: var(--red) !important; }
.rounded-custom { border-radius: var(--radius); }

/* Topbar for mobile */
.topbar-mobile {
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.8rem 1rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}
@media (max-width: 768px) {
  .topbar-mobile { display: flex; }
}

.invest-modal .modal-header { background: var(--red); color: white; }
.invest-modal .modal-header .btn-close { filter: invert(1); }

/* Notification dot */
.notif-dot {
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
}

/* ===== ADMIN CARD ===== */
.admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.admin-card + .admin-card { margin-top: 1.5rem; }

/* ===== AVATAR UPLOAD AREA ===== */
.avatar-wrap { position: relative; display: inline-block; cursor: pointer; }
.avatar-wrap .avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.35); display: none;
  align-items: center; justify-content: center; color: white; font-size: 1.2rem;
}
.avatar-wrap:hover .avatar-overlay { display: flex; }

/* ===== PAGE HEADER ===== */
.page-header h1 { font-size: 1.4rem; font-family: var(--font-head); font-weight: 700; }

/* ===== NOTIFICATION TOASTS ===== */
#notif-container {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 360px;
  width: calc(100vw - 2.4rem);
  pointer-events: none;
}
.notif-toast {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid var(--red);
  padding: 0;
  overflow: hidden;
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(.22,.68,0,1.2), opacity 0.3s ease;
}
.notif-toast.show {
  transform: translateX(0);
  opacity: 1;
}
.notif-toast.hide {
  transform: translateX(120%);
  opacity: 0;
}
.notif-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}
.notif-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.notif-toast-icon i { color: var(--red); font-size: 0.85rem; }
.notif-toast-body { flex: 1; min-width: 0; }
.notif-toast-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dark);
  margin-bottom: 2px;
  line-height: 1.3;
}
.notif-toast-msg {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.45;
  margin: 0;
}
.notif-toast-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
}
.notif-toast-close:hover { color: var(--red); }
.notif-toast-progress {
  height: 3px;
  background: var(--red);
  width: 100%;
  transform-origin: left;
  animation: toastProgress var(--dur, 5s) linear forwards;
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ===== LIVE CHAT WIDGET (user) ===== */
#chat-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(192,57,43,0.45);
  cursor: pointer;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
#chat-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(192,57,43,0.55); }
#chat-bubble .chat-unread-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 14px; height: 14px;
  background: #27ae60;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
}

#chat-window {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 500px;
  max-height: calc(100vh - 7rem);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  z-index: 7999;
  overflow: hidden;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(.22,.68,0,1.15), opacity 0.2s ease;
  transform-origin: bottom right;
}
#chat-window.chat-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.chat-header {
  background: var(--red);
  color: #fff;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name  { font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; }
.chat-header-status{ font-size: 0.72rem; opacity: 0.85; }
.chat-header-close {
  background: none; border: none; color: #fff;
  font-size: 1.1rem; cursor: pointer; opacity: 0.8; padding: 0; line-height:1;
}
.chat-header-close:hover { opacity: 1; }

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f9fafb;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-msg.from-user { align-self: flex-end; align-items: flex-end; }
.chat-msg.from-admin { align-self: flex-start; align-items: flex-start; }

.chat-bubble-msg {
  padding: 0.5rem 0.85rem;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.5;
  word-break: break-word;
}
.from-user  .chat-bubble-msg { background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.from-admin .chat-bubble-msg { background: #fff; color: var(--gray-800); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; }

.chat-meta { font-size: 0.68rem; color: var(--gray-400); margin-top: 2px; }

/* System / date divider */
.chat-divider {
  text-align: center;
  font-size: 0.7rem;
  color: var(--gray-400);
  margin: 0.4rem 0;
  position: relative;
}
.chat-divider::before, .chat-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: var(--gray-200);
}
.chat-divider::before { left: 0; }
.chat-divider::after  { right: 0; }

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  text-align: center;
  padding: 2rem;
  gap: 0.5rem;
}
.chat-empty i { font-size: 2.5rem; opacity: 0.25; }
.chat-empty p { font-size: 0.82rem; margin: 0; }

/* Input area */
.chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-shrink: 0;
  background: #fff;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 0.5rem 0.85rem;
  font-size: 0.83rem;
  resize: none;
  max-height: 90px;
  outline: none;
  font-family: var(--font-body);
  line-height: 1.45;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--red); }
.chat-send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.chat-send-btn:hover { background: var(--red-dark); transform: scale(1.05); }
.chat-send-btn:disabled { background: var(--gray-200); color: var(--gray-400); cursor: default; transform: none; }

/* Typing indicator */
.chat-typing { display: flex; align-items: center; gap: 3px; padding: 8px 12px; }
.chat-typing span {
  width: 6px; height: 6px; background: var(--gray-400);
  border-radius: 50%; animation: typingBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-5px); }
}

/* ===== ADMIN CHAT PANEL ===== */
.chat-sessions-list {
  height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.chat-session-item {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background 0.15s;
}
.chat-session-item:hover { background: var(--gray-50); }
.chat-session-item.active { background: var(--red-pale); }
.chat-session-item.unread .session-name { font-weight: 700; }
.session-preview { font-size: 0.78rem; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-chat-area {
  height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.admin-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f9fafb;
  scrollbar-width: thin;
}
.admin-chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  background: #fff;
}
