﻿:root {
    --forest: #1a3a2a;
    --forest-mid: #2d5a3d;
    --forest-light: #4a8c5c;
    --gold: #b8943f;
    --gold-light: #d4af6a;
    --dark: #0d1f17;
    --cream: #f5f0e8;
    --white: #ffffff;
    --text-primary: #1a2e1f;
    --text-secondary: #4a6555;
    --error: #e05555;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

body {
    display: flex;
    align-items: stretch;
    background: var(--dark);
    overflow: hidden;
}

/* ===== LEFT PANEL (visual) ===== */
.login-visual {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 50px;
}

.login-visual-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0d1f17 0%, #1a3a2a 40%, #2d5a3d 100%);
}

    .login-visual-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 20% 80%, rgba(74,140,92,0.25) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(184,148,63,0.15) 0%, transparent 50%);
    }

/* Decorative pattern */
.visual-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 1px, transparent 0, transparent 50%);
    background-size: 24px 24px;
}

/* Animated circles */
.visual-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.visual-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    transform: translate(-50%, -50%);
    animation: pulse-ring 4s ease-in-out infinite;
}

    .visual-circle:nth-child(1) {
        width: 300px;
        height: 300px;
        animation-delay: 0s;
    }

    .visual-circle:nth-child(2) {
        width: 500px;
        height: 500px;
        animation-delay: 0.8s;
    }

    .visual-circle:nth-child(3) {
        width: 700px;
        height: 700px;
        animation-delay: 1.6s;
    }

@keyframes pulse-ring {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.08;
        transform: translate(-50%, -50%) scale(1.04);
    }
}

.login-visual-content {
    position: relative;
    z-index: 2;
}

.visual-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 60px;
}

    .visual-logo img {
        height: 56px;
        filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    }

.visual-logo-text {
    font-family: 'Amiri', serif;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
}

.visual-tagline {
    font-family: 'Amiri', serif;
    font-size: 42px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

    .visual-tagline em {
        color: var(--gold-light);
        font-style: normal;
        display: block;
    }

.visual-desc {
    font-family: 'Amiri', serif;
    font-size: 16px;
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
    max-width: 380px;
    margin-bottom: 40px;
}

.visual-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

    .visual-back-link:hover {
        color: var(--gold-light);
    }

/* ===== RIGHT PANEL (form) ===== */
.login-form-panel {
    width: 460px;
    flex-shrink: 0;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow-y: auto;
}

    .login-form-panel::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, var(--forest-light), var(--gold), var(--forest-light));
    }

.form-header {
    margin-bottom: 40px;
}

.form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(74,140,92,0.1);
    color: var(--forest-light);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
    border: 1px solid rgba(74,140,92,0.2);
    letter-spacing: 0.5px;
}

.form-title {
    font-family: 'Amiri', serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 10px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Form fields */
.field-group {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 17px;
    pointer-events: none;
    transition: color 0.3s;
}

.field-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 2px solid rgba(26,58,42,0.12);
    border-radius: 12px;
    background: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
    direction: rtl;
}

    .field-input:focus {
        border-color: var(--forest-light);
        box-shadow: 0 0 0 4px rgba(74,140,92,0.12);
    }

        .field-input:focus + .field-icon {
            color: var(--forest-light);
        }

    .field-input::placeholder {
        color: rgba(74,101,85,0.4);
    }

/* Password toggle */
.pwd-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 17px;
    cursor: pointer;
    transition: color 0.3s;
}

    .pwd-toggle:hover {
        color: var(--forest-light);
    }

/* Validation */
.field-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--forest), var(--forest-mid));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(26,58,42,0.3);
    position: relative;
    overflow: hidden;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--forest-mid), var(--forest-light));
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .btn-submit:hover::before {
        opacity: 1;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(26,58,42,0.4);
    }

    .btn-submit:active {
        transform: translateY(0);
    }

    .btn-submit span, .btn-submit i {
        position: relative;
        z-index: 1;
    }

/* Back to home */
.form-footer {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(26,58,42,0.1);
}

    .form-footer a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: color 0.3s;
    }

        .form-footer a:hover {
            color: var(--forest-light);
        }

/* Responsive */
@media (max-width: 900px) {
    body {
        flex-direction: column;
        overflow: auto;
    }

    .login-visual {
        min-height: 280px;
        padding: 40px 30px 30px;
    }

    .visual-tagline {
        font-size: 28px;
    }

    .visual-circles {
        display: none;
    }

    .login-form-panel {
        width: 100%;
        padding: 40px 30px;
    }

        .login-form-panel::before {
            width: 100%;
            height: 4px;
            right: 0;
            top: 0;
        }
}
