/* css/studentLogin.css */

:root {
    --forest-green: #0a5c36;
    --crimson: #f8498c;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --surface-hover: #f9fafb;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: "Poppins", sans-serif; 
    -webkit-font-smoothing: antialiased; 
}

body { 
    background: #f3f4f6; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    padding: 20px; 
}

.auth-container {
    background: #fff; 
    width: 1000px; 
    max-width: 100%; 
    height: 600px;
    border-radius: 24px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    display: flex; 
    overflow: hidden; 
    position: relative;
}

/* Left Side - Visual/Branding */
.auth-visual {
    flex: 1; 
    background: linear-gradient(135deg, var(--forest-green) 0%, #063d23 100%);
    color: white; 
    padding: 60px 40px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    position: relative;
}

.auth-visual::after {
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: url('../assets/images/uniformnobg.png') center/contain no-repeat;
    opacity: 0.1; 
    mix-blend-mode: overlay;
}

.brand-logo { 
    font-size: 2rem; 
    font-weight: 800; 
    letter-spacing: -1px; 
    z-index: 2; 
}

.visual-text { 
    z-index: 2; 
}

.visual-text h2 { 
    font-size: 2.5rem; 
    line-height: 1.1; 
    margin-bottom: 16px; 
}

.visual-text p { 
    font-size: 1rem; 
    opacity: 0.8; 
}

/* Right Side - Forms */
.auth-forms {
    flex: 1; 
    position: relative;
}

.form-wrapper {
    position: absolute; 
    inset: 0; 
    padding: 60px 50px;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0; 
    visibility: hidden; 
    transform: translateX(30px);
}

.form-wrapper.active {
    opacity: 1; 
    visibility: visible; 
    transform: translateX(0);
}

.form-header { 
    margin-bottom: 30px; 
}

.form-header h3 { 
    font-size: 1.8rem; 
    color: var(--text-dark); 
    margin-bottom: 8px; 
}

.form-header p { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
}

.input-group { 
    margin-bottom: 20px; 
}

.input-group label { 
    display: block; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--text-dark); 
    margin-bottom: 8px; 
}

.input-group input {
    width: 100%; 
    padding: 14px 16px; 
    border: 1px solid var(--border-color);
    border-radius: 12px; 
    font-size: 0.95rem; 
    outline: none; 
    background: var(--surface-hover);
    transition: all 0.3s;
}

.input-group input:focus { 
    border-color: var(--forest-green); 
    background: #fff; 
    box-shadow: 0 0 0 4px rgba(10,92,54,0.1); 
}

.btn-submit {
    width: 100%; 
    padding: 14px; 
    background: var(--forest-green); 
    color: white;
    border: none; 
    border-radius: 12px; 
    font-size: 1rem; 
    font-weight: 600;
    cursor: pointer; 
    transition: all 0.3s; 
    margin-top: 10px;
}

.btn-submit:hover { 
    background: #084a2b; 
    transform: translateY(-2px); 
    box-shadow: 0 10px 20px rgba(10,92,54,0.2); 
}

.form-footer { 
    margin-top: 24px; 
    text-align: center; 
    font-size: 0.9rem; 
    color: var(--text-muted); 
}

.form-footer a { 
    color: var(--forest-green); 
    font-weight: 600; 
    text-decoration: none; 
    cursor: pointer; 
}

.form-footer a:hover { 
    text-decoration: underline; 
}

.error-banner {
    background: #fee2e2; 
    color: var(--crimson); 
    padding: 12px 16px;
    border-radius: 8px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    margin-bottom: 20px;
    display: flex; 
    align-items: center; 
    gap: 8px;
}

@media (max-width: 768px) {
    .auth-container { 
        flex-direction: column; 
        height: auto; 
        min-height: 600px; 
    }
    .auth-visual { 
        padding: 40px; 
        flex: none; 
        height: 200px; 
        justify-content: center; 
    }
    .visual-text { 
        display: none; 
    }
    .form-wrapper { 
        padding: 40px 30px; 
        position: relative; 
        transform: none !important; 
    }
    .form-wrapper:not(.active) { 
        display: none; 
    }
}

/* =========================================
   GOOGLE AUTHENTICATOR MODAL DESIGN
   ========================================= */
.otp-modal-overlay {
    position: fixed; 
    inset: 0;
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(8px);
    z-index: 100000; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.otp-modal-overlay.show { 
    opacity: 1; 
    visibility: visible; 
}

.otp-modal-card {
    background: #ffffff; 
    width: 100%; 
    max-width: 420px;
    border-radius: 16px; 
    padding: 40px 30px; 
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* The Slide-Up Animation */
    transform: translateY(40px) scale(0.95); 
    animation: authSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authSlideUp { 
    to { 
        transform: translateY(0) scale(1); 
    } 
}

.otp-modal-card h2 { 
    color: #1a1a1a; 
    font-size: 1.5rem; 
    font-weight: 700; 
    margin-bottom: 8px; 
}

.otp-modal-card p { 
    color: #6b7280; 
    font-size: 0.9rem; 
    line-height: 1.5; 
}

/* QR Code Container with subtle pulse */
.qr-container {
    background: #ffffff; 
    padding: 15px; 
    display: inline-block; 
    border-radius: 12px; 
    border: 2px solid #e5e7eb; 
    margin: 15px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: qrPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes qrPulse {
    0%, 100% { border-color: #e5e7eb; }
    50% { border-color: #0a5c36; box-shadow: 0 0 15px rgba(10, 92, 54, 0.2); }
}

.qr-container img {
    width: 160px; 
    height: 160px;
    display: block;
}

.manual-key {
    font-size: 0.8rem; 
    color: #4b5563; 
    font-family: 'Courier New', Courier, monospace; 
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* Code Input Styling */
.otp-input-group input {
    width: 100%; 
    padding: 15px; 
    font-size: 2.2rem; 
    font-weight: 700; 
    /* Spreads the numbers out to look like separate boxes */
    letter-spacing: 16px; 
    text-align: center; 
    border: 2px solid #d1d5db; 
    border-radius: 12px;
    color: #0a5c36; 
    outline: none; 
    transition: all 0.3s ease; 
    margin-bottom: 20px;
    font-family: monospace;
}

.otp-input-group input:focus { 
    border-color: #0a5c36; 
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.15); 
}

.otp-input-group input::placeholder {
    color: #9ca3af;
    font-size: 2rem;
    transform: translateY(-2px);
    display: inline-block;
}

/* Buttons */
.btn-verify {
    width: 100%; 
    padding: 16px; 
    background: #0a5c36; 
    color: white; 
    border: none;
    border-radius: 10px; 
    font-size: 1.05rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-verify:hover { 
    background: #074226; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.3);
}

.btn-verify i {
    font-size: 1.1rem;
}

.btn-cancel-otp {
    background: none; 
    border: none; 
    color: #6b7280; 
    font-size: 0.9rem;
    font-weight: 500; 
    cursor: pointer; 
    transition: color 0.2s ease;
    padding: 10px;
}

.btn-cancel-otp:hover { 
    color: #dc2626; 
}