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

body {
    font-family: 'Cairo', sans-serif;
    min-height: 100vh;
    background: #f3f4f6;
    direction: rtl;
}

/* ── Split Layout ── */
.login-wrap {
    display: flex;
    min-height: 100vh;
}

/* Right: Form Panel */
.form-panel {
    flex: 0 0 44%;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    background: #fff;
}

.form-inner {
    width: 100%;
    max-width: 360px;
}

/* Left: Brand Panel */
.brand-panel {
    flex: 1;
    background: linear-gradient(150deg, #6b1c21 0%, #87252B 45%, #9e2d34 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 56px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

/* Brand content */
.brand-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 44px;
    position: relative;
    z-index: 1;
}

.brand-top-logo {
    width: 88px;
    height: 88px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-top-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-top-text {
    margin-top: 4px;
}

.brand-top-text h2 {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.brand-top-text p {
    font-size: 12px;
    opacity: .65;
    margin-top: 2px;
    letter-spacing: .5px;
}

.brand-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.brand-title span {
    display: block;
    font-size: 22px;
    font-weight: 600;
    opacity: .85;
    margin-top: 4px;
}

.brand-sub {
    font-size: 13px;
    opacity: .75;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    font-weight: 500;
    line-height: 1.8;
    padding-right: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    padding-right: 14px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.brand-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background .2s;
}

.brand-feat:hover {
    background: rgba(255, 255, 255, 0.12);
}

.brand-feat-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-feat-dot svg {
    width: 13px;
    height: 13px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-feat-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.brand-feat-text span {
    font-size: 11px;
    opacity: .7;
}

.brand-footer {
    margin-top: auto;
    padding-top: 48px;
    font-size: 11px;
    opacity: .5;
    position: relative;
    z-index: 1;
}

/* ── Form styles ── */
.form-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.form-logo-box {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform .2s, box-shadow .2s;
}

.form-logo-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.form-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.form-logo-sep {
    color: #d1d5db;
    font-size: 20px;
}

.form-heading {
    text-align: center;
    margin-bottom: 28px;
}

.form-heading h1 {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.form-heading p {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.inp {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.inp:focus {
    border-color: #87252B;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(135, 37, 43, 0.08);
}

.inp::placeholder {
    color: #c4c9d4;
}

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

.btn-login {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    background: #87252B;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, box-shadow .2s, transform .1s;
}

.btn-login:hover {
    background: #6b1c21;
    box-shadow: 0 4px 14px rgba(135, 37, 43, 0.3);
}

.btn-login:active {
    transform: scale(.99);
}

.alert-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 14px;
}

.alert-ok {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 14px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: #9ca3af;
}

.form-footer a {
    color: #87252B;
    text-decoration: none;
    font-weight: 600;
}

.brand-footer-link {
    opacity: .8;
}

.spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}

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

/* ── Responsive ── */
@media(max-width:768px) {
    .brand-panel {
        display: none;
    }

    .form-panel {
        flex: 1;
        padding: 32px 24px;
        min-width: 0;
    }
}

@media(max-width:400px) {
    .form-panel {
        padding: 24px 18px;
    }
}