/* ────────────────────────────── IPOT Admin Panel ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
  --bg-deep:      #05050f;
  --bg-card:      rgba(255,255,255,0.03);
  --bg-card-hover:rgba(255,255,255,0.06);
  --border:       rgba(255,255,255,0.07);
  --border-glow:  rgba(0,240,255,0.3);
  --neon-cyan:    #00f0ff;
  --neon-purple:  #b026ff;
  --neon-green:   #00ff88;
  --neon-red:     #ff3366;
  --neon-orange:  #ff9500;
  --text-primary: #e8e8f0;
  --text-muted:   #7878a0;
  --radius:       16px;
  --radius-sm:    10px;
  --shadow-glow:  0 0 30px rgba(0,240,255,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
}

/* ── Background Grid ─────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
body::after {
  content: '';
  position: fixed; top: -200px; left: -200px; z-index: -1;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(176,38,255,0.08) 0%, transparent 70%);
  animation: float 12s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,40px)} }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; right: 0; height: 100vh; width: 260px;
  background: rgba(10,10,25,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; padding: 28px 0;
  box-shadow: -4px 0 40px rgba(0,0,0,0.4);
}
.sidebar-brand {
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .logo-text {
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.sidebar-brand .logo-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.nav-list { list-style: none; padding: 20px 12px; flex: 1; }
.nav-item { margin-bottom: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all 0.25s ease; position: relative;
}
.nav-link:hover, .nav-link.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.nav-link.active { color: var(--neon-cyan); }
.nav-link.active::before {
  content: '';
  position: absolute; right: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 2px;
  background: linear-gradient(var(--neon-cyan), var(--neon-purple));
}
.nav-link i { width: 18px; text-align: center; }

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
}

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
  margin-right: 260px;
  padding: 32px 36px;
  min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
}
.page-title { font-size: 26px; font-weight: 700; }
.page-title span { color: var(--neon-cyan); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.topbar-badge {
  background: rgba(0,240,255,0.1);
  border: 1px solid rgba(0,240,255,0.2);
  color: var(--neon-cyan); padding: 6px 14px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--neon-cyan)));
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(0,240,255,0.2);
}
.stat-card .stat-icon {
  font-size: 22px; margin-bottom: 14px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.stat-card .stat-value {
  font-size: 26px; font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--neon-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Glass Card ──────────────────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.glass-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--neon-cyan); }

/* ── Chart Container ─────────────────────────────────────────────────────── */
.chart-wrapper {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 20px; margin-bottom: 24px;
}
.chart-container { position: relative; height: 260px; }

/* ── Log Table ───────────────────────────────────────────────────────────── */
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th {
  padding: 11px 14px; text-align: right;
  background: rgba(255,255,255,0.03);
  color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.log-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.log-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Status Badge ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge-pending  { background: rgba(255,149,0,0.12);  color: var(--neon-orange);  border: 1px solid rgba(255,149,0,0.25); }
.badge-pending::before  { background: var(--neon-orange); }
.badge-approved { background: rgba(0,255,136,0.10);  color: var(--neon-green);   border: 1px solid rgba(0,255,136,0.25); }
.badge-approved::before { background: var(--neon-green); animation: pulse 1.5s infinite; }
.badge-declined { background: rgba(255,51,102,0.12); color: var(--neon-red);     border: 1px solid rgba(255,51,102,0.25); }
.badge-declined::before { background: var(--neon-red); }
.badge-info     { background: rgba(0,240,255,0.10);  color: var(--neon-cyan);    border: 1px solid rgba(0,240,255,0.25); }
.badge-info::before     { background: var(--neon-cyan); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Order Rows ──────────────────────────────────────────────────────────── */
.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: var(--bg-card);
  transition: border-color 0.2s;
}
.order-card:hover { border-color: rgba(0,240,255,0.2); }
.order-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.order-number { font-weight: 700; color: var(--neon-cyan); font-size: 14px; }
.order-detail { font-size: 13px; color: var(--text-muted); }
.order-detail strong { color: var(--text-primary); }
.order-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: inherit; text-decoration: none;
  transition: all 0.2s ease;
}
.btn-cyan {
  background: linear-gradient(135deg, rgba(0,240,255,0.2), rgba(0,240,255,0.08));
  color: var(--neon-cyan); border: 1px solid rgba(0,240,255,0.3);
}
.btn-cyan:hover { background: rgba(0,240,255,0.25); box-shadow: 0 0 20px rgba(0,240,255,0.2); }
.btn-red {
  background: rgba(255,51,102,0.12);
  color: var(--neon-red); border: 1px solid rgba(255,51,102,0.3);
}
.btn-red:hover { background: rgba(255,51,102,0.2); }
.btn-green {
  background: rgba(0,255,136,0.10);
  color: var(--neon-green); border: 1px solid rgba(0,255,136,0.3);
}
.btn-green:hover { background: rgba(0,255,136,0.2); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted); border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 7px; font-weight: 500; }
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  direction: rtl;
}
.form-control:focus {
  outline: none;
  border-color: rgba(0,240,255,0.4);
  box-shadow: 0 0 12px rgba(0,240,255,0.1);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.2); color: var(--neon-green); }
.alert-error   { background: rgba(255,51,102,0.08); border: 1px solid rgba(255,51,102,0.2); color: var(--neon-red); }
.alert-warning { background: rgba(255,149,0,0.08); border: 1px solid rgba(255,149,0,0.2); color: var(--neon-orange); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #0e0e20;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px; max-width: 520px; width: 90%;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-img { width: 100%; border-radius: var(--radius-sm); margin-bottom: 16px; max-height: 300px; object-fit: cover; }

/* ── Login Page ──────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  width: 400px; max-width: 95%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 24px; padding: 44px 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 60px rgba(0,240,255,0.06);
}
.login-logo {
  font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-align: center; margin-bottom: 8px;
}
.login-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 32px; }

/* ── Table General ───────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 14px; text-align: right; background: rgba(255,255,255,0.03); color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,240,255,0.2); }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-cyan    { color: var(--neon-cyan); }
.text-green   { color: var(--neon-green); }
.text-red     { color: var(--neon-red); }
.text-orange  { color: var(--neon-orange); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-12 { gap: 12px; }
.flex   { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center  { align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.monospace { font-family: 'Courier New', monospace; font-size: 12px; background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 5px; color: var(--neon-cyan); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
