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

:root {
    --navy-950: #06182c;
    --navy-900: #0b2341;
    --navy-800: #12365f;
    --navy-700: #1a497a;
    --gold-500: #cf9b35;
    --gold-400: #dfaF56;
    --gold-100: #fbf4e6;
    --surface: #ffffff;
    --background: #eef3f8;
    --text: #142033;
    --muted: #758197;
    --border: #dce4ee;
    --danger-bg: #fff1f2;
    --danger-border: #fecdd3;
    --danger-text: #b42318;
    --shadow: 0 30px 80px rgba(7, 29, 53, 0.17);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Cairo", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 18%, rgba(207, 155, 53, 0.12), transparent 24%),
        radial-gradient(circle at 88% 82%, rgba(18, 54, 95, 0.12), transparent 26%),
        linear-gradient(135deg, #f8fafc 0%, var(--background) 100%);
}

button,
input {
    font: inherit;
}

svg {
    display: block;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(1080px, 100%);
    height: min(680px, calc(100vh - 48px));
    min-height: 600px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
    animation: shell-in 0.5s ease-out both;
}

.identity-panel {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(6, 24, 44, 0.98), rgba(18, 54, 95, 0.92)),
        url("/static/images/backgrounds/login-background.jpg") center/cover no-repeat;
}

.identity-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 20%, rgba(223, 175, 86, 0.25), transparent 25%),
        linear-gradient(180deg, transparent 50%, rgba(3, 15, 29, 0.36));
}

.identity-panel::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    top: -180px;
    left: -150px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.025),
        0 0 0 140px rgba(255, 255, 255, 0.018);
}

.identity-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 46px 50px 38px;
}

.company-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

.company-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(223, 175, 86, 0.42);
    border-radius: 16px;
    color: var(--gold-400);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
}

.company-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.company-mark strong,
.company-mark span {
    display: block;
}

.company-mark strong {
    margin-bottom: 2px;
    font-size: 16px;
    font-weight: 800;
}

.company-mark span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.identity-copy {
    max-width: 540px;
    margin-block: auto;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(223, 175, 86, 0.32);
    border-radius: 999px;
    color: #f3cb7f;
    background: rgba(207, 155, 53, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.identity-copy h1 {
    margin: 0;
    max-width: 560px;
    font-size: clamp(34px, 3.4vw, 50px);
    line-height: 1.45;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.identity-copy p {
    max-width: 500px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 2;
}

.identity-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #43c987;
    box-shadow: 0 0 0 5px rgba(67, 201, 135, 0.12);
}

.road-lines {
    position: absolute;
    z-index: 1;
    width: 460px;
    height: 460px;
    left: -220px;
    bottom: -300px;
    border: 2px solid rgba(223, 175, 86, 0.35);
    border-radius: 50%;
    box-shadow:
        0 0 0 28px rgba(223, 175, 86, 0.1),
        0 0 0 56px rgba(223, 175, 86, 0.05);
}

.form-panel {
    display: flex;
    align-items: center;
    padding: 44px 54px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
        radial-gradient(circle at 100% 0%, rgba(207, 155, 53, 0.1), transparent 35%);
}

.login-form {
    width: 100%;
    max-width: 390px;
    margin: auto;
}

.form-heading {
    margin-bottom: 30px;
}

.mobile-brand {
    display: none;
}

.system-label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-500);
    font-size: 12px;
    font-weight: 800;
}

.form-heading h2 {
    margin: 0;
    color: var(--navy-900);
    font-size: 34px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.form-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.alert-error {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid var(--danger-border);
    border-radius: 11px;
    color: var(--danger-text);
    background: var(--danger-bg);
    font-size: 12px;
    font-weight: 700;
}

.alert-error svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: #fbfcfe;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #a2adbd;
}

.input-wrapper input:hover {
    border-color: #cbd6e3;
    background: #ffffff;
}

.input-wrapper input:focus {
    border-color: var(--gold-500);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(207, 155, 53, 0.12);
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #7f8ca0;
    pointer-events: none;
}

.input-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toggle-password {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    color: #7d899a;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password:hover {
    color: var(--navy-900);
    background: #edf2f7;
}

.toggle-password svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-options {
    display: flex;
    align-items: center;
    margin: 1px 0 22px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--gold-500);
}

.login-button {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
    box-shadow: 0 14px 28px rgba(11, 35, 65, 0.2);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 18px 34px rgba(11, 35, 65, 0.26);
}

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

.login-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #edf1f5;
}

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #8994a5;
    font-size: 10px;
}

.separator {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #b7c0cc;
}

.creator {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    margin-top: 8px;
    direction: ltr;
    font-size: 11px;
}

.creator span {
    color: #8b96a6;
}

.creator strong {
    color: var(--gold-500);
    font-weight: 800;
}

@keyframes shell-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }

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

@media (max-width: 900px) {
    body {
        background: #f2f5f9;
    }

    .login-page {
        padding: 18px;
    }

    .login-shell {
        width: min(470px, 100%);
        height: auto;
        min-height: 0;
        display: block;
        border-radius: 24px;
    }

    .identity-panel {
        display: none;
    }

    .form-panel {
        padding: 38px 36px 30px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-bottom: 26px;
        color: var(--navy-900);
        font-size: 13px;
        font-weight: 800;
    }

    .mobile-brand-icon {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        color: var(--gold-500);
        background: var(--gold-100);
    }

    .mobile-brand-icon svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
}

@media (max-width: 520px) {
    .login-page {
        min-height: 100dvh;
        padding: 0;
    }

    .login-shell {
        width: 100%;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .form-panel {
        min-height: 100dvh;
        padding: 28px 22px 24px;
    }

    .form-heading h2 {
        font-size: 29px;
    }
}

@media (max-height: 700px) and (min-width: 901px) {
    .login-page {
        padding: 14px;
    }

    .login-shell {
        height: calc(100vh - 28px);
        min-height: 560px;
    }

    .identity-content {
        padding-block: 32px 28px;
    }

    .form-panel {
        padding-block: 28px;
    }

    .form-heading {
        margin-bottom: 22px;
    }

    .form-footer {
        margin-top: 22px;
    }
}
