/* ================================================================
   شركة سوفانا - Sofana Company
   Luxury Corporate Design System & Brand Identity
   ================================================================ */

:root {
  /* Brand Emerald Palette (From Sofana Identity) */
  --sofana-green-darkest: #07130c;
  --sofana-green-dark: #0a1b12;
  --sofana-green-deep: #0f281b;
  --sofana-green-card: #133323;
  --sofana-green-card-hover: #18412d;
  --sofana-green-surface: #1c4d35;
  --sofana-green-emerald: #226143;
  --sofana-green-light: #2d825a;
  --sofana-green-vibrant: #38a572;
  
  /* Brand Gold Palette (From Sofana Calligraphy & Diacritics) */
  --sofana-gold-light: #fbf1d3;
  --sofana-gold-champagne: #f3e5ab;
  --sofana-gold-warm: #e6c875;
  --sofana-gold: #d4af37;
  --sofana-gold-deep: #b89343;
  --sofana-gold-bronze: #8c6925;
  --sofana-gold-border: rgba(212, 175, 55, 0.32);
  --sofana-gold-glow: rgba(212, 175, 55, 0.22);
  
  /* Gradients */
  --grad-gold: linear-gradient(135deg, #fdf4d8 0%, #d4af37 50%, #a37b29 100%);
  --grad-gold-hover: linear-gradient(135deg, #ffffff 0%, #f3e5ab 40%, #d4af37 100%);
  --grad-emerald: linear-gradient(135deg, #10291c 0%, #173d2a 50%, #205339 100%);
  --grad-emerald-gold: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(34,97,67,0.2) 100%);
  --grad-wa: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-gold: #e6c875;
  
  /* Glass & Borders */
  --bg-glass: rgba(15, 40, 27, 0.72);
  --bg-glass-card: rgba(19, 51, 35, 0.85);
  --bg-glass-input: rgba(10, 27, 18, 0.9);
  --border-subtle: rgba(212, 175, 55, 0.16);
  --border-accent: rgba(212, 175, 55, 0.36);
  --border-glow: rgba(212, 175, 55, 0.65);
  
  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.55);
  --shadow-gold-glow: 0 0 25px rgba(212, 175, 55, 0.22);
  --shadow-emerald-glow: 0 0 30px rgba(34, 97, 67, 0.3);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============= RESET & BASE ============= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  background-color: var(--sofana-green-dark);
  color: var(--text-primary);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  /* Authentic Arabesque Damask Islamic Texture Overlay */
  background-image:
    radial-gradient(circle at 15% 10%, rgba(212, 175, 55, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(34, 97, 67, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 65%),
    url("sofana-pattern.svg");
  background-repeat: repeat;
  background-size: auto, auto, auto, 120px 120px;
  background-attachment: fixed;
}

/* ============= SCROLLBAR ============= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--sofana-green-darkest);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--sofana-gold), var(--sofana-green-emerald));
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sofana-gold-warm);
}

/* ============= TOP BAR ============= */
.top-bar {
  background: linear-gradient(90deg, #07130c 0%, #0d2317 50%, #07130c 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 7px 24px;
  font-size: 0.8rem;
  color: var(--sofana-gold-champagne);
  position: relative;
  z-index: 102;
}

.top-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gold-star {
  color: var(--sofana-gold);
  font-size: 0.9rem;
  animation: starPulse 2.5s infinite ease-in-out;
}

@keyframes starPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; filter: drop-shadow(0 0 6px var(--sofana-gold)); }
}

.top-badge {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--sofana-gold-border);
  color: var(--sofana-gold-warm);
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.top-company-name {
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.top-portal-tag {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4ade80;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.today-date {
  color: var(--text-muted);
}

/* ============= MAIN LUXURY HEADER ============= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(10, 27, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-accent);
  box-shadow: var(--shadow-md), 0 0 35px rgba(212, 175, 55, 0.08);
}

.header-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(212,175,55,0.06) 0%, transparent 40%, rgba(34,97,67,0.1) 100%);
  pointer-events: none;
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  position: relative;
}

/* Brand & Logo Container */
.header-brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}

.logo-frame {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(135deg, #f5e3a9 0%, #d4af37 50%, #7d5918 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.logo-frame:hover {
  transform: scale(1.04) rotate(0.5deg);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.55);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
  display: block;
  background: #0d261a;
}

.logo-gold-glow {
  position: absolute;
  inset: -4px;
  border-radius: 19px;
  background: radial-gradient(circle, rgba(212,175,55,0.3) 0%, transparent 70%);
  pointer-events: none;
  animation: logoAura 3s infinite alternate ease-in-out;
}

@keyframes logoAura {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-ar-title {
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #fbf3db 45%, var(--sofana-gold-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  letter-spacing: 0.3px;
}

.brand-gold-divider {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, var(--sofana-gold), transparent);
}

.brand-en-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--sofana-gold);
  text-transform: uppercase;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
}

.brand-system-desc {
  font-size: 0.85rem;
  color: var(--sofana-gold-light);
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flag-icon {
  font-size: 1rem;
}

/* Header Statistics Chips */
.header-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-chip:hover {
  background: rgba(26, 64, 43, 0.8);
  border-color: var(--sofana-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-glow);
}

.stat-icon {
  font-size: 1.4rem;
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Cairo', sans-serif;
}

.stat-chip.contacted-chip {
  border-color: rgba(37, 211, 102, 0.35);
  background: rgba(18, 55, 34, 0.7);
}

.stat-chip.contacted-chip .stat-num {
  background: linear-gradient(135deg, #4ade80, #25D366);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-chip.pending-chip {
  border-color: rgba(212, 175, 55, 0.35);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Header Progress Track Bar */
.header-progress-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--sofana-gold-champagne);
}

.progress-percent {
  font-weight: 800;
  color: var(--sofana-gold-warm);
  font-family: 'Cairo', sans-serif;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sofana-gold) 0%, #25D366 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.5);
}

/* ============= MAIN CONTAINER ============= */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ============= MESSAGE PANEL ============= */
.message-panel {
  background: linear-gradient(135deg, rgba(16, 42, 29, 0.95) 0%, rgba(10, 27, 18, 0.95) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 20px rgba(212, 175, 55, 0.08);
  transition: var(--transition);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12) 0%, rgba(34, 97, 67, 0.15) 100%);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  transition: var(--transition);
}

.panel-header:hover {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18) 0%, rgba(34, 97, 67, 0.22) 100%);
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-badge-icon {
  width: 44px;
  height: 44px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--sofana-gold-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--sofana-gold);
}

.panel-header-title h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--sofana-gold-champagne);
  opacity: 0.85;
}

.panel-header-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.official-stamp {
  background: var(--grad-gold);
  color: var(--sofana-green-darkest);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.panel-toggle {
  color: var(--sofana-gold);
  font-size: 0.95rem;
  transition: transform 0.3s ease;
}

.panel-body {
  padding: 22px 24px;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.panel-body.collapsed {
  display: none;
}

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

.editor-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--sofana-gold-light);
}

.template-variables {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.var-btn {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--sofana-gold-warm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.var-btn:hover {
  background: var(--sofana-gold);
  color: var(--sofana-green-darkest);
  border-color: var(--sofana-gold);
  transform: translateY(-1px);
}

#whatsapp-template {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.98rem;
  line-height: 1.7;
  padding: 16px;
  resize: vertical;
  min-height: 160px;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

#whatsapp-template:focus {
  border-color: var(--sofana-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25), inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.template-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-save-template {
  background: var(--grad-gold);
  color: var(--sofana-green-darkest);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-save-template:hover {
  background: var(--grad-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.btn-save-template.saved {
  background: #25D366;
  color: #fff;
}

.btn-reset-template {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-accent);
  color: var(--sofana-gold-champagne);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset-template:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--sofana-gold);
  color: #fff;
}

.template-note {
  font-size: 0.8rem;
  color: var(--sofana-gold-light);
  opacity: 0.8;
  margin-right: auto;
}

/* ============= CONTROLS BAR ============= */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Search Box */
.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  right: 14px;
  color: var(--sofana-gold);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 42px 12px 40px;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

.search-box input:focus {
  border-color: var(--sofana-gold);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

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

.clear-search {
  position: absolute;
  left: 12px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--sofana-gold);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  background: rgba(11, 30, 20, 0.8);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.filter-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--sofana-gold-champagne);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tab:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #fff;
}

.filter-tab.active {
  background: var(--grad-gold);
  color: var(--sofana-green-darkest);
  border-color: var(--sofana-gold);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}

/* City Filter Dropdown */
.city-filter select {
  background: var(--bg-glass-input);
  border: 1.5px solid var(--border-accent);
  color: var(--sofana-gold-light);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.city-filter select:focus {
  border-color: var(--sofana-gold);
}

.city-filter select option {
  background: var(--sofana-green-dark);
  color: #fff;
}

/* View & Print Controls */
.view-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn, .print-btn {
  background: var(--bg-glass-input);
  border: 1.5px solid var(--border-accent);
  color: var(--sofana-gold-champagne);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover, .print-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--sofana-gold);
  color: #fff;
}

.view-btn.active {
  background: var(--sofana-gold);
  color: var(--sofana-green-darkest);
  border-color: var(--sofana-gold);
}

.print-btn {
  font-size: 0.85rem;
  padding: 10px 16px;
}

/* ============= RESULTS INFO BAR ============= */
.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 6px 4px;
  font-size: 0.9rem;
}

.results-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sofana-gold-champagne);
  font-weight: 600;
}

.gold-dot {
  color: var(--sofana-gold);
  font-size: 0.75rem;
}

.reset-all-btn {
  background: transparent;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  color: var(--sofana-gold-warm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.reset-all-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}

/* ============= CARDS GRID ============= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

/* Company Card */
.company-card {
  background: linear-gradient(135deg, rgba(19, 51, 35, 0.9) 0%, rgba(13, 35, 24, 0.92) 100%);
  border: 1px solid var(--border-accent);
  border-top: 2.5px solid var(--sofana-gold);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(10px);
}

.company-card:hover {
  transform: translateY(-4px);
  border-color: var(--sofana-gold);
  box-shadow: var(--shadow-md), 0 0 25px rgba(212, 175, 55, 0.18);
  background: linear-gradient(135deg, rgba(24, 65, 45, 0.95) 0%, rgba(16, 43, 29, 0.95) 100%);
}

/* Card Topbar */
.card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(8, 22, 15, 0.5);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  gap: 8px;
}

.card-id-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--sofana-gold);
  font-weight: 800;
  font-family: 'Cairo', monospace;
}

.gold-sparkle {
  font-size: 0.75rem;
}

.card-city-badge {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--sofana-gold-border);
  color: var(--sofana-gold-champagne);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.pending-badge {
  color: var(--text-muted);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.contacted-badge {
  display: none;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.72rem;
}

/* When Contacted */
.company-card.contacted {
  border-color: rgba(37, 211, 102, 0.45);
  border-top: 2.5px solid #25D366;
  background: linear-gradient(135deg, rgba(16, 48, 30, 0.92) 0%, rgba(10, 32, 20, 0.95) 100%);
}

.company-card.contacted .pending-badge {
  display: none;
}

.company-card.contacted .contacted-badge {
  display: inline-block;
}

.company-card.just-contacted {
  animation: glowContacted 1.2s ease;
}

@keyframes glowContacted {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.8); }
  50% { transform: scale(1.02); box-shadow: 0 0 35px 10px rgba(37, 211, 102, 0.5); }
  100% { transform: scale(1); }
}

/* Card Body */
.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}

.card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.info-icon {
  font-size: 0.95rem;
  width: 18px;
  flex-shrink: 0;
  text-align: center;
}

.info-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-badge {
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  font-weight: 700;
  display: inline-block;
}

.phone-badge.valid {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.phone-badge.invalid {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.phone-badge.no-phone {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.phone-number-str {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Card Actions Wrap */
.card-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.card-actions, .card-actions-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}

.action-btn:hover {
  transform: translateY(-1.5px);
}

/* Action Button Colors */
.btn-whatsapp {
  background: var(--grad-wa);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5);
  filter: brightness(1.1);
}

.btn-email {
  background: rgba(15, 60, 40, 0.75);
  border: 1px solid var(--border-accent);
  color: var(--sofana-gold-champagne);
}

.btn-email:hover {
  background: rgba(26, 85, 57, 0.9);
  border-color: var(--sofana-gold);
  color: #fff;
}

.btn-google {
  background: rgba(8, 22, 15, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.btn-google:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--sofana-gold);
  color: #fff;
}

.btn-save-contact {
  background: var(--grad-gold);
  color: var(--sofana-green-darkest);
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.25);
}

.btn-save-contact:hover {
  background: var(--grad-gold-hover);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.45);
}

/* ============= LIST VIEW ============= */
.cards-grid.list-view {
  grid-template-columns: 1fr;
}

.cards-grid.list-view .company-card {
  flex-direction: row;
  align-items: center;
}

.cards-grid.list-view .card-topbar {
  display: none;
}

.cards-grid.list-view .card-body {
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.cards-grid.list-view .card-left {
  flex: 1;
}

.cards-grid.list-view .card-actions-wrap {
  flex-direction: row;
  min-width: 380px;
}

/* ============= NO RESULTS ============= */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-glass);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius-lg);
  margin-top: 30px;
}

.no-results-logo-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--sofana-gold);
  box-shadow: var(--shadow-gold-glow);
}

.no-results-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-results h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--sofana-gold-champagne);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.btn-clear-filters {
  background: var(--grad-gold);
  color: var(--sofana-green-darkest);
  border: none;
  font-family: inherit;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

/* ============= MODALS ============= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: linear-gradient(135deg, rgba(16, 42, 29, 0.98) 0%, rgba(9, 24, 16, 0.98) 100%);
  border: 1.5px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 45px rgba(212, 175, 55, 0.25);
  animation: modalScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(34, 97, 67, 0.2) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--sofana-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  object-fit: cover;
}

.modal-title h3 {
  font-size: 1.15rem;
  color: #fff;
}

.modal-sub {
  font-size: 0.74rem;
  color: var(--sofana-gold-champagne);
  display: block;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--sofana-gold);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Modal Company Card */
.modal-company-card {
  background: rgba(7, 20, 13, 0.65);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.modal-company-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  margin-bottom: 6px;
}

.modal-gold-seal {
  color: var(--sofana-gold);
  font-weight: 700;
}

.modal-company-num {
  color: var(--text-muted);
}

.modal-company-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.modal-company-meta {
  font-size: 0.84rem;
  color: var(--sofana-gold-champagne);
  display: flex;
  gap: 12px;
}

/* Message Preview Box */
.modal-message-preview label, .modal-phone label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sofana-gold-light);
  margin-bottom: 6px;
  display: block;
}

.message-preview-box {
  background: rgba(5, 15, 10, 0.85);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  border-right: 3px solid var(--sofana-gold);
}

/* Phone Display */
.phone-box-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 15, 10, 0.85);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.phone-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Cairo', monospace;
}

.phone-type-tag {
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.phone-type-tag.valid {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.phone-type-tag.invalid {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(6, 18, 12, 0.7);
  border-top: 1px solid var(--border-subtle);
}

.btn-send-whatsapp {
  background: var(--grad-wa);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 11px 26px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

.btn-send-whatsapp:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--sofana-gold-champagne);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* ============= VCARD PREVIEW ============= */
.vcard-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vcard-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
}

.vcard-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--sofana-gold);
  flex-shrink: 0;
  box-shadow: var(--shadow-gold-glow);
}

.vcard-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vcard-sofana-badge {
  font-size: 0.72rem;
  color: var(--sofana-gold);
  font-weight: 700;
}

.vcard-title {
  font-size: 1.15rem;
  color: #fff;
  margin-top: 2px;
}

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

.vcard-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vcard-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.vcard-label {
  color: var(--sofana-gold-champagne);
}

.vcard-val {
  color: #fff;
  font-weight: 600;
}

.text-gold {
  color: var(--sofana-gold) !important;
  font-weight: 700;
}

.btn-download-contact {
  background: var(--grad-gold);
  color: var(--sofana-green-darkest);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 11px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.btn-download-contact:hover {
  background: var(--grad-gold-hover);
  transform: translateY(-2px);
}

/* ============= LUXURY FOOTER ============= */
.main-footer {
  background: linear-gradient(180deg, #091710 0%, #050d09 100%);
  border-top: 1.5px solid var(--border-accent);
  padding: 40px 24px 25px;
  margin-top: 60px;
  position: relative;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo-frame {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1.5px solid var(--sofana-gold);
  overflow: hidden;
  box-shadow: var(--shadow-gold-glow);
  flex-shrink: 0;
}

.footer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-brand-text h3 {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  color: var(--sofana-gold-warm);
  margin-bottom: 4px;
}

.footer-brand-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 480px;
}

.footer-badges-side {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--sofana-gold-champagne);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin-bottom: 20px;
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.copyright-text strong {
  color: var(--sofana-gold-warm);
}

.footer-tagline {
  color: var(--sofana-gold);
  font-size: 0.78rem;
}

/* ============= TOAST NOTIFICATION ============= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(16, 42, 29, 0.98), rgba(9, 24, 16, 0.98));
  border: 1px solid var(--border-glow);
  border-right: 4px solid var(--sofana-gold);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(212, 175, 55, 0.25);
  font-size: 0.92rem;
  font-weight: 700;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.toast.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-right-color: #25D366;
}

.toast.warning {
  border-right-color: #f59e0b;
}

.toast.error {
  border-right-color: #ef4444;
}

/* ============= PRINT STYLES ============= */
@media print {
  .top-bar, .header-progress-wrap, .message-panel, .controls-bar, .view-controls, .reset-all-btn, .action-btn, .modal-overlay, .toast {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .header {
    position: static;
    background: transparent !important;
    border: none;
    box-shadow: none;
  }
  .company-card {
    break-inside: avoid;
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .card-name {
    color: #000 !important;
  }
}

/* ============= SCROLL TO TOP FLOATING BUTTON ============= */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 55, 38, 0.95), rgba(10, 28, 19, 0.98));
  border: 1.5px solid var(--sofana-gold);
  color: var(--sofana-gold);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 95;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-btn:hover {
  background: var(--sofana-gold);
  color: var(--sofana-green-darkest);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
  transform: translateY(-3px) scale(1.05);
}

.scroll-top-btn:active {
  transform: scale(0.95);
}

/* ============= RESPONSIVE & MOBILE DESIGN ============= */

/* Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .header-content {
    gap: 16px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
  }
}

/* Medium Tablets & Large Phones (max-width: 860px) */
@media (max-width: 860px) {
  .top-bar-center {
    display: none;
  }
  .top-bar-inner {
    justify-content: space-between;
  }
  .header {
    padding: 0 16px;
  }
  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 0;
  }
  .header-brand-block {
    justify-content: flex-start;
  }
  .header-stats {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .stat-chip {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    gap: 8px;
  }
  .stat-icon {
    font-size: 1.15rem;
  }
  .stat-num {
    font-size: 1.25rem;
  }
  .stat-label {
    font-size: 0.65rem;
  }
  .main-container {
    padding: 16px 14px 60px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Smartphones & Mobile Devices (max-width: 600px) */
@media (max-width: 600px) {
  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  /* Universal touch target minimums & font size */
  input, select, textarea, button {
    font-size: 16px !important; /* Prevents auto zoom in iOS */
    -webkit-tap-highlight-color: transparent;
  }

  /* Top Bar Mobile */
  .top-bar {
    padding: 6px 12px;
  }
  .top-bar-inner {
    font-size: 0.72rem;
    gap: 8px;
  }
  .top-bar-actions .today-date {
    display: none;
  }
  .top-badge {
    padding: 1px 7px;
    font-size: 0.65rem;
  }
  .top-company-name {
    font-size: 0.75rem;
  }

  /* Sticky Header Mobile */
  .header {
    padding: 0 12px;
    border-bottom-width: 1px;
  }
  .header-content {
    padding: 8px 0 10px;
    gap: 10px;
  }
  .logo-frame {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    padding: 2.5px;
  }
  .brand-logo-img {
    border-radius: 9px;
  }
  .brand-info {
    gap: 2px;
  }
  .brand-title-line {
    gap: 8px;
  }
  .brand-ar-title {
    font-size: 1.35rem;
  }
  .brand-gold-divider {
    height: 16px;
  }
  .brand-en-title {
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
  .brand-system-desc {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  /* Header Stats Mobile */
  .header-stats {
    gap: 6px;
  }
  .stat-chip {
    padding: 6px 8px;
    border-radius: 10px;
    gap: 6px;
  }
  .stat-icon {
    font-size: 1rem;
  }
  .stat-num {
    font-size: 1.15rem;
  }
  .stat-label {
    font-size: 0.6rem;
  }

  /* Progress Bar Mobile */
  .header-progress-wrap {
    padding-bottom: 6px;
    gap: 3px;
  }
  .progress-info-row {
    font-size: 0.72rem;
  }
  .progress-bar-bg {
    height: 5px;
  }

  /* Main Container Mobile */
  .main-container {
    padding: 12px 10px 80px;
  }

  /* Message Panel Mobile */
  .message-panel {
    border-radius: var(--radius-md);
    margin-bottom: 14px;
  }
  .panel-header {
    padding: 12px 14px;
    gap: 10px;
  }
  .panel-badge-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .panel-header-title h2 {
    font-size: 0.96rem;
  }
  .panel-subtitle {
    font-size: 0.7rem;
  }
  .official-stamp {
    display: none;
  }
  .panel-body {
    padding: 14px;
  }
  .editor-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .editor-label {
    font-size: 0.85rem;
  }
  .template-variables {
    width: 100%;
  }
  .var-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.78rem;
    min-height: 38px;
  }
  #whatsapp-template {
    padding: 12px;
    min-height: 140px;
    line-height: 1.55;
    font-size: 0.92rem;
  }
  .template-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .btn-save-template, .btn-reset-template {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    min-height: 44px;
  }
  .template-note {
    font-size: 0.72rem;
    margin-top: 4px;
  }

  /* Controls Bar Mobile */
  .controls-bar {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
  }
  .search-box {
    width: 100%;
    min-width: 0;
  }
  .search-box input {
    padding: 12px 40px 12px 36px;
    border-radius: 10px;
    height: 46px;
  }

  /* Smooth horizontal filter tabs on touch */
  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px;
    border-radius: 10px;
  }
  .filter-tabs::-webkit-scrollbar {
    display: none;
  }
  .filter-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
    scroll-snap-align: start;
    flex-shrink: 0;
    min-height: 38px;
  }

  /* City Filter Mobile */
  .city-filter {
    width: 100%;
  }
  .city-filter select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    height: 46px;
  }

  /* View Controls Mobile */
  .view-controls {
    width: 100%;
    justify-content: space-between;
  }
  .view-btn {
    flex: 1;
    padding: 10px;
    min-height: 42px;
  }
  .print-btn {
    flex: 1.2;
    padding: 10px 12px;
    min-height: 42px;
  }

  /* Results Info Mobile */
  .results-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.82rem;
  }
  .results-right {
    width: 100%;
  }
  .reset-all-btn {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
  }

  /* Cards Grid Mobile */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .company-card {
    border-radius: 14px;
  }
  .card-topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .card-body {
    padding: 14px;
    gap: 12px;
  }
  .card-name {
    font-size: 1.05rem;
    margin-bottom: 8px;
    line-height: 1.35;
  }
  .card-info {
    gap: 6px;
  }
  .card-info-row {
    font-size: 0.82rem;
  }
  .phone-val, .phone-number-str {
    font-size: 0.88rem;
  }
  .card-actions, .card-actions-row2 {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .action-btn {
    min-height: 44px; /* Apple minimum touch target standard */
    font-size: 0.86rem;
    padding: 10px 8px;
    border-radius: 10px;
  }

  /* Mobile Bottom-Sheet Modals */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUpMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  @keyframes modalSlideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modal-header {
    padding: 14px 18px;
    flex-shrink: 0;
  }
  .modal-brand-icon {
    width: 36px;
    height: 36px;
  }
  .modal-title h3 {
    font-size: 1.05rem;
  }
  .modal-body {
    padding: 16px;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: rgba(6, 18, 12, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.5);
  }
  .btn-send-whatsapp, .btn-download-contact {
    width: 100%;
    min-height: 46px;
    font-size: 0.95rem;
    border-radius: 10px;
  }
  .btn-cancel {
    width: 100%;
    min-height: 40px;
    text-align: center;
    border-radius: 10px;
  }

  /* Floating Scroll-To-Top Button on Mobile */
  .scroll-top-btn {
    bottom: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  /* Toast on Mobile */
  .toast {
    bottom: 18px;
    left: 14px;
    right: 14px;
    width: auto;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  /* Footer Mobile */
  .main-footer {
    padding: 30px 16px 20px;
    margin-top: 40px;
  }
  .footer-top-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .footer-brand-side {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 10px;
  }
  .footer-badges-side {
    justify-content: center;
    gap: 8px;
  }
  .footer-badge {
    font-size: 0.74rem;
    padding: 6px 12px;
  }
  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* Extra Small Phones (max-width: 380px) */
@media (max-width: 380px) {
  .brand-ar-title {
    font-size: 1.22rem;
  }
  .brand-en-title {
    font-size: 0.72rem;
  }
  .card-actions, .card-actions-row2 {
    grid-template-columns: 1fr;
  }
  .action-btn {
    min-height: 42px;
  }
}

/* ================================================================
   NEW COMPANIES — BOLD PREMIUM HIGHLIGHT STYLES
   ================================================================ */

/* ── New company card: deep purple-to-indigo with vivid orange accent ── */
.company-card.new-company-card {
  position: relative;
  border: 2px solid transparent !important;
  background:
    linear-gradient(145deg, #1a0a2e 0%, #12062a 40%, #0e1a3a 100%) !important;
  background-clip: padding-box !important;
  box-shadow:
    0 0 0 2px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.25),
    0 8px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 200, 80, 0.12) !important;
  animation: newCardShimmer 4s ease-in-out infinite;
  overflow: hidden;
}

/* Animated rainbow top-stripe */
.company-card.new-company-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    #ff6b00, #ff9500, #ffd700, #ff4ecb, #a855f7, #3b82f6, #06b6d4, #ff6b00);
  background-size: 300% 100%;
  animation: rainbowSlide 3s linear infinite;
  border-radius: 20px 20px 0 0;
  z-index: 2;
}

/* Sparkle overlay */
.company-card.new-company-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(255, 150, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.company-card.new-company-card > * {
  position: relative;
  z-index: 1;
}

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

@keyframes newCardShimmer {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(255,140,0,0.55),
      0 0 25px rgba(255,100,0,0.2),
      0 8px 40px rgba(0,0,0,0.6),
      inset 0 1px 0 rgba(255,200,80,0.1);
  }
  33% {
    box-shadow:
      0 0 0 2px rgba(168,85,247,0.65),
      0 0 30px rgba(168,85,247,0.25),
      0 8px 40px rgba(0,0,0,0.6),
      inset 0 1px 0 rgba(200,100,255,0.12);
  }
  66% {
    box-shadow:
      0 0 0 2px rgba(6,182,212,0.6),
      0 0 28px rgba(6,182,212,0.22),
      0 8px 40px rgba(0,0,0,0.6),
      inset 0 1px 0 rgba(80,200,255,0.1);
  }
}

.company-card.new-company-card:hover {
  transform: translateY(-5px) scale(1.015) !important;
  box-shadow:
    0 0 0 2.5px rgba(255, 180, 0, 0.9),
    0 0 45px rgba(255, 130, 0, 0.35),
    0 20px 55px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 220, 100, 0.2) !important;
}

/* ── NEW badge: vivid gradient pill with glow ── */
.new-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ff8c00 0%, #ff4500 40%, #c026d3 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1.5px rgba(255, 150, 0, 0.6),
    0 4px 14px rgba(255, 100, 0, 0.5);
  animation: badgePop 2s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes badgePop {
  0%, 100% {
    box-shadow: 0 0 0 1.5px rgba(255,150,0,0.6), 0 4px 14px rgba(255,100,0,0.45);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255,150,0,0.4), 0 6px 22px rgba(255,80,0,0.6);
    transform: scale(1.06);
  }
}

/* ── Card name: vivid orange-gold for new companies ── */
.new-company-card .card-name {
  background: linear-gradient(90deg, #ffd700, #ff8c00, #ff4ecb) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 800 !important;
}

/* ── City badge: purple accent for new companies ── */
.new-company-card .card-city-badge {
  background: linear-gradient(135deg, rgba(168,85,247,0.3) 0%, rgba(99,102,241,0.3) 100%) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  color: #d8b4fe !important;
}

/* ── Card ID badge: orange accent ── */
.new-company-card .card-id-badge {
  background: linear-gradient(135deg, rgba(255,120,0,0.25) 0%, rgba(255,60,0,0.15) 100%) !important;
  border-color: rgba(255, 140, 0, 0.5) !important;
}
.new-company-card .card-number {
  color: #ffb347 !important;
}
.new-company-card .gold-sparkle {
  color: #ff8c00 !important;
}

/* ── Info rows: brighter text ── */
.new-company-card .info-text {
  color: #e2d9f3 !important;
}

/* ── NEW stat chip in header ── */
.stat-chip.new-chip {
  background: linear-gradient(135deg,
    rgba(255, 120, 0, 0.18) 0%,
    rgba(168, 85, 247, 0.18) 100%);
  border: 1.5px solid rgba(255, 140, 0, 0.5);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-chip.new-chip::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,180,0,0.15), transparent);
  animation: chipSheen 3s ease-in-out infinite;
}
@keyframes chipSheen {
  0%   { left: -100%; }
  100% { left: 200%; }
}
.stat-chip.new-chip:hover {
  border-color: rgba(255, 160, 0, 0.8);
  background: linear-gradient(135deg,
    rgba(255, 120, 0, 0.28) 0%,
    rgba(168, 85, 247, 0.28) 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 100, 0, 0.3);
}
.stat-chip.new-chip .stat-num {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}
.stat-chip.new-chip .stat-label {
  color: rgba(255, 180, 100, 0.9);
}
.stat-chip.new-chip .stat-icon {
  animation: iconBounce 2s ease-in-out infinite;
}
@keyframes iconBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(-8deg); }
}

/* ── Filter tab for new companies ── */
.filter-tab.new-filter-tab {
  border-color: rgba(255, 140, 0, 0.45);
  color: #ffb347;
  background: linear-gradient(135deg,
    rgba(255, 100, 0, 0.08) 0%,
    rgba(168, 85, 247, 0.08) 100%);
}
.filter-tab.new-filter-tab:hover,
.filter-tab.new-filter-tab.active {
  background: linear-gradient(135deg,
    rgba(255, 100, 0, 0.25) 0%,
    rgba(168, 85, 247, 0.25) 100%) !important;
  border-color: rgba(255, 160, 0, 0.8) !important;
  color: #ffd700 !important;
  box-shadow: 0 4px 18px rgba(255, 100, 0, 0.35), 0 0 0 1px rgba(255,180,0,0.3) !important;
}


