body {
  background: #0b1220;
  color: #e9eefc;
}

.bg-surface {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(1200px circle at 10% 10%, rgba(74, 222, 128, 0.22), transparent 45%),
              radial-gradient(1000px circle at 90% 0%, rgba(99, 102, 241, 0.22), transparent 40%),
              linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 42, 0.95));
}

.hero::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: conic-gradient(from 180deg, rgba(59, 130, 246, 0.35), rgba(16, 185, 129, 0.35), rgba(168, 85, 247, 0.35), rgba(59, 130, 246, 0.35));
  filter: blur(55px);
  opacity: 0.55;
  animation: floatGlow 10s ease-in-out infinite;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  transform: scale(1.04);
  pointer-events: none;
}

.card-img-top {
  height: 210px;
  object-fit: cover;
}

.listing-hero-img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.thumb-sm {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(20px, -10px, 0) rotate(8deg); }
}

.hero-badges .badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e9eefc;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, rgba(99, 102, 241, 0.85), rgba(16, 185, 129, 0.8), rgba(236, 72, 153, 0.75), rgba(99, 102, 241, 0.85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.28;
  animation: pulse 9s linear infinite;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: inherit;
  background: radial-gradient(800px circle at 20% 15%, rgba(99, 102, 241, 0.22), transparent 55%),
              radial-gradient(700px circle at 85% 20%, rgba(16, 185, 129, 0.18), transparent 55%),
              radial-gradient(900px circle at 50% 90%, rgba(236, 72, 153, 0.16), transparent 58%);
  filter: blur(22px);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(233, 238, 252, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.card:hover::before {
  opacity: 0.55;
}

.card:hover::after {
  opacity: 1;
}

.card:focus-within {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 .2rem rgba(99, 102, 241, 0.20);
}

@keyframes cardBorderSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .card::before {
    animation: none;
  }
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}

.card .text-muted {
  color: rgba(233, 238, 252, 0.68) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  border: 0;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.24);
}

.nav-glass {
  background: rgba(10, 15, 28, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.navbar-toggler-amber {
  border-color: rgba(255, 193, 7, 0.55);
}

.navbar-toggler-amber:focus {
  box-shadow: 0 0 0 .2rem rgba(255, 193, 7, 0.20);
}

.navbar-toggler-amber .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,193,7,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar-brand {
  max-width: 100%;
}

.navbar-brand .brand-logo {
  height: 28px;
  max-width: 140px;
}

.navbar-brand .brand-name {
  display: inline-block;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@media (min-width: 992px) {
  .navbar-brand .brand-logo {
    max-width: 300px;
  }
  .navbar-brand .brand-name {
    max-width: 360px;
  }
}

.table {
  --bs-table-bg: rgba(13, 21, 45, 0.9);
  --bs-table-color: #e9eefc;
  --bs-table-border-color: rgba(233, 238, 252, 0.14);
  --bs-table-striped-bg: rgba(233, 238, 252, 0.04);
  --bs-table-striped-color: #e9eefc;
  --bs-table-active-bg: rgba(233, 238, 252, 0.07);
  --bs-table-active-color: #fff;
  --bs-table-hover-bg: rgba(233, 238, 252, 0.06);
  --bs-table-hover-color: #fff;
  color: var(--bs-table-color);
}

.admin-dashboard .text-white-50 {
  --bs-text-opacity: 1;
  color: #002ecb !important;
}

.table thead th {
  color: rgba(233, 238, 252, 0.86);
}

.vendor-listings-table thead th {
  color: rgba(233, 238, 252, 0.86);
}

.vendor-listings-table {
  background-color: rgba(13, 21, 45, 0.9);
}

.admin-users-table {
  background-color: rgba(13, 21, 45, 0.9);
}

.admin-users-table,
.admin-users-table th,
.admin-users-table td {
  color: #fff;
}

.admin-users-table thead th {
  color: rgba(233, 238, 252, 0.86);
}

.admin-users-table.users-table td {
  color: rgba(233, 238, 252, 0.88);
}

.admin-users-table .text-white-50 {
  --bs-text-opacity: 1;
  color: rgba(233, 238, 252, 0.7) !important;
}

.admin-users-table .btn-outline-light {
  border-color: #ffc107;
  background-color: #ffc107;
}

.admin-listings-table .btn-outline-light {
  border-color: #ffc107;
  background-color: #ffc107;
}

.admin-listings-table {
  background-color: rgba(13, 21, 45, 0.9);
}

.form-control, .form-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e9eefc;
}

.form-select,
.form-select option {
  color: #000000 !important;
}

.form-select option {
  background-color: #ffffff;
}

.form-control::placeholder {
  color: #6c757d;
  opacity: 1;
}

.form-select::placeholder {
  color: #6c757d;
  opacity: 1;
}

.form-control::-ms-input-placeholder {
  color: #6c757d;
}

.form-control::-webkit-input-placeholder {
  color: #6c757d;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 .2rem rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(255, 255, 255, 0.07);
  color: #e9eefc;
}

.link-muted {
  color: rgba(233, 238, 252, 0.72);
}

.link-muted:hover {
  color: #fff;
}

.pagination .page-link {
  background: rgba(13, 21, 45, 0.9);
  border-color: rgba(233, 238, 252, 0.14);
  color: rgba(233, 238, 252, 0.86);
}

.pagination .page-link:hover {
  background: rgba(233, 238, 252, 0.06);
  border-color: rgba(233, 238, 252, 0.22);
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  background: rgba(13, 21, 45, 0.55);
  border-color: rgba(233, 238, 252, 0.1);
  color: rgba(233, 238, 252, 0.45);
}

[data-animate] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

html[data-bs-theme="light"] body {
  background: #f8fafc;
  color: #0b1220;
}

html[data-bs-theme="light"] .bg-surface {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(11, 18, 32, 0.10);
}

html[data-bs-theme="light"] .card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(11, 18, 32, 0.10);
  color: #0b1220;
}

html[data-bs-theme="light"] .card:hover {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(11, 18, 32, 0.06);
  border-color: rgba(11, 18, 32, 0.16);
}

html[data-bs-theme="light"] .card .text-muted {
  color: rgba(11, 18, 32, 0.62) !important;
}

html[data-bs-theme="light"] .nav-glass {
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(11, 18, 32, 0.10);
}

html[data-bs-theme="light"] .nav-glass .link-light,
html[data-bs-theme="light"] .nav-glass .text-white,
html[data-bs-theme="light"] .nav-glass .text-white-50 {
  color: rgba(11, 18, 32, 0.86) !important;
}

html[data-bs-theme="light"] .btn-outline-light {
  border-color: rgba(11, 18, 32, 0.22);
  color: rgba(11, 18, 32, 0.90);
}

html[data-bs-theme="light"] .btn-outline-light:hover {
  background: rgba(11, 18, 32, 0.06);
  border-color: rgba(11, 18, 32, 0.30);
  color: #0b1220;
}

html[data-bs-theme="light"] .table {
  --bs-table-bg: rgba(255, 255, 255, 0.92);
  --bs-table-color: #0b1220;
  --bs-table-border-color: rgba(11, 18, 32, 0.12);
  --bs-table-striped-bg: rgba(11, 18, 32, 0.03);
  --bs-table-striped-color: #0b1220;
  --bs-table-active-bg: rgba(11, 18, 32, 0.05);
  --bs-table-active-color: #0b1220;
  --bs-table-hover-bg: rgba(11, 18, 32, 0.04);
  --bs-table-hover-color: #0b1220;
}

html[data-bs-theme="light"] .table thead th,
html[data-bs-theme="light"] .vendor-listings-table thead th,
html[data-bs-theme="light"] .admin-users-table thead th {
  color: rgba(11, 18, 32, 0.78);
}

html[data-bs-theme="light"] .vendor-listings-table,
html[data-bs-theme="light"] .admin-users-table,
html[data-bs-theme="light"] .admin-listings-table {
  background-color: rgba(255, 255, 255, 0.92);
}

html[data-bs-theme="light"] .admin-users-table,
html[data-bs-theme="light"] .admin-users-table th,
html[data-bs-theme="light"] .admin-users-table td {
  color: #0b1220;
}

html[data-bs-theme="light"] .admin-users-table.users-table td {
  color: rgba(11, 18, 32, 0.86);
}

html[data-bs-theme="light"] .admin-users-table .text-white-50 {
  color: rgba(11, 18, 32, 0.62) !important;
}

html[data-bs-theme="light"] .admin-users-table .btn-outline-light,
html[data-bs-theme="light"] .admin-listings-table .btn-outline-light {
  color: #0b1220;
}

html[data-bs-theme="light"] .form-control,
html[data-bs-theme="light"] .form-select {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 18, 32, 0.14);
  color: #0b1220;
}

html[data-bs-theme="light"] .form-control:focus,
html[data-bs-theme="light"] .form-select:focus {
  background: #ffffff;
  color: #0b1220;
}

html[data-bs-theme="light"] .link-muted {
  color: rgba(11, 18, 32, 0.68);
}

html[data-bs-theme="light"] .link-muted:hover {
  color: #0b1220;
}

html[data-bs-theme="light"] .pagination .page-link {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(11, 18, 32, 0.12);
  color: rgba(11, 18, 32, 0.82);
}

html[data-bs-theme="light"] .pagination .page-link:hover {
  background: rgba(11, 18, 32, 0.05);
  border-color: rgba(11, 18, 32, 0.18);
  color: #0b1220;
}

html[data-bs-theme="light"] .pagination .page-item.disabled .page-link {
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(11, 18, 32, 0.10);
  color: rgba(11, 18, 32, 0.45);
}
