:root {
    --menu: {{ gs()->cor_menu ?? '#3a15c2' }};
    --fundo: {{ gs()->cor_fundo ?? '#e6f7ff' }};
    --texto: {{ gs()->cor_texto ?? '#333333' }};
    --titulo: {{ gs()->cor_titulo ?? '#0077b6' }};
    --botao: {{ gs()->cor_botao ?? '#48cae4' }};
    --box: {{ gs()->cor_card ?? '#f5f5f5' }};
}

header, footer {
    display: none;
}

.auth-main {
    min-height: 100vh;
    background-color: var(--fundo);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: -39px;
}

.auth-card {
    max-width: 1200px;
    width: 100%;
    background-color: var(--box) !important;
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-column {
    background-color: var(--fundo);
    padding: 3rem;
}

.brand-col {
    background-color: var(--box);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: var(--titulo);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.brand-logo i {
    font-size: 3rem;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tabs-container {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 0.85rem;
    border: none;
    background: transparent !important;
    color: var(--texto);
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn.active {
    background: var(--botao) !important;

    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* container raiz */
.auth-form {
    width: 100%;
    background-color: var(--box) !important;
}

/* grupo */
.auth-form .auth-group {
    margin-bottom: 22px;
}

/* label */
.auth-form .auth-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--texto);
}

/* campo com ícone */
.auth-form .auth-field {
    position: relative;
}

.auth-form .auth-field i {
    position: absolute !important;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--titulo);
    pointer-events: none;

    /* evita quebrar layout */
    display: inline-block !important;
}

.auth-form .auth-field input {
    width: 100%;
    display: block;
    padding: 12px 14px 12px 42px; /* espaço pro ícone */
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: var(--texto) !important;
}

/* foco */
.auth-form .auth-field input:focus {
    outline: none;
    border-color: var(--texto) !important;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* erro */
.auth-form .auth-error {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #ff4d4f;
}
/* erro mais organizado */
.error-feedback {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #ff4d4f;
}

.error-feedback {
    color: #ff6b6b;
    font-size: 0.75rem;
    margin-top: 0.35rem;
}

/* MetaMask Button */
.metamask-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #f6851b, #e2761b);
    color: white;
    position: relative;
    overflow: hidden;
}

.metamask-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(246, 133, 27, 0.3);
}

.metamask-btn:active {
    transform: translateY(0);
}

.metamask-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.btn-text {
    transition: opacity 0.2s;
}

/* Google Button */
.login_google {
    width: 100%;
    padding: 0.85rem;
    border-radius: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: var(--box);
    color: var(--texto);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.login_google:hover {
    transform: translateY(-2px);
    background: var(--botao);
    color: white;
    border-color: var(--botao);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login_google:hover i {
    color: white;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.login_google:active {
    transform: translateY(0);
}

.login_google i {
    font-size: 1.2rem;
    background: conic-gradient(from -45deg, #ea4335 110deg, #4285f4 190deg, #34a853 275deg, #fbbc04 360deg);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.2s;
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider span {
    background: var(--box);
    padding: 0 1rem;
    color: var(--texto);
    opacity: 0.6;
    font-size: 0.8rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--botao) !important;
    border: none;
    border-radius: 1rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 2FA */
.twofa-box {
    width: 55px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    color: var(--texto);
    margin: 0 0.25rem;
}

.twofa-box:focus {
    border-color: var(--titulo);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.cursor-pointer {
    cursor: pointer;
    color: var(--titulo);
    background-color: var(--botao);
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cursor-pointer:hover {
    text-decoration: underline;
}

.forgot-link {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.forgot-link a,
.switch-link {
    color: var(--titulo);
    text-decoration: none;
    font-size: 0.85rem;
}

.forgot-link a:hover {
    text-decoration: underline;
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

.metamask-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.metamask-btn.loading .spinner {
    display: inline-block;
}

.metamask-btn.loading .btn-text {
    opacity: 0.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        margin: 0 !important;
    }
    
    .auth-column {
        padding: 2rem 1.5rem;
    }
    
    .brand-col {
        display: none;
    }
    
    .twofa-box {
        width: 45px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .metamask-btn, 
    .login_google {
        padding: 0.7rem;
        font-size: 0.85rem;
    }
    
    .metamask-logo {
        width: 20px;
        height: 20px;
    }
    
    .login_google i {
        font-size: 1rem;
    }
}

/* Ajustes para tema claro/escuro automático */
@media (prefers-color-scheme: light) {
    .input-icon input {
        background: rgba(0, 0, 0, 0.03);
    }
    
    .tabs-container {
        background: rgba(0, 0, 0, 0.03);
    }
}