@font-face {
  font-family: 'Abar';
  src: url('/static/fonts/Abar-VF.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Abar', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  direction: rtl;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(80, 130, 255, 0.18), transparent 34%), linear-gradient(135deg, #f8fbff, #eef4ff);
  color: #1e293b;
  padding: 24px;
}

.container {
  max-width: 1450px;
  margin: 0 auto;
}

/* Header / TopNav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 231, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(31, 45, 78, 0.05);
}

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

.logo-box {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(220, 231, 255, 0.8);
}

.logo-box img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-badge {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #eef4ff;
  padding: 8px 16px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
}

.primary-btn {
  background: linear-gradient(135deg, #3217ff, #7c3cff);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(68, 47, 255, 0.22);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(68, 47, 255, 0.3);
}

.primary-btn:active {
  transform: translateY(0);
}

/* KPI Summary Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 231, 255, 0.9);
  border-radius: 22px;
  padding: 20px 24px;
  box-shadow: 0 14px 35px rgba(31, 45, 78, 0.05);
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #083b7a, #008cff);
}

.kpi-title {
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
}

.kpi-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

/* Section Card & Table */
.section-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 231, 255, 0.9);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(31, 45, 78, 0.08);
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.section-title {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.coin-category-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
  color: #334155;
}

/* Data Table */
.data-table-container {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13.5px;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}

.data-table tbody tr:hover {
  background: #f8faff;
}

/* Pills & Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.status-active {
  background: #dffcf1;
  color: #047857;
}

.status-inactive {
  background: #fff1f2;
  color: #be123c;
}

.platform-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
}

.plat-dk {
  background: #fee2e2;
  color: #ef394e;
}

.plat-techno {
  background: #e0f2fe;
  color: #0284c7;
}

.plat-tapsi {
  background: #fef3c7;
  color: #d97706;
}

.buybox-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.buybox-won {
  background: #dffcf1;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.buybox-lost {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.price-tag {
  font-weight: 800;
  font-size: 14px;
}

.price-our {
  color: #0f172a;
}

.price-comp {
  color: #64748b;
  font-size: 12.5px;
}

.diff-positive {
  color: #be123c;
  font-size: 11.5px;
  font-weight: 700;
}

.diff-negative {
  color: #047857;
  font-size: 11.5px;
  font-weight: 700;
}

.action-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-link:hover {
  text-decoration: underline;
}

/* Mobile Responsiveness */
.mobile-field-label {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .topnav {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .data-table thead {
    display: none;
  }

  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .data-table tr {
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px dashed #f1f5f9;
  }

  .data-table td:last-child {
    border-bottom: none;
  }

  .mobile-field-label {
    display: inline-block;
    font-weight: 800;
    color: #64748b;
    font-size: 12.5px;
  }
}
