/* ==========================================================================
   ELO BOOST KINGDOM - PREMIUM LIGHT THEME ADMIN DASHBOARD
   ========================================================================== */

:root {
  --admin-bg: #f1f5f9;
  --admin-sidebar: #ffffff;
  --admin-header: #ffffff;
  --admin-card: #ffffff;
  --admin-card-hover: #f8fafc;
  --admin-input: #ffffff;
  --admin-input-bg: #f8fafc;

  --accent-red: #ff4655;
  --accent-red-hover: #e03241;
  --accent-cyan: #0284c7;
  --accent-gold: #d97706;
  --accent-green: #16a34a;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;

  --border-subtle: #e2e8f0;
  --border-color: #cbd5e1;
  --border-active: #0284c7;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--admin-bg);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR NAVIGATION (LIGHT THEME)
   ========================================================================== */
.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.sidebar-brand {
  height: 75px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-red), #b31e2d);
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 70, 85, 0.25);
}

.sidebar-logo-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.sidebar-brand-text .brand-line-1 {
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--text-main);
  line-height: 1.05;
  display: block;
}

.sidebar-brand-text .brand-line-2 {
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 1.2px;
  color: var(--accent-red);
  line-height: 1.05;
  display: block;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 14px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-text {
  flex: 1;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.sidebar-link.active {
  background: #fff1f2;
  color: var(--accent-red);
  font-weight: 700;
  border-left: 3px solid var(--accent-red);
}

.sidebar-link .badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 0px;
  font-weight: 700;
  background: var(--accent-red);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: #fafafa;
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 0px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-red);
  font-size: 0.85rem;
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.user-role {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==========================================================================
   MAIN CONTENT WRAPPER
   ========================================================================== */
.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navbar */
.admin-topbar {
  height: 75px;
  background: var(--admin-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-title-wrap h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.topbar-title-wrap p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.topbar-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

/* Content Body */
.admin-body {
  padding: 32px;
  flex: 1;
}

/* Page Headers */
.admin-page-header h2 {
  color: var(--text-main) !important;
}

/* ==========================================================================
   METRIC / STAT CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--admin-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 20px !important;
  box-shadow: var(--shadow-card) !important;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card.red::before { background: var(--accent-red); }
.stat-card.cyan::before { background: var(--accent-cyan); }
.stat-card.gold::before { background: var(--accent-gold); }
.stat-card.green::before { background: var(--accent-green); }

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 0px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main) !important;
  letter-spacing: -0.5px;
}

.stat-change {
  font-size: 0.78rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.positive { color: var(--accent-green); }
.stat-change.neutral { color: var(--text-muted); }

/* ==========================================================================
   DATA TABLES & CARDS
   ========================================================================== */
.admin-card {
  background: var(--admin-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-card) !important;
  margin-bottom: 28px;
  overflow: hidden;
}

.admin-card .card-header, .admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle) !important;
  background: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-card .card-title, .admin-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: #f8fafc !important;
  padding: 14px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted) !important;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text-main) !important;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: var(--admin-card-hover) !important;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 0px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.pending { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.status-badge.in_progress { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.status-badge.completed, .status-completed { background: #dcfce7 !important; color: #15803d !important; border: 1px solid #bbf7d0 !important; }
.status-badge.cancelled, .status-cancelled { background: #fee2e2 !important; color: #b91c1c !important; border: 1px solid #fecaca !important; }

.riot-id-tag {
  background: #0f172a !important;
  color: #ffffff !important;
  font-family: 'Roboto Mono', 'Consolas', monospace !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  padding: 4px 8px !important;
  border: 1px solid #334155 !important;
  border-radius: 0px !important;
  display: inline-block !important;
  letter-spacing: 0.5px !important;
  user-select: all !important;
}

.booster-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  padding: 4px 8px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0px !important;
}

.booster-unassigned {
  color: #64748b !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

/* Buttons */
.admin-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.admin-btn.btn-primary, .btn-primary {
  background: var(--accent-red) !important;
  color: #fff !important;
  border-color: var(--accent-red) !important;
  box-shadow: 0 2px 6px rgba(255, 70, 85, 0.25);
}

.admin-btn.btn-primary:hover, .btn-primary:hover {
  background: var(--accent-red-hover) !important;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-sm-primary { background: var(--accent-red); color: #fff; }
.btn-sm-primary:hover { background: #e03241; }

.btn-sm-cyan { background: #e0f2fe; color: var(--accent-cyan); border: 1px solid #bae6fd; }
.btn-sm-cyan:hover { background: var(--accent-cyan); color: #fff; }

.btn-sm-secondary { background: #e2e8f0; color: #334155; }
.btn-sm-secondary:hover { background: #cbd5e1; }

/* ==========================================================================
   INPUTS & FORMS (LIGHT THEME)
   ========================================================================== */
.form-control, .admin-input, input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="url"], input[type="color"], select, textarea, .action-btn, button {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 0px !important;
  outline: none;
  transition: var(--transition);
}

*, *::before, *::after {
  border-radius: 0px !important;
}

.form-control:focus, .admin-input:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 3px rgba(255, 70, 85, 0.12) !important;
}

.form-label, .admin-form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155 !important;
  margin-bottom: 6px;
  display: block;
}

/* ==========================================================================
   MODALS (LIGHT THEME - HIDDEN BY DEFAULT)
   ========================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-overlay.active {
  display: flex !important;
}

.admin-modal-box {
  background: #ffffff !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 28px !important;
  max-width: 540px !important;
  width: 100% !important;
  position: relative !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  color: var(--text-main) !important;
  animation: modal-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ef4444;
}

#orderModal > div, #boosterModal > div, #couponModal > div, #sliderModal > div, #accountModal > div {
  background: #ffffff !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-main) !important;
}

#orderModal h3, #boosterModal h3, #couponModal h3, #sliderModal h3, #accountModal h3 {
  color: var(--text-main) !important;
}

/* ==========================================================================
   ADMIN MODAL BOXES (ULTRA COMPACT & MINIMAL PADDING)
   ========================================================================== */
.admin-modal-overlay {
  padding: 8px !important;
}

.admin-modal-box {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 0px !important;
  box-shadow: var(--shadow-lg) !important;
}

.admin-modal-box > div:first-child {
  padding: 8px 12px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

.admin-modal-box > div:first-child h3 {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}

.admin-modal-box form > div:not(:last-child) {
  padding: 8px 12px !important;
  gap: 8px !important;
  background: transparent !important;
}

.admin-modal-box form > div:last-child {
  padding: 6px 12px !important;
  background: #f8fafc !important;
  border-top: 1px solid var(--border-subtle) !important;
}

.admin-modal-box .form-label {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  margin-bottom: 2px !important;
}

.admin-modal-box .form-control,
.admin-modal-box input:not([type="checkbox"]):not([type="radio"]),
.admin-modal-box select {
  padding: 4px 8px !important;
  font-size: 0.82rem !important;
  height: 32px !important;
  border-radius: 0px !important;
}

.admin-modal-box textarea {
  padding: 4px 8px !important;
  font-size: 0.82rem !important;
  border-radius: 0px !important;
}

.admin-modal-box .admin-btn {
  padding: 5px 12px !important;
  font-size: 0.82rem !important;
}

.admin-modal-box div[style*="display: grid"] {
  gap: 8px !important;
}

/* SweetAlert2 Admin Theme (Angular, Crisp & Modern) */
.swal2-popup {
  border-radius: 0px !important;
  font-family: 'Roboto', sans-serif !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  background: #ffffff !important;
  color: var(--text-main) !important;
  padding: 18px 22px !important;
}

.swal2-title {
  color: var(--text-main) !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
}

.swal2-html-container {
  color: var(--text-muted) !important;
  font-size: 0.88rem !important;
  margin: 10px 0 !important;
}

.swal2-actions {
  margin-top: 14px !important;
  gap: 8px !important;
}

.swal2-confirm {
  border-radius: 0px !important;
  font-weight: 700 !important;
  background: #0f172a !important;
  border: 1px solid #0f172a !important;
  padding: 7px 16px !important;
  font-size: 0.88rem !important;
}

.swal2-cancel {
  border-radius: 0px !important;
  font-weight: 600 !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  padding: 7px 16px !important;
  font-size: 0.88rem !important;
}

/* ==========================================================================
   ADMIN RESPONSIVE & MOBILE DESIGN
   ========================================================================== */
.admin-mobile-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 0px;
  align-items: center;
  justify-content: center;
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

@media (max-width: 992px) {
  .admin-mobile-toggle {
    display: flex;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-brand-text, 
  .sidebar-section-title, 
  .sidebar-link span:not(.badge), 
  .user-info-text {
    display: block !important;
  }

  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .admin-topbar {
    padding: 12px 16px !important;
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .admin-body {
    padding: 14px 12px !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .admin-table-container,
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .topbar-title-wrap h1 {
    font-size: 1.1rem !important;
  }

  .topbar-title-wrap p {
    font-size: 0.75rem !important;
  }

  .admin-card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  .admin-modal-box {
    width: 96% !important;
    margin: 10px auto !important;
  }

  .admin-modal-box div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
}
