/* Modern, Friendly CSS for iMasterPro Login Page */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #727275 0%, #dfc3fa 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    backdrop-filter: blur(10px);
}

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

.login-header img {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #cfd5f3 0%, #753f2b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    color: #555;
    cursor: pointer;
}

.remember-forgot input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #667eea;
}

.remember-forgot a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.remember-forgot a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-login:active {
    transform: translateY(0);
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    border-radius: 50%;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.alert strong {
    margin-right: 8px;
}

.alert .close {
    margin-left: auto;
    cursor: pointer;
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert .close:hover {
    opacity: 1;
}

/* Two-Factor Authentication Styles */
.twofa-container {
    text-align: center;
}

.twofa-container h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.twofa-container p {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.code-inputs input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.code-inputs input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.resend-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.resend-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    color: #999;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .code-inputs input {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }
}

/* Loading Animation */
.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Input Icons */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 45px;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: color 0.3s ease;
}

.input-with-icon input:focus + i {
    color: #667eea;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* Floating Labels */
.floating-label {
    position: relative;
    margin-bottom: 25px;
}

.floating-label input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.floating-label label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 5px;
}

.floating-label input:focus,
.floating-label input:not(:placeholder-shown) {
    border-color: #667eea;
    background: #fff;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: #667eea;
    background: white;
}

/* Success States */
.form-group.success input {
    border-color: #16a34a;
}

.form-group.success label {
    color: #16a34a;
}

/* Error States */
.form-group.error input {
    border-color: #dc2626;
}

.form-group.error label {
    color: #dc2626;
}

.form-group .error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}
