/* Login Page Styles */

/* Critical CSS - Prevents FOUC */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.container-login {
    width: 100vw;
    height: 100vh;
    background: #f5f1e8;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.login-card {
    width: 100%;
    max-width: 470px;
    background: #ffffff;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-section {
    width: 100%;
    padding: 30px 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 14px;
    color: #718096;
    font-weight: 400;
    line-height: 1.5;
}

/* Error Messages */
.error-notification {
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

.notification-content {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.notification-content i.fa-exclamation-circle {
    color: #e53e3e;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    color: #c53030;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.notification-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-text li {
    color: #c53030;
    font-size: 13px;
    margin-bottom: 4px;
}

.notification-text li:before {
    content: '• ';
    font-weight: bold;
    margin-right: 4px;
}

.notification-close {
    background: none;
    border: none;
    color: #c53030;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    opacity: 1;
}

.success-message {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #22543d;
    font-size: 14px;
}

.success-message i {
    color: #38a169;
    font-size: 16px;
}

.login-form {
    width: 100%;
}

.form-field {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.required {
    color: #e53e3e;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #a0aec0;
    font-size: 15px;
    z-index: 1;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #4e73df;
}

.form-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #2d3748;
    transition: all 0.25s ease;
    outline: none;
}

.form-input:hover {
    border-color: #cbd5e0;
}

.form-input:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 4px rgba(78, 115, 223, 0.12);
    background: #fafafa;
}

.form-input::placeholder {
    color: #a0aec0;
}

/* Password toggle icon */
.password-field .input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #a0aec0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #4e73df;
}

.form-input.input-error {
    border-color: #e53e3e;
    background: #fff5f5;
}

.form-input.input-error:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.12);
}

.error-message {
    display: block;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
    line-height: 1.4;
}

.error-message i {
    margin-right: 4px;
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #4e73df 0%, #1cc88a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(78, 115, 223, 0.35);
    margin-top: 10px;
    letter-spacing: 0.3px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 115, 223, 0.45);
    background: linear-gradient(135deg, #224abe 0%, #17a673 100%);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.3);
}

.login-button .icon {
    display: flex;
    align-items: center;
}

.login-button i {
    font-size: 14px;
}

.copyright-text {
    margin-top: 32px;
    font-size: 12px;
    color: #a0aec0;
    text-align: center;
    letter-spacing: 0.3px;
}

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

/* Responsive Design */
@media (max-width: 640px) {
    .container-login {
        padding: 15px;
    }

    .login-card {
        border-radius: 16px;
        max-width: 100%;
    }

    .login-section {
        padding: 40px 30px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .login-section {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 20px;
    }
}

.recaptcha-wrapper {
    margin-bottom: 15px;
    width: 100%;
}

.recaptcha-container {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 78px; /* Match approximate height of reCAPTCHA widget */
    }

.recaptcha-container .g-recaptcha {
    display: inline-block;
    margin: 0 auto;
}

/* Scale reCAPTCHA to match input field width on smaller screens if needed */
@media (max-width: 400px) {
    .recaptcha-container .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }
}