/* =============================================================================
   Vidanya tanıtım sayfası v2 — YÖNETİM PANELİ KOPYASI

   Bu bileşen, CANLI bir mağazanın (tarzparfumerim) gerçek yönetim panelinden
   birebir referans alınarak HTML/SVG olarak YENİDEN İNŞA edildi — ekran görüntüsü
   DEĞİL. Sebebi: raster görselde sayaç dönmez, grafik çizilmez, kargo hareketleri
   ilerlemez. Burada hepsi canlanır.

   ⚠️ GERÇEK MÜŞTERİ VERİSİ YOK. Sipariş tablosundaki ad/telefon alanları temsilî
   değerlerdir; gerçek panelden yalnızca YERLEŞİM ve ALAN YAPISI alınmıştır.

   İki boyut: `.vd2-panel` (tam, "Dev ürün panosu") ve `.vd2-panel--sm` (hero'da
   küçük; lisans şeridi, karşılama ve sipariş tablosu gizlenir).
   ========================================================================== */

.vd2-panel {
  --p-ink: #1f2937;
  --p-muted: #8b95a9;
  --p-line: #eceff6;
  --p-violet: #6d3fe0;

  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--vd2-line-strong);
  box-shadow: 0 30px 70px -32px rgba(15, 28, 54, 0.5);
  font-size: 12px;
  line-height: 1.45;
  color: var(--p-ink);
  text-align: left;
}

/* --------------------------------------------------------------- kenar çubuğu */

.vd2-panel-side {
  padding: 14px 10px;
  border-right: 1px solid var(--p-line);
  background: #fff;
  display: grid;
  gap: 2px;
  align-content: start;
}

.vd2-panel-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 16px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
}
.vd2-panel-brand i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4f8dff, #8b6cff);
  flex: none;
}

.vd2-panel-side a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #6b7689;
  text-decoration: none;
}
.vd2-panel-side a::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #f1f4fa;
  flex: none;
}
.vd2-panel-side a.on { background: #f4f1ff; color: var(--p-violet); font-weight: 700; }
.vd2-panel-side a.on::before { background: #e6ddff; }
/* Menüdeki sayaç rozeti (ör. bekleyen sipariş) */
.vd2-panel-side a b {
  margin-left: auto;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffe1e6;
  color: #d63a6a;
  font-size: 9.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------------ üst çubuk */

.vd2-panel-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--p-line);
  background: #fff;
}
.vd2-panel-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #e3e8f2;
  border-radius: 999px;
  color: #9aa4b8;
  font-size: 11px;
}
.vd2-panel-search svg { width: 13px; height: 13px; flex: none; }
.vd2-panel-tools { display: flex; align-items: center; gap: 10px; }
.vd2-panel-tools i {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: #e7ebf4;
  display: block;
}
.vd2-panel-tools .bell { position: relative; }
.vd2-panel-tools .bell u {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--p-violet);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  font-style: normal;
  text-decoration: none;
  display: grid;
  place-items: center;
}
.vd2-panel-tools .av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #4f8dff);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* --------------------------------------------------------------------- gövde */

.vd2-panel-body {
  padding: 13px;
  display: grid;
  gap: 11px;
  align-content: start;
  background: #f7f9fd;
}

/* Lisans şeridi */
.vd2-panel-lic {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--p-line);
  font-size: 11.5px;
  font-weight: 600;
}
.vd2-panel-lic b { color: var(--p-violet); font-weight: 800; }
.vd2-panel-lic span {
  margin-left: auto;
  padding: 6px 13px;
  border-radius: 8px;
  background: var(--p-violet);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

/* Karşılama satırı */
.vd2-panel-hello { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.vd2-panel-hello h5 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.vd2-panel-hello p { margin: 2px 0 0; font-size: 10.5px; color: var(--p-muted); }
.vd2-panel-hello .seg { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.vd2-panel-hello .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--p-line);
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  color: #55607a;
}
.vd2-panel-hello .live em {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  font-style: normal;
}
.vd2-panel-hello .tabs {
  display: flex;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.vd2-panel-hello .tabs span { padding: 5px 11px; font-size: 10px; font-weight: 600; color: #6b7689; }
.vd2-panel-hello .tabs span.on { background: #f1eeff; color: var(--p-violet); font-weight: 700; }

/* -------------------------------------------------- renkli özet kartları (KPI) */

.vd2-panel-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }

.vd2-kpi {
  padding: 12px 13px 11px;
  border-radius: 12px;
  color: #fff;
}
.vd2-kpi small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.85;
}
.vd2-kpi b {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.vd2-kpi em {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
}
.vd2-kpi--teal { background: linear-gradient(140deg, #2fa08f, #268c7e); }
.vd2-kpi--violet { background: linear-gradient(140deg, #7346e8, #5c2fd0); }
.vd2-kpi--orange { background: linear-gradient(140deg, #ea9134, #dd7b1e); }
.vd2-kpi--pink { background: linear-gradient(140deg, #d64a72, #c33459); }

/* ------------------------------------------------------------------ kartlar */

.vd2-panel-split { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 9px; }

.vd2-panel-card {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--p-line);
}
.vd2-panel-card h6 {
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.vd2-panel-card h6 span {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--p-muted);
}

/* Ciro trendi — alan grafiği (motion.js path'i çizer) */
.vd2-trend { display: block; width: 100%; height: auto; overflow: visible; }
.vd2-trend .area { fill: rgba(109, 63, 224, 0.13); opacity: 0; transition: opacity 900ms ease 650ms; }
.is-live .vd2-trend .area { opacity: 1; }
.vd2-trend .ln {
  fill: none;
  stroke: var(--p-violet);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sipariş durumu — halka (motion.js dilimleri doldurur) */
.vd2-donut { display: flex; align-items: center; gap: 12px; }
.vd2-donut-ring { position: relative; flex: none; }
.vd2-donut svg { width: 96px; height: 96px; display: block; transform: rotate(-90deg); }
.vd2-donut circle { fill: none; stroke-width: 11; }
.vd2-donut .track { stroke: #eef1f7; }
/* Dilimler görünürlükte 0'dan kendi uzunluklarına açılır. `--len` yay uzunluğu,
   `--off` ise dilimin halka üzerindeki başlangıcı (negatif dashoffset). */
.vd2-donut .seg {
  stroke-linecap: butt;
  stroke-dasharray: 0 999;
  stroke-dashoffset: var(--off, 0);
  transition: stroke-dasharray 1300ms cubic-bezier(.22,1,.36,1);
}
.is-live .vd2-donut .seg { stroke-dasharray: var(--len, 0) 999; }
.vd2-donut-hub {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.vd2-donut-hub b { font-size: 15px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.vd2-donut-hub small { display: block; font-size: 8.5px; color: var(--p-muted); margin-top: -2px; }
.vd2-donut-legend { flex: 1; display: grid; gap: 9px; min-width: 0; }
.vd2-donut-legend div { display: flex; align-items: center; gap: 7px; font-size: 10.5px; }
.vd2-donut-legend i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.vd2-donut-legend b { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- sipariş tablosu + kargo */

.vd2-orders-head,
.vd2-order {
  display: grid;
  grid-template-columns: 58px minmax(0, 1.05fr) 76px 72px minmax(0, 1fr) 94px 62px;
  align-items: center;
  gap: 9px;
  padding: 8px 4px;
}
.vd2-orders-head {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-muted);
  border-bottom: 1px solid var(--p-line);
  padding-top: 0;
}
.vd2-order { border-bottom: 1px solid #f5f7fb; font-size: 10.5px; }
.vd2-order:last-child { border-bottom: 0; }
.vd2-order .id { font-weight: 800; color: #4b5568; }
.vd2-order .who { font-weight: 700; color: #2b3550; }
.vd2-order .amt { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Kargo firması logosu — gerçek SVG'ler assets/logos/ altından gelir */
.vd2-order .carrier { display: flex; align-items: center; }
.vd2-order .carrier img { height: 13px; width: auto; max-width: 66px; object-fit: contain; display: block; }
.vd2-order .trk { font-size: 9.5px; color: #7a8598; font-variant-numeric: tabular-nums; }

.vd2-badge {
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.vd2-badge--prep { background: #ffedd5; color: #b45309; }
.vd2-badge--sent { background: #e0e7ff; color: #3730a3; }
.vd2-badge--done { background: #dcfce7; color: #15803d; }

/* Kargo hareket adımları — motion.css sırayla yakar (canlı takip hissi) */
.vd2-steps { display: flex; gap: 4px; }
.vd2-steps i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #eef1f7;
  color: #9aa4b8;
  font-size: 8.5px;
  font-weight: 800;
  font-style: normal;
  display: grid;
  place-items: center;
}
.vd2-steps i.lit { background: #dcfce7; color: #15803d; }

/* ================================================== KÜÇÜK (HERO) VARYANTI */

.vd2-panel--sm { grid-template-columns: 132px minmax(0, 1fr); font-size: 11px; }
.vd2-panel--sm .vd2-panel-lic,
.vd2-panel--sm .vd2-panel-hello,
.vd2-panel--sm .vd2-panel-orders-card { display: none; }
.vd2-panel--sm .vd2-panel-side a { font-size: 10.5px; padding: 6px 7px; }
.vd2-panel--sm .vd2-kpi b { font-size: 15px; }
.vd2-panel--sm .vd2-kpi small { font-size: 8px; }
.vd2-panel--sm .vd2-panel-body { gap: 9px; }
/* Hero'da halka + açıklama yan yana sığmıyor (metin kırpılıyordu) → alt alta diz. */
.vd2-panel--sm .vd2-donut { flex-direction: column; align-items: center; gap: 9px; }
.vd2-panel--sm .vd2-donut svg { width: 72px; height: 72px; }
.vd2-panel--sm .vd2-donut-legend { width: 100%; gap: 6px; }
.vd2-panel--sm .vd2-donut-legend div { font-size: 9.5px; }
.vd2-panel--sm .vd2-panel-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

/* ============================================================== DUYARLI */

@media (max-width: 900px) {
  .vd2-panel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vd2-panel-split { grid-template-columns: minmax(0, 1fr); }
  /* Telefonda tablo daralınca kargo/takip sütunları düşer */
  .vd2-orders-head,
  .vd2-order { grid-template-columns: 52px minmax(0, 1fr) 72px 90px 62px; }
  .vd2-order .carrier,
  .vd2-orders-head .h-carrier,
  .vd2-order .trk,
  .vd2-orders-head .h-trk { display: none; }
}

@media (max-width: 560px) {
  .vd2-panel,
  .vd2-panel--sm { grid-template-columns: minmax(0, 1fr); }
  .vd2-panel-side { display: none; }
}
