:root {
    --bg-dark: #070a0e;
    --card-bg: #111720;
    --bg-banner: #090e14;
    --input-bg: #0b0f17;

    --card-border: #1e293b;
    --input-border: #263244;
    --accent-color: #00e5b3;
    --accent-hover: #00f2bd;

    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-soft: #64748b;

    --error-bg: rgba(239, 68, 68, 0.08);
    --error-border: rgba(239, 68, 68, 0.30);
    --error-text: #fca5a5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 229, 179, 0.055), transparent 26%),
        radial-gradient(circle at 86% 78%, rgba(0, 229, 179, 0.035), transparent 22%),
        var(--bg-dark);
    color: var(--text-main);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.floating-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    overflow: hidden;

    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;

    box-shadow:
        0 30px 70px -24px rgba(0, 0, 0, 0.88),
        0 0 0 1px rgba(255, 255, 255, 0.025);
}

/* =========================================================
   IDENTIDADE
   ========================================================= */

.card-banner {
    position: relative;
    isolation: isolate;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 42px 34px;

    background:
        radial-gradient(circle at 48% 38%, rgba(0, 229, 179, 0.08), transparent 36%),
        radial-gradient(circle at 15% 90%, rgba(0, 229, 179, 0.04), transparent 30%),
        linear-gradient(145deg, #081017 0%, var(--bg-banner) 58%, #071018 100%);

    border-right: 1px solid var(--card-border);
    text-align: center;
    overflow: hidden;
}

.card-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;

    background-image:
        linear-gradient(rgba(0, 229, 179, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 179, 0.025) 1px, transparent 1px);
    background-size: 34px 34px;

    opacity: 0.24;

    -webkit-mask-image: radial-gradient(circle at center, #000 8%, transparent 72%);
    mask-image: radial-gradient(circle at center, #000 8%, transparent 72%);
}

.card-banner::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 0;

    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 229, 179, 0.34),
        transparent
    );
}

.brand-stage {
    position: absolute;
    z-index: -2;
    top: 50%;
    left: 50%;

    width: 360px;
    height: 360px;

    transform: translate(-50%, -57%);
    pointer-events: none;
}

.brand-stage::before {
    content: "";
    position: absolute;
    inset: 16%;

    border: 1px solid rgba(0, 229, 179, 0.11);
    border-radius: 50%;

    box-shadow:
        0 0 55px rgba(0, 229, 179, 0.05),
        inset 0 0 55px rgba(0, 229, 179, 0.025);
}

.brand-halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}

.brand-halo-one {
    inset: 5%;
    border: 1px solid rgba(0, 229, 179, 0.055);
}

.brand-halo-two {
    inset: 26%;
    background: rgba(0, 229, 179, 0.035);
    filter: blur(34px);
}

.brand-logo-container {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 350px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;
}

.brand-logo-glow {
    position: relative;
    width: 100%;
    max-width: 318px;
}

.brand-logo-glow::before {
    content: "";
    position: absolute;
    z-index: -1;

    inset: 15% 12% 16%;

    border-radius: 50%;
    background: rgba(0, 229, 179, 0.09);

    filter: blur(42px);
}

.brand-logo-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 330px;
    object-fit: contain;

    /*
     * A arte original possui um fundo retangular.
     * A máscara suaviza as quatro bordas e faz a imagem
     * se fundir ao banner, removendo o efeito de "quadrado".
     */
    -webkit-mask-image: radial-gradient(
        ellipse 72% 76% at 50% 49%,
        #000 0%,
        #000 66%,
        rgba(0, 0, 0, 0.96) 72%,
        rgba(0, 0, 0, 0.70) 81%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 72% 76% at 50% 49%,
        #000 0%,
        #000 66%,
        rgba(0, 0, 0, 0.96) 72%,
        rgba(0, 0, 0, 0.70) 81%,
        transparent 100%
    );

    filter:
        saturate(1.04)
        contrast(1.03)
        drop-shadow(0 8px 20px rgba(0, 0, 0, 0.28))
        drop-shadow(0 0 18px rgba(0, 229, 179, 0.11));

    transform: scale(1.035);

    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.brand-logo-container:hover .brand-logo-img {
    transform: scale(1.055) translateY(-2px);

    filter:
        saturate(1.06)
        contrast(1.04)
        drop-shadow(0 10px 24px rgba(0, 0, 0, 0.31))
        drop-shadow(0 0 24px rgba(0, 229, 179, 0.16));
}

.brand-description {
    position: relative;
    z-index: 1;

    max-width: 315px;
    margin-top: 2px;

    color: #9aacbf;
    font-size: 13px;
    line-height: 1.65;
}

/* Fallback para navegadores sem suporte a mask-image */
@supports not ((mask-image: radial-gradient(#000, transparent)) or (-webkit-mask-image: radial-gradient(#000, transparent))) {
    .brand-logo-img {
        border-radius: 28px;
        opacity: 0.94;
    }

    .brand-logo-glow {
        overflow: hidden;
        border-radius: 28px;
    }
}

/* =========================================================
   FORMULÁRIO
   ========================================================= */

.card-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.form-box {
    width: 100%;
    max-width: 330px;
}

.form-heading {
    margin-bottom: 30px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    color: var(--accent-color);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.form-box h1 {
    margin-bottom: 7px;

    color: var(--text-main);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

/* =========================================================
   ALERTA
   ========================================================= */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-bottom: 20px;
    padding: 11px 12px;

    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 8px;

    color: var(--error-text);
    font-size: 12px;
    line-height: 1.45;
}

.alert-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

/* =========================================================
   INPUTS
   ========================================================= */

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 19px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.75px;
}

.input-shell {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;

    width: 17px;
    height: 17px;

    color: #617086;

    transform: translateY(-50%);
    pointer-events: none;
}

.input-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.form-group input {
    width: 100%;
    height: 44px;
    padding: 0 42px;

    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;

    color: var(--text-main);
    caret-color: var(--accent-color);
    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-group input::placeholder {
    color: #526174;
}

.form-group input:hover {
    border-color: #344258;
}

.form-group input:focus {
    background-color: #0c1119;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 229, 179, 0.12);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 0;
    border-radius: 6px;

    color: #617086;
    cursor: pointer;

    transform: translateY(-50%);
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent-color);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 1px;
}

.icon-eye {
    width: 17px;
    height: 17px;
}

/* =========================================================
   BOTÃO
   ========================================================= */

.btn-submit {
    width: 100%;
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin-top: 8px;
    padding: 12px 16px;

    background-color: var(--accent-color);
    border: 0;
    border-radius: 8px;

    color: #06100e;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    box-shadow: 0 8px 20px rgba(0, 229, 179, 0.08);

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 10px 26px rgba(0, 229, 179, 0.14);
}

.btn-submit:active {
    transform: scale(0.985);
}

.btn-submit:focus-visible {
    outline: 3px solid rgba(0, 229, 179, 0.25);
    outline-offset: 3px;
}

.btn-arrow {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(3px);
}

.access-note {
    margin-top: 18px;

    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 768px) {
    .login-page {
        align-items: flex-start;
        padding: 18px;
    }

    .floating-card {
        grid-template-columns: 1fr;
        max-width: 490px;
        min-height: 0;
    }

    .card-banner {
        padding: 30px 24px 26px;
        border-right: 0;
        border-bottom: 1px solid var(--card-border);
    }

    .brand-stage {
        width: 285px;
        height: 285px;
        transform: translate(-50%, -60%);
    }

    .brand-logo-container {
        max-width: 260px;
        margin-bottom: 6px;
    }

    .brand-logo-glow {
        max-width: 238px;
    }

    .brand-logo-img {
        max-height: 235px;
    }

    .brand-description {
        max-width: 330px;
        font-size: 12px;
    }

    .card-form {
        padding: 34px 26px 38px;
    }

    .form-box {
        max-width: 360px;
    }
}

@media (max-width: 420px) {
    .login-page {
        padding: 0;
    }

    .floating-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .card-banner {
        padding: 24px 20px 20px;
    }

    .brand-stage {
        width: 230px;
        height: 230px;
    }

    .brand-logo-container {
        max-width: 215px;
    }

    .brand-logo-glow {
        max-width: 200px;
    }

    .brand-logo-img {
        max-height: 195px;
    }

    .brand-description {
        display: none;
    }

    .card-form {
        padding: 30px 22px 34px;
    }
}
