@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    color-scheme: dark;
    --primary-color: #f4f4f5;
    --secondary-color: #d4d4d8;
    --accent-color: #a1a1aa;
    --accent-strong: #ffffff;
    --background-color: #050505;
    --background-color-2: #111111;
    --surface-bg: rgba(20, 20, 20, 0.94);
    --surface-strong: #1a1a1a;
    --surface-muted: rgba(255, 255, 255, 0.04);
    --text-color: rgba(250, 250, 250, 0.94);
    --light-text-color: rgba(212, 212, 216, 0.76);
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

/* ---------------------------------------------------
    RESET + PWA CONFIG
--------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.06), transparent 24%),
        linear-gradient(180deg, var(--background-color), var(--background-color-2));
}

body.body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

/* ---------------------------------------------------
    CONTAINER PRINCIPAL
--------------------------------------------------- */
.container {
    width: 100%;
    max-width: 430px;
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    animation: fadeIn .5s ease-out;
    backdrop-filter: blur(14px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header {
    height: 178px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.13), transparent 34%),
        radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.09), transparent 26%),
        linear-gradient(135deg, #050505, #111111 48%, #1a1a1a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #ffffff;
}

.header-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 34px 34px;
}

.logo-area {
    width: min(82%, 310px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.logo-wordmark {
    display: block;
    width: min(100%, 290px);
    height: auto;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.36));
}

.logo-area span {
    color: var(--light-text-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.header-curve {
    position: absolute;
    bottom: -1px;
    width: 100%;
    height: 50px;
}

.content {
    padding: 30px 30px 40px;
    background: #141414;
}

.title {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    color: var(--text-color);
    margin-bottom: 25px;
    font-weight: 700;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 18px;
}

.input-field {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    transition: all .3s ease;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
}

.input-field::placeholder {
    color: rgba(212, 212, 216, 0.62);
}

.input-field:focus {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.07);
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------
    BOTÃO DE ENTRADA
--------------------------------------------------- */
.btn-login {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #cfcfcf);
    color: #090909;
    font-weight: 800;
    font-size: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .2s, box-shadow .2s, filter .2s;
    margin-top: 10px;
    box-shadow: 0 14px 30px rgba(255, 255, 255, 0.14);
}

.btn-login:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 18px 34px rgba(255, 255, 255, 0.16);
}

.btn-login:active { transform: translateY(0); }

.ml { margin-left: 5px; }

/* ---------------------------------------------------
    LOADER E UTILITÁRIOS
--------------------------------------------------- */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(9, 9, 9, 0.24);
    border-top-color: #090909;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none; }

/* ---------------------------------------------------
    TOAST (Notificações)
--------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-strong);
    color: var(--text-color);
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 34px rgba(0,0,0,0.32);
    opacity: 0;
    transition: opacity .4s;
    z-index: 999;
}

.toast.error { background: #7f1d1d; }
.toast.success { background: #14532d; }
.toast.warning { background: #78350f; }

@media (max-width: 480px) {
    body.body {
        padding-inline: 12px;
    }

    .container {
        border-radius: 18px;
    }

    .header {
        height: 162px;
    }

    .content {
        padding: 28px 22px 34px;
    }
}
