html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 992px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  background: var(--bs-body-bg);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell > .container {
  flex: 1;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.app-navbar {
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bs-body-bg) 90%, transparent);
}

.navbar-brand {
  letter-spacing: 0.2px;
}

.brand-logo {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.35rem;
}

.theme-toggle-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bs-primary) 14%, var(--bs-body-bg)),
    color-mix(in srgb, var(--bs-info) 8%, var(--bs-body-bg))
  );
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
  border-radius: 1rem;
  padding: 1.5rem;
}

.hero-carousel {
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 70%, transparent);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--bs-body-bg) 88%, var(--bs-primary-bg-subtle));
}

.hero-carousel .carousel-inner {
  border-radius: 0.8rem;
}

.hero-carousel-item {
  min-height: 4rem;
  padding: 0.7rem 3.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.hero-carousel-title {
  font-weight: 600;
}

.hero-carousel-meta {
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  flex: 1 1 0;
  min-width: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hero-carousel-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--bs-primary);
  font-weight: 600;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 2.4rem;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background-color: color-mix(in srgb, var(--bs-body-color) 20%, transparent);
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.hero-orb-a {
  width: 10rem;
  height: 10rem;
  right: -2rem;
  top: -3rem;
  background: rgba(13, 110, 253, 0.18);
  animation: float-slow 9s ease-in-out infinite;
}

.hero-orb-b {
  width: 7rem;
  height: 7rem;
  right: 6rem;
  bottom: -2rem;
  background: rgba(111, 66, 193, 0.2);
  animation: float-slow 12s ease-in-out infinite reverse;
}

.dashboard-panel {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--bs-body-bg) 92%, var(--bs-tertiary-bg));
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--bs-border-color) 60%, transparent);
}

.metric-row:last-child {
  border-bottom: 0;
}

.stat-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  padding: 1rem;
  background: var(--bs-body-bg);
}

.quick-action-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: var(--bs-body-bg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.55rem 1.1rem rgba(0, 0, 0, 0.08);
}

.form-section {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem;
  background: var(--bs-body-bg);
  padding: 1rem;
}

.admin-form .form-label {
  font-weight: 600;
}

.form-hint {
  margin-top: 0.3rem;
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.user-role-select {
  max-width: 10rem;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-body-bg));
  font-size: 0.8rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.15;
}

.product-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem;
  background: var(--bs-body-bg);
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.7rem 1.4rem rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--bs-primary) 35%, var(--bs-border-color));
}

.product-icon {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg));
  font-size: 1rem;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-active {
  background: rgba(25, 135, 84, 0.15);
  color: #0f7a4e;
}

.badge-beta {
  background: rgba(255, 193, 7, 0.2);
  color: #9a6b00;
}

.badge-archived {
  background: rgba(108, 117, 125, 0.2);
  color: #495057;
}

[data-bs-theme="dark"] .badge-active {
  background: rgba(32, 201, 151, 0.22);
  color: #74f0c0;
}

[data-bs-theme="dark"] .badge-beta {
  background: rgba(255, 193, 7, 0.26);
  color: #ffd666;
}

[data-bs-theme="dark"] .badge-archived {
  background: rgba(173, 181, 189, 0.22);
  color: #d7dce1;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-in-up 0.55s ease forwards;
}

.row > [class*="col-"] .fade-in-up {
  animation-delay: 0.05s;
}

.row > [class*="col-"]:nth-child(2) .fade-in-up {
  animation-delay: 0.1s;
}

.row > [class*="col-"]:nth-child(3) .fade-in-up {
  animation-delay: 0.15s;
}

.row > [class*="col-"]:nth-child(4) .fade-in-up {
  animation-delay: 0.2s;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .hero-orb-a,
  .hero-orb-b,
  .product-card {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}