﻿@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sidebar-width: 270px;
  --sidebar-collapsed: 72px;
  --primary: #9a2226;
  --primary-dark: #7a1a1d;
  --primary-light: #fde8e8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-hover: rgba(154, 34, 38, 0.06);
  --sidebar-active: rgba(154, 34, 38, 0.1);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 10px 40px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Inter", "Cairo", sans-serif;
  color: var(--text-primary);
  direction: ltr;
  overflow-x: hidden;
  font-size: 13px;
}

a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: "Inter", "Cairo", sans-serif;
  cursor: pointer;
}

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.container_main {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 200;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

/* Scrollbar */
.nav-section::-webkit-scrollbar {
  width: 3px;
}
.nav-section::-webkit-scrollbar-track {
  background: transparent;
}
.nav-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Brand / Logo */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 2px solid var(--border);
  min-height: 72px;
  overflow: hidden;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.brand-text {
  overflow: hidden;
  transition: var(--transition);
}
.brand-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.brand-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  margin-top: 1px;
}

/* Toggle */
.sidebar-toggle {
  position: absolute;
  left: 14px;
  top: 22px;
  width: 26px;
  height: 26px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: var(--transition);
  z-index: 10;
}
.sidebar-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

/* Nav Section */
.nav-section {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px 20px;
}

/* Section Label */
.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}

/* Nav Item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 1px;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.nav-item .nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #9a2226;
}
.nav-item:hover .nav-icon {
  background: rgba(154, 34, 38, 0.08);
  color: #9a2226;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: #9a2226;
}
.nav-item.active .nav-icon {
  background: rgba(154, 34, 38, 0.12);
  color: #9a2226;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: #9a2226;
  border-radius: 0 3px 3px 0;
}

/* Dropdown */
.nav-item.dropdown {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.nav-item.dropdown::before {
  display: none;
}

.dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  background: none;
  border: none;
}
.dropdown-toggle:hover {
  background: var(--sidebar-hover);
  color: #9a2226;
}
.dropdown-toggle .nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dropdown-toggle .nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}
.dropdown-toggle:hover .nav-icon {
  background: rgba(154, 34, 38, 0.08);
  color: #9a2226;
}
.dropdown-icon {
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.3s;
  margin-right: 2px;
}
.nav-item.dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}
.nav-item.dropdown.open .dropdown-toggle {
  color: #9a2226;
}
.nav-item.dropdown.open .dropdown-toggle .nav-icon {
  background: rgba(154, 34, 38, 0.08);
  color: #9a2226;
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  padding: 4px 0 6px 10px;
  margin-top: 2px;
  position: relative;
}
.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 14px;
  border-radius: 6px;
  color: #64748b;
  font-size: 13px;
  transition: var(--transition);
  position: relative;
}
.dropdown-menu a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: var(--transition);
}
.dropdown-menu a:hover {
  color: #9a2226;
  background: rgba(154, 34, 38, 0.06);
}
.dropdown-menu a:hover::before {
  background: #9a2226;
}
.dropdown-menu a.active-link {
  color: #c94b4f;
}
.dropdown-menu a.active-link::before {
  background: #9a2226;
}

/* Divider */
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 6px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar-user:hover {
  background: var(--sidebar-hover);
}
.sidebar-user img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.user-info {
  overflow: hidden;
  flex: 1;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}
.user-role {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}
.sidebar-user .logout-icon {
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
  transition: var(--transition);
}
.sidebar-user:hover .logout-icon {
  color: #ef4444;
}

/* ── COLLAPSED ── */
.sidebar.closed {
  width: var(--sidebar-collapsed);
}
.sidebar.closed .brand-text,
.sidebar.closed .nav-label,
.sidebar.closed .nav-item span,
.sidebar.closed .dropdown-toggle span,
.sidebar.closed .dropdown-icon,
.sidebar.closed .dropdown-menu,
.sidebar.closed .user-info,
.sidebar.closed .logout-icon {
  display: none;
}
.sidebar.closed .sidebar-brand {
  justify-content: center;
  padding: 16px;
}
.sidebar.closed .nav-item,
.sidebar.closed .dropdown-toggle {
  justify-content: center;
  padding: 9px;
}
.sidebar.closed .nav-item.dropdown {
  display: none;
}
.sidebar.closed .sidebar-user {
  justify-content: center;
}
.sidebar.closed .sidebar-toggle {
  left: 50%;
  transform: translateX(-50%);
  position: relative;
  top: auto;
  margin: 8px auto;
  display: flex;
}

/* Tooltip */
.sidebar.closed [data-tip] {
  position: relative;
}
.sidebar.closed [data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 9999;
  box-shadow: var(--shadow-md);
}
.sidebar.closed [data-tip]:hover::after {
  opacity: 1;
}

/* Mobile */
.mobile-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-primary);
  padding: 4px 8px;
}
@media (max-width: 992px) {
  .mobile-btn {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-width));
    top: 0;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 1500;
  }
  .sidebar.active {
    left: 0;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
  }
  .sidebar-overlay.active {
    display: block;
  }
}

/* ══════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

/* ══════════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════════ */
.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.breadcrumb-nav span {
  color: var(--text-secondary);
}
.breadcrumb-nav i {
  font-size: 9px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}
.topbar-btn:hover {
  background: var(--bg);
  color: var(--text-primary);
}
.topbar-btn .notif-dot {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 4px;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
}
.topbar-profile:hover {
  background: var(--bg);
}
.topbar-profile img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}
.topbar-profile-info {
  text-align: right;
}
.topbar-profile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}
.topbar-profile-role {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* ══════════════════════════════════════════════
   PAGE BODY
══════════════════════════════════════════════ */
.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 0;
}

/* ══════════════════════════════════════════════
   WELCOME BANNER
══════════════════════════════════════════════ */
.welcome-banner {
  background: linear-gradient(135deg, #9a2226 0%, #c94b4f 50%, #7a1a1d 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.welcome-banner::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.welcome-banner::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: 30%;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}
.welcome-text {
  position: relative;
  z-index: 1;
}
.welcome-text h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.welcome-text p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.welcome-actions {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.welcome-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Cairo", sans-serif;
}
.welcome-btn.solid {
  background: #fff;
  color: #9a2226;
}
.welcome-btn.solid:hover {
  background: #f1f5f9;
}
.welcome-btn.outline {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.welcome-btn.outline:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ══════════════════════════════════════════════
   STATS GRID
══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.stat-card:hover::after {
  opacity: 1;
}
.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stat-icon.indigo {
  background: #fde8e8;
  color: #9a2226;
}
.stat-icon.emerald {
  background: #d1fae5;
  color: #10b981;
}
.stat-icon.amber {
  background: #fef3c7;
  color: #f59e0b;
}
.stat-icon.violet {
  background: #ede9fe;
  color: #8b5cf6;
}
.stat-icon.rose {
  background: #ffe4e6;
  color: #f43f5e;
}
.stat-icon.cyan {
  background: #cffafe;
  color: #06b6d4;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}
.stat-trend.up {
  background: #d1fae5;
  color: #059669;
}
.stat-trend.down {
  background: #ffe4e6;
  color: #e11d48;
}

.stat-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

/* ══════════════════════════════════════════════
   GRID 2 COLS
══════════════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.grid-3-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .grid-3-1 {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════
   CARD
══════════════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.card-body {
  padding: 20px;
}
.card-body.no-pad {
  padding: 0;
}

/* ══════════════════════════════════════════════
   TABLE
══════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr {
  transition: background 0.15s;
}
.data-table tbody tr:hover td {
  background: #f8fafc;
}

.event-name {
  font-weight: 600;
  color: var(--text-primary);
}
.event-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.badge.active {
  background: #d1fae5;
  color: #059669;
}
.badge.active .badge-dot {
  background: #059669;
}
.badge.pending {
  background: #fef3c7;
  color: #d97706;
}
.badge.pending .badge-dot {
  background: #d97706;
}
.badge.rejected {
  background: #ffe4e6;
  color: #e11d48;
}
.badge.rejected .badge-dot {
  background: #e11d48;
}
.badge.ended {
  background: #f1f5f9;
  color: #64748b;
}
.badge.ended .badge-dot {
  background: #94a3b8;
}

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Cairo", sans-serif;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(154, 34, 38, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text-primary);
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}

/* ══════════════════════════════════════════════
   ACTIVITY LIST
══════════════════════════════════════════════ */
.activity-list {
  display: flex;
  flex-direction: column;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-item:hover {
  background: #f8fafc;
}
.activity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.activity-content {
  flex: 1;
}
.activity-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.activity-text strong {
  color: var(--text-primary);
  font-weight: 600;
}
.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ══════════════════════════════════════════════
   QUICK STATS ROW
══════════════════════════════════════════════ */
.quick-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.quick-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s;
}
.quick-stat-item:last-child {
  border-bottom: none;
}
.quick-stat-item:hover {
  background: #f8fafc;
}
.quick-stat-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quick-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.quick-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.quick-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════
   PROGRESS
══════════════════════════════════════════════ */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 1s ease;
}

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 50px 20px;
}
.empty-state i {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}
.empty-state h3 {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   SCROLLBAR (page body)
══════════════════════════════════════════════ */
.page-body::-webkit-scrollbar {
  width: 5px;
}
.page-body::-webkit-scrollbar-track {
  background: transparent;
}
.page-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

/* ══════════════════════════════════════════════
   LANGUAGE BUTTON
══════════════════════════════════════════════ */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Cairo", sans-serif;
  white-space: nowrap;
}
.lang-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.lang-btn i {
  font-size: 13px;
}

/* ══════════════════════════════════════════════
   PROFILE DROPDOWN
══════════════════════════════════════════════ */
.topbar-right {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 220px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.profile-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
}
.profile-dropdown-header img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  border: 2px solid var(--border);
}
.profile-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.profile-dropdown-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.profile-dropdown-divider {
  height: 1px;
  background: var(--border);
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: "Cairo", sans-serif;
}
.profile-dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.profile-dropdown-item:hover {
  background: var(--bg);
  color: var(--text-primary);
}
.profile-dropdown-item:hover i {
  color: var(--primary);
}
.profile-dropdown-item.danger {
  color: var(--danger);
}
.profile-dropdown-item.danger i {
  color: var(--danger);
}
.profile-dropdown-item.danger:hover {
  background: #fff1f2;
}

/* ══════════════════════════════════════════════
   EVENTS PAGE
══════════════════════════════════════════════ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-input {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 13px;
  font-family: "Cairo", sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 34, 38, 0.08);
}
.filter-select {
  min-width: 140px;
  cursor: pointer;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}
.search-wrap input {
  width: 100%;
  padding-left: 34px;
}

.stats-mini {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .stats-mini {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .stats-mini {
    grid-template-columns: repeat(2, 1fr);
  }
}
.stat-mini-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-mini-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--border);
}
.stat-mini-card:has(.stat-mini-icon.primary)::before {
  background: var(--primary);
}
.stat-mini-card:has(.stat-mini-icon.success)::before {
  background: #10b981;
}
.stat-mini-card:has(.stat-mini-icon.warning)::before {
  background: #f59e0b;
}
.stat-mini-card:has(.stat-mini-icon.danger)::before {
  background: #ef4444;
}
.stat-mini-card:has(.stat-mini-icon.neutral)::before {
  background: #94a3b8;
}
.stat-mini-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: transparent;
}
.stat-mini-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.stat-mini-icon.primary {
  background: #fde8e8;
  color: #9a2226;
}
.stat-mini-icon.success {
  background: #d1fae5;
  color: #10b981;
}
.stat-mini-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}
.stat-mini-icon.danger {
  background: #ffe4e6;
  color: #f43f5e;
}
.stat-mini-icon.neutral {
  background: #f1f5f9;
  color: #64748b;
}
.stat-mini-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.stat-mini-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.table-actions {
  display: flex;
  gap: 6px;
}

/* Clicks land on the <button>, not the nested <i> (Font Awesome) */
.data-table .table-actions button i,
.data-table tbody button.btn-icon i {
  pointer-events: none;
}

.ticket-progress {
  margin-top: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.ticket-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.card-header-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════
   SECTION HUBS — Events + Providers list pages
══════════════════════════════════════════════ */
.page-body.events-hub,
.page-body.providers-hub,
.page-body.customers-hub {
  padding: 20px 24px 28px;
  /* background: linear-gradient(
    180deg,
    rgba(154, 34, 38, 0.04) 0%,
    transparent 220px
  ); */
}

.events-hub-nav,
.providers-hub-nav,
.customers-hub-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.events-hub-link,
.providers-hub-link,
.customers-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.events-hub-link i,
.providers-hub-link i,
.customers-hub-link i {
  font-size: 12px;
  opacity: 0.85;
}

.events-hub-link:hover,
.providers-hub-link:hover,
.customers-hub-link:hover {
  color: var(--text-primary);
  background: var(--bg);
  border-color: var(--border);
}

.events-hub-link.is-active,
.providers-hub-link.is-active,
.customers-hub-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, #9a2226 0%, #b83238 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(154, 34, 38, 0.28);
}

.events-hub-link.is-active i,
.providers-hub-link.is-active i,
.customers-hub-link.is-active i {
  opacity: 1;
}

.events-hub-link--cta:not(.is-active),
.providers-hub-link--cta:not(.is-active),
.customers-hub-link--cta:not(.is-active) {
  margin-inline-start: auto;
  color: var(--primary);
  border-color: rgba(154, 34, 38, 0.25);
  background: rgba(154, 34, 38, 0.06);
}

.events-hub-link--cta:not(.is-active):hover,
.providers-hub-link--cta:not(.is-active):hover,
.customers-hub-link--cta:not(.is-active):hover {
  background: rgba(154, 34, 38, 0.12);
  border-color: rgba(154, 34, 38, 0.35);
}

.events-hub-link--cta.is-active,
.providers-hub-link--cta.is-active,
.customers-hub-link--cta.is-active {
  margin-inline-start: auto;
}

@media (max-width: 720px) {
  .events-hub-link--cta,
  .providers-hub-link--cta,
  .customers-hub-link--cta {
    margin-inline-start: 0;
    width: 100%;
    justify-content: center;
  }
}

/* Toolbar + table polish inside hub */
.events-hub .filters-bar,
.providers-hub .filters-bar,
.customers-hub .filters-bar {
  padding: 14px 16px;
  margin-bottom: 18px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(14, 14, 14, 0.059);
  gap: 12px;
}

.events-hub .filter-input,
.events-hub .search-wrap .filter-input,
.providers-hub .filter-input,
.providers-hub .search-wrap .filter-input,
.customers-hub .filter-input,
.customers-hub .search-wrap .filter-input {
  border-radius: 10px;
}

.events-hub .search-wrap input,
.providers-hub .search-wrap input,
.customers-hub .search-wrap input {
  padding-inline-start: 38px;
}

.events-hub .search-wrap i,
.providers-hub .search-wrap i,
.customers-hub .search-wrap i {
  left: auto;
  right: auto;
  inset-inline-start: 14px;
}

.events-hub .stats-mini,
.providers-hub .stats-mini,
.customers-hub .stats-mini {
  gap: 14px;
  margin-bottom: 18px;
}

.events-hub .stat-mini-card,
.providers-hub .stat-mini-card,
.customers-hub .stat-mini-card {
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.events-hub .card,
.providers-hub .card,
.customers-hub .card {
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.events-hub .card-header,
.providers-hub .card-header,
.customers-hub .card-header {
  padding: 18px 22px;
  /* background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.95) 0%,
    var(--card-bg) 100%
  ); */
}

.events-hub .card-header-icon,
.providers-hub .card-header-icon,
.customers-hub .card-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 16px;
}

.events-hub .card-title,
.providers-hub .card-title,
.customers-hub .card-title {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.events-hub .data-table thead th,
.providers-hub .data-table thead th,
.customers-hub .data-table thead th {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  font-size: 11px;
  padding-top: 13px;
  padding-bottom: 13px;
  /* border-bottom: 1px solid #e2e8f0; */
}

.events-hub .data-table tbody td,
.providers-hub .data-table tbody td,
.customers-hub .data-table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.events-hub .data-table tbody tr:hover td,
.providers-hub .data-table tbody tr:hover td,
.customers-hub .data-table tbody tr:hover td {
  background: rgba(154, 34, 38, 0.04);
}

.events-hub .events-grid,
.providers-hub .events-grid,
.customers-hub .events-grid {
  padding: 20px 22px 8px;
  gap: 18px;
}

.events-hub .event-grid-card,
.providers-hub .event-grid-card,
.customers-hub .event-grid-card {
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.events-hub .pagination,
.providers-hub .pagination,
.customers-hub .pagination {
  padding: 18px 22px;
  background: #fafbfc;
  border-top: 1px solid var(--border);
}

.events-hub .page-btn,
.providers-hub .page-btn,
.customers-hub .page-btn {
  border-radius: 10px;
  width: 36px;
  height: 36px;
}

/* Create event form */
.page-body.events-hub--form .events-hub-nav {
  margin-bottom: 18px;
}

.events-hub--form .create-event-grid {
  gap: 22px;
}

.events-hub--form .card {
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.events-hub--form .upload-area {
  border-radius: 14px;
  border-style: dashed;
  border-width: 2px;
  padding: 28px 20px;
  background: linear-gradient(
    145deg,
    rgba(154, 34, 38, 0.04) 0%,
    rgba(248, 250, 252, 0.6) 100%
  );
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.events-hub--form .upload-area:hover,
.events-hub--form .upload-area.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(154, 34, 38, 0.08);
}

.card-header-icon.primary {
  background: #fde8e8;
  color: #9a2226;
}
.card-header-icon.success {
  background: #d1fae5;
  color: #10b981;
}
.card-header-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}
.card-header-icon.violet {
  background: #ede9fe;
  color: #8b5cf6;
}
.card-header-icon.cyan {
  background: #cffafe;
  color: #06b6d4;
}

.btn-danger {
  color: var(--danger) !important;
}
.btn-danger:hover {
  background: #fff1f2 !important;
}

/* ══════════════════════════════════════════════
   EVENTS TABLE CELLS
══════════════════════════════════════════════ */
.event-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.event-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cat-music {
  background: #fde8e8;
  color: #9a2226;
}
.cat-sports {
  background: #d1fae5;
  color: #059669;
}
.cat-tourism {
  background: #cffafe;
  color: #0891b2;
}
.cat-arts {
  background: #ede9fe;
  color: #7c3aed;
}
.cat-education {
  background: #fef3c7;
  color: #d97706;
}

.cat-music-tag {
  background: #fde8e8;
  color: #9a2226;
}
.cat-sports-tag {
  background: #d1fae5;
  color: #059669;
}
.cat-tourism-tag {
  background: #cffafe;
  color: #0891b2;
}
.cat-arts-tag {
  background: #ede9fe;
  color: #7c3aed;
}
.cat-education-tag {
  background: #fef3c7;
  color: #d97706;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.provider-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.provider-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.city-cell,
.date-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  width: max-content;
  color: var(--text-secondary);
}
.city-cell i,
.date-cell i {
  color: var(--text-muted);
  font-size: 11px;
}

.tickets-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}
.tickets-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.tickets-total {
  font-weight: 400;
  color: var(--text-muted);
}
.tickets-pct {
  font-size: 11px;
  color: var(--text-muted);
}

.revenue-val {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
}
.revenue-val i {
  color: #f59e0b;
  font-size: 12px;
}

/* ══════════════════════════════════════════════
   TABLE SCROLL + VIEW TOGGLE
══════════════════════════════════════════════ */
.table-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
}
.table-scroll-wrap::-webkit-scrollbar {
  height: 5px;
}
.table-scroll-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.table-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

.data-table thead th {
  background: #f8fafc;
}

.view-toggle {
  color: var(--text-muted);
}
.view-toggle.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Grid View */
.events-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px 0;
}
.events-grid.visible {
  display: grid;
}

.event-grid-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  background: var(--card-bg);
}
.event-grid-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.event-grid-thumb {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.event-grid-body {
  padding: 14px;
}
.event-grid-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.event-grid-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.event-grid-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.event-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.event-grid-revenue {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.event-thumb-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.event-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.event-cell .event-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.event-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-grid-thumb {
  height: 120px;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   CREATE EVENT FORM
══════════════════════════════════════════════ */
.create-event-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .create-event-grid {
    grid-template-columns: 1fr;
  }
}

.create-event-main,
.create-event-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.required {
  color: var(--danger);
}

.form-input {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 13px;
  font-family: "Cairo", sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 34, 38, 0.08);
}
.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary);
  background: #fde8e8;
  color: var(--primary);
}
.upload-area i {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}
.upload-area p {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.upload-area span {
  font-size: 11px;
}
.image-preview {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 200px;
}

.form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.form-toggle-row:last-of-type {
  border-bottom: none;
}
.form-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.form-toggle-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

.create-event-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   BUTTON VARIANTS
══════════════════════════════════════════════ */
.btn-success {
  background: #10b981;
  color: #fff;
  border: none;
}
.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-danger-solid {
  background: var(--danger);
  color: #fff;
  border: none;
}
.btn-danger-solid:hover {
  background: #dc2626;
}

/* ══════════════════════════════════════════════
   REVENUE TREND CHART
══════════════════════════════════════════════ */
.chart-placeholder {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  padding: 10px 0;
}
.trend-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 4px;
}
.trend-bar-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}
.trend-bar-track {
  width: 100%;
  flex: 1;
  background: var(--bg);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.trend-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, #c0392b 100%);
  border-radius: 4px;
  transition: height 0.6s ease;
  min-height: 4px;
}
.trend-bar-month {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   REPORTS PAGE
══════════════════════════════════════════════ */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .reports-grid {
    grid-template-columns: 1fr;
  }
}

.report-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 18px;
  padding: 22px;
  transition: var(--transition);
}
.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.report-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.report-card-icon.primary {
  background: #fde8e8;
  color: #9a2226;
}
.report-card-icon.success {
  background: #d1fae5;
  color: #10b981;
}
.report-card-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}
.report-card-icon.danger {
  background: #ffe4e6;
  color: #f43f5e;
}

.report-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.report-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.report-card-dates {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.report-card-dates .filter-input {
  flex: 1;
  min-width: 130px;
}
.report-card-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════
   DASHBOARD FILTERS
══════════════════════════════════════════════ */
.dashboard-filters {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.dash-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.dash-filter-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Inter", "Cairo", sans-serif;
  white-space: nowrap;
}
.dash-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fde8e8;
}
.dash-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dash-tab i {
  font-size: 11px;
}

.dash-date-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-date-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-preset {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Inter", "Cairo", sans-serif;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dash-preset:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fde8e8;
}
.dash-preset.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.dash-custom-dates {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-custom-dates.visible {
  display: flex;
}
.dash-date-sep {
  color: var(--text-muted);
  font-size: 13px;
}
.dash-custom-dates .filter-input {
  width: 140px;
}

/* ══════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════ */
.login-page-body {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-wrapper {
  display: flex;
  width: 900px;
  max-width: 96vw;
  min-height: 520px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.login-panel {
  flex: 1;
  background: linear-gradient(145deg, #9a2226 0%, #c94b4f 55%, #7a1a1d 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-panel::before {
  content: "";
  position: absolute;
  top: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.login-panel::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: -40px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.panel-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}
.panel-brand-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.panel-brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.panel-body {
  position: relative;
  z-index: 1;
}
.panel-body h2 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}
.panel-body p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.panel-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.panel-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.panel-feature i {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.login-form-wrap {
  width: 400px;
  background: var(--card-bg);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form-wrap h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.login-form-wrap .login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-form-wrap .form-group {
  margin-bottom: 18px;
  flex-direction: column;
  gap: 0;
}
.login-form-wrap .form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.input-wrap {
  position: relative;
}
.input-wrap i.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.login-form-wrap .form-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: "Inter", "Cairo", sans-serif;
  color: var(--text-primary);
  background: var(--card-bg);
  outline: none;
  transition: var(--transition);
}
.login-form-wrap .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(154, 34, 38, 0.08);
}
.login-form-wrap .form-input::placeholder {
  color: var(--text-muted);
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  transition: var(--transition);
}
.toggle-pass:hover {
  color: var(--primary);
}

.login-form-wrap .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  grid-template-columns: unset;
  gap: 0;
}
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.checkbox-wrap input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.forgot-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}
.forgot-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: "Inter", "Cairo", sans-serif;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(154, 34, 38, 0.35);
}
.btn-login:active {
  transform: scale(0.98);
}

.login-error {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.login-error.show {
  display: flex;
}

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .login-panel {
    display: none;
  }
  .login-form-wrap {
    width: 100%;
    padding: 36px 28px;
  }
  .login-wrapper {
    border-radius: 16px;
  }
}

/* ══════════════════════════════════════════════
   LOGIN PAGE — SUPPLEMENTAL CLASSES
   (aliases + field errors + language switcher)
══════════════════════════════════════════════ */

/* Alias for login body (used by JS-driven class swaps) */
.login-body {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Compact single-card layout (alternative to split panel) */
.login-card {
  background: var(--card-bg);
  width: 420px;
  max-width: 95%;
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* Brand block inside .login-card */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  text-align: center;
}
.login-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}
.login-brand-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}
.login-brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Inline field error text */
.field-error {
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.field-error.show {
  display: block;
}

/* Password field wrapper (relative, for toggle button overlay) */
.password-wrapper {
  position: relative;
}

/* Toggle password button — RTL-aware */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  transition: var(--transition);
  line-height: 1;
}
.toggle-password:hover {
  color: var(--primary);
}
[dir="rtl"] .toggle-password {
  right: auto;
  left: 12px;
}

/* Language switcher row at bottom of card */
.login-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Individual language buttons */
.lang-switch-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Cairo", "Inter", sans-serif;
}
.lang-switch-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.lang-switch-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Disabled state for login button */
.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   ANALYTICS — CHARTS & TABS
══════════════════════════════════════════════ */
.analytics-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
}
.analytics-tab {
  padding: 7px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: "Inter", "Cairo", sans-serif;
}
.analytics-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding: 10px 0 0;
}
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  flex: 1;
  min-width: 40px;
  max-width: 70px;
}
.bar-track {
  width: 100%;
  flex: 1;
  background: var(--bg);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: 0;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, #c94b4f 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-val {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
.bar-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   KPI ROW & CARD
══════════════════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.kpi-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.kpi-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.kpi-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  width: fit-content;
}
.kpi-trend.up {
  background: #d1fae5;
  color: #059669;
}
.kpi-trend.down {
  background: #ffe4e6;
  color: #e11d48;
}

/* kpi-card color accents — top border per card position */
.kpi-row .kpi-card:nth-child(1)::before {
  background: var(--primary);
}
.kpi-row .kpi-card:nth-child(2)::before {
  background: #10b981;
}
.kpi-row .kpi-card:nth-child(3)::before {
  background: #f59e0b;
}
.kpi-row .kpi-card:nth-child(4)::before {
  background: #8b5cf6;
}

/* ══════════════════════════════════════════════
   BEHAVIOR PAGE
══════════════════════════════════════════════ */
.behavior-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .behavior-grid {
    grid-template-columns: 1fr;
  }
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-pct {
  margin-left: auto;
  font-weight: 700;
  color: var(--text-primary);
}
.donut-svg {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.funnel-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.funnel-step:last-child {
  border-bottom: none;
}
.funnel-bar-wrap {
  flex: 1;
}
.funnel-bar {
  height: 7px;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.funnel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 150px;
}
.funnel-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 60px;
  text-align: right;
}
.funnel-pct {
  font-size: 10.5px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* ══════════════════════════════════════════════
   EXPORT PAGE
══════════════════════════════════════════════ */
.export-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .export-grid {
    grid-template-columns: 1fr;
  }
}
.export-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.export-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.export-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.export-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.export-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.export-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.export-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.export-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.export-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.export-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.btn-excel {
  background: #217346;
  color: #fff;
  border: none;
}
.btn-excel:hover {
  background: #1a5c38;
  box-shadow: 0 4px 12px rgba(33, 115, 70, 0.3);
}
.btn-pdf {
  background: #c0392b;
  color: #fff;
  border: none;
}
.btn-pdf:hover {
  background: #a93226;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

/* ══════════════════════════════════════════════
   GLOBAL SIZE REFINEMENTS
══════════════════════════════════════════════ */
body {
  font-size: 12.5px;
}
.page-body {
  padding: 20px;
  min-height: 0;
}
.topbar {
  height: 56px;
  padding: 0 20px;
}
.page-title {
  font-size: 15px;
}
.breadcrumb-nav {
  font-size: 11px;
}
.topbar-btn {
  width: 34px;
  height: 34px;
  font-size: 14px;
}
.topbar-profile-name {
  font-size: 12px;
}
.topbar-profile-role {
  font-size: 10.5px;
}
.lang-btn {
  font-size: 11.5px;
  padding: 4px 10px;
}

.nav-item {
  font-size: 12.5px;
  padding: 8px 9px;
}
.nav-item .nav-icon {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.nav-label {
  font-size: 9.5px;
  padding: 12px 10px 5px;
}
.dropdown-toggle {
  font-size: 12.5px;
  padding: 8px 9px;
}
.dropdown-toggle .nav-icon {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.dropdown-menu a {
  font-size: 12px;
  padding: 6px 10px 6px 12px;
}
.brand-name {
  font-size: 13.5px;
}
.brand-sub {
  font-size: 10px;
}
.user-name {
  font-size: 12px;
}
.user-role {
  font-size: 10.5px;
}

.card-header {
  padding: 13px 16px;
}
.card-body {
  padding: 16px;
}
.card-title {
  font-size: 13px;
}
.card-subtitle {
  font-size: 11px;
}
.card-header-icon {
  width: 30px;
  height: 30px;
  font-size: 13px;
  border-radius: 7px;
}

.stat-card {
  padding: 16px 14px;
  gap: 8px;
}
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 17px;
}
.stat-number {
  font-size: 16px;
}
.stat-label {
  font-size: 11.5px;
}
.stat-trend {
  font-size: 11px;
  padding: 2px 7px;
}

.stat-mini-card {
  padding: 14px 16px;
  gap: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-mini-icon {
  width: 38px;
  height: 38px;
  font-size: 15px;
  border-radius: 10px;
}
.stat-mini-val {
  font-size: 16px;
  font-weight: 700;
}
.stat-mini-lbl {
  font-size: 11px;
}

.data-table thead th {
  padding: 9px 14px;
  font-size: 10.5px;
}
.data-table tbody td {
  padding: 10px 14px;
  font-size: 12.5px;
}

.badge {
  font-size: 11px;
  padding: 3px 8px;
}
.btn {
  padding: 7px 14px;
  font-size: 12px;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 11.5px;
}
.btn-icon {
  width: 28px;
  height: 28px;
}
.filter-input {
  padding: 7px 12px;
  font-size: 12px;
}
.filters-bar {
  gap: 8px;
  margin-bottom: 16px;
}

.welcome-banner {
  padding: 22px 26px;
  margin-bottom: 18px;
}
.welcome-text h2 {
  font-size: 18px;
}
.welcome-text p {
  font-size: 12px;
}
.welcome-btn {
  padding: 7px 16px;
  font-size: 12px;
}

.quick-stat-item {
  padding: 11px 16px;
}
.quick-stat-icon {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 7px;
}
.quick-stat-label {
  font-size: 12px;
}
.quick-stat-value {
  font-size: 13px;
}

.activity-item {
  padding: 11px 16px;
}
.activity-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
  border-radius: 8px;
}
.activity-text {
  font-size: 12px;
}
.activity-time {
  font-size: 10.5px;
}

.page-btn {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
}
.page-info {
  font-size: 11.5px;
}

.event-name {
  font-size: 12.5px;
}
.event-meta {
  font-size: 11px;
}
.provider-avatar {
  width: 26px;
  height: 26px;
  font-size: 11px;
  border-radius: 7px;
}
.category-tag {
  font-size: 11px;
  padding: 3px 8px;
}
.city-cell {
  font-size: 12px;
}
.revenue-val {
  font-size: 12.5px;
}

.dashboard-filters {
  padding: 13px 16px;
  margin-bottom: 18px;
}
.dash-tab {
  padding: 5px 12px;
  font-size: 12px;
}
.dash-preset {
  padding: 5px 12px;
  font-size: 12px;
}
.dash-filter-label {
  font-size: 10px;
}

.stats-grid {
  gap: 14px;
  margin-bottom: 18px;
}
.stats-mini {
  gap: 12px;
  margin-bottom: 16px;
}
.grid-2 {
  gap: 16px;
  margin-bottom: 18px;
}
.grid-3-1 {
  gap: 16px;
  margin-bottom: 18px;
}

.profile-dropdown-name {
  font-size: 12.5px;
}
.profile-dropdown-role {
  font-size: 10.5px;
}
.profile-dropdown-item {
  font-size: 12px;
  padding: 9px 14px;
}

/* ══════════════════════════════════════════════
   CATEGORIES PAGE
══════════════════════════════════════════════ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

.cat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: var(--transition);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.cat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.cat-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.cat-meta i {
  width: 14px;
  text-align: center;
  color: var(--text-muted);
}
.cat-actions {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* cat-pill — parent category tag in sub-categories table */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ══════════════════════════════════════════════
   CATEGORIES SORT PAGE
══════════════════════════════════════════════ */
.sort-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.sort-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: grab;
  transition: var(--transition);
  user-select: none;
}
.sort-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.sort-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.sort-item.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.sort-handle {
  color: var(--text-muted);
  font-size: 14px;
  cursor: grab;
}
.sort-num {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.sort-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sort-info {
  flex: 1;
}
.sort-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.sort-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.sort-badge {
  margin-left: auto;
}

/* ══════════════════════════════════════════════
   CATEGORIES TIERS PAGE
══════════════════════════════════════════════ */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .tiers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .tiers-grid {
    grid-template-columns: 1fr;
  }
}
.tier-card {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  background: var(--card-bg);
}
.tier-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.tier-card-header {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.tier-badge-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.tier-badge-icon i {
  color: #fff;
}
.tier-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.tier-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}
.tier-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tier-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.tier-feature i {
  width: 16px;
  text-align: center;
}
.tier-feature i.fa-check {
  color: #10b981;
}
.tier-feature i.fa-times {
  color: #ef4444;
}
.tier-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  padding: 10px 0 4px;
}
.tier-price span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.tier-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   SETTINGS PAGES
══════════════════════════════════════════════ */
.settings-section {
  margin-bottom: 24px;
}
.settings-section:last-child {
  margin-bottom: 0;
}

.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.setting-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.5;
}
.setting-control {
  flex-shrink: 0;
}

.policy-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}
.policy-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.policy-card:last-child {
  margin-bottom: 0;
}
.policy-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.policy-body {
  flex: 1;
}
.policy-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.policy-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.permission-table {
  width: 100%;
  border-collapse: collapse;
}
.permission-table th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.permission-table th:first-child {
  text-align: left;
}
.permission-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.permission-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}
.permission-table tbody tr:hover td {
  background: #f8fafc;
}
.permission-table input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
  background: var(--card-bg);
}
.payment-method-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.payment-method-card:last-child {
  margin-bottom: 0;
}
.payment-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.payment-method-info {
  flex: 1;
}
.payment-method-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.payment-method-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.notif-channel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.notif-channel-card:last-child {
  margin-bottom: 0;
}
.notif-channel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.notif-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.notif-channel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

/* ══════════════════════════════════════════════
   ANALYTICS — ICON COLOR HELPERS
══════════════════════════════════════════════ */
.kpi-icon.red {
  background: #fde8e8;
  color: #9a2226;
}
.kpi-icon.green {
  background: #d1fae5;
  color: #10b981;
}
.kpi-icon.amber {
  background: #fef3c7;
  color: #f59e0b;
}
.kpi-icon.purple {
  background: #ede9fe;
  color: #8b5cf6;
}
.kpi-icon.cyan {
  background: #cffafe;
  color: #06b6d4;
}

.export-icon.red {
  background: #fde8e8;
  color: #9a2226;
}
.export-icon.green {
  background: #d1fae5;
  color: #10b981;
}
.export-icon.amber {
  background: #fef3c7;
  color: #f59e0b;
}
.export-icon.purple {
  background: #ede9fe;
  color: #8b5cf6;
}

/* ══════════════════════════════════════════════
   ANALYTICS — EXPORT CARD ACTIONS
══════════════════════════════════════════════ */
.export-card-actions {
  display: flex;
  gap: 8px;
}
.export-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   ANALYTICS — BEHAVIOR LEGEND DOTS
══════════════════════════════════════════════ */
.legend-dot.red {
  background: #9a2226;
}
.legend-dot.green {
  background: #10b981;
}
.legend-dot.amber {
  background: #f59e0b;
}
.legend-dot.purple {
  background: #8b5cf6;
}
.legend-dot.cyan {
  background: #06b6d4;
}

/* ══════════════════════════════════════════════
   ANALYTICS — FUNNEL BAR COLORS
══════════════════════════════════════════════ */
.funnel-bar.red {
  background: #9a2226;
}
.funnel-bar.red2 {
  background: #c94b4f;
}
.funnel-bar.amber {
  background: #f59e0b;
}
.funnel-bar.green {
  background: #10b981;
}
.funnel-bar.green2 {
  background: #059669;
}
.funnel-bar.purple {
  background: #8b5cf6;
}
.funnel-bar.slate {
  background: #94a3b8;
}

/* ══════════════════════════════════════════════
   ANALYTICS — STATS MINI SPACING
══════════════════════════════════════════════ */
.stats-mini.mb {
  margin-bottom: 20px;
}

/* ══════════════════════════════════════════════
   SORT LIST — Categories Sort Page
══════════════════════════════════════════════ */
.sort-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}
.sort-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: var(--transition);
  user-select: none;
}
.sort-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.sort-item.dragging {
  opacity: 0.5;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.sort-item.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.sort-handle {
  color: var(--text-muted);
  font-size: 14px;
  cursor: grab;
  flex-shrink: 0;
}
.sort-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sort-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sort-info {
  flex: 1;
}
.sort-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.sort-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.sort-badge {
  margin-left: auto;
}

/* ——— Admin modal (customer view / edit / reply) ——— */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}
.admin-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.admin-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #fff);
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-lg, 0 24px 48px rgba(0, 0, 0, 0.15));
  border: 1px solid var(--border);
}
.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition, color 0.15s ease, background 0.15s ease);
}
.admin-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg);
}
.admin-modal-body {
  padding: 18px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--text-primary);
}
.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-modal-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: baseline;
}
.admin-modal-dl dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.admin-modal-dl dd {
  margin: 0;
  font-weight: 500;
  word-break: break-word;
}
.admin-modal .form-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.admin-modal .form-stack label {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-modal .form-stack label:first-of-type {
  margin-top: 0;
}
.admin-modal .form-stack .form-input {
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.popup-box {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 350px;
  max-width: 90%;
}

.close-btn {
  float: right;
  cursor: pointer;
  font-size: 20px;
}

.popup-content p {
  margin: 8px 0;
}

.popup-box p {
  margin: 10px 0;
}
