/* ============ ARISE Method - Shared Styles ============ */

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

:root {
    --gold: #C4943E;
    --gold-light: #E8C97A;
    --gold-bg: rgba(196, 148, 62, 0.08);
    --cream: #FDF8F0;
    --cream-dark: #F5EDE0;
    --charcoal: #2A2420;
    --warm-gray: #6B5E52;
    --sage: #8B9A7B;
    --sage-light: #C5D1B8;
    --terracotta: #C4705A;
    --white: #FFFFFF;
    --error: #C4505A;
    --success: #5A8B6B;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--charcoal);
    background: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============ APP NAV ============ */

.app-nav {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(196, 148, 62, 0.12);
}

.app-nav .nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--charcoal);
    text-decoration: none;
}

.app-nav .nav-logo span { color: var(--gold); }

.app-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.app-nav-links a {
    font-size: 0.9rem;
    color: var(--warm-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.app-nav-links a:hover { color: var(--gold); }
.app-nav-links a.active { color: var(--gold); font-weight: 600; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.8rem;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--warm-gray);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--cream-dark);
    color: var(--charcoal);
}

/* ============ BUTTONS ============ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(196, 148, 62, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 148, 62, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--charcoal);
    border: 1px solid rgba(196, 148, 62, 0.25);
}

.btn-secondary:hover {
    border-color: var(--gold);
    background: var(--gold-bg);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: 1.05rem;
    border-radius: 14px;
}

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

/* ============ FORMS ============ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid rgba(196, 148, 62, 0.2);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--charcoal);
    background: var(--white);
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 148, 62, 0.1);
}

.form-input::placeholder {
    color: var(--warm-gray);
    opacity: 0.6;
}

.form-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* ============ ALERTS ============ */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: none;
}

.alert-error {
    background: rgba(196, 80, 90, 0.08);
    color: var(--error);
    border: 1px solid rgba(196, 80, 90, 0.2);
}

.alert-success {
    background: rgba(90, 139, 107, 0.08);
    color: var(--success);
    border: 1px solid rgba(90, 139, 107, 0.2);
}

.alert.show {
    display: block;
}

/* ============ CARDS ============ */

.card {
    background: var(--white);
    border-radius: 20px;
    border: 1px solid rgba(196, 148, 62, 0.1);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 32px rgba(42, 36, 32, 0.06);
}

/* ============ PROGRESS BAR ============ */

.progress-bar {
    background: var(--cream-dark);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
    transition: width 0.5s ease;
}

/* ============ BADGE ============ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.badge-gold {
    background: var(--gold-bg);
    color: var(--gold);
}

.badge-success {
    background: rgba(90, 139, 107, 0.1);
    color: var(--success);
}

/* ============ PAGE CONTAINERS ============ */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--warm-gray);
    font-size: 1rem;
}

/* ============ AUTH PAGE ============ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 60px rgba(42, 36, 32, 0.08);
}

.auth-card .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.auth-card .logo span { color: var(--gold); }

.auth-card .subtitle {
    text-align: center;
    color: var(--warm-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--warm-gray);
    font-size: 0.85rem;
}

.auth-divider a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.auth-divider a:hover {
    text-decoration: underline;
}

/* ============ DASHBOARD ============ */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
    border: 1px solid rgba(196, 148, 62, 0.1);
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--warm-gray);
    font-size: 0.85rem;
    font-weight: 500;
}

.modules-grid {
    display: grid;
    gap: 1.25rem;
}

.module-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    border: 1px solid rgba(196, 148, 62, 0.1);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(42, 36, 32, 0.08);
    border-color: var(--gold);
}

.module-letter {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 900;
    flex-shrink: 0;
}

.module-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.module-info p {
    color: var(--warm-gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

.module-progress {
    text-align: right;
    min-width: 80px;
}

.module-progress-text {
    font-size: 0.8rem;
    color: var(--warm-gray);
    margin-bottom: 0.5rem;
}

.module-check {
    color: var(--success);
    font-size: 1.2rem;
}

/* ============ LESSON PAGE ============ */

.lesson-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.lesson-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--warm-gray);
}

.lesson-breadcrumb a {
    color: var(--gold);
    text-decoration: none;
}

.lesson-breadcrumb a:hover { text-decoration: underline; }

.lesson-content {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid rgba(196, 148, 62, 0.1);
    margin-bottom: 2rem;
}

.lesson-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.lesson-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.lesson-content p {
    color: var(--charcoal);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.lesson-content ul, .lesson-content ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--charcoal);
}

.lesson-content li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

.lesson-content strong {
    color: var(--charcoal);
    font-weight: 700;
}

.lesson-content em {
    color: var(--gold);
    font-style: italic;
}

.lesson-content blockquote {
    border-left: 3px solid var(--gold);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: var(--gold-bg);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--warm-gray);
    font-size: 1.05rem;
}

.lesson-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.lesson-nav {
    display: flex;
    gap: 0.75rem;
}

/* ============ CHECKOUT PAGE ============ */

.checkout-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.checkout-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(42, 36, 32, 0.08);
    text-align: center;
}

.checkout-card .price {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--gold);
    margin: 1.5rem 0 0.5rem;
}

.checkout-card .price-note {
    color: var(--warm-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.checkout-features {
    text-align: left;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.checkout-features li {
    padding: 0.6rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--charcoal);
    font-size: 0.95rem;
}

.checkout-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

/* ============ SUCCESS PAGE ============ */

.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.success-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(42, 36, 32, 0.08);
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sage), var(--sage-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

/* ============ LOADING / EMPTY STATES ============ */

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--warm-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cream-dark);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--warm-gray);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .module-card {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }

    .module-progress {
        grid-column: 1 / -1;
        text-align: left;
    }

    .lesson-content {
        padding: 2rem 1.5rem;
    }

    .lesson-actions {
        flex-direction: column;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .app-nav {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .app-nav-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 1.8rem;
    }

    .lesson-content h2 {
        font-size: 1.5rem;
    }

    .checkout-card .price {
        font-size: 2.5rem;
    }
}

/* ============ HIDDEN ============ */

.hidden { display: none !important; }
