body {
  font-size: 0.95rem;
  background-color: #0f172a;
  color: #e2e8f0;
}

body.sidebar-mini {
  background-color: #0f172a;
}

.wrapper {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b 0, #020617 60%);
}

.content-wrapper {
  background: transparent;
  padding-top: 0.75rem;
}

@media (max-width: 767.98px) {
  .content-wrapper {
    padding-top: 0.5rem;
  }
}

.admin-navbar {
  background: linear-gradient(90deg, #1d4ed8, #0f766e);
  color: #e5e7eb;
  border: 0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
}

.admin-navbar .nav-link {
  color: #e5e7eb;
}

.admin-navbar .nav-link:hover {
  color: #ffffff;
}

.admin-navbar .btn-outline-light {
  border-color: rgba(226, 232, 240, 0.6);
  color: #e5e7eb;
}

.admin-navbar .btn-outline-light:hover {
  background-color: rgba(15, 23, 42, 0.15);
  color: #ffffff;
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 0.75rem;
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.3);
}

.admin-quick-actions {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.4rem 0.75rem;
  position: relative;
  z-index: 1200;
}

.admin-quick-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  gap: 0.4rem;
}

.admin-quick-scroll::-webkit-scrollbar {
  height: 4px;
}

.admin-quick-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
}

.admin-quick-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding-inline: 0.7rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
}

.admin-quick-btn i {
  margin-right: 0.35rem;
}

.admin-quick-btn span {
  font-size: 0.78rem;
}

@media (min-width: 768px) {
  .admin-quick-actions {
    padding-inline: 1rem;
  }
}

.main-sidebar {
  background: linear-gradient(180deg, #020617, #0f172a);
  box-shadow: 4px 0 25px rgba(15, 23, 42, 0.9);
  z-index: 1040;
}

.main-sidebar .brand-link {
  border-bottom: 1px solid rgba(30, 64, 175, 0.35);
}

.main-sidebar .brand-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-sidebar > .nav-item > .nav-link {
  border-radius: 999px;
  margin: 2px 8px;
  padding-block: 0.4rem;
}

.nav-sidebar > .nav-item > .nav-link .nav-icon {
  font-size: 0.9rem;
}

.nav-sidebar > .nav-item > .nav-link.active,
.nav-sidebar > .nav-item > .nav-link:hover {
  background: linear-gradient(90deg, #1d4ed8, #22c55e);
  color: #ffffff;
}

.nav-sidebar > .nav-item > .nav-link.active .nav-icon,
.nav-sidebar > .nav-item > .nav-link:hover .nav-icon {
  color: #ffffff;
}

.nav-treeview > .nav-item > .nav-link {
  border-radius: 999px;
  margin-inline: 1.5rem;
}

.small-box {
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
}

.small-box .icon {
  right: 10px;
}

/* Card Styling for Dark Theme */
.card {
  border-radius: 1rem;
  border: 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.5);
  overflow: hidden;
  background-color: #1e293b;
  color: #e2e8f0;
}

.card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.03);
}

.card-title {
  color: #f1f5f9;
}

.main-footer {
  background: rgba(15, 23, 42, 0.98);
  color: #9ca3af;
  border-top: 0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.9);
}

.main-footer a {
  color: #e5e7eb;
}

/* Table Styling */
.table {
  color: #e2e8f0;
  background-color: transparent;
}

.table th,
.table td {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.table thead th {
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.table-bordered {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-hover tbody tr:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Dark Mode Overrides for Table Contextual Classes */
.table-success, .table-success > th, .table-success > td {
  background-color: rgba(22, 163, 74, 0.2) !important;
  color: #e2e8f0 !important;
}
.table-warning, .table-warning > th, .table-warning > td {
  background-color: rgba(234, 179, 8, 0.2) !important;
  color: #e2e8f0 !important;
}
.table-danger, .table-danger > th, .table-danger > td {
  background-color: rgba(220, 38, 38, 0.2) !important;
  color: #e2e8f0 !important;
}
.table-info, .table-info > th, .table-info > td {
  background-color: rgba(8, 145, 178, 0.2) !important;
  color: #e2e8f0 !important;
}
.table-primary, .table-primary > th, .table-primary > td {
  background-color: rgba(37, 99, 235, 0.2) !important;
  color: #e2e8f0 !important;
}
.table-secondary, .table-secondary > th, .table-secondary > td {
  background-color: rgba(100, 116, 139, 0.2) !important;
  color: #e2e8f0 !important;
}
.table-light, .table-light > th, .table-light > td {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #e2e8f0 !important;
}
.table-dark, .table-dark > th, .table-dark > td {
  background-color: rgba(0, 0, 0, 0.3) !important;
  color: #e2e8f0 !important;
}

/* Custom Table Classes */
.table-refund, .table-refund > th, .table-refund > td {
  background-color: rgba(147, 51, 234, 0.2) !important;
  color: #e2e8f0 !important;
}

/* Custom Badges */
.badge-purple {
  background-color: #9333ea;
  color: #ffffff;
}

/* Form Controls */
.form-control {
  background-color: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
}

.form-control:focus {
  background-color: #0f172a;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
  color: #64748b;
}

.custom-file-label {
  background-color: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
}

.custom-file-label::after {
  background-color: #1e293b;
  color: #e2e8f0;
}

/* Select2 fixes if used */
.select2-container--default .select2-selection--single,
.select2-selection .select2-selection--single {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #fff !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
}
.select2-container--default .select2-selection--multiple {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
}
.select2-dropdown {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #fff;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3b82f6 !important;
    color: white !important;
}
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #1e293b !important;
}

/* Admin FAB (Mobile) */
.admin-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.admin-fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-fab-toggle:active {
  transform: scale(0.95);
}

.admin-fab-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-fab-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-fab-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1e293b;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  font-size: 1.2rem;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-fab-item:hover {
  background: #2563eb;
  color: white;
  transform: scale(1.1);
}

.admin-fab-item:nth-child(1) { transition-delay: 0.1s; }
.admin-fab-item:nth-child(2) { transition-delay: 0.05s; }
.admin-fab-item:nth-child(3) { transition-delay: 0s; }
