/* AMI Farmer Poultry Manager - Login Form Styles */

.afppm-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.afppm-login-wrapper {
    width: 100%;
    max-width: 420px;
}

.afppm-login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
}

.afppm-login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.afppm-login-logo {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.afppm-login-header h1 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 600;
}

.afppm-login-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95em;
}

.afppm-login-body {
    padding: 30px;
}

.afppm-login-form .afppm-form-group {
    margin-bottom: 20px;
}

.afppm-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3338;
    font-size: 14px;
}

.afppm-login-form .afppm-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.afppm-login-form .afppm-form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.afppm-login-form .afppm-form-control:invalid {
    border-color: #d63638;
}

.afppm-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.afppm-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.afppm-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 2px solid #dcdcde;
}

.afppm-forgot-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.afppm-forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

.afppm-login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.afppm-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.afppm-login-btn:active {
    transform: translateY(0);
}

.afppm-login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.afppm-login-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #646970;
    font-size: 14px;
}

.afppm-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.afppm-login-divider span {
    background: #fff;
    padding: 0 15px;
    position: relative;
}

.afppm-social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.afppm-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #2c3338;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.afppm-social-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.afppm-social-btn.google {
    color: #db4437;
}

.afppm-social-btn.facebook {
    color: #4267B2;
}

.afppm-login-footer {
    text-align: center;
    color: #646970;
    font-size: 14px;
}

.afppm-login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

.afppm-login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.afppm-login-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.afppm-login-alert.success {
    background: #edfaef;
    border-color: #00a32a;
    color: #005a18;
}

.afppm-login-alert.error {
    background: #fcf0f1;
    border-color: #d63638;
    color: #8a2424;
}

.afppm-login-alert.info {
    background: #f0f6ff;
    border-color: #2271b1;
    color: #135e96;
}

.afppm-login-alert.warning {
    background: #fef4e8;
    border-color: #f0c930;
    color: #8a4600;
}

/* Password Strength Indicator */
.afppm-password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.afppm-strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-bottom: 5px;
    overflow: hidden;
}

.afppm-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.afppm-strength-fill.very-weak {
    background: #d63638;
    width: 20%;
}

.afppm-strength-fill.weak {
    background: #f0c930;
    width: 40%;
}

.afppm-strength-fill.medium {
    background: #f0c930;
    width: 60%;
}

.afppm-strength-fill.strong {
    background: #00a32a;
    width: 80%;
}

.afppm-strength-fill.very-strong {
    background: #00a32a;
    width: 100%;
}

.afppm-strength-text {
    color: #646970;
    font-weight: 500;
}

/* Loading State */
.afppm-login-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.afppm-login-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: afppmSpin 1s linear infinite;
}

@keyframes afppmSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .afppm-login-container {
        padding: 15px;
    }
    
    .afppm-login-body {
        padding: 25px 20px;
    }
    
    .afppm-login-header {
        padding: 25px 20px;
    }
    
    .afppm-login-header h1 {
        font-size: 1.5em;
    }
    
    .afppm-social-login {
        grid-template-columns: 1fr;
    }
    
    .afppm-login-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .afppm-login-card {
        background: #2c3338;
        color: #fff;
    }
    
    .afppm-login-form label {
        color: #fff;
    }
    
    .afppm-login-form .afppm-form-control {
        background: #3c4349;
        border-color: #4f555c;
        color: #fff;
    }
    
    .afppm-login-form .afppm-form-control:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    }
    
    .afppm-social-btn {
        background: #3c4349;
        border-color: #4f555c;
        color: #fff;
    }
    
    .afppm-social-btn:hover {
        background: #4f555c;
        border-color: #667eea;
    }
    
    .afppm-login-footer {
        color: #8c8f94;
    }
    
    .afppm-login-divider span {
        background: #2c3338;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .afppm-login-card {
        border: 2px solid #000;
    }
    
    .afppm-login-form .afppm-form-control {
        border-width: 2px;
    }
    
    .afppm-social-btn {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .afppm-login-form .afppm-form-control,
    .afppm-login-btn,
    .afppm-social-btn {
        transition: none;
    }
    
    .afppm-login-btn:hover,
    .afppm-social-btn:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .afppm-login-container {
        background: #fff !important;
    }
    
    .afppm-login-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .afppm-login-header {
        background: #fff !important;
        color: #000 !important;
        border-bottom: 1px solid #000 !important;
    }
    
    .afppm-social-login,
    .afppm-login-divider {
        display: none !important;
    }
}

/* Accessibility Improvements */
.afppm-login-form .afppm-form-control:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.afppm-login-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Custom Checkbox Styles */
.afppm-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.afppm-checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #dcdcde;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    position: relative;
}

.afppm-checkbox-container input[type="checkbox"]:checked {
    background: #667eea;
    border-color: #667eea;
}

.afppm-checkbox-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.afppm-checkbox-container input[type="checkbox"]:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}