/* =============================================
   Dashboard & Member Area - Dark Luxury Premium
   Despertar Espiral - Member Area
   ============================================= */

/* Layout */
.app-body {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    font-family: var(--font-body);
    position: relative;
}

.app-body > .sidebar,
.app-body > .main-content {
    position: relative;
    z-index: 1;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 260px;
    background: #080808;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(201, 168, 76, 0.08);
}
.sidebar-header {
    padding: 28px 24px 22px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}
.sidebar-logo {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 1px;
}
.sidebar-logo span { color: rgba(255,255,255,0.7); font-weight: 400; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.50);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    border: 1px solid transparent;
}
.sidebar-link:hover {
    background: rgba(201, 168, 76, 0.06);
    color: rgba(255,255,255,0.85);
    border-color: rgba(201, 168, 76, 0.08);
}
.sidebar-link.active {
    background: rgba(201, 168, 76, 0.10);
    color: var(--gold);
    border-color: rgba(201, 168, 76, 0.15);
}
.sidebar-link svg { opacity: 0.5; flex-shrink: 0; }
.sidebar-link:hover svg { opacity: 0.8; }
.sidebar-link.active svg { opacity: 1; color: var(--gold); }

.sidebar-divider {
    height: 1px;
    background: rgba(201, 168, 76, 0.08);
    margin: 8px 16px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(201, 168, 76, 0.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
}
.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #0A0A0A;
    flex-shrink: 0;
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-anon { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-logout { color: rgba(255,255,255,0.30); }
.sidebar-logout:hover { color: var(--error); background: rgba(255, 69, 58, 0.08); border-color: rgba(255, 69, 58, 0.12); }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== TOPBAR ========== */
.topbar {
    display: flex;
    align-items: center;
    padding: 20px 40px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}
.topbar-toggle:hover { background: rgba(255,255,255,0.05); }
.topbar-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.3px;
}
.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-greeting { font-size: 13px; color: var(--text-muted); font-weight: 400; }

/* ========== MAIN INNER ========== */
.main-inner {
    padding: 32px 40px 60px;
    max-width: 1200px;
}

/* ========== DASHBOARD STATS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-gold);
}
.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -1px;
}
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========== PRODUCT CARDS ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), var(--shadow-gold);
}
.product-card-img {
    height: 180px;
    background: linear-gradient(135deg, #1A1A1A, #2A2A2A);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.product-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.product-card-body { padding: 22px; }
.product-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}
.product-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.product-card-footer { display: flex; justify-content: space-between; align-items: center; }

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -1px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(201, 168, 76, 0.5);
}
.progress-text { font-size: 12px; color: var(--text-secondary); }

/* ========== VIDEO PLAYER ========== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-subtle);
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ========== LESSON LIST ========== */
.lesson-list { list-style: none; padding: 0; }
.lesson-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    transition: background-color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid transparent;
}
.lesson-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}
.lesson-item.active {
    background: rgba(201, 168, 76, 0.08);
    border-color: rgba(201, 168, 76, 0.20);
    border-left: 3px solid var(--gold);
}
.lesson-item.completed .lesson-check { color: var(--success); }
.lesson-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.lesson-info { flex: 1; min-width: 0; }
.lesson-title { font-size: 14px; font-weight: 600; color: #fff; }
.lesson-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.lesson-check { flex-shrink: 0; color: rgba(255,255,255,0.30); }

/* ========== MODULE SECTION ========== */
.module-section {
    margin-bottom: 28px;
}
.module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.module-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}
.empty-icon { font-size: 56px; margin-bottom: 20px; opacity: 0.2; }
.empty-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.empty-text { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .topbar-toggle {
        display: block;
    }
    .topbar {
        padding: 16px 20px;
    }
    .main-inner {
        padding: 24px 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.show { display: block; }

/* ========== SECTION HEADERS ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.section-header h2 {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ========== QUICK LINKS ========== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}

/* ========== DASHBOARD NEXT STEP ========== */
.dashboard-next-step {
    margin-bottom: 28px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(201, 168, 76, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
}

.dashboard-next-step-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}

.dashboard-next-step h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

.dashboard-next-step p {
    max-width: 760px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.dashboard-next-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-next-step-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-next-step-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.quick-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #fff;
    border: 1px solid var(--border-subtle);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.quick-link:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-gold);
    color: #fff;
}
.quick-link-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.quick-link-icon.purple { background: rgba(201, 168, 76, 0.10); }
.quick-link-icon.gold { background: rgba(201, 168, 76, 0.15); }
.quick-link-icon.green { background: rgba(52, 199, 89, 0.10); }
.quick-link-text { font-size: 14px; font-weight: 600; }

/* ========== COMMUNITY HERO ========== */
.community-hero {
    margin-bottom: 24px;
    padding: 28px 32px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse at 10% 50%, rgba(201, 168, 76, 0.10), transparent 50%),
        radial-gradient(ellipse at 90% 20%, rgba(201, 168, 76, 0.06), transparent 50%),
        var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}
.community-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.community-hero-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
}
.community-hero-title {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.community-hero-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.community-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
}
.community-filter-chip:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.community-filter-chip.active {
    color: #0A0A0A;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-color: transparent;
    font-weight: 600;
}

.community-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.10);
    border: 1px solid rgba(201, 168, 76, 0.15);
    letter-spacing: 0.3px;
}
.community-tag-pinned {
    color: var(--gold-light);
    background: rgba(201, 168, 76, 0.15);
}

.community-action-btn-sm {
    font-size: 12px;
}

/* ========== COMMUNITY ========== */
.community-post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.community-post-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.community-post-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.community-post-content {
    flex: 1;
    min-width: 0;
}
.community-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0A0A0A;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.community-avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 13px;
}
.community-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 20px;
}
.community-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.community-post-meta .author {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}
.community-post-meta .time {
    font-size: 12px;
    color: var(--text-muted);
}

.product-card-link,
.community-link-reset {
    text-decoration: none;
}

.dashboard-community-list {
    gap: 10px;
}

.dashboard-category-badge {
    font-size: 10px;
}
.community-post-title {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
    text-decoration: none;
    display: block;
}
.community-post-title:hover {
    color: var(--gold-light);
}
.community-post-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.community-post-body-full {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}
.community-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}
.community-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    font-weight: 500;
    transition: color 0.2s;
}
.community-action-btn:hover {
    color: var(--gold);
}
.community-action-btn.liked {
    color: var(--gold);
}
.community-action-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.community-post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.community-back-link {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.community-back-link:hover {
    color: var(--gold);
}
.community-category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.community-category-filter .badge {
    text-decoration: none;
    padding: 8px 16px;
    font-size: 13px;
}

/* Topic Detail */
.topic-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.topic-author-info { display: flex; flex-direction: column; gap: 2px; }
.topic-author-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.topic-like-form { display: inline; }
.topic-no-comments {
    font-size: 14px;
    color: var(--text-muted);
    padding: 24px 0;
}
.topic-comments-section {
    margin-bottom: 24px;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comment-header-info { display: flex; flex-direction: column; }
.topic-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 36px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}
.topic-title {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.3;
}
.topic-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Comments */
.comments-section-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}
.comment-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.2s;
}
.comment-card:hover {
    border-color: var(--border-medium);
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}
.comment-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}
.comment-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 44px;
    white-space: pre-wrap;
}
.comment-actions {
    padding-left: 44px;
    margin-top: 8px;
}
.comment-form-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    border: 1px solid var(--border-subtle);
}
.comment-form-title {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}
.comment-form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.comment-form-hint strong {
    color: var(--gold);
}

/* Create Topic */
.create-topic-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 36px;
    border: 1px solid var(--border-subtle);
    max-width: 700px;
}
.create-topic-title {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
}
.create-topic-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}
.create-topic-hint strong {
    color: var(--gold);
}

/* ========== AUTH PAGES ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 500px 400px at 30% 20%, rgba(201, 168, 76, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 70% 80%, rgba(201, 168, 76, 0.03) 0%, transparent 70%);
    pointer-events: none;
}
.auth-page-login {
    padding: 32px;
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(300px, 420px);
    gap: 22px;
    align-items: stretch;
}
.auth-visual {
    position: relative;
    padding: 34px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(201, 168, 76, 0.12), transparent 30%),
        linear-gradient(180deg, var(--glass-bg-strong), var(--glass-bg));
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.auth-visual::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, rgba(10,10,10,0.35));
    pointer-events: none;
}
.auth-visual-copy,
.auth-visual-list,
.auth-visual-media {
    position: relative;
    z-index: 1;
}
.auth-visual-copy {
    margin-bottom: 24px;
}
.auth-visual-copy h2 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 34px;
    line-height: 1.08;
    margin-bottom: 12px;
}
.auth-visual-copy p {
    color: var(--text-secondary);
    line-height: 1.75;
}
.auth-visual-list {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}
.auth-visual-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}
.auth-visual-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 6px rgba(201,168,76,0.12);
}
.auth-visual-media img {
    width: 100%;
    display: block;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    background: var(--glass-bg);
}

html[data-theme='light'] .auth-visual::after {
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.75));
}
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 44px;
    max-width: 440px;
    width: 100%;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    position: relative;
}
.auth-card-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}
.auth-card-wide {
    max-width: 500px;
}
.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}
.auth-logo h1 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 26px;
    margin: 0;
    letter-spacing: 1px;
}
.auth-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
    letter-spacing: 0.5px;
    line-height: 1.7;
}
.auth-logo .gold-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 14px auto 0;
}
.auth-benefits {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: -10px 0 24px;
    color: var(--text-secondary);
    font-size: 12px;
}
.auth-action-note {
    margin-top: 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}
.auth-links {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
}
.auth-links a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.auth-links a:hover {
    color: var(--gold-light);
}
.auth-links p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.auth-links .back-link {
    color: var(--text-faint);
    font-size: 12px;
}
.auth-links .back-link:hover {
    color: var(--text-muted);
}
.auth-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0A0A0A;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
    letter-spacing: 0.3px;
}
.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.25);
}
.auth-card .form-group label {
    color: var(--text-primary);
    font-weight: 600;
}
.auth-card .form-control {
    background: rgba(255,255,255,0.05);
    border-color: rgba(201,168,76,0.16);
    color: var(--text-primary);
}
.auth-card .form-control::placeholder {
    color: var(--text-muted);
}
.auth-card .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201,168,76,0.12);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-page-login {
        padding: 20px;
    }
}

/* ========== CHECKOUT PAGE ========== */
.checkout-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
}
.checkout-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(201, 168, 76, 0.05) 0%, transparent 70%);
    pointer-events: none;
}
.checkout-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 44px;
    max-width: 480px;
    width: 100%;
    border: 1px solid rgba(201, 168, 76, 0.15);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
}
.checkout-card-toolbar,
.result-card-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}
.checkout-product {
    margin-bottom: 28px;
}
.checkout-product h2 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 24px;
}
.checkout-price {
    font-size: 38px;
    color: var(--gold);
    font-weight: 700;
    font-family: var(--font-display);
    margin: 12px 0;
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}
.checkout-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0A0A0A;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}
.checkout-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.25);
}
.checkout-secure {
    color: var(--text-faint);
    font-size: 12px;
    margin-top: 18px;
}
.checkout-helper {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}
.checkout-trust {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* Payment method tabs */
.pay-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-medium);
}
.pay-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--font-body);
}
.pay-tab.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0A0A0A;
}
.pay-tab:not(.active):hover {
    background: var(--glass-bg-strong);
}
.form-row {
    display: flex;
    gap: 12px;
}

/* PIX QR code display */
.pix-qr {
    display: flex;
    justify-content: center;
}
.pix-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto;
    animation: pix-spin 0.8s linear infinite;
}
@keyframes pix-spin {
    to { transform: rotate(360deg); }
}

/* ========== PRODUCT VIEW ========== */
.product-view {}
.lesson-content-area {
    margin-bottom: 16px;
}
.text-content-area {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-subtle);
}
.pdf-content-area {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-subtle);
}
.pdf-content-area p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}
.lesson-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.lesson-current-title {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}
.course-content-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

/* ========== SUCCESS / CANCEL PAGES ========== */
.result-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
}
.result-page::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.result-page-success::before {
    background: radial-gradient(ellipse at 50% 30%, rgba(52, 199, 89, 0.04) 0%, transparent 70%);
}
.result-page-cancel::before {
    background: radial-gradient(ellipse at 50% 30%, rgba(201, 168, 76, 0.03) 0%, transparent 70%);
}
.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 50px 44px;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
}
.result-card-success {
    border: 1px solid rgba(52, 199, 89, 0.15);
}
.result-card-cancel {
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.result-icon-cancel {
    font-size: 56px;
    opacity: 0.6;
}
.result-card h1 {
    font-family: var(--font-display);
    font-size: 26px;
    margin-bottom: 16px;
}
.result-card-success h1 {
    color: #5CD67B;
}
.result-card-cancel h1 {
    color: #fff;
    font-size: 22px;
}
.result-card p {
    color: rgba(255, 255, 255, 0.60);
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 15px;
}
.result-card-cancel p {
    color: rgba(255, 255, 255, 0.50);
    margin-bottom: 16px;
}
.result-product {
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.20);
    border-radius: 14px;
    padding: 20px;
    margin: 24px 0;
}
.result-product strong {
    color: #5CD67B;
    font-size: 18px;
}
.result-product p {
    margin: 5px 0 0;
    color: #5CD67B;
}
.result-actions {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.result-helper {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ========== WELCOME BANNER ========== */
.welcome-banner {
    margin-bottom: 28px;
    padding: 32px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse at 10% 50%, rgba(201, 168, 76, 0.10), transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(201, 168, 76, 0.06), transparent 50%),
        var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.welcome-greeting {
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.welcome-name {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text-primary);
    margin: 4px 0 8px;
    line-height: 1.2;
}

.welcome-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.welcome-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.welcome-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.welcome-stat-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(
        var(--gold) var(--progress, 0%),
        rgba(255, 255, 255, 0.06) var(--progress, 0%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.welcome-stat-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--bg-card);
}

.welcome-stat-value {
    position: relative;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    z-index: 1;
}

.welcome-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-stat-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.welcome-stat-icon {
    color: var(--gold);
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* ========== PRODUCTS SUMMARY ========== */
.products-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 28px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}
.products-summary-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.products-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
}
.products-summary-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.products-summary-divider {
    width: 1px;
    height: 36px;
    background: var(--border-subtle);
}
.product-card-placeholder {
    font-size: 48px;
    opacity: 0.3;
}
.product-card-cta {
    margin-top: 12px;
}

/* ========== COURSE PROGRESS SECTION ========== */
.course-progress-section {
    margin-bottom: 24px;
}
.course-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.course-progress-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.course-progress-bar {
    height: 6px;
    border-radius: 3px;
}
.course-modules {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.module-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* Lesson module label & duration */
.lesson-module-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lesson-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.lesson-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.btn-completed {
    color: var(--success);
    border-color: rgba(52, 199, 89, 0.25);
}

/* PDF content area icon */
.pdf-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}
.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: all 0.2s ease;
}
.pagination-link:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.pagination-link.active {
    color: #0A0A0A;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-color: transparent;
    font-weight: 700;
}

/* ========== ENHANCED ANIMATIONS ========== */
.product-card,
.quick-link,
.stat-card,
.community-post-card,
.community-hero,
.welcome-banner,
.dashboard-next-step,
.products-summary,
.topic-card,
.comment-form-card {
    animation: fadeSlideUp 0.4s ease-out both;
}

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

.products-grid > :nth-child(1) { animation-delay: 0.05s; }
.products-grid > :nth-child(2) { animation-delay: 0.10s; }
.products-grid > :nth-child(3) { animation-delay: 0.15s; }
.quick-links > :nth-child(1) { animation-delay: 0.08s; }
.quick-links > :nth-child(2) { animation-delay: 0.13s; }
.quick-links > :nth-child(3) { animation-delay: 0.18s; }

@media (max-width: 640px) {
    .dashboard-next-step {
        padding: 22px;
    }

    .dashboard-next-step h2 {
        font-size: 24px;
    }

    .dashboard-next-step-actions {
        flex-direction: column;
    }

    .topbar-right {
        gap: 8px;
    }

    .theme-toggle-topbar .theme-toggle-text {
        display: none;
    }

    .welcome-content {
        flex-direction: column;
        text-align: center;
    }

    .welcome-stats {
        justify-content: center;
    }

    .welcome-name {
        font-size: 24px;
    }

    .community-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .community-hero-title {
        font-size: 20px;
    }

    .products-summary {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        text-align: center;
    }

    .products-summary-divider {
        display: none;
    }
}
