/* --- GLOBAL RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- 1. DEFAULT BODY (For Home Page) --- */
body {
    background-color: #f4f4f4;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column; 
}

/* --- 2. LOGIN PAGE OVERRIDES (For Index & Password Pages) --- */
.login-body {
    min-height: 100vh;
    min-height: 100svh;
    overflow: auto;

    /* Background Image Settings */
    background-image: url('images/OldMain_v1.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    isolation: isolate;
}

/* Dark Overlay for Login Background */
.login-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
    pointer-events: none;
}

/* --- NEW: LOGIN WRAPPER TO HOLD THE TWO BOXES --- */
.login-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Creates the gap between the main card and the sign-in options */
    position: absolute;
    /* OldMain_v1 contains a reference card at this point in the image. Keeping
       the live card on the same focal point completely covers that card. */
    top: 23.6vh;
    top: 23.6svh;
    left: calc(50% - 0.82vh);
    left: calc(50% - 0.82svh);
    /* The reference panel is 441px wide in an 852px-high source image. */
    width: min(calc(52svh + 4px), calc(100vw - 32px));
    transform: translateX(-50%);
    z-index: 1;
}

/* --- LOGIN CARD STYLES --- */
.login-container {
    width: 100%;        
    height: 550px;       
    min-height: 475px;   
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Slightly stronger shadow to match UI */
    display: flex;
    flex-direction: column;
}

.login-card {
    padding: 44px;
    flex: 1;             
    display: flex;
    flex-direction: column;
}

.logo-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.logo-text {
    font-weight: bold;
    font-size: 1.2rem;
    color: #1e407c;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1b1b1b;
}

.input-group { margin-bottom: 16px; }

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid #666;
    font-size: 1rem;
    outline: none;
}

input:focus { border-bottom: 1px solid #0067b8; }
input::placeholder { color: #666; }

.forgot-link {
    display: block;
    color: #0067b8;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.next-btn {
    background-color: #0067b8;
    color: white;
    border: none;
    padding: 8px 36px;
    font-size: 1rem;
    cursor: pointer;
    min-width: 108px;
}

.next-btn:hover { background-color: #005da6; }

/* --- NEW: SIGN-IN OPTIONS SECOND BOX --- */
.signin-options-block {
    width: 100%;
    background-color: #fff;
    padding: 15px 44px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.signin-options-content {
    display: flex;
    align-items: center;
}

.signin-options-link {
    color: #1b1b1b;
    text-decoration: none;
    font-size: 1rem;
}

.signin-options-link:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .login-wrapper {
        left: 50%;
    }

    .login-card {
        padding-right: 32px;
        padding-left: 32px;
    }

    .signin-options-block,
    .footer-bar {
        padding-right: 32px;
        padding-left: 32px;
    }
}

/* Password Page Specifics */
.user-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #1b1b1b;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 10px;
    padding: 0;
}

.password-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.submit-section {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

.footer-bar {
    background-color: #f2f2f2;
    padding: 20px 44px;
    font-size: 0.9rem;
    color: #333;
    width: 100%;
}

/* --- HOME PAGE HEADER STYLES --- */
.psu-header {
    background-color: #001E44;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #1E407C;
    flex-shrink: 0; 
}

.header-left { display: flex; align-items: center; }

.shield-logo {
    margin-right: 15px;
    filter: brightness(0) invert(1);
}

.titles-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.sub-title {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
}

.my-text {
    font-family: 'Georgia', serif;
    font-weight: bold;
    color: white;
}

.psu-text {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    color: #3ea3dc;
}

/* --- HOME PAGE MAIN LAYOUT --- */
.main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden; 
}

.sidebar {
    width: 260px;
    background-color: #fff;
    border-right: 1px solid #ddd;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-menu { list-style: none; }

.sidebar-menu li {
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.sidebar-menu li:hover {
    background-color: #f0f8ff;
    color: #001E44;
    border-left: 4px solid #001E44;
    padding-left: 21px;
}

.sidebar-menu li.active {
    background-color: #e6f3ff;
    color: #001E44;
    border-left: 4px solid #001E44;
    padding-left: 21px;
}

.content-area {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.welcome-banner {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 5px solid #001E44;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.placeholder-card {
    background-color: #fff;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-weight: 600;
}

/* --- THESIS SUBMISSION LAYOUT --- */
.etd-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 30px;
    background-color: #f9f9fb;
}

.form-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.file-drop-zone {
    border: 2px dashed #0067b8;
    background-color: #f0f8ff;
    padding: 30px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.file-drop-zone:hover {
    background-color: #e1f0ff;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.browse-btn {
    margin-top: 10px;
    background: none;
    border: 1px solid #0067b8;
    color: #0067b8;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.submit-thesis-btn {
    background-color: #0067b8; 
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}

.submit-thesis-btn:hover {
    background-color: #004b87;
}

/* --- COMMITTEE PANEL STYLES --- */
.committee-section {
    background: white;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    height: 100%; 
    box-shadow: -2px 0 10px rgba(0,0,0,0.02);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.panel-header h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #1e407c;
}

.badge-status {
    background-color: #ffc107; 
    color: #333;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.professors-list {
    padding: 15px;
    overflow-y: auto;
}

.prof-card {
    border: 1px solid #eef0f2;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #fafbfc;
}

.prof-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.prof-avatar {
    width: 32px;
    height: 32px;
    background-color: #1e407c;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 10px;
}

.prof-info {
    display: flex;
    flex-direction: column;
}

.prof-info strong {
    font-size: 0.9rem;
    color: #333;
}

.prof-role {
    font-size: 0.75rem;
    color: #777;
}

.comment-box {
    background-color: #fff;
    border: 1px dashed #ccc;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    justify-content: center;
}

.logout-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #e6f3ff;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px; 
    transition: all 0.2s;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}




/* --- LOADING SPINNER STYLES --- */

/* 1. The Overlay: Darkens the screen and centers the spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dim the background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it stays above all other elements */
}

/* 2. The Spinner: The actual rotating circle */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3); /* Light outer ring */
    border-top: 5px solid #0067b8; /* Penn State Blue top ring */
    border-radius: 50%;
    animation: spin 1s linear infinite; /* References the 'spin' animation below */
}

/* 3. The Animation: Defines the rotation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
