/* ============================================================
   FASHIONFLYER ADMIN DASHBOARD — Premium Luxury Theme
   Cartier-inspired dark design with gold accents
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Core Palette */
  --gold:         #c9a96e;
  --gold-light:   #dfc89c;
  --gold-dark:    #a88a4e;
  --gold-ghost:   rgba(201,169,110,.08);
  --gold-glow:    rgba(201,169,110,.18);

  /* Accent Colors */
  --blue:         #5b7fff;
  --blue-glow:    rgba(91,127,255,.12);
  --green:        #2ed573;
  --green-glow:   rgba(46,213,115,.12);
  --red:          #e74c5a;
  --red-glow:     rgba(231,76,90,.12);
  --purple:       #9d6fff;
  --purple-glow:  rgba(157,111,255,.12);
  --amber:        #f6b93b;
  --orange:       #f0932b;
  --cyan:         #4ecdc4;

  /* Surfaces */
  --bg-base:      #0f0f1a;
  --bg-card:      rgba(22, 22, 42, 0.65);
  --bg-sidebar:   #12121f;
  --bg-topbar:    rgba(15,15,26,.88);
  --bg-input:     rgba(255,255,255,.03);
  --bg-hover:     rgba(201,169,110,.05);
  --bg-row-alt:   rgba(255,255,255,.015);

  /* Borders */
  --border:       rgba(255,255,255,.06);
  --border-light: rgba(255,255,255,.10);
  --border-gold:  rgba(201,169,110,.20);

  /* Text */
  --text-primary:   rgba(255,255,255,.92);
  --text-secondary: #b0b0c8;
  --text-muted:     #6b6b85;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.22);
  --shadow-md:  0 4px 20px rgba(0,0,0,.30);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.40);
  --shadow-gold:0 4px 24px rgba(201,169,110,.12);

  /* Radii */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Layout */
  --sidebar-width:  260px;
  --sidebar-collapsed: 70px;
  --topbar-height:  64px;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-accent:  'Cormorant Garamond', Georgia, serif;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --speed: .3s;
}


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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

img { max-width: 100%; display: block; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: var(--gold);
  color: var(--bg-base);
}

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2a2a3e;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a52;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #2a2a3e transparent;
}


/* ============================================================
   LAYOUT
   ============================================================ */

.dashboard-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  transition: grid-template-columns var(--speed) var(--ease);
}


/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: width var(--speed) var(--ease), transform var(--speed) var(--ease);
  overflow: hidden;
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(201,169,110,.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 10%, rgba(91,127,255,.03) 0%, transparent 50%);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .submenu,
.sidebar.collapsed .sidebar-header span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .nav-icon {
  margin-right: 0;
  font-size: 1.2rem;
}


/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
  min-height: 68px;
  flex-shrink: 0;
}

.sidebar-header img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.sidebar-header span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .5px;
  transition: opacity var(--speed) var(--ease);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-logo__text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .5px;
}

.sidebar-logo__badge {
  font-size: .55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  background: var(--gold-ghost);
  border: 1px solid var(--border-gold);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}


/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-item {
  position: relative;
}

.nav-item.active > .nav-link {
  color: var(--gold);
  background: var(--bg-hover);
  border-left: 3px solid var(--gold);
}

.nav-item.active > .nav-link .nav-icon {
  color: var(--gold);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  color: var(--text-secondary);
  font-size: .88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--speed) var(--ease);
  gap: 2px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  margin-right: 12px;
  flex-shrink: 0;
  transition: color var(--speed) var(--ease), margin var(--speed) var(--ease);
}

.nav-text {
  flex: 1;
  transition: opacity var(--speed) var(--ease);
}

/* Submenu Arrow */
.submenu-arrow {
  font-size: .65rem;
  color: var(--text-muted);
  transition: transform var(--speed) var(--ease);
  margin-left: auto;
}

.has-submenu.open > .nav-link .submenu-arrow {
  transform: rotate(90deg);
}

/* Submenu */
.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease);
  background: rgba(0,0,0,.12);
}

.submenu.open {
  max-height: 600px;
}

.submenu-item {
  padding: 0;
}

.submenu-item a,
.submenu-item .nav-link {
  padding: 9px 20px 9px 54px;
  font-size: .82rem;
  color: var(--text-muted);
  display: block;
  transition: all var(--speed) var(--ease);
  border-left: 3px solid transparent;
}

.submenu-item a:hover,
.submenu-item .nav-link:hover {
  color: var(--gold-light);
  background: rgba(201,169,110,.04);
}

.submenu-item.active a,
.submenu-item.active .nav-link {
  color: var(--gold);
}


/* Sidebar Toggle (hamburger) */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.15rem;
  transition: all var(--speed) var(--ease);
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--gold);
}


/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.60);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
  pointer-events: none;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}


/* AI Glow effect for sidebar */
.ai-glow > .nav-link {
  background: linear-gradient(90deg, rgba(157,111,255,.04), rgba(201,169,110,.04));
  background-size: 200% 200%;
  animation: aiGlow 4s ease infinite;
}

.ai-glow > .nav-link .nav-icon {
  color: var(--purple);
}


/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--speed) var(--ease);
}


/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: var(--topbar-height);
  background: var(--bg-topbar);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-left .breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
}

.topbar-left .breadcrumb span {
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* Topbar Search */
.topbar-search {
  position: relative;
  width: 480px;
  display: flex;
  align-items: center;
}

.topbar-search input,
.topbar-search__input {
  width: 100%;
  padding: 10px 45px 10px 42px;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: .85rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--speed) var(--ease);
}

.topbar-search input::placeholder,
.topbar-search__input::placeholder {
  color: var(--text-muted);
}

.topbar-search input:focus,
.topbar-search__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.topbar-search i,
.topbar-search .search-icon,
.topbar-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .82rem;
  pointer-events: none;
}


/* Notification Button */
.notification-wrapper {
  position: relative;
}

.notification-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 1.05rem;
  color: var(--text-secondary);
  transition: all var(--speed) var(--ease);
}

.notification-btn:hover {
  background: var(--bg-hover);
  color: var(--gold);
}

.notification-btn .badge-count,
.notif-count {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-sidebar);
}


/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 440px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--speed) var(--ease);
  z-index: 950;
  backdrop-filter: blur(16px);
}

.notification-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-dropdown__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-dropdown__header a {
  font-size: .75rem;
  color: var(--gold);
  font-weight: 500;
}

.notification-dropdown__list {
  padding: 0;
  margin: 0;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--speed) var(--ease);
  cursor: pointer;
}

.notification-item:hover {
  background: var(--bg-hover);
}

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

.notification-item.unread {
  background: rgba(201,169,110,.03);
}

.notification-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .82rem;
}

.notification-item__icon--order {
  background: var(--gold-ghost);
  color: var(--gold);
}

.notification-item__icon--review {
  background: var(--green-glow);
  color: var(--green);
}

.notification-item__icon--alert {
  background: var(--red-glow);
  color: var(--red);
}

.notification-item__content {
  flex: 1;
}

.notification-item__text {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notification-item__text strong {
  color: var(--text-primary);
}

.notification-item__time {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.notification-dropdown__footer {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: .82rem;
  color: var(--gold);
  font-weight: 500;
  border-top: 1px solid var(--border);
  transition: background var(--speed) var(--ease);
}

.notification-dropdown__footer:hover {
  background: var(--bg-hover);
}


/* Admin Profile */
.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--speed) var(--ease);
  position: relative;
}

.admin-profile:hover {
  background: var(--bg-hover);
}

.admin-profile img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border-gold);
  object-fit: cover;
}

.admin-profile__info {
  display: flex;
  flex-direction: column;
}

.admin-profile .admin-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-profile .admin-role {
  font-size: .68rem;
  color: var(--text-muted);
}

.admin-profile__chevron {
  font-size: .7rem;
  color: var(--text-muted);
}

.admin-profile .admin-profile__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(22, 22, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--speed) var(--ease);
  z-index: 960;
  padding: 8px 0;
}

.admin-profile .admin-profile__dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-profile .admin-profile__dropdown a,
.admin-profile__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: .88rem;
  color: rgba(255, 255, 255, 0.85) !important;
  transition: all var(--speed) var(--ease);
}

.admin-profile .admin-profile__dropdown a:hover,
.admin-profile__link:hover {
  color: #ffffff !important;
  background: rgba(201, 169, 110, 0.2) !important;
  padding-left: 24px;
}

.admin-profile__link--danger {
  color: var(--red) !important;
}

.admin-profile__link--danger:hover {
  color: var(--red) !important;
  background: var(--red-glow) !important;
}

.admin-profile .admin-profile__dropdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}


/* ── Content Area ─────────────────────────────────────────── */
.content-area {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}


/* ============================================================
   SECTIONS
   ============================================================ */
.dashboard-section {
  display: none;
  animation: fadeIn .4s var(--ease);
}

.dashboard-section.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: .3px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Section Specific Search Bar Styling */
.section-search {
  position: relative;
  width: 360px;
  display: flex;
  align-items: center;
}

.section-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: .85rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--speed) var(--ease);
}

.section-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.section-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}


/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--speed) var(--ease);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.kpi-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
  background: var(--gold-ghost);
  color: var(--gold);
}

.kpi-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card__value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-card__label {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.kpi-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 8px;
  width: fit-content;
}

.kpi-card__trend.up {
  background: var(--green-glow);
  color: var(--green);
}

.kpi-card__trend.down {
  background: var(--red-glow);
  color: var(--red);
}


/* KPI color variants */
.kpi-card--gold::before {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.kpi-card--gold .kpi-card__icon {
  background: var(--gold-ghost);
  color: var(--gold);
}

.kpi-card--blue::before {
  background: linear-gradient(90deg, var(--blue), #7b9aff);
}
.kpi-card--blue .kpi-card__icon {
  background: var(--blue-glow);
  color: var(--blue);
}

.kpi-card--green::before {
  background: linear-gradient(90deg, var(--green), #5dd99a);
}
.kpi-card--green .kpi-card__icon {
  background: var(--green-glow);
  color: var(--green);
}

.kpi-card--red::before {
  background: linear-gradient(90deg, var(--red), #f07682);
}
.kpi-card--red .kpi-card__icon {
  background: var(--red-glow);
  color: var(--red);
}

.kpi-card--purple::before {
  background: linear-gradient(90deg, var(--purple), #b794ff);
}
.kpi-card--purple .kpi-card__icon {
  background: var(--purple-glow);
  color: var(--purple);
}


/* ============================================================
   CHARTS
   ============================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.bottom-grid > * {
  min-width: 0;
}

#report-tables.bottom-grid {
  grid-template-columns: 1fr 1fr;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--speed) var(--ease);
  min-width: 0;
  backdrop-filter: blur(8px);
}

.chart-card:hover {
  box-shadow: var(--shadow-md);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chart-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.chart-header .chart-controls {
  display: flex;
  gap: 6px;
}

.chart-header .chart-controls button {
  padding: 5px 12px;
  font-size: .72rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--speed) var(--ease);
}

.chart-header .chart-controls button:hover,
.chart-header .chart-controls button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-ghost);
}


/* ============================================================
   DATA TABLES
   ============================================================ */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
  min-width: 0;
  backdrop-filter: blur(8px);
}

.table-card__body,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-card__body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-card__body::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: var(--bg-hover, rgba(0, 0, 0, 0.02));
  border-radius: 4px;
}

.table-card__body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: var(--border, #e5e0d8);
  border-radius: 4px;
}

.table-card__body::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--gold, #c9a96e);
}

.table-card__header {
  padding: 20px 24px;
}

.table-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.table-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  font-size: .78rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--speed) var(--ease);
}

.filter-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--gold);
  color: var(--bg-base);
  border-color: var(--gold);
  font-weight: 600;
}


/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: var(--gold-ghost);
  border-bottom: 2px solid var(--gold);
  white-space: nowrap;
}

.data-table td {
  padding: 16px 20px;
  font-size: .9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-weight: 500;
}

.data-table tr:nth-child(even) {
  background: var(--bg-row-alt);
}

.data-table tr:hover {
  background: var(--bg-hover);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
}

.table-pagination .pagination-info {
  font-size: .78rem;
}

.table-pagination .pagination-buttons {
  display: flex;
  gap: 4px;
}

.page-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--speed) var(--ease);
}

.page-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.page-btn.active {
  background: var(--gold);
  color: var(--bg-base);
  border-color: var(--gold);
}

.page-btn:disabled {
  opacity: .3;
  pointer-events: none;
}


/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  text-transform: capitalize;
}

.badge--pending {
  background: rgba(246, 185, 59, .12);
  color: var(--amber);
}
.badge--confirmed {
  background: var(--blue-glow);
  color: var(--blue);
}
.badge--processing {
  background: var(--purple-glow);
  color: var(--purple);
}
.badge--shipped {
  background: rgba(78, 205, 196, .12);
  color: var(--cyan);
}
.badge--delivered {
  background: var(--green-glow);
  color: var(--green);
}
.badge--cancelled {
  background: var(--red-glow);
  color: var(--red);
}
.badge--returned {
  background: rgba(240, 147, 43, .12);
  color: var(--orange);
}
.badge--new {
  background: var(--gold-ghost);
  color: var(--gold);
}
.badge--bestseller {
  background: linear-gradient(135deg, rgba(201,169,110,.18), rgba(223,200,156,.12));
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}
.badge--low-stock {
  background: var(--red-glow);
  color: var(--red);
}
.badge--in-stock {
  background: var(--green-glow);
  color: var(--green);
}
.badge--out-of-stock {
  background: var(--red-glow);
  color: var(--red);
}
.badge--critical {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}
.badge--warning {
  background: rgba(255, 165, 2, 0.15);
  color: #ffa502;
  border: 1px solid rgba(255, 165, 2, 0.3);
}
.badge--active {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: .85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--speed) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #e0c58e);
  color: #1a1a2e;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 15px rgba(201,169,110,.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e0c58e, var(--gold));
  box-shadow: 0 6px 20px rgba(201,169,110,.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 110, 0.05);
  transform: translateY(-1px);
}

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

.btn-danger:hover {
  background: #c9434f;
  box-shadow: 0 2px 12px rgba(231,76,90,.25);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: .75rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .9rem;
}

.btn-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-ghost);
}


/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

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

.form-input {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  font-size: .92rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--speed) var(--ease);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  font-size: .92rem;
  color: var(--text-primary);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%239a9ab0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  transition: all var(--speed) var(--ease);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: all var(--speed) var(--ease);
  line-height: 1.6;
}

.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}


/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--speed) var(--ease);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(.92) translateY(20px);
  transition: transform var(--speed) var(--ease);
  backdrop-filter: blur(16px);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-header .modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--speed) var(--ease);
}

.modal-header .modal-close:hover {
  background: var(--bg-hover);
  color: var(--red);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}


/* ============================================================
   GLASSMORPHISM CARDS
   ============================================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--speed) var(--ease);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, .12);
}


/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

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

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.product-card .product-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-hover);
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--speed) var(--ease);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-card .product-info {
  padding: 16px;
}

.product-card .product-name {
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
}

.product-card .product-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
}


/* ============================================================
   SETTINGS TABS
   ============================================================ */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: rgba(0,0,0,.2);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.settings-tab {
  padding: 10px 20px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--speed) var(--ease);
  white-space: nowrap;
}

.settings-tab:hover {
  color: var(--text-primary);
}

.settings-tab.active {
  background: var(--gold);
  color: var(--bg-base);
  font-weight: 600;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-group {
  margin-bottom: 28px;
}

.settings-group__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

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

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

.setting-info h4 {
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.setting-info p {
  font-size: .78rem;
  color: var(--text-muted);
}


/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background: #2a2a3e;
  border-radius: var(--radius-full);
  transition: all var(--speed) var(--ease);
}

.toggle-switch .slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--speed) var(--ease);
}

.toggle-switch input:checked + .slider {
  background: var(--gold);
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(20px);
  background: var(--bg-base);
}


/* ============================================================
   AI FEATURES CARDS
   ============================================================ */
.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--speed) var(--ease);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.ai-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--purple));
}

.ai-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(157,111,255,.15);
}

.ai-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--gold-ghost), var(--purple-glow));
  color: var(--gold);
  animation: aiIconPulse 2.5s ease-in-out infinite;
}

.ai-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.ai-card__desc {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.ai-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: .78rem;
  font-weight: 600;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-ghost), rgba(157,111,255,.08));
  color: var(--gold);
  border: 1px solid var(--border-gold);
  transition: all var(--speed) var(--ease);
}

.ai-card__btn:hover {
  background: linear-gradient(135deg, rgba(201,169,110,.18), rgba(157,111,255,.14));
  box-shadow: 0 2px 16px rgba(201,169,110,.15);
  transform: translateY(-1px);
}


/* ============================================================
   MEDIA LIBRARY
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.media-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  aspect-ratio: 1;
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--speed) var(--ease);
}

.media-item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.media-item:hover img {
  transform: scale(1.05);
}

.media-item .media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.7));
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.media-item:hover .media-overlay {
  opacity: 1;
}

.media-item .media-name {
  color: #fff;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  transition: all var(--speed) var(--ease);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--gold);
  background: var(--gold-ghost);
}

.upload-zone i {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.upload-zone p {
  font-size: .88rem;
  color: var(--text-secondary);
}

.upload-zone span {
  font-size: .75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 6px;
}


/* ============================================================
   ORDER TIMELINE
   ============================================================ */
.order-timeline {
  position: relative;
  padding-left: 28px;
}

.order-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--gold);
  z-index: 1;
}

.timeline-item.completed .timeline-dot {
  background: var(--gold);
}

.timeline-item.current .timeline-dot {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.timeline-content h4 {
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: .78rem;
  color: var(--text-muted);
}

.timeline-content .timeline-time {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 6px;
}


/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-gold    { color: var(--gold) !important; }
.text-success { color: var(--green) !important; }
.text-danger  { color: var(--red) !important; }
.text-muted   { color: var(--text-muted) !important; }

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

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }


/* ============================================================
   ANIMATIONS — @keyframes
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .6; }
}

@keyframes aiGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes aiIconPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

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

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in {
  animation: fadeIn .5s var(--ease) both;
}

.animate-slide-up {
  animation: slideUp .5s var(--ease) both;
}

.animate-count {
  animation: countUp .6s var(--ease) both;
}


/* ============================================================
   SPECIFIC SECTION STYLES
   ============================================================ */

/* Recent Orders */
.recent-orders {
  margin-bottom: 24px;
}

.recent-orders .order-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.recent-orders .order-id {
  font-family: monospace;
  font-size: .8rem;
  color: var(--text-muted);
}


/* Best Sellers */
.best-sellers {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.best-sellers .seller-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius);
  transition: background var(--speed) var(--ease);
}

.best-sellers .seller-item:hover {
  background: var(--bg-hover);
}

.best-sellers .seller-item img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.best-sellers .seller-rank {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  width: 24px;
  text-align: center;
}

.best-sellers .seller-name {
  font-weight: 600;
  font-size: .85rem;
}

.best-sellers .seller-sales {
  font-size: .72rem;
  color: var(--text-muted);
}

.best-sellers .seller-revenue {
  margin-left: auto;
  font-weight: 700;
  color: var(--gold);
  font-size: .88rem;
}


/* Low Stock List */
.low-stock-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.low-stock-list .stock-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(231,76,90,.04);
  border: 1px solid rgba(231,76,90,.08);
}

.low-stock-list .stock-item img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.low-stock-list .stock-name {
  font-weight: 600;
  font-size: .82rem;
}

.low-stock-list .stock-qty {
  font-size: .78rem;
  color: var(--red);
  font-weight: 600;
  margin-left: auto;
}


/* ============================================================
   BOTTOM GRID LISTS (Best Sellers & Low Stock)
   ============================================================ */
.best-sellers__list,
.low-stock-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.best-sellers__item,
.low-stock-list__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 10px;
  border-bottom: 1px dashed var(--border);
  transition: background var(--speed) var(--ease);
}

.best-sellers__item:last-child,
.low-stock-list__item:last-child {
  border-bottom: none;
}

.best-sellers__item:hover,
.low-stock-list__item:hover {
  background: var(--bg-hover);
  border-radius: var(--radius);
}

.best-sellers__rank {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold);
  min-width: 28px;
}

.best-sellers__img,
.low-stock-list__img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}

.best-sellers__info,
.low-stock-list__info {
  flex: 1;
  min-width: 0;
}

.best-sellers__name,
.low-stock-list__name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-sellers__meta {
  font-size: .82rem;
  color: var(--gold);
  font-weight: 500;
}

.low-stock-list__stock {
  font-size: .82rem;
  color: var(--text-secondary);
}

.low-stock-list__item .badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 4px 10px;
}


/* ============================================================
   SHIPPING SECTION
   ============================================================ */
.shipping-zone-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--speed) var(--ease);
}

.shipping-zone-card:hover {
  border-color: var(--border-light);
}

.shipping-zone-card .zone-name {
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 6px;
}

.shipping-zone-card .zone-regions {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.shipping-zone-card .zone-rates {
  font-size: .82rem;
  color: var(--text-secondary);
}

.shipping-zone-card .zone-rates strong {
  color: var(--gold);
}


/* ============================================================
   PAYMENT METHODS
   ============================================================ */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.payment-method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--speed) var(--ease);
}

.payment-method-card:hover {
  border-color: var(--border-light);
}

.payment-method-card .method-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.payment-method-card .method-name {
  font-weight: 600;
  font-size: .88rem;
}

.payment-method-card .method-desc {
  font-size: .72rem;
  color: var(--text-muted);
}


/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all var(--speed) var(--ease);
}

.faq-item .faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: .88rem;
  transition: all var(--speed) var(--ease);
  color: var(--text-primary);
  text-align: left;
}

.faq-item .faq-item__question:hover {
  color: var(--gold);
}

.faq-item .faq-item__question i {
  transition: transform var(--speed) var(--ease);
  color: var(--text-muted);
  font-size: .75rem;
}

.faq-item.open .faq-item__question i {
  transform: rotate(180deg);
  color: var(--gold);
}

.faq-item .faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease);
}

.faq-item.open .faq-item__answer {
  max-height: 600px;
}

.faq-item .faq-item__answer p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ============================================================
   CHAT WIDGET
   ============================================================ */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
}

.chat-widget .chat-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-base);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  transition: all var(--speed) var(--ease);
}

.chat-widget .chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(201,169,110,.35);
}

.chat-widget .chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 340px;
  height: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-widget .chat-panel.open {
  display: flex;
}

.chat-widget .chat-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(201,169,110,.04);
}

.chat-widget .chat-panel-header h4 {
  font-size: .92rem;
  font-weight: 600;
}

.chat-widget .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chat-widget .chat-input-wrap {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.chat-widget .chat-input-wrap input {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-primary);
  outline: none;
}

.chat-widget .chat-input-wrap input:focus {
  border-color: var(--gold);
}

.chat-widget .chat-input-wrap button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}


/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding: 6px;
  background: var(--bg-sidebar);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.filter-tab {
  padding: 8px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-tab:hover {
  color: var(--text-primary);
  background: rgba(201, 169, 110, 0.08);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--gold), #d8be8a);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--gold-glow);
}


/* ============================================================
   SUB TABS (Section internal navigation)
   ============================================================ */
.sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  padding-bottom: 0;
}

.sub-tab {
  padding: 12px 22px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  white-space: nowrap;
}

.sub-tab:hover {
  color: var(--text-primary);
}

.sub-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
}


/* ============================================================
   TABLE ACTIONS
   ============================================================ */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
}

.action-btn:hover { transform: translateY(-2px); }
.action-btn--edit:hover { background: rgba(78, 205, 196, 0.15); color: var(--cyan); border-color: rgba(78, 205, 196, 0.3); box-shadow: 0 4px 10px rgba(78, 205, 196, 0.15); }
.action-btn--delete:hover { background: rgba(255, 71, 87, 0.15); color: var(--red); border-color: rgba(255, 71, 87, 0.3); box-shadow: 0 4px 10px rgba(255, 71, 87, 0.15); }
.action-btn--view:hover { background: rgba(201, 169, 110, 0.15); color: var(--gold); border-color: rgba(201, 169, 110, 0.3); box-shadow: 0 4px 10px rgba(201, 169, 110, 0.15); }


/* ============================================================
   CHAT WIDGET PREVIEW (Settings Page)
   ============================================================ */
.chat-widget-preview {
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-widget-preview__header {
  padding: 18px 24px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
}
.chat-widget-preview__status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-widget-preview__dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16,185,129,0.8);
  border: 2px solid #fff;
}
.chat-widget-preview__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-base);
}
.chat-msg {
  max-width: 85%;
  display: flex;
  flex-direction: column;
}
.chat-msg p {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.chat-msg__time {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-left: 4px;
}
.chat-msg--received {
  align-self: flex-start;
}
.chat-msg--received p {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg--sent {
  align-self: flex-end;
}
.chat-msg--sent p {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-base);
  border-bottom-right-radius: 4px;
}
.chat-msg--sent .chat-msg__time {
  align-self: flex-end;
}
.chat-widget-preview__footer {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
  background: var(--bg-card);
}
.chat-widget-preview__footer input {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-primary);
}


/* ============================================================
   MARKETING COMPONENTS
   ============================================================ */
.coupon-grid, .promo-grid, .campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* Coupon Card */
.coupon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all var(--speed) var(--ease);
  overflow: hidden;
}

.coupon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-color: var(--border-light);
}

.coupon-card__badge {
  display: inline-block;
  background: rgba(201, 169, 110, 0.1);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid rgba(201, 169, 110, 0.2);
}

.coupon-card__code {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.coupon-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.coupon-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.coupon-card__meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Promo Card */
.promo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--speed) var(--ease);
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-color: var(--border-light);
}

.promo-banner {
  height: 120px;
  background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(42,42,62,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.promo-banner i {
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.8;
}

.promo-body {
  padding: 24px;
}

.promo-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Campaign Card */
.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--speed) var(--ease);
}

.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border-color: var(--border-light);
}


/* ============================================================
   REVIEWS GRID
   ============================================================ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}


/* ============================================================
   CUSTOMERS, REVIEWS & LOYALTY (Sub-tabs & Cards)
   ============================================================ */
.sub-tabs-container {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.sub-tabs-nav {
  display: flex;
  gap: 32px;
}

.sub-tabs-nav .sub-tab {
  background: transparent;
  border: none;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.sub-tabs-nav .sub-tab:hover {
  color: var(--gold);
}

.sub-tabs-nav .sub-tab.active {
  color: var(--gold);
}

.sub-tabs-nav .sub-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
}

/* Review Cards */
.review-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #f0ece6);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(201, 169, 110, 0.08);
  border-color: var(--gold, #c9a96e);
}

.review-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.review-card__customer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.review-card__name {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.review-card__date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-card__product {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
}

.review-card__text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
}

/* Loyalty Cards */
.loyalty-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: all var(--speed) var(--ease);
  overflow: hidden;
  text-align: center;
}

.loyalty-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border-color: var(--border-light);
}

.loyalty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--accent, var(--purple)));
}

.loyalty-card__icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.loyalty-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.loyalty-card__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.loyalty-card__desc {
  font-size: .82rem;
  color: var(--text-muted);
}


/* ============================================================
   LIGHT THEME (optional toggle)
   ============================================================ */
body.theme-light {
  --bg-base:     #f5f3f0;
  --bg-card:     #ffffff;
  --bg-sidebar:  #faf9f7;
  --bg-topbar:   rgba(250, 249, 247, .88);
  --bg-input:    #f0ede8;
  --bg-hover:    rgba(201, 169, 110, .06);
  --bg-row-alt:  rgba(0, 0, 0, .015);

  --border:         rgba(0, 0, 0, .08);
  --border-light:   rgba(0, 0, 0, .12);
  --border-gold:    rgba(201, 169, 110, .30);

  --text-primary:   #1a1a2e;
  --text-secondary: #4a4a60;
  --text-muted:     #8a8a9f;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.12);
}

body.theme-light ::-webkit-scrollbar-thumb {
  background: #c8c8d8;
}

body.theme-light .sidebar {
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(201,169,110,.05) 0%, transparent 60%);
}


/* ============================================================
   PREMIUM SWEETALERT2 STYLES OVERRIDE (LUXURY THEME)
   ============================================================ */
.swal2-popup {
  font-family: var(--font-body) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-gold) !important;
  box-shadow: var(--shadow-lg) !important;
  background-color: var(--bg-card) !important;
  padding: 24px !important;
}

.swal2-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  font-size: 1.5rem !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 20px !important;
  border-bottom: 1px solid var(--border-light) !important;
  padding-bottom: 12px !important;
}

.swal2-html-container {
  color: var(--text-primary) !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* SweetAlert inputs and forms */
.swal2-input, .swal2-file, .swal2-textarea, .swal2-select {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  padding: 10px 14px !important;
  color: var(--text-primary) !important;
  background-color: var(--bg-input) !important;
  transition: all var(--speed) var(--ease) !important;
  box-shadow: none !important;
  margin: 8px 0 15px 0 !important;
}

.swal2-input:focus, .swal2-file:focus, .swal2-textarea:focus, .swal2-select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px var(--gold-glow) !important;
  outline: none !important;
}

/* Modern file upload button styling */
.swal2-file {
  padding: 8px 12px !important;
  width: 100% !important;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  background: var(--gold-ghost) !important;
  color: var(--gold) !important;
  border: 1px solid var(--border-gold) !important;
  padding: 6px 14px !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  font-weight: 600 !important;
  font-family: var(--font-body) !important;
  margin-right: 12px !important;
  transition: all 0.2s ease !important;
}

input[type="file"]::file-selector-button:hover {
  background: var(--gold) !important;
  color: white !important;
}

/* Action Buttons style override */
.swal2-actions {
  margin-top: 24px !important;
  gap: 10px !important;
}

.swal2-confirm.swal2-styled {
  background-color: var(--gold) !important;
  color: white !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  padding: 11px 26px !important;
  font-size: 0.9rem !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  border: none !important;
}

.swal2-confirm.swal2-styled:hover {
  background-color: var(--gold-dark) !important;
  box-shadow: var(--shadow-gold) !important;
}

.swal2-cancel.swal2-styled {
  background-color: #f0ece6 !important;
  color: #555555 !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  padding: 11px 26px !important;
  font-size: 0.9rem !important;
  border: 1px solid var(--border) !important;
  transition: all 0.2s ease !important;
}

.swal2-cancel.swal2-styled:hover {
  background-color: #e5e0d8 !important;
  color: #1a1a1a !important;
}

.swal2-deny.swal2-styled {
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  padding: 11px 26px !important;
}

/* Scrollbar styling for the gallery container */
#swal-gallery-grid::-webkit-scrollbar {
  width: 6px;
}
#swal-gallery-grid::-webkit-scrollbar-track {
  background: #faf9f7;
  border-radius: 4px;
}
#swal-gallery-grid::-webkit-scrollbar-thumb {
  background: #e5e0d8;
  border-radius: 4px;
}
#swal-gallery-grid::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}


/* ============================================================
   RESPONSIVE — Tablet (≤ 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    z-index: 1100;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .mobile-overlay {
    display: block;
  }

  .main-content {
    grid-column: 1;
  }

  .content-area {
    padding: 18px 14px;
  }

  .topbar {
    padding: 0 14px;
  }

  .topbar-search {
    width: 160px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 16px;
  }

  .kpi-card__value {
    font-size: 1.3rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .notification-dropdown {
    width: 300px;
    right: -60px;
  }

  .admin-profile .admin-name,
  .admin-profile .admin-role {
    display: none;
  }

  .modal {
    width: 96%;
    max-height: 90vh;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    gap: 0;
  }

  .settings-tab {
    padding: 10px 14px;
    font-size: .75rem;
  }

  .chat-widget .chat-panel {
    width: 300px;
  }
}


/* ============================================================
   RESPONSIVE — Small Phone (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .topbar-search {
    display: none;
  }

  .content-area {
    padding: 14px 10px;
  }

  .kpi-card__value {
    font-size: 1.15rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .charts-grid {
    gap: 14px;
  }

  .chart-card {
    padding: 16px;
  }

  .modal {
    border-radius: var(--radius);
  }

  .chat-widget .chat-panel {
    width: calc(100vw - 32px);
    right: -16px;
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   SETTINGS & EMAIL TEMPLATES POLISHED UI/UX
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-top: 8px;
}

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

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Upload Area with Previews */
.upload-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-input);
  transition: all var(--speed) var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.upload-area:hover {
  border-color: var(--gold);
  background: var(--gold-ghost);
}

.upload-area i {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.upload-area span {
  font-size: .8rem;
  color: var(--text-secondary);
}

.preview-container {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.preview-container img {
  max-height: 80px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
  background: rgba(255,255,255,0.05);
}

/* Google SERP Preview */
.google-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
}

.google-preview__title {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  display: block;
}

.google-preview__box {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #e5e0d8;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: Arial, sans-serif;
  text-align: left;
  line-height: 1.4;
}

body.theme-light .google-preview__box {
  background: #ffffff;
  color: #1a1a1a;
}

.google-preview__url {
  font-size: 0.85rem;
  color: #202124;
  margin-bottom: 4px;
  display: block;
  word-break: break-all;
}

.google-preview__link {
  font-size: 1.25rem;
  color: #1a0dab;
  text-decoration: none;
  font-weight: 400;
  display: inline-block;
  margin-bottom: 4px;
  line-height: 1.3;
}

.google-preview__link:hover {
  text-decoration: underline;
}

.google-preview__desc {
  font-size: 0.875rem;
  color: #4d5156;
  word-break: break-word;
}

/* Email Templates UI */
.templates-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

.template-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--speed) var(--ease);
}

.template-item-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-hover);
  transform: translateX(4px);
}

.template-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.template-item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-item-subject {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.template-item-actions {
  display: flex;
  gap: 8px;
}

/* Session Management UI */
.session-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color var(--speed) var(--ease);
}

.session-item-card:hover {
  border-color: var(--border-light);
}

.session-item-details {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-item-details i {
  font-size: 1.4rem;
  color: var(--gold);
}

.session-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-item-device {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.session-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   SETTINGS LUXURY EXTENSIONS (EDITOR, PREVIEW, 2FA, SMTP)
   ============================================================ */

/* 1. Live Split-Screen Editor */
.editor-container {
  display: flex;
  gap: 20px;
  height: 520px;
  width: 100%;
  text-align: left;
  margin-top: 15px;
}

@media (max-width: 768px) {
  .editor-container {
    flex-direction: column;
    height: 700px;
  }
}

.editor-pane-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-pane-right {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-textarea {
  width: 100%;
  height: 100%;
  background: var(--bg-input, #f0ede8);
  color: var(--text-primary, #1a1a2e);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius, 8px);
  padding: 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  resize: none;
  outline: none;
  line-height: 1.5;
  transition: border-color var(--speed) var(--ease);
}

.editor-textarea:focus {
  border-color: var(--gold, #c9a96e);
}

.editor-iframe-wrapper {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius, 8px);
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
}

.editor-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* 2. Device Responsive Previewer */
.preview-header {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.device-btn {
  background: var(--bg-input, #f0ede8);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  color: var(--text-secondary, #4a4a60);
  padding: 8px 16px;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--speed) var(--ease);
}

.device-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.device-btn.active {
  background: var(--gold, #c9a96e);
  color: #ffffff;
  border-color: var(--gold, #c9a96e);
  box-shadow: 0 4px 10px rgba(201, 169, 110, 0.2);
}

.preview-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 450px;
}

.preview-frame-mobile {
  width: 375px;
  height: 600px;
  border: 12px solid #1a1a1a;
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #1a1a1a;
  position: relative;
}

.preview-frame-mobile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 18px;
  background: #1a1a1a;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

.preview-frame-desktop {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* 3. Two-Factor Authentication Stepper UI */
.stepper-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.stepper-line {
  position: absolute;
  top: 16px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--border, rgba(0,0,0,0.08));
  z-index: 1;
}

.stepper-line-active {
  position: absolute;
  top: 16px;
  left: 8%;
  width: 0%;
  height: 2px;
  background: var(--gold, #c9a96e);
  z-index: 2;
  transition: width 0.3s ease;
}

.stepper-step {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-input, #f0ede8);
  color: var(--text-muted, #8a8a9f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 3;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.stepper-step.active {
  background: var(--bg-card, #ffffff);
  color: var(--gold, #c9a96e);
  border-color: var(--gold, #c9a96e);
  box-shadow: 0 0 0 4px var(--gold-glow);
}

.stepper-step.completed {
  background: var(--gold, #c9a96e);
  color: #ffffff;
  border-color: var(--gold, #c9a96e);
}

.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.qr-code-svg {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: center;
  align-items: center;
}

.recovery-codes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}

@media (max-width: 480px) {
  .recovery-codes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.recovery-code-card {
  background: var(--bg-input, #f0ede8);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius-sm, 4px);
  padding: 10px 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: var(--text-primary, #1a1a2e);
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
}

/* 4. SMTP Progress Stepper */
.smtp-progress-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin: 20px 0;
  padding: 5px;
}

.smtp-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-muted, #8a8a9f);
  transition: color 0.3s ease;
}

.smtp-progress-item.active {
  color: var(--text-primary, #1a1a2e);
  font-weight: 600;
}

.smtp-progress-item.completed {
  color: var(--gold, #c9a96e);
}

.smtp-progress-icon {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.smtp-progress-icon i {
  font-size: 1rem;
}

/* ============================================================
   STATS & BADGES LUXURY CARDS
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.stat-badge {
  background: #ffffff;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  font-size: 0.95rem;
  color: #4a4a4a;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 169, 110, 0.1);
  border-color: #c9a96e;
}

.stat-badge i {
  font-size: 1.5rem;
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.08);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.stat-badge:hover i {
  background: #c9a96e;
  color: #ffffff;
}

.stat-badge strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-left: auto;
  font-family: var(--font-display);
}

.stat-badge.stat-badge--green i {
  color: #2ed573;
  background: rgba(46, 213, 115, 0.08);
}
.stat-badge.stat-badge--green:hover i {
  background: #2ed573;
  color: #ffffff;
}

.stat-badge.stat-badge--blue i {
  color: #1e90ff;
  background: rgba(30, 144, 255, 0.08);
}
.stat-badge.stat-badge--blue:hover i {
  background: #1e90ff;
  color: #ffffff;
}

.stat-badge.stat-badge--red i {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.08);
}
.stat-badge.stat-badge--red:hover i {
  background: #ff4757;
  color: #ffffff;
}

.stat-badge {
  cursor: pointer;
}
.stat-badge.stat-badge--yellow i {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.08);
}
.stat-badge.stat-badge--yellow:hover i {
  background: #ffa502;
  color: #ffffff;
}

/* Active states for stats cards filtering */
.stat-badge.active {
  border-color: #c9a96e !important;
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.15) !important;
  background: rgba(201, 169, 110, 0.02) !important;
}
.stat-badge.stat-badge--green.active {
  border-color: #2ed573 !important;
  box-shadow: 0 4px 15px rgba(46, 213, 115, 0.15) !important;
  background: rgba(46, 213, 115, 0.02) !important;
}
.stat-badge.stat-badge--yellow.active {
  border-color: #ffa502 !important;
  box-shadow: 0 4px 15px rgba(255, 165, 2, 0.15) !important;
  background: rgba(255, 165, 2, 0.02) !important;
}
.stat-badge.stat-badge--red.active {
  border-color: #ff4757 !important;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.15) !important;
  background: rgba(255, 71, 87, 0.02) !important;
}

/* ============================================================
   COURIER INTEGRATIONS
   ============================================================ */
.courier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.courier-card {
  background: #ffffff;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.courier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(201, 169, 110, 0.12);
  border-color: #c9a96e;
}

.courier-card__logo {
  font-size: 1.8rem;
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.08);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.courier-card:hover .courier-card__logo {
  background: #c9a96e;
  color: #ffffff;
}

.courier-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  font-family: var(--font-display);
}

.courier-card__desc {
  font-size: 0.9rem;
  color: #6b6b6b;
  margin: 0;
  line-height: 1.5;
  flex-grow: 1;
}

.courier-card .badge {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  margin-top: 0.5rem;
}

/* ============================================================
   ROLES & PERMISSIONS MATRIX
   ============================================================ */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.role-card {
  background: #ffffff;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(201, 169, 110, 0.12);
  border-color: #c9a96e;
}

.role-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  font-family: var(--font-display);
  border-bottom: 2px solid #fcfaf7;
  padding-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.role-card__title::after {
  content: '\f505'; /* Shield check icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #c9a96e;
  font-size: 1.1rem;
}

.role-card__permissions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #4a4a4a;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.checkbox-label:hover {
  color: #c9a96e;
}

/* Customize Checkbox */
.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #dcd1be;
  border-radius: 4px;
  outline: none;
  background: #ffffff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
  background: #c9a96e;
  border-color: #c9a96e;
}

.checkbox-label input[type="checkbox"]:checked::before {
  content: "\f00c"; /* check icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.65rem;
  color: #ffffff;
}

.checkbox-label input[type="checkbox"]:disabled {
  background: #f5f2eb;
  border-color: #e5decb;
  cursor: not-allowed;
}

.checkbox-label input[type="checkbox"]:disabled:checked::before {
  color: #c9a96e;
}

/* ============================================================
   QUILL RICH TEXT EDITOR LUXURY CUSTOMIZATION
   ============================================================ */
.ql-toolbar.ql-snow {
  border-color: var(--border, #e5e0d8) !important;
  background: #faf8f5;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 8px 12px !important;
}

.ql-container.ql-snow {
  border-color: var(--border, #e5e0d8) !important;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  background: #ffffff;
}

.ql-editor {
  min-height: 250px;
  max-height: 380px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #1a1a1a;
}

.ql-editor p {
  margin-bottom: 12px;
}

/* ── AI Calendar & Events ─────────────────────────────────── */
.ai-calendar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 4px 0;
}

.ai-calendar-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-lg, 16px);
  padding: 28px 32px;
  border: 1px solid rgba(201, 169, 110, 0.2);
  position: relative;
  overflow: hidden;
}

.ai-calendar-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(201, 169, 110, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.ai-calendar-banner__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e8c87a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.4);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(201, 169, 110, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(201, 169, 110, 0.7); }
}

.ai-calendar-banner__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: 0.02em;
}

.ai-calendar-banner__sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.ai-event-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ai-event-stat {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-event-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ai-event-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #e8c87a);
  border-radius: 3px 3px 0 0;
}

.ai-event-stat__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.ai-event-stat__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Events Grid */
.ai-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ai-event-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.ai-event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.ai-event-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.25);
  background: rgba(201, 169, 110, 0.03);
}

.ai-event-card__urgency {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
}

.urgency--critical {
  background: rgba(231, 76, 90, 0.12);
  color: #e74c5a;
  border: 1px solid rgba(231, 76, 90, 0.3);
}

.urgency--soon {
  background: rgba(255, 171, 0, 0.12);
  color: #d4900e;
  border: 1px solid rgba(255, 171, 0, 0.3);
}

.urgency--upcoming {
  background: rgba(46, 204, 113, 0.12);
  color: #27ae60;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.ai-event-card__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.ai-event-card__emoji {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.ai-event-card__info {
  flex: 1;
  min-width: 0;
}

.ai-event-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  padding-right: 70px; /* Make room for urgency badge */
}

.ai-event-card__date {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-event-card__days {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-left: 6px;
  font-weight: 400;
}

.ai-event-card__suggestion {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-hover, #f9f9f9);
  border-radius: var(--radius, 8px);
  border-left: 3px solid var(--gold);
}

.ai-event-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-event-card__discount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.ai-event-card__action {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* CTA Section */
.ai-calendar-cta {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.06) 0%, rgba(91, 127, 255, 0.04) 100%);
  border: 1px dashed rgba(201, 169, 110, 0.4);
  border-radius: var(--radius-lg, 16px);
  padding: 32px;
  text-align: center;
}

.ai-calendar-cta__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.ai-calendar-cta__title i {
  color: var(--gold);
  margin-right: 8px;
}

.ai-calendar-cta__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

.ai-calendar-cta__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* AI Dashboard Assistant Widget */
.ai-assistant-widget {
  border: 1px dashed rgba(201, 169, 110, 0.4) !important;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.05) 0%, rgba(26, 26, 31, 0.01) 100%) !important;
  margin-bottom: 24px;
}
body.theme-light .ai-assistant-widget {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.04) 0%, rgba(255, 255, 255, 0.6) 100%) !important;
}
.ai-dash-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}
body.theme-light .ai-dash-event {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.ai-dash-event:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 169, 110, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.ai-dash-event__emoji {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 110, 0.1);
  border-radius: 8px;
}
.ai-dash-event__info {
  flex: 1;
  min-width: 0;
}
.ai-dash-event__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-dash-event__date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.ai-dash-event__action {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ai-dash-event__action:hover {
  text-decoration: underline;
}

