:root {
    --primary-color: #d32f2f; /* Premium Red */
    --primary-dark: #b71c1c;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Navigation */
.top-nav {
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.nav-links a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Main Content Area */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
}

.btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: none; /* hidden by default */
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* QR Code Display */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
    display: none;
}

#qrcode {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.coupon-code-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 2px;
    background: rgba(211, 47, 47, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

/* Table styles for Admin */
.admin-card {
    max-width: 1000px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

tr:hover {
    background-color: #f1f5f9;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-used {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* Scanner styles */
#reader {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   REDESIGNED LANDING PAGE STYLES (MATCHING MOCKUP)
   ========================================================================== */
.customer-main {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.landing-page {
    font-family: 'Playfair Display', serif;
    width: 100%;
}

/* Header */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5rem;
    background-color: #fdf9ef;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo img {
    height: 40px;
}

.mobile-menu-icon {
    display: none;
    font-size: 2rem;
    color: #386b2e;
    cursor: pointer;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
}

.desktop-nav a {
    text-decoration: none;
    color: #333;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.desktop-nav a:hover {
    color: #386b2e;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-wrap: wrap;
    background-color: #fdf9ef;
    min-height: calc(80vh - 80px);
}

.hero-content {
    flex: 0 0 50%;
    max-width: 50%;
    box-sizing: border-box;
    padding: 3rem 5rem 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-heading {
    font-size: 3.5rem;
    color: #3b3a36;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-heading .font-normal {
    font-weight: 400;
}

.script-text {
    font-family: 'Dancing Script', cursive;
    color: #386b2e;
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 0.8;
}

.hero-subtext {
    font-family: 'Outfit', sans-serif;
    color: #386b2e;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discount-box {
    border: 2px dashed #386b2e;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background-color: #ffffff;
    max-width: max-content;
    margin-bottom: 2.5rem;
}

.discount-percent {
    background-color: #386b2e;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    /* Removed spiky clip-path, using a clean circle */
    border: 3px dashed #fff;
    box-shadow: 0 0 0 4px #386b2e;
}

.discount-text {
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', sans-serif;
}

.discount-text .get { font-size: 1rem; font-weight: 600; color: #555; }
.discount-text .off { font-size: 2rem; font-weight: 800; color: #333; line-height: 1; }
.discount-text .next { font-size: 0.9rem; font-weight: 600; color: #555; }

.form-wrapper {
    max-width: 450px;
    font-family: 'Outfit', sans-serif;
}

.form-prompt {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.2rem;
}

.landing-form input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
}

.claim-btn {
    width: 100%;
    background-color: #386b2e;
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.claim-btn:hover {
    background-color: #2d5624;
}

.privacy-text {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.hero-image {
    flex: 0 0 50%;
    max-width: 50%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper {
    height: 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.badge {
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: #23491d;
    color: white;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transform: translate(-50%, -50%) rotate(-5deg);
    z-index: 2;
}

.badge i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.badge p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.badge span {
    color: #f5b041;
    font-weight: 700;
}

/* Sections Global */
.section-title {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.section-title::before,
.section-title::after {
    content: '';
    width: 50px;
    height: 0;
    border-top: 1.5px dashed rgba(0,0,0,0.3);
}

/* How it Works */
.how-it-works {
    background-color: #f1f4eb;
    padding: 4rem 2rem;
}

.how-it-works .section-title {
    color: #23491d;
}

.how-it-works .section-title::before,
.how-it-works .section-title::after {
    border-top-color: #23491d;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 0; /* Remove gap, handle spacing with padding so vertical line is centered */
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    position: relative;
    padding: 0 2rem;
}

/* Vertical solid line between steps */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    width: 1px;
    height: 80%;
    background-color: rgba(35, 73, 29, 0.3);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background-color: #386b2e;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
    position: relative;
    z-index: 2;
}

.step-num {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 28px;
    height: 28px;
    background-color: #1d411a;
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #f1f4eb;
}

.step h3 {
    font-size: 1.2rem;
    color: #23491d;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.step p {
    color: #555;
    font-size: 0.95rem;
}

/* Why You'll Love It */
.why-love-it {
    background-color: #23491d;
    padding: 4rem 2rem;
    color: white;
}

.why-love-it .section-title {
    color: white;
}

.why-love-it .section-title::before,
.why-love-it .section-title::after {
    border-top-color: rgba(255,255,255,0.5);
}

.features-container {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.feature {
    flex: 1;
    min-width: 180px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    position: relative;
    padding: 0 1rem;
}

/* Dashed vertical line between features */
.feature:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    width: 1px;
    height: 80%;
    border-right: 1px dashed rgba(245, 176, 65, 0.5);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border: 2px dashed #f5b041;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #f5b041;
    margin: 0 auto 1rem auto;
}

.feature h3 {
    font-size: 1rem;
    color: #f5b041;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.9rem;
    color: #e2e8f0;
}

/* Footer */
.landing-footer {
    background-color: #fdf9ef;
    padding: 3rem 0 0 0;
}

.script-footer {
    font-family: 'Dancing Script', cursive;
    color: #3b3a36;
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

.footer-bottom {
    background-color: #fdf9ef;
    border-top: 1px solid rgba(35, 73, 29, 0.15);
    padding: 1.5rem 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    color: #3b3a36;
}

.footer-logo img {
    height: 45px;
    /* Show the natural logo (no white inversion) */
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-weight: 600;
    color: #3b3a36;
}

.social-links i {
    font-size: 1.8rem;
    cursor: pointer;
}

.website {
    font-weight: 600;
    color: #23491d;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Make sure QR container is centered */
.landing-qr-container {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

/* Header back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #23491d !important;
    font-weight: 700;
}
.back-link i { font-size: 1.2rem; }
.back-link:hover { color: #386b2e !important; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column-reverse;
    }

    .hero-content,
    .hero-image {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero-image {
        min-height: 320px;
    }

    .image-wrapper img {
        border-radius: 0;
    }

    .hero-content {
        padding: 3rem 2rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .feature:not(:last-child)::after {
        display: none;
    }
    
    .features-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .steps-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
        text-align: center;
    }
}

/* ==========================================================================
   SUCCESS / CELEBRATION STATE (replaces QR display)
   ========================================================================== */
.success-container {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 1.5rem;
    padding: 2.5rem 1.75rem;
    background: linear-gradient(180deg, #ffffff 0%, #fdf9ef 100%);
    border: 2px dashed #386b2e;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(35, 73, 29, 0.12);
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
}
.success-container.is-visible {
    display: flex;
    animation: anna-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-art {
    width: 140px;
    height: 140px;
    margin-bottom: 1.25rem;
    position: relative;
}
.success-envelope {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Burst circle pulses on entry */
.is-visible .success-burst {
    transform-origin: 60px 60px;
    animation: anna-burst 0.9s ease-out 0.05s both;
}

/* Envelope body slides up + flap closes */
.is-visible .env-body {
    transform-origin: 60px 70px;
    animation: anna-env-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.is-visible .env-flap {
    stroke-dasharray: 110;
    stroke-dashoffset: 110;
    animation: anna-draw 0.55s ease-out 0.4s forwards;
}

/* Check circle bounces in, check draws */
.is-visible .success-check-bg {
    transform-origin: 92px 86px;
    animation: anna-check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both;
}
.is-visible .success-check {
    stroke-dasharray: 32;
    stroke-dashoffset: 32;
    animation: anna-draw 0.35s ease-out 1.0s forwards;
}

/* Sparkles twinkle */
.is-visible .success-sparkles line {
    transform-origin: center;
    opacity: 0;
    animation: anna-sparkle 1.2s ease-in-out 0.9s infinite;
}
.is-visible .success-sparkles line:nth-child(2) { animation-delay: 1.05s; }
.is-visible .success-sparkles line:nth-child(3) { animation-delay: 1.2s; }
.is-visible .success-sparkles line:nth-child(4) { animation-delay: 1.35s; }
.is-visible .success-sparkles line:nth-child(5) { animation-delay: 1.5s; }

.success-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: #23491d;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    line-height: 1.15;
}
.success-msg {
    color: #3b3a36;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    max-width: 380px;
}
.success-msg strong { color: #23491d; }
#successEmail {
    color: #23491d;
    font-weight: 700;
    word-break: break-all;
}
.success-tip {
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.success-tip i { font-size: 1.05rem; color: #f5b041; }

@keyframes anna-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes anna-burst {
    0%   { transform: scale(0.4); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 0.18; }
    100% { transform: scale(1); opacity: 0.08; }
}
@keyframes anna-env-pop {
    0%   { transform: translateY(20px) scale(0.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes anna-check-pop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes anna-draw {
    to { stroke-dashoffset: 0; }
}
@keyframes anna-sparkle {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    50%      { opacity: 1; transform: scale(1.2); }
}

/* Marketing opt-in row */
.optin-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
}
.optin-row input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #386b2e;
    cursor: pointer;
}
.optin-row span { flex: 1; }

/* Honeypot — hidden from real users */
.anna-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
