/* Enhanced Styles for Improved Login */
.auth-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1.5px solid #e5e7eb;
    width: 100%;
    max-width: 400px;
    min-width: 280px;
    overflow: hidden;
    margin: 40px auto;
}

.auth-header {
    text-align: center;
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.auth-form-container {
    padding: 32px 0 0 0;
    box-sizing: border-box;
    margin: 0;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
    box-sizing: border-box;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-control {
    box-sizing: border-box;
    width: 90%;
    display: block;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    margin: 0;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.password-toggle:hover {
    background: #f3f4f6;
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #ef4444; width: 25%; }
.strength-fair { background: #f59e0b; width: 50%; }
.strength-good { background: #10b981; width: 75%; }
.strength-strong { background: #059669; width: 100%; }

.password-requirements {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.password-requirements ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.password-requirements li {
    margin: 2px 0;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.btn {
    min-width: 120px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.10);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.18);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.rate-limit-info {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    padding: 24px 32px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: #6b7280;
    font-size: 12px;
}

.security-icon {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* Responsive Design */
@media (max-width: 640px) {
    .auth-container {
        margin: 10px;
        max-width: 98vw;
        min-width: 0;
    }
    .auth-header {
        padding: 24px 10px 16px;
    }
    .auth-form-container {
        padding: 16px 0 0 0;
        width: 100%;
    }
    .form-group {
        width: 98%;
        margin-left: auto;
        margin-right: auto;
    }
    .auth-footer {
        padding: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators */
.form-control:focus,
.btn:focus,
.password-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Error animations */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
