:root {
    --primary-color: #0f2d73;
    --secondary-color: #2346a1;
    --accent-color: #4f7cff;
    --light-color: #f6f8fd;
    --dark-color: #1f2433;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-color: #dbe1ef;
    --border-radius: 28px;
    --field-radius: 16px;
    --box-shadow: 0 30px 80px rgba(15, 45, 115, 0.16);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noor Arabic", sans-serif;
}

body {
    background:
        radial-gradient(circle at top right, rgba(79, 124, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #eef3ff 0%, #f9fbff 45%, #eef2fb 100%);
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
}

.login-shell {
    display: flex;
    min-height: min(820px, calc(100vh - 48px));
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: #fff;
}

.card {
    flex: 1;
    min-width: 0;
    background: white;
    padding: 0;
}

.login-card {
    max-width: 46%;
    padding: 88px 68px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.brand-card {
    min-width: 54%;
    background:
        radial-gradient(circle at center, rgba(91, 131, 255, 0.24), transparent 36%),
        linear-gradient(135deg, #11265d 0%, #18388c 52%, #11265d 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: right;
    padding: 68px 62px;
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: "";
    position: absolute;
    inset: -18% auto auto -12%;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    filter: blur(6px);
}

.brand-card::after {
    content: "";
    position: absolute;
    inset: auto -110px -110px auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.brand-card > * {
    position: relative;
    z-index: 1;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 18px 26px;
    box-shadow: 0 20px 50px rgba(8, 20, 55, 0.24);
    margin-bottom: 64px;
}

.logo {
    width: min(100%, 260px);
    height: auto;
    display: block;
}

.brand-copy {
    max-width: 540px;
}

.brand-kicker {
    display: inline-block;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.system-name {
    font-size: clamp(1.95rem, 2.4vw, 3.15rem);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 22px;
}

.system-description {
    font-size: 1.18rem;
    line-height: 1.9;
    opacity: 0.92;
    max-width: 500px;
}

.drop-ready {
    white-space: normal;
}

.drop-word {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, -160px, 0) rotateX(88deg) rotateZ(-10deg) scale(0.72);
    transform-origin: 50% 0;
    filter: blur(10px);
    text-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
    animation: word-drop-impact 1.2s cubic-bezier(0.18, 0.9, 0.22, 1) forwards;
    will-change: transform, opacity, filter;
}

.drop-soft {
    animation-duration: 0.95s;
    transform: translate3d(0, -90px, 0) rotateX(72deg) scale(0.88);
    filter: blur(6px);
}

.login-header {
    text-align: center;
    margin-bottom: 34px;
}

.login-title {
    font-size: clamp(1.8rem, 2.2vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 14px;
    line-height: 1.3;
}

.login-subtitle {
    color: #667085;
    font-size: 1.05rem;
    line-height: 1.9;
    max-width: 450px;
    margin: 0 auto;
}

.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.5s ease;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.16);
    border: 1px solid var(--warning-color);
    color: #856404;
}

.alert i {
    font-size: 1.2rem;
}

.close {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: auto;
    cursor: pointer;
    color: inherit;
}

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

.field-label {
    display: block;
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--field-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    min-height: 60px;
    box-shadow: 0 8px 22px rgba(15, 45, 115, 0.04);
}

.input-group:focus-within {
    border-color: rgba(35, 70, 161, 0.5);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.11);
}

.input-group-prepend {
    width: 60px;
    text-align: center;
    color: #73829f;
    font-size: 1rem;
}

.form-control {
    flex: 1;
    border: none;
    padding: 16px 0;
    background: transparent;
    font-size: 1rem;
    width: 100%;
    outline: none;
    color: var(--dark-color);
}

.form-control::placeholder {
    color: #a0a8b8;
}

.password-toggle {
    width: 56px;
    border: none;
    background: transparent;
    color: #73829f;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    min-height: 58px;
    box-shadow: 0 18px 34px rgba(15, 45, 115, 0.2);
}

.btn-primary:hover {
    background: #0c2257;
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(15, 45, 115, 0.26);
}

.login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.96rem;
    color: #6f7888;
}

.feature i {
    color: var(--primary-color);
}

.login-features {
    justify-content: center;
    margin-top: 30px;
}

.brand-features {
    display: grid;
    gap: 16px;
    margin-top: 40px;
    max-width: 520px;
}

.feature-light {
    color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 14px 18px;
    backdrop-filter: blur(6px);
}

.feature-light i {
    color: #fff;
}

@keyframes word-drop-impact {
    0% {
        opacity: 0;
        transform: translate3d(0, -180px, 0) rotateX(88deg) rotateZ(-10deg) scale(0.68);
        filter: blur(12px);
    }

    55% {
        opacity: 1;
        transform: translate3d(0, 18px, 0) rotateX(-18deg) rotateZ(1deg) scale(1.04);
        filter: blur(0);
    }

    72% {
        transform: translate3d(0, -9px, 0) rotateX(8deg) rotateZ(-1deg) scale(0.985);
    }

    86% {
        transform: translate3d(0, 4px, 0) rotateX(-3deg) scale(1.01);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotateX(0) rotateZ(0) scale(1);
        filter: blur(0);
        text-shadow: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .login-card {
        padding: 72px 42px 56px;
        max-width: 48%;
    }

    .brand-card {
        min-width: 52%;
        padding: 56px 42px;
    }
}

@media (max-width: 900px) {
    body {
        padding: 14px;
    }

    .login-shell {
        flex-direction: column;
        min-height: auto;
    }

    .brand-card {
        min-width: 100%;
        padding: 34px 22px;
        text-align: center;
        align-items: center;
    }

    .brand-copy {
        max-width: 100%;
    }

    .login-card {
        max-width: 100%;
        padding: 36px 22px 30px;
    }

    .brand-badge {
        margin-bottom: 28px;
        padding: 14px 18px;
    }

    .brand-features {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .logo {
        width: min(100%, 210px);
    }
}

@media (max-width: 480px) {
    .login-title {
        font-size: 1.5rem;
    }

    .drop-word {
        transform: translate3d(0, -110px, 0) rotateX(88deg) rotateZ(-10deg) scale(0.72);
    }

    .system-name {
        font-size: 2rem;
    }

    .system-description {
        font-size: 0.98rem;
    }

    .feature,
    .feature-light {
        font-size: 0.9rem;
    }
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}
