:root {
    --primary: #2c5aa0;
    --primary-light: #3a6bc5;
    --secondary: #1a3a6b;
    --accent: #f39c12;
    --success: #27ae60;
    --warning: #e67e22;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --light-gray: #ecf0f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.login-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.login-logo-img {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.login-logo-img i {
    font-size: 36px;
    color: var(--primary);
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.login-header p {
    opacity: 0.9;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

.login-body {
    padding: 40px 35px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.form-control {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    background: #fafafa;
    color: var(--dark);
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
    background: white;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.remember-me input {
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
    transition: all 0.3s;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    color: var(--gray);
    font-size: 0.9rem;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--primary);
}

#loginMsg {
    color: var(--danger);
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2em;
}

.login-card,
.login-body,
.login-header {
    position: relative;
    z-index: 5;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
    }
    
    .login-body {
        padding: 30px 25px;
    }
    
    .login-header {
        padding: 30px 25px;
    }
    
    .login-header h1 {
        font-size: 1.6rem;
    }
    
    .login-logo-img {
        width: 70px;
        height: 70px;
    }
    
    .login-logo-img i {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .login-body {
        padding: 25px 20px;
    }
    
    .login-header {
        padding: 25px 20px;
    }
    
    .login-header h1 {
        font-size: 1.4rem;
    }
    
    .form-control {
        padding: 12px 45px 12px 15px;
    }
    
    .login-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
