:root {
    --auth-card-width: 420px;

    /* posição da caixa */
    --auth-move-x: 0px;
    --auth-move-y: 0px;

    /* tamanho / compactação */
    --auth-padding-x: 24px;
    --auth-padding-y: 20px;
    --auth-field-gap: 9px;
    --auth-input-height: 42px;

    --auth-title-size: 25px;
    --auth-subtitle-size: 13px;
    --auth-label-size: 12px;
    --auth-input-size: 14px;
    --auth-button-height: 43px;

    --bg-main: #050816;
    --bg-secondary: #080d1c;
    --bg-card: #10172b;
    --bg-input: #0b1123;

    --purple: #8a2cff;
    --pink: #d93cff;
    --blue: #167cff;
    --cyan: #39d5ff;

    --white: #f5f7ff;
    --text-soft: #aeb8d3;
    --text-muted: #707b99;

    --green: #22c55e;
    --yellow: #f59e0b;
    --red: #ef4444;

    --border: rgba(255,255,255,.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-page {
    min-height: 100svh;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--white);
    background:
        radial-gradient(circle at 18% 15%, rgba(138,44,255,.16), transparent 32%),
        radial-gradient(circle at 82% 80%, rgba(22,124,255,.14), transparent 34%),
        var(--bg-main);
}

.auth-card {
    width: min(100%, var(--auth-card-width));
    padding: var(--auth-padding-y) var(--auth-padding-x);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(16,23,43,.96);
    box-shadow: 0 25px 70px rgba(0,0,0,.42);
    transform: translate(var(--auth-move-x), var(--auth-move-y));
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 10px;
}

.auth-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 17px;
    background: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
    box-shadow: 0 0 22px rgba(138,44,255,.28);
}

.auth-brand-name {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #c7b2ff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-card h1 {
    margin: 0;
    text-align: center;
    font-size: var(--auth-title-size);
    line-height: 1.12;
}

.auth-subtitle {
    margin: 7px 0 14px;
    text-align: center;
    color: var(--text-soft);
    font-size: var(--auth-subtitle-size);
    line-height: 1.35;
}

.auth-form {
    display: grid;
    gap: var(--auth-field-gap);
}

.auth-field {
    display: grid;
    gap: 5px;
}

.auth-field label {
    color: #dbe3f8;
    font-size: var(--auth-label-size);
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    height: var(--auth-input-height);
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    outline: none;
    background: var(--bg-input);
    color: var(--white);
    font-size: var(--auth-input-size);
    transition: .18s ease;
}

.auth-field input:focus {
    border-color: rgba(57,213,255,.7);
    box-shadow: 0 0 0 3px rgba(57,213,255,.08);
}

.auth-button {
    width: 100%;
    height: var(--auth-button-height);
    margin-top: 4px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    box-shadow: 0 12px 28px rgba(22,124,255,.19);
}

.auth-button:hover {
    filter: brightness(1.08);
}

.auth-links {
    margin-top: 12px;
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.auth-links a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 700;
}

.auth-alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
}

.auth-alert.error {
    color: #fecaca;
    background: rgba(239,68,68,.11);
    border: 1px solid rgba(239,68,68,.24);
}

.auth-alert.success {
    color: #bbf7d0;
    background: rgba(34,197,94,.10);
    border: 1px solid rgba(34,197,94,.24);
}

.auth-alert.warning {
    color: #fde68a;
    background: rgba(245,158,11,.10);
    border: 1px solid rgba(245,158,11,.24);
}

.auth-message {
    text-align: center;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.6;
}

.auth-message strong {
    color: var(--white);
}

.auth-email {
    display: block;
    margin: 10px 0;
    color: var(--cyan);
    font-weight: 800;
    word-break: break-word;
}

.auth-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    margin-top: 10px;
    border: 1px solid rgba(57,213,255,.25);
    border-radius: 11px;
    color: var(--cyan);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    background: rgba(57,213,255,.05);
}

/* celular */
@media (max-width: 560px) {
    :root {
        --auth-card-width: 100%;
        --auth-padding-x: 18px;
        --auth-padding-y: 16px;
        --auth-field-gap: 8px;
        --auth-input-height: 40px;
        --auth-button-height: 41px;
        --auth-title-size: 22px;
    }

    body.auth-page {
        align-items: flex-start;
        padding: 8px;
    }

    .auth-card {
        margin-top: 5px;
        border-radius: 17px;
    }

    .auth-brand {
        margin-bottom: 7px;
    }

    .auth-brand-icon {
        width: 32px;
        height: 32px;
    }

    .auth-subtitle {
        margin: 5px 0 11px;
    }
}

/* celular com tela baixa */
@media (max-height: 700px) and (max-width: 560px) {
    :root {
        --auth-padding-y: 12px;
        --auth-field-gap: 6px;
        --auth-input-height: 38px;
        --auth-button-height: 39px;
        --auth-title-size: 20px;
    }

    body.auth-page {
        padding-top: 5px;
    }

    .auth-brand {
        margin-bottom: 5px;
    }

    .auth-subtitle {
        margin-bottom: 8px;
    }
}
