/**
 * shadcn/ui (new-york) Design System — Web Storefront & Customer Portal
 * Semantic OKLCH tokens: the SAME token set as the admin Filament theme
 * (resources/css/filament/admin/theme.css, ported from shadcn-ui/ui v4).
 * Light tokens in :root; dark tokens under .dark and
 * prefers-color-scheme: dark. Font: Geist Sans, self-hosted.
 */

@font-face {
  font-family: 'Geist Sans';
  src: url('/fonts/geist/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root,
.light,
:root.light {
  color-scheme: light;
  --background: oklch(1 0 0);
  --foreground: oklch(0% 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0% 0 0);
  --primary: oklch(0% 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --radius: 0.625rem;

  /* Semantic compatibility tokens */
  --paper: var(--background);
  --green: oklch(0.51 0.135 163.225);
  --green-soft: color-mix(in oklab, var(--green) 10%, var(--card));
  --success: var(--green);
  --warning: oklch(0.666 0.176 58.318);
  --warning-soft: color-mix(in oklab, var(--warning) 12%, var(--card));
  --red: var(--destructive);
  --red-soft: color-mix(in oklab, var(--destructive) 8%, var(--card));
  --blue: oklch(0.588 0.158 241.966);
  --sans: 'Geist Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dark,
:root.dark {
  color-scheme: dark;
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  --green: oklch(0.696 0.17 162.48);
  --warning: oklch(0.769 0.184 70.08);
  --blue: oklch(0.685 0.169 237.323);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    color-scheme: dark;
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --card-foreground: oklch(0.985 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.556 0 0);
    --green: oklch(0.696 0.17 162.48);
    --warning: oklch(0.769 0.184 70.08);
    --blue: oklch(0.685 0.169 237.323);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

img {
  max-width: 100%;
}

[x-cloak] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in oklab, var(--primary) 22%, var(--card));
  color: var(--foreground);
}

h1, h2, h3, p {
  margin: 0;
}

svg {
  flex-shrink: 0;
}

/* Layout Containers */
.site-shell, .container {
  width: min(1340px, 100% - 2.5rem);
  margin-inline: auto;
}

.site-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted-foreground);
}

.site-money {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

.site-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 4px;
}

/* Utility Helpers used by Shared Blade Components & Portal */
.font-semibold {
  font-weight: 600;
}

.w-full {
  width: 100%;
}

.inline-flex {
  display: inline-flex;
}

/* Pure Shadcn Control Sizing (Default h-9 Scale) */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.site-btn:hover {
  background: color-mix(in oklab, var(--primary) 90%, transparent);
}

.site-btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.site-btn-secondary:hover {
  background: var(--muted);
  color: var(--foreground);
}

.site-btn-small {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

.site-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.site-link:hover {
  text-decoration: underline;
}

.site-btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border: 1px solid transparent;
}

.site-btn-ghost:hover {
  background: var(--secondary);
  color: var(--foreground);
}

/* Site Brand Component */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
}

.site-brand:hover {
  opacity: 0.9;
}

.site-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.site-brand-name span {
  color: var(--muted-foreground);
  font-weight: 500;
}

.site-brand small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.01em;
}

/* Storefront Header Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--background) 95%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 3.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--foreground);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-wallet {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid color-mix(in oklab, var(--green) 28%, transparent);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.site-mobile-menu {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.375rem;
  border-radius: var(--radius);
  color: var(--foreground);
}

.site-mobile-nav {
  padding: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
}

.site-mobile-nav a {
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

[dir="rtl"] .site-mobile-nav a {
  text-align: right;
}

.site-mobile-nav a:hover {
  background: var(--muted);
  border-color: var(--foreground);
}

/* Storefront Hero Section (Restored Balanced Sizing) */
.store-hero {
  padding: 3.25rem 0 2.25rem;
}

.store-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 44rem;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
}

.store-hero h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.5rem 0 0.85rem;
  color: var(--foreground);
}

.store-hero h1 em {
  font-style: normal;
  color: var(--muted-foreground);
}

.store-hero-copy {
  font-size: 0.96875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 32rem;
}

/* Catalog & Product Grid */
.store-catalog {
  padding: 1.25rem 0 3.5rem;
}

.store-tools {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.store-search {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.store-search > svg {
  position: absolute;
  left: 0.75rem;
  top: 0.65rem;
  color: var(--muted-foreground);
}

.store-search input {
  width: 100%;
  padding-left: 2.25rem;
  padding-right: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 2.25rem;
  font-size: 0.875rem;
  color: var(--foreground);
}

.store-search input:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.store-stock-filter {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color 0.15s ease;
}

.store-stock-filter:hover {
  color: var(--foreground);
}

.store-stock-filter input {
  accent-color: var(--primary);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.store-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 2.25rem;
  color: var(--foreground);
  font-size: 0.75rem;
  padding: 0 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.store-select:hover {
  border-color: color-mix(in oklab, var(--foreground) 20%, var(--border));
}

.store-select:focus-visible,
.store-select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.store-card {
  display: flex;
  flex-direction: column;
  padding: 1.125rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-card:hover {
  border-color: color-mix(in oklab, var(--foreground) 20%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.dark .store-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark .store-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.store-card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 8.5rem;
  background: color-mix(in oklab, var(--muted) 60%, var(--card));
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-radius: 0.625rem;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.store-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
}

.store-card-art .store-monogram {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: color-mix(in oklab, var(--foreground) 18%, transparent);
  user-select: none;
}

.store-card-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.store-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--green);
  font-weight: 600;
}

.store-availability.is-empty {
  color: var(--destructive);
}

.store-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: var(--foreground);
}

.store-card-description {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.25rem;
}

.store-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .store-card-bottom {
    flex-wrap: wrap !important;
    gap: 0.625rem !important;
  }
  .store-card-bottom .store-card-price {
    width: 100% !important;
  }
  .store-card-bottom > div:last-child,
  .store-card-bottom .store-card-actions {
    width: 100% !important;
    display: flex !important;
  }
  .store-card-bottom .site-btn {
    width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
  }
}

.store-card-price strong {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--mono);
}

.store-card-price del {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  display: block;
}

.store-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
}

.store-empty h3 {
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Footer Section */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--background);
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.site-footer-links a:hover {
  color: var(--foreground);
}

/* Modals & Dialogs (Pure Shadcn Dialog Standard) */
.bot-modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.2);
  padding: 1.5rem;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.store-dialog-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.store-dialog-close:hover {
  background: var(--muted);
  color: var(--foreground);
}

.store-alert {
  padding: 0.625rem 0.875rem;
  background: var(--warning-soft);
  color: var(--warning);
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, var(--warning) 30%, transparent);
  font-size: 0.75rem;
  margin-top: 0.75rem;
}

/* Customer Portal & Account Pages */
.account-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--muted-foreground) 25%, transparent) transparent;
}

.portal-card {
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  margin-bottom: 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-card:hover {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.07),
    0 10px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.dark .portal-card {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark .portal-card:hover {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 1px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .portal-card {
    padding: 1.25rem !important;
  }
  .portal-card > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 360px) {
  .portal-card {
    padding: 1rem !important;
  }
  .portal-card > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.portal-table th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 50%, var(--card));
}

.portal-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-size: 0.84375rem;
  vertical-align: middle;
}

.portal-table tr:last-child td {
  border-bottom: none;
}

.portal-table tr:hover td,
.dark .portal-table tr:hover td {
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: color-mix(in oklab, var(--muted) 60%, var(--card));
  margin-bottom: 1rem;
  color: var(--muted-foreground);
  font-size: 1.75rem;
}

/* Customer Auth Pages */
.auth-page,
.auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.auth-copyright {
  text-align: center;
  margin-top: auto;
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--foreground);
  margin: 0 0 0.375rem 0;
  line-height: 1.2;
}

.auth-sub {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.45;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.auth-security-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: -0.25rem 0 1rem 0;
  line-height: 1.4;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  padding: 2rem;
  max-width: 24.5rem;
  width: 100%;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06);
}

.dark .auth-card {
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.4),
    0 8px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--secondary);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  height: 2.25rem;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.auth-password-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.auth-password-wrap input {
  padding-right: 3.5rem !important;
  width: 100% !important;
}

.auth-password-toggle {
  position: absolute !important;
  right: 0.75rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--muted-foreground) !important;
  cursor: pointer !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: var(--radius) !important;
  transition: color 0.15s ease, background 0.15s ease !important;
  line-height: 1 !important;
  z-index: 2 !important;
}

.auth-password-toggle:hover {
  color: var(--foreground) !important;
  background: var(--muted) !important;
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--primary) !important;
  outline-offset: 2px !important;
}

.alert-error, .alert-success, .alert-info {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-error {
  color: var(--destructive);
  background: color-mix(in oklab, var(--destructive) 10%, var(--card));
  border: 1px solid color-mix(in oklab, var(--destructive) 25%, transparent);
}

.alert-success {
  color: var(--green);
  background: color-mix(in oklab, var(--green) 10%, var(--card));
  border: 1px solid color-mix(in oklab, var(--green) 25%, transparent);
}

.alert-info {
  color: var(--blue);
  background: color-mix(in oklab, var(--blue) 10%, var(--card));
  border: 1px solid color-mix(in oklab, var(--blue) 25%, transparent);
}

.badge {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
  letter-spacing: 0.01em;
}

.badge-success {
  color: var(--green);
  background: color-mix(in oklab, var(--green) 10%, var(--card));
  border-color: color-mix(in oklab, var(--green) 22%, transparent);
}

.badge-warning {
  color: var(--warning);
  background: color-mix(in oklab, var(--warning) 10%, var(--card));
  border-color: color-mix(in oklab, var(--warning) 22%, transparent);
}

.badge-danger {
  color: var(--destructive);
  background: color-mix(in oklab, var(--destructive) 10%, var(--card));
  border-color: color-mix(in oklab, var(--destructive) 22%, transparent);
}

.badge-info {
  color: var(--blue);
  background: color-mix(in oklab, var(--blue) 10%, var(--card));
  border-color: color-mix(in oklab, var(--blue) 25%, transparent);
}

.badge-purple {
  color: oklch(0.65 0.22 300);
  background: color-mix(in oklab, oklch(0.65 0.22 300) 10%, var(--card));
  border-color: color-mix(in oklab, oklch(0.65 0.22 300) 25%, transparent);
}

@media (max-width: 1200px) {
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  .site-desktop-only {
    display: none !important;
  }
  .site-header-inner {
    gap: 0.75rem;
  }
  .site-mobile-menu {
    display: inline-flex;
  }
  .store-hero-content {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .site-btn {
    white-space: normal;
    text-align: center;
    height: auto;
    min-height: 2.25rem;
    padding: 0.45rem 0.85rem;
  }
}

@media (max-width: 520px) {
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .store-card {
    padding: 0.85rem;
  }
  .store-card h3 {
    font-size: 0.875rem;
  }
  .store-card-price strong {
    font-size: 1.05rem;
  }
}

/* Portal modal overlay: display must come from the stylesheet (not inline
   style) so Alpine x-show toggling cannot drop the flex centering. */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px) saturate(0.9);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.site-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}

.site-btn-topup {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: calc(var(--radius) * 0.7);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.site-btn-topup:hover {
  opacity: 0.85;
}

.store-toast {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  z-index: 120;
  pointer-events: none;
  background: var(--foreground);
  color: var(--background);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.25);
  animation: toastPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastPop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

[dir="rtl"] .store-toast {
  right: auto;
  left: 1.5rem;
}


@media (max-width: 640px) {
  .store-toast {
    bottom: auto;
    top: 1rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: calc(100vw - 2rem);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
}

/* ==========================================================================
   PRODUCT DETAIL PAGE
   ========================================================================== */
.product-detail-shell {
  padding: 2.5rem 0 4rem;
}

.product-qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 700;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.product-qty-btn:hover:not(:disabled) {
  background: var(--muted);
}

.product-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   USER PROFILE DROPDOWN MENU (Top Header)
   ========================================================================== */
.user-menu-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  font-family: inherit;
  padding: 0;
}

.site-user-btn:hover {
  background: var(--muted);
  border-color: var(--foreground);
}

.user-avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: color-mix(in oklab, var(--foreground) 92%, transparent);
  color: var(--background);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--background);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 18rem;
  max-width: 90vw;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  box-shadow: 0 20px 50px -8px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

[dir="rtl"] .user-menu-dropdown {
  right: auto;
  left: 0;
}

.user-menu-header {
  padding: 0.75rem;
  border-radius: calc(var(--radius) * 0.8);
  background: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.user-menu-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--mono);
}

.user-menu-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.user-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
  border-radius: calc(var(--radius) * 0.7);
  text-decoration: none;
  transition: all 0.12s ease;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-sizing: border-box;
}

[dir="rtl"] .user-menu-item {
  text-align: right;
}

.user-menu-item:hover {
  background: color-mix(in oklab, var(--muted) 80%, transparent);
  color: var(--foreground);
}

.user-menu-item-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.user-menu-item svg {
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.user-menu-item:hover svg {
  color: var(--foreground);
}

.user-menu-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: color-mix(in oklab, var(--green) 12%, var(--card));
  color: var(--green);
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.user-menu-logout {
  color: var(--destructive);
}

.user-menu-logout:hover {
  background: color-mix(in oklab, var(--destructive) 10%, transparent);
  color: var(--destructive);
}

.user-menu-logout svg {
  color: var(--destructive);
}


/* ==========================================================================
   MINIMAL CARD-LESS PRODUCT DETAIL PAGE (Border-free modern layout)
   ========================================================================== */
.product-minimal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1.5rem 0 3.5rem;
}

@media (min-width: 860px) {
  .product-minimal-layout {
    grid-template-columns: 360px 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.product-visual-stage {
  aspect-ratio: 1 / 1;
  border-radius: 1.5rem;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-title-large {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--foreground);
  margin: 0.35rem 0 0.85rem 0;
  line-height: 1.15;
}

.product-pricing-strip {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.product-price-display {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--foreground);
  font-family: var(--mono);
}

.site-money-del {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
  margin-inline-start: 0.5rem;
}

.badge-stock-available {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--green) 12%, var(--card));
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-stock-low {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--warning) 12%, var(--card));
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid color-mix(in oklab, var(--warning) 25%, transparent);
}

.badge-stock-empty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--destructive) 12%, var(--card));
  color: var(--destructive);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid color-mix(in oklab, var(--destructive) 25%, transparent);
}

.site-status-dot-low {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  display: inline-block;
  margin-right: 4px;
}

.site-status-dot-empty {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--destructive);
}

.product-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.75rem 0;
}

.product-out-of-stock-banner {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--destructive) 6%, var(--card));
  border: 1px dashed color-mix(in oklab, var(--destructive) 25%, var(--card));
  margin: 1.25rem 0 1.75rem 0;
}

.product-description-content {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.product-prose {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--foreground);
}


/* ==========================================================================
   PORTAL SUBNAV & KPI METRIC CARDS (Vercel Guidelines Implementation)
   ========================================================================== */

.portal-subnav-bar {
  background: color-mix(in oklab, var(--background) 95%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 3.75rem;
  z-index: 35;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portal-subnav-inner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.portal-subnav-inner::-webkit-scrollbar { display: none; }

.portal-subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}
.portal-subnav-item:hover {
  color: var(--foreground);
  background: color-mix(in oklab, var(--foreground) 6%, transparent);
}
.portal-subnav-item.is-active {
  color: var(--foreground);
  background: color-mix(in oklab, var(--foreground) 10%, transparent);
  border-color: color-mix(in oklab, var(--foreground) 16%, transparent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.portal-subnav-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--foreground) 12%, transparent);
  color: var(--foreground);
}

/* KPI Executive Metrics Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  border-color: color-mix(in oklab, var(--foreground) 20%, var(--border));
}
.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.kpi-card-label {
  font-size: 0.71875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.kpi-card-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: color-mix(in oklab, var(--muted) 75%, transparent);
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
}
.kpi-card-value {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--foreground);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}
.kpi-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.kpi-card-footer a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}
.kpi-card-footer a:hover {
  text-decoration: underline;
}

/* Tabular nums utility */
.tabular-nums {
  font-variant-numeric: tabular-nums !important;
}

/* Site Theme Toggle Button (Light / Dark) */
.site-theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.site-theme-toggle-btn:hover {
  background: var(--muted);
  color: var(--foreground);
  border-color: var(--foreground);
}
.site-theme-toggle-btn .theme-icon-sun,
.site-theme-toggle-btn .theme-icon-moon {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.site-theme-toggle-btn .theme-icon-sun.is-active {
  display: inline-flex !important;
}
.site-theme-toggle-btn .theme-icon-moon.is-active {
  display: inline-flex !important;
}
.dark .site-theme-toggle-btn .theme-icon-sun {
  display: inline-flex !important;
}
.dark .site-theme-toggle-btn .theme-icon-moon {
  display: none !important;
}
.light .site-theme-toggle-btn .theme-icon-moon,
:root:not(.dark) .site-theme-toggle-btn .theme-icon-moon {
  display: inline-flex !important;
}
.light .site-theme-toggle-btn .theme-icon-sun,
:root:not(.dark) .site-theme-toggle-btn .theme-icon-sun {
  display: none !important;
}
.theme-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

/* Payment Method Badges — WCAG AA High Contrast */
.badge-binance {
  color: #92400e !important;
  background: rgba(240, 185, 11, 0.16) !important;
  border: 1px solid rgba(240, 185, 11, 0.35) !important;
}
.dark .badge-binance {
  color: #fbbf24 !important;
  background: rgba(240, 185, 11, 0.22) !important;
  border: 1px solid rgba(240, 185, 11, 0.4) !important;
}

.badge-cryptobot {
  color: #0369a1 !important;
  background: rgba(34, 158, 217, 0.16) !important;
  border: 1px solid rgba(34, 158, 217, 0.35) !important;
}
.dark .badge-cryptobot {
  color: #38bdf8 !important;
  background: rgba(34, 158, 217, 0.22) !important;
  border: 1px solid rgba(34, 158, 217, 0.4) !important;
}

/* Portal Pagination (Shadcn Zinc, Zero Tailwind Dependency) */
.site-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  width: 100%;
}

.site-pagination-info {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.site-pagination-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.site-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.625rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.site-pagination-btn:hover {
  background: var(--muted);
  border-color: color-mix(in oklab, var(--foreground) 25%, var(--border));
}

.site-pagination-btn.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  font-weight: 600;
}

.site-pagination-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.site-pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 2rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  user-select: none;
}

@media (max-width: 640px) {
  .site-pagination {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


/* [STOREFRONT] Emoji RULE: wherever a custom emoji is used on the store side it must
   show the FALLBACK (preview image/glyph) by default and, once loaded, AUTO-PLAY.
   No hover-triggered behavior on the store side. Live chip component (<tg-icon>)
   is admin-side only — see admin.js / admin.css. */

