/* LOW TOPUP ADMIN CONSOLE STYLESHEET */
:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-subtle: #fff7ed;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ===================================================================
   ADMIN LOGIN SCREEN
   =================================================================== */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f1f5f9;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.login-title-group h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.login-tag {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: border-color 0.15s ease;
}

.form-input-wrap:focus-within {
  border-color: #0f172a;
  background: #ffffff;
}

.input-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  margin-right: 10px;
  flex-shrink: 0;
}

.form-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
}

.btn-login-submit {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-family: var(--font-main);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: background-color 0.15s ease;
}

.btn-login-submit:hover {
  background: #1e293b;
}

.login-error-msg {
  font-size: 0.78rem;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.login-footer-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}

/* ===================================================================
   ADMIN DASHBOARD LAYOUT
   =================================================================== */
.admin-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.admin-header-text h2 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-header-text h2 span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.admin-live-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-widget {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-refresh:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.refresh-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.btn-refresh.spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  color: #b91c1c;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: #fca5a5;
  color: #991b1b;
}

/* ===================================================================
   MAIN DASHBOARD CONTENT
   =================================================================== */
.admin-main {
  padding: 24px 20px 60px 20px;
}

.admin-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Dashboard Banner */
.dashboard-banner {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.dash-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.dash-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.dash-banner-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.meta-item strong {
  color: var(--text-main);
}

/* ===================================================================
   KPI METRICS GRID (5 CARDS)
   =================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kpi-card:hover {
  border-color: #cbd5e1;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: none;
}

.kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-dark { background: #f1f5f9; color: #0f172a; }

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.kpi-dual-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 2px 0;
}

.dual-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.dual-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dual-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.dual-bdt {
  font-size: 1.15rem;
  font-weight: 800;
  color: #16a34a;
}

.highlight-card {
  border-top: 3px solid #ea580c;
}

.highlight-card-dark {
  border-top: 3px solid #0f172a;
}

/* ===================================================================
   SECTION BLOCKS
   =================================================================== */
.section-block {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.block-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
}

.block-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  border: 1px solid #fed7aa;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ===================================================================
   4 TARGETED PACKAGES STATS GRID
   =================================================================== */
.packages-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pkg-stat-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.15s ease;
}

.pkg-stat-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.pkg-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pkg-stat-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-hot {
  background: #ffedd5 !important;
  color: #ea580c !important;
}

.pkg-stat-rate {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
}

.pkg-stat-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
}

.pkg-metrics-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
}

.pkg-metric-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pkg-m-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pkg-m-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.pkg-m-bdt {
  font-size: 1.05rem;
  font-weight: 800;
  color: #16a34a;
}

.highlight-metric {
  border-top: 1px dashed var(--border-light);
  padding-top: 6px;
  margin-top: 2px;
}

/* ===================================================================
   ORDERS DATA TABLE
   =================================================================== */
.orders-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-search-input {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  min-width: 240px;
}

.table-search-input:focus {
  border-color: #0f172a;
  background: #ffffff;
}

.table-select-filter {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.orders-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.orders-data-table th {
  background: #f8fafc;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.orders-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  white-space: nowrap;
}

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

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

.order-id-cell {
  font-weight: 700;
  color: #0f172a;
  font-family: monospace;
}

.player-uid-cell {
  font-weight: 700;
  color: var(--primary);
}

.price-cell {
  font-weight: 800;
  color: #0f172a;
}

.table-loading-cell,
.table-empty-cell {
  text-align: center;
  padding: 32px 14px !important;
  color: var(--text-muted);
}

/* SOLID STATUS BADGES (MATCHING MAIN SITE SPEC) */
.status-pill {
  font-family: var(--font-main);
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  border: none !important;
  text-transform: none !important;
  color: #ffffff !important;
}

.status-completed {
  background: #16a34a !important;
  color: #ffffff !important;
}

.status-processing {
  background: #d97706 !important;
  color: #ffffff !important;
}

.status-refund {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* ===================================================================
   ADMIN FOOTER
   =================================================================== */
.admin-footer {
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  padding: 16px 20px;
  margin-top: auto;
}

.admin-footer .admin-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-footer code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0f172a;
}

/* ===================================================================
   RESPONSIVE BREAKPOINTS
   =================================================================== */
@media (max-width: 1080px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .packages-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .packages-stats-grid {
    grid-template-columns: 1fr;
  }
  .admin-header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-header-right {
    width: 100%;
    justify-content: space-between;
  }
  .orders-table-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .table-actions {
    width: 100%;
  }
  .table-search-input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
