:root {
    --bg: #0b1020;
    --gradient-1: #2d84c6;
    --gradient-2: #7fc4ff;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --primary: #2d84c6;
    --primary-600: #2a74ad;
    --ring: rgba(45, 132, 198, .35);
    --shadow: 0 10px 25px rgba(18, 36, 68, .15);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1020;
        --surface: #10172a;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --shadow: 0 10px 25px rgba(0, 0, 0, .45);
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    color: var(--text);
    background:
        radial-gradient(60rem 60rem at -10% 120%, rgba(127, 196, 255, .18), transparent 60%),
        radial-gradient(60rem 60rem at 110% -20%, rgba(45, 132, 198, .18), transparent 60%),
        var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 32px);
}

.shell {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Two-column on large screens */
@media (min-width: 900px) {
    .shell {
        grid-template-columns: 1.2fr 1fr;
        gap: 32px;
        align-items: center;
    }
}

.brand {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    min-height: 260px;
    padding: clamp(20px, 4vw, 40px);
    background:
        radial-gradient(1200px 600px at -10% 110%, rgba(127, 196, 255, .28), transparent 60%),
        radial-gradient(800px 600px at 110% -10%, rgba(45, 132, 198, .28), transparent 60%),
        linear-gradient(135deg, #eaf4ff 0%, #f7fbff 30%, #ffffff 100%);
    box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
    .brand {
        background:
            radial-gradient(1200px 600px at -10% 110%, rgba(127, 196, 255, .14), transparent 60%),
            radial-gradient(800px 600px at 110% -10%, rgba(45, 132, 198, .14), transparent 60%),
            linear-gradient(135deg, #0f1a33 0%, #0b1426 100%);
    }
}

.brand__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: .2px;
    color: #0b5c8c;
}

@media (prefers-color-scheme: dark) {
    .brand__logo {
        color: #9fd1ff;
    }
}

.brand__logo svg {
    width: 28px;
    height: 28px;
}

.brand__content {
    margin-top: clamp(18px, 3vw, 28px);
    max-width: 54ch;
}

.brand__title {
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.15;
    margin: 0 0 8px;
}

.brand__subtitle {
    color: var(--muted);
    margin: 0 0 16px;
}

.brand__badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    border: 1px solid rgba(45, 132, 198, .35);
    color: #0b5c8c;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

@media (prefers-color-scheme: dark) {
    .chip {
        color: #9fd1ff;
        border-color: rgba(127, 196, 255, .35);
    }
}

.card {
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid rgba(12, 18, 36, .06);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card__title {
    font-size: clamp(22px, 2vw, 26px);
    margin: 0;
}

.card__link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.card__link:hover {
    text-decoration: underline;
}

.form {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

.label {
    font-size: 14px;
    font-weight: 600;
}

.control {
    position: relative;
}

.input {
    width: 100%;
    padding: 12px 14px;
    padding-right: 44px;
    border-radius: 12px;
    border: 1px solid #dbe3f0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.input::placeholder {
    color: #9aa7b6;
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

.toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 6px;
    border-radius: 10px;
    cursor: pointer;
}

.toggle-pass:focus-visible {
    outline: 3px solid var(--ring);
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    font-size: 14px;
    color: var(--muted);
}

.checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-600));
    color: #fff;
    transition: transform .04s ease, filter .15s ease;
    box-shadow: 0 8px 16px rgba(45, 132, 198, .25);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 3px solid var(--ring);
}

.divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    margin: 6px 0;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    background: rgba(148, 163, 184, .45);
}

.social {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

@media (min-width: 480px) {
    .social {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #dbe3f0;
    background: transparent;
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    width: 100%;
}

.sso:hover {
    background: rgba(13, 23, 45, .03);
}

.sso:focus-visible {
    outline: 3px solid var(--ring);
}

.footer {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 14px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Small “Mantis” logo used on mobile above form */
.logo-inline {
    display: none;
}

@media (max-width: 899px) {
    .logo-inline {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        color: var(--muted);
        font-weight: 700;
    }

    .brand {
        order: 2;
    }

    .card {
        order: 1;
    }
}