        
/* Reset y estilos base */
:root {
  --color-beige-warm: #FFF8E7; /* Fondo beige cálido */
  --color-cream-light: #FFF9F4; /* Contenedor light cream */
  --color-primary-dark: #4A2C18; /* Marrón oscuro */
  --color-secondary: #6D4C41; /* Marrón medio */
  --color-golden: #F49F33; /* Dorado para títulos y bordes */
  --color-border-golden: #D4AF37; /* Dorado más suave para bordes */
  --color-text-dark: #795548; /* Texto dark brown */
  --color-shadow-soft: rgba(74, 44, 24, 0.1); /* Sombras suaves */
  --color-white: #FFFFFF;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Fondo suave y relajante */
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px; /* Ancho centrado para formularios y tarjetas */
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #d4af37, #f7dc6f); /* Dorado sutil para header */
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #d4af37;
    font-style: italic;
    letter-spacing: 1px;
}

/* Títulos y textos */
.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.description-text {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.8;
}

.loyalty-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.loyalty-subtitle {
    text-align: center;
    font-size: 1rem;
    color: #d4af37;
    font-style: italic;
    margin-bottom: 30px;
}

/* Formularios y inputs */
.form-box {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Botones */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.emunah-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.emunah-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.register-btn, .login-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.google-btn {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
}

.google-btn:hover {
    border-color: #d4af37;
}

.icon-google {
    width: 20px;
    height: 20px;
}

.side-buttons {
    display: flex;
    gap: 10px;
}

.side-buttons button {
    flex: 1;
}

/* Cita bíblica */
.bible-quote {
    font-style: italic;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 30px 0;
    padding: 20px;
    border-left: 4px solid #d4af37;
    background: #f8f9fa;
    border-radius: 0 10px 10px 0;
}

/* Sección de Lealtad */
.loyalty-section {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.progress-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.progress-card h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: #2c3e50;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f7dc6f);
    width: 0%; /* Se actualiza con JS */
    transition: width 0.5s ease;
    border-radius: 10px;
}

#progressText {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.motivational-msg {
    color: #27ae60;
    font-style: italic;
    margin-top: 10px;
}

.history-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.history-card h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

#rewardsHistory {
    list-style: none;
}

#rewardsHistory li {
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #d4af37;
}

.medal-showcase {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.medal-showcase h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.medals-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.medal {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #f7dc6f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    transition: transform 0.3s ease;
}

.medal:hover {
    transform: scale(1.1);
}

/* QR Container */
.qr-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}

#qrCanvas {
    margin: 20px auto;
    display: block;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.progresos {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
}

/* Menú de Usuario */
.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#logoutBtn {
    background: #e74c3c;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
}

/* Sección Admin */
.admin-section {
    max-width: 1000px;
    margin: 20px auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.admin-section h3 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

#adminTableContainer {
    overflow-x: auto; /* Para tablas en móvil */
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.qr-reader {
    margin: 20px 0;
    text-align: center;
    min-height: 200px;
    border: 2px dashed #d4af37;
    border-radius: 10px;
    padding: 20px;
    background: #f8f9fa;
}

/* Status y mensajes */
#status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

#status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsividad */
@media (max-width: 500px) {
    .main-container {
        padding: 10px;
        min-height: 100vh;
    }

    .container {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }

    .main-title {
        font-size: 2rem;
    }

    .side-buttons {
        flex-direction: column;
    }

    .medals-row {
        justify-content: center;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .progress-card,
    .history-card,
    .medal-showcase,
    .qr-card {
        padding: 20px;
    }

    .button-group {
        gap: 10px;
    }
}


.medal.locked {
  opacity: 0.6;
  background: linear-gradient(135deg, #E6D8B3, #D2B48C); /* Beige suave para locked */
  border: 2px dashed #C39953; /* Dorado dashed para "teaser" */
  font-size: 1rem; /* Ajusta para texto */
}

.medal.locked small {
  font-size: 0.7rem;
  color: #A0522D;
  font-weight: bold;
}

.medal.unlocked { /* Ya existe, pero asegúrate */
  opacity: 1;
  animation: shine 2s infinite alternate;
}

/* Título principal (bold golden) */
.main-title {
  font-family: var(--font-serif);
  font-size: 2.5rem; /* Bold y grande */
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Sombra sutil */
  letter-spacing: 1px;
  margin-bottom: 20px;
}