/* --- 1. VARIABLES & THEMING --- */
:root {
    --brand-green: #14442A;   
    --brand-blue: #24376C;    
    --brand-blue-hover: #1A2B4B;
    --text-dark: #0f172a;
    --text-grey: #64748b;
    --bg-page: #3b4a82;       
    --input-bg: #F8FAFC;
    --input-border: #E2E8F0;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', system-ui, -apple-system, sans-serif; }
h1, h2, h3, .btn-login, .portal-badge { font-family: 'Poppins', sans-serif; }

body { 
    min-height: 100vh; 
    background-color: var(--bg-page); 
    background-image: radial-gradient(circle at 50% 0%, #ffffff 0%, var(--bg-page) 100%);
    color: var(--text-dark);
}

/* --- 2. ADVANCED ANIMATIONS --- */
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* --- 3. FLOATING CARD --- */
.page-bg { min-height: 100vh; width: 100%; display: flex; justify-content: center; align-items: center; padding: 20px; }

.split-card { 
    display: flex; 
    width: 100%; 
    max-width: 850px;    /* Down from 900px/1050px */
    min-height: 500px;
    background: #FFFFFF; 
    border-radius: 20px;
    
    /* 🟢 THE FIX: This ensures the green background image 
       on the right is clipped by the rounded corners perfectly. */
    overflow: hidden; 
    
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 20px 40px -10px rgba(0, 0, 0, 0.08); 
    animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.left-panel { flex: 0 0 55%; display: flex; justify-content: center; align-items: center; padding: 40px 30px; /* Down from 60px 40px */}

/* --- 3. RIGHT PANEL CONTAINER --- */
.right-panel {
    flex: 0 0 45%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: relative;
    
    /* 🟢 THE FIX: Use 'background-size: cover' and 'background-position: center' 
       to make sure the image fills the space without gaps. */
background-image: 
    linear-gradient(
        135deg, 
        rgba(10, 36, 22, 0.50) 0%, 
        rgba(20, 68, 42, 0.38) 100%
    ),
    url('../images/pu_background.jpg');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;

    /* Removed height: 100% to prevent the design from breaking */
}
/* --- 4. RIGHT PANEL BRANDING (The Minimalism Polish) --- */
.hero-text { 
    text-align: center; 
    color: white; 
    padding: 0 40px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    z-index: 2; 
    
}

.hero-brand { 
    font-size: 3.5rem;
    font-weight: 900; 
    letter-spacing: 6px;
    margin-bottom: 0px; 
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-type { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: rgba(255, 255, 255, 0.7); 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    padding-top: 15px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* --- 5. LEFT PANEL: CASCADING ENTRANCE --- */
.login-wrapper { width: 100%; max-width: 360px; display: flex; flex-direction: column; background: transparent; box-shadow: none; border: none; padding: 0; }

.brand-header { animation: fadeUp 0.6s ease forwards 0.2s; opacity: 0; text-align: center; margin-bottom: 24px; }
form { animation: fadeUp 0.6s ease forwards 0.3s; opacity: 0; }
.divider { animation: fadeUp 0.6s ease forwards 0.4s; opacity: 0; margin: 24px 0; position: relative; text-align: center; display: flex; align-items: center; }
.btn-google { animation: fadeUp 0.6s ease forwards 0.5s; opacity: 0; }
.page-footer { animation: fadeUp 0.6s ease forwards 0.6s; opacity: 0; margin-top: 32px; color: #94a3b8; font-size: 12.5px; text-align: center; font-weight: 500; }

.logo { height: 65px; width: auto; margin: 0 auto 16px auto; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.03)); }
.portal-badge { font-size: 13px; font-weight: 700; color: var(--brand-blue); margin-bottom: 4px; letter-spacing: 0.5px; }
.subtitle { color: var(--text-grey); font-size: 13px; font-weight: 500; }

/* --- 6. INPUT FIELDS --- */
.input-group { margin-bottom: 16px; } /* Down from 18px */
.input-group label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-dark); }
.input-wrapper { position: relative; }

.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); }

.toggle-password { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #94a3b8; font-size: 15px; transition: color 0.2s ease; z-index: 10; }
.toggle-password:hover { color: var(--brand-blue); }

input { 
    width: 100%; 
    padding: 11px 40px; /* Down from 13px 44px */
    border: 1.5px solid var(--input-border); 
    border-radius: 10px; /* Tighter corners */
    font-size: 13.5px; /* Perfect readability scale */
    color: var(--text-dark); 
    background: var(--input-bg); 
    transition: all 0.25s ease; 
}
input::placeholder { color: #94a3b8; font-weight: 400; }
input:hover { border-color: #cbd5e1; background: #ffffff; }
input:focus { border-color: var(--brand-blue); background: #ffffff; outline: none; box-shadow: 0 0 0 4px rgba(36, 55, 108, 0.12); }
input:focus + .input-icon, .input-wrapper:focus-within .input-icon { color: var(--brand-blue); transform: translateY(-50%) scale(1.15); }

/* Hide native browser password reveal */
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none; }
input[type="password"]::-webkit-contacts-auto-fill-button, input[type="password"]::-webkit-credentials-auto-fill-button { visibility: hidden; display: none !important; pointer-events: none; }

/* --- 7. BUTTONS & SHIMMER FX --- */
.form-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }

.remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-me span { font-size: 13px; font-weight: 500; color: var(--text-grey); user-select: none; }
.remember-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand-blue); border-radius: 4px; }

.forgot-link { font-size: 13px; color: var(--brand-blue); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.forgot-link:hover { color: var(--brand-blue-hover); text-decoration: underline; }

/* --- 7. BUTTONS --- */
.btn-login { 
    width: 100%; 
    padding: 12px; /* Down from 14px */
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-hover) 100%); 
    color: white; 
    border: none; 
    border-radius: 10px; 
    font-size: 14px; 
    font-weight: 700; 
    letter-spacing: 0.5px;
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 12px rgba(36, 55, 108, 0.2); 
    position: relative; 
    overflow: hidden; 
}
.btn-login::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%); transform: skewX(-25deg); transition: all 0.6s ease; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(36, 55, 108, 0.35); }
.btn-login:hover::after { left: 150%; transition: all 0.6s ease; }
.btn-login:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(36, 55, 108, 0.2); }

/* --- 8. GOOGLE BUTTON --- */
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--input-border); }
.divider span { padding: 0 16px; color: #94a3b8; font-size: 12.5px; font-weight: 600; letter-spacing: 0.5px; }

.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 13px; background: #ffffff; border: 1.5px solid var(--input-border); border-radius: 12px; color: var(--text-dark); text-decoration: none; font-weight: 600; font-size: 14.5px; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.btn-google:hover { background-color: var(--input-bg); border-color: #cbd5e1; transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0,0,0,0.04); }
/* --- 10. RECOVERY INSTRUCTION CARD (Forgot Password Page) --- */
.instruction-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px;
    border-radius: 20px;
    max-width: 380px;
    width: 100%;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.instruction-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    letter-spacing: 0.5px;
}
/* --- MOBILE SPECIFIC UTILITIES --- */
.mobile-instruction {
    display: none; /* 🟢 Hidden on desktop so it doesn't duplicate the right panel */
    font-size: 13px; 
    color: #94a3b8; 
    line-height: 1.5;
    margin-bottom: 5px;
}
.instruction-title i { color: #10B981; }

.step-list { display: flex; flex-direction: column; gap: 20px; }

.step-item { display: flex; align-items: flex-start; gap: 16px; transition: transform 0.2s ease; }
.step-item:hover { transform: translateX(5px); }

.step-icon {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.1);
    color: #10B981;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}

.step-text { display: flex; flex-direction: column; gap: 4px; }
.step-text strong { color: white; font-size: 14px; font-weight: 600; letter-spacing: 0.3px; }
.step-text span { color: rgba(255, 255, 255, 0.7); font-size: 12.5px; line-height: 1.4; }

.support-note {
    margin-top: 25px; 
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12.5px; 
    color: rgba(255, 255, 255, 0.6); 
    text-align: center;
}

.support-note a { color: #10B981; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.support-note a:hover { color: white; text-decoration: underline; }

/* --- 8. FOOTER (Visibility Fix) --- */
.page-footer { 
    margin-top: 32px; 
    color: #475569; /* Deep Slate - Readable! */
    font-size: 12px; 
    text-align: center; 
    font-weight: 600; 
    letter-spacing: 0.3px;
    opacity: 0.9;
}
/* --- CUSTOM FILE INPUT (Fixes alignment) --- */
.file-input-field {
    padding: 10px 16px 10px 44px !important; /* 44px left makes room for the icon */
    background: #ffffff;
    line-height: 1.4;
}

/* Styles the ugly native 'Choose File' button to look premium */
.file-input-field::file-selector-button {
    background: var(--bg-page);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 4px 10px;
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 12px;
    margin-right: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.file-input-field::file-selector-button:hover {
    background: var(--input-border);
}

/* --- 9. MOBILE FIXES --- */
@media (max-width: 900px) {
    .right-panel { display: none; }
    .left-panel { flex: 100%; padding: 40px 24px; }
    .split-card { max-width: 440px; border-radius: 20px; }
    .hero-brand { font-size: 3.5rem; letter-spacing: 4px; }
}
/* --- 9. MOBILE FIXES --- */
@media (max-width: 900px) {
    .right-panel { display: none; }
    .left-panel { flex: 100%; padding: 40px 24px; }
    .split-card { max-width: 440px; border-radius: 20px; }
    .hero-brand { font-size: 3.5rem; letter-spacing: 4px; }
    
    /* 🟢 THE FIX: Reveal the text when the right panel disappears */
    .mobile-instruction { display: block; } 
}