* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
    font-family: 'Plus Jakarta Sans', 'Lexend Deca', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #edf2ef;
    color: #1a332b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-layout {
    width: 920px;
    max-width: 100%;
    min-height: 520px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 24px 60px -15px rgba(12, 36, 29, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
}

.auth-story {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    background: linear-gradient(165deg, #16342e 0%, #102420 100%);
    color: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #0f241e;
    border: 1.5px solid rgba(138, 227, 199, 0.35);
    overflow: hidden;
    flex-shrink: 0;
    padding: 4px;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #ffffff;
    line-height: 1.2;
}

.brand small {
    display: block;
    margin-top: 3px;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1.6px;
    color: #8da59d;
    text-transform: uppercase;
}

.auth-story-copy {
    display: flex;
    flex-direction: column;
}

.eyebrow {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #6bb69b;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.auth-story h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.auth-story p {
    margin: 18px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: #9bb2ab;
    font-weight: 400;
}

.auth-story-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-story-footer span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #c4d7d1;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.auth-card {
    min-width: 0;
    padding: 48px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-card-label {
    color: #728780;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #152e27;
    word-break: break-word;
}

p.sub {
    margin: 0 0 24px;
    color: #677e76;
    font-size: 12.5px;
    line-height: 1.55;
}

.lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #eef6f1;
    border: 1px solid #d9ebdf;
    margin-bottom: 20px;
    font-size: 19px;
    box-shadow: 0 1px 2px rgba(16, 40, 32, 0.04);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #1b352e;
    margin-bottom: 16px;
    text-align: left;
}

.field input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #d7e2dc;
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    color: #163029;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
    outline: none;
    border-color: #216a54;
    box-shadow: 0 0 0 3px rgba(33, 106, 84, 0.12);
}

.field input.passcode-input,
input[name="passcode"] {
    letter-spacing: 4px;
    font-size: 16px;
    font-weight: 600;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #5a7169;
    margin-top: 2px;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: #216a54;
    cursor: pointer;
    border-radius: 4px;
}

.primary {
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    background: #216a54;
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(33, 106, 84, 0.18);
}

.primary:hover {
    background: #195644;
}

.primary:active {
    transform: translateY(1px);
}

.error {
    background: #fdf2f0;
    border: 1px solid #f5cfc7;
    border-radius: 8px;
    color: #a2362c;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.error ul {
    margin: 0;
    padding-left: 16px;
}

.footer-link {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf2ee;
    color: #677e76;
    font-size: 11.5px;
    line-height: 1.6;
    text-align: left;
}

.footer-link a,
.footer-link button,
.footer-link .link-btn {
    color: #216a54;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}

.footer-link a:hover,
.footer-link button:hover,
.footer-link .link-btn:hover {
    text-decoration: underline;
    color: #174f3e;
}

:is(button, a, input):focus-visible {
    outline: 2px solid #216a54;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    body {
        padding: 14px;
        background: linear-gradient(180deg, #102420 0%, #edf2ef 42%, #edf2ef 100%);
    }
    .auth-layout {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 440px;
        border-radius: 20px;
        box-shadow: 0 16px 40px rgba(10, 32, 26, 0.15);
    }
    .auth-story {
        padding: 22px 24px;
        gap: 12px;
    }
    .auth-story-copy,
    .auth-story-footer {
        display: none;
    }
    .auth-card {
        padding: 28px 24px;
    }
    .field input {
        height: 46px;
        font-size: 15px;
    }
    .primary {
        min-height: 46px;
        font-size: 14px;
    }
}
