:root {
    --accent: #4f46e5;
    --fg: #111827;
    --card-w: min(460px, 92vw);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Arial;
    color: var(--fg)
}

.auth-wrap {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: auto;
}

.auth-card {
    width: var(--card-w);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
    padding: 28px 24px;
}

.h1 {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin: 4px 0 22px
}

.field {
    margin: 16px 0
}

.input-float {
    position: relative
}

.input-float .input {
    width: 100%;
    padding: 18px 48px 14px 16px;
    border: 1.6px solid #c7cfff;
    border-radius: 9999px;
    outline: none;
    background: #fff;
    color: var(--fg)
}

.input-float .input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15)
}

.input-float .input[disabled] {
    background: #fafafa;
    color: #6b7280;
    cursor: not-allowed
}

.input-float label {
    position: absolute;
    left: 14px;
    top: -7px;
    font-size: 12px;
    color: var(--accent);
    background: #fff;
    padding: 0 6px;
    border-radius: 6px;
    pointer-events: none;
    user-select: none
}

.eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer
}

.eye svg {
    width: 20px;
    height: 20px;
    color: #374151
}

.eye.danger svg {
    color: #ef4444;
}

.eye.danger:hover svg {
    color: #dc2626;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 10px
}

.btn {
    flex: 1;
    padding: 14px 16px;
    border: 0;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 700
}

.btn.primary {
    background: #111827;
    color: #fff
}

.btn.secondary {
    background: #eef2ff;
    color: #111827
}

.link {
    margin-top: 18px;
    text-align: center
}

.link a {
    color: #3b82f6;
    text-decoration: none
}

.link a:hover {
    text-decoration: underline
}

.toast {
    margin-top: 10px;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    display: none
}

.toast.ok {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0
}

.toast.err {
    display: block;
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid #fecaca
}