/* ===== SP RessJoy - Premium Design System 2025 ===== */

:root {
  /* Design System Colors */
  --accent: #1f8f4a;
  --accent-light: #259f55;
  --accent-dark: #1a7f3f;
  --accent-gradient: linear-gradient(135deg, #1f8f4a 0%, #1e7f45 100%);
  
  --brand: #8ee4af;
  --brand2: #a3cffa;
  --danger: #ef4444;
  --warning: #ffb703;
  
  /* Surface Colors */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f8fafc;
  
  /* Text Colors */
  --text: #1a1a1a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-disabled: #94a3b8;
  
  /* Borders */
  --border: #e5e7eb;
  --border-light: #f1f5f9;
  --border-accent: rgba(67, 192, 71, 0.2);
  
  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.16);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 1.875rem;  /* 30px */
  --font-size-3xl: 2.125rem;  /* 34px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
}

/* ===== GLOBAL RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  margin: 0;
  padding-top: 0;
  min-height: 100vh;
  /* Subtle gradient background - not aggressive */
  background: linear-gradient(135deg, rgba(142, 228, 175, 0.15) 0%, rgba(163, 207, 250, 0.15) 100%),
              linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  width: 100%;
  max-width: 100vw;
}

/* ===== SLIDESHOW BACKGROUND ===== */
    #bgContainer {
      position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
      z-index: -1;
      pointer-events: none;
      background: transparent; 
    }

    .bg-slide {
      position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
      background-size: cover;
      background-position: center;
      opacity: 0;
      transition: opacity 1.5s ease-in-out;
  will-change: opacity;
    }

    .bg-slide.active {
      opacity: 1;
    }

/* ===== APP CONTAINER & PAGES ===== */
#app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.page {
  display: none;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) 80px;
  box-sizing: border-box;
  overflow-x: hidden;
  /* ✅ FIX: Adaugă overflow-y explicit pentru scroll */
  overflow-y: auto;
  /* ✅ FIX: Asigură touch-action pentru scroll pe tabletă */
  touch-action: pan-y;
}

.page.visible {
  display: block;
}

.page .spacer {
  height: 80px;
}

/* ===== LOGO ===== */
.logo {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text);
  margin: var(--space-md) var(--space-sm);
  letter-spacing: -0.5px;
}

/* Login/Register Pages - Purple Brand Theme */
#loginPage,
#registerPage {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

#loginPage .logo,
#registerPage .logo {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== CARDS ===== */
.card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: var(--space-md) 0;
  color: var(--text);
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Login/Register Cards - Premium White Cards with Deep Shadow */
#loginPage .card,
#registerPage .card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: var(--space-2xl) auto;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

#loginPage .card:hover,
#registerPage .card:hover {
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

/* ===== GRID SYSTEM ===== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 820px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

/* Background Images Section - Slideshow full width, QR + Confirmare side-by-side */
.background-slideshow-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.background-secondary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .background-secondary-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== TYPOGRAPHY HIERARCHY ===== */
h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.3;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  color: var(--text);
  margin-bottom: var(--space-md);
}

/* ===== FORMS - PREMIUM INPUTS ===== */
label {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  display: block;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

input,
select,
textarea {
  font-family: inherit;
  width: 100%;
  padding: 14px 16px;
  margin: 0 0 var(--space-lg) 0;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: var(--font-size-base);
  color: var(--text);
  transition: all var(--transition-base);
  height: 48px;
  outline: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-accent);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-disabled);
}

textarea {
  min-height: 100px;
  resize: vertical;
  height: auto;
  padding: var(--space-md);
}

input[type="date"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  cursor: pointer;
  margin-left: var(--space-xs);
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  appearance: none;
}

/* ===== BUTTONS ===== */
button {
  font-family: inherit;
  width: 100%;
  padding: 14px var(--space-xl);
  margin: var(--space-sm) 0 var(--space-lg) 0;
  border-radius: var(--radius-full);
  border: none;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  outline: none;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:not(:disabled):active {
  transform: translateY(0) scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary Button */
button:not(.btn-ghost):not(.btn-danger):not(.btn-logout):not(.btn-delete-prize) {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow);
}

button:not(.btn-ghost):not(.btn-danger):not(.btn-logout):not(.btn-delete-prize):hover {
  box-shadow: var(--shadow-hover);
}

/* Ghost Button */
.btn-ghost {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  font-weight: var(--font-weight-semibold);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  color: var(--text);
}

/* Danger Button */
.btn-danger {
  background: var(--danger) !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background: #dc2626 !important;
}

/* Danger Outline Button (for destructive actions) */
.btn-danger-outline {
  background: transparent !important;
  color: var(--danger) !important;
  border: 1.5px solid var(--danger) !important;
  font-weight: var(--font-weight-semibold);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

/* Primary Button (Green) */
.btn-primary {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-hover);
}

/* ✅ Disabled state for play button in Mod Client */
#playBtn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  /* ✅ FIX: Nu forța background #999 - păstrează buttonColor și doar dim via opacity/cursor */
  pointer-events: none;
}

/* Secondary Button (Green, lighter) */
.btn-secondary {
  background: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--accent-dark) !important;
  box-shadow: var(--shadow);
}

/* Warning Button (Orange/Yellow) */
.btn-warning {
  background: var(--warning) !important;
  color: #1a1a1a !important;
  box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
  background: #f59e0b !important;
  box-shadow: var(--shadow);
}

/* Outline Button (White with Gray Border) */
.btn-outline {
  background: #ffffff !important;
  color: var(--text-secondary) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--surface-hover) !important;
  border-color: var(--text-muted) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow);
}

/* Caution Button (White with Orange/Red Border) */
.btn-caution {
  background: #ffffff !important;
  color: #f97316 !important;
  border: 1.5px solid #f97316 !important;
  box-shadow: var(--shadow-sm);
}

.btn-caution:hover {
  background: #fff7ed !important;
  border-color: #ea580c !important;
  color: #ea580c !important;
  box-shadow: var(--shadow);
}

/* Link Button */
.link {
  background: transparent;
  border: none;
  color: #2563eb;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  width: auto !important;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  margin: 0;
  text-decoration: none;
}

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

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--border-light);
}

/* ===== SNACKBAR ===== */
#snackbar {
  visibility: hidden;
  min-width: 260px;
  background: var(--accent-gradient);
  color: #ffffff;
  text-align: center;
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  position: fixed;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  z-index: 3000;
  font-weight: var(--font-weight-extrabold);
  box-shadow: var(--shadow-lg);
  transition: opacity var(--transition-base);
}

#snackbar.show {
  visibility: visible;
  animation: slideUp 0.3s ease;
}

/* Snackbar types */
#snackbar.snackbar-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

#snackbar.snackbar-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

#snackbar.snackbar-info {
  background: var(--accent-gradient); /* Default */
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* ===== CLIENT CTA BUTTON ===== */
.oval-button {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 25vh;
  margin-left: auto;
  margin-right: auto;
  display: block;
  font-size: var(--font-size-2xl);
  padding: var(--space-xl) var(--space-lg);
  width: min(520px, 90vw);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-extrabold);
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  z-index: 1400;
  border: none;
  /* Animație pulse care modifică doar scale și shadow */
  animation: pulseButton 1.6s ease-in-out infinite;
  transform-origin: center center;
  /* Previne mișcarea la click */
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  /* Optimizare */
  will-change: transform, box-shadow;
}

/* Animație pulse - DOAR scale și shadow, FĂRĂ translateX */
@keyframes pulseButton {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16), 0 0 0 0 rgba(67, 192, 71, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25), 0 0 0 16px rgba(67, 192, 71, 0);
  }
}

/* Hover - păstrează animația pulse, accentuează efectul */
.oval-button:hover {
  animation-duration: 1.2s; /* Animație mai rapidă la hover */
  transform: scale(1.05);
}

/* Active - oprește animația temporar și face un mic click effect */
.oval-button:active {
  transform: scale(0.98) !important;
  animation-play-state: paused !important;
}

/* Focus - menține animația */
.oval-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  transform: scale(1);
}

/* Disabled - oprește animația */
.oval-button:disabled {
  animation-play-state: paused !important;
  opacity: 0.6;
  cursor: not-allowed;
  transform: scale(1) !important;
}

/* ===== SWITCH CHIP ===== */
.switch-chip {
  position: fixed !important;
  left: 14px !important;
  bottom: 14px !important;
  z-index: 2500 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 999px !important;
  padding: 6px 10px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  transition: all var(--transition-base) !important;
  white-space: nowrap !important;
}

@media (hover: hover) and (pointer: fine) {
  .switch-chip:hover {
    background: rgba(0, 0, 0, 0.65);
  }
}

.switch-chip:active {
  transform: scale(0.98);
}

/* ===== QR FIXED ===== */
.qr-fixed {
  position: fixed;
  right: var(--space-xl);
  bottom: var(--space-xl);
  width: 100px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  padding: var(--space-sm);
  z-index: 1500;
  display: none;
}

/* ===== FEEDBACK BUTTON ===== */
.feedback-button {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  left: auto;
  bottom: auto;

  width: auto;
  max-width: none;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  z-index: 3000;

  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  cursor: pointer;
  
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-base);
}

.feedback-button:hover {
  background: rgba(0, 0, 0, 0.85);
}

.feedback-button:active {
  transform: scale(0.98);
}

.feedback-button,
.feedback-button * {
  box-sizing: border-box;
}

.feedback-icon {
  font-size: 16px;
  line-height: 1;
}

.feedback-label {
  white-space: nowrap;
}

/* ===== POPUPS ===== */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2400;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.popup.active {
  display: flex;
  opacity: 1;
}

.popup-inner {
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-2xl) var(--space-xl);
  min-width: 300px;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(8px) scale(0.98);
  animation: popupIn var(--transition-slow) ease forwards;
  position: relative;
}

/* Reduce padding for prize result popup to maximize image space */
.popup-prize-result {
  padding: var(--space-lg) var(--space-lg) var(--space-md) !important;
}

@keyframes popupIn {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.popup-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-base);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.popup-close:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  color: var(--text);
  transform: rotate(90deg);
}

/* Prize Result Modal Close Button - Modern, clean, enterprise UI - NO GREEN */
.popup-prize-result .popup-close {
  border-radius: 50%;
  background: transparent !important;
  border: none !important;
  color: #2F2F2F !important; /* Dark grey - NO GREEN */
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 20px;
  opacity: 0.8;
  transition: opacity var(--transition-base), color var(--transition-base);
}

.popup-prize-result .popup-close:hover {
  background: transparent !important;
  border: none !important;
  color: #555555 !important; /* Lighter grey on hover - NO GREEN */
  opacity: 1;
  transform: none; /* Remove rotation for clean enterprise feel */
}

.popup-prize-result .popup-close:active,
.popup-prize-result .popup-close:focus {
  background: transparent !important;
  border: none !important;
  color: #555555 !important; /* NO GREEN */
  outline: none;
}

.popup-content {
  font-size: var(--font-size-sm);
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  text-align: left;
}

/* Regulament scrollable container */
.regulament-content {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  margin: var(--space-md) 0;
  padding-right: var(--space-sm);
  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}

.regulament-content::-webkit-scrollbar {
  width: 8px;
}

.regulament-content::-webkit-scrollbar-track {
  background: transparent;
}

.regulament-content::-webkit-scrollbar-thumb {
  background-color: var(--text-muted);
  border-radius: 4px;
  opacity: 0.5;
}

.regulament-content::-webkit-scrollbar-thumb:hover {
  opacity: 0.7;
}

.regulament-content .popup-content {
  margin: 0;
}

.popup-content p {
  margin: var(--space-sm) 0;
  color: var(--text);
}

.popup-content strong {
  color: var(--text);
  font-weight: var(--font-weight-semibold);
}

.popup-content a {
  color: var(--accent);
  text-decoration: underline;
}

.popup-content a:hover {
  color: var(--accent-dark);
}

/* Prize Result Headline - Promoted to H1 */
#prizeText.prize-result-headline {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: #1e293b; /* text-slate-800 / deep charcoal - premium neutral color */
  text-align: center;
  margin: 0 0 var(--space-sm) 0;
  line-height: 1.2;
}

/* Winner message - Green color for positive outcome */
.popup-prize-result #prizeText.prize-result-headline.prize-winner {
  color: var(--accent);
}

@media (max-width: 600px) {
  #prizeText.prize-result-headline {
    font-size: var(--font-size-xl);
  }
}

#popup #prizeImg,
.popup-inner #prizeImg {
  width: 95% !important;
  max-width: 500px !important;
  max-height: 70vh !important;
  height: auto;
  object-fit: contain;
  display: none;
  margin: var(--space-sm) auto;
  border-radius: 16px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

/* Maximize image in prize result popup */
.popup-prize-result #prizeImg {
  max-height: 75vh !important;
  margin: var(--space-xs) auto !important;
}

@media (max-width: 420px) {
  #popup #prizeImg,
  .popup-inner #prizeImg {
    width: 95% !important;
    max-width: 100% !important;
  }
  
  .popup-prize-result #prizeImg {
    max-height: 70vh !important;
  }
}

@media (min-width: 768px) {
  #popup #prizeImg,
  .popup-inner #prizeImg {
    width: 90% !important;
    max-width: 500px !important;
  }
  
  .popup-prize-result #prizeImg {
    max-height: 75vh !important;
  }
}

.popup-actions {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Reduce top margin for actions in prize result popup */
.popup-prize-result .popup-actions {
  margin-top: var(--space-md);
}

.btn-claim-half {
  width: min(320px, 50%);
  background: #1e90ff !important;
  border-radius: var(--radius-full);
}

/* ===== CLAIM CARD ===== */
.claim-card {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

/* ===== PROGRESS BAR ===== */
.progress {
  height: 8px;
  background: var(--bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress > b {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width var(--transition-slow);
}

/* ===== SMALL NOTE ===== */
.smallnote {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: var(--space-xs);
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
  position: fixed;
  right: var(--space-lg);
  top: var(--space-lg);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-extrabold);
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 2600;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
}

.lang-toggle:hover {
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.lang-toggle.hidden {
  display: none !important;
}

/* ===== CONSENTS ===== */
.consent-group h3 {
  margin-bottom: var(--space-md);
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin: var(--space-sm) 0;
}

.consent-line input[type="checkbox"] {
  width: auto;
  margin: 0;
  margin-top: var(--space-sm);
}

.consent-text {
  display: inline-flex;
  align-items: baseline;
  column-gap: var(--space-sm);
  flex-wrap: wrap;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.consent-text .link {
  white-space: nowrap;
  margin-left: var(--space-xs);
}

/* ===== TRIES COUNTER (hidden) ===== */
#triesCounter {
  display: none !important;
}

/* ===== LOGIN PAGE ===== */
.login-card {
  max-width: 480px;
  margin: 0 auto;
}

.login-card h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text);
  margin-bottom: var(--space-2xl);
  text-align: left;
}

.login-field {
  margin-bottom: var(--space-xl);
}

.login-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
  display: block;
}

.login-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: var(--font-size-base);
  color: var(--text);
  transition: all var(--transition-base);
  height: 48px;
  margin: 0;
  outline: none;
}

.login-input:hover {
  border-color: var(--text-muted);
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--border-accent);
}

/* Login/Register Inputs - Modern Styling with Purple Focus */
#loginPage .login-input,
#registerPage input[type="text"],
#registerPage input[type="password"],
#registerPage input[type="email"] {
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: var(--font-size-base);
  color: var(--text);
  transition: all 0.2s ease;
  height: 48px;
}

#loginPage .login-input:hover,
#registerPage input[type="text"]:hover,
#registerPage input[type="password"]:hover,
#registerPage input[type="email"]:hover {
  border-color: #d1d5db;
}

#loginPage .login-input:focus,
#registerPage input[type="text"]:focus,
#registerPage input[type="password"]:focus,
#registerPage input[type="email"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.login-input::placeholder {
  color: var(--text-disabled);
}

.btn-login {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-xl) 0 var(--space-md) 0;
  border-radius: var(--radius-full);
  border: none;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  color: #ffffff;
  background: linear-gradient(90deg, #43c047 0%, #1e90ff 100%);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-login:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0) scale(0.98);
}

/* Login/Register Primary Button - Premium Dark Green Gradient */
#loginPage .btn-login,
#registerPage button:not(.btn-ghost):not(.link) {
  background: linear-gradient(135deg, #1f8f4a 0%, #1e7f45 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(31, 143, 74, 0.4), 0 2px 4px rgba(30, 127, 69, 0.2);
  font-weight: var(--font-weight-semibold);
  padding: 14px 24px;
  transition: all 0.2s ease;
}

#loginPage .btn-login:hover,
#registerPage button:not(.btn-ghost):not(.link):hover {
  background: linear-gradient(135deg, #259f55 0%, #228f4f 100%);
  box-shadow: 0 6px 16px rgba(31, 143, 74, 0.5), 0 4px 8px rgba(30, 127, 69, 0.3);
  transform: translateY(-1px);
}

#loginPage .btn-login:active,
#registerPage button:not(.btn-ghost):not(.link):active {
  background: linear-gradient(135deg, #1a7f3f 0%, #186f35 100%);
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(31, 143, 74, 0.3);
}

.login-forgot {
  text-align: center;
  margin-bottom: var(--space-xl);
  margin-top: 12px;
}

.login-forgot .link {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #6b7280 !important;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  display: inline;
  cursor: pointer;
}

.login-forgot .link:hover,
.login-forgot .link:focus {
  color: #6b7280 !important;
  text-decoration: underline;
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.login-actions .btn-ghost {
  width: 100%;
  margin: 0;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.login-actions .btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

/* Login/Register Secondary Buttons - Outline/Ghost Style */
#loginPage .login-actions .btn-ghost,
#registerPage .btn-ghost {
  background: transparent;
  border: 1.5px solid #d1d5db;
  color: #374151;
  font-weight: var(--font-weight-semibold);
  padding: 12px 24px;
  border-radius: 10px;
}

#loginPage .login-actions .btn-ghost:hover,
#registerPage .btn-ghost:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.login-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.login-footer a {
  color: #2563eb;
  text-decoration: none;
  font-size: var(--font-size-xs);
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-footer span {
  color: var(--text-disabled);
}

/* Login/Register Footer Links - Readable Gray */
#loginPage .login-footer,
#registerPage div[style*="border-top"] {
  border-top-color: #e5e7eb;
  color: #6b7280;
}

#loginPage .login-footer a,
#registerPage div[style*="border-top"] a {
  color: #4b5563;
  text-decoration: none;
}

#loginPage .login-footer a:hover,
#registerPage div[style*="border-top"] a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* ===== PREVIEW IMAGES ===== */
.preview-grid {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.preview-img {
  width: 110px;
  height: 78px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.preview-img:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-empty {
  font-size: var(--font-size-xs);
  color: var(--text-disabled);
  padding: var(--space-sm);
  text-align: center;
}

/* ===== INPUT INLINE ===== */
.input-inline {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.input-inline input {
  margin: 0;
  flex: 1;
}

#adminPassPopup .input-inline button {
  width: auto !important;
  flex: 0 0 auto;
  padding: 12px var(--space-xl);
}

#adminPassPopup .input-inline input {
  flex: 1 1 auto;
  min-width: 180px;
}

/* ===== RESET PIN POPUP ===== */
.reset-pin-input-wrapper {
  position: relative;
  display: block;
}

.reset-pin-input {
  width: 100%;
  padding: 12px 56px 12px 14px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 12px;
  font-size: var(--font-size-base);
  color: var(--text);
  transition: all var(--transition-base);
  margin: 0;
  outline: none;
  box-sizing: border-box;
}

.reset-pin-input:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

.reset-pin-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(67, 192, 71, 0.1);
}

.reset-pin-input::placeholder {
  color: var(--text-disabled);
}

.reset-pin-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #6b7280;
  transition: background-color var(--transition-base), color var(--transition-base);
  z-index: 10;
  /* ✅ Fix: Previne mișcarea butonului */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* ✅ Fix: Asigură poziționare stabilă */
  will-change: background-color, color;
}

@media (hover: hover) and (pointer: fine) {
  .reset-pin-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
    border: 1px solid transparent;
  }
}

@media (hover: none) and (pointer: coarse) {
  .reset-pin-toggle:hover {
    background: transparent;
    color: #6b7280;
    border: 1px solid transparent;
  }
}

.reset-pin-toggle:active {
  background: rgba(0, 0, 0, 0.06);
  /* ✅ Fix: Elimină transform la click pentru a preveni mișcarea */
  transform: translateY(-50%);
  border: 1px solid transparent;
}

.reset-pin-toggle:focus-visible {
  outline: 2px solid rgba(67, 192, 71, 0.35);
  outline-offset: 2px;
  border: 1px solid transparent;
}

.reset-pin-toggle .icon-eye,
.reset-pin-toggle .icon-eyeoff {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  user-select: none;
  -webkit-user-select: none;
}

.reset-pin-toggle .icon-eyeoff {
  display: none;
}

.reset-pin-toggle.is-visible .icon-eye {
  display: none;
}

.reset-pin-toggle.is-visible .icon-eyeoff {
  display: flex;
}

.reset-pin-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  /* ✅ Fix: Previne mișcarea SVG-urilor */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.reset-pin-primary-btn {
  width: 100%;
  min-height: 44px;
  padding: 12px var(--space-xl);
  background: var(--accent);
  color: var(--surface);
  border: none;
  border-radius: 12px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  /* ✅ Asigură că textul nu se taie */
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  min-width: fit-content;
}

.reset-pin-primary-btn:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.reset-pin-primary-btn:active {
  transform: translateY(0);
}

#resetPinPopup .card {
  padding: var(--space-xl);
}

#resetPinPopup label {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-sm);
}

#resetPinPopup .popup-actions {
  display: flex;
  gap: var(--space-md);
  align-items: stretch;
}

#resetPinPopup .popup-actions button {
  min-height: 44px;
  white-space: nowrap;
  padding: 12px 16px;
  flex: 1;
}

@media (max-width: 420px) {
  #resetPinPopup .popup-actions {
    flex-direction: column;
  }
  
  #resetPinPopup .popup-actions button {
    width: 100%;
  }
}

/* ===== SUCCESS CONFIRMATION POPUP ===== */
#confirmPopup .popup-inner.success-popup {
  max-width: 420px;
  padding: 0;
  text-align: center;
  border-radius: 18px;
  overflow: hidden;
}

.success-banner {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: transparent;
  display: none;
}

.success-banner.has-image {
  display: block;
}

.success-popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl);
}

.success-popup-title {
  font-size: 26px;
  font-weight: var(--font-weight-extrabold);
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.success-popup-message {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.success-popup-instruction {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.success-popup-button {
  width: 100%;
  min-height: 48px;
  padding: 14px var(--space-xl);
  background: var(--accent);
  color: var(--surface);
  border: none;
  border-radius: 16px;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: var(--space-md);
  box-shadow: var(--shadow-md);
}

.success-popup-button:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.success-popup-button:active {
  transform: translateY(0);
}

#confirmCard {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  text-align: center;
}

@media (max-width: 420px) {
  #confirmPopup .popup-inner.success-popup {
    max-width: 90vw;
    padding: 0;
  }
  
  .success-banner {
    height: 160px;
  }
  
  .success-popup-content {
    padding: var(--space-xl);
  }
  
  .success-popup-title {
    font-size: 24px;
  }
  
  .success-popup-message {
    font-size: 16px;
  }
}

/* ===== PRIZE CARDS ===== */
#prizeContainer {
  gap: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  #prizeContainer {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prize-card {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition-base);
}

.prize-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.prize-card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-md);
  align-items: start;
}

.prize-card-preview {
  grid-column: 1;
  flex-shrink: 0;
}

.prize-mini {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  display: block;
  transition: all var(--transition-base);
}

.prize-mini:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.prize-placeholder {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  transition: all var(--transition-base);
}

.prize-placeholder:hover {
  border-color: var(--text-muted);
  background: var(--surface-hover);
}

.prize-placeholder-icon {
  font-size: 2rem;
  opacity: 0.4;
}

.prize-placeholder-text {
  font-size: var(--font-size-xs);
  color: var(--text-disabled);
  font-weight: var(--font-weight-medium);
}

.prizeCount {
  grid-column: 2;
  margin: 0;
  min-width: 64px;
  text-align: center;
  width: 100%;
  max-width: 100px;
}

.btn-delete-prize {
  grid-column: 3;
  background: #fee2e2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
  margin: 0;
  width: auto;
  min-height: 44px;
  font-weight: var(--font-weight-semibold);
  align-self: start;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-delete-prize:hover {
  background: #fecaca;
  border-color: #fca5a5;
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.prize-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.prize-card-body label {
  font-size: var(--font-size-sm);
  margin: 0;
}

.prize-card-body textarea,
.prize-card-body input {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.prize-row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.prize-row .small {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: #ecfeff;
  color: #0f172a;
  border: 1px solid #cffafe;
  border-radius: var(--radius-full);
  padding: 6px var(--space-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-extrabold);
}

/* ===== MODE SELECTION - PREMIUM REDESIGN ===== */
/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: var(--space-2xl);
  /* ✅ FIX: Asigură că header-ul nu blochează touch events */
  touch-action: none;
  /* ✅ FIX: Asigură că header-ul nu interferează cu scroll-ul */
  pointer-events: auto;
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.dashboard-brand {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.back-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  width: 36px;
  height: 36px;
}

.back-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dashboard-header-right {
  display: flex;
  align-items: center;
}

.user-avatar-container {
  position: relative;
}

.user-avatar-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.user-avatar-btn:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: scale(1.05);
}

.user-avatar-icon {
  font-size: 20px;
  line-height: 1;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: var(--space-sm);
  display: none;
  flex-direction: column;
  z-index: 1000;
}

.user-dropdown.active {
  display: flex;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: var(--font-size-base);
  color: var(--text);
  transition: all var(--transition-base);
  width: 100%;
}

.user-dropdown-item:hover {
  background: var(--surface-hover);
}

.dropdown-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* ===== ROLE PAGE GLASSMORPHISM STYLES ===== */

/* Animated Background for Role Page */
#rolePage {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

#rolePage .bg-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  top: 0;
  left: 0;
}

#rolePage .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

#rolePage .shape1 {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

#rolePage .shape2 {
  width: 250px;
  height: 250px;
  background: rgba(102, 126, 234, 0.3);
  bottom: -80px;
  right: -80px;
  animation-delay: 4s;
}

#rolePage .shape3 {
  width: 200px;
  height: 200px;
  background: rgba(118, 75, 162, 0.2);
  top: 50%;
  right: 10%;
  animation-delay: 8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* Glass Header Styling */
#rolePage .dashboard-header-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 10;
}

#rolePage .dashboard-brand-glass {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#rolePage .user-avatar-glass {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
}

#rolePage .user-avatar-glass:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
}

#rolePage .user-avatar-svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.mode-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

/* Account Page Styles */
/* Account page - allow vertical scroll on mobile */
#accountPage {
  /* ✅ FIX: Elimină overscroll-behavior-y: contain care poate bloca scroll-ul */
  overscroll-behavior-y: auto; /* Permite scroll-ul natural */
  -webkit-overflow-scrolling: touch;
  /* ✅ FIX: Asigură scroll vertical explicit */
  overflow-y: auto;
  overflow-x: hidden;
  /* ✅ FIX: Asigură touch-action corect pentru scroll */
  touch-action: pan-y;
  /* ✅ FIX: Asigură înălțime minimă pentru scroll */
  min-height: 100vh;
}

.account-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg) 80px;
}

.account-page-title {
  font-size: 32px;
  font-weight: var(--font-weight-extrabold);
  color: var(--text);
  margin: 0 0 var(--space-2xl) 0;
  letter-spacing: -0.02em;
}

.account-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
  overflow: hidden;
}

.account-card-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.account-card-title {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0;
}

.account-card-body {
  padding: var(--space-xl);
}

.account-form-group {
  margin-bottom: var(--space-xl);
}

.account-form-group:last-child {
  margin-bottom: 0;
}

.account-form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.account-form-group input {
  width: 100%;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
  box-sizing: border-box;
}

.account-form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 192, 71, 0.1);
}

.account-form-divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-xl) 0;
}

.account-save-btn {
  margin-top: var(--space-md);
  width: 100%;
}

.account-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  text-align: left;
  justify-content: flex-start;
}

.account-action-btn:last-child {
  margin-bottom: 0;
}

.account-btn-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.account-help-section {
  margin-bottom: var(--space-xl);
}

.account-help-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin: 0 0 var(--space-md) 0;
}

.account-help-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.account-help-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  justify-content: flex-start;
}

.account-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.account-legal-link {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

.account-legal-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.account-legal-separator {
  color: var(--text-muted);
}

.mode-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

/* Shared Card Base */
.mode-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 32px;
  border: 1px solid rgba(243, 244, 246, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 8px 20px rgba(0, 0, 0, 0.07);
}

/* Glass Card Styling for Role Page */
#rolePage .glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 40px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#rolePage .glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

#rolePage .glass-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.mode-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Card Header (Title + Subtitle) */
.mode-card-header {
  margin-bottom: var(--space-xl);
  text-align: left;
}

/* Glass Card Header with Icon */
#rolePage .glass-card .mode-card-header {
  margin-bottom: 30px;
}

#rolePage .card-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#rolePage .card-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

#rolePage .card-icon svg {
  width: 40px;
  height: 40px;
  stroke: white;
  fill: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.mode-card-title {
  font-size: 30px;
  font-weight: var(--font-weight-extrabold);
  color: var(--text);
  margin: 0 0 var(--space-sm) 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

#rolePage .glass-card .mode-card-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.mode-card-subtitle {
  font-size: var(--font-size-base);
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  font-weight: var(--font-weight-normal);
}

#rolePage .glass-card .mode-card-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Card Body (Icon + Bullet List) */
.mode-card-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-xl);
  flex: 1;
  margin-bottom: var(--space-xl);
  min-height: 0;
}

.mode-card-icon {
  font-size: 4rem;
  line-height: 1;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Composite Tablet Icon Structure - Bigger & Bolder Illustrations */
.mode-card-icon--tablet {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  flex-shrink: 0;
}

.tablet-frame {
  font-size: 7rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: opacity(0.85);
}

.tablet-screen-icon {
  position: absolute;
  font-size: 4rem;
  line-height: 1;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  font-weight: normal;
}

.mode-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mode-card-list-item {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: flex-start;
  font-weight: var(--font-weight-normal);
}

/* Features List for Glass Cards */
#rolePage .features-list {
  list-style: none;
  margin-bottom: 32px;
  padding: 0;
}

#rolePage .features-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

#rolePage .features-list li:hover {
  color: white;
  transform: translateX(4px);
}

#rolePage .check-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #1f8f4a, #1e7f45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(31, 143, 74, 0.3);
}

#rolePage .check-icon svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

/* Card Footer (Button) */
.mode-card-footer {
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

/* Admin Card Specific Styles */
.mode-card--admin {
  background: var(--surface);
}

.mode-card--admin .mode-card-icon--tablet {
  width: 7rem;
  height: 7rem;
}

.mode-card--admin .tablet-frame {
  font-size: 7rem;
}

.mode-card--admin .tablet-screen-icon {
  font-size: 4rem;
}

/* Client Card Specific Styles */
.mode-card--client {
  background: linear-gradient(135deg, rgba(67, 192, 71, 0.12) 0%, rgba(52, 211, 153, 0.12) 100%);
}

.mode-card--client .mode-card-icon--tablet {
  width: 7rem;
  height: 7rem;
}

.mode-card--client .tablet-frame {
  font-size: 7rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mode-card--client .tablet-screen-icon {
  font-size: 4rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Legacy support for JS that updates .mode-desc */
.mode-desc {
  display: none;
}

/* Responsive: Stack body on mobile */
@media (max-width: 600px) {
  .mode-card-body {
  flex-direction: column;
  align-items: center;
    text-align: center;
  }
  
  .mode-card-icon--tablet {
    width: 5rem;
    height: 5rem;
}

  .tablet-frame {
    font-size: 5rem !important;
  }
  
  .tablet-screen-icon {
    font-size: 2.5rem !important;
  }
  
  .mode-card-list {
    align-items: center;
}

  .mode-card {
    padding: var(--space-xl);
  }
  
  .mode-card {
    padding: 24px;
}

  .mode-card-title {
    font-size: 26px;
  }
  
  .mode-card-subtitle {
    font-size: var(--font-size-sm);
  }
  
  .mode-card-list-item {
    font-size: 14px;
  }
  
  /* Glass card responsive */
  #rolePage .glass-card {
    padding: 30px;
}

  #rolePage .dashboard-brand-glass {
    font-size: 24px;
  }
  
  #rolePage .glass-card .mode-card-title {
    font-size: 24px;
  }
}

/* Buttons */
.mode-btn {
  border: none;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-extrabold);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mode-btn--admin {
  background: var(--accent);
  color: #ffffff;
  padding: 14px 24px;
  font-size: var(--font-size-base);
  box-shadow: 0 2px 8px rgba(31, 143, 74, 0.25);
  width: 100%;
}

.mode-btn--admin:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 12px rgba(31, 143, 74, 0.35);
  transform: translateY(-1px);
}

.mode-btn--admin:active {
  transform: translateY(0) scale(0.98);
}

.mode-btn--client {
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 16px 32px;
  font-size: var(--font-size-lg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(31, 143, 74, 0.25);
  width: 100%;
  font-weight: var(--font-weight-bold);
}

.mode-btn--client:hover {
  background: linear-gradient(135deg, #259f55 0%, #228f4f 100%);
  box-shadow: 0 6px 20px rgba(31, 143, 74, 0.35);
  transform: translateY(-2px);
}

.mode-btn--client:active {
  transform: translateY(0) scale(0.98);
}

/* Footer - Premium Dashboard Style */
.mode-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: var(--space-xl);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mode-footer-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  min-width: 0;
}

.mode-footer-icon {
  font-size: 1.125rem;
  opacity: 0.6;
  flex-shrink: 0;
  line-height: 1;
}

.mode-footer-text {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mode-footer-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.mode-footer-email {
  color: var(--text);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mode-footer-logout {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-md) !important;
  font-size: var(--font-size-sm) !important;
  font-weight: var(--font-weight-semibold) !important;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
  width: auto !important;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: static !important;
  overflow: visible !important;
}

.mode-footer-logout:hover {
  background: var(--surface-hover) !important;
  border-color: var(--text-muted) !important;
  color: var(--text) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
  transform: none !important;
}

.mode-footer-logout:active {
  transform: scale(0.98) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.mode-footer-logout:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

/* Responsive */
@media (max-width: 640px) {
  .mode-container {
    padding: var(--space-xl) var(--space-md);
  }
  
  .mode-card {
    padding: 20px;
  }
  
  .mode-card--admin {
    text-align: center;
  }
  
  .mode-btn--admin {
    width: 100%;
  }
  
  .mode-footer {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
    padding: var(--space-md);
  }
  
  .mode-footer-user {
    width: 100%;
  }
  
  .mode-footer-logout {
    align-self: stretch;
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

/* ===== ADMIN COLLAPSIBLE SECTIONS - PREMIUM ===== */
/* ===== ADMIN PAGE - PURPLE BRAND THEME ===== */
/* Admin Page - Purple Gradient Background (matching Role Page) */
#adminPage {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding-bottom: 0; /* Eliminat - .page are deja padding-bottom: 80px */
}

@media (max-width: 768px) {
  #adminPage {
    padding-bottom: 0; /* Eliminat */
  }
}

/* ===== MERCHANT BACKGROUND FOR ADMIN/ACCOUNT PAGES ===== */

/* Admin Page - Dynamic Background */
#adminPage.has-merchant-bg {
  position: relative;
  z-index: 0;
}

#adminPage.has-merchant-bg::before {
  content: '';
  position: absolute;
  inset: -40px;
  z-index: 0;
  background-image: var(--merchant-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  opacity: 0.8;
  pointer-events: none;
  /* Optimizare pentru performanță */
  will-change: auto;
  transform: translateZ(0); /* Force GPU acceleration */
}

#adminPage.has-merchant-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

/* Ensure content is above background layers - DOAR pentru elementele directe importante */
/* Nu aplicăm position: relative pe dashboard-header pentru că are deja position: sticky */
#adminPage.has-merchant-bg > .dashboard-header {
  z-index: 101; /* Mai mare decât z-index: 100 default pentru a fi deasupra background-ului */
}

#adminPage.has-merchant-bg > .admin-section {
  position: relative;
  z-index: 1;
}

/* Fallback: dacă nu există imagine, folosește gradient-ul mov */
/* Fallback: dacă nu există imagine locală, folosește gradient-ul mov */
#adminPage:not(.has-local-bg) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Account Page & Admin Page - Local Background (from localStorage) */
#accountPage.has-local-bg,
#adminPage.has-local-bg {
  position: relative;
  z-index: 0;
}

#accountPage.has-local-bg::before,
#adminPage.has-local-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: var(--account-bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  opacity: 0.6;
  pointer-events: none;
  /* Optimizare pentru performanță */
  transform: translateZ(0); /* Force GPU acceleration */
}

#accountPage.has-local-bg::after,
#adminPage.has-local-bg::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

/* Ensure content is above background layers */
#accountPage.has-local-bg > .dashboard-header,
#adminPage.has-local-bg > .dashboard-header {
  z-index: 101; /* Mai mare decât z-index: 100 default pentru a fi deasupra background-ului */
}

#accountPage.has-local-bg > .account-container,
#adminPage.has-local-bg > .admin-section {
  position: relative;
  z-index: 1;
}

/* Fallback: dacă nu există imagine locală, folosește gradient-ul mov */
#accountPage:not(.has-local-bg) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Optimizări pentru mobile - reducem blur-ul */
@media (max-width: 768px) {
  #adminPage.has-merchant-bg::before {
    filter: blur(2px); /* Redus de la 4px la 2px pe mobile */
    inset: -20px; /* Redus de la -40px la -20px pe mobile */
  }
  
  #accountPage.has-local-bg::before,
  #adminPage.has-local-bg::before {
    filter: blur(2px); /* Redus de la 4px la 2px pe mobile */
  }
  
  /* Eliminăm backdrop-filter de pe buton pe mobile pentru performanță */
  .admin-bottom-action-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(30, 27, 75, 0.98); /* Mai opac în loc de blur */
  }
}

/* Optimizări pentru telefoane foarte slabe */
@media (max-width: 480px) {
  /* Eliminăm complet blur-ul pe telefoane slabe */
  #adminPage.has-merchant-bg::before {
    filter: none; /* Eliminat blur complet */
    opacity: 0.5; /* Redus opacity pentru a compensa */
  }
  
  #accountPage.has-local-bg::before,
  #adminPage.has-local-bg::before {
    filter: none; /* Eliminat blur complet */
    opacity: 0.5; /* Redus opacity pentru a compensa */
  }
  
  #adminPage.has-merchant-bg::after,
  #accountPage.has-local-bg::after,
  #adminPage.has-local-bg::after {
    background: rgba(255, 255, 255, 0.75); /* Mai opac pentru claritate */
  }
}

/* Admin Page Header - Glass Style (matching Role Page) */
#adminPage .dashboard-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 10;
  margin-bottom: var(--space-2xl);
}

#adminPage .dashboard-brand {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ffffff;
}

#adminPage .user-avatar-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
}

#adminPage .user-avatar-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
}

#adminPage .user-avatar-icon {
  color: white;
  filter: brightness(0) invert(1);
}

/* Admin Page Logo - White Text */
#adminPage .logo {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Admin Page Header Button */
#adminPage .admin-page-header {
  position: relative;
  z-index: 10;
}

#adminPage .btn-expand-all {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#adminPage .btn-expand-all:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ===== ADMIN BOTTOM ACTION BAR - DARK PREMIUM THEME ===== */
.admin-bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(30, 27, 75, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.3), 0 -2px 4px -1px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  display: none; /* Ascuns implicit, se afișează doar pe adminPage via JS */
  justify-content: center;
  align-items: center;
  padding: 16px 24px;
  gap: 12px;
  font-family: var(--font-family);
}

.admin-bottom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  flex: 1;
  white-space: nowrap;
  font-family: var(--font-family);
}

.admin-bottom-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Secondary Outline Buttons (Left & Center) - White Text/Icons for Dark Background */
.admin-bottom-btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  font-weight: var(--font-weight-semibold);
}

.admin-bottom-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.admin-bottom-btn-outline .admin-bottom-icon {
  stroke: #ffffff;
}

.admin-bottom-btn-outline:hover .admin-bottom-icon {
  stroke: #ffffff;
}

/* Preview Button (Center) - Same White Ghost Style */
.admin-bottom-btn-preview {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.admin-bottom-btn-preview:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.admin-bottom-btn-preview .admin-bottom-icon {
  stroke: #ffffff;
}

.admin-bottom-btn-preview:hover .admin-bottom-icon {
  stroke: #ffffff;
}

/* Primary Button (Right) - Premium Dark Green Gradient with Glow (High Contrast on Dark) */
.admin-bottom-btn-primary {
  background: linear-gradient(135deg, #1f8f4a 0%, #1e7f45 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(31, 143, 74, 0.5), 0 2px 4px rgba(30, 127, 69, 0.3), 0 0 20px rgba(31, 143, 74, 0.2);
  flex: 0 1 auto;
  font-weight: var(--font-weight-semibold);
}

.admin-bottom-btn-primary:hover {
  background: linear-gradient(135deg, #259f55 0%, #228f4f 100%);
  box-shadow: 0 6px 20px rgba(31, 143, 74, 0.6), 0 4px 8px rgba(30, 127, 69, 0.4), 0 0 30px rgba(31, 143, 74, 0.3);
  transform: translateY(-1px);
}

.admin-bottom-btn-primary:active {
  background: linear-gradient(135deg, #1a7f3f 0%, #186f35 100%);
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(31, 143, 74, 0.4), 0 1px 2px rgba(30, 127, 69, 0.3), 0 0 15px rgba(31, 143, 74, 0.2);
}

.admin-bottom-btn-primary .admin-bottom-icon {
  stroke: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .admin-bottom-action-bar {
    padding: 12px 16px;
    gap: 8px;
    justify-content: center;
  }

  .admin-bottom-btn {
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    gap: 6px;
    flex: 0 1 auto;
    min-width: 120px;
  }

  .admin-bottom-icon {
    width: 16px;
    height: 16px;
  }

  .admin-bottom-btn span:last-child {
    display: none;
  }

  .admin-bottom-btn-primary span:last-child {
    display: inline;
  }
}

@media (max-width: 480px) {
  .admin-bottom-action-bar {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .admin-bottom-btn {
    padding: 10px 16px;
    min-width: 44px;
    gap: 4px;
    flex: 0 1 auto;
  }

  .admin-bottom-btn-preview {
    flex: 1 1 calc(50% - 4px);
    max-width: calc(50% - 4px);
  }

  .admin-bottom-icon {
    width: 18px;
    height: 18px;
  }

  .admin-bottom-btn span:last-child {
    display: none;
  }

  .admin-bottom-btn-primary {
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: 8px;
  }

  .admin-bottom-btn-primary span:last-child {
    display: inline;
    font-size: var(--font-size-xs);
  }
}

/* Desktop: Limită lățimea la container (ca cardurile) */
@media (min-width: 981px) {
  .admin-bottom-action-bar {
    max-width: 980px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    /* Eliminat transform: translateX(-50%) - cauzează probleme cu position: fixed */
  }
}

.admin-section {
  margin-bottom: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

/* Admin Page Cards - Enhanced Shadows for Purple Background */
#adminPage .admin-section {
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 10px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

#adminPage .admin-section:hover {
  box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 20px 30px rgba(0, 0, 0, 0.2);
}

/* Quick Actions - Always Open (No Collapse) */
.admin-section-always-open {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.admin-section-always-open::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.admin-section-header-static {
  padding: var(--space-xl) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}

/* Admin Page Static Headers - White Background */
#adminPage .admin-section-header-static {
  background: #ffffff;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.admin-section-content-always-open {
  padding: var(--space-2xl) var(--space-xl);
  display: block;
  opacity: 1;
}

/* Admin Page Content - White Background */
#adminPage .admin-section-content,
#adminPage .admin-section-content-always-open {
  background: #ffffff;
}

/* Quick Actions Grid - 3x2 Layout */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  width: 100%;
}

.quick-actions-grid button {
  margin: 0;
}

@media (max-width: 520px) {
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

.admin-section:hover {
  box-shadow: var(--shadow);
  border-color: var(--text-muted);
}

.admin-section.expanded {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.admin-section.expanded::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.admin-section-header {
  padding: var(--space-xl) var(--space-xl);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-base);
  user-select: none;
  position: relative;
  /* Scroll margin for smooth scrolling when expanding sections */
  scroll-margin-top: 80px; /* Account for fixed header + padding */
}

.admin-section-header:hover {
  background: var(--surface-hover);
}

/* Admin Page Section Headers - White Background */
#adminPage .admin-section-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

#adminPage .admin-section-header:hover {
  background: #f9fafb;
}

.admin-section.expanded .admin-section-header {
  background: var(--surface);
  border-bottom-color: var(--border);
}

/* Admin Page Expanded Headers - White Background */
#adminPage .admin-section.expanded .admin-section-header {
  background: #ffffff;
  border-bottom-color: rgba(229, 231, 235, 0.8);
}

.admin-section-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.admin-section-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

/* Admin Page Icons - White Background */
#adminPage .admin-section-icon {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.admin-section-icon svg {
  width: 24px;
  height: 24px;
  color: #8b5cf6;
  stroke: #8b5cf6;
  fill: none;
}

.admin-section:hover .admin-section-icon {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.admin-section:hover .admin-section-icon svg {
  color: #7c3aed;
  stroke: #7c3aed;
}

.admin-section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0 0 var(--space-xs) 0;
  line-height: 1.3;
}

.admin-section-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
  font-weight: var(--font-weight-normal);
  line-height: 1.4;
}

.admin-section-summary {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
  white-space: nowrap;
}

.status-badge-active {
  background: rgba(67, 192, 71, 0.1);
  color: #22c55e;
}

.status-badge-inactive {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.admin-section.section-complete .admin-section-icon {
  background: rgba(67, 192, 71, 0.1);
  border-color: rgba(67, 192, 71, 0.3);
}

.admin-section.section-complete .admin-section-icon::after {
  content: '✓';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #22c55e;
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  border: 2px solid var(--surface);
}

.admin-section-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-right: var(--space-md);
  flex-wrap: wrap;
}

.admin-section-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--surface);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.admin-section-save-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.admin-section-save-btn:active {
  transform: translateY(0);
}

.admin-section-client-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.admin-section-client-btn:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.admin-section-client-btn:active {
  transform: translateY(0);
}

.admin-section.expanded .admin-section-header-actions {
  display: none;
}

.admin-section-header-right {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  /* ✅ Nu mai e nevoie de padding-top, folosim position absolute */
}

.admin-section-info-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-base);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  /* ✅ Poziționare absolută în colțul de sus dreapta */
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 10;
  pointer-events: auto;
}

.admin-section-info-btn:hover {
  background: rgba(107, 114, 128, 0.15);
  border-color: rgba(107, 114, 128, 0.3);
  color: var(--text);
  transform: scale(1.05);
}

.admin-section-info-btn:active {
  transform: scale(0.95);
}

.admin-section-info-btn svg {
  width: 16px;
  height: 16px;
}

.admin-section-chevron {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform var(--transition-base);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-light);
}

.admin-section-header:hover .admin-section-chevron {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.admin-section.expanded .admin-section-chevron {
  transform: rotate(180deg);
  background: rgba(67, 192, 71, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.admin-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms ease,
              padding 200ms ease;
  opacity: 0;
  padding: 0 var(--space-xl);
}

.admin-section.expanded .admin-section-content {
  max-height: 5000px;
  opacity: 1;
  padding: var(--space-2xl) var(--space-xl);
}

.admin-section-content .card {
  margin: 0;
  box-shadow: none;
  border: none;
  padding: 0;
  background: transparent;
}

.admin-section-content .card:hover {
  box-shadow: none;
}

/* Admin Page Cards - White Background */
#adminPage .admin-section-content .card {
  background: #ffffff;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.admin-section-content .card h2,
.admin-section-content .card h3 {
  display: none;
}

/* ===== ADMIN PANEL GRID (3 Cards Layout) ===== */
.admin-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

/* Tablet: 2 columns - Campanie + Securitate left (stacked), Buton Client right */
@media (min-width: 820px) {
  .admin-panel-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
      "campanie buton"
      "securitate buton";
  }
  
  .admin-panel-card:nth-child(1) {
    grid-area: campanie;
  }
  
  .admin-panel-card:nth-child(2) {
    grid-area: buton;
  }
  
  .admin-panel-card:nth-child(3) {
    grid-area: securitate;
  }
}

/* Desktop: 3 equal columns */
@media (min-width: 1200px) {
  .admin-panel-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: none;
  }
  
  .admin-panel-card:nth-child(1),
  .admin-panel-card:nth-child(2),
  .admin-panel-card:nth-child(3) {
    grid-area: auto;
  }
}

.admin-panel-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.admin-panel-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--text-muted);
}

.admin-panel-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.admin-panel-card-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.admin-panel-card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0;
}

.admin-panel-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.admin-panel-card-body > div {
  margin: 0;
}

.admin-panel-card-body label {
  margin-bottom: var(--space-sm);
}

.admin-panel-card-body input,
.admin-panel-card-body select {
  margin: 0;
  width: 100%;
}

.admin-panel-primary-btn {
  width: 100%;
  margin: 0;
}

/* Client Button Options Row - Culoare + Confetti on same row */
.client-button-options-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 600px) {
  .client-button-options-row {
    flex-direction: row;
    gap: var(--space-lg);
  }
  .client-button-options-row > div {
    flex: 1;
  }
  .client-button-options-row > div label {
    margin-bottom: var(--space-sm);
  }
  .client-button-options-row > div select {
    width: 100%;
  }
}

/* Compact card (Securitate Admin) - Single row layout */
.admin-panel-card-compact {
  padding: var(--space-md) var(--space-lg);
}

.security-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.security-admin-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 0 0 auto;
}

.security-admin-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 0 0 auto;
}

.security-admin-right .admin-pass-btn {
  height: auto;
  min-height: 44px;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

/* Admin Password Wrapper - Inline on tablet/desktop */
.admin-pass-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

@media (min-width: 600px) {
  .admin-pass-wrapper {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .admin-pass-wrapper input {
    flex: 1;
    margin: 0;
  }
  
  .admin-pass-wrapper .admin-pass-btn {
    flex-shrink: 0;
    margin: 0;
    width: auto;
    min-width: 140px;
    align-self: flex-start;
  }
}

.admin-pass-btn {
  height: 48px;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

/* Admin Password Helper Text */
.admin-pass-helper {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
  line-height: 1.5;
}

/* Admin Password Forgot Link - In compact row layout */
.security-admin-right .link-text {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  font-size: var(--font-size-sm) !important;
  font-weight: var(--font-weight-medium) !important;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.security-admin-right .link-text:hover {
  color: var(--accent) !important;
  text-decoration: underline;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Hide PIN input and label in Security Admin card (UX: PIN set only via popup/button) */
label[for="adminPass"] {
  display: none !important;
}
#adminPass {
  display: none !important;
}

/* Cards within subsections should have normal styling */
.admin-subsection .card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin: 0;
}

.admin-subsection .card:hover {
  box-shadow: var(--shadow);
}

/* Admin Page Subsection Cards - White Background */
#adminPage .admin-subsection .card {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-subsection .card h2,
.admin-subsection .card h3 {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 var(--space-lg) 0;
  color: var(--text);
}

/* ===== ADMIN SUBSECTIONS ===== */
.admin-subsection {
  margin-bottom: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition-base);
}

.admin-subsection:last-child {
  margin-bottom: 0;
}

.admin-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  cursor: pointer;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-base);
  user-select: none;
  position: relative;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Scroll margin for smooth scrolling when expanding subsections */
  scroll-margin-top: 80px; /* Account for fixed header + padding */
}

.admin-subsection-header:hover {
  background: var(--surface-hover);
}

.admin-subsection.expanded .admin-subsection-header {
  background: var(--surface);
  border-bottom-color: var(--border);
}

.admin-subsection-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.admin-subsection-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.admin-subsection:hover .admin-subsection-icon {
  border-color: var(--accent);
  background: rgba(67, 192, 71, 0.05);
}

.admin-subsection.expanded .admin-subsection-icon {
  border-color: var(--accent);
  background: rgba(67, 192, 71, 0.1);
}

.admin-subsection-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin: 0;
}

.admin-subsection-summary {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
}

.admin-subsection-chevron {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: transform var(--transition-base);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 11;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.admin-subsection-header:hover .admin-subsection-chevron {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.admin-subsection.expanded .admin-subsection-chevron {
  transform: rotate(180deg);
  background: rgba(67, 192, 71, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.admin-subsection-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms ease,
              padding 200ms ease;
  opacity: 0;
  padding: 0 var(--space-lg);
}

.admin-subsection.expanded .admin-subsection-content {
  max-height: 5000px;
  opacity: 1;
  padding: var(--space-xl) var(--space-lg);
}

.admin-page-header {
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.btn-expand-all {
  font-size: var(--font-size-sm);
  padding: var(--space-sm) var(--space-lg);
  width: auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 639px) {
  .page {
    padding: var(--space-lg) var(--space-md) 80px;
  }
  
  
  .admin-section-header {
    padding: var(--space-lg);
    flex-wrap: wrap;
  }
  
  .admin-section-content {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
  
  .admin-section.expanded .admin-section-content {
    padding: var(--space-xl) var(--space-lg);
  }
}

/* Quick actions buttons responsive layout for small phones */
@media (max-width: 420px) {
  .admin-section-header-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-right: 0;
    margin-bottom: var(--space-sm);
    gap: var(--space-sm);
  }
  
  .admin-section-save-btn,
  .admin-section-client-btn {
    width: 100%;
    flex: 1;
  }
}

/* Prize card responsive layout for small phones */
@media (max-width: 419px) {
  .prize-card-header {
    grid-template-columns: auto auto;
    gap: var(--space-sm) var(--space-md);
  }
  
  .prize-card-preview {
    grid-column: 1;
    grid-row: 1;
  }
  
  .prizeCount {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    width: 100%;
  }
  
  .btn-delete-prize {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
}

/* ===== ADDITIONAL UTILITIES ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== KIOSK MODE: DISABLE TEXT SELECTION ===== */
/* Disable text selection globally for kiosk/stand mode */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Re-enable text selection for input fields, textareas, and contenteditable elements */
input,
textarea,
[contenteditable="true"],
[contenteditable="true"] * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Ensure inputs can still receive focus and show selection handles */
input:focus,
textarea:focus,
[contenteditable="true"]:focus {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ===== INFO MODAL ===== */
.popup-info {
  max-width: 600px !important;
  padding: var(--space-2xl) var(--space-xl) !important;
}

.popup-info-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.popup-info-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  border-radius: var(--radius-md);
  color: #ffffff;
  flex-shrink: 0;
}

.popup-info-icon svg {
  width: 24px;
  height: 24px;
}

.popup-info-header h2 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  line-height: 1.3;
}

.popup-info-content {
  margin-bottom: var(--space-xl);
}

.popup-info-description {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.popup-info-section {
  margin-bottom: var(--space-xl);
}

.popup-info-section:last-of-type {
  margin-bottom: var(--space-lg);
}

.popup-info-section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.popup-info-section-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popup-info-section-title {
  margin: 0 0 var(--space-xs) 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  line-height: 1.3;
}

.popup-info-section-description {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}

.popup-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  padding-left: calc(40px + var(--space-md));
}

.popup-info-list li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--text);
}

.popup-info-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #1f8f4a;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
}

.popup-info-list li:last-child {
  margin-bottom: 0;
}

.popup-info-footer {
  margin: var(--space-xl) 0 0 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
}

.popup-info-actions {
  display: flex;
  justify-content: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.popup-info-actions .btn-primary {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
}

/* Prevent closing info modal via backdrop click */
#clientInterfaceInfoPopup,
#claimsDashboardInfoPopup,
#modClientInfoPopup {
  pointer-events: auto;
}

#clientInterfaceInfoPopup .popup-inner,
#claimsDashboardInfoPopup .popup-inner,
#modClientInfoPopup .popup-inner {
  pointer-events: auto;
}

#clientInterfaceInfoPopup:not(.active),
#claimsDashboardInfoPopup:not(.active),
#modClientInfoPopup:not(.active) {
  pointer-events: none;
}

/* Info modal subtitle */
.popup-info-subtitle {
  margin: var(--space-lg) 0 var(--space-md) 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

/* ===== CENTER LOADER (SPINNER) ===== */
.center-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: none;
  pointer-events: none;
}

.center-loader.show {
  display: block;
}

.center-loader .spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #43c047;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== SMALL INLINE SPINNER ===== */
.inline-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 0;
  margin-right: 8px;
  vertical-align: middle;
}

/* Spinner mai mare pentru butonul oval-button (Mod Client) */
.oval-button .inline-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
  margin: 0;
  display: block;
  margin: 0 auto;
}

/* Buton dezactivat cu opacity redus */
.btn-disabled-state {
  opacity: 0.6 !important;
  filter: brightness(0.9) !important;
  cursor: not-allowed !important;
}

/* ===== MOD CLIENT CARD - PREMIUM LAYOUT ===== */
.mod-client-status-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--space-lg);
}

.mod-client-status-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1f8f4a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.mod-client-status-icon.warning {
  background: #dc2626;
}

.mod-client-status-icon.inactive {
  background: #999;
}

.mod-client-status-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mod-client-status-text {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  color: #1f8f4a;
}

.mod-client-status-text.warning {
  color: #dc2626;
}

.mod-client-status-text.inactive {
  color: #999;
}

.mod-client-status-subtext {
  color: var(--text-secondary);
  margin-left: 34px;
  font-size: var(--font-size-sm);
}

.mod-client-button-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.mod-client-primary-btn {
  width: 100%;
  max-width: 520px;
  height: 52px;
  padding: 14px 24px;
  font-size: var(--font-size-base);
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(31, 143, 74, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mod-client-primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mod-client-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
}

.mod-client-stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mod-client-stat-label {
  color: var(--text);
}

.mod-client-stat-value {
  font-weight: var(--font-weight-semibold);
  color: #1f8f4a;
}

.mod-client-stat-value.muted {
  color: #999;
}

.mod-client-stop-alert {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: var(--space-md);
  cursor: pointer;
}

.mod-client-stop-alert.show {
  display: block;
}

.mod-client-stop-alert-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mod-client-stop-alert-icon {
  font-size: 18px;
  color: #dc2626;
  flex-shrink: 0;
}

.mod-client-stop-alert-text {
  flex: 1;
}

.mod-client-stop-alert-title {
  font-weight: var(--font-weight-semibold);
  color: #dc2626;
  margin-bottom: 4px;
}

.mod-client-stop-alert-description {
  font-size: var(--font-size-sm);
  color: #991b1b;
}

/* ===== DASHBOARD REVENDICĂRI - OVERVIEW LAYOUT ===== */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .dashboard-kpi-grid {
    max-width: 600px;
  }
}

.dashboard-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.dashboard-kpi-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
}

.dashboard-kpi-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.dashboard-kpi-value {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  line-height: 1.2;
}

.dashboard-recent-claims {
  margin-bottom: var(--space-xl);
}

.dashboard-recent-claims-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.dashboard-recent-claims-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.dashboard-recent-claims-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.dashboard-claim-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.dashboard-claim-item:first-child {
  margin-top: 0;
}

.dashboard-claim-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8ee4af 0%, #a3cffa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-weight-semibold);
  font-size: 12px;
  flex-shrink: 0;
}

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

.dashboard-claim-name {
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 2px;
}

.dashboard-claim-details {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.dashboard-claim-time {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  margin-left: auto;
  text-align: right;
  min-width: 140px;
  flex-shrink: 0;
}

.dashboard-claim-email {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}

.dashboard-see-all-btn {
  width: 100%;
  padding: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
}

.dashboard-closed-campaigns {
  margin-top: var(--space-xl);
}

.dashboard-closed-campaigns-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  cursor: pointer;
  transition: all 0.2s;
}

.dashboard-closed-campaigns-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.dashboard-closed-campaigns-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin: 0;
}

.dashboard-closed-campaigns-badge {
  background: var(--accent);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.dashboard-closed-campaigns-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: var(--space-xs) 0 0 0;
}

.dashboard-closed-campaigns-btn {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: var(--text) !important;
  font-weight: var(--font-weight-medium);
  box-shadow: none !important;
}

.dashboard-closed-campaigns-btn:hover {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

.dashboard-closed-campaign-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.dashboard-campaign-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.dashboard-campaign-stats {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.dashboard-campaign-stats strong {
  color: var(--text);
}

.dashboard-campaign-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.dashboard-campaign-btn {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* Compact archived campaign cards */
.dashboard-archived-campaign-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.dashboard-archived-campaign-info {
  flex: 1;
  min-width: 200px;
}

.dashboard-archived-campaign-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.dashboard-archived-campaign-stats {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.dashboard-archived-campaign-stats strong {
  color: var(--text);
}

.dashboard-archived-campaign-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-archived-campaign-btn {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* Modal pentru toate revendicările */
#allClaimsModal .popup-inner {
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#allClaimsModal .modal-header {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-md);
}

#allClaimsModal .modal-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#allClaimsModal .modal-actions {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-md);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}
