@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #185a4f;
    --primary-gradient: linear-gradient(135deg, #185a4f 0%, #298d7a 100%);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    --input-focus: #185a4f;
    --text-main: #1f2937;
    --text-muted: #6b7280;
}

body {
    background-color: #f3f4f6;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modern-container {
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    overflow: hidden;
    width: 100%;
    min-height: 600px;
}

.login-visual-panel {
    flex: 1.2;
    background-size: cover;
    background-position: center;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
    border-radius: 20px;
    margin: 12px;
    box-shadow: inset 0 0 0 2000px rgba(24, 90, 79, 0.35); /* Greenish overlay to match original style */
}

.login-visual-panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    border-radius: 20px;
}

.visual-content {
    position: relative;
    z-index: 10;
}

.visual-footer {
    position: relative;
    z-index: 10;
}

.visual-footer p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
    margin: 0;
}

.visual-content .logo-icon {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.visual-content h2 {
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.visual-content p {
    font-size: 1.15rem;
    color: #ffffff !important;
    opacity: 0.9 !important;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.login-form-panel {
    flex: 1;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

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

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

.form-control-modern {
    width: 100%;
    padding: 0 1.2rem;
    height: 52px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: var(--text-main);
    box-sizing: border-box;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--input-focus);
    background: white;
    box-shadow: 0 0 0 4px rgba(24, 90, 79, 0.1);
}

.login-btn-modern {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(24, 90, 79, 0.2);
}

.login-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 90, 79, 0.35);
}

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

.form-check-wrapper {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.form-check-input-modern {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    border-radius: 4px;
}

.form-check-label-modern {
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
    margin-left: 8px;
    cursor: pointer;
}

.alert-modern {
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
    padding: 12px;
    margin-bottom: 20px;
    border: none;
}

/* RTL Support */
[dir="rtl"] .login-visual-panel {
    order: 2;
}

[dir="rtl"] .visual-content h2,
[dir="rtl"] .visual-content p,
[dir="rtl"] .form-header h1,
[dir="rtl"] .form-header p,
[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .form-control-modern {
    text-align: right;
}

[dir="rtl"] .form-check-label-modern {
    margin-left: 0;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 900px) {
    .login-modern-container {
        padding: 0;
    }
    .login-card {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .login-visual-panel {
        display: flex;
        height: 220px;
        min-height: 220px;
        border-radius: 0;
        margin: 0;
        padding: 2rem 1.5rem;
    }
    .visual-content h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    .visual-content p {
        font-size: 0.95rem;
    }
    .visual-content .logo-icon {
        display: none;
    }
    .login-form-panel {
        padding: 2.5rem 1.5rem;
    }
}
