/* ────────────────────────────────────────────────────────
   1. CSS DESIGN TOKENS
   ──────────────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --color-primary: #1A56DB;
  --color-primary-dark: #1140A8;
  --color-primary-light: #EBF2FF;
  --color-primary-glow: rgba(26, 86, 219, 0.25);
  --color-accent: #2DD4BF;
  --color-accent-dark: #0D9488;
  --color-accent-glow: rgba(45, 212, 191, 0.3);

  /* Backgrounds */
  --color-bg: #f7fafc;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F8FF;
  --color-surface-glass: rgba(255, 255, 255, 0.72);
  --color-surface-dark: rgba(10, 22, 40, 0.85);

  /* Darks */
  --color-dark: #0A1628;
  --color-dark-mid: #162340;
  --color-dark-light: #1E3154;
  --color-dark-faint: rgba(10, 22, 40, 0.06);

  /* Text */
  --color-text-primary: #0A1628;
  --color-text-secondary: #4A6080;
  --color-text-muted: #8FA3BF;
  --color-text-inverse: #FFFFFF;

  /* Borders */
  --color-border: #DDE5F0;
  --color-border-light: #EEF2F8;
  --color-border-glass: rgba(255, 255, 255, 0.4);

  /* Semantic */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-danger: #EF4444;
  --color-danger-light: #FEE2E2;

  /* Gradient System */
  --gradient-primary: linear-gradient(135deg, #1A56DB 0%, #2563EB 50%, #2DD4BF 100%);
  --gradient-hero: linear-gradient(160deg, #0A1628 0%, #162340 35%, #1A3870 70%, #1A56DB 100%);
  --gradient-brand: linear-gradient(145deg, #0A1628 0%, #162340 30%, #1E3A6E 60%, #1A56DB 100%);
  --gradient-card: linear-gradient(135deg, #0A1628 0%, #1A3058 60%, #1A56DB 100%);
  --gradient-accent: linear-gradient(135deg, #2DD4BF 0%, #0D9488 100%);
  --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --gradient-teal-fade: linear-gradient(135deg, rgba(45, 212, 191, 0.15) 0%, rgba(26, 86, 219, 0.05) 100%);

  /* Typography */
  --font-en: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ar: 'Cairo', 'Tajawal', sans-serif;
  --font-family: var(--font-en);
  --font-xs: 0.6875rem;
  /* 11px */
  --font-sm: 0.8125rem;
  /* 13px */
  --font-base: 0.9375rem;
  /* 15px */
  --font-md: 1rem;
  /* 16px */
  --font-lg: 1.125rem;
  /* 18px */
  --font-xl: 1.25rem;
  /* 20px */
  --font-2xl: 1.5rem;
  /* 24px */
  --font-3xl: 1.875rem;
  /* 30px */
  --font-4xl: 2.25rem;
  /* 36px */
  --font-5xl: 3rem;
  /* 48px */

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radii */
  --r-xs: 0.25rem;
  --r-sm: 0.5rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;
  --r-2xl: 2.5rem;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(10, 22, 40, .06);
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, .08), 0 1px 3px rgba(10, 22, 40, .06);
  --shadow-md: 0 4px 16px rgba(10, 22, 40, .10), 0 2px 6px rgba(10, 22, 40, .06);
  --shadow-lg: 0 12px 36px rgba(10, 22, 40, .14), 0 4px 12px rgba(10, 22, 40, .08);
  --shadow-xl: 0 24px 60px rgba(10, 22, 40, .20), 0 8px 20px rgba(10, 22, 40, .10);
  --shadow-2xl: 0 40px 80px rgba(10, 22, 40, .28), 0 16px 32px rgba(10, 22, 40, .14);
  --shadow-blue: 0 8px 32px rgba(26, 86, 219, .40), 0 2px 8px rgba(26, 86, 219, .20);
  --shadow-teal: 0 8px 32px rgba(45, 212, 191, .35);
  --shadow-card: 0 4px 24px rgba(10, 22, 40, .09), 0 1px 4px rgba(10, 22, 40, .05);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -1px 0 rgba(0, 0, 0, .08);

  /* Transitions */
  --t-fast: 0.3s ease;
  --t-base: 0.3s ease;
  --t-slow: 0.3s ease;
  --t-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-spring: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Z-layers */
  --z-base: 1;
  --z-above: 10;
  --z-dd: 100;
  --z-nav: 200;
  --z-topnav: 250;
  --z-modal: 400;
  --z-toast: 500;

  /* Layout */
  --mobile-max: 430px;
  --top-nav-h: 4rem;
  --bottom-nav-h: 4.75rem;
  --page-pad: 1.25rem;
  --content-max: 1200px;


  --font-en: 'Plus Jakarta Sans', sans-serif;
  --font-ar: 'Cairo', sans-serif;

  /* الدمج الذكي: هذا الترتيب يجعل المتصفح يختار الخط المناسب */
  --font-family: 'Plus Jakarta Sans', 'Cairo', sans-serif;

  /* بقية الإعدادات كما هي */
  --font-xs: 0.6875rem;
  --font-sm: 0.8125rem;
  --font-base: 0.9375rem;
}



/* Arabic overrides */
[dir="rtl"] {
  --font-family: var(--font-ar);
}


/* ────────────────────────────────────────────────────────
   2. RESET & BASE
   ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
}

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

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: var(--font-family);
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 900px) {
  body {
    min-height: 100vh;
  }
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Hidden utility */
.hidden {
  display: none !important;
}


/* ────────────────────────────────────────────────────────
   3. STATUS BAR (mobile-only)
   ──────────────────────────────────────────────────────── */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem var(--sp-6);
  background: var(--color-dark);
  color: white;
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: .04em;
  height: 2rem;
  position: sticky;
  top: 0;
  z-index: calc(var(--z-topnav) + 10);
}

.status-icons {
  display: flex;
  gap: .45rem;
  align-items: center;
}

.status-icons i {
  font-size: .65rem;
}

@media (min-width: 900px) {
  .status-bar {
    display: none;
  }
}


/* ────────────────────────────────────────────────────────
   4. BRAND LOGO
   ──────────────────────────────────────────────────────── */
.brand-x {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-accent);
  letter-spacing: -0.05em;
  line-height: 1;
}

.brand-deal {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1;
}


/* ────────────────────────────────────────────────────────
   5. GOOGLE FONTS IMPORT
   ──────────────────────────────────────────────────────── */
/* Loaded via HTML <link> – Plus Jakarta Sans + Cairo */


/* ────────────────────────────────────────────────────────
   6. AUTH SHELL & VIEWS
   ──────────────────────────────────────────────────────── */
.auth-shell {
  min-height: calc(100dvh - 2rem);
  background: var(--color-bg);
}

@media (min-width: 900px) {
  .auth-shell {
    min-height: 100dvh;
  }
}

.auth-view {
  display: none;
  min-height: calc(100dvh - 2rem);
}

.auth-view.active {
  display: block;
}

@media (min-width: 900px) {
  .auth-view {
    min-height: 100dvh;
  }
}

/* Auth Layout */
.auth-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 2rem);
}

@media (min-width: 900px) {
  .auth-layout {
    flex-direction: row;
    min-height: 100dvh;
  }
}

/* Brand Panel (left on desktop) */
.auth-brand-panel {
  display: none;
  background: var(--gradient-brand);
  padding: var(--sp-12) var(--sp-10);
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-8);
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .12) 0%, transparent 70%);
  top: -10rem;
  right: -10rem;
  pointer-events: none;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  width: 20rem;
  height: 20rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(26, 86, 219, .2) 0%, transparent 70%);
  bottom: -6rem;
  left: -6rem;
  pointer-events: none;
}

/* Floating particles */
.auth-brand-panel .particle {
  position: absolute;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .06);
  animation: float-particle 6s ease-in-out infinite;
}

.auth-brand-panel .particle:nth-child(1) {
  width: 4rem;
  height: 4rem;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.auth-brand-panel .particle:nth-child(2) {
  width: 2rem;
  height: 2rem;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.auth-brand-panel .particle:nth-child(3) {
  width: 3rem;
  height: 3rem;
  bottom: 25%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float-particle {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-20px) rotate(15deg);
    opacity: 0.8;
  }
}

@media (min-width: 900px) {
  .auth-brand-panel {
    display: flex;
    width: 45%;
    flex-shrink: 0;
  }
}

.auth-brand-logo {
  display: flex;
  align-items: baseline;
  gap: .15rem;
  margin-bottom: var(--sp-2);
}

.auth-brand-headline {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.auth-brand-headline .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand-sub {
  font-size: var(--font-base);
  color: rgba(255, 255, 255, .62);
  line-height: 1.8;
  max-width: 26rem;
}

.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-5);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-xl);
}

.auth-brand-features li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .85);
}

.auth-brand-features li i {
  color: var(--color-accent);
  font-size: var(--font-sm);
  flex-shrink: 0;
}

/* Form Panel (right on desktop) */
.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  padding: var(--sp-6) var(--page-pad);
  position: relative;
}

@media (min-width: 900px) {
  .auth-form-panel {
    padding: var(--sp-12) var(--sp-12);
    justify-content: center;
    overflow-y: auto;
  }
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  transition: all var(--t-base);
  margin-bottom: var(--sp-4);
  align-self: flex-start;
}

.auth-back-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

[dir="rtl"] .auth-back-link i {
  transform: scaleX(-1);
}

.auth-mobile-brand {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.auth-mobile-logo {
  display: inline-flex;
  align-items: baseline;
  gap: .15rem;
  margin-bottom: var(--sp-1);
}

.auth-mobile-tagline {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

@media (min-width: 900px) {
  .auth-mobile-brand {
    display: none;
  }
}

.auth-form-card {
  background: var(--color-surface);
  border-radius: var(--r-2xl);
  padding: var(--sp-8) var(--sp-6);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
  max-width: 26rem;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .auth-form-card {
    max-width: 28rem;
    padding: var(--sp-10) var(--sp-8);
  }
}

.auth-form-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--sp-1);
  letter-spacing: -0.03em;
}

.auth-form-sub {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}


/* ────────────────────────────────────────────────────────
   7. FORM COMPONENTS
   ──────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--sp-4);
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-2);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 1rem;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  pointer-events: none;
  transition: color var(--t-base);
  z-index: 1;
}

[dir="rtl"] .input-icon {
  left: auto;
  right: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: var(--font-base);
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-surface-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  outline: none;
  transition: all var(--t-base);
  -webkit-appearance: none;
}

[dir="rtl"] .form-input {
  padding: 0.875rem 2.75rem 0.875rem 1rem;
}

.form-input::placeholder {
  color: var(--color-text-muted);
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.form-input:focus+.input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--color-primary);
}

.form-input.error {
  border-color: var(--color-danger);
  background: var(--color-danger-light);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}

/* No-icon input */
.form-input.no-icon {
  padding-inline-start: 1rem;
}

.input-toggle-pass {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1rem;
  color: var(--color-text-muted);
  padding: var(--sp-1);
  border-radius: var(--r-sm);
  transition: color var(--t-base);
}

[dir="rtl"] .input-toggle-pass {
  right: auto;
  left: 1rem;
}

.input-toggle-pass:hover {
  color: var(--color-primary);
}

.field-error {
  display: block;
  font-size: var(--font-xs);
  color: var(--color-danger);
  font-weight: 600;
  margin-top: var(--sp-1);
  padding-inline-start: 0.25rem;
}

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.link-btn {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-primary);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  transition: all var(--t-base);
  cursor: pointer;
}

.link-btn:hover {
  background: var(--color-primary-light);
}

.link-btn-primary {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-base);
}

.link-btn-primary:hover {
  color: var(--color-primary-dark);
}

/* Auth submit button */
.auth-submit-btn {
  width: 100%;
  padding: 1rem var(--sp-6);
  font-size: var(--font-base);
  font-weight: 700;
  color: white;
  background: var(--gradient-primary);
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-5);
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--t-base);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(26, 86, 219, .5);
}

.auth-submit-btn:hover::before {
  background: rgba(255, 255, 255, .06);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn .btn-text {
  position: relative;
  z-index: 1;
}

.auth-submit-btn .btn-spinner {
  display: none;
  position: relative;
  z-index: 1;
}

.auth-submit-btn.loading .btn-text {
  display: none;
}

.auth-submit-btn.loading .btn-spinner {
  display: inline;
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-switch-text {
  text-align: center;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

.demo-hint {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
  margin-top: var(--sp-4);
}

.demo-hint i {
  color: var(--color-primary);
  font-size: var(--font-xs);
  flex-shrink: 0;
}

/* Card number / payment input icon */
.card-brand-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1rem;
  color: var(--color-text-muted);
  font-size: var(--font-xl);
  pointer-events: none;
  z-index: 1;
}

[dir="rtl"] .card-brand-icon {
  right: auto;
  left: 1rem;
}

/* Payment form section header */
.pay-section-title {
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}


/* ────────────────────────────────────────────────────────
   8. TOP NAV
   ──────────────────────────────────────────────────────── */
.top-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-topnav);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--top-nav-h);
  transition: box-shadow var(--t-base);
}

.top-nav--scrolled {
  box-shadow: 0 2px 20px rgba(10, 22, 40, .08);
}

@media (min-width: 900px) {
  .top-nav {
    display: flex;
    align-items: center;
  }
}

.top-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  width: 100%;
  height: 100%;
}

.top-nav__logo {
  display: flex;
  align-items: baseline;
  gap: .1rem;
  flex-shrink: 0;
  margin-inline-end: var(--sp-4);
}

.top-nav__logo .brand-x {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.top-nav__logo .brand-deal {
  color: var(--color-dark);
  font-size: 1.5rem;
}

.top-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  flex: 1;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all var(--t-base);
  position: relative;
}

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

.top-nav-link.active {
  color: var(--color-primary);
  font-weight: 700;
}

.top-nav__right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-inline-start: auto;
}

[dir="rtl"] .top-nav__right {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.top-nav__notif-btn,
.top-nav__qr-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--font-sm);
  font-weight: 600;
  transition: all var(--t-base);
}

.top-nav__notif-btn {
  color: var(--color-text-secondary);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  width: 2.4rem;
  height: 2.4rem;
  justify-content: center;
  border-radius: var(--r-full);
}

.top-nav__notif-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.top-nav__notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: var(--r-full);
  border: 2px solid white;
}

/* ── Notification dropdown ── */
.top-nav__notif-wrap {
  position: relative;
}

.top-nav__notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(10, 22, 40, .18);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .18s ease;
}

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

.top-nav__notif-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-nav__notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  font-weight: 700;
  font-size: var(--font-sm);
  flex-shrink: 0;
}

.top-nav__notif-clear {
  background: none;
  border: none;
  font-size: .72rem;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
}

.top-nav__notif-clear:hover {
  text-decoration: underline;
}

.top-nav__notif-list {
  overflow-y: auto;
  flex: 1;
}

.top-nav__notif-empty {
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

.top-nav__notif-empty i {
  font-size: 1.5rem;
  margin-bottom: var(--sp-2);
  opacity: .4;
}

.top-nav__notif-item {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: background .15s ease;
  border-bottom: 1px solid var(--color-border-light);
}

.top-nav__notif-item:hover {
  background: var(--color-surface-alt);
}

.top-nav__notif-item.unread {
  background: var(--color-primary-light);
}

.top-nav__notif-dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 6px;
  opacity: 0;
}

.top-nav__notif-item.unread .top-nav__notif-dot-indicator {
  opacity: 1;
}

.top-nav__notif-body {
  flex: 1;
  min-width: 0;
}

.top-nav__notif-item-title {
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.top-nav__notif-item-body {
  font-size: .72rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.top-nav__notif-item-time {
  font-size: .65rem;
  color: var(--color-text-muted);
  opacity: .7;
}

@media (max-width: 480px) {
  .top-nav__notif-dropdown {
    position: fixed;
    top: var(--top-nav-h);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 60vh;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    box-shadow: 0 12px 40px rgba(10, 22, 40, .25);
  }
}

.top-nav__qr-btn {
  color: white;
  background: var(--gradient-primary);
  border: none;
  box-shadow: var(--shadow-blue);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
}

.top-nav__qr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 86, 219, .5);
}

/* ────────────────────────────────────────────────────────
   9. BOTTOM NAV
   ──────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  z-index: var(--z-nav);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 24px rgba(10, 22, 40, .08);
}

.bottom-nav__inner {
  display: flex;
  align-items: stretch;
  height: var(--bottom-nav-h);
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--t-base);
  position: relative;
  padding: 0 var(--sp-2);
  min-width: 0;
}

.nav-item:hover {
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item.active .nav-item__icon-wrapper {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(26, 86, 219, 0.35);
}

.nav-item.active .nav-item__label {
  color: var(--color-primary);
  font-weight: 700;
}

.nav-item__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  width: 100%;
}

.nav-item__icon-wrapper {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  transition: all var(--t-bounce);
  position: relative;
}

.nav-item__icon-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--r-lg);
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--t-base);
  z-index: -1;
}

.nav-item.active .nav-item__icon-wrapper::before {
  opacity: 1;
}

.nav-item__label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-text-muted);
  transition: all var(--t-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* QR center button */
.nav-item--qr {
  flex-shrink: 0;
  padding: 0;
  width: 4.5rem;
  position: relative;
  overflow: visible;
  background: none;
  border: none;
}

.nav-item--qr::before {
  display: none;
}

.nav-qr-bubble {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  transition: all var(--t-bounce);
  animation: qr-pulse 2.5s ease-in-out infinite;
}

.nav-qr-bubble::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--r-full);
  border: 2px solid var(--color-primary);
  opacity: 0.3;
  animation: qr-ring 2.5s ease-in-out infinite;
}

.nav-item--qr:hover .nav-qr-bubble,
.nav-item--qr:active .nav-qr-bubble {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 12px 32px rgba(26, 86, 219, .55);
}

@keyframes qr-pulse {

  0%,
  100% {
    box-shadow: 0 8px 32px rgba(26, 86, 219, .4);
  }

  50% {
    box-shadow: 0 8px 40px rgba(26, 86, 219, .65), 0 0 0 8px rgba(26, 86, 219, .1);
  }
}

@keyframes qr-ring {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.12);
  }
}

/* ────────────────────────────────────────────────────────
   10. MAIN SHELL
   ──────────────────────────────────────────────────────── */
.main-shell {
  min-height: 100dvh;
  background: var(--color-bg);
  position: relative;
}

@media (min-width: 900px) {
  .main-shell {
    background: var(--color-bg);
    min-height: 100vh;
  }
}

/* View container */
main {
  flex: 1;
}

@media (min-width: 900px) {
  main {
    margin-top: var(--top-nav-h);
  }
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.bottom-spacer {
  height: calc(var(--bottom-nav-h) + var(--sp-4));
}

@media (min-width: 900px) {
  .bottom-spacer {
    height: var(--sp-12);
  }
}

/* Page padding */
.page-pad {
  padding: 0 var(--page-pad);
}

/* App footer */
.app-footer {
  display: none;
  text-align: center;
  padding: var(--sp-6);
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-light);
}

@media (min-width: 900px) {
  .app-footer {
    display: block;
  }
}


/* ────────────────────────────────────────────────────────
   11. HOME HERO
   ──────────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: var(--sp-5) var(--page-pad) var(--sp-8);
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

.home-hero__bg::before {
  content: '';
  position: absolute;
  width: 20rem;
  height: 20rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .15) 0%, transparent 70%);
  top: -6rem;
  right: -6rem;
}

.home-hero__bg::after {
  content: '';
  position: absolute;
  width: 14rem;
  height: 14rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(26, 86, 219, .25) 0%, transparent 70%);
  bottom: -4rem;
  left: -4rem;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.home-hero__left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.home-hero__avatar {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  border: 2.5px solid rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-md);
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  transition: transform var(--t-bounce);
}

.home-hero__avatar:hover {
  transform: scale(1.08);
}

.home-hero__greeting {
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, .65);
  font-weight: 500;
  letter-spacing: .04em;
}

.home-hero__name {
  font-size: var(--font-xl);
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.hero-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--font-xs);
  font-weight: 700;
  transition: all var(--t-bounce);
  letter-spacing: .03em;
}

.hero-btn--qr {
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .25);
  color: white;
}

.hero-btn--qr:hover {
  background: rgba(255, 255, 255, .25);
  transform: scale(1.04);
}

.hero-btn--notif {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  justify-content: center;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  color: white;
  border-radius: var(--r-full);
  position: relative;
}

.hero-btn--notif:hover {
  background: rgba(255, 255, 255, .22);
  transform: scale(1.06);
}

.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: var(--r-full);
  border: 1.5px solid rgba(255, 255, 255, .3);
  animation: notif-pulse 2s ease-in-out infinite;
}

@keyframes notif-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.25);
    opacity: 0.8;
  }
}


/* ────────────────────────────────────────────────────────
   12. SUBSCRIPTION NOTICE BANNER
   ──────────────────────────────────────────────────────── */
.sub-expiry-notice {
  padding: var(--sp-3) var(--page-pad);
  font-size: var(--font-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  border-radius: 0;
  animation: slide-down 0.3s ease;
}

.sub-expiry-notice:empty {
  display: none;
}

.notice--ok {
  display: none;
}

.notice--warn {
  background: var(--color-warning-light);
  color: #92400E;
  border-bottom: 1px solid rgba(245, 158, 11, .25);
}

.notice--danger {
  background: var(--color-danger-light);
  color: #991B1B;
  border-bottom: 1px solid rgba(239, 68, 68, .25);
}

.notice--warn i,
.notice--danger i {
  font-size: var(--font-base);
  flex-shrink: 0;
}

@keyframes slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* ────────────────────────────────────────────────────────
   13. DASHBOARD GRID & SECTIONS
   ──────────────────────────────────────────────────────── */
.dash-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding: var(--sp-6) 0 0;
}

.dash-full {
  width: 100%;
}

.carousel-header,
.dash-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-pad);
  margin-bottom: var(--sp-4);
}

.dash-section__title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.dash-section__link {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  background: var(--color-primary-light);
  transition: all var(--t-base);
}

.dash-section__link:hover {
  background: var(--color-primary);
  color: white;
}

.dash-section__badge {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
}

.dash-section {
  padding: 0 var(--page-pad);
}


/* ────────────────────────────────────────────────────────
   14. STAT CARDS
   ──────────────────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: 0 var(--page-pad);
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-light);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  width: 5rem;
  height: 5rem;
  border-radius: var(--r-full);
  background: var(--card-accent, rgba(26, 86, 219, .06));
  top: -1.5rem;
  right: -1.5rem;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card--saved {
  --card-accent: rgba(26, 86, 219, .08);
}

.stat-card--month {
  --card-accent: rgba(45, 212, 191, .08);
}

.stat-card--referrals {
  --card-accent: rgba(245, 158, 11, .08);
}

.stat-card--earned {
  --card-accent: rgba(16, 185, 129, .08);
}

.stat-card__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--r-md);
  background: var(--icon-bg, var(--color-primary-light));
  color: var(--icon-color, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  flex-shrink: 0;
}

.stat-card--saved .stat-card__icon {
  --icon-bg: #EBF2FF;
  --icon-color: var(--color-primary);
}

.stat-card--month .stat-card__icon {
  --icon-bg: #D1FAF5;
  --icon-color: var(--color-accent-dark);
}

.stat-card--referrals .stat-card__icon {
  --icon-bg: #FEF3C7;
  --icon-color: #D97706;
}

.stat-card--earned .stat-card__icon {
  --icon-bg: #D1FAE5;
  --icon-color: var(--color-success);
}

.stat-card__info {
  flex: 1;
  min-width: 0;
}

.stat-card__value {
  display: block;
  font-size: var(--font-base);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card__label {
  display: block;
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: .03em;
}


/* ────────────────────────────────────────────────────────
   15. REFERRAL SLIDE-TO-ACTION (mobile)
   ──────────────────────────────────────────────────────── */
.ref-slider {
  --ref-track-h: 3.25rem;
  --ref-thumb: 2.75rem;
  --ref-travel: 0px;
  --ref-progress: 0;
  position: relative;
  margin: 0 var(--page-pad);
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* Desktop behavior: act as a normal link, hide slider track */
@media (min-width: 901px) {
  .ref-slider {
    cursor: pointer;
    transition: transform var(--t-bounce), box-shadow var(--t-bounce);
  }
  .ref-slider:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  .ref-slider__track-wrap {
    display: none;
  }
}

.ref-slider__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0A1628 0%, #1A3870 40%, #1A56DB 75%, #2DD4BF 100%);
  z-index: 0;
}

.ref-slider__bg::before {
  content: '';
  position: absolute;
  width: 12rem;
  height: 12rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(255, 255, 255, .08) 0%, transparent 70%);
  top: -3rem;
  inset-inline-end: -3rem;
}

.ref-slider__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.ref-slider__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.ref-slider__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: var(--font-xl);
  flex-shrink: 0;
  animation: ref-icon-sparkle 3s ease-in-out infinite;
}

@keyframes ref-icon-sparkle {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(45, 212, 191, .15);
  }
}

.ref-slider__text {
  flex: 1;
  min-width: 0;
}

.ref-slider__title {
  display: block;
  font-size: var(--font-lg);
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.ref-slider__sub {
  display: block;
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, .7);
  margin-top: 2px;
  line-height: 1.35;
}

/* Glassmorphism track */
.ref-slider__track-wrap {
  position: relative;
  z-index: 1;
}

.ref-slider__track {
  position: relative;
  height: var(--ref-track-h);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

/* Progress fill — width driven by --ref-progress via JS */
.ref-slider__fill {
  position: absolute;
  inset-block: 2px;
  inset-inline-start: 2px;
  width: calc(var(--ref-thumb) + var(--ref-progress) * var(--ref-travel));
  border-radius: var(--r-full);
  background: linear-gradient(90deg,
      rgba(45, 212, 191, 0.28) 0%,
      rgba(45, 212, 191, 0.52) 100%);
  box-shadow: inset 0 0 12px rgba(45, 212, 191, 0.25);
  pointer-events: none;
  will-change: width;
}

[dir="rtl"] .ref-slider__fill {
  inset-inline-start: auto;
  inset-inline-end: 2px;
  background: linear-gradient(270deg,
      rgba(45, 212, 191, 0.28) 0%,
      rgba(45, 212, 191, 0.52) 100%);
}

.ref-slider__hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: calc(var(--ref-thumb) + var(--sp-3));
  font-size: var(--font-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: calc(1 - var(--ref-progress) * 1.8);
  transition: opacity 0.15s ease;
}

/* Draggable thumb */
.ref-slider__thumb {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 2px;
  width: var(--ref-thumb);
  height: var(--ref-thumb);
  margin-block-start: calc(var(--ref-thumb) / -2);
  padding: 0;
  border: none;
  border-radius: var(--r-full);
  background: linear-gradient(145deg, #ffffff 0%, #e8eef8 100%);
  color: #1A3870;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.22),
    0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateX(calc(var(--ref-progress) * var(--ref-travel)));
  will-change: transform;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

[dir="rtl"] .ref-slider__thumb {
  transform: translateX(calc(var(--ref-progress) * var(--ref-travel) * -1));
}

.ref-slider__thumb:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.9);
  outline-offset: 2px;
}

.ref-slider__thumb--dragging {
  cursor: grabbing;
  animation: none;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Idle pulse hint */
.ref-slider:not(.ref-slider--success) .ref-slider__thumb:not(.ref-slider__thumb--dragging) {
  animation: ref-thumb-pulse 2.4s ease-in-out infinite;
}

@keyframes ref-thumb-pulse {

  0%,
  100% {
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.22),
      0 0 0 0 rgba(45, 212, 191, 0.45);
  }

  50% {
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.26),
      0 0 0 10px rgba(45, 212, 191, 0);
  }
}

.ref-slider__thumb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ref-slider__thumb-icon--check {
  position: absolute;
  opacity: 0;
  transform: scale(0.4) rotate(-40deg);
}

[dir="rtl"] .ref-slider__thumb-icon--arrow i {
  transform: scaleX(-1);
}

/* Success state */
.ref-slider--success .ref-slider__thumb {
  animation: none;
  background: linear-gradient(145deg, #2DD4BF 0%, #14B8A6 100%);
  color: white;
}

.ref-slider--success .ref-slider__thumb-icon--arrow {
  opacity: 0;
  transform: scale(0.4);
}

.ref-slider--success .ref-slider__thumb-icon--check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.ref-slider--success .ref-slider__fill {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.55), rgba(45, 212, 191, 0.75));
}

.ref-slider--success .ref-slider__hint {
  opacity: 0;
}

/* Loading ring before redirect */
.ref-slider__spinner {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  pointer-events: none;
}

.ref-slider--success .ref-slider__spinner {
  opacity: 1;
  animation: ref-spinner 0.65s linear infinite;
}

@keyframes ref-spinner {
  to {
    transform: rotate(360deg);
  }
}

.ref-slider--dragging {
  pointer-events: none;
}

.ref-slider--dragging .ref-slider__thumb {
  pointer-events: auto;
}


/* ────────────────────────────────────────────────────────
   16. OFFERS SCROLL CAROUSEL
   ──────────────────────────────────────────────────────── */
.offers-scroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 var(--page-pad) var(--sp-1);
  cursor: grab;
}

.offers-scroll:active {
  cursor: grabbing;
}

.offers-scroll::-webkit-scrollbar {
  display: none;
}

.offer-card {
  flex-shrink: 0;
  width: 10rem;
  height: 13rem;
  /* taller for better aspect ratio on mobile */
  border-radius: var(--r-xl);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform var(--t-bounce), box-shadow var(--t-base);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.offer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(10, 22, 40, 0) 20%,
      rgba(10, 22, 40, .5) 60%,
      rgba(10, 22, 40, .92) 100%);
  z-index: 1;
}

.offer-card:hover {
  transform: scale(1.03) translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.offer-card:active {
  transform: scale(0.97);
}

.offer-card__badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  background: var(--gradient-warm);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-full);
  z-index: 2;
  letter-spacing: .05em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

[dir="rtl"] .offer-card__badge {
  right: auto;
  left: var(--sp-2);
}

.offer-card__name {
  position: absolute;
  bottom: var(--sp-3);
  left: var(--sp-3);
  right: var(--sp-3);
  font-size: .8rem;
  font-weight: 800;
  color: white;
  z-index: 2;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.offer-card__cat {
  position: absolute;
  bottom: calc(var(--sp-3) + 1.1rem);
  left: var(--sp-3);
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .7);
  z-index: 2;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}


/* ────────────────────────────────────────────────────────
   17. SLIDER DOTS
   ──────────────────────────────────────────────────────── */
.slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  padding: 0 var(--page-pad);
  min-height: 1rem;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--color-border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-dot--active {
  background: var(--gradient-primary);
  width: 1.5rem;
  box-shadow: 0 2px 8px rgba(26, 86, 219, .4);
}


/* ────────────────────────────────────────────────────────
   18. MEMBERSHIP CARD
   ──────────────────────────────────────────────────────── */
.memb-card {
  margin: 0 var(--page-pad);
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-blue);
}

.memb-card::before {
  content: '';
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .12) 0%, transparent 70%);
  top: -5rem;
  right: -4rem;
  pointer-events: none;
}

.memb-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.memb-card__top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  position: relative;
  z-index: 1;
}

.memb-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFD700;
  font-size: var(--font-xl);
  flex-shrink: 0;
}

.memb-card__plan {
  display: block;
  font-size: var(--font-sm);
  font-weight: 800;
  color: white;
  letter-spacing: 0.01em;
}

.memb-card__days {
  display: block;
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, .65);
  margin-top: 2px;
}

.memb-card__bar {
  height: 6px;
  background: rgba(255, 255, 255, .15);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-3);
}

.memb-card__bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--r-full);
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.memb-card__bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  background: rgba(255, 255, 255, .5);
  border-radius: var(--r-full);
  filter: blur(2px);
}

.memb-card__status {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  position: relative;
  z-index: 1;
}


/* ────────────────────────────────────────────────────────
   19. CATEGORIES CAROUSEL
   ──────────────────────────────────────────────────────── */
.cat-scroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 var(--page-pad) var(--sp-1);
  cursor: grab;
}

.cat-scroll:active {
  cursor: grabbing;
}

.cat-scroll::-webkit-scrollbar {
  display: none;
}

.cat-card {
  flex-shrink: 0;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: var(--r-xl);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-surface-alt);
  /* fallback if image fails */
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform var(--t-bounce), box-shadow var(--t-base);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: block;
  /* ensure block so background-image applies */
}

.cat-card:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cat-card:active {
  transform: scale(0.95);
}

.cat-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, .25) 0%, rgba(10, 22, 40, .72) 100%);
  z-index: 1;
  transition: background var(--t-base);
}

.cat-card:hover .cat-card__overlay {
  background: linear-gradient(180deg, rgba(26, 86, 219, .35) 0%, rgba(10, 22, 40, .75) 100%);
}

.cat-card__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: white;
}

.cat-card__content i {
  font-size: 1.1rem;
}

.cat-card__content span {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 4px;
}

/* Offers page category bar shows the real vector illustration (not emoji) */
.offers-cat-bar .cat-card__overlay {
  background: linear-gradient(180deg, rgba(10, 22, 40, .28) 0%, rgba(10, 22, 40, .58) 100%);
}
.offers-cat-bar .cat-card__content {
  text-shadow: 0 1px 4px rgba(10, 22, 40, .65);
}
.offers-cat-bar .cat-card__content span {
  font-size: 0.6rem;
}

/* "All" category chip – tinted gradient since it has no illustration */
.cat-card--all {
  background: linear-gradient(135deg, #1a56db 0%, #0a1628 100%);
}


/* ────────────────────────────────────────────────────────
   20. POPULAR ITEMS & ACTIVITY LIST
   ──────────────────────────────────────────────────────── */
.pop-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pop-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
  transition: all var(--t-base);
  cursor: pointer;
}

.pop-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border);
}

[dir="rtl"] .pop-item:hover {
  transform: translateX(-3px);
}

.pop-item__img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.pop-item__info {
  flex: 1;
}

.pop-item__name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-dark);
}

.pop-item__meta {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.pop-item__disc {
  color: var(--color-success);
  font-weight: 700;
}

.pop-item__rank {
  font-size: var(--font-xs);
  font-weight: 800;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-full);
}

/* Activity list */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
  transition: all var(--t-base);
}

.activity-item:hover {
  box-shadow: var(--shadow-sm);
}

.activity-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  flex-shrink: 0;
}

.activity-icon--green {
  background: var(--color-success-light);
  color: var(--color-success);
}

.activity-icon--blue {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.activity-icon--purple {
  background: #F3E8FF;
  color: #7C3AED;
}

.activity-icon--orange {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.activity-icon--gold {
  background: #FBF1D6;
  color: #B8860B;
}

.activity-thumb {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-date {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.activity-amount {
  font-size: var(--font-sm);
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.activity-amount--saved {
  color: var(--color-success);
}

.activity-amount--earned {
  color: var(--color-primary);
}


/* ────────────────────────────────────────────────────────
   21. PAGE HEADER
   ──────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--page-pad) var(--sp-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
}

@media (min-width: 900px) {
  .page-header {
    position: static;
    background: transparent;
    border-bottom: none;
    padding: var(--sp-8) var(--sp-8) var(--sp-6);
  }
}

.page-title {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.03em;
}

.page-subtitle {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

.icon-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--r-full);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  transition: all var(--t-base);
}

.icon-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}


/* ────────────────────────────────────────────────────────
   22. OFFERS PAGE (SEARCH, CATEGORIES, PREMIUM CARDS)
   ──────────────────────────────────────────────────────── */
.offers-search-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--color-bg);
  padding: var(--sp-3) var(--page-pad) var(--sp-2);
}

@media (min-width: 900px) {
  .offers-search-wrap {
    top: var(--top-nav-h);
  }
}

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--font-base);
  outline: none;
}

.offers-cat-bar {
  display: flex;
  flex-direction: row;
  /* الأساسي */
  overflow-x: auto;
  padding: var(--sp-2) var(--page-pad) var(--sp-4);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* في حالة العربي، نجبر الفليكس يبدأ من اليمين */
[dir="rtl"] .offers-cat-bar {
  flex-direction: row;
  /* يفضل row عشان الفليكس يعكس ترتيب العناصر تلقائياً */
  justify-content: flex-start;
  /* بيبدأ من اليمين تلقائياً في الـ RTL */
}

.cat-scroll {
  display: flex;
  flex-direction: row;
  gap: var(--sp-3);
  /* align to the start of the row in both languages (left in LTR, right in RTL) */
  margin-inline-start: 0;
  margin-inline-end: 0;
}

[dir="rtl"] .cat-scroll {
  margin-inline-start: auto;
  /* في العربي بيخلي العناصر تبدأ من اليمين */
  margin-inline-end: 0;
}

/* تظبيط شكل الكارد في العربي والإنجليزي */
.cat-card {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--r-xl);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

.offers-cat-bar::-webkit-scrollbar {
  display: none;
}

.offers-cat-pill {
  white-space: nowrap;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-secondary);
  transition: all var(--t-base);
  text-decoration: none;
}

.offers-cat-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.offers-cat-pill.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.admin-section {
  padding: var(--sp-6) 0;
  margin-bottom: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.admin-section__inner {
  padding: 0 var(--page-pad);
}

.admin-section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.admin-section__title {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
}

.admin-section__hook {
  width: 100%;
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-top: var(--sp-1);
  font-weight: 600;
  line-height: 1.5;
}

.admin-section__white-box {
  background: var(--color-surface);
  border-radius: var(--r-2xl);
  padding: var(--sp-4) 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transform: translateZ(0);
}

.admin-section .row-swiper {
  padding: 0 var(--page-pad) var(--sp-2);
}

.admin-section .swiper-slide {
  width: 170px !important;
  height: auto !important;
  align-self: stretch;
}

.admin-section--restaurants {
  background-color: #FAF3E0;
}

.admin-section--cafes {
  background-color: #F5EEE6;
}

.admin-section--fashion {
  background-color: #F8EEF2;
}

.admin-section--supermarkets {
  background-color: #EAF5EC;
}

.admin-section--electronics {
  background-color: #EAF2F8;
}

.admin-section--services {
  background-color: #F4EEF8;
}

.admin-section--health {
  background-color: #E6F7F1;
}

.admin-section--sports {
  background-color: #EEF6E6;
}

.admin-section--travel {
  background-color: #E8F0FA;
}

.admin-section--education {
  background-color: #FBF4E6;
}

/* ── Vendor Details page ───────────────────────────── */
.vd-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: var(--sp-3) var(--page-pad) 0;
  padding: .5rem .9rem;
  border: none;
  border-radius: var(--r-full);
  background: var(--color-surface);
  color: var(--color-dark);
  font-weight: 700;
  font-size: var(--font-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.vd-hero {
  margin: var(--sp-4) var(--page-pad) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.vd-hero__img {
  width: 100%;
  height: 12rem;
  border-radius: var(--r-2xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
}

.vd-hero__info {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.vd-hero__name {
  font-size: var(--font-2xl);
  font-weight: 900;
  color: var(--color-dark);
  margin: 0;
}

.vd-hero__cat {
  color: var(--color-text-secondary);
  font-weight: 600;
  margin: 0;
}

.vd-hero__disc {
  align-self: flex-start;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 800;
  padding: .25rem .7rem;
  border-radius: var(--r-full);
  font-size: var(--font-sm);
}

#vdOffers {
  padding: var(--sp-4) var(--page-pad) var(--sp-8);
}

.top-vendors-swiper {
  padding: 0 var(--page-pad) var(--sp-2) !important;
}

.top-vendors-swiper .swiper-slide {
  width: auto !important;
}

.top-vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: var(--sp-3);
  padding: 0 var(--page-pad);
}

@media (min-width: 600px) {
  .top-vendors-grid {
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  }
}

.top-vendor-item {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--r-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: transform var(--t-bounce), box-shadow var(--t-base);
  background-color: var(--color-surface);
}

@media (min-width: 600px) {
  .top-vendor-item {
    width: 6.5rem;
    height: 6.5rem;
  }
}

.top-vendor-item:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-md);
}

.premium-offer-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: all var(--t-bounce);
  height: 100%;
}

.premium-offer-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-glow);
}

.premium-offer-card:active {
  transform: translateY(0) scale(0.98);
}

.premium-offer__img {
  height: 130px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.premium-offer__badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  background: var(--gradient-warm);
  color: white;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.05em;
}

[dir="rtl"] .premium-offer__badge {
  right: auto;
  left: var(--sp-2);
}

/* Vendor/offer card meta row: offers count + rating */
.premium-offer__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}
.premium-offer__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.premium-offer__meta i {
  color: var(--color-primary);
  font-size: 0.7rem;
}

/* ── Favorite heart on offer cards ── */
.premium-offer__fav {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform .2s ease;
  backdrop-filter: blur(4px);
}

[dir="rtl"] .premium-offer__fav {
  left: auto;
  right: var(--sp-2);
}

.premium-offer__fav i {
  font-size: .82rem;
  color: var(--color-text-muted);
  transition: color .2s ease, transform .2s ease;
}

.premium-offer__fav.is-favorited i {
  color: var(--color-danger);
}

.premium-offer__fav:hover {
  transform: scale(1.1);
}

@keyframes fav-pop {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.35);
  }

  60% {
    transform: scale(.9);
  }

  100% {
    transform: scale(1);
  }
}

.premium-offer__fav--pop i {
  animation: fav-pop .4s ease;
}

/* ── Nav bar fav button ── */
.top-nav__fav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--r-full);
  color: var(--color-text-secondary);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--t-base);
}

.top-nav__fav-btn:hover {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.top-nav__fav-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  font-size: .6rem;
  font-weight: 800;
  text-align: center;
  background: var(--color-danger);
  color: #fff;
  border-radius: var(--r-full);
  padding: 0 4px;
  border: 2px solid var(--color-surface);
}

/* ── Fav page ── */
.fav-page {
  padding: var(--sp-6) var(--page-pad);
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: calc(var(--top-nav-h) + var(--sp-6));
}

.fav-page__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.fav-page__header h1 {
  flex: 1;
  font-size: var(--font-2xl);
  font-weight: 800;
}

.fav-page__header i.fa-heart {
  color: var(--color-danger);
  font-size: 1.5rem;
}

.fav-page__empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--color-text-muted);
}

.fav-page__empty i {
  font-size: 2rem;
  margin-bottom: var(--sp-3);
  opacity: .4;
}

.fav-page__empty p {
  font-size: var(--font-sm);
}

.fav-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
}

/* ── Offer-detail info & branches ── */
.od-info-card {
  padding: var(--sp-4);
}

.od-info-name {
  font-size: var(--font-lg);
  font-weight: 800;
  margin-bottom: var(--sp-1);
}

.od-info-name-ar {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}

.od-info-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-2);
}

.od-info-row i {
  width: 16px;
  text-align: center;
  color: var(--color-primary);
}

.od-info-row a {
  color: var(--color-primary);
  text-decoration: none;
  word-break: break-all;
}

.od-branches-list {
  padding: var(--sp-3);
}

.branch-item {
  padding: var(--sp-3);
  margin-bottom: var(--sp-2);
  background: var(--color-surface-alt);
  border-radius: var(--r-md);
  border: 1px solid var(--color-border-light);
}

.branch-item h4 {
  font-size: var(--font-sm);
  font-weight: 800;
  margin-bottom: var(--sp-1);
}

.branch-item p {
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.branch-item p i {
  width: 14px;
  text-align: center;
  margin-inline-end: var(--sp-1);
  color: var(--color-primary);
}

.premium-offer__body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.premium-offer__cat {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.premium-offer__name {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.3;
  margin-bottom: var(--sp-2);
}

.premium-offer__price {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-surface-alt);
  padding: var(--sp-2);
  border-radius: var(--r-md);
}

.price-old {
  text-decoration: line-through;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.price-new {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 900;
}

.category-hook-hero {
  position: relative;
  height: 15rem;
  background-size: cover;
  background-position: center;
  margin: var(--sp-2) var(--page-pad) var(--sp-6);
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.category-hook-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.4) 0%, rgba(10, 22, 40, 0.85) 100%);
}

.category-hook-content {
  position: relative;
  z-index: 2;
  color: white;
  padding: var(--sp-4);
  max-width: 90%;
}

.hook-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--gradient-primary);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto var(--sp-3);
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.5);
}

.hook-title {
  font-size: var(--font-2xl);
  font-weight: 900;
  margin-bottom: var(--sp-1);
}

.hook-desc {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  line-height: 1.6;
}

/* Selected-category heading on offers.html (replaces the old hero image) */
.category-title-head {
  padding: var(--sp-3) var(--page-pad) 0;
  text-align: start;
}
.category-title-head__name {
  font-size: var(--font-2xl);
  font-weight: 900;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.cat-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-3);
  padding: 0 var(--page-pad);
}

@media (min-width: 600px) {
  .cat-detail-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ────────────────────────────────────────────────────────
   23. OFFER DETAIL (COUPON UI)
   ──────────────────────────────────────────────────────── */
.od-redesign {
  background: var(--color-bg);
  min-height: 100vh;
  padding-bottom: var(--sp-10);
}

.od-hero {
  position: relative;
  height: 40vh;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-alt);
}

.od-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.od-hero__actions {
  position: absolute;
  top: var(--sp-4);
  left: var(--page-pad);
  right: var(--page-pad);
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.od-action-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--t-base);
}

.od-action-btn:hover {
  background: var(--color-primary);
}

.od-ribbon {
  position: absolute;
  bottom: -1.5rem;
  right: var(--page-pad);
  background: var(--color-primary);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  padding: var(--sp-2) 0 var(--sp-3);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  box-shadow: var(--shadow-md);
  z-index: 10;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
}

[dir="ltr"] .od-ribbon {
  right: auto;
  left: var(--page-pad);
}

.od-ribbon__val {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
}

.od-ribbon__pct {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.od-meta {
  background: var(--color-surface);
  padding: var(--sp-8) var(--page-pad) var(--sp-4);
  margin-bottom: var(--sp-2);
}

.od-vendor-name {
  font-size: var(--font-sm);
  color: var(--color-primary);
  font-weight: 800;
  margin-bottom: var(--sp-1);
}

.od-offer-title {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
  line-height: 1.4;
  margin-bottom: var(--sp-4);
}

.od-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--sp-3);
  font-size: var(--font-sm);
}

.od-rating,
.od-expiry {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.od-rating__score {
  color: var(--color-dark);
  font-weight: 800;
}

.od-rating i {
  color: #F59E0B;
}

.od-expiry i {
  color: var(--color-text-muted);
}

.od-tabs-container {
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.od-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.od-tabs::-webkit-scrollbar {
  display: none;
}

.od-tab {
  flex-shrink: 0;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--t-base);
}

.od-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.od-content {
  padding: var(--sp-4) var(--page-pad);
}

.od-tab-pane {
  display: none;
  animation: fade-in 0.3s ease;
}

.od-tab-pane.active {
  display: block;
}

.od-coupons-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.coupon-card {
  display: flex;
  background: var(--color-surface);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base);
}

.coupon-card--special {
  border-style: solid;
  border-color: var(--color-accent);
}

.coupon-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-glow);
}

.coupon-action-side {
  width: 4.5rem;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.coupon-action-side::before,
.coupon-action-side::after {
  content: '';
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--color-bg);
  border-radius: var(--r-full);
  left: -0.625rem;
}

[dir="ltr"] .coupon-action-side::before,
[dir="ltr"] .coupon-action-side::after {
  left: auto;
  right: -0.625rem;
}

.coupon-action-side::before {
  top: -0.625rem;
}

.coupon-action-side::after {
  bottom: -0.625rem;
}

.coupon-add-btn {
  width: 2.25rem;
  height: 2.25rem;
  background: white;
  color: var(--color-primary);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.coupon-content {
  flex: 1;
  padding: var(--sp-4);
}

.coupon-title {
  font-size: var(--font-md);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--sp-1);
}

.coupon-desc {
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}

.coupon-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.coupon-expiry {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

.coupon-prices {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.c-price-old {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 600;
}

.c-price-new {
  font-size: var(--font-lg);
  color: var(--color-primary);
  font-weight: 900;
}

.od-terms-list {
  padding-inline-end: var(--sp-4);
}

.od-terms-list li {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-2);
  list-style: disc;
}

/* ────────────────────────────────────────────────────────
   24. QR MODAL
   ──────────────────────────────────────────────────────── */

/* ── QR Scan Result (Cashier Simulation) ─────────────────── */
.qr-scan-result {
  animation: fade-in .3s ease;
}

.scan-result-header {
  text-align: center;
  margin-bottom: var(--sp-5);
}

.scan-result-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--r-full);
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  animation: success-bounce .6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.scan-result-title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

/* Customer card */
.scan-result-customer {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--color-surface-alt);
  border-radius: var(--r-xl);
  margin-bottom: var(--sp-4);
  border: 1px solid var(--color-border-light);
}

.scan-result-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  font-size: var(--font-2xl);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.scan-result-info {
  flex: 1;
  min-width: 0;
}

.scan-result-info h4 {
  font-size: var(--font-md);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--sp-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-result-info p {
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.scan-result-info p i {
  color: var(--color-text-muted);
  width: 14px;
  text-align: center;
  font-size: .7rem;
}

/* Subscription status card */
.scan-result-sub {
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  border: 1px solid;
}

.scan-result-sub--active {
  background: var(--color-success-light);
  border-color: rgba(16, 185, 129, .25);
}

.scan-result-sub--expired {
  background: var(--color-danger-light);
  border-color: rgba(239, 68, 68, .25);
}

.scan-result-sub-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-base);
  font-weight: 800;
  margin-bottom: var(--sp-2);
}

.scan-result-sub--active .scan-result-sub-status {
  color: #065F46;
}

.scan-result-sub--expired .scan-result-sub-status {
  color: #991B1B;
}

.scan-result-sub-status i {
  font-size: var(--font-lg);
}

.scan-result-sub-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--font-sm);
}

.scan-result-sub--active .scan-result-sub-details {
  color: #047857;
}

.scan-result-sub--expired .scan-result-sub-details {
  color: #B91C1C;
}

.scan-result-days strong {
  font-size: var(--font-xl);
  font-weight: 900;
}

.scan-result-expiry {
  opacity: .8;
}

/* Stats row */
.scan-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.scan-result-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  text-align: center;
}

.scan-result-stat-value {
  display: block;
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.scan-result-stat-label {
  display: block;
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Scan action buttons */
.scan-apply-btn {
  background: var(--gradient-primary) !important;
}

.scan-back-btn {
  background: var(--color-surface-alt) !important;
  color: var(--color-dark) !important;
  box-shadow: none !important;
  border: 1px solid var(--color-border) !important;
  margin-top: var(--sp-2) !important;
}

.scan-back-btn:hover {
  background: var(--color-border-light) !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: var(--mobile-max);
  max-height: 90dvh;
  overflow-y: auto;
  padding: var(--sp-6);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: var(--shadow-2xl);
  scrollbar-width: none;
}

.modal::-webkit-scrollbar {
  display: none;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .modal-overlay {
    align-items: center;
    padding: var(--sp-4);
  }

  .modal {
    border-radius: var(--r-2xl);
    max-height: 85dvh;
    width: 30rem;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  }

  .modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-handle {
  width: 2.5rem;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-5);
}

@media (min-width: 900px) {
  .modal-handle {
    display: none;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.modal-subtitle {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}

.modal-title {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.03em;
}

.modal-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-full);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  flex-shrink: 0;
  transition: all var(--t-base);
}

.modal-close-btn:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* QR Display */
.qr-display {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-5);
}

.qr-frame {
  position: relative;
  width: 11rem;
  height: 11rem;
  padding: var(--sp-4);
  background: white;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-border-light);
}

.qr-svg {
  width: 100%;
  height: 100%;
}

/* Real, scannable customer/offer QR (replaces decorative SVG) */
.qr-real {
  position: absolute;
  inset: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-real img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

/* Scan beam animation */
.scan-beam {
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  top: var(--sp-4);
  animation: scan 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  border-radius: var(--r-full);
  box-shadow: 0 0 8px var(--color-accent);
}

@keyframes scan {
  0% {
    top: var(--sp-4);
    opacity: 1;
  }

  45% {
    opacity: 1;
  }

  50% {
    top: calc(100% - var(--sp-4));
    opacity: 1;
  }

  95% {
    opacity: 1;
  }

  100% {
    top: var(--sp-4);
    opacity: 1;
  }
}

/* Corner brackets */
.qr-corner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-color: var(--color-primary);
  border-style: solid;
}

.qr-corner--tl {
  top: var(--sp-2);
  left: var(--sp-2);
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.qr-corner--tr {
  top: var(--sp-2);
  right: var(--sp-2);
  border-width: 3px 3px 0 0;
  border-radius: 0 4px 0 0;
}

.qr-corner--bl {
  bottom: var(--sp-2);
  left: var(--sp-2);
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 4px;
}

.qr-corner--br {
  bottom: var(--sp-2);
  right: var(--sp-2);
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

/* Merchant QR Scanner */
.qr-scanner-section {
  text-align: center;
  padding: var(--sp-2) 0;
  animation: fadeIn .25s ease;
}

.qr-scanner-title {
  font-size: var(--font-lg);
  font-weight: 800;
  margin-bottom: var(--sp-1);
}

.qr-scanner-sub {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

.qr-scanner-host {
  width: 100%;
  height: 15rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--color-dark);
  position: relative;
  margin-bottom: var(--sp-3);
}

.qr-scanner-host video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-scanner-host .qr-scan-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .6);
  font-size: var(--font-sm);
  padding: var(--sp-4);
}

.qr-file-btn {
  margin-bottom: var(--sp-2);
  background: var(--color-surface-alt) !important;
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: none !important;
}

.qr-file-btn:hover {
  box-shadow: var(--shadow-md) !important;
}

.qr-scan-status {
  min-height: 1.25rem;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

.modal-action-btn--ghost {
  background: var(--color-surface-alt) !important;
  color: var(--color-text-secondary) !important;
  box-shadow: none !important;
  border: 1px solid var(--color-border) !important;
}

.modal-action-btn--ghost:hover {
  transform: none;
  box-shadow: var(--shadow-md) !important;
}

/* Decode result view */
.qr-decode-card {
  text-align: center;
  padding: var(--sp-2) 0;
}

.qr-decode-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--r-full);
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
}

.qr-decode-icon--warn {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.qr-decode-merchant {
  font-size: var(--font-lg);
  font-weight: 800;
  margin-bottom: var(--sp-2);
}

.qr-decode-rows {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
  text-align: end;
}

.qr-decode-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-1) 0;
  font-size: var(--font-sm);
}

.qr-decode-row .qr-decode-label {
  color: var(--color-text-muted);
}

.qr-decode-row .qr-decode-value {
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: start;
  word-break: break-all;
}

.qr-decode-status {
  font-size: var(--font-sm);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.qr-decode-status--ok {
  color: var(--color-success);
}

.qr-decode-status--err {
  color: var(--color-danger);
}

/* QR Expired */
.qr-expired-display {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
}

.qr-expired-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--r-full);
  background: var(--color-danger-light);
  color: var(--color-danger);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
}

.qr-expired-title {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--color-danger);
  margin-bottom: var(--sp-2);
}

.qr-expired-sub {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}

/* QR User Info */
.qr-user-info {
  text-align: center;
  margin-bottom: var(--sp-4);
}

.qr-user-name {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.qr-user-id {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

/* Validity row */
.qr-discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-teal-fade);
  border: 1px solid rgba(45, 212, 191, .2);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
}

.qr-discount-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-sm);
  color: var(--color-accent-dark);
  font-weight: 700;
}

.qr-discount-badge i {
  color: var(--color-accent-dark);
}

.qr-validity {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Action buttons */
.modal-action-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  font-size: var(--font-base);
  font-weight: 800;
  color: white;
  background: var(--gradient-primary);
  border-radius: var(--r-xl);
  border: none;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
  letter-spacing: 0.02em;
  text-align: center;
}

.modal-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(26, 86, 219, .5);
}

.modal-action-btn:active {
  transform: translateY(0);
}

.modal-action-btn--danger {
  background: linear-gradient(135deg, var(--color-danger) 0%, #DC2626 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, .4);
}

.modal-action-btn--danger:hover {
  box-shadow: 0 12px 36px rgba(239, 68, 68, .55);
}


/* ────────────────────────────────────────────────────────
   25. PROMO / SUBSCRIBE MODAL
   ──────────────────────────────────────────────────────── */
.promo-overlay {
  align-items: flex-end;
}

@media (min-width: 900px) {
  .promo-overlay {
    align-items: center;
  }
}

.promo-modal {
  background: var(--color-surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: var(--mobile-max);
  max-height: 92dvh;
  overflow-y: auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  text-align: center;
  scrollbar-width: none;
  position: relative;
}

.promo-modal::-webkit-scrollbar {
  display: none;
}

.modal-overlay.open .promo-modal {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .promo-modal {
    border-radius: var(--r-2xl);
    max-width: 28rem;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }

  .modal-overlay.open .promo-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.promo-close-btn {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-full);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  transition: all var(--t-base);
}

[dir="rtl"] .promo-close-btn {
  right: auto;
  left: var(--sp-4);
}

.promo-close-btn:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* Animated crown graphic */
.promo-graphic {
  position: relative;
  width: 6rem;
  height: 6rem;
  margin: 0 auto var(--sp-5);
}

.promo-ring {
  position: absolute;
  border-radius: var(--r-full);
  border: 2px solid var(--color-primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.promo-ring--1 {
  width: 100%;
  height: 100%;
  opacity: 0.12;
  animation: promo-ring 2.5s ease-in-out infinite;
}

.promo-ring--2 {
  width: 78%;
  height: 78%;
  opacity: 0.2;
  animation: promo-ring 2.5s ease-in-out infinite 0.4s;
}

.promo-ring--3 {
  width: 56%;
  height: 56%;
  opacity: 0.3;
  animation: promo-ring 2.5s ease-in-out infinite 0.8s;
}

@keyframes promo-ring {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: inherit;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.promo-crown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.75rem;
  color: #FFD700;
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, .5));
  animation: crown-float 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes crown-float {

  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-5px);
  }
}

.promo-title {
  font-size: var(--font-2xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-2);
}

.promo-subtitle {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}

.promo-benefits {
  text-align: start;
  margin-bottom: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

[dir="rtl"] .promo-benefits {
  text-align: end;
}

.promo-benefits li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--font-sm);
  color: var(--color-text-primary);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border-light);
}

.promo-benefit-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  flex-shrink: 0;
}

/* Price block */
.promo-price-block {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
}

.promo-price-currency {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--color-text-secondary);
}

.promo-price-amount {
  font-size: var(--font-4xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.04em;
}

.promo-price-period {
  font-size: var(--font-base);
  color: var(--color-text-muted);
}

.promo-cancel-note {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-5);
  font-weight: 500;
}

.promo-cta-btn {
  width: 100%;
  padding: 1.1rem;
  font-size: var(--font-base);
  font-weight: 800;
  color: white;
  background: var(--gradient-primary);
  border-radius: var(--r-xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
  letter-spacing: 0.02em;
}

.promo-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(26, 86, 219, .55);
}

.promo-cta-btn:active {
  transform: translateY(0);
}


/* ────────────────────────────────────────────────────────
   26. TOAST NOTIFICATION
   ──────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--color-dark);
  color: white;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  font-size: var(--font-sm);
  font-weight: 600;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  box-shadow: var(--shadow-xl);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity var(--t-base);
  max-width: calc(var(--mobile-max) - 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
}

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

.toast-icon {
  color: var(--color-accent);
  font-size: var(--font-base);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .toast {
    bottom: var(--sp-6);
  }
}


/* ────────────────────────────────────────────────────────
   27. LANGUAGE MODAL
   ──────────────────────────────────────────────────────── */
.lang-modal {
  background: var(--color-surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: var(--mobile-max);
  padding: var(--sp-4) var(--sp-6) var(--sp-8);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: var(--shadow-2xl);
}

.modal-overlay.open .lang-modal {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .lang-modal {
    border-radius: var(--r-2xl);
    max-width: 24rem;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }

  .modal-overlay.open .lang-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.lang-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-4);
  border-radius: var(--r-xl);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: all var(--t-base);
}

.lang-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.lang-option--active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.lang-option__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-option__name {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--color-dark);
}

.lang-option__native {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

.lang-radio {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--r-full);
  border: 2px solid var(--color-border);
  position: relative;
  transition: all var(--t-base);
}

.lang-radio--active {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.lang-radio--active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: white;
}


/* ────────────────────────────────────────────────────────
   28. REFERRAL PAGE
   ──────────────────────────────────────────────────────── */
.referral-hero {
  background: var(--gradient-hero);
  padding: var(--sp-10) var(--page-pad);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.referral-hero::before {
  content: '';
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .12) 0%, transparent 70%);
  top: -8rem;
  right: -8rem;
  pointer-events: none;
}

.referral-hero::after {
  content: '';
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(26, 86, 219, .2) 0%, transparent 70%);
  bottom: -6rem;
  left: -6rem;
  pointer-events: none;
}

.referral-hero__graphic {
  position: relative;
  width: 7rem;
  height: 7rem;
  margin: 0 auto var(--sp-5);
}

.referral-ring {
  position: absolute;
  border-radius: var(--r-full);
  border: 2px solid rgba(255, 255, 255, .2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.referral-ring--outer {
  width: 100%;
  height: 100%;
  animation: referral-ring-pulse 3s ease-in-out infinite;
}

.referral-ring--mid {
  width: 76%;
  height: 76%;
  animation: referral-ring-pulse 3s ease-in-out infinite 0.5s;
}

.referral-ring--inner {
  width: 54%;
  height: 54%;
  animation: referral-ring-pulse 3s ease-in-out infinite 1s;
}

@keyframes referral-ring-pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 0.8;
  }
}

.referral-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-xl);
  box-shadow: var(--shadow-blue);
}

.referral-hero__title {
  font-size: var(--font-3xl);
  font-weight: 900;
  color: white;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-3);
}

.referral-hero__title .highlight {
  color: var(--color-accent);
  display: inline-block;
}

.referral-hero__sub {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .7);
  line-height: 1.7;
  max-width: 26rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Desktop layout */
.referral-desktop-grid {
  padding: var(--sp-6) var(--page-pad);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

@media (min-width: 900px) {
  .referral-desktop-grid {
    flex-direction: row;
    gap: var(--sp-8);
    padding: var(--sp-8);
    align-items: flex-start;
  }

  .referral-col-left {
    flex: 0 0 50%;
  }

  .referral-col-right {
    flex: 0 1 auto;
  }
}

/* Steps */
.referral-steps {
  margin-bottom: var(--sp-5);
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--color-surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--sp-3);
  transition: all var(--t-base);
}

.step-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

[dir="rtl"] .step-item:hover {
  transform: translateX(-2px);
}

.step-number {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  font-size: var(--font-sm);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 86, 219, .3);
}

.step-title {
  font-size: var(--font-base);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 3px;
}

.step-desc {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Referral code box */
.referral-code-box {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-5);
}

.code-label {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.code-display {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--gradient-teal-fade);
  border: 1.5px dashed rgba(45, 212, 191, .4);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
}

.code-text {
  flex: 1;
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  font-family: 'Courier New', monospace;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--r-md);
  font-size: var(--font-xs);
  font-weight: 700;
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
  flex-shrink: 0;
}

.copy-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(26, 86, 219, .5);
}

/* Share section */
.share-section {
  margin-bottom: var(--sp-4);
}

.share-label {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.share-buttons {
  display: flex;
  gap: var(--sp-3);
}

.share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--r-xl);
  font-size: var(--font-xs);
  font-weight: 700;
  transition: all var(--t-bounce);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn--whatsapp {
  border-color: #25D366;
  color: #128C7E;
}

.share-btn--whatsapp:hover {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

.share-btn--sms {
  border-color: #007AFF;
  color: #007AFF;
}

.share-btn--sms:hover {
  background: #007AFF;
  color: white;
  border-color: #007AFF;
}

.share-btn--link {
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.share-btn--link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Earnings card */
.earnings-card {
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-blue);
  margin-bottom: var(--sp-5);
  position: relative;
}

.earnings-card::before {
  content: '';
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .1) 0%, transparent 70%);
  top: -5rem;
  right: -5rem;
  pointer-events: none;
}

.earnings-card__inner {
  padding: var(--sp-6);
  position: relative;
  z-index: 1;
}

.earnings-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.earnings-stat {
  flex: 1;
  text-align: center;
}

.earnings-stat__label {
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, .6);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}

.earnings-stat__value {
  font-size: var(--font-2xl);
  font-weight: 900;
  color: white;
  letter-spacing: -0.03em;
}

.earnings-divider {
  width: 1px;
  height: 3rem;
  background: rgba(255, 255, 255, .15);
}

.earnings-progress {}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, .65);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, .15);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--r-full);
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Referred friends list */
.referred-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.referred-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
  transition: all var(--t-base);
}

.referred-item:hover {
  box-shadow: var(--shadow-sm);
}

.referred-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  font-size: var(--font-base);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.referred-info {
  flex: 1;
  min-width: 0;
}

.referred-name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-dark);
}

.referred-date {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

.referred-status {
  font-size: var(--font-xs);
  font-weight: 800;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.referred-status--paid {
  background: var(--color-success-light);
  color: var(--color-success);
}

.referred-status--pending {
  background: var(--color-warning-light);
  color: #92400E;
}

.referred-empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}


/* ────────────────────────────────────────────────────────
   29. PROFILE PAGE
   ──────────────────────────────────────────────────────── */
.profile-hero {
  background: var(--gradient-hero);
  padding: var(--sp-8) var(--page-pad) var(--sp-16);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.profile-hero::before {
  content: '';
  position: absolute;
  width: 20rem;
  height: 20rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .1) 0%, transparent 70%);
  top: -6rem;
  right: -6rem;
  pointer-events: none;
}

.profile-hero__avatar {
  width: 5rem;
  height: 5rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  border: 3px solid rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-3xl);
  font-weight: 900;
  margin: 0 auto var(--sp-3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  position: relative;
  z-index: 1;
}

.profile-hero__name {
  font-size: var(--font-xl);
  font-weight: 900;
  color: white;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.profile-hero__email {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .65);
  position: relative;
  z-index: 1;
  margin-top: var(--sp-1);
}

/* Subscription badge pill */
.sub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--font-xs);
  font-weight: 800;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  margin-top: var(--sp-3);
  letter-spacing: .04em;
  position: relative;
  z-index: 1;
}

.sub-status-pill--active {
  background: rgba(16, 185, 129, .2);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, .3);
}

.sub-status-pill--inactive {
  background: rgba(239, 68, 68, .2);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, .3);
}

/* Profile content card */
.profile-content {
  padding: 0 var(--page-pad);
  margin-top: calc(-1 * var(--sp-12));
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
    padding: 0 var(--sp-8);
    margin-top: calc(-1 * var(--sp-10));
  }
}

.profile-card {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  margin-bottom: var(--sp-4);
}

.profile-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--color-border-light);
}

.profile-card__title {
  font-size: var(--font-base);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.01em;
}

/* Section title */
.section-title {
  font-size: var(--font-base);
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-4);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

/* Account view / edit mode */
.account-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.account-row:last-child {
  border-bottom: none;
}

.account-label {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.account-value {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-dark);
}

/* Stats quad */
.stats-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.stats-quad-item {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  text-align: center;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
  transition: all var(--t-base);
}

.stats-quad-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.stats-quad-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  margin: 0 auto var(--sp-2);
}

.stats-quad-value {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.stats-quad-label {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Discount history */
.dh-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.dh-item:last-child {
  border-bottom: none;
}

.dh-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--color-border-light);
}

.dh-info {
  flex: 1;
  min-width: 0;
}

.dh-vendor {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-meta {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.dh-saved {
  text-align: end;
  flex-shrink: 0;
}

.dh-saved-amount {
  display: block;
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--color-success);
}

.dh-saved-label {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

.dh-dl {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border-light);
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.dh-dl:hover {
  background: var(--color-primary);
  color: var(--color-surface);
}


/* Subscription info */
.sub-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.sub-info-item {}

.sub-info-label {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.sub-info-val {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-dark);
}

.sub-progress-wrap {
  margin-top: var(--sp-2);
}

.sub-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.sub-days-left {
  color: var(--color-primary);
}

.sub-prog-bar {
  height: 8px;
}

/* Sub history */
.sub-hist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.sub-hist-item:last-child {
  border-bottom: none;
}

.sub-hist-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--color-success);
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
}

.sub-hist-dot--old {
  background: var(--color-text-muted);
  box-shadow: none;
}

.sub-hist-info {
  flex: 1;
}

.sub-hist-date {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-dark);
}

.sub-hist-plan {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.sub-hist-status {
  font-size: var(--font-xs);
  font-weight: 700;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  background: var(--color-success-light);
  color: var(--color-success);
}

.sub-hist-status--expired {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
}

.sub-no-plan {
  text-align: center;
  padding: var(--sp-6);
  color: var(--color-text-muted);
}

.sub-no-plan i {
  font-size: 2rem;
  color: var(--color-danger);
  margin-bottom: var(--sp-3);
  display: block;
}

/* Settings menu */
.settings-menu {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.settings-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  color: var(--color-text-primary);
}

.settings-item:hover {
  background: var(--color-surface-alt);
}

.settings-item__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-md);
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  flex-shrink: 0;
  transition: all var(--t-base);
}

.settings-item:hover .settings-item__icon {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.settings-item__text {
  flex: 1;
  font-size: var(--font-base);
  font-weight: 600;
}

.settings-item__value {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

.settings-item__arrow {
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

.settings-item--danger .settings-item__icon {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.settings-item--danger .settings-item__text {
  color: var(--color-danger);
}

.settings-item--danger .settings-item__icon i {
  color: var(--color-danger);
}

/* Toggle */
.toggle {
  width: 3rem;
  height: 1.625rem;
  border-radius: var(--r-full);
  background: var(--color-border);
  position: relative;
  cursor: pointer;
  transition: background var(--t-base);
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--r-full);
  background: white;
  top: 50%;
  transform: translateY(-50%) translateX(0.2rem);
  transition: transform var(--t-bounce);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.toggle--on {
  background: var(--color-success);
}

.toggle--on::after {
  transform: translateY(-50%) translateX(calc(100% - 0.1rem));
}

/* Edit toggle btn */
.edit-toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  transition: all var(--t-base);
}

.edit-toggle-btn:hover {
  background: var(--color-primary);
  color: white;
}

/* Renew btn */
.renew-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-4);
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--r-xl);
  font-size: var(--font-base);
  font-weight: 700;
  margin-top: var(--sp-4);
  box-shadow: var(--shadow-blue);
  transition: all var(--t-base);
}

.renew-profile-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(26, 86, 219, .5);
}


/* ────────────────────────────────────────────────────────
   30. CHECKOUT PAGE
   ──────────────────────────────────────────────────────── */
.checkout-hero {
  background: var(--gradient-hero);
  padding: var(--sp-10) var(--page-pad) var(--sp-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.checkout-hero::before {
  content: '';
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(45, 212, 191, .1) 0%, transparent 70%);
  top: -6rem;
  right: -6rem;
  pointer-events: none;
}

.checkout-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255, 215, 0, .15);
  border: 1px solid rgba(255, 215, 0, .3);
  color: #FFD700;
  font-size: var(--font-xs);
  font-weight: 800;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-4);
  letter-spacing: .05em;
  position: relative;
  z-index: 1;
}

.checkout-price-display {
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-2);
}

.checkout-price-amount {
  font-size: var(--font-5xl);
  font-weight: 900;
  color: white;
  letter-spacing: -0.05em;
}

.checkout-price-currency {
  font-size: var(--font-2xl);
  font-weight: 700;
  color: rgba(255, 255, 255, .7);
  vertical-align: top;
  margin-inline-end: var(--sp-1);
}

.checkout-price-period {
  font-size: var(--font-base);
  color: rgba(255, 255, 255, .6);
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-4);
}

.checkout-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  position: relative;
  z-index: 1;
}

.checkout-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .85);
  font-size: var(--font-xs);
  font-weight: 600;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, .15);
}

.checkout-content {
  padding: 0 var(--page-pad);
  margin-top: calc(-1 * var(--sp-12));
  position: relative;
  z-index: 1;
}

.checkout-card {
  background: var(--color-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
  margin-bottom: var(--sp-4);
}

/* Payment submit btn */
.pay-submit-btn {
  width: 100%;
  padding: 1.1rem;
  font-size: var(--font-base);
  font-weight: 800;
  color: white;
  background: var(--gradient-primary);
  border-radius: var(--r-xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
  margin-top: var(--sp-2);
  letter-spacing: 0.02em;
}

.pay-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(26, 86, 219, .55);
}

.pay-submit-btn:active {
  transform: translateY(0);
}

.pay-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.pay-submit-btn .btn-spinner {
  display: none;
}

.pay-submit-btn.loading .btn-text {
  display: none;
}

.pay-submit-btn.loading .btn-spinner {
  display: inline;
}

/* Success state */
.checkout-success {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
}

.success-icon {
  width: 5rem;
  height: 5rem;
  border-radius: var(--r-full);
  background: var(--color-success-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
  font-size: 2.5rem;
  color: var(--color-success);
  animation: success-bounce 0.6s var(--t-spring) both;
}

@keyframes success-bounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  60% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: var(--font-2xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-2);
}

.success-sub {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}

.success-validity {
  background: var(--color-success-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  font-size: var(--font-sm);
  color: #065F46;
  font-weight: 600;
  margin-bottom: var(--sp-6);
}

.go-dashboard-btn {
  width: 100%;
  padding: 1.1rem;
  font-size: var(--font-base);
  font-weight: 800;
  color: white;
  background: var(--gradient-primary);
  border-radius: var(--r-xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
  text-decoration: none;
}

.go-dashboard-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(26, 86, 219, .55);
}


/* ────────────────────────────────────────────────────────
   31. REGISTER PAGE SPECIFICS
   ──────────────────────────────────────────────────────── */
.register-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  transition: all var(--t-base);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: var(--sp-4);
}

.register-back-btn:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}


/* ────────────────────────────────────────────────────────
   32. ANIMATIONS & UTILITIES
   ──────────────────────────────────────────────────────── */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes count-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.4s ease both;
}

.animate-slide-up {
  animation: slide-up 0.5s ease both;
}

/* Stagger children */
.stagger>*:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger>*:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger>*:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger>*:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger>*:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger>*:nth-child(6) {
  animation-delay: 0.3s;
}

/* Loading spinner */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: white;
  border-radius: var(--r-full);
  animation: spin 0.7s linear infinite;
}

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

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface-alt) 25%, var(--color-border-light) 50%, var(--color-surface-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* prefers-reduced-motion – intentionally removed to preserve animations */


/* ────────────────────────────────────────────────────────
   33. DESKTOP LAYOUT ADJUSTMENTS
   ──────────────────────────────────────────────────────── */
@media (min-width: 900px) {

  /* Main content offset for top nav */
  .main-shell {
    padding-top: 0;
  }

  /* Hero bigger */
  .home-hero {
    padding: var(--sp-10) var(--sp-8) var(--sp-12);
  }

  /* Dashboard grid columns */
  .dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--sp-8);
    padding: var(--sp-8);
  }

  .dash-full {
    grid-column: 1 / -1;
  }

  /* Stats row - 4 columns */
  .dash-stats {
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
  }

  /* Carousels get padding */
  .offers-scroll {
    padding: 0 0 var(--sp-1);
  }

  .cat-scroll {
    padding: 0 0 var(--sp-1);
  }

  .carousel-header {
    padding: 0;
  }

  /* Vendor sections */
  .page-header {
    padding: var(--sp-8) var(--sp-8) var(--sp-6);
  }

  /* Pop list & activity - side by side */
  .pop-list,
  .activity-list {
    gap: var(--sp-3);
  }

  /* Ref slider padding */
  .ref-slider {
    margin: 0;
  }

  /* Membership card */
  .memb-card {
    margin: 0;
  }

  /* Sections */
  .dash-section {
    padding: 0;
  }

  .dash-section__header {
    padding: 0;
  }
}

/* ────────────────────────────────────────────────────────
   34. RTL SPECIFIC OVERRIDES
   ──────────────────────────────────────────────────────── */
[dir="rtl"] .home-hero__actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .ref-slider__header {
  flex-direction: row-reverse;
}

[dir="rtl"] .step-item {
  /* keep `row`: in an RTL container this already places the step number on the right */
  flex-direction: row;
}

[dir="rtl"] .referred-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .activity-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .pop-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .stat-card {
  flex-direction: row-reverse;
}

[dir="rtl"] .share-buttons {
  flex-direction: row-reverse;
}

[dir="rtl"] .earnings-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .dh-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .dh-saved {
  text-align: start;
}

[dir="rtl"] .settings-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .settings-item__arrow {
  transform: scaleX(-1);
}

[dir="rtl"] .top-nav-link.active::after {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

[dir="rtl"] .memb-card__top {
  flex-direction: row-reverse;
}

[dir="rtl"] .code-display {
  flex-direction: row-reverse;
}

[dir="rtl"] .modal-close-btn {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

[dir="rtl"] .qr-corner--tl {
  left: auto;
  right: var(--sp-2);
  border-width: 3px 3px 0 0;
  border-radius: 0 4px 0 0;
}

[dir="rtl"] .qr-corner--tr {
  right: auto;
  left: var(--sp-2);
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

[dir="rtl"] .qr-corner--bl {
  left: auto;
  right: var(--sp-2);
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

[dir="rtl"] .qr-corner--br {
  right: auto;
  left: var(--sp-2);
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 4px;
}

/* Carousels follow the page direction: RTL in Arabic, LTR in English.
   Scroll snapping uses the logical `start` value already set on .cat-card / .offer-card. */

/* ────────────────────────────────────────────────────────
    35. SWIPER.JS CUSTOM STYLES
   ──────────────────────────────────────────────────────── */

/* Containers */
.offers-swiper,
.cats-swiper {
  width: 100%;
  overflow: hidden;
  padding-bottom: 2.75rem !important;
  /* room for pagination */
}

/* fade left/right edges for premium feel */
.offers-swiper {
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0%,
      black 6%,
      black 94%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      transparent 0%,
      black 6%,
      black 94%,
      transparent 100%);
}

/* Ensure slides don't stretch cards */
.offers-swiper .swiper-slide,
.cats-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

/* Offer card inside swiper – mobile-first sizing */
.offers-swiper .offer-card {
  width: 100%;
  height: 11rem;
  /* slightly smaller as requested */
}

/* Cat card inside ticker fills correctly */
.cat-ticker .cat-card {
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
  scroll-snap-align: unset;
}

/* ── Pagination bullets ── */
.swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: var(--color-border);
  opacity: 1;
  border-radius: var(--r-full);
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: var(--color-primary);
  width: 22px;
  border-radius: var(--r-full);
}

/* ── Navigation arrows ── */
.swiper-button-prev,
.swiper-button-next {
  display: none;
  /* hidden on mobile */
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  color: var(--color-dark);
  opacity: 0;
  transition: all 0.3s ease;
  top: calc(50% - 1.375rem - 1rem);
  /* vertically center in slide area */
}

/* hide Swiper's default arrow icons */
.swiper-button-prev::after,
.swiper-button-next::after {
  display: none;
}

/* Font Awesome icon inside button */
.swiper-button-prev i,
.swiper-button-next i {
  font-size: .85rem;
  line-height: 1;
}

@media (min-width: 900px) {

  .swiper-button-prev,
  .swiper-button-next {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .offers-swiper:hover .swiper-button-prev,
  .offers-swiper:hover .swiper-button-next,
  .cats-swiper:hover .swiper-button-prev,
  .cats-swiper:hover .swiper-button-next {
    opacity: 1;
  }

  .swiper-button-prev:hover,
  .swiper-button-next:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-blue);
    transform: scale(1.08);
  }
}

/* disabled arrow */
.swiper-button-disabled {
  opacity: 0 !important;
  pointer-events: none;
}


/* ────────────────────────────────────────────────────────
   36. CATEGORY TICKER SLIDER
   ──────────────────────────────────────────────────────── */

/* Outer mask – hides overflow and fades edges */
.cat-ticker-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: var(--sp-2) 0 var(--sp-3);
  /* fade left/right edges for premium feel */
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0%,
      black 8%,
      black 92%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      transparent 0%,
      black 8%,
      black 92%,
      transparent 100%);
}

/* Inner scrolling track */
.cat-ticker {
  display: flex;
  gap: var(--sp-3);
  width: max-content;
  /* as wide as all cards combined */
  will-change: transform;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.cat-ticker:active {
  cursor: grabbing;
}

/* Pause animation when JS sets this class */
.cat-ticker.is-paused {
  /* will be controlled via JS requestAnimationFrame, not CSS animation */
}

/* Skeleton shimmer */
.skeleton-shimmer {
  background: linear-gradient(90deg, var(--color-surface-alt) 25%, var(--color-border-light) 50%, var(--color-surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-stat {
  height: 3rem;
  width: 100%;
}

.skeleton-offer {
  height: 11rem;
  width: 9rem;
  border-radius: var(--r-xl);
}

.skeleton-cat {
  height: 5.5rem;
  width: 5.5rem;
  border-radius: var(--r-xl);
}

@media (min-width: 600px) and (max-width: 899px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .vendor-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cat-detail-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .home-hero {
    padding: var(--sp-8) var(--sp-6);
  }

  .stat-card {
    padding: var(--sp-5);
  }

  .offer-card {
    min-width: 11rem;
    height: 12rem;
  }

  .cat-card {
    width: 6.5rem;
    height: 6.5rem;
  }

  .profile-content {
    grid-template-columns: 1fr;
  }

  .referral-desktop-grid {
    flex-direction: column;
  }

  /* .dash-stats follows the page direction naturally (no forced LTR). */
}

/* ============================================================
   DEMO MODE ROLE SWITCHER (floating, all logged-in pages)
   ============================================================ */
.demo-role-switcher {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
}

[dir="rtl"] .demo-role-switcher {
  right: auto;
  left: 14px;
}

@media (min-width: 900px) {
  .demo-role-switcher {
    top: calc(var(--top-nav-h) + 10px);
  }
}

.demo-role-switcher__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-primary, var(--color-primary));
  background: var(--color-dark);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(10, 22, 40, .35);
  transition: transform .2s ease;
}

.demo-role-switcher__btn:hover {
  transform: scale(1.06);
}

.demo-role-switcher__menu {
  position: absolute;
  top: 56px;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 40px rgba(10, 22, 40, .18);
  min-width: 220px;
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .18s ease;
}

[dir="rtl"] .demo-role-switcher__menu {
  right: auto;
  left: 0;
}

.demo-role-switcher__menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.demo-role-switcher__title {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  font-weight: 700;
  padding: .4rem .6rem;
}

.demo-role-switcher__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .6rem .6rem;
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-dark);
  text-align: start;
}

[dir="rtl"] .demo-role-switcher__item {
  text-align: end;
}

.demo-role-switcher__item:hover {
  background: var(--color-surface-alt);
}

.demo-role-switcher__item.active {
  color: var(--color-primary);
  background: var(--color-surface-alt);
}

.demo-role-switcher__item i:first-child {
  width: 18px;
  text-align: center;
}

.demo-role-switcher__check {
  margin-inline-start: auto;
}

[dir="rtl"] .demo-role-switcher__check {
  margin-inline-start: auto;
  margin-inline-end: 0;
}


/* ============================================================
   MERCHANT FORM (Become a Vendor)
   ============================================================ */
.merchant-modal {
  max-height: 88vh;
  overflow-y: auto;
}

.merchant-form .form-group {
  margin-bottom: var(--sp-3);
}

.merchant-form textarea.form-input {
  resize: vertical;
  font-family: var(--font-family);
}

.merchant-branch-row {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin-bottom: var(--sp-2);
}


/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--color-surface-alt);
}

.admin-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--color-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 800;
  font-size: 1.2rem;
  padding: .75rem var(--sp-3) 1.5rem;
}

.admin-sidebar__close {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  font-size: 1.1rem;
  padding: .4rem;
  transition: all var(--t-base);
  border-radius: var(--r-md);
}

.admin-sidebar__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.admin-sidebar__tag {

  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .12);
  padding: .2rem .5rem;
  border-radius: 999px;
  margin-inline-start: .4rem;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .7);
  padding: .75rem .9rem;
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  position: relative;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.admin-nav-item.active {
  background: var(--color-primary);
  color: #fff;
}

.admin-nav-item i {
  width: 18px;
  text-align: center;
}

.admin-nav-badge {
  margin-inline-start: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  border-radius: 999px;
  padding: .1rem .45rem;
}

.admin-sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.admin-sidebar__resetbtn,
.admin-sidebar__logoutbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border: none;
  padding: .65rem .9rem;
  border-radius: var(--r-md);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-sidebar__resetbtn:hover {
  background: rgba(255, 255, 255, .16);
}

.admin-sidebar__logoutbtn {
  background: var(--color-danger);
}

.admin-sidebar__logoutbtn:hover {
  opacity: .9;
}

.admin-main {
  flex: 1;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 5;
}

.admin-topbar__menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--color-dark);
  cursor: pointer;
}

.admin-topbar__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-dark);
  flex: 1;
}

.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--color-dark);
}

.admin-topbar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.admin-content {
  padding: var(--sp-5);
  max-width: 1200px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.admin-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.admin-stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.admin-stat-card__value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-dark);
}

.admin-stat-card__label {
  font-size: .75rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.admin-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.admin-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
}


.admin-panel__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--sp-3);
}

.admin-panel__subtitle {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Reports date-range toolbar + 4-col revenue grids (responsive) */
.admin-stat-grid--cols4 {
  grid-template-columns: repeat(4, 1fr);
}

.admin-toolbar--range {
  flex-wrap: wrap;
}

.admin-toolbar--range .admin-btn-primary {
  margin-inline-start: auto;
}

.admin-range-field {
  flex: 0 1 240px;
  min-width: 0;
}

.admin-range-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-md);
  padding: .45rem .8rem;
}

@media (max-width: 1100px) {
  .admin-stat-grid--cols4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .admin-toolbar--range {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-range-field,
  .admin-range-label {
    width: 100%;
    flex: none;
  }

  .admin-toolbar--range .admin-btn-primary {
    margin-inline-start: 0;
    width: 100%;
    justify-content: center;
  }

  .admin-stat-grid--cols4 {
    grid-template-columns: 1fr;
  }
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--sp-4);
  border-bottom: 2px solid var(--color-border-light);
}

.admin-tab {
  padding: .6rem 1.2rem;
  border: none;
  background: none;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--t-base);
}

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

.admin-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-toolbar {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: .55rem .9rem;
  flex: 1;
  min-width: 220px;
}

.admin-search i {
  color: var(--color-text-muted);
}

.admin-search input {
  border: none;
  outline: none;
  flex: 1;
  font-family: var(--font-family);
  font-size: .85rem;
  background: transparent;
}

.admin-select {
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: .55rem .9rem;
  font-family: var(--font-family);
  font-size: .85rem;
  background: var(--color-surface);
}

.admin-btn-primary {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: .65rem 1.1rem;
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-btn-primary:hover {
  opacity: .92;
}

/* M7: Reports chart */
.admin-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding: 1rem .25rem 0;
}

.admin-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}

.admin-chart__bar {
  width: 100%;
  max-width: 34px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-light, #a78bfa));
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3px;
  font-size: .62rem;
  font-weight: 700;
  color: #fff;
  min-height: 2px;
}

.admin-chart__label {
  font-size: .58rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}


.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.admin-table th {
  text-align: start;
  color: var(--color-text-muted);
  font-weight: 700;
  padding: .6rem .5rem;
  border-bottom: 1px solid var(--color-border-light);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

[dir="rtl"] .admin-table th {
  text-align: end;
}

.admin-table td {
  padding: .7rem .5rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-dark);
  vertical-align: middle;
}

.admin-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--sp-4);
  font-size: .85rem;
}

.admin-badge {
  display: inline-block;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  background: var(--color-surface-alt);
  color: var(--color-dark);
  text-transform: capitalize;
}

.admin-badge--active {
  background: #DCFCE7;
  color: #15803D;
}

.admin-badge--approved {
  background: #DCFCE7;
  color: #15803D;
}

.admin-badge--inactive {
  background: var(--color-border-light);
  color: var(--color-text-muted);
}

.admin-badge--pending {
  background: #FEF3C7;
  color: #92400E;
}

.admin-badge--rejected {
  background: var(--color-danger-light);
  color: #B91C1C;
}

.admin-icon-btn {
  background: var(--color-surface-alt);
  border: none;
  color: var(--color-dark);
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  cursor: pointer;
  margin-inline-end: .3rem;
}

.admin-icon-btn:hover {
  background: var(--color-border-light);
}

.admin-thumb {
  width: 44px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-thumb--lg {
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
}

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.admin-list-row:last-child {
  border-bottom: none;
}

.admin-list-row__sub {
  font-size: .75rem;
  color: var(--color-text-muted);
}

.admin-request-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border-light);
  flex-wrap: wrap;
}

.admin-request-card:last-child {
  border-bottom: none;
}

.admin-request-card__main {
  display: flex;
  gap: var(--sp-3);
  flex: 1;
  min-width: 260px;
}

.admin-request-card__main h3 {
  font-size: .9rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: .2rem;
}

.admin-request-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
}

.admin-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: none;
  border-radius: var(--r-md);
  padding: .4rem .8rem;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-btn-sm--success {
  background: var(--color-success);
  color: #fff;
}

.admin-btn-sm--danger {
  background: var(--color-danger);
  color: #fff;
}

.admin-btn-sm:hover {
  opacity: .9;
}

.cat-thumb {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-alt);
  vertical-align: middle;
}
.cat-thumb--preview {
  width: 100%;
  height: 120px;
  display: block;
}

.admin-userdetail p {
  font-size: .85rem;
  color: var(--color-dark);
  margin-bottom: .4rem;
}

.admin-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .8rem;
  color: var(--color-text-muted);
}

.admin-history-list li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    z-index: 200;
    transition: left .25s ease, right .25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .3);
  }

  .admin-sidebar__close {
    display: flex;
  }

  [dir="rtl"] .admin-sidebar {
    left: auto;
    right: -260px;
  }

  [dir="rtl"] .admin-sidebar__close {
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  .admin-shell.sidebar-open .admin-sidebar {
    left: 0;
  }

  [dir="rtl"] .admin-shell.sidebar-open .admin-sidebar {
    right: 0;
  }

  .admin-topbar__menu {
    display: block;
  }

  .admin-content {
    padding: var(--sp-3);
    padding-bottom: 5rem;
  }

  .admin-bottom-nav {
    display: flex;
  }
}

@media (min-width: 901px) {
  .admin-bottom-nav {
    display: none;
  }
}

.admin-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  justify-content: space-around;
  padding: .4rem 0;
  box-shadow: 0 -4px 16px rgba(10, 22, 40, .06);
}

.admin-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: .65rem;
  font-weight: 700;
  cursor: pointer;
  padding: .3rem .4rem;
}

.admin-bottom-item.active {
  color: var(--color-primary);
}

.admin-bottom-item i {
  font-size: 1.05rem;
}

.cpos-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-around;
  padding: .4rem 0;
  box-shadow: 0 -4px 16px rgba(10, 22, 40, .06);
}

.cpos-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: .65rem;
  font-weight: 700;
  cursor: pointer;
  padding: .3rem .4rem;
  transition: color var(--t-base);
}

.cpos-bottom-item.active {
  color: var(--color-primary);
}

.cpos-bottom-item i {
  font-size: 1.05rem;
}

@media (min-width: 901px) {
  .cpos-bottom-nav {
    display: none;
  }
}


/* ============================================================
   CASHIER POS – DESIGN SYSTEM v2.0
   ============================================================ */

/* ── Login Screen ─────────────────────────────────────────── */
.cpos-login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: var(--sp-4);
  position: relative;
  overflow: hidden;
}

.cpos-login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cpos-login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.cpos-login-blob--1 {
  width: 600px;
  height: 600px;
  background: var(--color-primary);
  top: -200px;
  left: -200px;
  animation: blobFloat1 12s ease-in-out infinite alternate;
}

.cpos-login-blob--2 {
  width: 400px;
  height: 400px;
  background: var(--color-accent);
  bottom: -100px;
  right: -100px;
  animation: blobFloat2 10s ease-in-out infinite alternate;
}

.cpos-login-blob--3 {
  width: 300px;
  height: 300px;
  background: #9B59B6;
  top: 40%;
  left: 60%;
  animation: blobFloat1 8s ease-in-out infinite alternate;
}

@keyframes blobFloat1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, -30px) scale(1.1);
  }
}

@keyframes blobFloat2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-30px, 40px) scale(1.08);
  }
}

.cpos-login-card {
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-2xl);
  padding: var(--sp-8) var(--sp-8);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .4);
  position: relative;
  z-index: 1;
}

.cpos-login-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 900;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: var(--sp-4);
}

.cpos-login-brand .brand-x {
  color: var(--color-accent);
}

.cpos-login-brand .brand-deal {
  color: #fff;
}

.cpos-brand-tag {
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: var(--color-accent);
  color: #0A1628;
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-inline-start: .2rem;
}

.cpos-login-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: .25rem;
}

.cpos-login-sub {
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
  margin-bottom: var(--sp-5);
}

.cpos-login-form .form-label {
  color: rgba(255, 255, 255, .8);
  font-weight: 600;
  font-size: .82rem;
}

.cpos-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cpos-input-wrap>i:first-child {
  position: absolute;
  left: 1rem;
  color: rgba(255, 255, 255, .4);
  font-size: .9rem;
  z-index: 1;
}

[dir="rtl"] .cpos-input-wrap>i:first-child {
  left: auto;
  right: 1rem;
}

.cpos-login-input {
  width: 100%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  padding-inline-start: 2.75rem;
  border-radius: var(--r-md);
  font-size: .95rem;
}

[dir="rtl"] .cpos-login-input {
  padding-inline-start: 1rem;
  padding-inline-end: 2.75rem;
}

.cpos-login-input::placeholder {
  color: rgba(255, 255, 255, .3);
}

.cpos-login-input:focus {
  border-color: var(--color-accent);
  outline: none;
  background: rgba(255, 255, 255, .12);
}

.cpos-pass-toggle {
  position: absolute;
  right: .9rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  font-size: .9rem;
  z-index: 1;
}

[dir="rtl"] .cpos-pass-toggle {
  right: auto;
  left: .9rem;
}

.cpos-pass-toggle:hover {
  color: #fff;
}

.cpos-field-err {
  font-size: .78rem;
  color: #FF6B6B;
  margin-top: .35rem;
  min-height: 1rem;
}

.cpos-login-btn {
  width: 100%;
  margin-top: var(--sp-3);
  background: var(--gradient-accent);
  color: #0A1628;
  font-weight: 800;
  font-size: 1rem;
  padding: .95rem;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(45, 212, 191, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: opacity .2s, transform .15s;
}

.cpos-login-btn:hover {
  opacity: .92;
  transform: translateY(-1px);
}

.cpos-login-btn:active {
  transform: translateY(0);
}

.cpos-login-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.cpos-btn-spinner {
  display: inline-flex;
  align-items: center;
}

.cpos-login-demo {
  margin-top: var(--sp-5);
}

.cpos-demo-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .4);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.cpos-demo-pills {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-demo-pill {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-md);
  padding: .65rem 1rem;
  cursor: pointer;
  text-align: start;
  color: rgba(255, 255, 255, .8);
  font-size: .82rem;
}

.cpos-demo-pill:hover {
  background: rgba(255, 255, 255, .1);
}

.cpos-demo-pill i {
  color: var(--color-accent);
  width: 16px;
  text-align: center;
}

.cpos-demo-pill span {
  flex: 1;
  font-weight: 600;
}

.cpos-demo-pill code {
  font-size: .72rem;
  background: rgba(255, 255, 255, .1);
  padding: .15rem .4rem;
  border-radius: 4px;
  color: var(--color-accent);
}

/* ── POS Shell ─────────────────────────────────────────────── */
.cpos-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface-alt);
}

/* ── Top Bar ───────────────────────────────────────────────── */
.cpos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem var(--sp-5);
  background: var(--color-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: var(--z-topnav);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .25);
  gap: var(--sp-3);
  box-sizing: border-box;
  width: 100%;
}

.cpos-topbar__left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 0 1 auto;
  min-width: 0;
}

.cpos-topbar__right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 0 1 auto;
}

.cpos-topbar__nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cpos-topbar__nav::-webkit-scrollbar {
  display: none;
}

.cpos-topbar__brand {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 900;
  font-size: 1.1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.cpos-topbar__brand .brand-x {
  color: var(--color-accent);
}

.cpos-topbar__vendor {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.cpos-topbar__vendor i {
  color: var(--color-accent);
  font-size: .75rem;
}

.cpos-topbar__time {
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .7);
  white-space: nowrap;
}

.cpos-topbar__cashier {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cpos-cashier-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #0A1628;
  font-weight: 800;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cpos-cashier-name {
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}

.cpos-logout-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(239, 68, 68, .15);
  border: 1px solid rgba(239, 68, 68, .25);
  color: #FF6B6B;
  border-radius: var(--r-md);
  padding: .4rem .8rem;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cpos-logout-btn:hover {
  background: rgba(239, 68, 68, .25);
}

/* ── Main content ──────────────────────────────────────────── */
.cpos-main {
  flex: 1;
  overflow-y: auto;
}

.cpos-container {
  max-width: 90%;
  margin: 0 auto;
  width: 100%;
}

.cpos-panel:not(.cpos-panel--side) {
  display: none;
}

.cpos-panel:not(.cpos-panel--side).active {
  display: block;
}

/* Bill Section */
.cpos-bill-section {
  margin: var(--sp-4) var(--sp-4) 0;
  background: var(--color-surface);
  border: 1.5px dashed var(--color-primary);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
}

/* Section label */
.cpos-section-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
}

.cpos-section-label i {
  color: var(--color-primary);
}

/* Method Grid */
.cpos-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: 0 var(--sp-4) var(--sp-4);
}

.cpos-method-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  cursor: pointer;
  transition: transform .18s var(--t-bounce), box-shadow .2s, border-color .2s;
  user-select: none;
}

.cpos-method-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.cpos-method-card:active {
  transform: translateY(0) scale(.98);
}

.cpos-method-card--guest {
  border-style: dashed;
}

.cpos-method-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cpos-method-card__icon--blue {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.cpos-method-card__icon--teal {
  background: rgba(45, 212, 191, .12);
  color: var(--color-accent-dark);
}

.cpos-method-card__icon--amber {
  background: var(--color-warning-light);
  color: #B45309;
}

.cpos-method-card__icon--purple {
  background: rgba(155, 89, 182, .12);
  color: #8B5CF6;
}

.cpos-method-card__body {
  flex: 1;
  min-width: 0;
}

.cpos-method-card__body h3 {
  font-size: .85rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.3;
}

.cpos-method-card__body p {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-top: .15rem;
}

.cpos-method-card__arrow {
  color: var(--color-text-muted);
  font-size: .7rem;
  flex-shrink: 0;
}

/* Lookup Panel */
.cpos-lookup-panel {
  margin: 0 var(--sp-4) var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cpos-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface-alt);
}

.cpos-panel-header h3 {
  font-size: .9rem;
  font-weight: 800;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cpos-close-panel {
  width: 28px;
  height: 28px;
  border-radius: var(--r-md);
  background: var(--color-border-light);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--color-dark);
}

.cpos-close-panel:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.cpos-lookup-row {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
}

.cpos-big-input {
  flex: 1;
  font-size: .95rem;
  padding: .8rem 1rem;
}

.cpos-hint {
  padding: 0 var(--sp-4) var(--sp-3);
  font-size: .75rem;
  color: var(--color-text-muted);
}

.cpos-hint code {
  background: var(--color-surface-alt);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-size: .72rem;
}

/* Customer Result Card */
.cpos-customer-result {
  padding: 0 var(--sp-4) var(--sp-4);
}

.cpos-customer-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border-light);
}

.cpos-customer-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.cpos-customer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpos-customer-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-surface-alt);
}

.cpos-customer-status-dot--active {
  background: var(--color-success);
}

.cpos-customer-status-dot--expired {
  background: var(--color-danger);
}

.cpos-customer-info {
  flex: 1;
  min-width: 0;
}

.cpos-customer-info h4 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpos-customer-info p {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.cpos-sub-badge {
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.cpos-sub-badge--active {
  background: var(--color-success-light);
  color: #15803D;
}

.cpos-sub-badge--expired {
  background: var(--color-danger-light);
  color: #B91C1C;
}

.cpos-customer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.cpos-cstat {
  background: var(--color-surface-alt);
  border-radius: var(--r-md);
  padding: .6rem;
  text-align: center;
  border: 1px solid var(--color-border-light);
}

.cpos-cstat__val {
  display: block;
  font-size: .95rem;
  font-weight: 900;
  color: var(--color-dark);
}

.cpos-cstat__lbl {
  display: block;
  font-size: .65rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 1px;
}

.cpos-discount-preview {
  background: var(--color-primary-light);
  border: 1px solid rgba(26, 86, 219, .12);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.cpos-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: var(--sp-3);
}

.cpos-discount-calc {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.cpos-calc-label {
  display: block;
  font-size: .68rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cpos-calc-val {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  color: var(--color-dark);
}

.cpos-calc-val--save {
  color: var(--color-success);
  font-size: 1.15rem;
}

.cpos-calc-arrow {
  color: var(--color-text-muted);
}

.cpos-calc-highlight {
  background: rgba(16, 185, 129, .1);
  border-radius: var(--r-md);
  padding: .4rem .75rem;
}

.cpos-apply-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 1rem;
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-blue);
  transition: opacity .2s, transform .15s;
}

.cpos-apply-btn:hover {
  opacity: .94;
  transform: translateY(-1px);
}

.cpos-apply-btn:active {
  transform: translateY(0);
}

.cpos-apply-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Action buttons */
.cpos-action-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: none;
  border-radius: var(--r-md);
  padding: .7rem 1.2rem;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cpos-action-btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.cpos-action-btn--primary:hover {
  opacity: .9;
}

.cpos-action-btn--outline {
  background: none;
  border: 1.5px solid var(--color-border);
  color: var(--color-dark);
}

.cpos-action-btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ── Store Tab ──────────────────────────────────────────────── */
.cpos-store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  flex-wrap: wrap;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.cpos-store-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cpos-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--color-dark);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: .55rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.cpos-preview-btn:hover {
  opacity: .85;
}

.cpos-store-section {
  margin: var(--sp-4) var(--sp-4) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cpos-store-section:last-child {
  margin-bottom: var(--sp-4);
}

.cpos-store-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem var(--sp-4);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border-light);
}

.cpos-store-section__head h3 {
  font-size: .88rem;
  font-weight: 800;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cpos-store-section__head h3 i {
  color: var(--color-primary);
  width: 16px;
  text-align: center;
}

.cpos-store-section__body {
  padding: var(--sp-4);
}

.cpos-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.cpos-save-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--color-success);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: .65rem 1.2rem;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: var(--sp-2);
}

.cpos-save-btn:hover {
  opacity: .9;
}

.cpos-add-branch-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: .45rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}

.cpos-add-branch-btn:hover {
  opacity: .9;
}

.cpos-branch-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-branch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  flex-wrap: wrap;
}

.cpos-branch-card__name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: .15rem;
}

.cpos-branch-card__name i {
  color: var(--color-primary);
  margin-inline-end: .3rem;
}

.cpos-branch-card__meta {
  font-size: .75rem;
  color: var(--color-text-muted);
}

.cpos-branch-card__actions {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
}

.cpos-empty-small {
  font-size: .8rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--sp-4);
}

/* ── Reports Tab ────────────────────────────────────────────── */
.cpos-reports-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  flex-wrap: wrap;
  gap: var(--sp-2);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.cpos-reports-vendor {
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: .3rem .8rem;
  border-radius: 999px;
}

.cpos-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) 0;
}

.cpos-report-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  transition: box-shadow .2s, transform .15s;
}

.cpos-report-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.cpos-revenue-panel {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(15, 118, 110, .06));
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
}

.cpos-revenue-panel__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--sp-3);
}

.cpos-revenue-panel__head i {
  color: var(--color-primary);
}

.cpos-revenue-panel__live {
  margin-inline-start: auto;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-success);
  background: var(--color-success-light);
  border: 1px solid var(--color-success);
  border-radius: 999px;
  padding: .15rem .55rem;
}

.cpos-revenue-panel .cpos-report-grid {
  margin-top: 0;
}

.cpos-range-toolbar {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding: var(--sp-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
}

.cpos-range-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.cpos-range-field span {
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.cpos-range-field input {
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-md);
  padding: .5rem .6rem;
  font-size: .85rem;
  color: var(--color-dark);
  background: var(--color-surface-alt);
}

.cpos-range-toolbar .cpos-btn {
  height: 38px;
  align-self: flex-end;
}

@media (max-width: 640px) {
  .cpos-range-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .cpos-range-field {
    flex: 1 1 calc(50% - var(--sp-3) / 2);
  }

  .cpos-range-field input {
    width: 100%;
  }

  .cpos-range-toolbar .cpos-btn {
    align-self: auto;
    width: 100%;
  }

  .cpos-revenue-panel {
    padding: var(--sp-3);
  }
}

.cpos-report-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cpos-report-card__icon--teal {
  background: rgba(45, 212, 191, .12);
  color: var(--color-accent-dark);
}

.cpos-report-card__icon--green {
  background: var(--color-success-light);
  color: var(--color-success);
}

.cpos-report-card__icon--amber {
  background: var(--color-warning-light);
  color: #B45309;
}

.cpos-report-card__body {
  flex: 1;
  min-width: 0;
}

.cpos-report-card__val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-dark);
  line-height: 1.2;
}

.cpos-report-card__lbl {
  font-size: .7rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Recent transactions panel */
.cpos-recent-panel {
  margin: var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cpos-recent-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem var(--sp-4);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border-light);
}

.cpos-recent-panel__head h3 {
  font-size: .88rem;
  font-weight: 800;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cpos-recent-count {
  font-size: .72rem;
  color: var(--color-text-muted);
  font-weight: 700;
}

.cpos-txn-list {
  padding: var(--sp-2) 0;
}

.cpos-txn-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: .75rem var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  transition: background .15s;
}

.cpos-txn-row:last-child {
  border-bottom: none;
}

.cpos-txn-row:hover {
  background: var(--color-surface-alt);
}

.cpos-txn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.cpos-txn-info {
  flex: 1;
  min-width: 0;
}

.cpos-txn-customer {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpos-txn-time {
  font-size: .72rem;
  color: var(--color-text-muted);
}

.cpos-txn-save {
  text-align: end;
  flex-shrink: 0;
}

.cpos-txn-save-amount {
  font-size: .9rem;
  font-weight: 900;
  color: var(--color-success);
}

.cpos-txn-save-label {
  font-size: .68rem;
  color: var(--color-text-muted);
}

.cpos-guest-tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  background: rgba(155, 89, 182, .12);
  color: #8B5CF6;
  padding: .05rem .35rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-inline-start: .25rem;
}

/* ── Skeleton loading ────────────────────────────────────────── */
@keyframes skeletonPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

.cpos-skeleton {
  animation: skeletonPulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

.cpos-skeleton .cpos-report-card__val,
.cpos-skeleton .cpos-report-card__lbl {
  background: var(--color-border-light);
  color: transparent;
  border-radius: 4px;
}

.cpos-skeleton .cpos-report-card__icon {
  background: var(--color-border-light);
  color: transparent;
}

.cpos-txn-skeleton {
  height: 60px;
  background: var(--color-border-light);
  border-radius: 0;
  margin: 0;
  border-bottom: 1px solid var(--color-surface);
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

.cpos-empty {
  text-align: center;
  padding: var(--sp-8);
  color: var(--color-text-muted);
  font-size: .85rem;
}

/* ── No bottom nav ──────────────────────────────────────────── */

/* ── Modals ─────────────────────────────────────────────────── */
.cpos-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(10, 22, 40, .6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.cpos-modal-overlay.open {
  display: flex;
}

@media (min-width: 600px) {
  .cpos-modal-overlay {
    align-items: center;
  }
}

.cpos-modal {
  background: var(--color-surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: var(--sp-5);
  animation: modalSlideUp .25s var(--t-bounce);
  position: relative;
}

@media (min-width: 600px) {
  .cpos-modal {
    border-radius: var(--r-2xl);
  }
}

@keyframes modalSlideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cpos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}

.cpos-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cpos-modal-title i {
  color: var(--color-primary);
}

.cpos-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--color-surface-alt);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--color-dark);
}

.cpos-modal-close:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.cpos-modal-sub {
  font-size: .82rem;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

/* QR Modal */
.cpos-modal--qr {
  text-align: center;
}

.cpos-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.cpos-qr-ring {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpos-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.cpos-ring-track {
  fill: none;
  stroke: var(--color-border-light);
  stroke-width: 6;
}

.cpos-ring-progress {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .9s linear;
}

.cpos-ring--expired .cpos-ring-progress {
  stroke: var(--color-danger);
}

.cpos-ring-inner {
  position: absolute;
  inset: 16px;
  background: var(--color-surface);
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.cpos-ring-inner img,
.cpos-ring-inner canvas {
  border-radius: 8px;
}

.cpos-qr-timer {
  font-size: .82rem;
  color: var(--color-text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.cpos-qr-code-label {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: .1em;
  background: var(--color-surface-alt);
  padding: .4rem 1rem;
  border-radius: var(--r-md);
}

/* Manual Code Modal */
.cpos-modal--manual {}

.cpos-code-display {
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  text-align: center;
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-blue);
}

.cpos-code-display--expired {
  background: var(--color-surface-alt);
  box-shadow: none;
}

.cpos-code-chars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-bottom: var(--sp-3);
}

.cpos-code-char {
  width: 44px;
  height: 54px;
  background: rgba(255, 255, 255, .12);
  border: 1.5px solid rgba(255, 255, 255, .2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  font-family: monospace;
  letter-spacing: 0;
  animation: codeCharPop .3s var(--t-bounce);
}

@keyframes codeCharPop {
  from {
    transform: scale(.5) translateY(-10px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.cpos-code-char:nth-child(1) {
  animation-delay: 0s;
}

.cpos-code-char:nth-child(2) {
  animation-delay: .07s;
}

.cpos-code-char:nth-child(3) {
  animation-delay: .08s;
}

.cpos-code-char:nth-child(5) {
  animation-delay: .15s;
}

.cpos-code-char:nth-child(6) {
  animation-delay: .22s;
}

.cpos-code-char:nth-child(7) {
  animation-delay: .29s;
}

.cpos-code-char:nth-child(8) {
  animation-delay: .36s;
}

.cpos-code-sep {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, .4);
  font-weight: 900;
}

.cpos-code-display--expired .cpos-code-char {
  color: var(--color-text-muted);
  background: var(--color-border-light);
  border-color: transparent;
}

.cpos-code-display--expired .cpos-code-sep {
  color: var(--color-text-muted);
}

.cpos-code-timer-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
  margin-bottom: var(--sp-2);
}

.cpos-code-timer-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 1s linear;
}

.cpos-code-display--expired .cpos-code-timer-bar {
  background: var(--color-danger);
}

.cpos-code-timer-label {
  font-size: .78rem;
  color: rgba(255, 255, 255, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}

.cpos-code-display--expired .cpos-code-timer-label {
  color: var(--color-text-muted);
}

.cpos-code-input {
  font-family: monospace;
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .7rem 1rem;
}

.cpos-manual-verify {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border-light);
}

.cpos-manual-verify__label {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

.cpos-manual-verify__row {
  display: flex;
  gap: var(--sp-2);
}

.cpos-modal-expired {
  text-align: center;
  padding: var(--sp-4);
  color: var(--color-danger);
}

.cpos-modal-expired i {
  font-size: 2rem;
  margin-bottom: var(--sp-2);
}

.cpos-modal-expired p {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.cpos-modal-actions {
  margin-top: var(--sp-4);
}

.cpos-simulate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: rgba(45, 212, 191, .1);
  border: 1.5px dashed var(--color-accent);
  color: var(--color-accent-dark);
  border-radius: var(--r-md);
  padding: .75rem;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.cpos-simulate-btn:hover {
  background: rgba(45, 212, 191, .18);
}

/* Guest Modal */
.cpos-guest-offer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--color-primary-light);
  border: 1px solid rgba(26, 86, 219, .12);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-3) 0;
}

.cpos-guest-offer__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}

.cpos-guest-offer__vendor {
  font-size: .88rem;
  font-weight: 800;
  color: var(--color-dark);
}

.cpos-guest-offer__detail {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Receipt Modal */
.cpos-receipt {
  background: var(--color-surface-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  font-size: .88rem;
}

.cpos-receipt-header {
  text-align: center;
  margin-bottom: var(--sp-3);
}

.cpos-receipt-logo {
  font-size: 1.2rem;
  font-weight: 900;
}

.cpos-receipt-logo .brand-x {
  color: var(--color-accent-dark);
}

.cpos-receipt-date {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-top: .2rem;
}

.cpos-receipt-divider {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: var(--sp-3) 0;
}

.cpos-receipt-divider::before,
.cpos-receipt-divider::after {
  content: '';
  flex: 1;
  border-top: 1px dashed var(--color-border);
}

.cpos-receipt-divider span {
  font-size: .7rem;
  font-weight: 800;
  color: var(--color-text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cpos-receipt-rows {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.cpos-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .83rem;
}

.cpos-receipt-row span {
  color: var(--color-text-muted);
}

.cpos-receipt-row strong {
  color: var(--color-dark);
  font-weight: 700;
}

.cpos-receipt-save-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-success-light);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-3) 0;
  font-weight: 700;
  font-size: .85rem;
  color: #15803D;
}

.cpos-receipt-save-amount {
  font-size: 1.2rem;
  font-weight: 900;
}

.cpos-receipt-footer {
  text-align: center;
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-top: var(--sp-2);
}

.cpos-receipt-id {
  text-align: center;
  font-size: .65rem;
  color: var(--color-border);
  margin-top: .2rem;
  font-family: monospace;
}

.cpos-receipt-actions {
  display: flex;
  gap: var(--sp-3);
}

.cpos-receipt-actions>* {
  flex: 1;
  justify-content: center;
}

/* Branch Modal */
.cpos-modal--branch {}

.cpos-branch-form .form-group {
  margin-bottom: var(--sp-3);
}

/* Slide-in animation for panels */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cpos-slide-in {
  animation: slideIn .2s ease;
}

/* ── Scanner Section ──────────────────────────────────────── */
.cpos-scanner-section {
  margin-top: var(--sp-4);
}

.cpos-scanner-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--color-border);
  transition: all var(--t-base);
}

.cpos-scanner--scanning {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .12), 0 8px 32px rgba(26, 86, 219, .08);
}

.cpos-scanner-viewfinder {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  background: var(--color-dark);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpos-scanner-corners {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.cpos-scanner-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--color-primary);
  border-style: solid;
}

.cpos-scanner-corner--tl {
  top: 8px;
  left: 8px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.cpos-scanner-corner--tr {
  top: 8px;
  right: 8px;
  border-width: 3px 3px 0 0;
  border-radius: 0 4px 0 0;
}

.cpos-scanner-corner--bl {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 4px;
}

.cpos-scanner-corner--br {
  bottom: 8px;
  right: 8px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

.cpos-scanner-placeholder {
  text-align: center;
  color: rgba(255, 255, 255, .6);
  z-index: 1;
}

.cpos-scanner-placeholder i {
  font-size: 3.5rem;
  color: rgba(255, 255, 255, .15);
  margin-bottom: var(--sp-3);
  display: block;
}

.cpos-scanner-placeholder p {
  font-size: var(--font-lg);
  font-weight: 700;
  color: rgba(255, 255, 255, .8);
  margin-bottom: var(--sp-1);
}

.cpos-scanner-placeholder span {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .4);
}

.cpos-scanner-scanline {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--color-primary);
  opacity: 0;
  top: 20%;
  z-index: 3;
  border-radius: var(--r-full);
  box-shadow: 0 0 12px var(--color-primary), 0 0 24px rgba(26, 86, 219, .4);
  transition: opacity .3s;
}

.cpos-scanner-scanline--active {
  opacity: 1;
  animation: scanMove 1.2s ease-in-out;
}

@keyframes scanMove {
  0% {
    top: 20%;
    opacity: 1;
  }

  50% {
    top: 80%;
    opacity: .8;
  }

  100% {
    top: 20%;
    opacity: 0;
  }
}

.cpos-scan-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .75rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--r-full);
  font-size: var(--font-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
}

.cpos-scan-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 86, 219, .45);
}

.cpos-scan-btn:active {
  transform: translateY(0);
}

/* ── Scan Result ── */
.cpos-scan-result {
  margin-top: var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  animation: slideIn .3s ease;
}

.cpos-scan-result-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--gradient-teal-fade);
  border-bottom: 1px solid var(--color-border-light);
}

.cpos-scan-result-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background: var(--color-success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cpos-scan-result-header h4 {
  font-size: var(--font-base);
  font-weight: 700;
  margin: 0;
}

.cpos-scan-result-header p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.cpos-scan-result-badge {
  margin-inline-start: auto;
  padding: .2rem .75rem;
  border-radius: var(--r-full);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.cpos-scan-result-badge--active {
  background: rgba(34, 197, 94, .12);
  color: var(--color-success);
}

.cpos-scan-result-badge--inactive {
  background: rgba(239, 68, 68, .12);
  color: var(--color-danger);
}

.cpos-scan-result-body {
  padding: var(--sp-4);
}

.cpos-scan-customer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.cpos-scan-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}

.cpos-scan-info h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin: 0 0 2px;
}

.cpos-scan-info p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.cpos-scan-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: var(--sp-3);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
}

.cpos-scan-meta-item {
  text-align: center;
}

.cpos-scan-meta-label {
  display: block;
  font-size: .65rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}

.cpos-scan-meta-val {
  display: block;
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text);
}

.cpos-scan-discount {
  background: var(--gradient-card);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.cpos-scan-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .8rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--r-full);
  font-size: var(--font-sm);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.cpos-scan-discount-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-scan-discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

.cpos-scan-discount-row strong {
  font-size: var(--font-base);
  color: var(--color-text);
  font-weight: 700;
}

.cpos-scan-discount-row--save strong {
  color: var(--color-success);
}

.cpos-scan-discount-row--total {
  padding-top: var(--sp-2);
  border-top: 1px solid var(--color-border-light);
}

.cpos-scan-discount-row--total strong {
  font-size: var(--font-lg);
  color: var(--color-primary);
}

.cpos-scan-actions {
  display: flex;
  gap: var(--sp-3);
}

.cpos-scan-actions .cpos-apply-btn {
  flex: 1;
  justify-content: center;
}

.cpos-scan-cancel {
  padding: .7rem 1.25rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.cpos-scan-cancel:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background: rgba(239, 68, 68, .06);
}

/* ── Secondary Options ── */
.cpos-secondary-options {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.cpos-secondary-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .7rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
}

.cpos-secondary-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(26, 86, 219, .04);
}

/* ── Manual Lookup Modal ── */
.cpos-modal--lookup {
  max-width: 480px;
}

.cpos-modal--lookup .cpos-lookup-row {
  margin-bottom: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {

  .cpos-cashier-name,
  .cpos-topbar__time {
    display: none;
  }
}

@media (max-width: 640px) {
  .cpos-topbar {
    padding: .65rem var(--sp-3);
  }

  /* replaced by bottom nav on mobile */
  .cpos-method-grid {
    grid-template-columns: 1fr;
  }

  .cpos-form-row {
    grid-template-columns: 1fr;
  }

  .cpos-report-grid {
    grid-template-columns: 1fr;
  }

  .cpos-secondary-options {
    flex-direction: column;
  }

  .cpos-scan-meta {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .cpos-scan-actions {
    flex-direction: column;
  }

  .cpos-lookup-row {
    flex-direction: column;
  }

  .cpos-receipt-actions {
    flex-direction: column;
  }

  .cpos-login-card {
    padding: var(--sp-5);
  }

  .cpos-customer-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .cpos-method-card {
    padding: var(--sp-3);
  }

  .cpos-method-card__icon {
    width: 38px;
    height: 38px;
    font-size: .95rem;
  }

  .cpos-code-char {
    width: 38px;
    height: 48px;
    font-size: 1.3rem;
  }
}

/* ── Clean POS Styles ────────────────────────────────────────── */
.cpos-menu-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-base);
  font-size: 1rem;
}

.cpos-menu-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cpos-topbar__menu-wrap {
  position: relative;
}

.cpos-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 100;
  padding: var(--sp-1);
}

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

.cpos-menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: .6rem 1rem;
  border: none;
  border-radius: var(--r-md);
  background: none;
  color: var(--color-text);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
}

.cpos-menu-item:hover {
  background: var(--color-surface-alt);
}

.cpos-menu-item--danger {
  color: var(--color-danger);
}

.cpos-menu-item--danger:hover {
  background: rgba(239, 68, 68, .08);
}

.cpos-menu-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--sp-1) 0;
}

/* Vendor bar */
.cpos-vendor-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  margin-bottom: var(--sp-4);
}

.cpos-vendor-bar__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-lg);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cpos-vendor-bar h2 {
  font-size: var(--font-xl);
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.cpos-vendor-bar p {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .7);
  margin: 0;
}

.cpos-vendor-bar__badge {
  margin-inline-start: auto;
  padding: .35rem .9rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  font-weight: 800;
  font-size: var(--font-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bill input */
.cpos-bill-section {
  margin-bottom: var(--sp-4);
}

.cpos-bill-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-1);
}

.cpos-bill-input {
  width: 100%;
  padding: .8rem 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  border: 2px solid var(--color-border);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: all var(--t-base);
}

.cpos-bill-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .1);
}

/* Scanner */
.cpos-scanner {
  margin-bottom: var(--sp-4);
}

.cpos-scanner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  transition: all var(--t-base);
}

.cpos-scanner__stage {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  background: var(--color-dark);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all var(--t-base);
}

.cpos-scanner__stage--scanning {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 40px rgba(26, 86, 219, .06);
}

.cpos-scanner__idle {
  text-align: center;
  z-index: 1;
}

.cpos-scanner__ring {
  width: 5rem;
  height: 5rem;
  border-radius: var(--r-full);
  border: 2px dashed rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  font-size: 2rem;
  color: rgba(255, 255, 255, .15);
}

.cpos-scanner__title {
  font-size: var(--font-base);
  font-weight: 700;
  color: rgba(255, 255, 255, .8);
  margin: 0 0 var(--sp-1);
}

.cpos-scanner__hint {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .4);
  margin: 0;
}

.cpos-scanner__scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--color-primary);
  opacity: 0;
  z-index: 2;
  border-radius: var(--r-full);
  box-shadow: 0 0 12px var(--color-primary);
  transition: opacity .2s;
}

.cpos-scanner__scanline--active {
  opacity: 1;
  animation: cposScanMove 1s ease-in-out;
}

@keyframes cposScanMove {
  0% {
    top: 15%;
    opacity: 1;
  }

  50% {
    top: 85%;
    opacity: .7;
  }

  100% {
    top: 15%;
    opacity: 0;
  }
}

.cpos-scanner__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .7rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--r-full);
  font-size: var(--font-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: var(--shadow-blue);
}

.cpos-scanner__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 86, 219, .4);
}

/* Scan card */
.cpos-scan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--sp-4);
  animation: cposFadeIn .3s ease;
}

@keyframes cposFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cpos-scan-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--gradient-teal-fade);
  border-bottom: 1px solid var(--color-border-light);
}

.cpos-scan-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-full);
  background: var(--color-success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cpos-scan-card__head h4 {
  font-size: var(--font-sm);
  font-weight: 700;
  margin: 0;
}

.cpos-scan-card__head p {
  font-size: .7rem;
  color: var(--color-text-muted);
  margin: 0;
}

.cpos-scan-card__tag {
  margin-inline-start: auto;
  padding: .2rem .7rem;
  border-radius: var(--r-full);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cpos-scan-card__tag--active {
  background: rgba(34, 197, 94, .12);
  color: var(--color-success);
}

.cpos-scan-card__tag--inactive {
  background: rgba(239, 68, 68, .12);
  color: var(--color-danger);
}

.cpos-scan-card__body {
  padding: var(--sp-4);
}

.cpos-scan-card__user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.cpos-scan-card__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.cpos-scan-card__user h3 {
  font-size: var(--font-base);
  font-weight: 700;
  margin: 0;
}

.cpos-scan-card__user p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.cpos-scan-card__member {
  font-size: .7rem !important;
}

.cpos-scan-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
  text-align: center;
}

.cpos-scan-card__stat-lbl {
  display: block;
  font-size: .6rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.cpos-scan-card__stat-val {
  display: block;
  font-size: var(--font-sm);
  font-weight: 700;
}

.cpos-scan-card__discount {
  background: var(--gradient-card);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.cpos-scan-card__badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .7rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.cpos-scan-card__prices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.cpos-scan-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

.cpos-scan-card__row strong {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text);
}

.cpos-scan-card__row--green strong {
  color: var(--color-success);
}

.cpos-scan-card__row--total {
  padding-top: var(--sp-1);
  border-top: 1px solid var(--color-border-light);
  margin-top: var(--sp-1);
}

.cpos-scan-card__row--total strong {
  font-size: var(--font-base);
  color: var(--color-primary);
}

.cpos-scan-card__actions {
  display: flex;
  gap: var(--sp-2);
}

.cpos-scan-card__actions>*:first-child {
  flex: 1;
}

/* Buttons */
.cpos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .65rem 1.25rem;
  border-radius: var(--r-lg);
  font-size: var(--font-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
}

.cpos-btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-blue);
}

.cpos-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, .4);
}

.cpos-btn--primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.cpos-btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.cpos-btn--outline:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.cpos-btn--full {
  width: 100%;
}

.cpos-btn--sm {
  padding: .4rem .85rem;
  font-size: .72rem;
}

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

.cpos-btn--ghost:hover {
  border-color: var(--color-border);
  color: var(--color-text);
}

/* Secondary actions */
.cpos-actions {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.cpos-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .6rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
}

.cpos-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(26, 86, 219, .03);
}


/* Slide-over panels */
.cpos-panel--side {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: var(--color-surface);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cpos-panel--side-open {
  transform: translateX(0);
}

.cpos-panel--pushed {
  opacity: .3;
  pointer-events: none;
}

.cpos-panel-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.cpos-panel-side__head h2 {
  font-size: var(--font-base);
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.cpos-panel-side__close {
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-full);
  border: none;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpos-panel-side__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
}

.cpos-store-section {
  margin-bottom: var(--sp-5);
}

.cpos-store-section h3 {
  font-size: var(--font-sm);
  font-weight: 700;
  margin: 0 0 var(--sp-3);
}

.cpos-field {
  margin-bottom: var(--sp-3);
}

.cpos-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

/* Modal body */
.cpos-modal-body {
  padding: var(--sp-4);
}

.cpos-search-row {
  display: flex;
  gap: var(--sp-2);
}

.cpos-search-row input {
  flex: 1;
}

/* Badges */
.cpos-badge {
  padding: .2rem .65rem;
  border-radius: var(--r-full);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cpos-badge--active {
  background: rgba(34, 197, 94, .12);
  color: var(--color-success);
}

.cpos-badge--inactive {
  background: rgba(239, 68, 68, .12);
  color: var(--color-danger);
}

.cpos-badge--warning {
  background: rgba(245, 158, 11, .15);
  color: var(--color-warning);
}

.cpos-badge--sm {
  font-size: .7rem;
}

/* Manual lookup card */
.cpos-mcard {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
}

.cpos-mcard__top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.cpos-mcard__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.cpos-mcard__top h4 {
  font-size: var(--font-sm);
  font-weight: 700;
  margin: 0;
}

.cpos-mcard__top p {
  font-size: .7rem;
  color: var(--color-text-muted);
  margin: 0;
}

.cpos-mcard__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-2);
  text-align: center;
  margin-bottom: var(--sp-3);
  padding: var(--sp-2);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
}

.cpos-mcard__lbl {
  display: block;
  font-size: .6rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.cpos-mcard__stats strong {
  font-size: var(--font-sm);
}

.cpos-mcard__discount {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-2);
  background: var(--gradient-card);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
}

.cpos-mcard__discount>div {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

.cpos-green {
  color: var(--color-success);
}

.cpos-muted {
  color: var(--color-text-muted);
}

/* Offer preview (guest) */
.cpos-offer-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--gradient-card);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
}

.cpos-offer-preview i {
  color: var(--color-primary);
}

.cpos-offer-preview p {
  margin: 0;
  font-size: var(--font-sm);
}

/* Report txt rows */
.cpos-txn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--font-sm);
}

.cpos-txn-row:last-child {
  border: none;
}

.cpos-txn-info p {
  margin: 0;
}

.cpos-txn-time {
  font-size: .65rem;
  color: var(--color-text-muted);
}

.cpos-txn-save {
  text-align: end;
}

.cpos-txn-save p {
  margin: 0;
  font-weight: 700;
}

.cpos-txn-save p:last-child {
  font-size: .7rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ── Topbar Nav Links ────────────────────────────────────────── */

.cpos-navlink {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: var(--r-lg);
  background: none;
  border: none;
  color: rgba(255, 255, 255, .5);
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.cpos-navlink:hover {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .8);
}

.cpos-navlink.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.cpos-navlink i {
  font-size: .75rem;
}

/* ── Detail View ──────────────────────────────────────────────── */
.cpos-detail-field {
  margin-bottom: var(--sp-3);
}

.cpos-detail-field label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: var(--sp-1);
}

.cpos-detail-val {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-text);
  display: block;
}

.cpos-detail-input {
  width: 100%;
  padding: .55rem .75rem;
  font-size: var(--font-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color .2s;
}

.cpos-detail-input:focus {
  border-color: var(--color-primary);
}

.cpos-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.cpos-detail-card__foot {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
}

.cpos-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.cpos-detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.cpos-detail-card--full {
  grid-column: 1 / -1;
}

.cpos-detail-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface-alt);
}

.cpos-detail-card__head i {
  color: var(--color-primary);
}

.cpos-detail-card__body {
  padding: var(--sp-3);
}

.cpos-detail-card__body h3 {
  font-size: var(--font-base);
  font-weight: 800;
  margin: 0;
}

.cpos-detail-card__body p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: var(--sp-1) 0 0;
}

/* ── Offers View ──────────────────────────────────────────────── */
.cpos-offers-toolbar {
  margin-bottom: var(--sp-4);
}

.cpos-offers-subhead {
  font-size: var(--font-sm);
  font-weight: 700;
  margin: var(--sp-4) 0 var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.cpos-offers-subhead i {
  color: var(--color-primary);
}

.cpos-offers-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.cpos-offer-empty {
  text-align: center;
  padding: var(--sp-4);
  color: var(--color-text-muted);
}

.cpos-offer-empty i {
  font-size: 1.5rem;
  color: var(--color-border);
  display: block;
  margin-bottom: var(--sp-2);
}

.cpos-offer-empty p {
  font-size: var(--font-sm);
  margin: 0;
}

.cpos-offer-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.cpos-offer-card--default {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.cpos-offer-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
}

.cpos-offer-card__info h4 {
  font-size: var(--font-sm);
  font-weight: 700;
  margin: 0;
}

.cpos-offer-card__info p {
  font-size: .7rem;
  color: var(--color-text-muted);
  margin: var(--sp-1) 0 0;
}

.cpos-offer-card__pct {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--color-primary);
}

.cpos-offer-card__body {
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cpos-offer-card__terms {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin: 0;
  flex: 1;
}

.cpos-offer-card__actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
  align-items: center;
}

.cpos-offer-card__footer {
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
}

.cpos-offer-card__footer button {
  background: none;
  border: none;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .5rem;
  border-radius: var(--r-md);
  transition: background .2s;
}

.cpos-offer-card__footer button:hover {
  background: var(--color-surface-alt);
}

.cpos-offer-card__footer button.cpos-text-danger {
  color: var(--color-danger);
}

.cpos-offer-card__footer button.cpos-text-danger:hover {
  background: rgba(239, 68, 68, .08);
}

/* ── QR Payment ──────────────────────────────────────────────── */
.cpos-qrpay {
  margin-bottom: var(--sp-4);
}

.cpos-qrpay__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
  margin-bottom: var(--sp-2);
  user-select: none;
  cursor: pointer;
}

.cpos-qrpay__head span:first-child {
  font-size: var(--font-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.cpos-qrpay__head span:first-child i {
  color: var(--color-primary);
}

.cpos-qrpay__badge {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .15rem .5rem;
  border-radius: var(--r-full);
  background: var(--color-primary);
  color: white;
}

.cpos-qrpay__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.cpos-qrpay__body--open {
  max-height: 600px;
}

.cpos-qrpay__desc {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--sp-3);
}

.cpos-qrpay__display {
  margin-top: var(--sp-4);
  text-align: center;
  animation: cposFadeIn .3s ease;
}

.cpos-qrpay__qrcode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
  background: white;
  border-radius: var(--r-xl);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}

.cpos-qrpay__qrcode canvas,
.cpos-qrpay__qrcode img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

.cpos-qrpay__meta {
  margin-bottom: var(--sp-3);
}

.cpos-qrpay__code {
  display: block;
  font-size: .75rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.cpos-qrpay__timer {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  padding: .25rem .8rem;
  border-radius: var(--r-full);
  background: var(--color-danger);
  color: white;
}

.cpos-qrpay__actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
}

/* QR Offer modal */
#qrOfferList .cpos-offer-card {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

#qrOfferList .cpos-offer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#qrOfferList .cpos-offer-card.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* ── POS Redesign ────────────────────────────────────────────── */
.cpos-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
}

.cpos-step {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: .35rem .7rem;
  border-radius: var(--r-full);
  font-size: .7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  transition: all .2s;
}

.cpos-step.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.cpos-step__num {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 800;
  background: rgba(0, 0, 0, .1);
  color: inherit;
  flex-shrink: 0;
}

.cpos-step.active .cpos-step__num {
  background: rgba(255, 255, 255, .2);
}

.cpos-pos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.cpos-pos-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cpos-pos-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cpos-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.cpos-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--color-border-light);
}

.cpos-card__body {
  padding: var(--sp-4);
}

.cpos-card__label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

.cpos-card--bill {
  border-color: var(--color-primary);
  border-width: 1.5px;
}

.cpos-card--result {
  border-color: var(--color-success);
}

.cpos-card--welcome {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
}

.cpos-bill-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  padding: .3rem .5rem .3rem 1rem;
  border: 1px solid var(--color-border);
}

.cpos-bill-currency {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  flex-shrink: 0;
}

.cpos-bill-wrap .cpos-bill-input {
  border: none;
  background: none;
  font-size: 1.8rem;
  font-weight: 900;
  padding: .5rem 0;
  flex: 1;
  outline: none;
  color: var(--color-text);
}

/* Toggle group */
.cpos-toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cpos-toggle-btn {
  flex: 1;
  padding: .5rem 1rem;
  border: none;
  background: var(--color-surface);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--t-base);
}

.cpos-toggle-btn:not(:last-child) {
  border-inline-end: 1px solid var(--color-border);
}

.cpos-toggle-btn.active {
  background: var(--gradient-primary);
  color: #fff;
}

.cpos-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .65rem;
  border-radius: var(--r-full);
  font-size: .7rem;
  font-weight: 700;
}

.cpos-chip--success {
  background: rgba(34, 197, 94, .12);
  color: var(--color-success);
}

.cpos-chip--info {
  background: rgba(26, 86, 219, .1);
  color: var(--color-primary);
}

.cpos-result-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.cpos-result-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.cpos-result-user h3 {
  font-size: var(--font-base);
  font-weight: 700;
  margin: 0;
}

.cpos-result-user p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.cpos-result-member {
  font-size: .7rem !important;
}

.cpos-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-3);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
}

.cpos-result-stat-lbl {
  display: block;
  font-size: .6rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.cpos-result-stats strong {
  font-size: var(--font-sm);
}

.cpos-result-pricing {
  background: var(--gradient-card);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.cpos-result-pricing__head {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .7rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

.cpos-result-pricing__rows {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.cpos-result-pricing__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

.cpos-result-pricing__row strong {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text);
}

.cpos-result-pricing__row--save strong {
  color: var(--color-success);
}

.cpos-result-pricing__row--total {
  padding-top: var(--sp-1);
  border-top: 1px solid var(--color-border-light);
  margin-top: var(--sp-1);
}

.cpos-result-pricing__row--total strong {
  font-size: var(--font-base);
  color: var(--color-primary);
}

.cpos-result-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-welcome-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--r-full);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  font-size: 1.5rem;
  color: var(--color-primary);
}

.cpos-card--welcome h3 {
  font-size: var(--font-lg);
  font-weight: 800;
  margin: 0 0 var(--sp-1);
}

.cpos-card--welcome p {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--sp-4);
}

.cpos-welcome-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-border-light);
}

.cpos-welcome-stats>div {
  text-align: center;
}

.cpos-welcome-stats strong {
  display: block;
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--color-primary);
}

.cpos-welcome-stats span {
  font-size: .65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 800px) {
  .cpos-pos-grid {
    grid-template-columns: 1fr;
  }

  .cpos-steps {
    gap: 2px;
  }

  .cpos-step {
    padding: .3rem .5rem;
    font-size: .65rem;
  }

  .cpos-step__lbl {
    display: none;
  }
}

/* Responsive for clean POS */
@media (max-width: 900px) {
  .cpos-navlink span {
    display: none;
  }

  .cpos-navlink {
    padding: .4rem .5rem;
  }
}

@media (max-width: 640px) {
  .cpos-row {
    grid-template-columns: 1fr;
  }

  .cpos-actions {
    flex-direction: column;
  }

  .cpos-scan-card__stats {
    grid-template-columns: 1fr;
  }

  .cpos-scan-card__actions {
    flex-direction: column;
  }

  .cpos-panel--side {
    max-width: 100%;
  }

  .cpos-menu-dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }

  .cpos-detail-grid {
    grid-template-columns: 1fr;
  }

  .cpos-detail-row {
    grid-template-columns: 1fr;
  }

  .cpos-offer-card__body {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  .cpos-qrpay__actions {
    flex-direction: column;
  }

  .cpos-qrpay__qrcode {
    width: 160px;
    height: 160px;
  }
}

/* ── Demo POS ──────────────────────────────────────────── */
.cpos-pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  margin-bottom: var(--sp-4);
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.cpos-pos-header__info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.cpos-pos-header__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-lg);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cpos-pos-header__info h2 {
  font-size: var(--font-lg);
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.cpos-pos-header__info p {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, .7);
  margin: 0;
}

.cpos-pos-header__stats {
  display: flex;
  gap: var(--sp-4);
}

.cpos-pos-hstat {
  text-align: center;
}

.cpos-pos-hstat__val {
  display: block;
  font-size: var(--font-base);
  font-weight: 800;
  color: #fff;
}

.cpos-pos-hstat__lbl {
  display: block;
  font-size: .65rem;
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .04em;
}

.cpos-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.cpos-demo-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cpos-demo-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cpos-demo-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  transition: box-shadow .2s;
}

.cpos-demo-card:focus-within {
  border-color: var(--color-primary);
}

.cpos-demo-card--bill {
  border-color: var(--color-primary);
  border-width: 1.5px;
}

.cpos-demo-card--calc {
  background: var(--gradient-card);
}

.cpos-demo-card__label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.cpos-demo-card__label i {
  color: var(--color-primary);
}

/* Customer Selector */
.cpos-demo-customer {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-demo-select {
  width: 100%;
  padding: .75rem 1rem;
  font-size: .95rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-inline-end: 2.5rem;
}

.cpos-demo-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .1);
}

.cpos-demo-customer__status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .5rem .75rem;
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  font-size: .85rem;
  font-weight: 600;
}

.cpos-demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cpos-demo-dot--active {
  background: var(--color-success);
}

.cpos-demo-dot--expired {
  background: var(--color-danger);
}

.cpos-demo-customer__meta {
  margin-inline-start: auto;
  font-size: .72rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Bill Input */
.cpos-demo-bill {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-surface-alt);
  border-radius: var(--r-lg);
  padding: .3rem .5rem .3rem 1rem;
  border: 1px solid var(--color-border);
}

.cpos-demo-currency {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  flex-shrink: 0;
}

.cpos-demo-bill__input {
  border: none;
  background: none;
  font-size: 2rem;
  font-weight: 900;
  padding: .5rem 0;
  flex: 1;
  outline: none;
  color: var(--color-text);
  width: 100%;
}

.cpos-demo-bill__input::placeholder {
  color: var(--color-border);
}

/* Tier Ladder */
.cpos-demo-ladder {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-demo-ladder__empty {
  text-align: center;
  padding: var(--sp-3);
  color: var(--color-text-muted);
  font-size: .8rem;
}

.cpos-demo-ladder__empty i {
  font-size: 1.2rem;
  color: var(--color-border);
  display: block;
  margin-bottom: var(--sp-1);
}

.cpos-demo-tier {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: .6rem .8rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface-alt);
  transition: all .2s;
  position: relative;
  overflow: hidden;
}

.cpos-demo-tier::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  transition: background .2s;
}

.cpos-demo-tier:nth-child(1)::before {
  background: var(--color-warning);
}

.cpos-demo-tier:nth-child(2)::before {
  background: var(--color-primary);
}

.cpos-demo-tier:nth-child(3)::before {
  background: var(--color-accent);
}

.cpos-demo-tier:nth-child(4)::before {
  background: var(--color-text-muted);
}

.cpos-demo-tier--active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
  background: rgba(26, 86, 219, .04);
}

.cpos-demo-tier--active::before {
  width: 4px;
  box-shadow: 0 0 8px currentColor;
}

.cpos-demo-tier--active:nth-child(1)::before {
  background: #F59E0B;
  box-shadow: 0 0 8px #F59E0B;
}

.cpos-demo-tier--active:nth-child(2)::before {
  background: var(--color-primary);
  box-shadow: 0 0 8px rgba(26, 86, 219, .6);
}

.cpos-demo-tier--active:nth-child(3)::before {
  background: var(--color-accent-dark);
  box-shadow: 0 0 8px rgba(45, 212, 191, .6);
}

.cpos-demo-tier__icon {
  width: 26px;
  height: 26px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  flex-shrink: 0;
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.cpos-demo-tier--active .cpos-demo-tier__icon {
  background: var(--color-primary);
  color: #fff;
}

.cpos-demo-tier--active:nth-child(1) .cpos-demo-tier__icon {
  background: #F59E0B;
}

.cpos-demo-tier--active:nth-child(2) .cpos-demo-tier__icon {
  background: var(--color-primary);
}

.cpos-demo-tier--active:nth-child(3) .cpos-demo-tier__icon {
  background: var(--color-accent-dark);
}

.cpos-demo-tier__info {
  flex: 1;
  min-width: 0;
}

.cpos-demo-tier__pct {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text);
}

.cpos-demo-tier__pct small {
  font-weight: 600;
  font-size: .72rem;
  color: var(--color-text-muted);
}

.cpos-demo-tier__range {
  font-size: .7rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.cpos-demo-tier__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
  background: var(--color-surface);
  color: transparent;
  transition: all .2s;
}

.cpos-demo-tier--active .cpos-demo-tier__check {
  background: var(--color-success);
  color: #fff;
}

/* Payment Methods */
.cpos-demo-payment {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
}

.cpos-demo-pay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .75rem .5rem;
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  cursor: pointer;
  transition: all .2s;
  font-size: .7rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.cpos-demo-pay-btn i {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  transition: color .2s;
}

.cpos-demo-pay-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cpos-demo-pay-btn:hover i {
  color: var(--color-primary);
}

.cpos-demo-pay-btn.active {
  border-color: var(--color-primary);
  background: rgba(26, 86, 219, .06);
  color: var(--color-primary);
}

.cpos-demo-pay-btn.active i {
  color: var(--color-primary);
}

/* Calculation */
.cpos-demo-calc__empty {
  text-align: center;
  padding: var(--sp-4);
  color: var(--color-text-muted);
  font-size: .85rem;
}

.cpos-demo-calc__empty i {
  font-size: 1.5rem;
  color: var(--color-border);
  display: block;
  margin-bottom: var(--sp-2);
}

.cpos-demo-calc__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cpos-demo-calc__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  color: var(--color-text-muted);
}

.cpos-demo-calc__row strong {
  font-weight: 700;
  color: var(--color-text);
  font-size: 1rem;
}

.cpos-demo-calc__row--discount strong {
  color: var(--color-primary);
}

.cpos-demo-calc__row--save strong {
  color: var(--color-success);
  font-weight: 800;
}

.cpos-demo-calc__row--total {
  padding-top: var(--sp-1);
}

.cpos-demo-calc__row--total strong {
  font-size: 1.15rem;
  color: var(--color-primary);
  font-weight: 900;
}

.cpos-demo-calc__divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--sp-1) 0;
}

.cpos-demo-calc__offer {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: var(--sp-1);
  padding: .4rem .6rem;
  background: var(--color-surface);
  border-radius: var(--r-md);
  font-size: .75rem;
  color: var(--color-text-muted);
}

.cpos-demo-calc__offer i {
  color: var(--color-primary);
}

/* Action Buttons */
.cpos-demo-actions {
  display: flex;
  gap: var(--sp-2);
}

.cpos-demo-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .85rem 1.25rem;
  border-radius: var(--r-lg);
  font-size: .95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .2s;
}

.cpos-demo-btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.cpos-demo-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, .4);
}

.cpos-demo-btn--primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.cpos-demo-btn--ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.cpos-demo-btn--ghost:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* ── Action Buttons Toolbar ── */
.cpos-demo-card--actions {
  background: var(--surface-alt);
}

.cpos-demo-actions-toolbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.cpos-demo-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--sp-3) var(--sp-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all .15s;
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

.cpos-demo-action-btn i {
  font-size: 1.15rem;
  color: var(--color-primary);
}

.cpos-demo-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
  background: var(--surface-hover);
}

/* ── QR Display ── */
.cpos-demo-qr {
  margin-top: var(--sp-3);
}

.cpos-demo-qr__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px dashed var(--color-primary);
  border-radius: var(--radius);
  background: var(--surface);
}

.cpos-demo-qr__inner #cposQrCode {
  background: #fff;
  padding: 8px;
  border-radius: 6px;
}

.cpos-demo-qr__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

/* Customer QR scanner (reads the real customer/offer QR) */
.cpos-scan-host {
  width: 100%;
  min-height: 200px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0a1628;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpos-scan-host video,
.cpos-scan-host canvas {
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
  border-radius: var(--r-md);
}

.cpos-scan-status {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin: 2px 0;
}

.cpos-scan-file {
  cursor: pointer;
}

.cpos-demo-qr__info #cposQrTimer {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

/* Responsive */
@media (max-width: 800px) {
  .cpos-demo-grid {
    grid-template-columns: 1fr;
  }

  .cpos-pos-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cpos-pos-header__stats {
    width: 100%;
    justify-content: space-around;
  }

  .cpos-demo-payment {
    grid-template-columns: repeat(2, 1fr);
  }

  .cpos-demo-actions-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .cpos-demo-actions {
    flex-direction: column;
  }

  .cpos-demo-actions-toolbar {
    grid-template-columns: 1fr;
  }
}

/* ────────────────────────────────────────────────────────
   ORDERS PAGE (always LTR, left-spine timeline)
   ──────────────────────────────────────────────────────── */

/* ── Section ── */
#view-orders {
  padding-top: 20px;
}

/* ── Empty State ── */
.o-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16) var(--sp-6);
  text-align: center;
  min-height: 50vh;
}

.o-empty__icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--r-full);
  background: var(--gradient-teal-fade);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: var(--sp-5);
}

.o-empty__title {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: var(--sp-2);
}

.o-empty__text {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  max-width: 20rem;
  margin-bottom: var(--sp-6);
  line-height: 1.6;
}

.o-empty__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.75rem;
  font-size: var(--font-sm);
  font-weight: 700;
  color: white;
  background: var(--gradient-primary);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-blue);
  transition: all var(--t-base);
  text-decoration: none;
}

.o-empty__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(26, 86, 219, 0.5);
}

/* ── Hero Header (dark gradient + glass stats, always LTR) ── */
.o-hero {
  position: relative;
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--gradient-hero);
}

.o-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.o-hero__inner {
  position: relative;
  z-index: 1;
}

.o-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.o-hero__title {
  font-size: var(--font-xl);
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: -0.03em;
}

.o-hero__badge {
  font-size: var(--font-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.o-hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

.o-hero__stat {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-2) var(--sp-3);
  transition: all var(--t-base);
}

.o-hero__stat:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.o-hero__stat-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.o-hero__stat-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.o-hero__stat-label {
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.o-hero__stat-value {
  font-size: var(--font-base);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ── Timeline Container (always LTR) ── */
.o-timeline {
  padding: 0 var(--page-pad) var(--sp-4);
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

/* ════════════════════════════════════════════════════════
   VERTICAL TIMELINE – left spine, cards on right
   (All screen sizes – no RTL flip, no center spine)
   ════════════════════════════════════════════════════════ */
.o-timeline__track {
  position: relative;
  padding-inline-start: 2.5rem;
}

/* Spine line on left */
.o-timeline__track::before {
  content: '';
  position: absolute;
  left: 0.6875rem;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent), transparent);
  border-radius: var(--r-full);
  opacity: 0.15;
}

/* ── Card ── */
.order-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding-bottom: var(--sp-6);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.order-card:last-child {
  padding-bottom: 0;
}

/* Timeline node (dot + date) left of card */
.order-card__node {
  position: absolute;
  left: -1.8125rem;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 1.375rem;
  z-index: 3;
}

.order-card__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: var(--r-full);
  background: var(--gradient-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .15), 0 0 12px rgba(26, 86, 219, .1);
  transition: all var(--t-bounce);
}

.order-card:hover .order-card__dot {
  transform: scale(1.35);
  box-shadow: 0 0 0 6px rgba(26, 86, 219, .2), 0 0 20px rgba(26, 86, 219, .15);
}

.order-card__date {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

/* ── Card body – 38/62 horizontal split ── */
.order-card__body {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-base);
  position: relative;
  z-index: 2;
}

.order-card:hover .order-card__body {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Cover – left 38% */
.order-card__cover {
  width: 38%;
  flex: 0 0 38%;
  min-height: 5rem;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}

/* Badge – inline pill inside prices (always in LTR flow) */
.order-card__badge {
  display: inline-flex;
  align-items: center;
  background: var(--gradient-primary);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--r-full);
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Content – right 62% */
.order-card__content {
  flex: 1;
  min-width: 0;
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
}

.order-card__vendor {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.order-card__category {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin: 0;
  font-weight: 500;
}

.order-card__prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: var(--sp-1);
}

.order-card__original {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.order-card__saved {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-success);
}

/* ═══ TABLET+: CENTER SPINE ALTERNATING ═══ */
@media (min-width: 800px) {
  .o-hero {
    padding: var(--sp-4) var(--sp-6);
    margin-bottom: var(--sp-8);
  }

  .o-hero__title {
    font-size: var(--font-2xl);
  }

  .o-hero__stats {
    gap: var(--sp-3);
  }

  .o-hero__stat {
    padding: var(--sp-2) var(--sp-4);
  }

  .o-hero__stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9375rem;
  }

  .o-hero__stat-value {
    font-size: var(--font-lg);
  }

  .o-timeline {
    padding: 0 var(--sp-8) var(--sp-6);
  }

  /* ── Track: switch to center spine ── */
  .o-timeline__track {
    padding-inline-start: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    position: relative;
  }

  /* Hide mobile left spine */
  .o-timeline__track::before {
    display: none;
  }

  /* Center spine */
  .o-timeline__track::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent), transparent);
    transform: translateX(-50%);
    opacity: 0.15;
    pointer-events: none;
  }

  /* ── Cards alternate left/right (always LTR) ── */
  .order-card {
    width: calc(50% - 6rem);
    padding-bottom: 0;
    position: relative;
  }

  .order-card:nth-child(odd) {
    align-self: flex-start;
    margin-inline-start: 3rem;
  }

  .order-card:nth-child(even) {
    align-self: flex-end;
    margin-inline-end: 3rem;
  }

  /* ── Node on center line ── */
  .order-card__node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: auto;
    z-index: 3;
    top: 0.15rem;
  }

  .order-card:nth-child(odd) .order-card__node {
    left: auto;
    right: -3rem;
    transform: translateX(50%);
  }

  .order-card:nth-child(even) .order-card__node {
    left: -3rem;
    right: auto;
    transform: translateX(-50%);
  }

  .order-card__dot {
    width: 0.875rem;
    height: 0.875rem;
    box-shadow: 0 0 0 4px rgba(26, 86, 219, .15), 0 0 16px rgba(26, 86, 219, .12);
  }

  .order-card:hover .order-card__dot {
    box-shadow: 0 0 0 8px rgba(26, 86, 219, .2), 0 0 24px rgba(26, 86, 219, .15);
  }

  .order-card__date {
    font-size: 0.55rem;
  }

  /* ── Connector from card to center spine ── */
  .order-card:nth-child(odd)::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: -3rem;
    width: 3rem;
    height: 2px;
    background: var(--color-primary);
    opacity: 0.1;
    pointer-events: none;
  }

  .order-card:nth-child(even)::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: -3rem;
    width: 3rem;
    height: 2px;
    background: var(--color-primary);
    opacity: 0.1;
    pointer-events: none;
  }

  /* ── Card body ── */
  .order-card__body {
    border-radius: var(--r-xl);
  }

  .order-card:hover .order-card__body {
    transform: translateY(-4px);
  }

  .order-card__content {
    padding: var(--sp-3) var(--sp-4);
  }

  .order-card__vendor {
    font-size: var(--font-lg);
  }

  .order-card__category {
    font-size: var(--font-sm);
  }

  .order-card__saved {
    font-size: var(--font-base);
  }
}

/* ═══ WIDE DESKTOP ═══ */
@media (min-width: 1200px) {
  .o-hero__title {
    font-size: var(--font-2xl);
  }

  .o-hero__stat-value {
    font-size: var(--font-xl);
  }

  .o-timeline {
    padding: 0 var(--sp-10) var(--sp-8);
  }

  .o-timeline__track {
    gap: var(--sp-8);
  }

  .order-card {
    width: calc(50% - 8rem);
  }

  .order-card:nth-child(odd) {
    margin-inline-start: 4rem;
  }

  .order-card:nth-child(even) {
    margin-inline-end: 4rem;
  }

  .order-card:nth-child(odd) .order-card__node {
    right: -4rem;
  }

  .order-card:nth-child(even) .order-card__node {
    left: -4rem;
  }

  .order-card:nth-child(odd)::after {
    right: -4rem;
    width: 4rem;
  }

  .order-card:nth-child(even)::after {
    left: -4rem;
    width: 4rem;
  }

  .order-card__body {
    max-width: 28rem;
  }

  .order-card__content {
    padding: var(--sp-4) var(--sp-5);
  }

  .order-card__vendor {
    font-size: var(--font-xl);
  }

  .order-card__saved {
    font-size: var(--font-lg);
  }
}

/* ── Entry Animation ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.45s ease both;
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {

  .cpos-topbar,
  .cpos-receipt-actions,
  .cpos-modal-header,
  .toast,
  .demo-role-switcher {
    display: none !important;
  }

  .cpos-modal-overlay {
    position: static;
    background: none;
    backdrop-filter: none;
  }

  .cpos-modal {
    box-shadow: none;
    border-radius: 0;
    max-height: none;
  }

  .cpos-receipt {
    border: 1px solid #ccc;
  }
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .cpos-navlink {
    display: none !important;
  }
}

.cpos-tiers-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.cpos-tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--sp-2);
  align-items: center;
}

.cpos-tier-row .form-input {
  padding: .4rem;
  font-size: .8rem;
}

.cpos-tier-remove {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  padding: .4rem;
}

/* ════════════════════════════════════════════════════════════
   LEGAL PAGE (M8) – Privacy / Terms / Refund
   ════════════════════════════════════════════════════════════ */

.legal-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--sp-5) var(--page-pad) 0;
}

.legal-hero {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
}

.legal-hero__title {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  font-weight: 900;
  color: var(--color-dark);
  line-height: 1.25;
  margin-bottom: var(--sp-2);
}

.legal-hero__updated {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.legal-hero__updated i {
  color: var(--color-primary);
}

/* Sticky tab bar — always reachable while reading long legal text */
.legal-tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  overflow-x: auto;
  padding: var(--sp-3) 0;
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
  scrollbar-width: none;
}

.legal-tabs::-webkit-scrollbar { display: none; }

@media (min-width: 900px) {
  .legal-tabs { top: var(--top-nav-h); }
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
  min-height: 44px;
  padding: .6rem 1.05rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-family);
  font-size: clamp(.8rem, 2.5vw, .9rem);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-base);
}

.legal-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.legal-tab i {
  color: var(--color-primary);
  font-size: .9em;
}

.legal-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(10, 22, 40, .14);
}

.legal-tab.active i {
  color: #fff;
}

.legal-doc {
  display: none;
  scroll-margin-top: calc(var(--top-nav-h) + 4.5rem);
}

.legal-doc.active {
  display: block;
}

.legal-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: var(--shadow-sm);
}

.legal-block h2 {
  font-size: clamp(.98rem, 2.5vw, 1.1rem);
  font-weight: 800;
  color: var(--color-primary);
  margin: var(--sp-5) 0 var(--sp-2);
}

.legal-block h2:first-child {
  margin-top: 0;
}

.legal-block p {
  font-size: clamp(.9rem, 2.5vw, .95rem);
  line-height: 1.85;
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-3);
}

.legal-block[dir="rtl"] h2,
.legal-block[dir="rtl"] p {
  text-align: end;
}

.legal-block[dir="rtl"] h2 {
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .legal-wrap {
    padding: var(--sp-4) var(--sp-3) 0;
  }

  .legal-hero {
    padding-bottom: var(--sp-3);
    margin-bottom: var(--sp-3);
  }

  .legal-tabs {
    margin-inline-start: calc(-1 * var(--sp-3));
    margin-inline-end: calc(-1 * var(--sp-3));
    padding-inline-start: var(--sp-3);
    padding-inline-end: var(--sp-3);
  }

  .legal-block {
    border-radius: var(--r-md);
  }
}

@media (max-width: 380px) {
  .legal-tab {
    padding: .55rem .85rem;
  }

  .legal-tab span {
    font-size: .78rem;
  }
}

/* ════════════════════════════════════════════════════════════
   OFFERS PAGE – Compact view tabs
   ════════════════════════════════════════════════════════════ */

.offers-view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px 6px;
  margin: 0 var(--page-pad) var(--sp-3);
  background: var(--color-surface-alt);
  border-radius: var(--r-2xl);
  border: 1px solid var(--color-border-light);
}

.offers-view-tab {
  padding: 6px 14px;
  border: none;
  border-radius: var(--r-xl);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  font-family: inherit;
  white-space: nowrap;
}

.offers-view-tab:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.offers-view-tab.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 6px rgba(26, 86, 219, 0.2);
}

/* ════════════════════════════════════════════════════════════
   OFFERS PAGE – Offer Cards (customer facing)
   ════════════════════════════════════════════════════════════ */

.oc-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: all var(--t-bounce);
  height: 100%;
}

.oc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-glow);
}

.oc-card:active {
  transform: translateY(0) scale(0.98);
}

.oc-card__img {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.oc-card__badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  background: var(--gradient-warm);
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

[dir="rtl"] .oc-card__badge {
  right: auto;
  left: var(--sp-2);
}

.oc-card__body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1;
}

.oc-card__title {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oc-card__vendor {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.oc-card__terms {
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.oc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.oc-card__pct {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-primary);
}

.oc-card__date {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

/* ── Branch checkboxes in cashier form ── */
.cpos-branch-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.cpos-branch-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 6px 12px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: all var(--t-base);
}

.cpos-branch-label:hover {
  border-color: var(--color-primary);
}

.cpos-branch-label input[type="checkbox"] {
  accent-color: var(--color-primary);
}

/* ── Offers empty state ── */
.offers-empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--color-text-muted);
}

.offers-empty-state i {
  font-size: 3rem;
  opacity: .25;
  margin-bottom: 1rem;
  display: block;
}

.offers-empty-state p {
  font-weight: 700;
  font-size: var(--font-lg);
}

/* ── Branch tabs enhanced ── */
.offers-branch-bar {
  padding: 0 var(--page-pad);
  margin-bottom: var(--sp-3);
  margin-top: var(--sp-1);
}

.branch-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 7px 16px;
  border-radius: var(--r-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-base);
  font-family: inherit;
  text-decoration: none;
}

.branch-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.branch-tab.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.2);
}

/* ── Oc-card vendor icon ── */
.oc-card__vendor i {
  margin-inline-end: 4px;
  font-size: .65rem;
}

/* ── Oc-card item price ── */
.oc-card__price {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

.oc-card__price-old {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.oc-card__price-new {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--color-primary);
}

/* ── Cashier offer type toggle ── */
.cpos-type-toggle {
  display: flex;
  gap: 8px;
}

.cpos-type-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-xl);
  background: var(--color-surface-alt);
  border: 2px solid var(--color-border-light);
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--t-base);
  font-family: inherit;
}

.cpos-type-option:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cpos-type-option.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}
/* --------------------------------------------------------
   PAYMENT METHODS PAGE & REDESIGNED CHECKOUT
   -------------------------------------------------------- */

/* --- Payment Methods Page --- */
.pm-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--page-pad);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: var(--z-topnav);
  height: var(--top-nav-h);
}

.pm-topbar-back {
  font-size: var(--font-xl);
  color: var(--color-text-primary);
  text-decoration: none;
}

.pm-topbar-title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
}

.pm-topbar-add {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--font-sm);
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
}

.pm-page-content {
  padding: var(--sp-4) var(--page-pad);
}

.pm-info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.pm-info-banner__icon {
  font-size: var(--font-xl);
  color: var(--color-success);
  margin-top: 2px;
}

.pm-info-banner__title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-1);
}

.pm-info-banner__sub {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* PM Card Items */
.pm-card-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.pm-card-visual {
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  color: white;
  margin-bottom: var(--sp-4);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.pm-card-visual::after {
  content: '';
  position: absolute;
  width: 15rem;
  height: 15rem;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  border-radius: 50%;
  top: -5rem;
  right: -5rem;
  pointer-events: none;
}

.pm-card-visual__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-6);
}

.pm-card-visual__brand {
  font-size: 2rem;
}

.pm-default-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pm-card-visual__number {
  font-size: 1.3rem;
  font-family: monospace;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-5);
}

.pm-card-visual__footer {
  display: flex;
  justify-content: space-between;
}

.pm-card-visual__label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  margin-bottom: 2px;
}

.pm-card-visual__value {
  font-size: var(--font-sm);
  font-weight: 600;
}

.pm-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.pm-action-btn {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  border: none;
  font-size: var(--font-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.pm-action-btn--default {
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
}

.pm-action-btn--delete {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.pm-active-label {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline-end: auto;
}

/* Empty State */
.pm-empty-state {
  text-align: center;
  padding: var(--sp-8) 0;
}

.pm-empty-state__icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
}

.pm-empty-state__title {
  font-size: var(--font-xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-2);
}

.pm-empty-state__sub {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}

.pm-empty-state__btn {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--font-sm);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  box-shadow: var(--shadow-blue);
}

/* Modal */
.pm-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-surface-dark);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
}

.pm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pm-modal {
  background: var(--color-surface);
  width: 100%;
  max-width: var(--mobile-max);
  margin: 0 auto;
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: var(--sp-6);
  transform: translateY(100%);
  transition: transform var(--t-spring);
  max-height: 90vh;
  overflow-y: auto;
}

.pm-modal-overlay.active .pm-modal {
  transform: translateY(0);
}

.pm-modal__handle {
  width: 40px;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-5);
}

.pm-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-5);
}

.pm-modal__title {
  font-size: var(--font-xl);
  font-weight: 900;
}

.pm-modal__subtitle {
  font-size: var(--font-xs);
  color: var(--color-success);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.pm-modal__close {
  background: var(--color-surface-alt);
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.pm-card-preview {
  background: linear-gradient(135deg, #1E3154, #1A56DB);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  color: white;
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-md);
  transition: background 0.4s ease;
}

.pm-card-preview__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-5);
}

.pm-card-preview__chip {
  font-size: 1.8rem;
  opacity: 0.8;
}

.pm-card-preview__number {
  font-family: monospace;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-4);
  min-height: 1.5rem;
}

.pm-card-preview__footer {
  display: flex;
  justify-content: space-between;
}

.pm-card-preview__label {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  margin-bottom: 2px;
}

.pm-card-preview__value {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.2rem;
}

.pm-field-hint {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: var(--sp-1);
}

.pm-modal__submit {
  width: 100%;
  padding: 1.1rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--r-xl);
  font-size: var(--font-base);
  font-weight: 800;
  box-shadow: var(--shadow-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

/* --- Checkout Redesign Styles --- */
.co-section-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.co-section-header__icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
}

.co-section-title {
  font-size: var(--font-md);
  font-weight: 800;
  color: var(--color-text-primary);
}

/* Radio Cards list */
#pmSavedCardsList {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.co-saved-card {
  display: block;
  position: relative;
  cursor: pointer;
}

.checkout-card-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.co-saved-card__body {
  border: 2px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  transition: all var(--t-base);
  background: var(--color-surface);
}

.co-saved-card:hover .co-saved-card__body {
  border-color: var(--color-border);
  background: var(--color-surface-alt);
}

.co-saved-card.selected .co-saved-card__body {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.co-saved-card__brand {
  width: 3rem;
  height: 2rem;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.co-saved-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.co-saved-card__name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.co-saved-card__number {
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
  font-family: monospace;
  margin-top: 2px;
}

.co-saved-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.co-card-default-badge {
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
}

.co-saved-card__expiry {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

.co-saved-card__check {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-surface);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 1.25rem;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--t-bounce);
}

.co-saved-card.selected .co-saved-card__check {
  opacity: 1;
  transform: scale(1);
}

/* Empty State / No Cards */
.co-no-cards-msg {
  background: var(--color-surface-alt);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
  font-weight: 600;
  margin-bottom: var(--sp-4);
  border: 1px dashed var(--color-border);
}

.co-no-cards-msg i {
  font-size: var(--font-lg);
  color: var(--color-text-muted);
}

/* Add Card Button inside checkout */
.co-add-card-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--color-border);
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--font-sm);
  padding: var(--sp-3);
  border-radius: var(--r-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  transition: all var(--t-base);
}

.co-add-card-btn:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

/* Inline Add Card Form */
.co-new-card-form {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-top: var(--sp-3);
}

.co-new-card-form__header {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.co-save-card-btn {
  width: 100%;
  background: var(--color-primary);
  color: white;
  border: none;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--font-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.co-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--sp-6) 0;
}

/* Summary Box */
.co-summary-box {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.co-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}

.co-summary-label {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.co-summary-value {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.co-summary-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--sp-3) 0;
}

.co-summary-total {
  margin-bottom: 0;
  align-items: center;
}

.co-summary-total span:first-child {
  font-size: var(--font-sm);
  font-weight: 800;
  color: var(--color-dark);
}

.co-total-price {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-primary);
}

.co-security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.co-security-badge {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .65rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.co-badge-dot {
  color: var(--color-border);
  font-size: 0.5rem;
}

/* RTL Support for PM page */
[dir="rtl"] .pm-card-visual__footer {
  flex-direction: row-reverse;
}

[dir="rtl"] .pm-card-preview__footer {
  flex-direction: row-reverse;
}

[dir="rtl"] .pm-card-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .co-saved-card__check {
  right: auto;
  left: -8px;
}

[dir="rtl"] .co-saved-card__meta {
  align-items: flex-start;
}

