/* =========================================================
   NewFennec - Complete Vanilla CSS Design System
   Modern Dark Glassmorphism, Algerian Dinar (DZD) Marketplace
   ========================================================= */

:root {
  --bg-dark: #07090e;
  --bg-surface: #0d111a;
  --bg-card: #121826;
  --bg-input: #0a0e17;
  --border-color: #1e293b;
  --border-highlight: #334155;
  
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --cyan-400: #38bdf8;
  --cyan-500: #06b6d4;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --glow-amber: 0 0 35px -5px rgba(245, 158, 11, 0.25);
  --glow-emerald: 0 0 35px -5px rgba(16, 185, 129, 0.25);
  --glow-cyan: 0 0 35px -5px rgba(6, 182, 212, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  --font-sans: 'Cairo', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-latin: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--amber-500);
  color: #000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--amber-500);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 900px;
}

.container-sm {
  max-width: 750px;
}

.grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Typography & Colors */
.font-mono { font-family: var(--font-mono); }
.font-latin { font-family: var(--font-latin); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

.text-amber { color: var(--amber-400); }
.text-emerald { color: var(--emerald-400); }
.text-cyan { color: var(--cyan-400); }
.text-rose { color: var(--rose-400); }
.text-muted { color: var(--text-muted); }
.text-white { color: #ffffff; }

.gradient-text {
  background: linear-gradient(135deg, var(--amber-400), #fef08a, var(--amber-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.badge-gold, .badge-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--amber-400);
}

.badge-green, .badge-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-400);
}

.badge-rose {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(225, 29, 72, 0.08));
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--rose-400);
}

.badge-cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(14, 116, 144, 0.08));
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--cyan-400);
}

.badge-dark {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.25s ease;
  line-height: 1.2;
}

.btn-primary {
  background: var(--amber-500);
  color: var(--text-dark);
  box-shadow: var(--glow-amber);
}
.btn-primary:hover {
  background: var(--amber-400);
  transform: translateY(-2px);
}

.btn-emerald {
  background: var(--emerald-500);
  color: var(--text-dark);
  box-shadow: var(--glow-emerald);
}
.btn-emerald:hover {
  background: var(--emerald-400);
  transform: translateY(-2px);
}

.btn-cyan {
  background: var(--cyan-500);
  color: var(--text-dark);
  box-shadow: var(--glow-cyan);
}
.btn-cyan:hover {
  background: var(--cyan-400);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  border-color: var(--amber-500);
  color: var(--amber-400);
  transform: translateY(-2px);
}

.btn-outline-cyan {
  background: var(--bg-surface);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--cyan-400);
}
.btn-outline-cyan:hover {
  border-color: var(--cyan-400);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
}

/* Header & Nav */
.header-glass {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

.header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-500), #fef08a);
  padding: 1.5px;
  box-shadow: var(--glow-amber), 0 0 16px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-link:hover .brand-icon {
  transform: translateY(-1px) scale(1.03);
  box-shadow: var(--glow-amber), 0 0 22px rgba(245, 158, 11, 0.6);
}

.brand-icon-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  border-radius: calc(var(--radius-md) - 1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-400);
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 1.5px);
  display: block;
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.06);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--amber-400);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Notifications Button & Dropdown */
.notif-wrapper {
  position: relative;
  display: inline-flex;
}

.notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem;
  min-width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notif-btn:hover {
  border-color: var(--amber-500);
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.08);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b0f19;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  animation: pulseBadge 2s infinite ease-in-out;
}

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

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: rgba(13, 17, 26, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(20px);
  padding: 0;
  display: none;
  flex-direction: column;
  z-index: 1050;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  text-align: right;
  direction: rtl;
}

.notif-dropdown.active {
  display: flex;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
}

.notif-header-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
}

.notif-clear-btn {
  background: transparent;
  border: none;
  color: var(--amber-400);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.notif-clear-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.notif-list {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

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

.notif-item:hover {
  background: rgba(245, 158, 11, 0.06);
}

.notif-item.unread {
  background: rgba(245, 158, 11, 0.03);
}

.notif-item.unread::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-400);
  box-shadow: 0 0 6px var(--amber-400);
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.notif-item-icon.bg-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.notif-item-icon.bg-emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.notif-item-icon.bg-cyan {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.notif-item-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.notif-item-time {
  font-size: 0.65rem;
  color: var(--amber-400);
  font-weight: 600;
}

.cart-btn {
  position: relative;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cart-btn:hover {
  border-color: var(--amber-500);
  color: var(--amber-400);
}

.cart-counter {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--amber-500);
  color: #000;
  font-weight: 900;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Nav */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-nav-menu {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  flex-direction: column;
  gap: 0.85rem;
}
.mobile-nav-menu.active {
  display: flex;
}

/* Admin Top Bar & Header Button & Brand Badges (Hidden permanently to preserve clean layout) */
.admin-top-bar,
#nav-admin-btn,
.brand-link .badge,
.brand-link .badge-gold {
  display: none !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 3.5rem 0 5.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: 25%;
  right: 50%;
  transform: translate(50%, -50%);
  width: 380px;
  height: 380px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  filter: blur(120px);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  top: 30%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 999px;
  filter: blur(100px);
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--emerald-400);
  box-shadow: 0 0 10px var(--emerald-400);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero Metrics - Ultra-Premium Glassmorphic Grid */
.hero-metrics {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  text-align: right;
  direction: rtl;
}

.metric-card {
  position: relative;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-highlight, #f59e0b), transparent);
  transition: height 0.3s ease;
}

.metric-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(circle at top right, var(--glow-color, rgba(245, 158, 11, 0.1)), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 30px var(--glow-color, rgba(245, 158, 11, 0.15));
}

.metric-card:hover::before {
  height: 3px;
}

.metric-card:hover::after {
  opacity: 1;
}

/* Card Theme Variants */
.metric-card-amber {
  --border-highlight: #f59e0b;
  --glow-color: rgba(245, 158, 11, 0.2);
}
.metric-card-gold {
  --border-highlight: #fbbf24;
  --glow-color: rgba(251, 191, 36, 0.2);
}
.metric-card-emerald {
  --border-highlight: #10b981;
  --glow-color: rgba(16, 185, 129, 0.2);
}
.metric-card-cyan {
  --border-highlight: #06b6d4;
  --glow-color: rgba(6, 182, 212, 0.2);
}

.metric-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.metric-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.metric-card:hover .metric-icon-box {
  transform: scale(1.1) rotate(3deg);
}

.bg-amber-soft {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.bg-emerald-soft {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.bg-cyan-soft {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.metric-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: -0.2px;
}

.metric-card-val {
  font-size: 1.45rem;
  font-weight: 900;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: #ffffff;
  margin-bottom: 0.4rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.text-amber-soft {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-emerald-soft {
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan-soft {
  background: linear-gradient(135deg, #38bdf8, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-card-sub {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .metric-card {
    padding: 1.1rem 1rem;
  }
}


/* Sections General */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-color);
  scroll-margin-top: 88px;
}
section[id], div[id] {
  scroll-margin-top: 88px;
}
.section-alt {
  background: rgba(13, 17, 26, 0.4);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.25rem;
  padding-top: 0.75rem;
}
.section-header .badge {
  margin-bottom: 0.75rem;
  display: inline-flex;
}
.section-title {
  font-size: 2.15rem;
  font-weight: 900;
  color: #fff;
  margin: 0.5rem 0;
  line-height: 1.3;
}
.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Sandbox Terminal Window */
.sandbox-frame {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.sandbox-bar {
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.sandbox-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-dark);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.sandbox-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.sandbox-tab.active {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-400);
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  direction: ltr;
  text-align: left;
}

.terminal-screen {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-height: 160px;
  max-height: 220px;
  overflow-y: auto;
  color: #cbd5e1;
  line-height: 1.6;
}

.terminal-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  outline: none;
}
.terminal-input:focus {
  border-color: var(--cyan-400);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.75rem;
}

/* ====================================================================
   Brushed Titanium / Silver Metallic Product Card (Exact Reference)
   ==================================================================== */
.product-card {
  background: radial-gradient(circle at 50% 25%, #ffffff 0%, #edf2f7 35%, #cbd5e1 70%, #94a3b8 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.55), 
              inset 0 2px 4px rgba(255, 255, 255, 0.95), 
              inset 0 -2px 5px rgba(71, 85, 105, 0.3);
  color: #0f172a;
  text-align: center;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}

.product-card:hover {
  border-color: #ffffff;
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -10px rgba(0, 0, 0, 0.65), 
              inset 0 2px 6px rgba(255, 255, 255, 1), 
              0 0 25px rgba(255, 255, 255, 0.35);
}

.product-card-body {
  padding: 1.5rem 1.4rem 0.85rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.product-card .badge-gold,
.badge-product-category {
  background: rgba(148, 163, 184, 0.45) !important;
  border: 1.5px solid rgba(100, 116, 139, 0.45) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  padding: 5px 14px !important;
  font-size: 0.76rem !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.product-card .badge-cyan,
.badge-product-license {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1.5px solid rgba(203, 213, 225, 0.9) !important;
  color: #334155 !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  padding: 5px 14px !important;
  font-size: 0.74rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.product-title {
  font-size: 1.22rem;
  font-weight: 900;
  color: #0f172a;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1.4;
  margin: 0.35rem 0 0.5rem;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.product-title:hover {
  color: #0e7490;
}

.product-desc {
  font-size: 0.86rem;
  color: #1e293b;
  margin-top: 0.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.55;
  text-align: center;
  font-weight: 500;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.5rem 0 0.85rem;
}

.tech-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  font-family: var(--font-mono);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.feature-list {
  list-style: none;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  padding-top: 0.85rem;
  margin: 0.5rem 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: #0f172a;
  font-weight: 700;
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
}

.product-card-footer {
  padding: 1rem 1.4rem 1.4rem;
  position: relative;
  z-index: 2;
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.price-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.25rem;
}

.price-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
}

.price-original {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 700;
  font-family: var(--font-mono);
  text-decoration: line-through;
}

.price-discounted {
  font-size: 1.85rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #0f172a;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.price-discounted .price-val {
  color: #0f172a;
  font-weight: 900;
}

.price-discounted .price-currency {
  font-size: 1rem;
  color: #334155;
  font-weight: 800;
}

.price-discounted.is-discounted,
.price-discounted.is-discounted .price-val {
  color: #047857 !important;
}

.product-coupon-hint {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.25rem;
  text-align: center;
}

.product-buttons-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.btn-metallic-teal,
.product-card .btn-primary,
.product-card .btn-emerald {
  background: linear-gradient(180deg, #155e75 0%, #0e7490 50%, #083344 100%) !important;
  border: 1px solid #083344 !important;
  color: #fef08a !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(8, 51, 68, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.btn-metallic-teal:hover,
.product-card .btn-primary:hover,
.product-card .btn-emerald:hover {
  background: linear-gradient(180deg, #0e7490 0%, #0891b2 50%, #083344 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(8, 51, 68, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}

.btn-product-buy,
.product-card .btn-primary {
  flex: 1;
  height: 48px;
  font-size: 1rem;
  gap: 0.45rem;
}

.btn-product-cart,
.product-card .btn-secondary.btn-sm {
  background: linear-gradient(180deg, #155e75 0%, #0e7490 50%, #083344 100%) !important;
  border: 1px solid #083344 !important;
  color: #fef08a !important;
  border-radius: 14px !important;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(8, 51, 68, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
}

.card-coupon-tester {
  margin-top: 0.65rem;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  width: 100%;
}

.card-coupon-input-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.card-coupon-input {
  flex: 1;
  font-size: 0.85rem !important;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0 0.85rem !important;
  height: 44px;
  border-radius: 14px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  text-align: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card-coupon-input:focus {
  border-color: #0e7490 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.2) !important;
}

.card-coupon-apply-btn {
  height: 44px;
  padding: 0 1.15rem !important;
  font-size: 0.88rem !important;
  gap: 0.35rem;
  border-radius: 14px !important;
  white-space: nowrap;
}

.card-coupon-remove-btn {
  height: 44px;
  width: 44px;
  border-radius: 14px !important;
  padding: 0 !important;
  color: #cbd5e1 !important;
  background: linear-gradient(180deg, #155e75 0%, #0e7490 50%, #083344 100%) !important;
  border: 1px solid #083344 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-coupon-msg {
  font-size: 0.76rem;
  margin-top: 0.4rem;
  line-height: 1.3;
  text-align: center;
  font-weight: 700;
}

.price-amount {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #0f172a;
}

/* Affiliate 3-step Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.step-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s ease;
}
.step-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-3px);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--amber-400);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.45rem;
}
.step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Affiliate Portal Box */
.portal-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.portal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.portal-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.portal-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}
.portal-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  display: block;
  margin-top: 0.2rem;
}

/* Calculator Box */
.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--amber-500);
}

.range-slider {
  width: 100%;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  accent-color: var(--amber-500);
}

.calc-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}
.calc-result-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

/* Developer Docs & Code Block */
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .dev-grid { grid-template-columns: 1fr; }
}

.endpoint-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  direction: ltr;
  text-align: left;
}
.endpoint-card:hover {
  border-color: var(--emerald-400);
}

.code-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  direction: ltr;
  text-align: left;
}
.code-box-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.code-content {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
  overflow-x: auto;
}

/* Footer */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.footer-link {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover {
  color: var(--amber-400);
}

/* Modals & Drawers */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#admin-staff-modal,
#admin-product-modal,
#admin-portfolio-modal,
#admin-ticket-modal,
#admin-add-affiliate-modal,
#admin-edit-affiliate-modal {
  z-index: 2147483648 !important;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  color: #fff;
  background: var(--bg-dark);
}

/* Large Admin Modal */
.admin-modal-card {
  max-width: 1050px;
  max-height: 90vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-nav-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1.5rem 0;
  background: rgba(7, 9, 14, 0.5);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}
.admin-tab-btn {
  background: transparent;
  border: none;
  border-top: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.admin-tab-btn.active {
  background: var(--bg-surface);
  color: var(--amber-400);
  border-top-color: var(--amber-500);
}

.admin-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 868px) {
  .admin-notif-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Data Table */
.data-table-wrapper {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--bg-dark);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.data-table th {
  background: #05070a;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
}
.data-table tr:hover {
  background: rgba(13, 17, 26, 0.8);
}

/* Cart Drawer */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer-panel {
  width: 100%;
  max-width: 420px;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer-backdrop.active .cart-drawer-panel {
  transform: translateX(0);
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transform: translateY(1rem);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background: rgba(13, 17, 26, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald-400);
}
.toast-error {
  background: rgba(13, 17, 26, 0.95);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--rose-400);
}
.toast-info {
  background: rgba(13, 17, 26, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--amber-400);
}

/* ==================== CLIENT AUTH & PORTAL STYLES ==================== */
.user-menu-wrapper {
  position: relative;
}

.client-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-user-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--amber-400);
  box-shadow: var(--glow-amber);
}

.client-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  background: rgba(13, 17, 26, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), var(--glow-amber);
  backdrop-filter: blur(16px);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.user-dropdown-menu.active {
  display: flex;
}

.user-dropdown-header {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.25rem;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: right;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-dropdown-item:hover {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
}

.user-dropdown-item.danger:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-400);
}

/* Auth Tabs */
.auth-tabs,
.client-auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #000;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* License Cards in Customer Portal */
.license-card {
  background: rgba(18, 24, 38, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.license-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.license-key-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed var(--amber-500);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--amber-400);
  font-size: 0.85rem;
}

/* Catalog Filter Bar & Search */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.catalog-search-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.catalog-search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s ease;
}

.catalog-search-input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.catalog-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* =========================================================
   11. NATIVE MOBILE APP (iOS & ANDROID) OPTIMIZATION
   ========================================================= */

/* Mobile Touch & Performance Optimization */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Category Filter Chips / Pills Base Styling */
.catalog-category-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.category-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.8) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.category-pill-btn:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
}

.category-pill-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: #fbbf24 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45), 0 0 12px rgba(245, 158, 11, 0.3) !important;
  transform: translateY(-1px);
}

.category-pill-btn.active i {
  color: #000000 !important;
}

.category-pill-btn i {
  color: var(--amber-400);
  transition: color 0.2s ease;
}

/* Native Mobile Bottom Navigation Bar (iOS & Android) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.75rem calc(env(safe-area-inset-bottom, 15px) + 0.5rem);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  justify-content: space-around;
  align-items: center;
}

.bottom-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-width: 58px;
}

.bottom-tab-item i {
  width: 20px;
  height: 20px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
}

.bottom-tab-item:active {
  transform: scale(0.92);
}

.bottom-tab-item.active,
.bottom-tab-item:hover {
  color: var(--amber-400);
}

.bottom-tab-item.active i {
  transform: translateY(-2px);
  color: var(--amber-400);
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
}

.bottom-tab-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--amber-500);
  color: #000;
  font-size: 0.62rem;
  font-weight: 900;
  border-radius: 999px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a0f1d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   12. RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================= */

@media (max-width: 992px) {
  .nav-links { display: none; }
  .mobile-nav-toggle { display: block; }
  .hero-title { font-size: 2.1rem; }
  .calc-results-grid { grid-template-columns: 1fr; }
  .dev-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Hide top cart button & desktop nav on mobile */
  .cart-btn {
    display: none !important;
  }
  .nav-links {
    display: none !important;
  }
  .mobile-nav-toggle {
    display: none !important;
  }

  /* Activate Mobile Bottom Bar */
  .mobile-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 64px !important;
    background: rgba(10, 15, 29, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(245, 158, 11, 0.3) !important;
    z-index: 9999 !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 0.25rem calc(env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.75) !important;
  }

  body {
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 75px) !important;
  }

  /* Header adjustments on mobile */
  .header-glass {
    border-bottom: 1px solid rgba(30, 41, 59, 0.8) !important;
  }
  .header-inner {
    height: 64px !important;
    padding: 0 0.75rem !important;
    gap: 0.5rem !important;
  }
  .brand-link {
    gap: 0.5rem !important;
  }
  .brand-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: var(--radius-sm) !important;
  }
  .brand-title {
    font-size: 1.12rem !important;
    font-weight: 800 !important;
  }
  .brand-tagline {
    display: none !important;
  }
  .brand-link .badge,
  .brand-link .badge-gold {
    display: none !important;
  }
  #nav-affiliate-btn {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    background: var(--amber-500) !important;
    color: #000 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3) !important;
  }
  .user-aff-pill {
    padding: 0.25rem 0.5rem !important;
    gap: 0.45rem !important;
  }
  .user-aff-avatar {
    width: 28px !important;
    height: 28px !important;
  }
  .user-aff-name {
    display: none !important;
  }
  .user-aff-badge {
    font-size: 0.7rem !important;
  }
  .notif-btn {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
  }
  .notif-dropdown {
    left: -40px !important;
    width: 295px !important;
  }

  /* Hero Section on Mobile */
  .hero-section {
    padding: 2.25rem 0 3rem !important;
    text-align: center !important;
  }
  .hero-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    padding: 0.35rem 0.85rem !important;
    font-size: 0.72rem !important;
    border-radius: 999px !important;
    background: rgba(13, 17, 26, 0.85) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    max-width: 100% !important;
    margin: 0 auto 1.25rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  }
  .hero-title {
    font-size: clamp(1.45rem, 6vw, 1.85rem) !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
    color: #ffffff !important;
    margin-bottom: 0.85rem !important;
    text-align: center !important;
  }
  .hero-title .gradient-text,
  .hero-title span {
    display: block !important;
    color: var(--amber-400) !important;
    font-size: clamp(1.3rem, 5.5vw, 1.65rem) !important;
    margin-top: 0.35rem !important;
  }
  .hero-subtitle {
    font-size: clamp(0.82rem, 3.4vw, 0.92rem) !important;
    line-height: 1.7 !important;
    color: var(--text-muted) !important;
    max-width: 460px !important;
    margin: 0 auto 1.75rem !important;
    text-align: center !important;
    padding: 0 0.5rem !important;
  }
  .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 440px !important;
    gap: 0.75rem !important;
    margin: 0 auto 2rem !important;
  }
  .hero-buttons .btn {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  .hero-buttons .btn-primary {
    background: var(--amber-500) !important;
    color: #000 !important;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35) !important;
  }
  .hero-buttons .btn-outline-cyan {
    background: rgba(13, 17, 26, 0.9) !important;
    border: 1.5px solid rgba(6, 182, 212, 0.5) !important;
    color: var(--cyan-400) !important;
  }

  .hero-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-top: 1.75rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid rgba(30, 41, 59, 0.6) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .metric-card {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9) 0%, rgba(10, 14, 23, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-lg) !important;
    padding: 0.9rem 0.65rem !important;
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
    position: relative !important;
  }
  .metric-card-top {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    margin-bottom: 0.45rem !important;
  }
  .metric-icon-box {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }
  .metric-card-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }
  .metric-card-val {
    font-size: clamp(0.95rem, 3.6vw, 1.15rem) !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin: 0.2rem 0 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }
  .metric-card-sub {
    font-size: 0.67rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* Category Filter Chips Wrapped & Fully Visible on Mobile */
  .catalog-category-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    padding: 0.25rem 0 !important;
    overflow-x: visible !important;
    width: 100% !important;
  }
  .category-pill-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 0.45rem 0.8rem !important;
    font-size: 0.75rem !important;
    border-radius: 999px !important;
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .category-pill-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: #fbbf24 !important;
    color: #000000 !important;
    font-weight: 900 !important;
    box-shadow: 0 3px 15px rgba(245, 158, 11, 0.4) !important;
  }

  /* Products Grid Single-Column Full Width */
  .products-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Card Mobile Polish */
  .product-card {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
  }
  .product-title {
    font-size: 1.12rem !important;
  }
  .product-desc {
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
  }
  .price-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }
  .price-row > div:first-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px dashed var(--border-color) !important;
    padding-bottom: 0.5rem !important;
  }
  .price-row > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }
  .price-row > div:last-child button {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 0.5rem !important;
    font-size: 0.85rem !important;
    min-height: 44px !important;
  }

  /* Native Mobile Bottom-Sheet Modals (iOS & Android Style) */
  .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-card {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1.75rem 1.25rem calc(env(safe-area-inset-bottom, 20px) + 1.25rem) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8) !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .modal-backdrop.active .modal-card {
    transform: translateY(0) !important;
  }

  /* Bottom sheet pull-down handle indicator */
  .modal-card::before {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 42px !important;
    height: 5px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border-radius: 999px !important;
  }

  /* Mobile Inputs Anti-Zoom (16px minimum prevents iOS viewport zooming) */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
    min-height: 46px !important;
    border-radius: var(--radius-md) !important;
  }

  /* Buttons Touch Feedback */
  .btn {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .btn:active {
    transform: scale(0.97) !important;
  }

  /* Stats Grid on Mobile */
  .portal-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }
  .portal-stat-card {
    padding: 0.85rem !important;
  }
  .portal-stat-val {
    font-size: 1.15rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.45rem !important;
  }
  .portal-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .price-amount {
    font-size: 1.35rem !important;
  }
}

/* ==================== APP DOWNLOAD & PWA INSTALL STYLES ==================== */
.app-install-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}
.app-install-footer-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--amber-400);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  color: #ffffff;
}

.app-fox-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ffffff !important;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  padding: 2px;
  border: 1.5px solid #f59e0b;
}
.app-fox-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* App Download Modal Card */
.app-modal-card {
  max-width: 520px;
  background: linear-gradient(180deg, #111827 0%, #0b0f19 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.15);
  border-radius: 1.25rem;
  padding: 1.75rem;
}

.app-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
}
.app-modal-logo {
  width: 72px;
  height: 72px;
  background: #ffffff !important;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35), 0 0 0 3px rgba(245, 158, 11, 0.5);
  margin-bottom: 0.85rem;
}
.app-modal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-install-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.app-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.app-option-card:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}
/* App Install Footer Pill Button (Matching Design) */
.app-install-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #070a13;
  border: 1.5px solid #d97706;
  border-radius: 9999px;
  padding: 0.35rem 1.15rem 0.35rem 0.45rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.15);
}

/* Hide App Install Elements when user is inside the installed APK app */
html.is-in-app .app-install-footer-btn,
body.is-in-app .app-install-footer-btn,
html.is-in-app #app-download-modal,
body.is-in-app #app-download-modal,
html.is-in-app .app-download-trigger,
body.is-in-app .app-download-trigger {
  display: none !important;
}

.app-fox-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}

.app-fox-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   Portfolio Section (أعمالنا ومشاريعنا)
   ========================================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

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

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

.portfolio-card {
  position: relative;
  background: linear-gradient(180deg, #0d1527 0%, #080d19 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.1);
}

.portfolio-preview {
  position: relative;
  height: 165px;
  background: radial-gradient(circle at center, rgba(30, 48, 80, 0.4) 0%, rgba(10, 16, 30, 0.8) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portfolio-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
  display: block;
}

.portfolio-card:hover .portfolio-preview-img {
  transform: scale(1.06);
}

.portfolio-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 21, 39, 0.1) 0%, rgba(8, 13, 25, 0.6) 100%);
  pointer-events: none;
}

.portfolio-preview-mesh {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

.portfolio-preview-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(13, 21, 39, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-400);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-preview-icon {
  transform: scale(1.08);
}

.portfolio-status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.portfolio-status-badge .badge {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.portfolio-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #080d19;
}

.portfolio-category {
  color: #8fa0bc;
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.portfolio-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.portfolio-desc {
  font-size: 0.83rem;
  color: #8a9bb5;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.portfolio-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.portfolio-tech {
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  direction: ltr;
}

.portfolio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #f59e0b;
}

.portfolio-empty-card {
  border: 2px dashed rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.02);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  transition: all 0.3s ease;
}

.portfolio-empty-card:hover {
  border-color: var(--amber-400);
  background: rgba(245, 158, 11, 0.06);
  transform: translateY(-4px);
}

.portfolio-add-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber-400);
  margin-bottom: 1rem;
}

/* =========================================================
   Contact & Support Desk Section (اتصل بنا والدعم الفني)
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.75rem;
  margin-top: 2.5rem;
  align-items: start;
}

.support-desk-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

.support-desk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1.25rem;
}

.support-table-container {
  overflow-x: auto;
}

.support-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.65rem;
  text-align: right;
}

.support-table tr {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.support-table tr:hover {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.25);
}

.support-table td {
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  vertical-align: middle;
}

.support-table td:first-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.support-table td:last-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.support-channel-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.support-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25d366;
}

.channel-phone {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--amber-400);
}

.channel-baridi {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--cyan-400);
}

.channel-email {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.contact-form-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

/* =========================================================
   Affiliate Navigation User Badge & Dedicated Page Styling
   ========================================================= */

.user-aff-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
  padding: 0.35rem 0.65rem 0.35rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.user-aff-pill:hover {
  border-color: var(--amber-400);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.user-aff-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  flex-shrink: 0;
}

.user-aff-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-aff-name {
  font-size: 0.82rem;
  color: #fff;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-aff-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-400);
}

.user-aff-logout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin-right: 0.2rem;
}

.user-aff-logout:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--rose-500);
  color: var(--rose-400);
}

/* Dedicated Affiliate Dashboard Page */
.aff-page-header {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

.aff-page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.aff-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.aff-kpi-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.8) 0%, rgba(13, 17, 26, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aff-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6);
}

.aff-kpi-card.amber { border-color: rgba(245, 158, 11, 0.3); }
.aff-kpi-card.emerald { border-color: rgba(16, 185, 129, 0.3); }
.aff-kpi-card.cyan { border-color: rgba(6, 182, 212, 0.3); }
.aff-kpi-card.rose { border-color: rgba(244, 63, 94, 0.3); }

.aff-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.aff-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aff-kpi-val {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.aff-kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Tier Progress Bar */
.aff-tier-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.7) 0%, rgba(10, 14, 23, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.tier-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.75rem 0;
  position: relative;
}

.tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981, #06b6d4);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* Link Builder Hub */
.aff-link-hub {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.aff-copy-input-wrap {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem;
  align-items: center;
}

.aff-copy-input-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex: 1;
  padding: 0.35rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .aff-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .aff-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  .aff-kpi-card {
    padding: 0.85rem 0.65rem !important;
  }
  .aff-kpi-val {
    font-size: 1.15rem !important;
  }
  .aff-kpi-icon {
    width: 32px !important;
    height: 32px !important;
  }
  .aff-kpi-icon i {
    width: 16px !important;
    height: 16px !important;
  }
  .aff-kpi-top span {
    font-size: 0.7rem !important;
  }
  .aff-kpi-sub {
    font-size: 0.62rem !important;
  }
  .aff-page-header {
    padding: 1.25rem 0.85rem !important;
    text-align: center !important;
  }
  .aff-page-header > div {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  .aff-page-header > div > div {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.5rem !important;
  }
  .user-aff-name {
    display: inline-block !important;
  }

  /* Bottom Affiliate Link Hub & Marketing Actions */
  .aff-link-hub {
    padding: 1.15rem 0.85rem !important;
    border-radius: var(--radius-lg) !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
  }
  .aff-link-hub > div:first-child {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.5rem !important;
  }
  .aff-link-hub h3 {
    font-size: 1.05rem !important;
    text-align: center !important;
    margin-bottom: 0.25rem !important;
  }
  .aff-link-hub p {
    font-size: 0.75rem !important;
    text-align: center !important;
    line-height: 1.4 !important;
  }
  .aff-copy-input-wrap {
    padding: 0.25rem 0.4rem !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }
  .aff-copy-input-wrap input {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.4rem !important;
    min-width: 0 !important;
  }
  .aff-copy-input-wrap .btn {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
    flex-shrink: 0 !important;
    min-height: 36px !important;
  }
  
  /* Tables & Desks on Mobile */
  #page-affiliate .contact-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    margin-bottom: 1.5rem !important;
  }
  #page-affiliate .contact-layout > div {
    width: 100% !important;
    padding: 1.15rem 0.85rem !important;
    box-sizing: border-box !important;
  }
  #withdrawal-hub {
    padding: 1.15rem 0.85rem !important;
  }
  #withdrawal-hub h3 {
    font-size: 0.95rem !important;
  }
  
  .data-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    margin-top: 0.5rem !important;
  }
  .data-table {
    width: 100% !important;
    font-size: 0.72rem !important;
  }
  .data-table th, .data-table td {
    padding: 0.5rem 0.4rem !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  
  /* Footer centering on mobile */
  .footer {
    padding: 2.5rem 1rem calc(env(safe-area-inset-bottom, 20px) + 5.5rem) !important;
    text-align: center !important;
  }
  .footer-inner {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 1.25rem !important;
  }
  .footer .brand-link {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0.5rem !important;
  }
  .footer-links {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0.75rem !important;
  }
  .app-install-footer-btn {
    margin: 0 auto !important;
    width: fit-content !important;
    max-width: 100% !important;
    justify-content: center !important;
  }
}

/* ====================================================================
   Affiliate Secure Authentication, Password & Email OTP System
   ==================================================================== */
.input-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-pwd-wrap .form-input {
  padding-left: 2.75rem;
}

.pwd-toggle-btn {
  position: absolute;
  left: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.pwd-toggle-btn:hover {
  color: var(--amber-400);
}

.pwd-strength-container {
  margin-top: 0.4rem;
}

.pwd-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.pwd-strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.pwd-strength-fill.weak {
  width: 33%;
  background-color: #ef4444;
}

.pwd-strength-fill.medium {
  width: 66%;
  background-color: #f59e0b;
}

.pwd-strength-fill.strong {
  width: 100%;
  background-color: #10b981;
}

.pwd-strength-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: flex;
  justify-content: space-between;
}

.auth-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  color: var(--emerald-400);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.auth-forgot-link {
  font-size: 0.75rem;
  color: var(--cyan-400);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-forgot-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Email Verification & OTP Box */
.email-otp-box {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease-out;
}

.otp-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-400);
  margin-bottom: 1rem;
}

.otp-input-field {
  width: 100%;
  max-width: 260px;
  margin: 1rem auto;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.5rem;
  text-align: center;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--cyan-400);
  border-radius: var(--radius-md);
  color: #fff;
  outline: none;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.otp-input-field:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.otp-timer-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.otp-resend-btn {
  background: transparent;
  border: none;
  color: var(--amber-400);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.otp-resend-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

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

/* ====================================================================
   Card Coupon Tester & Dynamic Discount Price Styling
   ==================================================================== */
.card-coupon-tester {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  width: 100%;
}

.card-coupon-input-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.card-coupon-input {
  flex: 1;
  padding: 0.45rem 0.65rem !important;
  font-size: 0.78rem !important;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: all 0.2s ease;
}

.card-coupon-input:focus {
  border-color: var(--emerald-400) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25) !important;
}

.card-coupon-apply-btn {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.card-coupon-remove-btn {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.card-coupon-remove-btn:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #fff;
}

.card-coupon-msg {
  font-size: 0.72rem;
  margin-top: 0.35rem;
  line-height: 1.4;
  animation: fadeIn 0.2s ease-out;
}

.product-current-price {
  color: #ffffff;
  transition: color 0.3s ease;
}

.product-current-price.is-discounted {
  color: var(--emerald-400) !important;
}

.price-discount-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-400);
  font-size: 0.68rem;
  font-weight: 800;
  margin-right: 0.35rem;
}

/* ====================================================================
   AI Chat Assistant Widget & Smart Auto-Support Engine (24/7)
   ==================================================================== */
.ai-chat-launcher {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: 1px solid rgba(251, 191, 36, 0.6);
  border-radius: 50px;
  padding: 0.6rem 1.1rem;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4), 0 0 20px rgba(245, 158, 11, 0.25);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.88rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.ai-chat-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(245, 158, 11, 0.55), 0 0 30px rgba(245, 158, 11, 0.4);
}

.ai-chat-launcher-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000;
  color: var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.ai-chat-launcher-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background: var(--emerald-400);
  border: 2px solid #000;
  border-radius: 50%;
  animation: pulseGlow 1.8s infinite;
}

.ai-chat-widget {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 110px);
  background: rgba(13, 17, 26, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(245, 158, 11, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.ai-chat-widget.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(16, 185, 129, 0.1));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), #000);
  border: 1px solid var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  flex-shrink: 0;
}

.ai-chat-avatar-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #0d111a;
  border-radius: 50%;
}

.ai-chat-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-chat-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ai-chat-header-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ai-chat-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ai-chat-msg {
  display: flex;
  gap: 0.6rem;
  max-width: 90%;
  animation: fadeIn 0.25s ease-out;
}

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

.ai-chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.ai-msg-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #f8fafc;
  word-break: break-word;
}

.ai-chat-msg.bot .ai-msg-bubble {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-right-radius: 4px;
}

.ai-chat-msg.user .ai-msg-bubble {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
  color: #000;
  font-weight: 600;
  border-top-left-radius: 4px;
}

.ai-msg-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  text-align: left;
}

.ai-chat-msg.user .ai-msg-time {
  text-align: right;
  color: rgba(0, 0, 0, 0.6);
}

.ai-action-card {
  margin-top: 0.6rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ai-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--amber-400);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.ai-action-btn:hover {
  background: var(--amber-500);
  color: #000;
}

.ai-chips-wrapper {
  padding: 0.5rem 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: rgba(10, 14, 23, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 50px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.ai-chip-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--amber-400);
  transform: translateY(-1px);
}

.ai-chat-footer {
  padding: 0.75rem 0.9rem;
  background: rgba(10, 14, 23, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-chat-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.ai-chat-input:focus {
  border-color: var(--amber-400);
  background: rgba(30, 41, 59, 0.9);
}

.ai-chat-send-btn {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #000;
  border: none;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-chat-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.ai-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.6rem;
}

.ai-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--amber-400);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

@media (max-width: 640px) {
  .ai-chat-launcher {
    bottom: 16px;
    left: 16px;
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
  }
  .ai-chat-widget {
    bottom: 75px;
    left: 12px;
    right: 12px;
    width: auto;
    height: calc(100vh - 95px);
  }
}

/* ====================================================================
   CUSTOM APP & SOFTWARE BUILDER (باني ومحدد مواصفات البرمجيات)
   ==================================================================== */
.custom-builder-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 992px) {
  .custom-builder-grid {
    grid-template-columns: 1fr;
  }
}

.builder-step-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s ease;
}

.builder-step-card:hover {
  border-color: rgba(245, 158, 11, 0.25);
}

.builder-step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.builder-step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #000;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

.builder-step-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.2rem 0;
}

.builder-step-sub {
  font-size: 0.8rem;
  color: var(--slate-400);
  margin: 0;
}

.project-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.project-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-type-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.project-type-card.active,
.project-type-card:has(input:checked) {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--amber-400);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.project-type-card input[type="radio"] {
  position: absolute;
  top: 12px;
  left: 12px;
  accent-color: var(--amber-400);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.type-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.type-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.type-card-desc {
  font-size: 0.75rem;
  color: var(--slate-400);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.type-card-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--amber-400);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 0.5rem;
}

.builder-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.feature-toggle-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feature-toggle-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(16, 185, 129, 0.4);
}

.feature-toggle-card:has(input:checked) {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--emerald-400);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.12);
}

.feature-toggle-card input[type="checkbox"] {
  accent-color: var(--emerald-400);
  width: 18px;
  height: 18px;
  margin-top: 3px;
  cursor: pointer;
  flex-shrink: 0;
}

.feature-box-content {
  flex: 1;
}

.feature-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.feature-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.feature-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
}

.feature-desc {
  font-size: 0.72rem;
  color: var(--slate-400);
  line-height: 1.4;
  margin: 0;
}

.timeline-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .timeline-options-grid {
    grid-template-columns: 1fr;
  }
}

.timeline-option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-option-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.timeline-option-card:has(input:checked) {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--cyan-400);
}

.timeline-option-card input[type="radio"] {
  accent-color: var(--cyan-400);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-info {
  flex: 1;
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.timeline-desc {
  font-size: 0.72rem;
  color: var(--slate-400);
}

.timeline-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* Sticky Live Quote Panel */
.builder-summary-panel {
  position: sticky;
  top: 90px;
}

.quote-summary-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.08);
  backdrop-filter: blur(16px);
}

.quote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.quote-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.quote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.quote-item-label {
  color: var(--slate-400);
}

.quote-item-val {
  font-weight: 700;
}

.quote-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.9rem 0;
}

.quote-addons-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 4px;
}

.quote-addon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border-right: 2px solid var(--emerald-400);
}

.quote-total-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  margin: 1.25rem 0 1rem 0;
}

.quote-total-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-300);
  margin-bottom: 0.25rem;
}

.quote-total-price {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--amber-400);
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.quote-total-sub {
  font-size: 0.7rem;
  color: var(--slate-400);
  margin-top: 0.25rem;
}

.quote-inclusions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.quote-inclusions .inc-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--slate-300);
}

.quote-inclusions .inc-item i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-amber-glow {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #000 !important;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  border: none;
  transition: all 0.25s ease;
}

.btn-amber-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.builder-success-box {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(10, 14, 23, 0.95) 100%);
  border: 1.5px solid var(--emerald-400);
  border-radius: var(--radius-lg, 16px);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.4s ease;
}

.builder-success-box .success-icon-box {
  margin-bottom: 1rem;
}

.builder-success-box .success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.builder-success-box .success-desc {
  font-size: 0.95rem;
  color: var(--slate-300);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

.builder-success-box .success-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#admin-port-upload-zone,
#admin-portfolio-upload-zone {
  transition: all 0.25s ease;
}
#admin-port-upload-zone:hover,
#admin-portfolio-upload-zone:hover {
  border-color: var(--gold-400) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}



