/* ============================================================
   AtendCont — telas de acesso (login interno, login do portal,
   definir senha e 404). Layout minimalista: cartão de vidro no
   centro, aurora animada e cartões flutuantes ao fundo.
   ============================================================ */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* nomes mantidos: portal-auth.css usa estas variáveis */
    --field-border: rgba(255, 255, 255, 0.1);
    --field-bg: rgba(255, 255, 255, 0.04);
    --text-primary: #f1f5ff;
    --text-soft: #d6e2ff;
    --text-secondary: #9aa8c7;
    --text-muted: #6b7a9c;
    --brand: #3b7bff;
    --info: #2dd4bf;
    --success: #34d399;
    --gradient-brand: linear-gradient(100deg, #1d5cf5 0%, #1590c4 50%, #14b8a6 100%);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: #050a1c;
    color: var(--text-primary);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- fundo animado ---------- */
.auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    will-change: transform;
}

.aurora--1 {
    width: 52vmax;
    height: 52vmax;
    left: -14vmax;
    top: -18vmax;
    background: radial-gradient(circle, #1d4ed8 0%, transparent 65%);
    animation: aurora-1 22s ease-in-out infinite alternate;
}

.aurora--2 {
    width: 46vmax;
    height: 46vmax;
    right: -16vmax;
    bottom: -20vmax;
    background: radial-gradient(circle, #0d9488 0%, transparent 65%);
    animation: aurora-2 26s ease-in-out infinite alternate;
}

.aurora--3 {
    width: 34vmax;
    height: 34vmax;
    left: 40%;
    top: 55%;
    background: radial-gradient(circle, #4338ca 0%, transparent 65%);
    opacity: 0.35;
    animation: aurora-3 30s ease-in-out infinite alternate;
}

@keyframes aurora-1 { to { transform: translate(12vmax, 10vmax) scale(1.15); } }
@keyframes aurora-2 { to { transform: translate(-10vmax, -8vmax) scale(1.2); } }
@keyframes aurora-3 { to { transform: translate(-14vmax, -12vmax) scale(0.85); } }

.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
    animation: grade 40s linear infinite;
}

@keyframes grade { to { background-position: 56px 56px, 56px 56px; } }

/* Cartões flutuantes (contam a história do produto, sem pesar). */
.float-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(13, 22, 56, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    animation: flutuar 9s ease-in-out infinite;
}

.float-chip small {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
}

.float-chip__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.95rem;
    color: #ffffff;
    background: var(--gradient-brand);
}

.float-chip__icone--ok { background: linear-gradient(135deg, #059669, #34d399); }
.float-chip__icone--ouro { background: linear-gradient(135deg, #d97706, #fbbf24); }
.float-chip__icone--roxo { background: linear-gradient(135deg, #4f46e5, #818cf8); }

.float-chip--1 { left: 9%; top: 18%; animation-delay: 0s; }
.float-chip--2 { right: 10%; top: 24%; animation-delay: -3s; }
.float-chip--3 { left: 12%; bottom: 16%; animation-delay: -5s; }
.float-chip--4 { right: 13%; bottom: 20%; animation-delay: -7s; }

@keyframes flutuar {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(1deg); }
}

/* ---------- cartão central ---------- */
.auth-center {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 32px 18px;
}

.auth-form {
    position: relative;
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 38px 34px 30px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(16, 26, 64, 0.72), rgba(9, 15, 40, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: subir 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes subir {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.auth-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* Logo com anel em gradiente girando + ponto em órbita */
.auth-logo {
    position: relative;
    width: 76px;
    height: 76px;
    margin-bottom: 10px;
    display: grid;
    place-items: center;
}

.auth-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(from 0deg, #3b82f6, #2dd4bf, transparent 55%, #3b82f6);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: girar 4s linear infinite;
}

.auth-logo::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.25), transparent 65%);
    animation: pulsar 3s ease-in-out infinite;
}

.auth-logo img {
    position: relative;
    z-index: 1;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-logo__orbita {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    animation: girar 7s linear infinite reverse;
}

.auth-logo__orbita::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 12px #5eead4;
}

@keyframes girar { to { transform: rotate(360deg); } }
@keyframes pulsar { 0%, 100% { opacity: 0.5; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.08); } }

.auth-brand__word,
.auth-title {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: #ffffff;
}

.auth-title b,
.auth-brand__word b {
    font-weight: 800;
    background: linear-gradient(120deg, #60a5fa, #2dd4bf 60%, #86efac);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brilho-texto 6s ease-in-out infinite alternate;
}

@keyframes brilho-texto { to { background-position: 100% 0; } }

.auth-lead {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.auth-form__title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

/* ---------- campos ---------- */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field label {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.auth-field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field__control > i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-field__control:focus-within > i {
    color: #60a5fa;
}

.auth-field__control input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border-radius: 14px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--text-primary);
    font-size: 0.98rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field__control input::placeholder {
    color: var(--text-muted);
}

.auth-field__control input:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.auth-field__control input:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.auth-field__control input:-webkit-autofill {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 100px #0e1a44 inset;
    caret-color: var(--text-primary);
}

.auth-field__control input[type="password"],
.auth-field__control input[data-has-toggle] {
    padding-right: 46px;
}

.auth-field__toggle {
    position: absolute;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.auth-field__toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ---------- botão ---------- */
.auth-submit {
    position: relative;
    overflow: hidden;
    height: 54px;
    margin-top: 4px;
    border: none;
    border-radius: 14px;
    background: var(--gradient-brand);
    background-size: 160% 100%;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 34px rgba(29, 92, 245, 0.35);
    cursor: pointer;
    transition: background-position 0.5s ease, box-shadow 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.auth-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: reflexo 3.5s ease-in-out infinite;
}

@keyframes reflexo {
    0%, 60% { left: -60%; }
    100% { left: 130%; }
}

.auth-submit:hover:not(:disabled) {
    background-position: 100% 0;
    box-shadow: 0 18px 40px rgba(20, 184, 166, 0.35);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-submit:focus-visible,
.auth-field__toggle:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.auth-secure .bi {
    color: var(--info);
}

.auth-foot {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

#msg {
    margin: 0;
    border-radius: 12px;
    font-size: 0.875rem;
}

/* ---------- responsivo / movimento ---------- */
@media (max-width: 1000px) {
    .float-chip { display: none; }
}

@media (max-width: 480px) {
    .auth-center {
        justify-content: flex-start;
        padding-top: 9vh;
    }

    .auth-form {
        padding: 30px 22px 24px;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aurora,
    .auth-grid,
    .float-chip,
    .auth-logo::before,
    .auth-logo::after,
    .auth-logo__orbita,
    .auth-submit::after,
    .auth-title b,
    .auth-brand__word b,
    .auth-form {
        animation: none !important;
    }
}
