/* ============================================
   V2 LAYOUT — Left Sidebar + Right Content
   ============================================ */

/* ---------- Core Layout ---------- */
.v2-wrapper {
    display: flex;
    min-height: 100vh;
}

.v2-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    scrollbar-width: thin;
}

.v2-sidebar::-webkit-scrollbar {
    width: 5px;
}
.v2-sidebar::-webkit-scrollbar-thumb {
    background: #c5cae9;
    border-radius: 4px;
}

.v2-main {
    flex: 1;
    min-width: 0;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    margin-left: 280px;
}

/* ---------- Sidebar: College Branding ---------- */
.sidebar-brand {
    background: var(--header-gradient);
    color: #fff;
    padding: 22px 18px 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-brand .brand-logo {
    width: 70px;
    height: 70px;
    background: #fff;
    border: 3px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    overflow: hidden;
    padding: 4px;
}

.sidebar-brand .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.sidebar-brand h2 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.3;
}

.sidebar-brand .brand-tagline {
    font-size: 11px;
    opacity: 0.85;
    margin: 0;
}

/* ---------- Sidebar: Student Profile ---------- */
.v2-sidebar .v2-profile {
    padding: 18px 16px;
    text-align: center;
    border-bottom: 1px solid #e8eaf6;
    flex-shrink: 0;
}

.v2-profile .profile-avatar {
    width: 64px;
    height: 64px;
    background: var(--header-gradient);
    border: 3px solid #c5cae9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #fff;
    font-size: 24px;
}

.v2-profile .profile-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 2px;
}

.v2-profile .profile-id {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

.v2-profile .profile-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    background: #fff3e0;
    color: #e65100;
    font-weight: 600;
}

/* ---------- Sidebar: Vertical Step Navigator ---------- */
.v2-step-nav {
    padding: 14px 12px;
    border-bottom: 1px solid #e8eaf6;
    flex-shrink: 0;
}

.v2-step-nav .step-nav-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9e9e9e;
    padding: 0 8px 8px;
    margin: 0;
}

.v2-step-nav .step-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    text-decoration: none;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    margin-bottom: 2px;
}

.v2-step-nav .step-nav-item:hover {
    background: #f5f5f5;
    color: #555;
}

.v2-step-nav .step-nav-item .step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.v2-step-nav .step-nav-item.active {
    background: #e8eaf6;
    color: var(--primary);
    font-weight: 600;
}

.v2-step-nav .step-nav-item.active .step-num {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(26,35,126,0.3);
}

.v2-step-nav .step-nav-item.completed {
    color: #2e7d32;
}

.v2-step-nav .step-nav-item.completed .step-num {
    background: #2e7d32;
    color: #fff;
}

.v2-step-nav .step-nav-item.completed .step-num::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
}

.v2-step-nav .step-nav-item.completed .step-num span {
    display: none;
}

/* Vertical connector line */
.v2-step-nav .step-nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 24px;
    top: 40px;
    width: 2px;
    height: 10px;
    background: #e0e0e0;
    border-radius: 1px;
}

.v2-step-nav .step-nav-item.completed:not(:last-child)::after {
    background: #2e7d32;
}

/* ---------- Sidebar: Navigation ---------- */
.v2-sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.v2-sidebar .sidebar-nav .nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9e9e9e;
    padding: 12px 20px 6px;
    margin: 0;
}

.v2-sidebar .sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-sidebar .sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.v2-sidebar .sidebar-nav ul li a:hover {
    background: #f5f5f5;
    color: var(--primary);
}

.v2-sidebar .sidebar-nav ul li a.active {
    background: #e8eaf6;
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.v2-sidebar .sidebar-nav ul li a i {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* ---------- Sidebar: Footer ---------- */
.v2-sidebar .sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid #e8eaf6;
    flex-shrink: 0;
}

.v2-sidebar .sidebar-footer .btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.v2-sidebar .sidebar-footer .btn-logout:hover {
    background: #c62828;
    color: #fff;
}

/* ---------- Main: Top Header Bar ---------- */
.v2-main-header {
    background: var(--header-gradient);
    color: #fff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.v2-main-header .page-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-main-header .header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    opacity: 0.9;
}

.v2-main-header .header-meta .badge {
    font-size: 11px;
}

/* Hamburger toggle — hidden on desktop */
.v2-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ---------- Main: Content Area ---------- */
.v2-main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Constrain form width for readability */
.v2-main-content .v2-form-area {
    max-width: 920px;
}

/* ---------- Main: Footer inside content ---------- */
.v2-main-footer {
    padding: 12px 24px;
    text-align: center;
    font-size: 11px;
    color: #999;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.v2-main-footer a {
    color: #666;
    text-decoration: none;
}
.v2-main-footer a:hover {
    color: var(--primary);
}

/* ---------- Mobile Overlay ---------- */
.v2-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 49;
}
.v2-sidebar-overlay.show {
    display: block;
}

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

@media (max-width: 991.98px) {
    .v2-sidebar {
        position: fixed;
        left: -290px;
        top: 0;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1050;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

    .v2-sidebar.show {
        left: 0;
    }

    .v2-sidebar-toggle {
        display: inline-block;
    }

    .v2-main {
        width: 100%;
        margin-left: 0;
    }

    .v2-main-content {
        padding: 16px;
    }
}

@media (max-width: 576px) {
    .v2-sidebar {
        width: 260px;
        left: -270px;
    }

    .v2-main-header {
        padding: 10px 14px;
    }

    .v2-main-header .page-title {
        font-size: 14px;
    }

    .v2-main-header .header-meta {
        font-size: 10px;
        gap: 8px;
    }

    .v2-main-content {
        padding: 12px;
    }

    .sidebar-brand {
        padding: 16px 14px 14px;
    }

    .sidebar-brand .brand-logo {
        width: 44px;
        height: 44px;
        font-size: 9px;
    }

    .sidebar-brand h2 {
        font-size: 13px;
    }

    .v2-profile .profile-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .v2-step-nav .step-nav-item {
        padding: 7px 8px;
        font-size: 12px;
    }

    .v2-step-nav .step-nav-item .step-num {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* ---------- Print ---------- */
@media print {
    .v2-sidebar { display: none !important; }
    .v2-sidebar-overlay { display: none !important; }
    .v2-sidebar-toggle { display: none !important; }
    .v2-main { width: 100% !important; }
    .v2-main-header { display: none !important; }
    .v2-main-content { padding: 0 !important; }
}
