﻿:root {
    --navy: #0b2a4a;
    --navy-deep: #07203a;
    --teal: #00788a;
    --teal-dark: #006171;
    --gold: #c9a24d;
    --ink: #1b2b3d;
    --muted: #5f7186;
    --line: #d9e1ea;
    --page: #f3f6f9;
    --white: #ffffff;
    --danger: #c0392b;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Manrope', 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}

.shell {
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

/* ---------- Brand panel ---------- */
.brand-panel {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
    padding: 56px 56px 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .brand-panel::before {
        content: "";
        position: absolute;
        right: -140px;
        bottom: -160px;
        width: 420px;
        height: 520px;
        background: var(--teal);
        opacity: .35;
        border-radius: 48% 48% 0 0 / 30% 30% 0 0;
        transform: rotate(-14deg);
        pointer-events: none;
    }

    .brand-panel::after {
        content: "";
        position: absolute;
        left: 56px;
        top: 0;
        width: 6px;
        height: 72px;
        background: var(--gold);
        border-radius: 0 0 6px 6px;
    }

.brand-inner {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.brand-panel h2 {
    margin: 0 0 14px;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.01em;
}

.brand-panel p {
    margin: 0 0 28px;
    color: #b9c8d8;
    font-size: 1rem;
    line-height: 1.6;
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

    .steps li {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
        background: rgba(255, 255, 255, .07);
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 10px;
        font-size: .92rem;
        line-height: 1.45;
    }

    .steps svg {
        flex: none;
        width: 20px;
        height: 20px;
        margin-top: 1px;
        stroke: var(--gold);
    }

/* ---------- Form panel ---------- */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 88px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 40px 36px 36px;
    box-shadow: 0 18px 40px -22px rgba(11, 42, 74, .35);
}

.logo {
    display: block;
    width: 100%;
    max-width: 230px;
    height: auto;
    margin: 0 0 28px;
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--navy);
}

.login-card .sub {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.5;
}

.field {
    margin-bottom: 18px;
}

    .field label {
        display: block;
        margin-bottom: 6px;
        font-size: .85rem;
        font-weight: 700;
        color: var(--navy);
    }

.input-wrap {
    position: relative;
}

    .input-wrap svg.lead {
        position: absolute;
        left: 14px;
        top: 50%;
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        stroke: var(--muted);
        pointer-events: none;
    }

    .input-wrap input.form-input {
        width: 100%;
        height: 50px;
        padding: 0 16px 0 44px;
        font: inherit;
        font-size: 1rem;
        color: var(--ink);
        background: #fbfcfd;
        border: 1.5px solid var(--line);
        border-radius: 10px;
        outline: none;
        transition: border-color .15s, box-shadow .15s, background .15s;
    }

        .input-wrap input.form-input::placeholder {
            color: #9aa9b9;
        }

        .input-wrap input.form-input:focus {
            background: var(--white);
            border-color: var(--teal);
            box-shadow: 0 0 0 4px rgba(0, 120, 138, .15);
        }

    .input-wrap input.input-validation-error {
        border-color: var(--danger);
    }

.field-validation-error, .text-danger {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    color: var(--danger) !important;
}

.btn-signin {
    width: 100%;
    height: 52px;
    margin-top: 6px;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: var(--teal);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, transform .05s;
}

    .btn-signin:hover {
        background: var(--teal-dark);
    }

    .btn-signin:active {
        transform: translateY(1px);
    }

    .btn-signin:disabled {
        opacity: .7;
        cursor: default;
    }

    .btn-signin:focus-visible {
        outline: 3px solid rgba(201, 162, 77, .7);
        outline-offset: 2px;
    }

.help-row {
    margin-top: 20px;
    text-align: center;
    font-size: .9rem;
}

    .help-row a {
        color: var(--teal);
        font-weight: 600;
        text-decoration: none;
    }

        .help-row a:hover {
            text-decoration: underline;
        }

/* ---------- Loader ---------- */
#loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(243, 246, 249, .88);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--navy);
    font-weight: 600;
}

    #loader .spinner {
        width: 46px;
        height: 46px;
        border: 5px solid var(--line);
        border-top-color: var(--teal);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Footer ---------- */
.login-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: .78rem;
    color: #d5e0ec;
    background: var(--navy-deep);
}

    .login-footer strong {
        color: var(--gold);
    }

    .login-footer a {
        color: #6fd3e2;
        text-decoration: none;
    }

        .login-footer a:hover {
            text-decoration: underline;
        }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        padding: 28px 24px;
    }

        .brand-panel::after {
            left: 24px;
            height: 40px;
        }

        .brand-panel::before {
            opacity: .25;
            width: 260px;
            height: 320px;
            right: -90px;
            bottom: -150px;
        }

        .brand-panel h2 {
            font-size: 1.35rem;
            margin-bottom: 6px;
        }

        .brand-panel p {
            margin-bottom: 0;
            font-size: .92rem;
        }

    .steps {
        display: none;
    }

    .form-panel {
        align-items: flex-start;
        padding: 28px 16px 84px;
    }

    .login-card {
        margin-top: -8px;
    }
}

@media (max-width: 479.98px) {
    .login-card {
        padding: 28px 20px 26px;
        border-radius: 14px;
    }

    .logo {
        max-width: 190px;
        margin-bottom: 22px;
    }

    .login-footer {
        font-size: .72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }

    #loader .spinner {
        animation-duration: 2.5s;
    }
}
