/* V2 Core Layout and Shell Styles */
/* These styles override/extend main.css to create the full-screen dashboard app experience */

body {
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden; /* App feels like a native app, no full-page scrolling */
    background-color: var(--bg-page);
}

/* -----------------------------------------
   LEFT SIDEBAR (THE HUB NAV)
   ----------------------------------------- */
.sidebar {
    width: 280px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.brand-logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 40px;
    mix-blend-mode: multiply; /* Removes the white background by blending it with the sidebar */
}

.sidebar-nav-label {
    font-family: var(--font-heading); /* Switch to Poppins for clear distinction */
    font-size: 11px;
    font-weight: 800; /* Extra bold */
    color: #64748B;
    text-transform: uppercase;
    margin-bottom: 12px;
    margin-top: 24px; /* Add breathing room above categories */
    padding-left: 15px;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

#sidebar-nav-container {
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item:hover {
    background-color: #F8FAFC;
    color: var(--primary-navy);
}

.nav-item.active {
    background-color: var(--primary-navy);
    color: white !important;
}
.nav-item.active span {
    color: white !important;
}

.nav-item.completed {
    color: var(--success-green);
}

.progress-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    flex-shrink: 0;
}

.nav-item.active .progress-circle {
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-item.completed .progress-circle {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 15px 15px;
}

.milestone-item {
    background: linear-gradient(135deg, rgba(108, 207, 129, 0.1) 0%, rgba(108, 207, 129, 0.05) 100%);
    border: 1px solid rgba(108, 207, 129, 0.3);
    color: var(--primary-navy);
    font-weight: 700;
}

.milestone-item.completed {
    background: transparent;
    border-color: transparent;
}

.milestone-item:hover {
    background: linear-gradient(135deg, rgba(108, 207, 129, 0.2) 0%, rgba(108, 207, 129, 0.1) 100%);
    border-color: var(--accent-green);
}

/* -----------------------------------------
   MAIN CONTENT AREA
   ----------------------------------------- */
.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.app-container {
    max-width: 800px;
    width: 100%;
}

/* -----------------------------------------
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ----------------------------------------- */

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary-navy);
    cursor: pointer;
    padding: 10px; /* 44px touch target */
    margin-left: -10px;
}

.mobile-brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-navy);
    letter-spacing: -0.5px;
}

.mobile-progress-circle {
    border-color: var(--accent-green);
    background-color: var(--accent-green);
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .app-main {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .product-card, .wizard-step-container {
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .workflow-nav {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
    }
    
    .nav-step {
        flex: 0 0 auto;
    }

    .module-title {
        font-size: 24px;
        word-wrap: break-word;
    }

    .mobile-header {
        display: flex;
        z-index: 990; /* Below drawer/backdrop */
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        width: 280px;
        z-index: 1000; /* Highest */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background: #ffffff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.6);
        z-index: 995; /* Below drawer, above content */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-backdrop.open {
        display: block;
        opacity: 1;
    }

    body.drawer-open {
        overflow: hidden;
    }

    /* Hide large branding in sidebar on mobile since it's in the header */
    .brand-logo-container {
        display: none;
    }

    /* Make touch targets larger on mobile */
    .nav-item {
        padding: 16px 20px;
        font-size: 16px;
        margin-bottom: 12px;
    }

    .main-content {
        padding: 20px 15px; /* Less padding on small screens */
    }
}

/* Workflow Navigator */
.workflow-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px;
    margin-bottom: 20px;
}

.nav-step {
    padding: 16px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.nav-step.completed {
    color: var(--accent-green);
}

.nav-step.active {
    color: var(--primary-navy);
    border-bottom-color: var(--primary-navy);
}

.nav-step.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Wizard Interface */
.wizard-step-container {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 15px;
}

.wizard-title {
    font-size: 20px;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.wizard-instructions {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 20px;
}

.wizard-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.wizard-input, .wizard-textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    background-color: #FFF;
    color: var(--text-main);
    transition: border-color 0.2s;
}

.wizard-input:focus, .wizard-textarea:focus {
    outline: none;
    border-color: var(--primary-navy);
}

.wizard-textarea {
    min-height: 120px;
    resize: vertical;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

