:root {
    color-scheme: light;
    --ink: #172335;
    --muted: #607083;
    --line: #dce4ea;
    --surface: #ffffff;
    --background: #eef3f6;
    --accent: #1d7a68;
    --accent-dark: #115a4d;
    --error: #a83232;
    --success: #176b43;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background: linear-gradient(145deg, #e8f1ef, var(--background) 46%, #edf0f7);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 18px;
}

.card {
    width: min(760px, 100%);
    padding: clamp(26px, 5vw, 54px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(23, 35, 53, 0.13);
}

.brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 15px;
    background: var(--ink);
    color: white;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.eyebrow {
    margin: 24px 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.logo {
    max-height:45px;
    width:auto;
}

h1 {
    margin: 0;
    margin-top:15px;
    font-size: clamp(2rem, 5vw, 3.25rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.intro {
    max-width: 64ch;
    margin: 20px 0 24px;
    color: var(--muted);
}

.status {
    margin: 24px 0;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 650;
}

.status-loading,
.status-ready {
    background: #edf7f4;
    color: var(--accent-dark);
}

.status-error {
    background: #fff0f0;
    color: var(--error);
}

.status-success {
    background: #eaf7f0;
    color: var(--success);
}

form {
    display: grid;
    gap: 19px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 700;
}

label small {
    color: var(--muted);
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfd;
    color: var(--ink);
    font: inherit;
    font-weight: 450;
    outline: none;
    padding: 12px 13px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

textarea {
    min-height: 118px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 122, 104, 0.13);
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input {
    padding-right: 88px;
}

.text-button {
    position: absolute;
    top: 50%;
    right: 10px;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    transform: translateY(-50%);
}

.confirmation {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    color: var(--muted);
    font-weight: 500;
}

.confirmation input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}

.primary-button {
    min-height: 50px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: background 120ms ease, transform 120ms ease;
}

.primary-button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.fine-print,
.security-note {
    color: var(--muted);
    font-size: 0.82rem;
}

.fine-print {
    margin: 0;
}

.security-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 18px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.security-note strong {
    color: var(--accent-dark);
}

#fingerprint {
    overflow-wrap: anywhere;
}

[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .shell {
        align-items: start;
        padding: 0;
    }

    .card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }
}
