:root {
    --bg: #151618;
    /* slate-900 */
    --card: rgba(255, 255, 255, 0.08);
    --border: rgba(21, 8, 139, 0.493);
    --text: #0303a5;
    /* gray-200 */
    --muted: #94a3b8;
    /* slate-400 */
    --primary: #22c55e;
    /* green-500 */
    --primary-hover: #16a34a;
    /* green-600 */
    --danger: #ef4444;
    /* red-500 */
    --focus: #60a5fa;
    /* blue-400 */
    --white: #ffffff;
    --black: #000000;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, "Noto Sans", sans-serif;
    color: var(--text);
    /* background: radial-gradient(1000px 600px at 10% 10%, rgba(34, 64, 197, 0.15), transparent 40%),
        radial-gradient(700px 500px at 90% 20%, rgba(214, 219, 226, 0.18), transparent 45%),
        linear-gradient(180deg, #FCFCFC, var(--bg)); */
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 40px);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    /* border: 1px solid var(--border); */
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 5rem;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.35);
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.brand-logo {
    font-size: 28px;
    width: 70%;
    margin-bottom: -10%;
}

.brand-title {
    font-size: clamp(22px, 4vw, 28px);
    margin: 0;
}

.brand-sub {
    color: var(--muted);
    margin: 6px 0 0;
    font-size: 14px;
}

.field {
    margin: 14px 0;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

input[type="login"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    /* background: rgba(13, 16, 28, 0.6); */
    color: var(--text);
    outline: 1px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

input::placeholder {
    color: #9ca3af;
}

input:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-group input {
    padding-right: 44px;
}

.btn-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    cursor: pointer;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.error {
    color: var(--text);
    font-size: 12px;
    height: 16px;
    display: block;
    margin-top: 6px;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0 14px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.link {
    color: #93c5fd;
    text-decoration: none;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #020024, #090979, #9ea4a7);
    color: #d6dbe6;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .3s ease;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 2s ease;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #020024, #090979, #9ea4a7);
    /* mais vivas */
    transform: translateY(-6px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover::after {
    left: 100%;
}


.btn-primary:active {
    transform: translateY(1px);
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #0b1220;
    display: none;
    animation: spin 1s linear infinite;
}

.btn-loading .spinner {
    display: inline-block;
}

.btn-loading .btn-text {
    opacity: 0.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.feedback {
    margin-top: 12px;
    min-height: 18px;
    font-size: 14px;
}

.feedback--ok {
    color: #0e0d0d;
}

.feedback--err {
    color: var(--text);
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 480px) {

    /* Remove espaçamentos e centralização do wrapper */
    .auth-wrapper {
        padding: 0;
        min-height: 100vh;
        display: block;
    }

    /* Card ocupa a tela inteira */
    .auth-card {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 3rem;
        max-width: none;
    }

    form {
        margin-top: 20%;
    }

    img {
        width: 100%;
        margin-top: 20%;
        padding-top: -10%;
    }
}
