/* ================================================================
   SG Lead Pro — Design System
   Modern SaaS CRM for Real Estate
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
  --primary:        #0D684D; /* Deep Forest Green from logo */
  --primary-dark:   #094835;
  --primary-light:  #E7F3EF;
  --primary-50:     rgba(13, 104, 77, 0.05);
  --accent-gold:    #B09040; /* Muted Gold from logo */
  --accent-gold-light: #FAF5E8;

  --success:        #16A34A;
  --success-light:  #DCFCE7;
  --warning:        #D97706;
  --warning-light:  #FEF3C7;
  --danger:         #DC2626;
  --danger-light:   #FEE2E2;
  --info:           #2563EB;
  --info-light:     #DBEAFE;

  --sidebar-bg:     #FFFFFF;
  --sidebar-text:   #475569;
  --sidebar-hover:  #E7F3EF;
  --sidebar-active: #0D684D;
  --sidebar-width:  240px; /* Slimmer sidebar */

  --body-bg:        #FAFAFA; /* Off-white for clean contrast */
  --card-bg:        #FFFFFF;
  --border-color:   #D1D5DB; /* Defined border lines */
  --text-primary:   #111827;
  --text-secondary: #4B5563;
  --text-muted:     #9CA3AF;

  --navbar-height:  56px; /* Slimmer navbar */
  --border-radius:  2px; /* Very boxxy clean layout */
  --border-radius-sm: 1px;
  --border-radius-lg: 3px;

  --shadow-sm:   none;
  --shadow:      none;
  --shadow-md:   none;
  --shadow-lg:   none;
  --shadow-xl:   none;

  --transition: all 0.15s ease;
  --transition-slow: all 0.25s ease;
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  margin: 0; padding: 0;
}

/* Numeric / tabular values use mono for alignment */
.font-mono, .stat-value, .badge-count, td.numeric {
  font-family: 'DM Mono', 'SF Mono', 'Fira Code', monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
  overflow: hidden;
}

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

.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: none;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-text .app-name {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sidebar-logo-text .app-tagline {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 400;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section-label {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  margin: 1px 6px;
  border-radius: var(--border-radius-sm);
}

.sidebar-item:hover {
  color: var(--primary);
  background: var(--sidebar-hover);
  text-decoration: none;
}

.sidebar-item.active {
  color: #FFFFFF;
  background: var(--primary);
  box-shadow: none;
}

.sidebar-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.sidebar-item .badge-count {
  margin-left: auto;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-item.active .badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.sidebar-item.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--sidebar-text);
}

.sidebar-user:hover {
  background: var(--sidebar-hover);
  color: var(--primary);
  text-decoration: none;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.main-navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--navbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  z-index: 1030;
  transition: var(--transition-slow);
}

.navbar-title { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.navbar-spacer { flex: 1; }

.navbar-action-btn {
  width: 32px; height: 32px;
  border-radius: var(--border-radius-sm); /* Boxy */
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 14px;
  position: relative;
}

.navbar-action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.navbar-notification-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: var(--danger);
  border-radius: 50%;
  border: 1px solid white;
}

/* ── Main Content ───────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--navbar-height);
  min-height: 100vh;
}

.page-content {
  padding: 20px;
  max-width: 1440px;
}

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

.page-header-title h1 {
  font-size: 18px; /* Clean & smaller */
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}

.page-header-title p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body { padding: 16px; }

/* ── Stat Cards ─────────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--stat-color, var(--primary));
  border-radius: 0;
}

.stat-card:hover {
  transform: none; /* Flat design */
  box-shadow: none;
  border-color: var(--stat-color, var(--primary));
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--border-radius-sm); /* Boxy icons */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--stat-bg, var(--primary-light));
  color: var(--stat-color, var(--primary));
}

.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 11.5px; font-weight: 500; color: var(--text-secondary); margin-bottom: 3px; white-space: nowrap; }
.stat-value { font-size: 22px; font-weight: 600; color: var(--text-primary); line-height: 1; letter-spacing: -0.02em; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--border-radius-sm); /* Sharp boxy badges */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ── Role Badges ─────────────────────────────────────────────────── */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.role-super-admin      { background: #F5F3FF; color: #7C3AED; }
.role-company-admin    { background: #EFF6FF; color: #2563EB; }
.role-manager          { background: #DCFCE7; color: #16A34A; }
.role-relationship-manager { background: #FEF3C7; color: #D97706; }
.role-sales-executive  { background: #FEE2E2; color: #DC2626; }
.role-telecaller       { background: #F0FDF4; color: #16A34A; }

/* ── Avatar ─────────────────────────────────────────────────────── */
.avatar {
  width: 32px; height: 32px; /* Smaller default */
  border-radius: var(--border-radius-sm); /* Boxy avatars */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  object-fit: cover;
  text-transform: uppercase;
}

.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-md { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }

.avatar-primary  { background: var(--primary-light); color: var(--primary); }
.avatar-success  { background: var(--success-light); color: var(--success); }
.avatar-warning  { background: var(--warning-light); color: var(--warning); }
.avatar-info     { background: var(--info-light);    color: var(--info); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn { border-radius: var(--border-radius-sm); font-weight: 500; font-size: 12.5px; transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: #F1F5F9; border-color: var(--border-color); color: var(--text-secondary); }
.btn-secondary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-sm { font-size: 11.5px; padding: 4px 10px; }
.btn-xs { font-size: 11px; padding: 2px 8px; }

.btn-icon {
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 13px;
}

.btn-icon:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-icon.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: var(--border-radius-sm);
  border-color: var(--border-color);
  font-size: 12.5px; /* Smaller */
  padding: 6px 10px;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.form-label { font-size: 12px; font-weight: 500; color: var(--text-primary); margin-bottom: 5px; }
.form-text  { font-size: 11.5px; color: var(--text-muted); }

/* ── Tables ──────────────────────────────────────────────────────── */
.table-container {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.table { margin: 0; }
.table th {
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 10px 14px;
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  font-size: 12.5px;
  color: var(--text-primary);
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FAFBFF; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert { border-radius: var(--border-radius-sm); font-size: 12.5px; border: none; padding: 10px 14px; }
.alert-success { background: var(--success-light); color: #166534; }
.alert-danger  { background: var(--danger-light);  color: #991B1B; }
.alert-warning { background: var(--warning-light); color: #854D0E; }
.alert-info    { background: var(--info-light);    color: #1E40AF; }

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb { margin: 0; padding: 0; background: none; font-size: 12px; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ── Filter Bar ──────────────────────────────────────────────────── */
.filter-bar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

/* ── Auth Pages ──────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  background: #F8FAFC;
}

.auth-panel-left {
  flex: 1;
  background: #0F172A;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.auth-panel-right {
  width: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  background: #fff;
  border-left: 1px solid var(--border-color);
}

.auth-form-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.auth-form-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; }

/* ── Super Admin Sidebar Override ────────────────────────────────── */
.sidebar-superadmin .sidebar-logo-icon { background: #6D28D9; box-shadow: none; }
.sidebar-superadmin .sidebar-item.active { background: #6D28D9; box-shadow: none; }

/* ── Utility ─────────────────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-soft { background: var(--primary-light) !important; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.gap-2 { gap: 8px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }

/* ── Dropdown Menus ──────────────────────────────────────────────── */
.dropdown-menu {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 4px;
  min-width: 160px;
  font-size: 12.5px;
}
.dropdown-item { border-radius: 0; font-size: 12.5px; padding: 7px 12px; color: var(--text-primary); }
.dropdown-item:hover { background: var(--primary); color: #fff; }
.dropdown-divider { margin: 3px 0; border-color: var(--border-color); }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination { gap: 3px; }
.page-link { border-radius: var(--border-radius-sm) !important; border-color: var(--border-color); color: var(--text-secondary); font-size: 12px; padding: 5px 10px; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Sidebar Collapsed State (Mobile) ───────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .main-navbar { left: 0; padding: 0 14px; }
  .page-content { padding: 14px 10px; }
  .auth-panel-right { width: 100%; padding: 40px 24px; border-left: none; }
}

@media (max-width: 576px) {
  .auth-panel-right { padding: 30px 16px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-header .d-flex { width: 100%; justify-content: stretch; }
  .page-header .btn { flex-grow: 1; text-align: center; }
}

/* ── Responsive Table Container ────────────────────────────────── */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

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

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 32px; display: block; margin-bottom: 8px; color: #D1D5DB; }
.empty-state p { font-size: 13px; margin: 0; }

/* ── Data Labels ─────────────────────────────────────────────────── */
.data-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.data-value { font-size: 12.5px; font-weight: 500; color: var(--text-primary); }

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.2s ease both; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pulse { animation: pulse-dot 2s ease-in-out infinite; }

/* ── Sidebar logo padding ─────────────────────────────────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}

/* -------------------------------------------------------------------
   MOBILE CARD SYSTEM  � shared across all list pages
   Cards visible only on <768px; tables show on >=768px
   ------------------------------------------------------------------- */
@media (max-width: 767.98px) {

  .page-content { padding: 12px 10px !important; }

  /* Base card */
  .mobile-lead-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 14px 14px 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
  }

  /* Top row */
  .mlc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }
  .mlc-name a,
  a.mlc-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
  }
  .mlc-actions-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .mlc-del-btn {
    width: 28px; height: 28px;
    border: 1px solid #FEE2E2;
    background: #FEF2F2;
    color: #DC2626;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
  }

  /* Status dropdown */
  .mlc-status-row { margin-bottom: 8px; }
  .mlc-status-btn {
    border: none;
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    line-height: 1.6;
  }

  /* Chips row */
  .mlc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
  }
  .mlc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 5px;
  }
  .mlc-chip-source  { background: #FEF3C7; color: #92400E; }
  .mlc-chip-project { background: #EDE9FE; color: #5B21B6; }

  /* Action button grid */
  .mlc-action-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .d-contents { display: contents; }

  .mlc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 7px 4px;
    border-radius: 7px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .mlc-btn-call  { background:#F0FDF4; color:#16A34A; border-color:#BBF7D0; }
  .mlc-btn-wa    { background:#F0FDF4; color:#15803D; border-color:#86EFAC; }
  .mlc-btn-email { background:#EFF6FF; color:#2563EB; border-color:#BFDBFE; }
  .mlc-btn-open  { background:#F8FAFC; color:#475569; border-color:#E2E8F0; }

  .mlc-btn-call:hover  { background:#16A34A; color:#fff; border-color:#16A34A; }
  .mlc-btn-wa:hover    { background:#15803D; color:#fff; border-color:#15803D; }
  .mlc-btn-email:hover { background:#2563EB; color:#fff; border-color:#2563EB; }
  .mlc-btn-open:hover  { background:var(--primary); color:#fff; border-color:var(--primary); }
}

/* ─── PWA & Mobile Navigation ──────────────────────────────────────────────── */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  padding: 0 8px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 500;
  gap: 2px;
  flex: 1;
  transition: color 0.15s;
}

.mobile-nav-item i {
  font-size: 19px;
  line-height: 1;
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.mobile-nav-fab-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-nav-fab {
  position: absolute;
  top: -24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: 4px solid #FFFFFF;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}

.mobile-nav-fab:active {
  transform: scale(0.92);
}

/* Offline Mode Banner */
.offline-status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #D97706;
  color: #FFFFFF;
  text-align: center;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1095;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: slideInDown 0.25s ease;
}

@media (max-width: 767.98px) {
  /* Prevent bottom nav from covering content */
  body {
    padding-bottom: 74px !important;
  }
  .main-content {
    padding-bottom: 40px !important;
  }

  /* Bottom sheet style for modals on mobile */
  .modal-bottom-sheet .modal-dialog {
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    transform: translate(0, 100%);
    transition: transform 0.25s ease-out;
  }
  .modal-bottom-sheet.show .modal-dialog {
    transform: none;
  }
  .modal-bottom-sheet .modal-content {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    max-height: 85vh;
  }
}

/* ─── SG Assistant Chatbot Widget ─────────────────────────────────────────── */
.sg-chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 1050;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.sg-chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.55);
}

.sg-chatbot-fab.active {
  transform: rotate(15deg);
}

.sg-chatbot-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid #4F46E5;
  animation: pulseRipple 2.2s infinite;
  pointer-events: none;
}

@keyframes pulseRipple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

.sg-chatbot-card {
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: 370px;
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 1060;
  overflow: hidden;
  animation: chatSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sg-chat-header {
  background: linear-gradient(135deg, #4F46E5, #4338CA);
  color: #FFFFFF;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sg-chat-avatar-header {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.sg-chat-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.sg-chat-subtitle {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.8);
}

.sg-chat-header-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.sg-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sg-chat-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F8FAFC;
}

.sg-chat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EEF2FF;
  color: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.sg-chat-msg-user {
  display: flex;
  justify-content: flex-end;
}

.sg-chat-bubble {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

.sg-chat-bubble-bot {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid #E2E8F0;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.sg-chat-bubble-user {
  background: #4F46E5;
  color: #FFFFFF;
  border-top-right-radius: 4px;
  font-weight: 500;
}

.sg-chat-footer {
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
}

.sg-chat-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.sg-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sg-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94A3B8;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.sg-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.sg-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 767.98px) {
  .sg-chatbot-fab {
    bottom: 76px;
    right: 16px;
    width: 46px;
    height: 46px;
    font-size: 19px;
  }
  .sg-chatbot-card {
    bottom: 130px;
    right: 12px;
    left: 12px;
    width: auto;
    height: 480px;
  }
}


