:root {
    --auth-ink: #173b37;
    --auth-muted: #60736f;
    --auth-surface: #ffffff;
}

.auth-body {
    min-height: 100vh;
    margin: 0;
    color: var(--auth-ink);
    background: #eef4f2;
}

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

.auth-card {
    display: grid;
    grid-template-columns: minmax(320px, .95fr) minmax(440px, 1.05fr);
    width: min(1080px, 100%);
    min-height: 660px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--auth-surface);
    box-shadow: 0 28px 70px rgba(27, 68, 62, .14);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 64px;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(26, 82, 74, .92), rgba(18, 52, 48, .97)),
        url('../images/bg-1.jpg') center/cover;
}

.auth-brand-panel::before {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    content: '';
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.auth-brand-mark,
.auth-mobile-mark {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 15px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.auth-brand-panel h1 {
    margin-bottom: 20px;
    color: #fff;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
}

.auth-brand-panel p:last-child {
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: 17px;
    line-height: 1.65;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 56px 72px;
}

.auth-form-content {
    width: min(430px, 100%);
}

.auth-heading {
    margin-bottom: 32px;
}

.auth-heading h2 {
    margin-bottom: 10px;
    color: var(--auth-ink);
    font-size: 30px;
}

.auth-heading > p:last-child {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-eyebrow {
    margin-bottom: 8px;
    color: #2f6f68;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-mobile-mark {
    display: none;
    border-color: #2f6f68;
    color: #2f6f68;
}

.auth-form .form-label {
    color: #294e49;
    font-weight: 600;
}

.auth-form .form-control {
    min-height: 52px;
    border-color: #d7e2e0;
    border-radius: 10px;
    color: var(--auth-ink);
    font-size: 15px;
}

.auth-form .form-control:focus {
    border-color: #5aada1;
    box-shadow: 0 0 0 .2rem rgba(47, 111, 104, .13);
}

.auth-form .input-group .form-control {
    border-radius: 10px 0 0 10px;
}

.auth-password-toggle {
    border-color: #d7e2e0;
    border-radius: 0 10px 10px 0;
}

.auth-form .btn-primary,
.auth-form-content > form .btn-primary {
    border-color: #2f6f68;
    background: #2f6f68;
    border-radius: 10px;
}

.auth-form .btn-primary:hover,
.auth-form-content > form .btn-primary:hover {
    border-color: #245751;
    background: #245751;
}

.auth-security-note {
    margin: 28px 0 0;
    color: #60736f;
    font-size: 13px;
    text-align: center;
}
.auth-inline-link { color:#2f6f68; font-size:13px; font-weight:600; white-space:nowrap; }
.auth-inline-link:hover, .auth-security-note a:hover { color:#245751; }
.auth-security-note a { color:#52726d; }
.auth-form .form-check-label { color:#526a66; font-size:13px; }
.auth-form .form-check-input:checked { border-color:#2f6f68; background-color:#2f6f68; }

.auth-qr-wrap {
    display: flex;
    justify-content: center;
    margin: -12px 0 22px;
}

.auth-qr-wrap img {
    width: 220px;
    height: 220px;
    border-radius: 12px;
}

.auth-manual-secret {
    padding: 13px 15px;
    border: 1px solid #dbe6e4;
    border-radius: 10px;
    background: #f7faf9;
    color: var(--auth-muted);
}

.auth-manual-secret summary {
    cursor: pointer;
    color: #2f6f68;
    font-weight: 600;
}

.auth-manual-secret p {
    margin-top: 12px;
}

.auth-manual-secret code {
    word-break: break-all;
}

.auth-code-input {
    letter-spacing: .24em;
    text-align: center;
}

.recovery-code-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin: 20px 0;
}

.recovery-code-grid code {
    padding: 10px 8px;
    border: 1px solid #dbe6e4;
    border-radius: 8px;
    background: #f7faf9;
    color: #285f58;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 850px) {
    .auth-shell {
        padding: 20px;
    }

    .auth-card {
        display: block;
        min-height: auto;
        border-radius: 20px;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: calc(100vh - 40px);
        padding: 46px 34px;
    }

    .auth-mobile-mark {
        display: grid;
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .auth-shell {
        display: block;
        padding: 0;
        background: #fff;
    }

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

    .auth-form-panel {
        min-height: 100vh;
        padding: 34px 22px;
    }

    .auth-heading h2 {
        font-size: 27px;
    }

    .recovery-code-grid {
        grid-template-columns: 1fr;
    }
}
