:root {
    color-scheme: dark;
    --background: #102329;
    --card: #172f35;
    --card-border: #31525a;
    --text: #f4fafb;
    --muted: #b4c5c9;
    --accent: #56c7b7;
    --accent-strong: #78dcca;
    --danger: #ff9d9d;
    --input: #0d2025;
    --focus: #bcefe6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
    color: var(--text);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.login-card {
    width: min(360px, 100%);
    padding: 30px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--card);
    box-shadow: 0 18px 48px rgb(0 0 0 / 0.28);
}

.logo {
    display: block;
    width: min(230px, 82%);
    max-height: 62px;
    margin: 0 auto 22px;
    object-fit: contain;
}

.stack {
    display: grid;
    gap: 14px;
}

.hidden {
    display: none !important;
}

.title-block {
    display: grid;
    gap: 6px;
    text-align: center;
}

h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 650;
}

p {
    margin: 0;
}

.title-block p,
.setup-panel p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--input);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

input:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 2px rgb(188 239 230 / 0.16);
}

button {
    min-height: 38px;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.primary {
    background: var(--accent);
    color: #092024;
    font-weight: 650;
}

.primary:focus,
.primary:hover {
    background: var(--accent-strong);
}

.link-button {
    min-height: auto;
    padding: 2px 4px;
    background: transparent;
    color: var(--accent-strong);
}

.link-button:hover {
    text-decoration: underline;
}

.message {
    min-height: 18px;
    margin: 14px 0 0;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.message.ok {
    color: var(--accent-strong);
}

.setup-panel {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 12px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: rgb(13 32 37 / 0.72);
    text-align: center;
}

.setup-panel img {
    width: 180px;
    height: 180px;
    border-radius: 6px;
    background: white;
}

.setup-panel code {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--accent-strong);
    font-size: 12px;
}

.choice-list {
    display: grid;
    gap: 10px;
}

.choice-list button {
    min-height: 46px;
    border-color: var(--card-border);
    background: var(--input);
    color: var(--text);
    text-align: left;
}

.choice-list button:hover {
    border-color: var(--accent);
}

.choice-name {
    display: block;
    font-weight: 650;
}

.choice-detail {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.progress-line {
    height: 4px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
}

.progress-line::before {
    content: "";
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(240%); }
}

@media (max-width: 380px) {
    .login-card {
        padding: 24px 20px;
    }

    h1 {
        font-size: 17px;
    }
}
