:root {
  --bg: #070707;
  --panel: #101011;
  --panel-2: #161617;
  --border: #2a2324;
  --text: #f1f1f1;
  --muted: #b5adad;
  --accent: #c85656;
  --accent-2: #943838;
  --topbar-height: 58px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Tajawal", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--bg);
}

/* الأشكال على حواف اللوحة فقط — الوسط فاضي */
.bg-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    repeating-linear-gradient(
      122deg,
      rgba(123, 169, 255, 0.07) 0px,
      rgba(123, 169, 255, 0.07) 1px,
      transparent 1px,
      transparent 90px
    ),
    repeating-linear-gradient(
      62deg,
      rgba(123, 169, 255, 0.04) 0px,
      rgba(123, 169, 255, 0.04) 1px,
      transparent 1px,
      transparent 110px
    );
  background-size: 24px 24px, auto, auto;
  /* يخفي الوسط ويظهر التأثير على الأطراف فقط */
  mask-image: radial-gradient(
    ellipse 72% 68% at 50% 50%,
    transparent 58%,
    black 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 72% 68% at 50% 50%,
    transparent 58%,
    black 100%
  );
  opacity: 0.55;
}

/* عُقد وخطوط على الزوايا والحواف */
.bg-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(109, 162, 255, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 10%, rgba(109, 162, 255, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 6% 88%, rgba(109, 162, 255, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 94% 90%, rgba(109, 162, 255, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 4%, rgba(109, 162, 255, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 96%, rgba(109, 162, 255, 0.2) 0 2px, transparent 3px),
    linear-gradient(30deg, transparent 47%, rgba(85, 126, 201, 0.12) 48%, rgba(85, 126, 201, 0.12) 52%, transparent 53%) 2% 8% / 140px 120px no-repeat,
    linear-gradient(30deg, transparent 47%, rgba(85, 126, 201, 0.1) 48%, rgba(85, 126, 201, 0.1) 52%, transparent 53%) 88% 6% / 140px 120px no-repeat,
    linear-gradient(30deg, transparent 47%, rgba(85, 126, 201, 0.1) 48%, rgba(85, 126, 201, 0.1) 52%, transparent 53%) 4% 82% / 140px 120px no-repeat,
    linear-gradient(30deg, transparent 47%, rgba(85, 126, 201, 0.1) 48%, rgba(85, 126, 201, 0.1) 52%, transparent 53%) 86% 84% / 140px 120px no-repeat;
  mask-image: radial-gradient(
    ellipse 70% 65% at 50% 50%,
    transparent 55%,
    black 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 70% 65% at 50% 50%,
    transparent 55%,
    black 100%
  );
  opacity: 0.75;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(8, 10, 14, 0.82);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: 100%;
  min-height: var(--topbar-height);
  padding: 0 clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  direction: ltr;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  grid-column: 1;
  justify-self: left;
}

.brand-wordmark {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
}

.main-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  grid-column: 2;
  justify-self: center;
}

.topbar-actions {
  position: relative;
  grid-column: 3;
  justify-self: right;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s;
}

.lang-btn:hover {
  color: var(--muted);
}

.cart-btn {
  position: relative;
  border: 0;
  background: transparent;
  padding: 4px;
  color: var(--text);
  cursor: pointer;
  line-height: 0;
  transition: color 0.2s;
}

.cart-btn:hover {
  color: var(--accent);
}

.cart-count {
  position: absolute;
  top: -2px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 11, 0.98);
  border-inline-start: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.45);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.cart-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-empty-msg {
  margin: auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.cart-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-item-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(200, 86, 86, 0.12);
  color: #f0b4b4;
  font-size: 0.68rem;
  font-weight: 700;
}

.cart-item-main h3 {
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.cart-item-price {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}

.cart-qty-btn:hover {
  background: rgba(200, 86, 86, 0.2);
}

.cart-remove {
  border: 0;
  background: transparent;
  color: #e07a7a;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cart-footer {
  padding: 18px 20px 24px;
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 9, 0.95);
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.cart-total-row strong {
  font-size: 1.35rem;
}

.cart-checkout-btn {
  width: 100%;
}

.nexus-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 200;
  max-width: min(420px, calc(100% - 32px));
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(16px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.nexus-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nexus-toast--success {
  border-color: rgba(120, 200, 120, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(120, 200, 120, 0.08);
}

.nexus-toast--error {
  border-color: rgba(200, 86, 86, 0.45);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(200, 86, 86, 0.1);
}

.nexus-toast--info {
  border-color: rgba(200, 86, 86, 0.28);
}

.nexus-dialog {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
}

.nexus-dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.nexus-dialog-panel {
  position: relative;
  width: min(400px, 100%);
  padding: 28px 24px 22px;
  border-radius: 20px;
  background: rgba(12, 12, 13, 0.98);
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.nexus-dialog-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.nexus-dialog-icon--success {
  color: #8fd48f;
  border-color: rgba(120, 200, 120, 0.35);
  background: rgba(120, 200, 120, 0.1);
}

.nexus-dialog-icon--error {
  color: #e07a7a;
  border-color: rgba(200, 86, 86, 0.4);
  background: rgba(200, 86, 86, 0.12);
}

.nexus-dialog-icon--warning {
  color: #e0a060;
  border-color: rgba(224, 160, 96, 0.35);
  background: rgba(224, 160, 96, 0.1);
}

.nexus-dialog-icon--info {
  color: #f0b4b4;
  border-color: rgba(200, 86, 86, 0.35);
  background: rgba(200, 86, 86, 0.1);
}

.nexus-dialog-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.nexus-dialog-title.hidden {
  display: none;
}

.nexus-dialog-message {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.nexus-dialog-input {
  width: 100%;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.nexus-dialog-input:focus {
  border-color: rgba(200, 86, 86, 0.45);
  box-shadow: 0 0 0 3px rgba(200, 86, 86, 0.1);
}

.nexus-dialog-input.hidden {
  display: none;
}

.nexus-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.nexus-dialog-actions .btn {
  min-width: 110px;
  flex: 1;
}

.nexus-dialog-actions .btn.hidden {
  display: none;
}

.user-menu {
  position: relative;
}

/* دائري مع إطار حلقة — للوقو والأفاتار */
.avatar-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 12px rgba(200, 86, 86, 0.2);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #0a0a0a;
}

.table-avatar-ring {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-inline-end: 8px;
}

.owner-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-avatar-ring {
  width: 24px;
  height: 24px;
}

.hidden {
  display: none !important;
}

.user-menu-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  border-radius: 50%;
  line-height: 0;
}

.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #0a0a0a;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.user-menu-trigger:hover .user-avatar-btn,
.user-menu-trigger.open .user-avatar-btn {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(200, 86, 86, 0.25);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(14, 14, 15, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-dropdown-ring {
  width: 44px;
  height: 44px;
}

.user-dropdown-info strong {
  display: block;
  font-size: 0.95rem;
}

.user-dropdown-info p {
  margin: 3px 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.member-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ddd;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-top: 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(22, 22, 23, 0.95);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.dropdown-btn:hover {
  background: rgba(30, 24, 24, 0.95);
  border-color: rgba(200, 86, 86, 0.25);
}

.dropdown-btn.signout {
  color: #e07a7a;
  border-color: rgba(200, 86, 86, 0.2);
}

.dropdown-btn.signout:hover {
  background: rgba(40, 20, 20, 0.6);
}

.nav-indicator {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  pointer-events: none;
  transition:
    left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03   );
}

.page-wrap {
  position: relative;
  z-index: 3;
  padding: 0 0 70px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.card {
  background: linear-gradient(160deg, rgba(27, 21, 21, 0.78), rgba(16, 16, 17, 0.9));
  border: 1px solid var(--border);
  border-radius: 22px;
}

.hero {
  padding: 44px;
}

.hero-landing {
  min-height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.67rem;
  letter-spacing: 1.2px;
  color: #c8d3e9;
  border: 1px solid rgba(200, 86, 86, 0.24);
  background: rgba(26, 16, 16, 0.75);
  padding: 6px 14px;
  border-radius: 999px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.02;
  font-weight: 800;
}

.hero-title span,
.hero-title em {
  display: block;
}

.hero-title em {
  color: var(--accent);
  font-style: italic;
}

.hero-subtitle {
  margin: 0;
  color: #c5cddd;
  font-size: 1rem;
}

.mini-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 1px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 740px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  border: 0;
  border-radius: 16px;
  font-family: inherit;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  color: #0b1a15;
}

.btn-light {
  background: #f6f8ff;
  color: #090d14;
}

.btn-dark {
  background: rgba(20, 13, 13, 0.95);
  color: #f7eaea;
  border: 1px solid #443031;
}

.btn-soft {
  background: rgba(153, 166, 191, 0.12);
  border: 1px solid var(--border);
  color: var(--text);
}

.page-head {
  padding: 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  margin: 6px 0 0;
  color: var(--muted);
}

input {
  width: 260px;
  max-width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.stat {
  padding: 18px;
}

.stat p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat strong {
  display: block;
  margin: 12px 0 4px;
  font-size: 2rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.table-card {
  padding: 14px;
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(153, 166, 191, 0.12);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
}

td {
  font-size: 0.92rem;
}

.blur {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 6px;
  filter: blur(7px);
  opacity: 0.6;
  transition: filter 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  cursor: copy;
  user-select: none;
  -webkit-user-select: none;
}

@media (hover: hover) {
  .blur:hover {
    filter: blur(0);
    opacity: 1;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    background: rgba(200, 86, 86, 0.12);
  }
}

.blur:focus-visible,
.blur.is-revealed {
  filter: blur(0);
  opacity: 1;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  background: rgba(200, 86, 86, 0.12);
  outline: 2px solid rgba(200, 86, 86, 0.35);
  outline-offset: 2px;
}

.pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(200, 86, 86, 0.14);
  border: 1px solid rgba(200, 86, 86, 0.24);
}

.action-btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 14px;
  padding: 7px 10px;
  font-family: inherit;
  cursor: pointer;
}

.action-btn.white {
  background: #f2f6ff;
  color: #0a0d12;
}

.store-page {
  padding: 40px 0 0;
}

.store-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.store-header-text {
  max-width: 560px;
}

.store-title {
  margin: 14px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
}

.store-desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.store-search {
  position: relative;
  flex-shrink: 0;
  width: min(320px, 100%);
}

.store-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.store-search input {
  width: 100%;
  padding-inline-start: 42px;
  background: rgba(16, 16, 17, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.store-search input:focus {
  border-color: rgba(200, 86, 86, 0.45);
  box-shadow: 0 0 0 3px rgba(200, 86, 86, 0.08);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.store-empty {
  margin: 32px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 13, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 86, 86, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.product-card.is-bundle {
  border-color: rgba(200, 86, 86, 0.28);
}

.product-cover {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 86, 86, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(24, 18, 18, 0.95), rgba(10, 10, 11, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.product-initials {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.18);
}

.product-tag {
  position: absolute;
  inset-inline-start: 14px;
  bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8d8dc;
  font-size: 0.72rem;
  font-weight: 700;
}

.product-badge {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(200, 86, 86, 0.16);
  border: 1px solid rgba(200, 86, 86, 0.35);
  color: #f0b4b4;
  font-size: 0.72rem;
  font-weight: 800;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
  gap: 10px;
}

.product-body h3 {
  font-size: 1.08rem;
  font-weight: 800;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-price strong {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.product-price span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.btn-store {
  background: rgba(255, 255, 255, 0.95);
  color: #090909;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.btn-store:hover {
  background: #fff;
  transform: translateY(-1px);
}

.pill-active {
  color: #5ecf8a;
  background: rgba(94, 207, 138, 0.14);
  border-color: rgba(94, 207, 138, 0.32);
}

.pill-warn {
  color: #e0a060;
  background: rgba(224, 160, 96, 0.12);
  border-color: rgba(224, 160, 96, 0.28);
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
}

.signout-btn {
  color: #e07a7a !important;
}

.scripts-page,
.admin-page {
  padding: 40px 0 0;
}

.scripts-header,
.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.scripts-title,
.admin-title {
  margin: 14px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
}

.scripts-desc,
.admin-desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.scripts-gate {
  padding: 48px 32px;
  text-align: center;
  max-width: 480px;
  margin: 60px auto 0;
}

.scripts-gate h2 {
  margin-bottom: 10px;
}

.scripts-gate .btn {
  margin-top: 20px;
}

.scripts-table-card {
  margin-top: 4px;
}

.admin-badge {
  color: #f0b4b4;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.active {
  color: var(--text);
  background: rgba(200, 86, 86, 0.12);
  border-color: rgba(200, 86, 86, 0.35);
}

.admin-panel.hidden {
  display: none;
}

.license-key {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

body.modal-open {
  overflow: hidden;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.product-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.product-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: rgba(12, 12, 13, 0.98);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.product-modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.product-modal-close:hover {
  background: rgba(200, 86, 86, 0.15);
  border-color: rgba(200, 86, 86, 0.35);
}

.product-modal-cover {
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 86, 86, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(24, 18, 18, 0.95), rgba(10, 10, 11, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-modal-cover.is-bundle {
  background:
    radial-gradient(circle at 80% 20%, rgba(200, 86, 86, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(28, 18, 18, 0.95), rgba(10, 10, 11, 0.98));
}

.product-modal-body {
  padding: 22px 22px 24px;
}

.product-modal-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.product-modal-desc {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.product-modal-details {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.product-modal-section {
  margin-top: 20px;
}

.product-modal-section h4 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
}

.product-modal-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.product-modal-section li {
  position: relative;
  padding-inline-start: 18px;
  color: #d6d6da;
  font-size: 0.9rem;
  line-height: 1.5;
}

.product-modal-section li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.product-modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-modal-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-modal-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.product-modal-meta strong {
  font-size: 0.92rem;
}

.product-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
  .stats-grid,
  .store-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    padding: 12px clamp(16px, 4vw, 24px);
    gap: 12px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: right;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
  }

  .stats-grid,
  .store-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 26px;
  }

  .hero-landing {
    min-height: calc(100vh - 130px);
  }

  .store-header {
    flex-direction: column;
    align-items: stretch;
  }

  .store-search {
    width: 100%;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
