/* Login Page Specific Styles */
body {
    margin: 0;
    padding-top: 60px;
}

/* Header Styles for Login Pages */
.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    background-color: #4a7c59;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin: 10px 20px;
}

.back-home-link:hover {
    background-color: #2d4a1f;
    transform: translateY(-1px);
}

/* Login Main Container */
.login-main {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f1e9 0%, #e8f5e3 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border: 1px solid #e8f5e3;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

/* Admin Login Specific Styling */
.admin-login {
    border: 1px solid #2d4a1f;
    box-shadow: 0 20px 60px rgba(45, 74, 31, 0.15);
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-icon {
    font-size: 3rem;
    color: #4a7c59;
    margin-bottom: 15px;
    display: block;
}

.admin-login .login-icon {
    color: #2d4a1f;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d4a1f;
    margin: 0 0 10px 0;
    font-family: 'Limelight', cursive;
}

.login-header p {
    color: #4a5d3a;
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

/* Form Styles */
.login-form {
    margin-bottom: 25px;
}

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

.input-group label {
    display: block;
    font-weight: 600;
    color: #2d4a1f;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    border: 2px solid #e8f5e3;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4a7c59;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a7c59;
    font-size: 1rem;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #4a7c59;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background-color: #f0f5ef;
    color: #2d4a1f;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5d3a;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.forgot-password {
    color: #4a7c59;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #2d4a1f;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #4a7c59 0%, #2d4a1f 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 124, 89, 0.4);
}

.admin-btn {
    background: linear-gradient(135deg, #2d4a1f 0%, #1a2e12 100%);
}

.admin-btn:hover {
    box-shadow: 0 8px 25px rgba(45, 74, 31, 0.4);
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f5ef;
}

.login-footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.contact-link {
    color: #4a7c59;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #2d4a1f;
    text-decoration: underline;
}

/* Error/Success Messages */
.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.error-message {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.success-message {
    background-color: #efe;
    color: #390;
    border: 1px solid #cfc;
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Student Type Selection Styles */
.student-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.type-option {
    background: white;
    border: 2px solid #e8f5e3;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.type-option:hover {
    border-color: #4a7c59;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(74, 124, 89, 0.15);
}

.type-option:hover .option-icon {
    color: #4a7c59;
    transform: scale(1.1);
}

.option-icon {
    font-size: 32px;
    color: #666;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.type-option h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.type-option p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 16px 0;
}

.option-btn {
    background: linear-gradient(135deg, #4a7c59 0%, #2d4a1f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
}

/* Form Header with Back Button */
.form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.back-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    background: #e8f5e3;
    border-color: #4a7c59;
    color: #4a7c59;
}

.form-header h2 {
    margin: 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

/* Registration Info Box */
.registration-info {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.registration-info p {
    margin: 0;
    color: #0c5460;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.registration-info i {
    color: #17a2b8;
    margin-top: 2px;
}

/* Portal Selection Styles */
.portal-selection-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.portal-header {
    margin-bottom: 50px;
}

.portal-icon {
    font-size: 64px;
    color: #4a7c59;
    margin-bottom: 20px;
}

.portal-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
}

.portal-header p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

.portal-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.portal-option {
    background: white;
    border: 3px solid #e8f5e3;
    border-radius: 24px;
    padding: 50px 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.portal-option:hover {
    border-color: #4a7c59;
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(74, 124, 89, 0.2);
}

.portal-option:hover .option-icon-large {
    color: #4a7c59;
    transform: scale(1.1);
}

.portal-option:hover .option-arrow {
    opacity: 1;
    transform: translateX(10px);
}

.option-icon-large {
    font-size: 80px;
    color: #999;
    margin-bottom: 24px;
    transition: all 0.4s ease;
}

.portal-option h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
}

.portal-option p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.option-arrow {
    font-size: 24px;
    color: #4a7c59;
    opacity: 0;
    transition: all 0.4s ease;
    position: absolute;
    bottom: 30px;
    right: 30px;
}

.portal-footer {
    margin-top: 30px;
}

.portal-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.portal-footer .contact-link {
    color: #4a7c59;
    text-decoration: none;
    font-weight: 500;
}

.portal-footer .contact-link:hover {
    text-decoration: underline;
}

/* Mobile Responsive for Student Type Selection */
@media (max-width: 768px) {
    .student-type-selection {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .type-option {
        padding: 20px 16px;
    }
    
    .option-icon {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .login-main {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
    }
    
    .login-header h1 {
        font-size: 1.6rem;
    }
    
    .login-icon {
        font-size: 2.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }
    
    .input-wrapper input {
        padding: 12px 40px 12px 40px;
        font-size: 0.9rem;
    }
    
    .login-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .portal-selection-container {
        padding: 20px;
    }
    
    .portal-header {
        margin-bottom: 30px;
    }
    
    .portal-icon {
        font-size: 48px;
    }
    
    .portal-header h1 {
        font-size: 32px;
    }
    
    .portal-header p {
        font-size: 16px;
    }
    
    .portal-options {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .portal-option {
        padding: 40px 20px;
        min-height: 280px;
    }
    
    .option-icon-large {
        font-size: 64px;
    }
    
    .portal-option h2 {
        font-size: 24px;
    }
    
    .portal-option p {
        font-size: 14px;
    }
}
