:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #080C10;
    color: #f7fbfc;
    --accent: #14d6df;
    --accent-deep: #079da7;
    --muted: #a5adb7;
    --line: rgba(171, 188, 197, 0.18);
    --panel: rgba(6, 14, 17, 0.68);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 18px;
    background: #080C10;
    color: #f7fbfc;
}

body::before {
    content: none;
}

.auth-shell {
    width: min(100%, 520px);
    min-height: auto;
    margin: 0 auto;
    padding: 72px 28px 56px;
}

.login-shell {
    width: min(100%, 426px);
    padding: 59px 23px 46px;
}

.login-shell .app-brand {
    gap: 15px;
    margin-bottom: 61px;
    font-size: 1.64rem;
    font-weight: 600;
}

.login-shell .app-brand img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 10px 23px rgba(20, 214, 223, 0.14));
}

.login-shell .hero-copy { margin-bottom: 28px; }

.login-shell .hero-copy h1 {
    font-size: 1.64rem;
    font-weight: 650;
}

.login-shell .hero-copy p {
    max-width: 558px;
    margin-top: 21px;
    font-size: 1.11rem;
}

.login-shell .security-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 28px;
    padding: 20px 21px;
    border-radius: 10px;
}

.login-shell .security-card h2 {
    margin-bottom: 8px;
    font-size: 1.07rem;
}

.login-shell .security-card p { font-size: 0.9rem; }

.login-shell .security-badge {
    width: 49px;
    height: 49px;
    border-radius: 15px;
}

.login-shell label {
    margin: 21px 0 10px;
    font-size: 0.86rem;
}

.login-shell .input-shell {
    min-height: 59px;
    border-radius: 10px;
}

.login-shell .input-shell:focus-within {
    box-shadow: 0 0 0 3px rgba(20, 214, 223, 0.13);
}

.login-shell input {
    height: 59px;
    padding: 0 20px 0 57px;
    font-size: 0.97rem;
}

.login-shell .field-icon {
    width: 23px;
    height: 23px;
}

.login-shell .field-icon { left: 20px; }

.login-shell button {
    gap: 13px;
    min-height: 61px;
    margin-top: 28px;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 0.97rem;
}

.login-shell .button-arrow {
    width: 23px;
    height: 23px;
}

.login-shell .notice {
    margin-bottom: 18px;
    padding: 11px 13px;
    border-radius: 10px;
}

.landing-shell {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 74px;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
}

.app-brand span {
    display: block;
    line-height: 1;
}

.app-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(20, 214, 223, 0.14));
}

.hero-copy { margin-bottom: 34px; }

.hero-copy h1 {
    margin: 0;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: 0;
}

.hero-copy h1 span {
    color: var(--accent);
    font-weight: 600;
}

.hero-copy p {
    max-width: 680px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1.5;
}

.security-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    margin: 0 0 34px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(8, 20, 24, 0.74), rgba(3, 9, 11, 0.56));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 60px rgba(0, 0, 0, 0.18);
}

.security-card h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.security-card p {
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.45;
}

.security-badge {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(20, 214, 223, 0.22), rgba(5, 92, 101, 0.18));
    color: var(--accent);
}

svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-stack { margin: 0; }

label {
    display: block;
    margin: 26px 0 12px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 780;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(5, 12, 15, 0.72);
    overflow: hidden;
}

.input-shell:focus-within {
    border-color: rgba(20, 214, 223, 0.72);
    box-shadow: 0 0 0 4px rgba(20, 214, 223, 0.13);
}

input {
    width: 100%;
    min-width: 0;
    height: 72px;
    border: 0;
    padding: 0 24px 0 70px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.18rem;
    outline: none;
}

input::placeholder { color: #9ca3ad; opacity: 1; }

.field-icon {
    position: absolute;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    color: #aeb5bf;
    pointer-events: none;
}

.field-icon { left: 24px; }

button,
.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    min-height: 74px;
    margin-top: 34px;
    border: 1px solid rgba(37, 231, 240, 0.5);
    border-radius: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #18d4dd 0%, #079aa3 100%);
    color: #000;
    font: inherit;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
}

button:hover,
.button:hover {
    background: linear-gradient(135deg, #39e5ec 0%, #0aaeb8 100%);
}

button:focus-visible,
.button:focus-visible,
.tier-actions a:focus-visible {
    outline: 3px solid rgba(20, 214, 223, 0.45);
    outline-offset: 4px;
}

.button-arrow {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

.notice {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 126, 126, 0.42);
    border-radius: 12px;
    background: rgba(70, 20, 24, 0.62);
    color: #ffdfe0;
    line-height: 1.45;
}

.footnote {
    margin: 20px 0 0;
    color: #83939b;
    font-size: 0.86rem;
    line-height: 1.45;
}

/* Existing post-login handoff and tier controls. */
.surface {
    width: min(100% - 32px, 520px);
    min-height: auto;
    margin: 48px auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    overflow: hidden;
}

.panel {
    min-width: 0;
    padding: 34px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--accent);
    color: #041413;
    font-weight: 850;
}

.success-mark { background: #9fe870; }

.eyebrow {
    margin: 0 0 4px;
    color: #8ea19d;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.1;
    letter-spacing: 0;
}

.lede {
    margin: 0 0 24px;
    color: #b9c8c4;
    line-height: 1.55;
}

.lede strong { color: #f7fbfa; }

.tier-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.tier-actions a {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(5, 12, 15, 0.72);
    color: #edf7f4;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
}

.tier-actions a:hover {
    border-color: var(--accent);
    background: rgba(16, 33, 35, 0.82);
}

.tier-actions small {
    color: #93a7a2;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
}

.tier-actions a[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.55;
}

.tier-update-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 9, 10, 0.78);
}

.tier-update-overlay[hidden] { display: none; }

.tier-update-dialog {
    width: min(100%, 380px);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #071012;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.tier-update-dialog h2 {
    margin: 16px 0 8px;
    font-size: 1.18rem;
    letter-spacing: 0;
}

.tier-update-dialog p {
    margin: 0;
    color: #b9c8c4;
    line-height: 1.5;
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(20, 214, 223, 0.24);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: tier-spin 0.75s linear infinite;
}

.spinner[hidden] { display: none; }

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

@media (min-width: 720px) {
    .auth-shell {
        width: min(100%, 520px);
        min-height: auto;
        padding: 34px 48px 38px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(3, 9, 11, 0.58);
        box-shadow: 0 32px 100px rgba(0, 0, 0, 0.38);
    }

    .app-brand {
        margin-bottom: 32px;
        font-size: 1.55rem;
    }

    .app-brand img {
        width: 50px;
        height: 50px;
    }

    .hero-copy { margin-bottom: 26px; }

    .hero-copy h1 { font-size: 1.55rem; }

    .hero-copy p {
        margin-top: 16px;
        font-size: 1.1rem;
    }

    .security-card {
        margin-bottom: 24px;
        padding: 18px 20px;
    }

    label { margin: 18px 0 9px; }

    .input-shell,
    input {
        height: 62px;
        min-height: 62px;
    }

    input { font-size: 1.12rem; }

    button,
    .button {
        min-height: 62px;
        margin-top: 24px;
        font-size: 1.12rem;
    }

    .login-shell {
        width: min(100%, 426px);
        padding: 28px 39px 31px;
        border-radius: 15px;
        box-shadow: 0 26px 82px rgba(0, 0, 0, 0.38);
    }

    .login-shell .app-brand {
        margin-bottom: 26px;
        font-size: 1.44rem;
    }

    .login-shell .app-brand img {
        width: 41px;
        height: 41px;
    }

    .login-shell .hero-copy { margin-bottom: 21px; }

    .login-shell .hero-copy h1 { font-size: 1.44rem; }

    .login-shell .hero-copy p {
        margin-top: 13px;
        font-size: 0.9rem;
    }

    .login-shell .security-card {
        margin-bottom: 20px;
        padding: 15px 16px;
    }

    .login-shell label { margin: 15px 0 7px; }

    .login-shell .input-shell,
    .login-shell input {
        height: 51px;
        min-height: 51px;
    }

    .login-shell input { font-size: 0.92rem; }

    .login-shell button {
        min-height: 51px;
        margin-top: 20px;
        font-size: 0.92rem;
    }
}

@media (min-width: 900px) {
    .auth-shell {
        width: min(100%, 520px);
        display: block;
        padding: 30px 42px 34px;
    }

    .landing-shell {
        width: min(100%, 520px);
    }

    .app-brand {
        margin-bottom: 32px;
        font-size: 1.6rem;
    }

    .app-brand img {
        width: 44px;
        height: 44px;
    }

    .hero-copy { margin-bottom: 26px; }

    .hero-copy h1 { font-size: 1.6rem; }

    .hero-copy p {
        margin-top: 14px;
        font-size: 1.05rem;
        line-height: 1.45;
    }

    .security-card {
        gap: 14px;
        margin-bottom: 18px;
        padding: 14px 16px;
    }

    .security-badge {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .security-card h2 {
        margin-bottom: 5px;
        font-size: 1.05rem;
    }

    .security-card p { font-size: 0.92rem; }

    label {
        margin: 12px 0 7px;
        font-size: 0.94rem;
    }

    .input-shell,
    input {
        height: 52px;
        min-height: 52px;
    }

    input { font-size: 1rem; }

    button,
    .button {
        min-height: 54px;
        margin-top: 18px;
        font-size: 1.02rem;
    }

    .login-shell {
        width: min(100%, 426px);
        padding: 25px 34px 28px;
    }

    .login-shell .app-brand {
        margin-bottom: 26px;
        font-size: 1.31rem;
    }

    .login-shell .app-brand img {
        width: 36px;
        height: 36px;
    }

    .login-shell .hero-copy { margin-bottom: 21px; }

    .login-shell .hero-copy h1 { font-size: 1.31rem; }

    .login-shell .hero-copy p {
        margin-top: 11px;
        font-size: 0.86rem;
    }

    .login-shell .security-card {
        gap: 11px;
        margin-bottom: 15px;
        padding: 11px 13px;
    }

    .login-shell .security-badge {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .login-shell .security-card h2 {
        margin-bottom: 4px;
        font-size: 0.86rem;
    }

    .login-shell .security-card p { font-size: 0.75rem; }

    .login-shell label {
        margin: 10px 0 6px;
        font-size: 0.77rem;
    }

    .login-shell .input-shell,
    .login-shell input {
        height: 43px;
        min-height: 43px;
    }

    .login-shell input { font-size: 0.82rem; }

    .login-shell button {
        min-height: 44px;
        margin-top: 15px;
        font-size: 0.84rem;
    }
}

@media (max-width: 600px) {
    .auth-shell { padding: 22px 22px 18px; }

    .app-brand {
        gap: 12px;
        margin-bottom: 30px;
        font-size: 1.24rem;
    }

    .app-brand img {
        width: 34px;
        height: 34px;
    }

    .hero-copy { margin-bottom: 22px; }

    .hero-copy h1 {
        font-size: 1.24rem;
        line-height: 1.12;
    }

    .hero-copy p {
        margin-top: 10px;
        font-size: 0.93rem;
        line-height: 1.38;
    }

    .security-card {
        gap: 12px;
        margin-bottom: 20px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .security-badge {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .security-card h2 {
        margin-bottom: 4px;
        font-size: 0.92rem;
    }

    .security-card p {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    label {
        margin: 10px 0 6px;
        font-size: 0.88rem;
    }

    .input-shell,
    input {
        height: 46px;
        min-height: 46px;
    }

    input {
        padding: 0 16px 0 48px;
        font-size: 0.96rem;
    }

    .field-icon {
        width: 22px;
        height: 22px;
    }

    .field-icon { left: 16px; }

    .form-stack { margin-top: 0; }

    button,
    .button {
        min-height: 50px;
        margin-top: 16px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .button-arrow {
        width: 22px;
        height: 22px;
    }

    .notice {
        margin-bottom: 14px;
        padding: 10px 12px;
        font-size: 0.88rem;
    }

    .tier-actions { grid-template-columns: 1fr; }

    .login-shell { padding: 18px 18px 15px; }

    .login-shell .app-brand {
        gap: 10px;
        margin-bottom: 25px;
        font-size: 1.02rem;
    }

    .login-shell .app-brand img {
        width: 28px;
        height: 28px;
    }

    .login-shell .hero-copy { margin-bottom: 18px; }

    .login-shell .hero-copy h1 { font-size: 1.02rem; }

    .login-shell .hero-copy p {
        margin-top: 8px;
        font-size: 0.76rem;
    }

    .login-shell .security-card {
        gap: 10px;
        margin-bottom: 16px;
        padding: 8px 11px;
        border-radius: 8px;
    }

    .login-shell .security-badge {
        width: 31px;
        height: 31px;
        border-radius: 10px;
    }

    .login-shell .security-card h2 { font-size: 0.75rem; }

    .login-shell .security-card p { font-size: 0.67rem; }

    .login-shell label {
        margin: 8px 0 5px;
        font-size: 0.72rem;
    }

    .login-shell .input-shell,
    .login-shell input {
        height: 38px;
        min-height: 38px;
    }

    .login-shell input {
        padding: 0 16px 0 39px;
        font-size: 0.79rem;
    }

    .login-shell .field-icon {
        width: 18px;
        height: 18px;
    }

    .login-shell .field-icon { left: 13px; }

    .login-shell button {
        min-height: 41px;
        margin-top: 13px;
        border-radius: 8px;
        font-size: 0.82rem;
    }

    .login-shell .button-arrow {
        width: 18px;
        height: 18px;
    }

    .login-shell .notice {
        margin-bottom: 11px;
        padding: 8px 10px;
        font-size: 0.72rem;
    }
}

@media (max-width: 360px) {
    .auth-shell { padding-inline: 18px; }
    .hero-copy h1 { font-size: 1.24rem; }
    .security-card { grid-template-columns: auto minmax(0, 1fr); }

    .login-shell { padding-inline: 15px; }
    .login-shell .hero-copy h1 { font-size: 1.02rem; }
}

@media (max-width: 600px) and (max-height: 700px) {
    .auth-shell { padding-block: 18px; }

    .app-brand {
        margin-bottom: 18px;
        font-size: 1.08rem;
    }

    .app-brand img {
        width: 30px;
        height: 30px;
    }

    .hero-copy { margin-bottom: 14px; }
    .hero-copy h1 { font-size: 1.08rem; }

    .hero-copy p {
        margin-top: 8px;
        font-size: 0.84rem;
    }

    .security-card {
        margin-bottom: 12px;
        padding: 10px 12px;
    }

    .security-badge {
        width: 32px;
        height: 32px;
    }

    .security-card h2 { font-size: 0.84rem; }
    .security-card p { font-size: 0.76rem; }

    label {
        margin: 9px 0 5px;
        font-size: 0.82rem;
    }

    .input-shell,
    input {
        height: 44px;
        min-height: 44px;
    }

    button,
    .button {
        min-height: 48px;
        margin-top: 14px;
    }

    .login-shell { padding-block: 15px; }

    .login-shell .app-brand {
        margin-bottom: 15px;
        font-size: 0.89rem;
    }

    .login-shell .app-brand img {
        width: 25px;
        height: 25px;
    }

    .login-shell .hero-copy { margin-bottom: 11px; }
    .login-shell .hero-copy h1 { font-size: 0.89rem; }

    .login-shell .hero-copy p {
        margin-top: 7px;
        font-size: 0.69rem;
    }

    .login-shell .security-card {
        margin-bottom: 10px;
        padding: 8px 10px;
    }

    .login-shell .security-badge {
        width: 26px;
        height: 26px;
    }

    .login-shell .security-card h2 { font-size: 0.69rem; }
    .login-shell .security-card p { font-size: 0.62rem; }

    .login-shell label {
        margin: 7px 0 4px;
        font-size: 0.67rem;
    }

    .login-shell .input-shell,
    .login-shell input {
        height: 36px;
        min-height: 36px;
    }

    .login-shell button {
        min-height: 39px;
        margin-top: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 1.5s; }
}
