:root {
    color-scheme: light;
    --text: #0f172a;
    --muted: #64748b;
    --border: #cbd5e1;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f8fafc;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-shell {
    align-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.18), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.14), transparent 24%),
        linear-gradient(135deg, #f8fafc 0%, #eef6ff 46%, #f8fafc 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 32px 16px;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.13);
    max-width: 430px;
    overflow: hidden;
    padding: 30px;
    position: relative;
    width: 100%;
}

.login-card::before,
.login-card::after {
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
}

.login-card::before {
    background: linear-gradient(90deg, #2563eb, #0ea5e9, #10b981);
    top: 0;
}

.login-card::after {
    background: linear-gradient(90deg, #0f766e, #f59e0b);
    bottom: 0;
    opacity: 0.92;
}

.login-header {
    margin-bottom: 24px;
}

h1 {
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    min-height: 40px;
    padding: 9px 12px;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
    outline: none;
}

button {
    background: var(--primary);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 40px;
    padding: 9px 14px;
}

button:hover {
    background: var(--primary-dark);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.button-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.secondary {
    background: #eef2f7;
    color: #334155;
}

.secondary:hover {
    background: #dfe6ef;
}

.message {
    background: #fee2e2;
    border-radius: 6px;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.message.info {
    background: #e8f2ff;
    color: #1d4f82;
}

.help {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

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

.qr-wrap {
    display: flex;
    justify-content: center;
    padding: 12px;
}

.qr-wrap canvas,
.qr-wrap svg {
    width: 220px;
    height: 220px;
}
