/* ============================================================
   BMD Solution - Premium SaaS Stylesheet
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
  --primary: #6C63FF;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --bg-dark: #0a0a0f;
  --bg-card: #111118;
  --bg-sidebar: #0d0d14;
  --bg-surface: #16161f;
  --bg-hover: #1e1e2e;
  --border: rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.12);

  --text-primary: #f1f0ff;
  --text-secondary: #9896b8;
  --text-muted: #5e5c78;

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 30px rgba(108,99,255,0.2);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-dark: #f5f5fa;
  --bg-card: #ffffff;
  --bg-sidebar: #1a1a2e;
  --bg-surface: #eeeef6;
  --bg-hover: #e8e8f4;
  --border: rgba(0,0,0,0.08);
  --border-light: rgba(0,0,0,0.12);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888aa;
}

/* ── Global Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--text-primary); line-height: 1.3; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   LAYOUT - SIDEBAR
   ============================================================ */

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  transition: var(--transition-slow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .brand-text { opacity: 0; pointer-events: none; width: 0; overflow: hidden; }
.sidebar.collapsed .brand { justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.brand-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;align-items:center;justify-content:center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.brand-text { line-height: 1.2; }
.brand-name { font-family: 'Sora', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.brand-sub { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.sidebar-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(16,185,129,0.1));
  color: var(--primary-light);
  border: 1px solid rgba(108,99,255,0.2);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; height: 60%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.nav-icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

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

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.user-avatar-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;align-items:center;justify-content:center;
  font-size: 0.8rem; color: #fff; font-weight: 700;
  flex-shrink: 0;
}

.user-info .user-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.user-info .user-role { font-size: 0.65rem; color: var(--text-muted); text-transform: capitalize; }

/* ============================================================
   TOPBAR
   ============================================================ */

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

.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.topbar-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  display: flex;align-items:center;justify-content:center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--bg-surface); color: var(--text-primary); }

.topbar-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.topbar-search input:focus { border-color: var(--primary); }
.topbar-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

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

.topbar-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  display: flex;align-items:center;justify-content:center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}
.topbar-btn:hover { color: var(--primary); border-color: var(--primary); }

.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;align-items:center;justify-content:center;
  border: 2px solid var(--bg-card);
}

.theme-toggle {
  width: 36px; height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;align-items:center;justify-content:center;
  transition: var(--transition);
}
.theme-toggle:hover { color: var(--accent); }

/* ============================================================
   PAGE CONTENT
   ============================================================ */

.page-content { padding: 28px 24px; flex: 1; }

.page-header { margin-bottom: 24px; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.page-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-top: 4px; }

/* ============================================================
   STAT CARDS
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06;
  transform: translate(30%, -30%);
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--secondary); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex;align-items:center;justify-content:center;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.stat-icon.primary { background: rgba(108,99,255,0.15); color: var(--primary); }
.stat-icon.success { background: rgba(16,185,129,0.15); color: var(--secondary); }
.stat-icon.warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.danger  { background: rgba(239,68,68,0.15); color: var(--danger); }
.stat-icon.info    { background: rgba(59,130,246,0.15); color: var(--info); }

.stat-value { font-size: 1.75rem; font-weight: 800; font-family: 'Sora', sans-serif; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.stat-change { font-size: 0.75rem; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--secondary); }
.stat-change.down { color: var(--danger); }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px; }

/* ============================================================
   TABLE
   ============================================================ */

.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead tr {
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control { cursor: pointer; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(108,99,255,0.4); color: #fff; }

.btn-success {
  background: linear-gradient(135deg, var(--secondary), #059669);
  color: #fff;
  border-color: var(--secondary);
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.btn-success:hover { transform: translateY(-1px); color: #fff; }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { transform: translateY(-1px); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-outline:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-primary { background: rgba(108,99,255,0.15); color: var(--primary-light); }
.badge-success { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-danger  { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-info    { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-secondary { background: rgba(255,255,255,0.1); color: var(--text-secondary); }

/* ============================================================
   ORDER TIMELINE
   ============================================================ */

.order-timeline { padding: 8px 0; }

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}
.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px; top: 38px;
  width: 2px;
  height: calc(100% - 10px);
  background: var(--border);
}
.timeline-step.completed::after { background: var(--secondary); }

.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;align-items:center;justify-content:center;
  font-size: 0.8rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.timeline-step.completed .timeline-dot {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}
.timeline-step.current .timeline-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(108,99,255,0.2);
}

.timeline-content .tl-title { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.timeline-content .tl-time  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.timeline-content .tl-note  { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }

/* ============================================================
   NOTIFICATION DROPDOWN
   ============================================================ */

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: none;
}
.notif-dropdown.show { display: block; animation: slideDown 0.2s ease; }

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

.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-header h6 { font-size: 0.875rem; font-weight: 600; }

.notif-list { max-height: 320px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(108,99,255,0.05); }

.notif-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;align-items:center;justify-content:center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.notif-text .notif-title { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.notif-text .notif-msg   { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.notif-text .notif-time  { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   CHATBOT
   ============================================================ */

.chat-toggle-btn {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(108,99,255,0.5);
  z-index: 9000;
  transition: var(--transition);
  display: flex;align-items:center;justify-content:center;
}
.chat-toggle-btn:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(108,99,255,0.6); }
.chat-toggle-btn .chat-notif-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 12px; height: 12px;
  background: var(--secondary);
  border-radius: 50%;
  border: 2px solid var(--bg-dark);
}

.chat-window {
  position: fixed;
  bottom: 100px; right: 28px;
  width: 360px;
  height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-window.open { transform: scale(1) translateY(0); opacity: 1; }

.chat-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;align-items:center;justify-content:center;
  font-size: 1rem;
  color: #fff;
}
.chat-bot-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.chat-status { font-size: 0.7rem; color: rgba(255,255,255,0.7); }
.chat-close { margin-left: auto; background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; font-size: 1rem; padding: 4px; }
.chat-close:hover { color: #fff; }

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

.chat-msg { max-width: 85%; animation: msgIn 0.2s ease; }
@keyframes msgIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform:translateY(0); } }

.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }

.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.83rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-msg.bot .chat-bubble {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; text-align: right; }

.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-reply-btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary-light);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.quick-reply-btn:hover { background: var(--primary); color: #fff; }

.chat-typing { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg-surface); border-radius: 12px; width: fit-content; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { transform:translateY(0); } 30% { transform:translateY(-6px); } }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--primary); }
.chat-send {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;align-items:center;justify-content:center;
  transition: var(--transition);
}
.chat-send:hover { background: var(--primary-dark); }

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 20% 20%, rgba(108,99,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 80%, rgba(16,185,129,0.08) 0%, transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  justify-content: center;
}

.auth-logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;align-items:center;justify-content:center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.auth-title { font-size: 1.4rem; text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 28px; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   PACKAGE CARDS
   ============================================================ */

.package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.package-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: var(--transition);
}
.package-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.package-card.popular {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(108,99,255,0.05) 0%, var(--bg-card) 100%);
}

.popular-badge {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pkg-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.pkg-price { font-size: 2rem; font-weight: 800; font-family: 'Sora', sans-serif; color: var(--text-primary); line-height: 1; }
.pkg-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.pkg-delivery { font-size: 0.8rem; color: var(--text-secondary); margin: 8px 0 16px; }

.pkg-features { list-style: none; padding: 0; margin-bottom: 20px; }
.pkg-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 0;
}
.pkg-features li i { color: var(--secondary); font-size: 0.8rem; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  min-width: 300px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  width: 100%;
  max-width: 380px;
}

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

.toast.success { border-left: 3px solid var(--secondary); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--primary); }
.toast.warning { border-left: 3px solid var(--warning); }

/* ============================================================
   DASHBOARD CHARTS AREA
   ============================================================ */

.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }

@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-window { right: 12px; width: calc(100vw - 24px); }
  .chat-toggle-btn { right: 16px; bottom: 20px; }
  .notif-dropdown { right: -10px; width: 320px; }
  .package-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
}

/* ============================================================
   UTILITY
   ============================================================ */

.text-primary-color { color: var(--primary); }
.text-success { color: var(--secondary) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary-color { color: var(--text-secondary); }

.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

.glow { box-shadow: var(--shadow-glow); }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.p-3 { padding: 12px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: 0.8rem; }

.notice-bar {
  background: linear-gradient(90deg, rgba(108,99,255,0.15), rgba(16,185,129,0.1));
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.progress-bar-wrap {
  background: var(--bg-surface);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s ease;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }
