* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: #f2f4f0;
    background:
        radial-gradient(circle at 18% 12%, rgba(40, 201, 151, 0.18), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(85, 118, 106, 0.16), transparent 32%),
        linear-gradient(135deg, #111412 0%, #171b19 46%, #0f1211 100%);
    font-family: "DM Sans", "Open Sans", sans-serif;
    overflow-x: hidden;
}

.login-shell {
    width: min(440px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 0;
}

.login-shell-wide {
    width: min(480px, calc(100% - 32px));
}

.login-panel {
    position: relative;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(18, 19, 24, 0.74);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
}

.brand-mark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 42px;
    font-family: "Space Mono", monospace;
    font-size: 1.05rem;
    letter-spacing: 0;
    line-height: 1.05;
}

.brand-mark span {
    color: #fff;
    font-weight: 700;
}

.brand-mark strong {
    color: #00d1a0;
    font-weight: 700;
    font-size: 0.86rem;
}

.login-copy {
    margin-bottom: 30px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: #00d1a0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-copy h1 {
    margin: 10px 0 10px;
    font-size: 2.35rem;
    line-height: 1;
    letter-spacing: 0;
}

.login-copy p {
    margin: 0;
    max-width: 32ch;
    color: #a9b0bf;
    font-size: 1rem;
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 108, 108, 0.32);
    border-radius: 8px;
    background: rgba(255, 108, 108, 0.1);
    color: #ffd5d5;
    font-size: 0.9rem;
}

.field {
    position: relative;
    display: grid;
    gap: 8px;
}

.field span {
    color: #c9d0dc;
    font-size: 0.84rem;
    font-weight: 700;
}

.field i {
    position: absolute;
    left: 15px;
    bottom: 15px;
    color: #677083;
    font-size: 0.92rem;
    pointer-events: none;
}

.field input {
    width: 100%;
    height: 48px;
    padding: 0 15px 0 43px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    outline: none;
    color: #f3f7fb;
    background: rgba(255, 255, 255, 0.055);
    font: inherit;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
    border-color: rgba(0, 209, 160, 0.75);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 209, 160, 0.12);
}

.code-input {
    font-family: "Space Mono", monospace !important;
    font-size: 1.15rem !important;
    letter-spacing: 0.18em;
}

.qr-box {
    width: 238px;
    height: 238px;
    margin: 0 auto 18px;
    padding: 9px;
    border-radius: 8px;
    background: #f8faf8;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.qr-box svg {
    display: block;
    width: 100%;
    height: 100%;
}

.manual-secret {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.manual-secret span {
    color: #8994a4;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.manual-secret code {
    color: #dfe8e4;
    font-family: "Space Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.login-button {
    height: 50px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    color: #07110f;
    background: linear-gradient(135deg, #00d1a0, #90f2c2);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 42px rgba(0, 209, 160, 0.2);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 52px rgba(0, 209, 160, 0.25);
}

@media (max-width: 900px) {
    .login-shell {
        width: min(460px, calc(100% - 28px));
    }
}

@media (max-width: 520px) {
    .login-panel {
        padding: 26px;
    }

    .login-copy h1 {
        font-size: 1.9rem;
    }
}
