:root {
    --bg: #0b0f12;
    --panel: #0f1316;
    --muted: #9aa0a6;
    --card-shadow: 0 10px 30px rgba(4, 6, 8, 0.7);
    --input-border: rgba(255, 255, 255, 0.04);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, #071014 0%, #0b0f12 100%);
    color: #dbe3e8;
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-root {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 22px;
    border-radius: 12px;
    width: 100%;
    box-shadow: var(--card-shadow);
}

.card.compact {
    padding: 14px;
    max-width: 420px
}

input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background: var(--panel);
    color: inherit;
    font-size: 15px;
    outline: none;
    transition: box-shadow .12s, border-color .12s
}

input::placeholder {
    color: rgba(219, 227, 232, 0.22)
}

input:focus {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.06)
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0
}

.error {
    margin-top: 8px;
    color: #ffb4b4;
    font-size: 13px;
    min-height: 18px
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 12px auto 0
}

.input-row input {
    flex: 1;
    border-radius: 10px 8px 8px 10px;
    padding-right: 12px
}

.connect-btn {
    width: 48px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted)
}

.connect-btn svg {
    display: block
}

.connect-btn:active {
    transform: translateY(1px)
}

.connect-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.01)
}

/* toast */
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #0a0d0f;
    color: #e6eef6;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px
}

.toast .spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: spin .9s linear infinite
}

.toast.success {
    background: #072318
}

.toast.error {
    background: #2b0b0b
}

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

@media (max-width:420px) {
    body {
        padding: 18px
    }

    .card {
        padding: 12px
    }
}