/* ========================================
   APP STYLES - Course Dashboard
   ======================================== */

#app-page {
    padding-top: 70px;
    min-height: 100vh;
    background: var(--gray-50);
}

/* ===== APP HEADER ===== */
.app-header {
    background: linear-gradient(135deg, var(--green-800), var(--green-900));
    color: white;
    padding: 40px 0;
}

.app-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.app-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.app-header p {
    color: var(--green-300);
    font-size: 0.95rem;
}

.app-header-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-ring {
    width: 70px;
    height: 70px;
    position: relative;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring .bg {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 6;
}

.progress-ring .fg {
    fill: none;
    stroke: var(--gold-400);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-400);
}

/* ===== APP BODY ===== */
.app-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    padding: 30px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ===== SIDEBAR ===== */
.app-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.sidebar-section {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.module-list {
    list-style: none;
    padding: 0;
}

.module-list li {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.module-list li:hover {
    background: var(--green-50);
}

.module-list li.active {
    background: var(--green-100);
    color: var(--green-800);
    font-weight: 600;
}

.module-list li.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.module-list li .lock-icon {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.module-list li .mod-icon {
    font-size: 1.1rem;
}

.module-list li .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.module-list li .status-dot.completed {
    background: var(--green-500);
}

.module-list li .status-dot.in-progress {
    background: var(--gold-500);
}

.module-list li .status-dot.pending {
    background: var(--gray-300);
}

/* ===== UPSELL BANNER ===== */
.upsell-banner {
    background: linear-gradient(135deg, var(--green-900), var(--green-800));
    color: white;
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
}

.upsell-banner h4 {
    color: var(--gold-400);
    margin-bottom: 10px;
    font-size: 1rem;
}

.upsell-banner p {
    font-size: 0.85rem;
    color: var(--green-300);
    margin-bottom: 15px;
    line-height: 1.5;
}

.upsell-banner .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ===== MAIN CONTENT AREA ===== */
.app-main {
    min-height: 500px;
}

.module-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.module-content-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.module-content-header .mod-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green-600);
    font-weight: 600;
    margin-bottom: 5px;
}

.module-content-header h2 {
    font-size: 1.8rem;
    color: var(--green-900);
}

.module-content-header .description {
    color: var(--gray-600);
    margin-top: 10px;
    line-height: 1.7;
}

.module-section {
    margin-bottom: 35px;
}

.module-section:last-child {
    margin-bottom: 0;
}

.module-section h3 {
    font-size: 1.2rem;
    color: var(--green-800);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-section p {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 12px;
}

.module-section ul, .module-section ol {
    padding-left: 20px;
    color: var(--gray-700);
    line-height: 1.8;
}

.module-section ul li, .module-section ol li {
    margin-bottom: 6px;
}

.module-section .highlight-box {
    background: var(--green-50);
    border-left: 4px solid var(--green-500);
    padding: 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
}

.module-section .highlight-box strong {
    color: var(--green-800);
}

/* ===== KEY TAKEAWAYS ===== */
.key-takeaways {
    background: var(--green-50);
    border-radius: var(--radius-md);
    padding: 25px;
    margin: 30px 0;
}

.key-takeaways h4 {
    color: var(--green-800);
    margin-bottom: 12px;
    font-size: 1rem;
}

.key-takeaways ul {
    list-style: none;
    padding: 0;
}

.key-takeaways ul li {
    padding: 6px 0;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.key-takeaways ul li::before {
    content: '🌱 ';
}

/* ===== LOCKED OVERLAY ===== */
.locked-overlay {
    position: relative;
}

.locked-overlay::before {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 2;
    opacity: 0.5;
}

.locked-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-lg);
    z-index: 1;
}

.locked-message {
    text-align: center;
    padding: 60px 20px;
}

.locked-message .lock-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.locked-message h3 {
    color: var(--green-800);
    margin-bottom: 10px;
}

.locked-message p {
    color: var(--gray-600);
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== FREE VS PRO BADGE ===== */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-free {
    background: var(--green-100);
    color: var(--green-700);
}

.badge-pro {
    background: var(--gold-400);
    color: var(--earth-800);
}

/* ===== TOOLS SECTION ===== */
.tools-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--green-50);
    border-radius: var(--radius-md);
}

.tools-section h3 {
    color: var(--green-800);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.tool-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--green-300);
}

.tool-card .tool-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.tool-card h4 {
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.tool-card p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ===== WELCOME SCREEN ===== */
.welcome-screen {
    text-align: center;
    padding: 60px 30px;
}

.welcome-screen .welcome-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.welcome-screen h2 {
    font-size: 2rem;
    color: var(--green-900);
    margin-bottom: 15px;
}

.welcome-screen p {
    color: var(--gray-600);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        max-height: none;
    }

    .module-content {
        padding: 25px;
    }

    .module-content-header h2 {
        font-size: 1.4rem;
    }
}

/* ===== CALCULATOR STYLES ===== */
.calculator {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 30px;
    margin: 20px 0;
}

.calculator h4 {
    color: var(--green-700);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.calc-field {
    margin-bottom: 15px;
}

.calc-field label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 6px;
    font-weight: 500;
}

.calc-field input,
.calc-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-main);
}

.calc-field input:focus,
.calc-field select:focus {
    outline: none;
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.calc-result {
    background: var(--green-50);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.calc-result .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-700);
}

.calc-result .label {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 4px;
}
