/* 
 * Cashless Bazar - World Record 2026 Registration Suite Stylesheet
 * Premium & Luxurious Ivory-Cream & Royal Gold Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Royal Cream & Gold Color Palette */
  --royal-bg-start: #fbfaf7;
  --royal-bg-end: #f2ebe0;
  --royal-card-bg: rgba(255, 255, 255, 0.88);
  --royal-wine: #6b071e;
  --royal-wine-light: #8d0c2b;
  --luxury-gold-dark: #af8f2c;
  --luxury-gold: #d4af37;
  --luxury-gold-light: #f5edd0;
  --luxury-gold-bright: #ffd863;
  
  /* State Colors */
  --success-green: #0ea85d;
  --success-glow: rgba(14, 168, 93, 0.1);
  --text-error: #e53e3e;
  --text-dark: #1e1b24;
  --text-muted: #534f59;
  --text-secondary: #7f7a85;
  --text-white: #ffffff;
  
  /* Layout variables */
  --font-royal: 'Cinzel', serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  --card-border: rgba(212, 175, 55, 0.35);
  --card-border-focus: rgba(107, 7, 30, 0.6);
  --shadow-premium: 0 20px 50px rgba(107, 7, 30, 0.08), 
                    0 4px 20px rgba(0, 0, 0, 0.05),
                    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-lg: 20px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--royal-bg-end);
  background-image: 
    radial-gradient(at 0% 0%, #fbfaf7 0px, transparent 60%),
    radial-gradient(at 100% 100%, rgba(212, 175, 55, 0.1) 0px, transparent 60%),
    radial-gradient(at 50% 0%, rgba(107, 7, 30, 0.04) 0px, transparent 50%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 35px 20px;
}

/* Premium Background Elements */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(160px);
  z-index: -2;
  opacity: 0.2;
  pointer-events: none;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background-color: var(--luxury-gold-light);
  top: -150px;
  right: -100px;
  animation: pulse-glow 10s infinite alternate ease-in-out;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background-color: rgba(107, 7, 30, 0.08);
  bottom: -200px;
  left: -150px;
  animation: pulse-glow 14s infinite alternate-reverse ease-in-out;
}

.mandala-bg {
  position: absolute;
  width: 800px;
  height: 800px;
  background-image: 
    radial-gradient(circle, rgba(212, 175, 55, 0.035) 1.5px, transparent 1.5px),
    radial-gradient(circle, rgba(107, 7, 30, 0.02) 2px, transparent 2px);
  background-size: 60px 60px;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.15; }
  100% { transform: scale(1.15) translate(30px, 30px); opacity: 0.3; }
}

/* Main Container */
.app-container {
  width: 100%;
  max-width: 680px;
  z-index: 1;
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Header Styling */
.app-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.header-logo {
  margin-bottom: 15px;
  display: inline-block;
  animation: spin-slow 30s linear infinite;
  filter: drop-shadow(0 4px 10px rgba(107, 7, 30, 0.15));
}

.header-title {
  font-family: var(--font-royal);
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: 5px;
  background: linear-gradient(90deg, var(--royal-wine) 0%, var(--luxury-gold-dark) 40%, var(--royal-wine-light) 60%, var(--luxury-gold-dark) 80%, var(--royal-wine) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gold-shimmer 8s linear infinite;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(107, 7, 30, 0.05);
}

.header-subtitle {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--royal-wine);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-top: 1.5px solid var(--luxury-gold);
  border-bottom: 1.5px solid var(--luxury-gold);
  padding: 6px 12px;
  display: inline-block;
  margin-top: 4px;
}

/* Utility buttons */
.header-actions {
  position: absolute;
  top: 15px;
  right: 0;
  display: flex;
  gap: 12px;
}

.icon-btn {
  background: var(--royal-card-bg);
  border: 1px solid var(--card-border);
  color: var(--royal-wine);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(107, 7, 30, 0.06);
}

.icon-btn:hover {
  background: linear-gradient(135deg, var(--royal-wine), var(--royal-wine-light));
  border-color: var(--royal-wine);
  transform: translateY(-3px) rotate(15deg);
  color: var(--text-white);
  box-shadow: 0 6px 15px rgba(107, 7, 30, 0.2);
}

/* Card Glassmorphism (Light Premium Mode) */
.card {
  background: var(--royal-card-bg);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--royal-wine);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px;
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(30deg);
  pointer-events: none;
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 30px;
  margin-bottom: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-heading);
  width: fit-content;
  border: 1px solid rgba(107, 7, 30, 0.1);
}

.status-bar.offline {
  background: rgba(212, 175, 55, 0.15);
  color: var(--royal-wine);
  border-color: rgba(212, 175, 55, 0.4);
}

.status-bar.online {
  background: rgba(14, 168, 93, 0.1);
  color: var(--success-green);
  border-color: rgba(14, 168, 93, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 1.5s infinite alternate ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 1; }
}

/* Form Styles */
.form-group {
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--royal-wine);
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-input, .form-select {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(107, 7, 30, 0.15);
  color: var(--text-dark);
  padding: 15px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form-input:focus, .form-select:focus {
  border-color: var(--royal-wine);
  background: #ffffff;
  box-shadow: 0 0 12px rgba(107, 7, 30, 0.08);
}

.focus-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--luxury-gold), var(--royal-wine), var(--luxury-gold));
  transition: 0.4s ease;
}

.form-input:focus ~ .focus-border {
  width: 100%;
  left: 0;
}

/* Styled Select */
.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 45px;
}

.form-select option {
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 12px;
}

.select-arrow {
  position: absolute;
  right: 18px;
  pointer-events: none;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--royal-wine);
  transition: var(--transition-smooth);
}

.form-select:focus ~ .select-arrow {
  transform: rotate(180deg);
  border-top-color: var(--luxury-gold-dark);
}

/* Validations & Errors */
.error-msg {
  font-size: 0.8rem;
  color: var(--text-error);
  margin-top: 6px;
  font-weight: 600;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.error .form-input, .error .form-select {
  border-color: var(--text-error);
  background: rgba(229, 62, 98, 0.02);
}

.error .error-msg {
  opacity: 1;
  height: auto;
  margin-top: 6px;
}

/* UPI QR Section style */
.upi-qr-section {
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--luxury-gold);
  border-radius: var(--radius-lg);
  padding: 25px;
  margin-bottom: 25px;
  display: flex;
  gap: 25px;
  align-items: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.upi-qr-section.show {
  max-height: 520px;
  opacity: 1;
  margin-bottom: 25px;
}

.payment-card-wrapper {
  width: 190px;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(107, 7, 30, 0.1);
  flex-shrink: 0;
  transition: var(--transition-smooth);
  border: 1px solid var(--luxury-gold);
}

.payment-card-wrapper:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 30px rgba(107, 7, 30, 0.15);
}

.payment-card-header {
  background: #0d2a5c;
  padding: 10px;
  text-align: center;
}

.bank-logo {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.smart-hub-tag {
  font-family: var(--font-body);
  font-size: 0.58rem;
  color: #ffcc00;
  font-weight: 600;
  text-transform: uppercase;
}

.payment-card-body {
  padding: 15px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.merchant-title {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  color: #111111;
  margin-bottom: 2px;
  line-height: 1.2;
}

.merchant-tid {
  font-family: var(--font-body);
  font-size: 0.58rem;
  color: #666666;
  margin-bottom: 10px;
}

.qr-image-holder {
  background: #fbfbfb;
  border: 1px solid #edf2f7;
  padding: 6px;
  border-radius: 6px;
  width: 136px;
  height: 136px;
  margin-bottom: 10px;
}

.payment-qr-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.amount-badge {
  background: rgba(107, 7, 30, 0.05);
  color: var(--royal-wine);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  border: 1px solid rgba(107, 7, 30, 0.12);
}

.scan-pay-text {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  color: #333333;
}

.payment-card-footer {
  background: #f7fafc;
  border-top: 1px solid #edf2f7;
  padding: 8px;
  text-align: center;
}

.footer-app-logos {
  font-family: var(--font-body);
  font-size: 0.5rem;
  color: #718096;
  letter-spacing: 0.2px;
  font-weight: 600;
}

.qr-info {
  flex-grow: 1;
}

.qr-info h4 {
  font-family: var(--font-royal);
  font-size: 1rem;
  color: var(--royal-wine);
  margin-bottom: 8px;
  letter-spacing: 1px;
  font-weight: 700;
}

.qr-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

@media (max-width: 500px) {
  .upi-qr-section {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}

/* Disclaimer Section */
.disclaimer-section {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 25px;
  font-size: 0.82rem;
  line-height: 1.6;
}

.disclaimer-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--royal-wine);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.disclaimer-list {
  list-style: none;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.disclaimer-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 15px;
}

.disclaimer-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--luxury-gold-dark);
  font-size: 0.7rem;
}

.checkbox-group {
  margin-top: 15px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 1px solid rgba(107, 7, 30, 0.2);
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
  transition: var(--transition-smooth);
}

.checkbox-label:hover input[type="checkbox"] ~ .checkbox-custom {
  border-color: var(--royal-wine);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
  background: var(--royal-wine);
  border-color: var(--royal-wine);
}

.checkbox-custom::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
  display: block;
}

.checkbox-text {
  font-size: 0.82rem;
  color: var(--text-dark);
  line-height: 1.4;
  font-weight: 500;
}

/* Submit Button & Loader */
.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--royal-wine) 0%, var(--royal-wine-light) 100%);
  border: none;
  color: var(--text-white);
  padding: 16px 26px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--transition-smooth);
  box-shadow: 0 6px 20px rgba(107, 7, 30, 0.15);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(107, 7, 30, 0.3);
  background: linear-gradient(135deg, var(--royal-wine-light) 0%, #a51336 100%);
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

.spinner {
  animation: rotate 2s linear infinite;
  width: 22px;
  height: 22px;
}

.spinner .path {
  stroke: var(--text-white);
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

/* Processing Screen styling */
.processing-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0;
}

.spinner-container {
  margin-bottom: 25px;
}

.spinner-large {
  animation: rotate 2s linear infinite;
  width: 65px;
  height: 65px;
}

.spinner-large .path {
  stroke: var(--royal-wine);
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

.processing-screen h3 {
  font-family: var(--font-royal);
  font-size: 1.4rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
  color: var(--royal-wine);
  font-weight: 700;
}

.processing-screen p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Success screen styling */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0;
  animation: scale-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-icon-wrapper {
  width: 90px;
  height: 90px;
  margin-bottom: 25px;
}

.success-checkmark {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--success-green);
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px var(--success-green);
  animation: fill-checkmark 0.4s ease-in-out 0.4s forwards, scale-checkmark 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--success-green);
  fill: none;
  animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: var(--success-green);
  animation: stroke-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke-circle {
  100% { stroke-dashoffset: 0; }
}
@keyframes fill-checkmark {
  100% { box-shadow: inset 0px 0px 0px 45px rgba(14, 168, 93, 0.08); }
}
@keyframes stroke-check {
  100% { stroke-dashoffset: 0; }
}

.success-title {
  font-family: var(--font-royal);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--royal-wine);
  letter-spacing: 1px;
}

.success-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 30px;
}

/* Receipt Details Box */
.receipt-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(107, 7, 30, 0.12);
  border-radius: var(--radius-md);
  padding: 25px;
  margin-bottom: 30px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.receipt-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--royal-wine);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.receipt-val-highlight {
  font-family: var(--font-royal);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--luxury-gold-dark);
}

.receipt-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(107, 7, 30, 0.1) 10%, rgba(107, 7, 30, 0.1) 90%, transparent);
  margin: 18px 0;
}

.receipt-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.receipt-row span {
  color: var(--text-muted);
}

.receipt-row strong {
  font-weight: 600;
  color: var(--text-dark);
}

.whatsapp-btn {
  width: 100%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border: none;
  color: var(--text-white);
  padding: 15px 26px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--transition-smooth);
  margin-bottom: 15px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.15);
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
  background: linear-gradient(135deg, #128C7E, #075E54);
}

.whatsapp-btn:active {
  transform: translateY(1px);
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(107, 7, 30, 0.2);
  color: var(--royal-wine);
  padding: 15px 26px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.secondary-btn:hover {
  background: rgba(107, 7, 30, 0.05);
  border-color: var(--royal-wine);
}

/* Modals overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 10, 22, 0.5);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 1;
  transition: var(--transition-smooth);
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--luxury-gold);
  border-top: 4px solid var(--royal-wine);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 60px rgba(107, 7, 30, 0.15);
  animation: scale-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-card.modal-large {
  max-width: 650px;
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(107, 7, 30, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-royal);
  font-size: 1.25rem;
  color: var(--royal-wine);
  font-weight: 700;
  letter-spacing: 1px;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  line-height: 1;
}

.close-modal-btn:hover {
  color: var(--royal-wine);
  transform: rotate(90deg);
}

.modal-body {
  padding: 28px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.6;
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.4;
  display: block;
}

/* Code block styles */
.markdown-content h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--royal-wine);
  font-weight: 600;
}

.markdown-content ol {
  padding-left: 20px;
  margin-bottom: 22px;
}

.markdown-content li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.markdown-content li strong {
  color: var(--text-dark);
  font-weight: 600;
}

.code-block-header {
  font-size: 0.78rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--royal-wine);
  margin-top: 10px;
  text-transform: uppercase;
}

.code-block {
  background: #f7fafc;
  border: 1px solid rgba(107, 7, 30, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  color: var(--royal-wine-light);
  margin-top: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
}

.alert-success {
  background: rgba(14, 168, 93, 0.05);
  border: 1px solid rgba(14, 168, 93, 0.2);
  color: var(--success-green);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--royal-bg-end);
}

::-webkit-scrollbar-thumb {
  background: rgba(107, 7, 30, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--royal-wine);
}

/* ==========================================================================
   👑 ADMIN PANEL SPECIFIC STYLES
   ========================================================================== */

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 25px;
  width: 100%;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 25px;
  width: 100%;
}

@media (min-width: 768px) {
  .stats-container {
    grid-template-columns: repeat(5, 1fr);
  }
}

.stat-card {
  background: var(--royal-card-bg);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--royal-wine);
  border-radius: var(--radius-md);
  padding: 22px 15px;
  text-align: center;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 25px rgba(107, 7, 30, 0.05);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--royal-wine);
  box-shadow: 0 15px 30px rgba(107, 7, 30, 0.12);
}

.stat-val {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-royal);
  color: var(--royal-wine);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.admin-table-wrapper {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid rgba(107, 7, 30, 0.15);
  border-radius: var(--radius-md);
  margin-top: 18px;
  background: #ffffff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.admin-table th {
  background: linear-gradient(135deg, var(--royal-wine) 0%, var(--royal-wine-light) 100%);
  color: var(--text-white);
  padding: 15px 14px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--luxury-gold);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-family: var(--font-heading);
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(107, 7, 30, 0.08);
  color: var(--text-dark);
  font-family: var(--font-body);
}

.admin-table tr {
  transition: var(--transition-smooth);
}

.admin-table tr:hover {
  background: rgba(212, 175, 55, 0.06);
}

.action-btn-sm {
  padding: 8px 14px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  border: none;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-edit { 
  background: var(--luxury-gold-dark); 
  color: #fff; 
}
.btn-edit:hover {
  background: var(--luxury-gold);
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
}

.btn-delete { 
  background: var(--text-error); 
  color: #fff; 
}
.btn-delete:hover {
  background: #ff5252;
  box-shadow: 0 3px 10px rgba(229, 62, 62, 0.25);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.badge-active { 
  background: rgba(14, 168, 93, 0.08); 
  color: var(--success-green); 
  border: 1px solid rgba(14, 168, 93, 0.2);
}
.badge-inactive { 
  background: rgba(229, 62, 62, 0.08); 
  color: var(--text-error); 
  border: 1px solid rgba(229, 62, 62, 0.2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  width: 100%;
}

.search-input {
  flex-grow: 1;
  min-width: 250px;
}

.btn-export {
  background: linear-gradient(135deg, #107c41, #1f9a55);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(27, 154, 85, 0.2);
}

.btn-pdf {
  background: linear-gradient(135deg, #e01b22, #b21419);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(224, 27, 34, 0.2);
}

.btn-refresh {
  background: #ffffff;
  border: 1px solid rgba(107, 7, 30, 0.2);
  color: var(--royal-wine);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-refresh:hover {
  background: rgba(107, 7, 30, 0.05);
}

/* Toast Messages */
.toast {
  box-shadow: 0 10px 30px rgba(107, 7, 30, 0.15);
  border-left: 5px solid rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.toast-success {
  border-left-color: var(--success-green);
  background: rgba(14, 168, 93, 0.92);
}
.toast-error {
  border-left-color: var(--text-error);
  background: rgba(229, 62, 62, 0.92);
}
.toast-info {
  border-left-color: var(--royal-wine);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-dark) !important;
}

/* Animations */
@keyframes rotate {
  100% { transform: rotate(360deg); }
}

@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(25px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scale-up {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes scale-checkmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes gold-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Tab Navigation & Content */
.tab-navigation {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 1.5px solid var(--card-border);
  padding-bottom: 5px;
  width: 100%;
}

.tab-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  color: var(--royal-wine);
  background: rgba(107, 7, 30, 0.03);
}

.tab-btn.active {
  color: var(--royal-wine);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -6.5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--royal-wine);
  border-radius: 2px;
}

.tab-content {
  display: none;
  width: 100%;
}

.tab-content.active {
  display: block;
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Overview Breakdown Widgets */
.breakdown-row {
  margin-bottom: 20px;
}

.breakdown-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}



.progress-container {
  height: 10px;
  background: rgba(107, 7, 30, 0.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(107, 7, 30, 0.1);
  width: 100%;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--luxury-gold), var(--royal-wine));
  border-radius: var(--radius-sm);
  transition: width 1s ease-out;
}

/* Leaderboard Widget */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(107, 7, 30, 0.08);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.leaderboard-item:hover {
  transform: translateX(4px);
  border-color: var(--luxury-gold);
}

.leaderboard-rank {
  font-family: var(--font-royal);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--royal-wine);
  width: 25px;
}

.leaderboard-details {
  flex-grow: 1;
  margin-left: 10px;
}

.leaderboard-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}


.progress-container {
  height: 10px;
  background: rgba(107, 7, 30, 0.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(107, 7, 30, 0.1);
  width: 100%;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--luxury-gold), var(--royal-wine));
  border-radius: var(--radius-sm);
  transition: width 1s ease-out;
}

/* Leaderboard Widget */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(107, 7, 30, 0.08);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.leaderboard-item:hover {
  transform: translateX(4px);
  border-color: var(--luxury-gold);
}

.leaderboard-rank {
  font-family: var(--font-royal);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--royal-wine);
  width: 25px;
}

.leaderboard-details {
  flex-grow: 1;
  margin-left: 10px;
}

.leaderboard-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.leaderboard-id {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.leaderboard-count-badge {
  background: var(--royal-wine);
  color: var(--text-white);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
}

/* Screens transitions & Utility */
.hidden {
  display: none !important;
}

/* --- Mobile Responsive Optimizations for Admin & General Layouts --- */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  body {
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 15px 10px !important;
  }
  
  .bg-glow, .mandala-bg {
    display: none !important;
  }
  
  .app-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  
  .card {
    padding: 20px 15px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Prevent stats values from wrapping/overflowing on smaller screens */
  .stats-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }
  
  .stat-card {
    padding: 15px 10px !important;
  }
  
  .stat-val {
    font-size: 1.3rem !important;
  }
  
  /* Horizontal scroll for Tab buttons to fit smaller screens */
  .tab-navigation {
    gap: 5px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding-bottom: 8px !important;
    border-bottom: 1.5px solid var(--card-border) !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }
  
  .tab-btn {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
  }
  
  /* Enable horizontal scroll on tables to fit within the viewport */
  .admin-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }
  
  .admin-table th, .admin-table td {
    padding: 10px 8px !important;
    font-size: 0.8rem !important;
  }
  
  /* Adjust toolbar buttons grouping */
  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }
  
  .toolbar button {
    width: 100% !important;
  }
  
  .search-input {
    min-width: 100% !important;
  }
  
  /* Centered Header Logout Button on Mobile */
  .header-actions {
    position: static !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 15px !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: 1fr !important;
  }
  
  .header-title {
    font-size: 1.7rem !important;
  }
  
  .header-subtitle {
    font-size: 0.85rem !important;
  }
}
