/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #2d5a3d 0%, #1a4b2d 50%, #0f3d1f 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
    font-size: 14px;
}

/* Background overlay pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(76, 175, 80, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.page-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Header */
.app-header {
    background: #2d5a3d;
    padding: 10px 20px;
    border-bottom: 2px solid #4CAF50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    width: 100%;
    position: absolute;
    top: 0;
}

/* School Logo */
.school-logo1 {
    text-align: center;
    padding: 15px 20px 10px;
    margin-top: 50px;
}

.logo1 {
    width: 100px;
    height: auto;
    max-height: 80px;
    border: 2px solid #4CAF50;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.2);
    background: white;
    padding: 8px;
    object-fit: contain;
}

/* Headings */
.headings {
    text-align: center;
    padding: 0 20px 15px;
    color: white;
}

.headings h1 {
    font-size: 28px;
    font-weight: 600;
    color: #4CAF50;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.headings h2 {
    font-size: 16px;
    font-weight: 400;
    color: #e8f5e8;
    opacity: 0.9;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    width: 100%;
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 1px solid rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
}

.login-divider {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 2px;
    margin: 0 auto 25px;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2d5a3d;
    font-size: 13px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-input::placeholder {
    color: #aaa;
    font-size: 13px;
}

/* Password container */
.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #4CAF50;
}

/* Select dropdown */
select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 14px;
    padding-right: 35px;
}

select.form-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234CAF50' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Login Button */
.sign-in-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sign-in-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.sign-in-button:active {
    transform: translateY(0);
}

.sign-in-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.sign-in-button:hover::before {
    left: 100%;
}

/* Button loader (hidden by default) */
.button-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification */
.notification {
    margin-top: 18px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background: rgba(76, 175, 80, 0.1);
    color: #2d5a3d;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.notification.error {
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Support Link */
.support-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.support-link p {
    color: #666;
    font-size: 12px;
}

.support-link a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.support-link a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Form Feedback */
.form-feedback {
    font-size: 11px;
    color: #c62828;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-feedback.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .headings h1 {
        font-size: 24px;
    }
    
    .headings h2 {
        font-size: 15px;
    }
    
    .login-container {
        margin: 15px;
        padding: 25px 20px;
        max-width: 320px;
    }
    
    .logo1 {
        width: 80px;
        max-height: 65px;
    }
}

@media (max-width: 480px) {
    .headings h1 {
        font-size: 22px;
    }
    
    .login-container {
        padding: 20px 15px;
        max-width: 300px;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .sign-in-button {
        padding: 12px 18px;
        font-size: 13px;
    }
}

/* Loading state for button */
.sign-in-button.loading .button-text {
    opacity: 0;
}

.sign-in-button.loading .button-loader {
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Smooth animations */
.login-container {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}