/* Custom tweaks for the existing SSR pages on top of Metronic/Bootstrap */

/* Container spacing */
.app-content .wrap, .wrap { max-width: 1200px; margin: 0 auto; }

/* Legacy utility classes (some pages may still use) */
.muted { color: var(--bs-gray-600, #6b7280); }
.right { text-align: right; }

/* If a page uses a plain table without bootstrap classes */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 0.75rem; border-bottom: 1px solid var(--bs-border-color, #e5e7eb); vertical-align: middle; }
th { font-weight: 600; color: var(--bs-gray-700, #4b5563); }

/* Minor spacing */
.card { margin-bottom: 1rem; }

/* Links */
a { text-decoration: none; }
/* Alias for convenience */
:root {
  --bs-text-primary: var(--bs-primary);
}

/* Ensure primary text color isn't overridden by theme */
.text-primary {
  color: var(--bs-primary) !important;
}
.text-secondary {
  color: var(--bs-secondary) !important;
}
.text-success {
  color: var(--bs-success) !important;
}
.text-danger {
  color: var(--bs-danger) !important;
}
.text-warning {
  color: var(--bs-warning) !important;
}
.text-info {
  color: var(--bs-info) !important;
}
.text-muted {
  color: var(--bs-secondary-color) !important;
}

.app-sidebar .menu-scroll-offset {
  padding-top: 50px;
}

.app-sidebar {
  top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#kt_app_sidebar {
  top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#kt_app_sidebar_logo {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.app-sidebar-logo {
  height: auto !important;
  padding-top: 12px;
  padding-bottom: 12px;
}

.app-wrapper {
  margin-top: 0 !important;
}

#kt_app_wrapper {
  margin-top: 0 !important;
}

.app-wrapper {
  padding-top: 0 !important;
}

.app-header {
  position: sticky !important;
  top: 0;
  width: 100%;
  z-index: 9;
  background: #ffffff !important;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  animation-duration: 0.3s;
}

.app-header.app-header-sticky,
.app-header.app-header-sticky-on,
.app-header[data-kt-sticky="true"] {
  background: #ffffff !important;
  border-bottom: 1px solid #e8e8e8;
}

.dashboard-hero,
.page-hero {
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: #2b2b2b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.page-hero {
  padding: 1.35rem 1.5rem;
}
.dashboard-hero .hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}
.dashboard-hero .hero-sub,
.page-hero .text-muted {
  color: rgba(255, 255, 255, 0.85) !important;
}
.dashboard-hero h2 {
  color: #ffffff;
}
.page-hero h2 {
  color: #ffffff;
}
.page-hero .badge,
.page-hero .btn-light {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}
.dashboard-hero .stat-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  min-width: 150px;
}
.dashboard-hero .stat-chip-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.dashboard-hero .stat-chip-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.dashboard-stat {
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}
.dashboard-stat .stat-label {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}
.dashboard-stat .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}
.dashboard-stat .stat-unit {
  font-size: 0.85rem;
  margin-left: 0.25rem;
  color: var(--bs-secondary-color);
}
.dashboard-stat .stat-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
.dashboard-stat .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dashboard-stat .stat-icon svg {
  width: 20px;
  height: 20px;
}
.dashboard-stat .stat-indigo {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}
.dashboard-stat .stat-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.dashboard-stat .stat-green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.dashboard-stat .stat-orange {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.dashboard-card {
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.sales-summary-card,
.trade-summary-card {
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  background: #fff;
  min-height: 220px;
}
.sales-summary-card .metric-value,
.trade-summary-card .metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}
.sales-summary-card .metric-unit,
.trade-summary-card .metric-unit {
  font-size: 0.85rem;
  margin-left: 0.25rem;
  color: var(--bs-secondary-color);
}
.sales-summary-card .metric-delta,
.trade-summary-card .metric-delta {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.metric-icon svg {
  width: 20px;
  height: 20px;
}
.metric-icon-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.metric-icon-primary {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.metric-icon-warning {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}
.metric-icon-danger {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}
.sales-top3-list,
.summary-top3-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.sales-top3-item,
.summary-top3-item {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: #fff;
}
.sales-table th,
.trade-table th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.charge-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--bs-border-color);
}
.charge-table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}
.charge-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.04);
}
.charge-table td {
  vertical-align: middle;
}
.charge-table .method-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  color: #111827;
}
.charge-table .charge-amount {
  font-weight: 700;
  color: #0f766e;
}
.charge-table .charge-time {
  font-weight: 600;
  color: #111827;
}

.app-content .card:not(.dashboard-hero):not(.page-hero) {
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}
.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dashboard-list-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: #fff;
}
.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.traffic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.traffic-pill {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
  font-weight: 600;
}
.dashboard-table th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  font-size: 0.78rem;
  background: #fff;
  color: #111827;
}
.status-chip-danger {
  border-color: rgba(220, 53, 69, 0.4);
  color: #dc3545;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  background: radial-gradient(900px 420px at 20% -10%, rgba(186, 155, 74, 0.12), transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #121212 45%, #080808 100%);
  position: relative;
  overflow: hidden;
  color: #f8fafc;
}
.auth-topbar {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8f8f8f;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.auth-topbar-link {
  color: #8f8f8f;
  text-decoration: none;
}
.auth-topbar-link:hover {
  color: #ffffff;
}
.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  width: 100%;
}
.auth-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(520px, 100%);
  flex: 0 0 min(520px, 100%);
}
.auth-card {
  width: 100%;
  background: #151515;
  border-radius: 24px;
  border: 1px solid #2b2b2b;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
  padding: 42px 44px;
}
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.auth-tag {
  color: #ba9b4a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-title {
  margin-top: 10px;
  margin-bottom: 28px;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
}
.auth-form .form-label {
  font-weight: 600;
  color: #d1d5db;
}
.auth-form .form-control {
  height: 46px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
}
.auth-field-error {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #ef4444;
}
.auth-login-btn {
  background: #ba9b4a;
  border-color: #ba9b4a;
  color: #1f1f1f;
  font-weight: 700;
  height: 46px;
  border-radius: 12px;
}
.auth-login-btn:hover {
  background: #d1b060;
  border-color: #d1b060;
  color: #1f1f1f;
}
.auth-footer {
  margin-top: 50px;
  text-align: center;
  font-size: 0.75rem;
  color: #8f8f8f;
  letter-spacing: 0.08em;
}
.auth-alert-panel {
  width: min(360px, 100%);
  background: #151515;
  border: 1px solid #2b2b2b;
  border-radius: 18px;
  padding: 20px 22px;
  color: #f8fafc;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}
.auth-alert-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  padding: 16px;
}
.auth-alert-text {
  color: #f87171;
  font-weight: 600;
  line-height: 1.5;
}
.auth-alert-btn {
  margin-top: 14px;
  background: #00b0f0;
  border-color: #00b0f0;
  color: #ffffff;
  font-weight: 600;
}

.gamer-footer {
  width: 100%;
  background: rgba(2, 2, 4, 0.82);
  color: #d7d0c2;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0 26px;
  font-size: 12px;
  line-height: 1.6;
}

.gamer-footer-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gamer-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gamer-footer-links {
  gap: 6px;
}

.gamer-footer-link {
  color: #f1d8a1;
  text-decoration: none;
  font-weight: 600;
}

.gamer-footer-link:hover {
  color: #fff;
}

.gamer-footer-sep {
  color: rgba(241, 216, 161, 0.4);
}

.gamer-footer-note {
  color: #c2a36d;
}

.gamer-footer-copy {
  color: #b5ada0;
}

.gamer-footer-badges {
  margin-top: 6px;
  gap: 16px;
}

.gamer-footer-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 90px;
}

.gamer-footer-badge-box {
  width: 70px;
  height: 46px;
  border-radius: 10px;
  border: 1px dashed rgba(241, 216, 161, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1d8a1;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  background: rgba(10, 8, 6, 0.6);
}

.gamer-footer-badge-label {
  font-size: 11px;
  color: #d7c39b;
}
