:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --background: #080e10;
    --card: #10191f;
    --input: #15232c;
    --border: #29404d;
    --text: #ffffff;
    --muted: #b1b4b8;
    --accent: #ffffff;
    --brand-navy: #010c83;
    --brand-navy-hover: #0718a6;
    --danger: #f28b8b;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 13% 8%, rgba(1, 12, 131, .38), transparent 35rem),
        radial-gradient(circle at 88% 85%, rgba(1, 12, 131, .22), transparent 34rem),
        var(--background);
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    
}

.page {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    padding: 2rem 1rem 5rem;
    place-items: center;
}

.card {
    width: min(100%, 28rem);
    padding: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(16, 25, 31, .97);
    box-shadow: 0 26px 80px -24px rgba(0, 0, 0, .9);
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 700;
}

.logo {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .65rem;
    place-items: center;
    background: var(--brand-navy) url("/assets/octaweb-mark.svg") center / cover no-repeat;
    box-shadow: 0 8px 26px rgba(1, 12, 131, .38);
    font-size: 0;
}

.logo svg {
    display: none;
}

.heading {
    margin: 2rem 0 1.75rem;
}

.eyebrow {
    color: var(--accent);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h1 {
    margin: .65rem 0 0;
    font-size: 1.9rem;
    letter-spacing: -.045em;
    line-height: 1.15;
}

.heading p {
    margin: .7rem 0 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.55;
}

.alert {
    margin-bottom: 1.25rem;
    padding: .8rem .9rem;
    border: 1px solid rgba(242, 90, 90, .35);
    border-radius: .75rem;
    color: var(--danger);
    background: rgba(242, 90, 90, .09);
    font-size: .8rem;
    line-height: 1.45;
}

form {
    display: grid;
    gap: 1.15rem;
}

.field {
    display: grid;
    align-content: start;
    gap: .48rem;
}

.field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

label {
    font-size: .81rem;
    font-weight: 600;
}

a {
    color: var(--accent);
    font-size: .76rem;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

input,
textarea {
    width: 100%;
    padding: 0 .8rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    outline: none;
    color: var(--text);
    background: var(--input);
    font: inherit;
    font-size: .86rem;
}

input {
    height: 2.75rem;
}

textarea {
    min-height: 6.5rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
    line-height: 1.5;
    resize: vertical;
}

select {
    width: 100%;
    height: 2.75rem;
    padding: 0 .8rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    outline: none;
    color: var(--text);
    background: var(--input);
    font: inherit;
    font-size: .86rem;
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .13);
}

input::placeholder,
textarea::placeholder {
    color: #7f8d95;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .13);
}

.password {
    position: relative;
}

.password input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .45rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: .5rem;
    place-items: center;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.password-toggle svg {
    width: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.submit {
    display: grid;
    height: 2.75rem;
    margin-top: .35rem;
    border: 0;
    border-radius: .75rem;
    color: #fff;
    background: var(--brand-navy);
    box-shadow: 0 9px 28px -12px rgba(1, 12, 131, .9);
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    place-items: center;
    text-decoration: none;
}

.submit:hover {
    background: var(--brand-navy-hover);
}

.trust {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid #22343e;
    color: #89969d;
    font-size: .69rem;
    line-height: 1.5;
}

.handoff-card {
    text-align: center;
}

.handoff-card .brand {
    justify-content: center;
}

.spinner {
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: #fff;
    border-radius: 999px;
    animation: spin .8s linear infinite;
}

.continue-link {
    color: #fff;
}

.continue-link:hover {
    color: #fff;
    text-decoration: none;
}

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

footer {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    display: flex;
    width: max-content;
    justify-content: center;
    gap: .8rem;
    color: #7f8d95;
    font-size: .68rem;
    text-align: center;
    transform: translateX(-50%);
}

footer a {
    color: inherit;
    font-size: inherit;
}

@media (max-width: 520px) {
    .page {
        align-items: start;
        padding: 1rem .85rem 5rem;
    }

    .card {
        padding: 1.5rem;
    }
}

.card-wide {
    width: min(100%, 36rem);
}

.method-grid {
    display: grid;
    gap: .8rem;
}

.method-option {
    display: flex;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .8rem;
    background: var(--input);
    cursor: pointer;
}

.method-option:has(input:checked) {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .1);
}

.method-option input {
    width: 1rem;
    height: 1rem;
    margin-top: .15rem;
    accent-color: var(--brand-navy);
}

.method-copy {
    display: grid;
    gap: .35rem;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.4;
}

.method-title {
    color: var(--text);
    font-size: .88rem;
    font-weight: 600;
}

.method-title strong {
    margin-left: .35rem;
    padding: .2rem .4rem;
    border-radius: 999px;
    color: #fff;
    background: var(--brand-navy);
    font-size: .58rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.method-copy small,
.field small {
    color: #7f8d95;
    font-size: .68rem;
}

.notice {
    margin-bottom: 1.2rem;
    padding: .8rem .9rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .75rem;
    color: #fff;
    background: rgba(1, 12, 131, .28);
    font-size: .75rem;
    line-height: 1.5;
}

.qr-box {
    display: grid;
    width: 232px;
    height: 232px;
    margin: 0 auto 1rem;
    border-radius: .8rem;
    place-items: center;
    background: #fff;
}

.manual-key {
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: .75rem;
}

.manual-key summary {
    color: var(--accent);
    cursor: pointer;
}

.manual-key code {
    display: block;
    margin-top: .45rem;
    overflow-wrap: anywhere;
    color: var(--text);
    letter-spacing: .08em;
}

.code-input {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .18em;
}

.back-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
}

.recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .55rem;
    margin-bottom: 1.25rem;
}

.recovery-grid code {
    padding: .65rem;
    border: 1px solid var(--border);
    border-radius: .5rem;
    color: #fff;
    background: var(--input);
    text-align: center;
    letter-spacing: .06em;
}

.registration-card h2 {
    margin: .7rem 0 0;
    font-size: .85rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 1rem;
}

.optional {
    color: var(--muted);
    font-size: .65rem;
    font-weight: 400;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.45;
}

.check-row input {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin-top: .1rem;
    accent-color: var(--brand-navy);
}

.honeypot {
    position: absolute;
    left: -10000px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
