/* Auth Pages Styling - Complete Redesign */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

/* Only apply flex to auth pages */
body.auth-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a5f3f 0%, #2ecc71 50%, #27ae60 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.login-header {
    background: linear-gradient(135deg, #ffffff 0%, #2ecc71 100%);
    padding: 40px 30px;
    text-align: center;
}

.logo-container {
    margin-bottom: 10px;
}

.logo-container img {
    width: 250px;
    
    object-fit: contain;
    animation: zoomIn 0.6s ease-out;
}

.school-name {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 8px 0 3px;
    line-height: 1.2;
}

.school-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

.login-body {
    padding: 35px 30px;
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    font-weight: 600;
    color: #1a5f3f;
    margin-bottom: 4px;
    display: block;
    font-size: 13px;
}

.form-control {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

.input-icon {
    position: relative;
    display: block;
}

.input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #2ecc71;
    font-size: 14px;
    pointer-events: none;
    z-index: 5;
}

.input-icon .form-control {
    padding-left: 38px;
    width: 100%;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .input-icon {
    flex: 1;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #2ecc71;
    cursor: pointer;
    font-size: 16px;
    padding: 8px 10px;
    transition: color 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.toggle-password:hover {
    color: #1a5f3f;
}

.password-wrapper {
    position: relative;
}

.form-control:focus {
    border-color: #2ecc71;
    background: white;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #999;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12px;
}

.remember-forgot label {
    margin: 0;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remember-forgot a {
    color: #2ecc71;
    text-decoration: none;
    font-weight: 600;
}

.remember-forgot a:hover {
    color: #1a5f3f;
}

.btn-login {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #2ecc71 0%, #1a5f3f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: #999;
    font-size: 12px;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 8px;
    position: relative;
}

.signup-section {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.signup-text {
    color: #666;
    font-size: 13px;
    margin: 0;
}

.signup-link {
    color: #2ecc71;
    text-decoration: none;
    font-weight: 600;
}

.signup-link:hover {
    color: #1a5f3f;
}

/* ===== REGISTER PAGE ===== */
.register-wrapper {
    width: 100%;
    max-width: 550px;
}

.register-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.register-header {
    background: linear-gradient(135deg, #1a5f3f 0%, #2ecc71 100%);
    padding: 30px 30px;
    text-align: center;
}

.register-body {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option label {
    display: block;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.role-option input[type="radio"]:checked + label {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.btn-register {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #2ecc71 0%, #1a5f3f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    margin-top: 8px;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.login-link {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 12px;
}

.login-link a {
    color: #2ecc71;
    font-weight: 600;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* ===== FORGOT PASSWORD PAGE ===== */
.forgot-wrapper {
    width: 100%;
    max-width: 420px;
}

.forgot-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.forgot-header {
    background: linear-gradient(135deg, #1a5f3f 0%, #2ecc71 100%);
    padding: 40px 30px;
    text-align: center;
}

.forgot-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0 5px;
}

.forgot-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    line-height: 1.4;
}

.forgot-body {
    padding: 35px 30px;
}

.info-box {
    background: #f0f8f5;
    border-left: 4px solid #2ecc71;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 12px;
    color: #1a5f3f;
    line-height: 1.5;
}

.info-box i {
    color: #2ecc71;
    margin-right: 6px;
}

.btn-forgot {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #2ecc71 0%, #1a5f3f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-forgot:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.back-link {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.back-link a {
    color: #2ecc71;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.back-link a:hover {
    color: #1a5f3f;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 15px;
    font-size: 12px;
    animation: slideDown 0.3s ease-out;
}

.alert-danger {
    background: #fee;
    color: #c33;
}

.alert-danger .alert-heading {
    color: #c33;
    font-size: 13px;
}

.alert-success {
    background: #efe;
    color: #3c3;
}

.alert-info {
    background: #eef;
    color: #33c;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert li {
    margin: 3px 0;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .login-wrapper,
    .register-wrapper,
    .forgot-wrapper {
        max-width: 100%;
    }

    .logo-container img {
        width: 150px;
       
    }

    .school-name {
        font-size: 18px;
    }

    .forgot-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-wrapper,
    .register-wrapper,
    .forgot-wrapper {
        max-width: 100%;
    }

        .login-header, .register-header, .forgot-header {
        padding: 24px 20px;
    }

    .logo-container {
        margin-bottom: 5px;
    }

    .logo-container img {
        width: 150px;
       
    }

    .school-name {
        font-size: 16px;
        margin: 10px 0 3px;
    }

    .school-subtitle,
    .forgot-subtitle {
        font-size: 11px;
    }

    .forgot-title {
        font-size: 15px;
    }

    .login-body,
    .register-body,
    .forgot-body {
        padding: 20px;
    }

    .register-body {
        max-height: 65vh;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .role-select {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .form-label {
        font-size: 12px;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 12px;
    }

    .btn-login,
    .btn-register,
    .btn-forgot {
        padding: 10px;
        font-size: 13px;
    }

    .remember-forgot {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .info-box {
        padding: 10px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .login-header,
    .register-header,
    .forgot-header {
        padding: 16px 8px;
    }



    .school-name {
        font-size: 14px;
    }

    .login-body,
    .register-body,
    .forgot-body {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-label {
        font-size: 11px;
    }

    .form-control {
        padding: 7px 8px;
        font-size: 11px;
    }
}
