/* =====================================================
   SORTE.ESP.BR - CSS de Autenticação
   ===================================================== */

/* ─── PÁGINA AUTH ───────────────────────────────────── */
body.auth-page {
    background: var(--bg-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── HEADER AUTH ───────────────────────────────────── */
.auth-header {
    background: var(--bg-header);
    border-bottom: 2px solid var(--primary);
    padding: 0;
}

.auth-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
}

.auth-header-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── MAIN AUTH ──────────────────────────────────────── */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    max-width: 920px;
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-container {
    grid-template-columns: 340px 1fr;
}

/* ─── LADO PROMO ─────────────────────────────────────── */
.auth-promo {
    background: linear-gradient(160deg, #0d2b3e 0%, #1a6c3c 50%, #0d3b1a 100%);
    padding: 48px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-promo::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(26,143,60,0.15) 0%, transparent 60%);
}

.auth-promo-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.promo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    animation: float 3s ease-in-out infinite;
}

.auth-promo-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: white;
}

.promo-value {
    font-size: 52px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin: 16px 0;
    text-shadow: 0 0 30px rgba(240,180,41,0.5);
}

.auth-promo-content > p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 28px;
}

.promo-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 28px !important;
}

.promo-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.promo-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

.promo-feature i { color: var(--accent); }

.promo-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── LADO FORMULÁRIO ────────────────────────────────── */
.auth-form-side {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 90vh;
}

.auth-form-box h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ─── TABS AUTH ──────────────────────────────────────── */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    gap: 0;
}

.auth-tab {
    padding: 10px 20px;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.auth-tab:hover { color: var(--text-main); }

/* ─── FORM GROUPS ────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
}

.required { color: var(--danger); }
.optional  { color: var(--text-dark); font-weight: 400; text-transform: none; letter-spacing: 0; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-dark);
    font-size: 14px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    background: var(--bg-main);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,143,60,0.15);
}

.form-input.input-error {
    border-color: var(--danger);
}

.form-input::placeholder { color: var(--text-dark); }

/* Toggle password */
.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    color: var(--text-dark);
    font-size: 14px;
    padding: 4px;
    z-index: 2;
    transition: color 0.2s;
}

.toggle-pass:hover { color: var(--text-muted); }

/* ─── FORÇA DA SENHA ─────────────────────────────────── */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.strength-label {
    font-size: 11px;
    font-weight: 600;
    width: 80px;
    text-align: right;
}

/* ─── ERROS DE CAMPO ─────────────────────────────────── */
.field-error {
    display: block;
    font-size: 11px;
    color: var(--danger);
    margin-top: 4px;
    min-height: 14px;
}

/* ─── CHECKBOX ───────────────────────────────────────── */
.checkbox-group {
    margin-bottom: 14px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.checkbox-label.small { font-size: 12px; }

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.checkbox-label a {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ─── EXTRAS DO FORM ─────────────────────────────────── */
.form-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.forgot-link {
    font-size: 12px;
    color: var(--primary-light);
}

/* ─── BOTÃO SUBMIT ───────────────────────────────────── */
.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth-submit:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,143,60,0.4);
}

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

/* ─── MENSAGENS ──────────────────────────────────────── */
.auth-message {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-message.success {
    background: rgba(26,143,60,0.15);
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

.auth-message.error {
    background: rgba(229,62,62,0.12);
    border: 1px solid var(--danger);
    color: #fc8181;
}

/* ─── LINKS ──────────────────────────────────────────── */
.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.auth-switch a { color: var(--primary-light); font-weight: 600; }

/* ─── SEGURANÇA ──────────────────────────────────────── */
.auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dark);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.auth-security i { color: var(--primary); }

/* ─── USER MENU (header logado) ─────────────────────── */
.user-balance {
    display: flex;
    gap: 6px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 10px;
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 6px;
}

.balance-item + .balance-item {
    border-left: 1px solid var(--border);
}

.balance-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.balance-item.bonus .balance-value { color: var(--accent); }

.btn-deposito {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent);
    color: #1a0000;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-deposito:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-1px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    user-select: none;
}

.user-menu:hover { border-color: var(--primary); }

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    min-width: 200px;
    box-shadow: var(--shadow);
    z-index: 999;
    overflow: hidden;
}

.user-dropdown.open { display: block; animation: fadeDown 0.15s ease; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: var(--text-label);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    width: 100%;
    text-align: left;
    background: none;
}

.dropdown-item:hover {
    background: rgba(26,143,60,0.1);
    color: var(--primary-light);
}

.dropdown-item.danger:hover {
    background: rgba(229,62,62,0.1);
    color: var(--danger);
}

.dropdown-item i { width: 16px; color: var(--primary); }
.dropdown-item.danger i { color: var(--danger); }

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ─── RESPONSIVO ─────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .auth-promo { display: none; }

    .auth-form-side {
        padding: 32px 24px;
        max-height: none;
    }

    .user-balance { display: none; }
    .user-name    { display: none; }
}

@media (max-width: 480px) {
    .auth-form-side { padding: 24px 16px; }
}

