/* auth.css */

/* Reset & Basic Setup */
:root {
    --auth-bg-color: #0b1120;
    --auth-panel-bg: rgba(15, 23, 42, 0.6);
    --auth-card-bg: #1e293b;
    --auth-text: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-primary: #3b82f6;
    --auth-primary-hover: #2563eb;
    --auth-border: #334155;
    --auth-error: #ef4444;
    --auth-success: #10b981;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg-color);
    padding: 20px;
    padding-top: 100px; /* Space for navbar */
}

/* Split Screen Container */
.auth-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background: var(--auth-card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Left Panel - Image/Branding */
.auth-panel-img {
    flex: 1;
    background: linear-gradient(rgba(11, 17, 32, 0.7), rgba(11, 17, 32, 0.9)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--auth-text);
}

.auth-panel-img::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: backdrop-filter(blur(5px)); /* fallback */
    backdrop-filter: blur(5px);
    z-index: 1;
}

.img-content {
    position: relative;
    z-index: 2;
    max-width: 400px;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.welcome-desc {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    line-height: 1.6;
}

.toggle-view p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: white;
    color: var(--auth-bg-color);
}

/* Right Panel - Forms */
.auth-panel-forms {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px;
    position: relative;
    background: var(--auth-card-bg);
}

.auth-form {
    display: none;
    animation: fadeIn 0.5s ease;
}

.auth-form.active {
    display: block;
}

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

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 2rem;
    color: var(--auth-text);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--auth-text-muted);
}

/* Role Selector */
.role-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.role-selector label {
    cursor: pointer;
    position: relative;
}

.role-selector input[type="radio"] {
    display: none;
}

.role-selector span {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.role-selector input[type="radio"]:checked + span {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

/* Input Groups */
.input-row {
    display: flex;
    gap: 20px;
}

.input-row .input-group {
    flex: 1;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    color: var(--auth-text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
}

/* Floating Label Logic */
.input-group label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    border-color: var(--auth-primary);
    background: rgba(59, 130, 246, 0.05);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.8rem;
    background: var(--auth-card-bg);
    padding: 0 5px;
    color: var(--auth-primary);
}

.input-group input:focus ~ i {
    color: var(--auth-primary);
}

.input-group .toggle-password {
    left: auto;
    right: 15px;
    cursor: pointer;
    pointer-events: auto;
}

.input-group .toggle-password:hover {
    color: var(--auth-text);
}

/* Select specific styles */
.input-group select {
    color: var(--auth-text-muted);
}
.input-group select option {
    background: var(--auth-card-bg);
    color: var(--auth-text);
}

/* Form Actions (Remember me & Forgot) */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text-muted);
    cursor: pointer;
}

.forgot-password {
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--auth-text);
}

/* Buttons */
.btn-primary {
    background: var(--auth-primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--auth-primary-hover);
}

.w-100 {
    width: 100%;
}

/* Social Login */
.social-login {
    margin-top: 30px;
    text-align: center;
}

.social-login p {
    color: var(--auth-text-muted);
    margin-bottom: 15px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--auth-border);
}

.social-login p::before { left: 0; }
.social-login p::after { right: 0; }

.social-btns {
    display: flex;
    gap: 15px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--auth-border);
    background: transparent;
    color: var(--auth-text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-social.google:hover { border-color: #ea4335; color: #ea4335; }
.btn-social.facebook:hover { border-color: #1877f2; color: #1877f2; }

/* Password Strength Meter */
.password-strength {
    margin: -10px 0 20px;
    display: none; /* Shown via JS when typing */
}

.strength-bar {
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    margin-bottom: 5px;
    overflow: hidden;
}

#strengthFill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
}

#strengthText {
    font-size: 0.8rem;
    color: var(--auth-text-muted);
}

/* Student specific fields hide */
.hidden {
    display: none !important;
}

/* Responsive Specifics */
@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-panel-img {
        padding: 40px 20px;
        min-height: 250px;
    }

    .welcome-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .welcome-desc {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .auth-panel-forms {
        padding: 30px 20px;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .role-selector {
        flex-wrap: wrap;
    }
    
    .social-btns {
        flex-direction: column;
    }
}
