/* ═══════════════════════════════════════
   CABINET STYLES — RSSHOP DESIGN SYSTEM
   Mobile-first adaptation
   ═══════════════════════════════════════ */

/* ═══════════════════════════════════════
   MOBILE-FIRST BASE
   ═══════════════════════════════════════ */

:root {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --bottom-nav-height: 64px;
}

/* Touch device optimizations */
@media (pointer: coarse) {
  * {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .cursor-dot,
  .cursor-ring,
  .glow-follower {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }

  body * {
    cursor: auto !important;
  }

  .reward-item.unlocked {
    cursor: default;
  }

  .reward-item.unlocked:hover {
    transform: none;
    box-shadow: none;
  }

  .reward-item.unlocked:active {
    transform: scale(0.98);
    background: rgba(74, 158, 255, 0.12);
  }
}

/* ═══════════════════════════════════════
   CABINET LAYOUT
   ═══════════════════════════════════════ */

.cabinet-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--container-padding);
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: calc(100dvh - 80px);
}

/* ═══════════════════════════════════════
   GUEST VIEW
   ═══════════════════════════════════════ */

.guest-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 200px);
  padding: var(--space-xl);
}

.guest-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  max-width: 420px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.guest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.guest-icon {
  font-size: 64px;
  margin-bottom: var(--space-md);
}

.guest-card h2 {
  font-size: var(--font-xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: linear-gradient(130deg, #c8e4ff, #64b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guest-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.guest-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.guest-btn {
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.5);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

.guest-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(74, 158, 255, 0.1);
}

.guest-btn.primary {
  background: linear-gradient(95deg, var(--accent), var(--accent-light));
  color: var(--bg-deep);
  border-color: transparent;
}

.guest-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.guest-btn.tg-btn {
  background: linear-gradient(95deg, #0088cc, #00a8e8);
  color: #fff;
  border-color: transparent;
  width: 100%;
  justify-content: center;
  min-height: 52px;
  font-size: var(--font-base);
}

.guest-btn.tg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 136, 204, 0.3);
}

/* ═══════════════════════════════════════
   AUTH MODAL (Telegram only)
   ═══════════════════════════════════════ */

.auth-card {
  background: linear-gradient(145deg, rgba(10, 24, 52, 0.98), rgba(6, 14, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: modalIn 0.4s var(--transition-bounce);
  text-align: center;
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.5);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: var(--font-sm);
  min-height: 44px;
  min-width: 44px;
}

.auth-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(74, 158, 255, 0.1);
}

.telegram-login-wrap h3 {
  font-size: var(--font-lg);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.telegram-login-wrap p {
  color: var(--text-muted);
  font-size: var(--font-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.tg-login-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(95deg, #0088cc, #00a8e8);
  color: #fff;
  border: none;
  font-size: var(--font-base);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
  min-height: 52px;
}

.tg-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 136, 204, 0.3);
}

.tg-login-btn i {
  font-size: var(--font-lg);
}

/* ═══════════════════════════════════════
   TELEGRAM POLL MODAL
   ═══════════════════════════════════════ */

.poll-card {
  background: linear-gradient(145deg, rgba(10, 24, 52, 0.98), rgba(6, 14, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  max-width: 380px;
  width: 90%;
  animation: modalIn 0.4s var(--transition-bounce);
}

.poll-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.poll-title {
  font-size: var(--font-lg);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.poll-text {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.poll-session {
  font-family: monospace;
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  word-break: break-all;
}

.poll-cancel {
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.5);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
  min-height: 48px;
  min-width: 120px;
}

.poll-cancel:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

/* ═══════════════════════════════════════
   SIDEBAR (desktop only)
   ═══════════════════════════════════════ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: sticky;
  top: calc(var(--space-lg) + 60px);
  align-self: start;
}

.sidebar-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-card:hover::before {
  opacity: 1;
}

.sidebar-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(74, 158, 255, 0.08);
}

.sidebar-user {
  text-align: center;
  margin-bottom: var(--space-md);
}

.sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.1);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-light);
  margin: 0 auto var(--space-sm);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.15);
}

.sidebar-name {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.sidebar-email {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  min-height: 44px;
}

.sidebar-menu a:hover {
  background: rgba(74, 158, 255, 0.08);
  color: var(--text-primary);
}

.sidebar-menu a.active {
  background: rgba(74, 158, 255, 0.12);
  color: var(--accent-light);
  border: 1px solid var(--border-hover);
}

.sidebar-menu a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--accent-glow);
}

.sidebar-menu .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.sidebar-menu a:hover .icon,
.sidebar-menu a.active .icon {
  color: var(--accent-light);
}

/* ═══════════════════════════════════════
   MOBILE USER HEADER
   ═══════════════════════════════════════ */

.mobile-user-header {
  display: none;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-md);
}

.mobile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.1);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(74, 158, 255, 0.15);
}

.mobile-user-info {
  flex: 1;
  min-width: 0;
}

.mobile-user-name {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-user-level {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════ */

.content-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ═══════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(74, 158, 255, 0.08);
  transform: translateY(-4px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.stat-label {
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.stat-value {
  font-size: var(--font-2xl);
  font-weight: 900;
  color: var(--accent-light);
  line-height: 1;
  text-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
}

.stat-value span {
  font-size: var(--font-lg);
  color: var(--text-secondary);
  font-weight: 400;
}

.stat-desc {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ═══════════════════════════════════════
   LEVEL SECTION
   ═══════════════════════════════════════ */

.level-section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.level-section::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.level-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.level-badge-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.level-badge {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, var(--accent)));
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-2xl);
  font-weight: 900;
  box-shadow: 0 4px 24px var(--accent-glow-strong);
  position: relative;
  flex-shrink: 0;
}

.level-badge::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius-lg) + 4px);
  border: 2px solid var(--accent);
  opacity: 0.3;
}

.level-info h2 {
  font-size: var(--font-xl);
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(130deg, #c8e4ff, #64b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.level-info p {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.level-next {
  text-align: right;
}

.level-next .num {
  font-size: var(--font-3xl);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 20px var(--accent-glow);
}

.level-next .label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Progress */
.progress-wrap {
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: var(--font-xs);
}

.progress-label span:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-label span:last-child {
  color: var(--accent);
  font-weight: 700;
}

.progress-track {
  height: 10px;
  background: rgba(8, 18, 40, 0.8);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark, var(--accent)), var(--accent));
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--accent-glow-strong);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
}

.progress-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 2px;
}

.progress-mark {
  font-size: 11px;
  color: var(--text-muted);
  position: relative;
  font-weight: 500;
}

.progress-mark.active {
  color: var(--accent);
  font-weight: 700;
}

.progress-mark::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: var(--border);
  border-radius: 1px;
}

.progress-mark.active::before {
  background: var(--accent);
}

/* ═══════════════════════════════════════
   STAMP CARD
   ═══════════════════════════════════════ */

.stamp-section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.stamp-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.stamp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.stamp-header h3 {
  font-size: var(--font-xl);
  font-weight: 800;
  background: linear-gradient(130deg, #c8e4ff, #64b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stamp-header .subtitle {
  font-size: var(--font-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.stamp-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  font-weight: 700;
  position: relative;
  transition: all var(--transition-base);
  cursor: default;
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.5);
  color: var(--text-muted);
  user-select: none;
  -webkit-user-select: none;
}

.stamp-cell.stamped {
  background: rgba(74, 158, 255, 0.15);
  border-color: var(--accent-dark, var(--accent));
  color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.stamp-cell.bonus {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, var(--accent)));
  color: var(--bg-deep);
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow-strong);
  font-weight: 800;
}

.stamp-cell.stamped.bonus {
  background: linear-gradient(135deg, var(--accent-dark, var(--accent)), #0a1a3a);
  color: var(--accent-light);
  border-color: var(--accent-dark, var(--accent));
}

.stamp-cell .reward-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg-deep);
  opacity: 0.5;
}

/* ═══════════════════════════════════════
   REWARDS LIST
   ═══════════════════════════════════════ */

.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.reward-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.4);
  transition: all var(--transition-fast);
}

.reward-item:hover {
  border-color: var(--border-hover);
}

.reward-item.unlocked {
  cursor: pointer;
}

.reward-item.unlocked:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.1);
  transform: translateX(4px);
}

.reward-item.unlocked:active {
  transform: translateX(2px) scale(0.99);
}

.reward-item.unlocked {
  border-color: var(--accent-dark, var(--accent));
  background: rgba(74, 158, 255, 0.08);
}

.reward-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(8, 18, 40, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-lg);
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.reward-item.unlocked .reward-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, var(--accent)));
  color: var(--bg-deep);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.reward-body {
  flex: 1;
  min-width: 0;
}

.reward-title {
  font-size: var(--font-sm);
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
  word-wrap: break-word;
}

.reward-desc {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.reward-status {
  font-size: var(--font-xs);
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.reward-item.unlocked .reward-status {
  color: var(--accent);
}

/* ═══════════════════════════════════════
   HISTORY SECTION
   ═══════════════════════════════════════ */

.history-section {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.history-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.history-header h3 {
  font-size: var(--font-xl);
  font-weight: 800;
  background: linear-gradient(130deg, #c8e4ff, #64b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.history-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-filter button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.5);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  min-height: 36px;
}

.history-filter button:hover,
.history-filter button.active {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(74, 158, 255, 0.1);
}

/* Desktop table */
.history-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 1;
  min-width: 600px;
}

.history-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 16px;
  font-size: var(--font-sm);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover td {
  color: var(--text-primary);
  background: rgba(74, 158, 255, 0.04);
}

.history-table .order-id {
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.history-table .order-sum {
  font-weight: 700;
  color: var(--text-primary);
}

.history-table .order-stamps {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 700;
  border: 1px solid var(--accent);
}

.history-table .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  font-weight: 700;
}

.status-delivered {
  color: var(--success);
}

.status-processing {
  color: var(--accent);
}

.status-cancelled {
  color: #ff6b6b;
}

/* Mobile cards (hidden on desktop) */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: block !important;
}

.history-cards {
  flex-direction: column;
  gap: var(--space-sm);
}

.history-card {
  background: rgba(8, 18, 40, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.history-card:active {
  transform: scale(0.98);
  background: rgba(74, 158, 255, 0.08);
}

.history-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.history-card:active::before {
  opacity: 1;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.history-card-id {
  font-weight: 800;
  color: var(--text-primary);
  font-size: var(--font-base);
}

.history-card-date {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.history-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.history-card-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-card-field .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.history-card-field .value {
  font-size: var(--font-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.history-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.history-card-stamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 700;
  border: 1px solid var(--accent);
}

/* ═══════════════════════════════════════
   LEVEL UP MODAL
   ═══════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
  padding: var(--space-md);
}

.modal-overlay.show {
  display: flex !important;
  opacity: 1;
  visibility: visible !important;
  pointer-events: auto !important;
}

.levelup-card {
  background: linear-gradient(145deg, rgba(10, 24, 52, 0.98), rgba(6, 14, 32, 0.98));
  border: 2px solid var(--accent);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  max-width: 420px;
  width: 100%;
  animation: modalIn 0.4s var(--transition-bounce);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
}

.levelup-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.levelup-badge {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark, var(--accent)));
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-3xl);
  font-weight: 900;
  margin: 0 auto var(--space-md);
  box-shadow: 0 8px 32px var(--accent-glow-strong);
  position: relative;
  z-index: 1;
}

.levelup-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: linear-gradient(130deg, #c8e4ff, #64b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.levelup-text {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.levelup-btn {
  padding: 16px 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(95deg, var(--accent-dark, var(--accent)), var(--accent));
  color: var(--bg-deep);
  border: none;
  font-size: var(--font-base);
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px var(--accent-glow);
  min-height: 52px;
  width: 100%;
}

.levelup-btn:hover {
  background: linear-gradient(95deg, var(--accent), var(--accent-light));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow-strong);
}

@keyframes modalIn {
  from {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════
   PAGINATION & LOAD MORE
   ═══════════════════════════════════════ */

.load-more-wrap {
  text-align: center;
  margin-top: var(--space-md);
  position: relative;
  z-index: 1;
}

.load-more-btn {
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 18, 40, 0.5);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  min-height: 48px;
  width: 100%;
  max-width: 300px;
}

.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(74, 158, 255, 0.1);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════
   CLICKABLE TABLE ROWS
   ═══════════════════════════════════════ */

.history-table tbody tr {
  cursor: pointer;
}

.history-table tbody tr:hover td {
  color: var(--text-primary);
  background: rgba(74, 158, 255, 0.08);
}

/* ═══════════════════════════════════════
   ORDER DETAIL MODAL
   ═══════════════════════════════════════ */

.order-detail-card {
  background: linear-gradient(145deg, rgba(10, 24, 52, 0.98), rgba(6, 14, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 520px;
  width: 100%;
  animation: modalIn 0.4s var(--transition-bounce);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.order-detail-card h3 {
  font-size: var(--font-xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  background: linear-gradient(130deg, #c8e4ff, #64b4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 40px;
}

.order-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--font-sm);
  gap: var(--space-sm);
}

.order-detail-row:last-child {
  border-bottom: none;
}

.order-detail-row .label {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.order-detail-row .value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.order-items-list {
  margin-top: var(--space-md);
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(8, 18, 40, 0.5);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  font-size: var(--font-sm);
  border: 1px solid var(--border);
  gap: var(--space-sm);
}

.order-item-row:last-child {
  margin-bottom: 0;
}

.order-item-row span:first-child {
  word-break: break-word;
  flex: 1;
}

.order-item-row span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Remove border from status badge in order detail modal */
.order-detail-card .status-badge {
  border: none !important;
}

/* ═══════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   ═══════════════════════════════════════ */

.mobile-bottom-nav {
  display: none;
}

.mobile-bottom-nav.hidden {
  transform: translateY(100%);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
  flex: 1;
  min-height: 48px;
  position: relative;
}

.mobile-nav-item i {
  font-size: 20px;
  transition: all 0.2s ease;
}

.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

/* ═══════════════════════════════════════
   CUSTOM CURSOR FIX
   ═══════════════════════════════════════ */

@media (pointer: fine) {

  body.js-cursor-ready,
  body.js-cursor-ready * {
    cursor: none !important;
  }

  body.js-cursor-ready a,
  body.js-cursor-ready button,
  body.js-cursor-ready [role="button"] {
    cursor: none !important;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent, #4a9eff);
  opacity: 0;
  transition: opacity 0.2s ease, width 0.15s, height 0.15s, background 0.15s;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--accent, #4a9eff);
  opacity: 0;
  transition: opacity 0.2s ease, width 0.15s, height 0.15s, border-color 0.15s, border-width 0.15s;
}

body.js-cursor-ready .cursor-dot,
body.js-cursor-ready .cursor-ring {
  opacity: 1;
}

/* Cursor states */
.cursor-dot.hovering,
.cursor-ring.hovering {
  opacity: 1;
}

.cursor-dot.hovering {
  width: 10px;
  height: 10px;
  background: var(--accent-light, #64b4ff);
}

.cursor-ring.hovering {
  width: 48px;
  height: 48px;
  border-color: var(--accent-light, #64b4ff);
  opacity: 0.6;
}

.cursor-dot.clicking {
  width: 4px;
  height: 4px;
  background: var(--accent);
}

.cursor-ring.clicking {
  width: 24px;
  height: 24px;
  border-color: var(--accent);
  border-width: 2px;
}

.cursor-dot.hidden,
.cursor-ring.hidden {
  opacity: 0 !important;
}

/* Glow follower */
.glow-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}

body.js-cursor-ready .glow-follower {
  opacity: 1;
}

/* Hide on touch devices */
@media (pointer: coarse) {

  .cursor-dot,
  .cursor-ring,
  .glow-follower {
    display: none !important;
  }
}

/* ═══════════════════════════════════════
   ORDER DETAIL MODAL — OVERRIDE
   ═══════════════════════════════════════ */

#order-detail-modal.show {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#order-detail-modal {
  z-index: 9999;
}

#order-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 15;
}

#order-detail-modal.show {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 1024px) {
  .cabinet-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .stat-card {
    padding: var(--space-md);
  }

  .stat-value {
    font-size: var(--font-xl);
  }

  .stat-desc {
    display: none;
  }

  .stamp-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
  }

  .level-header {
    flex-direction: row;
    gap: var(--space-md);
    align-items: center;
  }

  .level-next {
    text-align: right;
  }

  .history-header {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .level-section,
  .stamp-section,
  .history-section {
    padding: var(--space-lg);
  }

  .guest-buttons {
    flex-direction: column;
  }

  .guest-card {
    padding: var(--space-lg);
    margin: var(--space-md);
  }

  .mobile-user-header {
    display: flex;
  }

  .cabinet-layout {
    padding: var(--space-md) var(--space-sm);
    padding-bottom: calc(var(--space-xl) + var(--bottom-nav-height) + var(--safe-bottom));
  }

  .content-area {
    gap: var(--space-md);
  }

  #main-footer {
    padding-bottom: calc(var(--space-xl) + var(--bottom-nav-height) + var(--safe-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    transition: transform 0.3s ease;
  }

  .mobile-bottom-nav.hidden {
    transform: translateY(100%);
  }
}

@media (max-width: 640px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-card {
    padding: var(--space-sm);
    text-align: center;
  }

  .stat-label {
    font-size: 9px;
    letter-spacing: 0.5px;
  }

  .stat-value {
    font-size: var(--font-xl);
  }

  .stat-desc {
    display: none;
  }

  .stamp-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .stamp-cell {
    font-size: var(--font-xs);
  }

  .history-card-body {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }
/* 
  .history-card-field--stamp .history-card-stamp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(74, 158, 255, 0.1);
    color: var(--accent);
    font-size: var(--font-xs);
    font-weight: 700;
    border: 1px solid var(--accent);
  } */

  .level-badge {
    width: 56px;
    height: 56px;
    font-size: var(--font-xl);
  }

  .level-next .num {
    font-size: var(--font-2xl);
  }

  .level-info h2 {
    font-size: var(--font-lg);
  }

  .reward-item {
    padding: 12px 14px;
  }

  .reward-icon {
    width: 40px;
    height: 40px;
    font-size: var(--font-base);
  }

  .reward-title {
    font-size: var(--font-xs);
  }



  /* Mobile: reward status below body */
  .reward-item {
    flex-wrap: wrap;
  }

  .reward-icon {
    flex-shrink: 0;
  }

  .reward-body {
    flex: 1;
    min-width: 0;
  }

  .reward-status {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding-left: calc(40px + 14px); /* icon width + gap */
    white-space: normal;
  }

  .reward-status .status-badge {
    margin: 0;
    flex-shrink: 0;
  }

  .reward-claimed-badge,
  .reward-expired-badge,
  .claim-reward-btn {
    margin: 0;
  }

  .history-table-wrap {
    display: none;
  }

  .history-cards {
    display: flex !important;
  }

  .modal-overlay {
    padding: var(--space-sm);
  }

  .auth-card {
    padding: var(--space-lg);
    width: 100%;
    max-width: 100%;
  }

  .poll-card {
    padding: var(--space-lg);
    width: 100%;
  }

  .levelup-card {
    padding: var(--space-lg);
    width: 100%;
  }

  .order-detail-card {
    padding: var(--space-lg);
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg);
  }

  .guest-view {
    min-height: calc(100dvh - 160px);
    padding: var(--space-md);
  }

  .level-section::after {
    width: 200px;
    height: 200px;
    right: -30%;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat-card {
    padding: 10px 8px;
    border-radius: var(--radius-lg);
  }

  .stat-label {
    font-size: 8px;
    margin-bottom: 6px;
  }

  .stat-value {
    font-size: var(--font-lg);
  }

  .stamp-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .stamp-cell {
    font-size: 11px;
    border-radius: var(--radius-sm);
  }

  .level-badge {
    width: 48px;
    height: 48px;
    font-size: var(--font-lg);
  }

  .level-next .num {
    font-size: var(--font-xl);
  }

  .level-info h2 {
    font-size: var(--font-base);
  }

  .level-info p {
    font-size: var(--font-xs);
  }

  .reward-item {
    padding: 10px 12px;
    gap: 10px;
  }



  /* Mobile 480px: adjust status padding for smaller icon */
  .reward-status {
    padding-left: calc(36px + 10px); /* icon width + gap */
  }

  .reward-icon {
    width: 36px;
    height: 36px;
    font-size: var(--font-sm);
  }

  .history-card {
    padding: var(--space-sm);
  }

  .history-card-body {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .progress-marks {
    padding: 0;
  }

  .progress-mark {
    font-size: 10px;
  }

  .mobile-nav-item {
    font-size: 9px;
    padding: 6px 8px;
  }

  .mobile-nav-item i {
    font-size: 18px;
  }

  .guest-card h2 {
    font-size: var(--font-lg);
  }

  .guest-icon {
    font-size: 48px;
  }

  .order-detail-card h3 {
    font-size: var(--font-lg);
  }

  .order-detail-row {
    font-size: var(--font-xs);
    padding: 8px 0;
  }

  .order-item-row {
    font-size: var(--font-xs);
    padding: 8px 10px;
  }
}

@media (max-width: 360px) {
  .stamp-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  .stats-grid {
    gap: 4px;
  }

  .stat-card {
    padding: 8px 6px;
  }
}

/* Landscape phone optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-bottom-nav {
    height: 52px;
  }

  .mobile-nav-item {
    padding: 4px 12px;
    min-height: 44px;
  }

  .guest-view {
    min-height: auto;
    padding: var(--space-lg);
  }

  .level-section::after {
    display: none;
  }
}

/* iOS safe area support */
@supports (padding: max(0px)) {
  .mobile-bottom-nav {
    padding-bottom: max(var(--safe-bottom), 8px);
  }

  .cabinet-layout {
    padding-bottom: max(calc(var(--space-xl) + var(--bottom-nav-height)), calc(var(--space-xl) + 64px));
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .stamp-cell,
  .stat-card,
  .reward-item,
  .history-card {
    transition: none !important;
  }
}

/* ═══ REWARD ITEMS ═══ */
.reward-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(8, 18, 40, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.reward-item.unlocked {
  border-color: var(--accent);
  background: rgba(74, 158, 255, 0.08);
}

.reward-item.expired {
  opacity: 0.6;
  border-color: var(--danger);
}

.reward-item .reward-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 158, 255, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

.reward-item.unlocked .reward-icon {
  background: rgba(74, 158, 255, 0.2);
  animation: pulse 2s infinite;
}

.reward-item .reward-body {
  flex: 1;
}

.reward-item .reward-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal;
}

.reward-item .reward-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.reward-item .reward-expiry {
  font-size: 0.75rem;
  color: var(--accent-light);
  margin-top: 4px;
}

.reward-item .reward-status {
  text-align: right;
  flex-shrink: 0;
}

.reward-item .status-badge {
  display: block;
  width: fit-content;
  margin-left: auto;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.reward-item .status-badge.unlocked {
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.reward-item .status-badge.expired {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

.claim-reward-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.claim-reward-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
}

.claim-reward-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.reward-claimed-badge {
  font-size: 0.8rem;
  color: #2ed573;
  font-weight: 600;
}

.reward-expired-badge {
  font-size: 0.8rem;
  color: var(--danger);
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* ═══════════════════════════════════════════════════════════════
   iOS / Safari (WebKit) FIXES — ссылки, тапы, внешние переходы
   ═══════════════════════════════════════════════════════════════ */

/* Убираем серый флэш при тапе на любые ссылки (iOS WebKit) */
a,
a:link,
a:visited,
a:hover,
a:active {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* Внешние ссылки (Telegram/VK/tel/mailto) — мягкая подсветка тапа
   вместо системного серого прямоугольника */
a[target="_blank"],
a[href^="http://"],
a[href^="https://"],
a[href^="tg://"],
a[href^="tel:"],
a[href^="mailto:"] {
  -webkit-tap-highlight-color: rgba(74, 158, 255, 0.15);
  -webkit-text-decoration-skip: ink;
  text-decoration-skip-ink: auto;
}

/* Кнопки и кликабельные элементы — без iOS-подсветки и липкого hover */
button,
[role="button"],
[data-action],
.btn,
.btn-primary,
.btn-ghost,
.btn-outline-glow,
.social-links a,
.city-item,
.sub-item,
.cat-btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

/* iOS Safari: blur-подложки (navbar, модалки) требуют префикс */
.glass-nav,
.modal,
.cart-modal,
.flavor-modal,
.city-modal {
  -webkit-backdrop-filter: saturate(140%) blur(18px);
}

/* iOS Safari: запрет авто-зума при фокусе на input (font-size < 16px зумит) */
@media (hover: none) and (pointer: coarse) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

/* iOS: скролл внутри модалок/списков — инерционный */
.modal,
.cart-items,
.modal-body,
.city-list {
  -webkit-overflow-scrolling: touch;
}
