:root {
    --mgz-bg-1: #08090d;
    --mgz-bg-2: #121521;
    --mgz-panel: #10131d;
    --mgz-panel-soft: #171b27;
    --mgz-red: #df1f2d;
    --mgz-red-strong: #ff3141;
    --mgz-text: #f4f6fa;
    --mgz-muted: #a3a9bc;
    --mgz-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

.mgz-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--mgz-text);
    background:
        radial-gradient(circle at 10% 15%, rgba(223, 31, 45, 0.35), transparent 28%),
        radial-gradient(circle at 90% 80%, rgba(255, 49, 65, 0.14), transparent 36%),
        linear-gradient(140deg, var(--mgz-bg-1), var(--mgz-bg-2));
}

.mgz-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.mgz-auth-brand {
    position: relative;
    padding: clamp(2rem, 5vw, 5rem);
    border-right: 1px solid var(--mgz-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mgz-auth-brand-glow {
    position: absolute;
    inset: 25% auto auto 30%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(223, 31, 45, 0.4) 0%, rgba(223, 31, 45, 0) 70%);
    filter: blur(10px);
    pointer-events: none;
}

.mgz-auth-logo-wrap {
    position: relative;
    width: clamp(84px, 14vw, 148px);
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    padding: 0.9rem;
    background: linear-gradient(160deg, #1a1f2d, #0f121a);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
    z-index: 2;
}

.mgz-auth-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(223, 31, 45, 0.4));
}

.mgz-auth-eyebrow {
    margin: 0 0 0.7rem;
    font-family: "Rajdhani", sans-serif;
    letter-spacing: 0.2em;
    color: var(--mgz-red-strong);
    font-size: 0.8rem;
}

.mgz-auth-brand h1 {
    margin: 0;
    max-width: 14ch;
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.02;
}

.mgz-auth-text {
    margin: 1.2rem 0 1.6rem;
    max-width: 48ch;
    color: var(--mgz-muted);
}

.mgz-auth-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.mgz-auth-points li {
    position: relative;
    padding-left: 1.4rem;
    color: #d5d9e7;
}

.mgz-auth-points li::before {
    content: "";
    position: absolute;
    top: 0.48rem;
    left: 0;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 2px;
    background: linear-gradient(160deg, var(--mgz-red-strong), var(--mgz-red));
}

.mgz-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.2rem, 5vw, 3rem);
}

.mgz-auth-card {
    width: min(460px, 100%);
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.98), rgba(10, 12, 18, 0.96));
    border: 1px solid var(--mgz-border);
    border-radius: 24px;
    padding: clamp(1.3rem, 3.5vw, 2.2rem);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.mgz-auth-card-head h2 {
    margin: 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 2rem;
}

.mgz-auth-card-head p {
    margin: 0.4rem 0 0;
    color: var(--mgz-muted);
}

.mgz-auth-form {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.mgz-auth-field {
    display: grid;
    gap: 0.5rem;
}

.mgz-auth-field span {
    font-size: 0.9rem;
    color: #d8dced;
}

.mgz-auth-field input {
    border: 1px solid var(--mgz-border);
    background: var(--mgz-panel-soft);
    color: var(--mgz-text);
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mgz-auth-field input:focus {
    border-color: rgba(223, 31, 45, 0.8);
    box-shadow: 0 0 0 3px rgba(223, 31, 45, 0.18);
}

.mgz-auth-field small {
    color: #ff8089;
}

.mgz-auth-check {
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--mgz-muted);
}

.mgz-auth-submit {
    border: 0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    background: linear-gradient(160deg, var(--mgz-red), var(--mgz-red-strong));
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mgz-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(223, 31, 45, 0.35);
}

.mgz-auth-alert {
    margin-top: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(223, 31, 45, 0.4);
    background: rgba(223, 31, 45, 0.13);
    color: #ffc8cd;
    padding: 0.7rem 0.8rem;
}

.mgz-auth-copy {
    margin: 1.4rem 0 0;
    color: var(--mgz-muted);
    font-size: 0.8rem;
    text-align: center;
}

/* ── Passkey button ─────────────────────────────────────────── */
.mgz-auth-passkey-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.72rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: var(--mgz-text);
    font-family: inherit;
    font-size: 0.93rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    margin-bottom: 0.6rem;
}
.mgz-auth-passkey-btn:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.22);
}
.mgz-auth-passkey-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Divider "o" ────────────────────────────────────────────── */
.mgz-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.8rem 0;
    color: var(--mgz-muted);
    font-size: 0.8rem;
}
.mgz-auth-divider::before,
.mgz-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mgz-border);
}

/* ── Error alert in auth ────────────────────────────────────── */
.mgz-auth-alert-error {
    background: rgba(223,31,45,0.12);
    border-left: 3px solid var(--mgz-red);
    color: #ff7b85;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
}

@media (max-width: 980px) {
    .mgz-auth-shell {
        grid-template-columns: 1fr;
    }

    .mgz-auth-brand {
        border-right: 0;
        border-bottom: 1px solid var(--mgz-border);
        padding-bottom: 2.2rem;
    }

    .mgz-auth-brand h1 {
        max-width: none;
    }
}
