/* SKINARI Digital Loyalty Platform Styling */

.loyalty-body, .admin-body {
    background: var(--color-bg) !important;
    color: var(--color-text) !important;
    font-family: var(--font-body), 'Inter', sans-serif;
    min-height: 100vh;
}

.loyalty-container, .admin-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.loyalty-header {
    margin-bottom: 40px;
    color: var(--color-text) !important;
}
.loyalty-header .logo {
    color: var(--color-text) !important;
}
.loyalty-header p {
    color: var(--color-text-light) !important;
    font-weight: 500;
}

.loyalty-title {
    font-family: var(--font-heading, serif);
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--color-text) !important;
}

.logo-small {
    font-family: var(--font-heading, serif);
    font-size: 1.2rem;
    color: var(--color-gold, #c4a882);
    text-decoration: none;
    letter-spacing: 4px;
}

/* Steps */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.step-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    padding: 30px 24px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.step-card h3 {
    color: var(--color-text);
    margin-bottom: 10px;
}
.step-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.step-num {
    display: inline-flex; width: 32px; height: 32px;
    align-items: center; justify-content: center;
    background: var(--color-gold, #c4a882);
    color: #1a1715; border-radius: 50%;
    font-weight: bold; margin-bottom: 12px;
}

/* Login */
.login-section {
    text-align: center;
    background: var(--color-card);
    padding: 60px 40px;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
}

.btn-google {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #333; font-weight: 500;
}
.btn-google:hover { background: #f1f1f1; color: #333; }

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(184, 163, 137, 0.2);
}
.user-info { display: flex; align-items: center; gap: 16px; }
.user-info img { border-radius: 50%; width: 48px; height: 48px; border: 2px solid var(--color-gold, #c4a882); }

.punch-card {
    background: linear-gradient(145deg, #2a2521, #1a1715);
    border: 1px solid rgba(184, 163, 137, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px;
}
.badge { background: var(--color-gold, #c4a882); color: #1a1715; padding: 4px 12px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;}
.reward-text { color: var(--color-gold, #c4a882); font-weight: 500; }

.punch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 15px; margin-bottom: 30px;
}
.punch-circle {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px dashed rgba(184, 163, 137, 0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: rgba(255,255,255,0.3);
    transition: all 0.4s ease;
}
.punch-circle.filled {
    background: var(--color-gold, #c4a882);
    border: 2px solid var(--color-gold, #c4a882);
    color: #1a1715; font-weight: bold;
    box-shadow: 0 0 20px rgba(184, 163, 137, 0.4);
}

.progress-bar-container { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress-bar-fill { height: 100%; background: var(--color-gold, #c4a882); transition: width 0.5s ease; }

/* QR Section */
.qr-section { text-align: center; margin-bottom: 40px; background: #fff; padding: 30px; border-radius: 20px; box-shadow: var(--shadow-md); }
.qr-instructions { color: var(--color-text-light); font-weight: 500; margin-bottom: 20px; }
.qr-box { display: inline-block; padding: 10px; background: #fff; border: 4px solid var(--color-gold); border-radius: 12px; margin-bottom: 10px; }
.qr-id { color: var(--color-text-muted); font-family: monospace; font-size: 1rem; font-weight: bold; }

/* Admin Overlay */
.admin-status-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 3000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.status-content { text-align: center; background: #1a1715; padding: 40px; border-radius: 20px; border: 1px solid #333; max-width: 400px; width: 90%; }
.admin-status-overlay.success .status-content { border-color: #4CAF50; box-shadow: 0 0 40px rgba(76, 175, 80, 0.2); }
.admin-status-overlay.error .status-content { border-color: #F44336; box-shadow: 0 0 40px rgba(244, 67, 54, 0.2); }
.admin-status-overlay.success h2 { color: #4CAF50; }
.admin-status-overlay.error h2 { color: #F44336; }

/* History Section */
.history-section h3 {
    color: var(--color-text);
    margin-bottom: 16px;
    font-size: 1.4rem;
    margin-top: 40px;
}
.history-list {
    background: var(--color-card);
    border-radius: 16px;
    padding: 10px;
    border: 1px solid var(--color-border);
    list-style: none;
}
.history-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}
.history-list li:last-child { border-bottom: none; }
.history-punch { font-weight: 600; color: var(--color-gold); }
.history-date { font-size: 0.9rem; color: var(--color-text-light); }

/* FORCED THEME OVERRIDES FOR DASHBOARD (Fixing Contrast & Background) */
body.theme-dark .loyalty-body, 
body.theme-dark .admin-body {
    background-color: #161311 !important;
}

body.theme-dark .user-info h2,
body.theme-dark .loyalty-title,
body.theme-dark .loyalty-header p,
body.theme-dark .qr-instructions,
body.theme-dark .history-section h3 {
    color: #E8E2D9 !important;
}

body.theme-dark .qr-id {
    color: #A68E74 !important; /* Gold/Bronze for the ID */
}

body.theme-dark .history-list li {
    color: #E8E2D9 !important;
    border-bottom: 1px solid rgba(232, 226, 217, 0.1) !important;
}
