/* ============================================================
   Mashhor.cc - Main Stylesheet
   Design: Dark luxury with purple/violet accent
   Font: Cairo (Arabic) + Tajawal
============================================================ */

:root {
    --primary: #7c3aed;
    --primary-light: #a855f7;
    --primary-dark: #5b21b6;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --dark: #0a0a0f;
    --dark-2: #111118;
    --dark-3: #1a1a26;
    --dark-4: #22223a;
    --card-bg: #16162a;
    --border: rgba(124, 58, 237, 0.2);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --glow: 0 0 30px rgba(124, 58, 237, 0.3);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--dark);
    color: var(--text);
    padding-top: 72px;
    overflow-x: hidden;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ─── Navbar ────────────────────────────────────────────── */
#mainNav {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}
#mainNav.scrolled { background: rgba(10, 10, 15, 0.98); box-shadow: var(--glow); }

.brand-icon { font-size: 1.3rem; }
.brand-name { font-size: 1.4rem; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.brand-dot { color: var(--primary-light); }

.nav-link { color: var(--text-muted) !important; font-weight: 600; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary-light) !important; }

.avatar-sm { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }

.pulse-dot { font-size: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ─── Buttons ───────────────────────────────────────────── */
.btn { font-family: 'Cairo', sans-serif; font-weight: 700; border-radius: var(--radius-sm); transition: all 0.3s; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(124,58,237,0.4); background: linear-gradient(135deg, var(--primary-light), var(--primary)); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary-light); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-success { background: linear-gradient(135deg, #059669, var(--secondary)); border: none; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* ─── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}
.card:hover { border-color: rgba(124,58,237,0.5); transform: translateY(-2px); }
.card-header { background: rgba(124,58,237,0.1); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-title { color: #fff; font-weight: 700; }

/* ─── Forms ─────────────────────────────────────────────── */
.form-control, .form-select {
    background: var(--dark-3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}
.form-control:focus, .form-select:focus {
    background: var(--dark-4);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}
.form-label { color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.form-control::placeholder { color: var(--text-muted); }

/* ─── Flash Alerts ──────────────────────────────────────── */
.flash-alert {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 320px;
    border-radius: var(--radius-sm);
    border: none;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
.alert-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border-left: 3px solid var(--danger); }
.alert-success { background: rgba(16,185,129,0.15); color: #6ee7b7; border-left: 3px solid var(--secondary); }
.alert-info { background: rgba(59,130,246,0.15); color: #93c5fd; border-left: 3px solid #3b82f6; }
.alert-warning { background: rgba(245,158,11,0.15); color: #fcd34d; border-left: 3px solid var(--accent); }

/* ─── HERO ──────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    background: radial-gradient(ellipse at 60% 20%, rgba(124,58,237,0.25) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(16,185,129,0.1) 0%, transparent 50%),
                var(--dark);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237c3aed' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.15;
    color: #fff;
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); font-weight: 400; }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 900; color: var(--primary-light); }
.hero-stat .label { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Floating Cards ────────────────────────────────────── */
.floating-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }

/* ─── Section ───────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-title { font-size: 2.2rem; font-weight: 900; color: #fff; }
.section-subtitle { color: var(--text-muted); font-size: 1.1rem; }
.section-badge {
    display: inline-block;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.3);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ─── Platform Cards ────────────────────────────────────── */
.platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.platform-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--glow); }
.platform-card .icon { font-size: 3rem; margin-bottom: 12px; }
.platform-card .name { font-size: 1.1rem; font-weight: 700; color: #fff; }
.platform-card .count { font-size: 0.85rem; color: var(--text-muted); }

/* Platform Colors */
.platform-instagram .icon { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.platform-tiktok .icon { color: #69c9d0; }
.platform-youtube .icon { color: #ff0000; }
.platform-facebook .icon { color: #1877f2; }
.platform-twitter .icon { color: #1da1f2; }

/* ─── Service Table ─────────────────────────────────────── */
.service-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.service-table th { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; padding: 12px 16px; text-transform: uppercase; }
.service-table td { background: var(--card-bg); padding: 16px; vertical-align: middle; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.service-table td:first-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; }
.service-table td:last-child { border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; }
.service-table tr:hover td { background: var(--dark-4); }

/* ─── Dashboard ─────────────────────────────────────────── */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.15;
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--secondary); }
.stat-card.warning::before { background: var(--accent); }
.stat-card.danger::before { background: var(--danger); }

.stat-card .stat-icon { font-size: 2rem; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 900; color: #fff; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.9rem; }
.stat-card .stat-change { font-size: 0.8rem; margin-top: 4px; }

/* ─── Sidebar ───────────────────────────────────────────── */
.sidebar {
    background: var(--dark-2);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 72px);
    padding: 24px 0;
    position: sticky;
    top: 72px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}
.sidebar-link:hover { color: var(--primary-light); background: rgba(124,58,237,0.08); border-right-color: var(--primary); }
.sidebar-link.active { color: var(--primary-light); background: rgba(124,58,237,0.12); border-right-color: var(--primary); }
.sidebar-link i { width: 20px; text-align: center; }

/* ─── Tables ────────────────────────────────────────────── */
.table-dark-custom { color: var(--text); }
.table-dark-custom thead th { background: rgba(124,58,237,0.15); color: var(--text-muted); border: none; font-size: 0.85rem; font-weight: 700; }
.table-dark-custom tbody td { border-color: var(--border); vertical-align: middle; }
.table-dark-custom tbody tr:hover td { background: rgba(124,58,237,0.05); }

/* ─── Badges ────────────────────────────────────────────── */
.badge { font-family: 'Cairo', sans-serif; font-weight: 600; padding: 5px 10px; border-radius: 6px; }

/* ─── Order Status Colors ───────────────────────────────── */
.status-pending    { color: #fcd34d; }
.status-processing { color: #60a5fa; }
.status-completed  { color: #34d399; }
.status-partial    { color: #fb923c; }
.status-cancelled  { color: #94a3b8; }
.status-error      { color: #f87171; }

/* ─── Progress Bar ──────────────────────────────────────── */
.progress { background: var(--dark-4); border-radius: 50px; height: 8px; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 50px; }

/* ─── Online Indicator ──────────────────────────────────── */
.online-dot { width: 8px; height: 8px; background: var(--secondary); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }
.offline-dot { width: 8px; height: 8px; background: var(--text-muted); border-radius: 50%; display: inline-block; }

/* ─── Live Stats ────────────────────────────────────────── */
.live-counter {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.live-badge { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #34d399; padding: 4px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; }

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(124,58,237,0.15) 0%, var(--dark) 70%);
    padding: 40px 0;
}
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-text { font-size: 2rem; font-weight: 900; color: #fff; }
.auth-logo .slogan { color: var(--primary-light); font-size: 0.95rem; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-google {
    background: var(--dark-3);
    border: 1px solid var(--border);
    color: var(--text);
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    transition: all 0.3s;
}
.btn-google:hover { background: var(--dark-4); border-color: var(--primary); color: #fff; }

/* ─── Payment Cards ─────────────────────────────────────── */
.payment-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.payment-card:hover, .payment-card.selected { border-color: var(--primary); background: rgba(124,58,237,0.1); }
.payment-card .payment-icon { font-size: 2.5rem; margin-bottom: 8px; }
.payment-card .payment-name { font-weight: 700; color: #fff; }

/* ─── Footer ────────────────────────────────────────────── */
.footer {
    background: var(--dark-2);
    border-top: 1px solid var(--border);
    margin-top: 80px;
}
.footer-brand { font-size: 1.5rem; font-weight: 900; color: #fff; margin-bottom: 4px; }
.footer-slogan { color: var(--primary-light); font-size: 0.9rem; margin-bottom: 12px; }
.footer-heading { color: #fff; font-weight: 700; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-light); }
.footer-stat { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a { width: 38px; height: 38px; background: var(--dark-3); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all 0.3s; text-decoration: none; }
.social-links a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.payment-icons { display: flex; gap: 12px; font-size: 1.8rem; color: var(--text-muted); }

/* ─── Utilities ─────────────────────────────────────────── */
.text-primary { color: var(--primary-light) !important; }
.text-gradient { background: linear-gradient(135deg, var(--primary-light), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.bg-dark-card { background: var(--card-bg); }
.border-purple { border-color: var(--border) !important; }
.rounded-xl { border-radius: var(--radius) !important; }

/* Pagination */
.pagination .page-link { background: var(--card-bg); border-color: var(--border); color: var(--text-muted); font-family: 'Cairo', sans-serif; }
.pagination .page-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 16px; }
    .auth-card { padding: 32px 24px; }
    .sidebar { min-height: auto; position: relative; top: 0; }
}

/* ─── Animations ────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ─── Dropdown Dark ─────────────────────────────────────── */
.dropdown-menu {
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.dropdown-item { color: var(--text-muted); font-family: 'Cairo', sans-serif; font-weight: 600; padding: 10px 16px; }
.dropdown-item:hover { background: rgba(124,58,237,0.15); color: var(--primary-light); }
.dropdown-divider { border-color: var(--border); }

/* ─── Ticket ────────────────────────────────────────────── */
.ticket-message { border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.ticket-message.user { background: rgba(124,58,237,0.1); border-right: 3px solid var(--primary); }
.ticket-message.admin { background: rgba(16,185,129,0.1); border-right: 3px solid var(--secondary); }

/* ─── Tooltip ───────────────────────────────────────────── */
.copy-btn { cursor: pointer; }
.copy-btn:hover { color: var(--primary-light); }

/* ─── Loading Spinner ───────────────────────────────────── */
.spinner-border-sm { width: 1rem; height: 1rem; }

/* ============================================================
   WhatsApp Float Button
============================================================ */
.wa-float {
  position: fixed !important;
  bottom: 28px;
  left: 28px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 56px;
}
.wa-btn {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  min-height: 56px;
  background: #25d366 !important;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(37,211,102,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  order: 2;
  animation: waPulse 3.5s ease-in-out infinite;
  overflow: hidden;
  flex-shrink: 0;
}
.wa-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55);
  animation: none;
}
.wa-btn:active { transform: scale(0.95); }
.wa-btn svg {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  fill: #fff !important;
  display: block;
  flex-shrink: 0;
}
@keyframes waPulse {
  0%   { box-shadow: 0 4px 18px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.3); }
  60%  { box-shadow: 0 4px 18px rgba(37,211,102,0.4), 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 4px 18px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0); }
}
.wa-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: waDot 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes waDot { 0%,100%{transform:scale(1)} 50%{transform:scale(1.3)} }
.wa-tooltip {
  order: 1;
  background: #fff;
  color: #1a1a2e;
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(6px);
}
.wa-float:hover .wa-tooltip { opacity: 1; transform: translateY(0); }
@media (max-width: 768px) {
  .wa-float { bottom: 14px; left: 14px; }
  .wa-btn   { width: 48px !important; height: 48px !important; min-width:48px; min-height:48px; }
  .wa-btn svg { width:24px !important; height:24px !important; max-width:24px; max-height:24px; }
  .wa-tooltip { display: none; }
}

/* ============================================================
   Light Theme — all pages
============================================================ */
body.light-theme {
  --dark:#f0f2f8;--dark-2:#e4e7f0;--dark-3:#d8dcec;--dark-4:#cdd2e6;--dark-5:#c2c8da;
  --card-bg:#ffffff;--border:rgba(124,58,237,0.15);--border-light:rgba(0,0,0,0.07);
  --text:#1e2030;--text-muted:#5a6278;--text-dim:#9099b0;
  --shadow:0 8px 40px rgba(0,0,0,0.1);--shadow-sm:0 4px 20px rgba(0,0,0,0.07);
}
body.light-theme #mainNav { background:rgba(240,242,248,0.9)!important; }
body.light-theme #mainNav.scrolled { background:rgba(240,242,248,0.98)!important; }
body.light-theme .navbar-nav .nav-link { color:#3d4460!important; }
body.light-theme .navbar-brand .brand-name { color:#1e2030!important; }
body.light-theme .footer { background:#e4e7f0!important; }
body.light-theme .dropdown-menu { background:#fff!important; }
body.light-theme .dropdown-item { color:#5a6278!important; }
body.light-theme .sidebar { background:#e4e7f0!important; }
body.light-theme .sidebar-link { color:#5a6278!important; }
body.light-theme .sidebar-link:hover,.sidebar-link.active { color:var(--primary)!important; }
body.light-theme .form-control,.form-select { background:#fff!important;color:#1e2030!important; }
body.light-theme .modal-content { background:#fff!important; }
