:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #ffd700;
    --text-dark: #333;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #0a1855ff 0%, #240345ff 100%);
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
}

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

body {
    font-family: "Tajawal", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    direction: rtl;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

@media (max-width: 768px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    .company-info {
        display: none;
    }
}

.company-info {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.company-info::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    padding: 10px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.company-name {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.company-slogan {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.company-description {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    text-align: justify;
}

.contact-info {
    position: relative;
    z-index: 2;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.contact-item i {
    width: 20px;
    margin-left: 0.8rem;
    color: var(--accent-color);
}

.website-link {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.website-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
    color: var(--primary-color);
}

.login-form {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-title h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-title p {
    color: var(--text-light);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
    background: white;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-left: 0.5rem;
}

.btn-login {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 60, 114, 0.3);
}

.forgot-password {
    text-align: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-color);
}

.footer {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

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

.alert {
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: none;
    padding: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-right: 4px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-right: 4px solid #dc3545;
}

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-up 15s infinite ease-in-out;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}
.floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    left: 80%;
    animation-delay: 2s;
}
.floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 50%;
    animation-delay: 4s;
}
.floating-element:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 20%;
    animation-delay: 6s;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}
