:root {
    --page: #f5f6f8;
    --surface: #ffffff;
    --border: #e3e6ea;
    --separator: #edeff2;
    --text: #14181f;
    --secondary: #5c6673;
    --tertiary: #8b95a3;
    --accent: #1f5fbf;
    --accent-soft: #edf3fb;
    --alert: #c2410c;
    --alert-soft: #fff7ed;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

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

.auth-card {
    width: min(460px, 100%);
    padding: 28px 32px 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--separator);
    text-align: left;
}

.auth-brand img {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    object-fit: contain;
}

.auth-brand div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.auth-brand span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}

.auth-brand strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .01em;
}

.access-symbol {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 26px auto 18px;
    place-items: center;
    border: 1px solid #c8d6ea;
    border-radius: 50%;
    background: var(--accent-soft);
}

.access-symbol img {
    width: 44px;
    height: 52px;
    object-fit: contain;
}

.auth-kicker {
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .08em;
}

h1 {
    margin: 8px 0 22px;
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.token-label {
    display: block;
    margin-bottom: 12px;
    text-align: left;
}

.token-label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 500;
}

.token-input-wrap {
    position: relative;
}

.token-input-wrap input {
    width: 100%;
    height: 42px;
    padding: 0 92px 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    letter-spacing: .05em;
}

.token-input-wrap input:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent-soft);
}

.token-input-wrap button {
    position: absolute;
    top: 5px;
    right: 5px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 5px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.auth-action {
    width: 100%;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.auth-action:hover {
    border-color: #194f9f;
    background: #194f9f;
}

.auth-action:disabled {
    cursor: wait;
    opacity: .58;
}

.attempts-line {
    margin-top: 12px;
    color: var(--tertiary);
    font-size: 12px;
}

.attempts-line strong {
    color: var(--secondary);
}

.auth-message {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #fdba9a;
    border-radius: 6px;
    background: var(--alert-soft);
    color: var(--alert);
    font-size: 12px;
    line-height: 1.4;
}

.auth-message[hidden] {
    display: none;
}

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

    .auth-card {
        padding: 22px 20px 24px;
    }

    .auth-brand span {
        font-size: 10px;
    }
}
