:root {
  --primary-color: #7c4dff;
  --secondary-color: #00e0ff;
  --background-dark: #0d0b16;
  --text-primary: #f6f6f6;
  --text-secondary: #9ba0b5;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-strong: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.08);
  --radius: 18px;
}

html,
body {
  height: 100%;
}

body {
  background: radial-gradient(
      circle at 20% 20%,
      rgba(124, 77, 255, 0.25),
      transparent 35%
    ),
    radial-gradient(circle at 80% 10%, rgba(0, 224, 255, 0.18), transparent 32%),
    radial-gradient(circle at 60% 70%, rgba(124, 77, 255, 0.2), transparent 35%),
    var(--background-dark);
  color: var(--text-primary);
  font-family: "Kanit", "Poppins", system-ui, -apple-system, sans-serif;
}

.dashboard-container {
  min-height: 100vh;
}

/* Sidebar (glass) */
.sidebar {
  background: rgba(0, 0, 0, 0.45) !important;
  border-right: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar-nav a {
  color: var(--text-secondary) !important;
  border: 1px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav .nav-link.active {
  background: linear-gradient(
    135deg,
    rgba(124, 77, 255, 0.25),
    rgba(0, 224, 255, 0.18)
  ) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-nav .nav-link.active span {
  color: var(--text-primary) !important;
}

.sidebar-nav span:hover {
  color: var(--text-primary) !important;
}

/* Main content */
.main-content {
  background: transparent !important;
  height: 100vh;
  max-height: 100vh;
  overflow: scroll;
}

.content-header {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.user-welcome p {
  color: var(--text-secondary) !important;
}

/* Cards */
.stat-card,
.license-card,
.profile-card,
.card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.license-card .card-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.license-card .card-header p,
.license-card .card-header .small {
  color: var(--text-secondary) !important;
}

.stat-icon {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.75), rgba(0, 224, 255, 0.45)) !important;
}

.key-display {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Inputs */
.form-control,
.form-select,
select.form-control,
input.form-control {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--text-primary) !important;
}

.form-control::placeholder {
  color: rgba(155, 160, 181, 0.85) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(124, 77, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.22) !important;
}

/* Bootstrap tabs: deixa mais "clean" */
.nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.nav-tabs .nav-link {
  border: 0 !important;
}

/* Buttons */
.btn.btn-primary {
  border: 0 !important;
  background: linear-gradient(135deg, #7c4dff, #9c6dff) !important;
  box-shadow: 0 10px 30px rgba(124, 77, 255, 0.22);
}

.btn.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(124, 77, 255, 0.32);
}

.btn.btn-dark {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.btn.btn-success {
  border: 0 !important;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(0, 224, 255, 0.6)) !important;
}

/* Loader overlay (mantém o existente, mas com gradiente) */
#global-loader {
  background: radial-gradient(
      circle at 50% 35%,
      rgba(124, 77, 255, 0.28),
      rgba(13, 11, 22, 0.98)
    ) !important;
}

@media (max-width: 768px) {
  .content-header {
    padding: 14px 14px;
  }
}

.spinner-width {
  width: 6em;
  height: 6em;
  --bs-spinner-border-width: 0.65em !important;
}

.store-container {
  margin-top: 5%;
}

/* --- Loja (licença vencida): lista compacta --- */
.payment-selector {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  margin: 0 auto 18px;
}

.paymode-btn {
  appearance: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.paymode-btn.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.45), rgba(0, 224, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width:100%;
  margin: 0 auto;
}

.product-category-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  margin: 0 auto 6px;
}

.productcat-btn {
  appearance: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.productcat-btn.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.45), rgba(0, 224, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.product-card-sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-title {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.1;
}

.product-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.product-actions .btn {
  min-width: 120px;
}

@media (max-width: 768px) {
  .payment-selector {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
  .paymode-btn {
    flex: 1;
    text-align: center;
  }
  .product-category-tabs {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
  .productcat-btn {
    flex: 1;
    text-align: center;
  }
  .product-card-sm {
    flex-direction: column;
    align-items: stretch;
  }
  .product-actions .btn {
    width: 100%;
  }
}