﻿/* wwwroot/css/GBL/login.css */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: #111111;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    color: #d4d4d4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrap {
    width: 100%;
    max-width: 520px;
    padding: 1.5rem;
}

/* ── Brand ── */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    justify-content: center;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
}

.brand-name {
    font-size: 25px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.2px;
}

    .brand-name span {
        color: #c9a84c;
    }

/* ── Card ── */

.card {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 14px;
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 520px;
}

.card-title {
    font-size: 26px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 4px;
}

.card-sub {
    font-size: 13px;
    color: #555;
    margin-bottom: 1.75rem;
}

/* ── Ações fora do card (botão + link) ── */

.card-actions {
    width: 100%;
    max-width: 520px;
    margin: 16px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

    .card-actions .btn-primary {
        width: 100%;
        margin-bottom: 0;
    }

    .card-actions .signup-text {
        margin-top: 10px;
    }

.card-validate-email {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 14px;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 560px;
    margin-bottom: 15px;
}

/* ── TOASTS ───────────────────────────────────── */

.toast-success,
.toast-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1.25rem;
}

.toast-success {
    background: #0d2218;
    border: 1px solid #1a4a30;
    color: #5DCAA5;
}

.toast-error {
    background: #220d0d;
    border: 1px solid #4a1a1a;
    color: #e07070;
}

.toast-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

    .toast-dot.success {
        background: #5DCAA5;
    }

    .toast-dot.error {
        background: #e07070;
    }

/* ── cc-toast (toast flutuante global) ── */

.cc-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
    white-space: nowrap;
}

    .cc-toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .cc-toast.success {
        background: #0d2218;
        border: 1px solid #1a4a30;
        color: #5DCAA5;
    }

    .cc-toast.error {
        background: #220d0d;
        border: 1px solid #4a1a1a;
        color: #e07070;
    }

/* ── Form ── */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

    .form-group label {
        font-size: 11px;
        font-weight: 500;
        color: #666;
    }

.form-control {
    padding: 9px 12px;
    font-size: 13px;
    border-radius: 7px;
    border: 1px solid #2a2a2a;
    background: #111111;
    color: #d4d4d4;
    outline: none;
    transition: all 0.15s;
}

    .form-control:focus {
        border-color: rgba(201,168,76,0.33);
        background: #151515;
        box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
    }

    .form-control::placeholder {
        color: #444;
        font-size: 12px;
    }

/* ── TEXTOS DE ERRO ───────────────────────────── */

.text-danger {
    color: #e74c3c !important;
    font-size: 0.75rem;
}

/* ── Forgot ── */

.forgot {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #555;
    text-decoration: none;
    margin-top: -6px;
    margin-bottom: 16px;
}

    .forgot:hover {
        color: #c9a84c;
    }

/* ── forgot-back (link ← Voltar ao Login) ── */

.forgot-back {
    color: #c9a84c;
    text-decoration: none;
    font-size: 12px;
}

    .forgot-back:hover {
        color: #e0bb6a;
    }

/* ── Remember ── */

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 16px;
    cursor: pointer;
}

    .remember input[type=checkbox] {
        accent-color: #c9a84c;
        width: 14px;
        height: 14px;
    }

/* ── Button ── */

.btn-primary {
    width: 100%;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 500;
    background: #1e5c3a;
    color: #7fd4aa;
    border: 1px solid #2a7a52;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

    .btn-primary:hover {
        background: #255f3e;
        border-color: #35966a;
        color: #9de0bc;
    }

    .btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ── Signup ── */

.signup-text {
    text-align: center;
    font-size: 12px;
    color: #555;
    margin-top: 14px;
}

    .signup-text a {
        color: #c9a84c;
        text-decoration: none;
    }

/* ── Footer ── */

.login-footer {
    text-align: center;
    font-size: 11px;
    color: #3a3a3a;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c9a84c;
}

/* ── Mobile ── */

@media (max-width: 540px) {

    .login-wrap {
        max-width: 100%;
        padding: 1rem;
    }

    .card {
        padding: 1.5rem 1.25rem;
        max-width: 100%;
    }

    .card-actions {
        max-width: 100%;
    }
}

/* ── CUSTOM SELECT ───────────────────────────── */

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    width: 100%;
    min-height: 39px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    appearance: none;
    -webkit-appearance: none;
    font-family: 'DM Sans', sans-serif;
}

    .custom-select-btn::after {
        content: '⌄';
        color: #666;
        font-size: 12px;
        margin-left: 10px;
    }

.custom-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
    width: 100%;
    min-width: 320px;
}

    .custom-select-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.custom-select-item {
    padding: 11px 12px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #232323;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .custom-select-item:last-child {
        border-bottom: none;
    }

    .custom-select-item strong {
        font-size: 13px;
        font-weight: 500;
        color: #d4d4d4;
    }

    .custom-select-item span {
        font-size: 11px;
        color: #666;
    }

    .custom-select-item:hover {
        background: #222222;
    }

    .custom-select-item.active {
        background: rgba(201,168,76,0.10);
        border-left: 2px solid #c9a84c;
    }

/* ── E-mail: wrapper input + ícone ── */

.email-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .email-input-wrapper input {
        flex: 1;
        min-width: 0;
    }

/* ── Botão de ativação de e-mail ── */

.email-activate-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    color: #c9a84c;
    line-height: 1;
}

    .email-activate-btn svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: color 0.15s;
    }

    .email-activate-btn:hover {
        color: #e0bb6a;
    }

        .email-activate-btn:hover .email-tooltip {
            display: block;
        }

/* ── Tooltip de ativação ── */

.email-tooltip {
    display: none;
    position: absolute;
    right: 0;
    top: 30px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: #d4d4d4;
    width: 195px;
    white-space: normal;
    line-height: 1.5;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(0,0,0,0.55);
}

    .email-tooltip::before {
        content: '';
        position: absolute;
        top: -6px;
        right: 8px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid #333;
    }

.email-tooltip-action {
    display: block;
    margin-top: 8px;
    background: #c9a84c;
    color: #111;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.15s;
}

    .email-tooltip-action:hover {
        background: #e0bb6a;
    }
/* ── Ícone de ativação de e-mail ── */

.email-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .email-input-wrapper input {
        flex: 1;
        min-width: 0;
    }

.email-activate-icon {
    flex-shrink: 0;
    font-size: 16px;
    color: #c9a84c;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    position: relative;
}

    .email-activate-icon:hover {
        color: #e0bb6a;
    }

/* ── Create Account: card mais largo ── */

.login-wrap--wide {
    max-width: 560px;
}

    .login-wrap--wide .card {
        max-width: 560px;
    }

    .login-wrap--wide .card-actions {
        max-width: 560px;
    }


/* ── LINK VALIDAR E-MAIL ───────────────────────── */

.validate-email-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #c9a84c;
    text-decoration: none;
    cursor: pointer;
}

    .validate-email-link:hover {
        color: #e0bb6a;
    }

/* ── STATUS DO E-MAIL ─────────────────────────── */

.email-status {
    margin-top: 8px;
    font-size: 12px;
}

    .email-status.available {
        color: #2E7D32;
    }

    .email-status.exists {
        color: #e07070;
    }

    .email-status.inactive {
        color: #e0bb6a;
    }

    .email-status.error {
        color: #e07070;
    }

/* ── CARD DESABILITADO ────────────────────────── */

.card-disabled input {
    cursor: not-allowed;
}

/* ── STATUS VISUAL DO INPUT E-MAIL ───────────────────────── */

.form-control.email-available {
    border-color: #1a4a30;
    color: #5DCAA5;
}

.form-control.email-exists {
    border-color: #4a1a1a;
    color: #e07070;
}

.form-control.email-inactive {
    border-color: #8a6d1f;
    color: #e0bb6a;
}

/* ── Campos obrigatórios ───────────────────────── */
.form-group label.required-label::after {
    content: " *";
    color: #e07070;
}

/* ── Campo vazio (obrigatório) ───────────────────── */
.form-control.input-error,
.custom-select-btn.input-error {
    border-color: #e07070;
    box-shadow: 0 0 0 1px #e0707055;
}

    .form-control.input-error:focus,
    .custom-select-btn.input-error:focus {
        border-color: #e07070;
        box-shadow: 0 0 0 2px #e0707033;
    }

/* ── Corrige fundo branco do autofill ────────────── */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #111 inset;
    -webkit-text-fill-color: #d4d4d4;
    caret-color: #d4d4d4;
    transition: background-color 9999s ease-in-out 0s;
}
/* ── EMAIL DO GOOGLE (CLEAN) ── */
.email-input-wrapper {
    position: relative;
}

#emailField:disabled {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    color: #d0d0d0;
    border: 0.5px solid #3a3a3a !important;
    cursor: default;
    font-weight: 500;
    padding-right: 40px;
}

.email-provider-checkmark {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #4ade80;
    font-size: 16px;
    pointer-events: none;
}

.email-status.verified {
    color: #4ade80;
    font-size: 12px;
    margin-top: 6px;
}