﻿/*
 * BICO PIX - Estilos Principais
 * Baseado no mockup aprovado
 */

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

/* BRUTAL FORCE - Remover tarja cinza */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2e9;
    color: #000;
    font-size: 14px;
    line-height: 1.4;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* HEADER */
.header {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
    padding: 8px 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

.logo-container {
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
    height: 60px;
    display: flex;
    align-items: center;
}

.logo-container a { display: block; height: 100%; }

.logo-container .logo-main {
    height: 280px;
    width: auto;
    display: block;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: -20px;
    left: 0;
    opacity: 1;
    transform: scale(1);
}

/* Logo compacta (só texto) */
.logo-container .logo-compact {
    height: 55px;
    width: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Estado scrollado - fade entre logos */
.header.scrolled .logo-container .logo-main {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.header.scrolled .logo-container .logo-compact {
    opacity: 1;
    pointer-events: auto;
}

.logo-fallback {
    color: #ffd700;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.login-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    min-height: 26px;
}

.user-logged-header { color: #fff; font-size: 13px; }
.user-logged-header span { color: #ffd700; font-weight: 600; }
.user-logged-header.alerta-pausado { background: #dc3545; padding: 5px 12px; border-radius: 4px; }
.user-logged-header .link-pausado { color: #fff; text-decoration: underline; }

.btn-logout {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.2s;
}
.btn-logout:hover { background: #dc3545; }

/* NAVEGAÇÃO */
.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.nav-btn {
    background: #3d7a4a;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-btn:hover { background: #4a9159; transform: translateY(-1px); }
.nav-btn.active { background: #7dd68d; color: #1a472a; font-weight: 700; }
.nav-btn.depositar { background: #d4a017; color: #1a1a1a; }
.nav-btn.depositar:hover { background: #e6b020; }
.nav-btn.saque { background: #28a745; }
.nav-btn.saque:hover { background: #2fc754; }

/* BANNER + LOGIN */
.banner-login-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px 20px 5px 240px;
    display: flex;
    gap: 15px;
    align-items: stretch;
    height: 134px;
}

.banner-container {
    width: 699px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 134px;
}

.banner-container picture { display: block; height: 100%; }
.banner-container img { width: 699px; height: 134px; object-fit: cover; display: block; }

.banner-fallback {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    color: #ffd700;
    height: 134px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding: 20px;
}

.login-area-box {
    width: 280px;
    flex-shrink: 0;
    background: #f5f2d2;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 134px;
}

.login-form { display: flex; flex-direction: column; gap: 8px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 0; }
.form-group label { font-size: 12px; font-weight: 500; margin-bottom: 4px; color: #333; }
.form-group input, .form-group select, .form-group textarea {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3d7a4a;
}

.btn-entrar {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-entrar:hover { background: linear-gradient(135deg, #2fc754 0%, #28a745 100%); }

.login-links { display: flex; justify-content: space-between; margin-top: 6px; font-size: 9px; }
.login-links a { color: #3d7a4a; text-decoration: none; }
.login-links a:hover { color: #28a745; text-decoration: underline; }

/* ========================================
   TARJA USUÁRIO - BARRA HORIZONTAL AMARELA
   ======================================== */
.user-info-bar {
    background: #fff9b1;
    border-bottom: 2px solid #d1a020;
    padding: 15px 20px;
    margin: -20px 0 0 0;
}

.user-info-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px repeat(4, 1fr);
    gap: 20px;
}

.user-info-content::before {
    content: "";
    display: block;
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-column .line {
    font-size: 13px;
    line-height: 1.5;
    color: #000;
    margin-bottom: 3px;
}

.info-column .line:last-child {
    margin-bottom: 0;
}

.info-column .line.title {
    font-weight: 700;
    font-size: 15px;
    color: #000;
}

.info-column .line.green-title {
    font-weight: 700;
    color: #2e7d32;
    font-size: 13px;
    margin-bottom: 3px;
}

.info-column .line.red-title {
    font-weight: 700;
    color: #c62828;
    font-size: 13px;
    margin-bottom: 3px;
}

.info-column .line small {
    font-size: 11px;
    color: #666;
}

.info-column .line .value {
    font-weight: 700;
    color: #1a472a;
}

.info-column .line .valor-risco {
    color: #dc3545 !important;
}

.info-column .line .texto-cinza {
    color: #888;
    font-size: 9px;
}

.info-column .line .cuidado-link {
    color: #dc3545;
    font-weight: 700;
    font-size: 10px;
    text-decoration: none;
}

.info-column .line .cuidado-link:hover {
    text-decoration: underline;
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    line-height: 1.4;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* TARJA USUÁRIO (ANTIGO - NÃO USADO) */
.tarja-usuario {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-bottom: 2px solid #d4a017;
    padding: 10px 20px;
}

.tarja-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tarja-saldos { display: flex; gap: 25px; }
.tarja-saldo-item { display: flex; align-items: center; gap: 8px; }
.tarja-saldo-item .label { font-size: 12px; color: #666; }
.tarja-saldo-item .valor { font-size: 16px; font-weight: 700; color: #28a745; }
.tarja-saldo-item .valor.contratante { color: #d4a017; }

.tarja-info { display: flex; gap: 20px; align-items: center; }
.tarja-info-item { font-size: 11px; color: #666; }
.tarja-info-item strong { color: #333; }

.tarja-medalha { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.tarja-medalha.ouro { color: #ffd700; }
.tarja-medalha.prata { color: #c0c0c0; }
.tarja-medalha.bronze { color: #cd7f32; }

/* CONTEÚDO PRINCIPAL */
.main-content { max-width: 1400px; margin: 5px auto; padding: 0 20px; }

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3d7a4a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .count {
    background: #3d7a4a;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
}

/* LISTA DE BICOS */
.bicos-list { display: flex; flex-direction: column; gap: 12px; }

.bico-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-left: 4px solid #3d7a4a;
    transition: all 0.2s;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.bico-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(4px);
    border-left-color: #28a745;
}

.bico-card.fixado { border-left-color: #d4a017; background: linear-gradient(to right, #fffef5, #fff); }
.bico-card.amarelo { border-left-color: #ffc107; background: linear-gradient(to right, #fffef8, #fff); }
.bico-card.laranja { border-left-color: #ff6b35; background: linear-gradient(to right, #fff9f5, #fff); }
.bico-card.laranja .bico-titulo::before { content: "🔥 "; }

.bico-info { display: flex; flex-direction: column; gap: 6px; }
.bico-titulo { font-size: 16px; font-weight: 700; color: #1a472a; }
.bico-descricao { font-size: 13px; color: #555; line-height: 1.5; }

.bico-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 6px; font-size: 12px; }
.bico-meta-item { display: flex; align-items: center; gap: 4px; color: #666; }
.bico-meta-item strong { color: #333; }
.bico-meta-item.categoria { background: #e8f5e9; padding: 2px 8px; border-radius: 4px; color: #2e7d32; }

.bico-valor-container { text-align: right; min-width: 100px; }
.bico-valor { font-size: 22px; font-weight: 700; color: #28a745; }
.bico-valor small { font-size: 12px; color: #666; font-weight: 400; display: block; }
.bico-vagas { font-size: 11px; color: #888; margin-top: 4px; }
.bico-vagas strong { color: #d4a017; }

.sem-bicos { background: #fff; border-radius: 8px; padding: 40px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.sem-bicos p { color: #666; font-size: 16px; margin-bottom: 10px; }
.sem-bicos p:last-child { margin-bottom: 0; color: #999; font-size: 14px; }

/* PAGINAÇÃO */
.paginacao { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #ddd; }
.paginacao a, .paginacao span { padding: 8px 14px; border-radius: 4px; text-decoration: none; font-size: 13px; font-weight: 500; }
.paginacao a { background: #fff; color: #3d7a4a; border: 1px solid #3d7a4a; transition: all 0.2s; }
.paginacao a:hover { background: #3d7a4a; color: #fff; }
.paginacao span.atual { background: #3d7a4a; color: #fff; border: 1px solid #3d7a4a; }
.paginacao span.reticencias { color: #999; border: none; background: none; }

/* BOTÕES */
.btn { display: inline-block; padding: 12px 24px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; transition: all 0.2s; border: none; }
.btn-primary { background: linear-gradient(135deg, #28a745 0%, #218838 100%); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #2fc754 0%, #28a745 100%); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid #3d7a4a; color: #3d7a4a; }
.btn-outline:hover { background: #3d7a4a; color: #fff; }

/* ALERTAS */
.alerta { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alerta-sucesso { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.alerta-erro { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.alerta-aviso { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }
.alerta-info { background: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460; }

/* FOOTER */
.footer {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    color: #fff;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 250px 1fr;
    gap: 30px;
    position: relative;
}

.footer-mascot {
    position: absolute;
    right: 26%;
    top: 50%;
    transform: translate(50%, -50%);
    height: 280px;
    width: auto;
    pointer-events: none;
    z-index: 10;
}

.footer-section h4 { color: #ffd700; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; }
.footer-section p, .footer-section a { font-size: 13px; color: rgba(255,255,255,0.8); line-height: 1.8; }
.footer-section a { text-decoration: none; display: block; transition: color 0.2s; }
.footer-section a:hover { color: #ffd700; }

.footer-bottom {
    max-width: 1400px;
    margin: 25px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* TOAST */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #333; color: #fff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 10px; transform: translateX(120%); transition: transform 0.3s ease; }
.toast.show { transform: translateX(0); }
.toast-sucesso { background: #28a745; }
.toast-erro { background: #dc3545; }
.toast-aviso { background: #ffc107; color: #000; }
.toast-info { background: #17a2b8; }
.toast-close { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; opacity: 0.7; }
.toast-close:hover { opacity: 1; }

/* LOADING */
.loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 100; }
.loading-spinner { width: 40px; height: 40px; border: 4px solid #e9ecef; border-top-color: #3d7a4a; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVO TABLET */
@media (max-width: 1024px) {
    .banner-login-section { flex-direction: column; padding-left: 20px; height: auto; align-items: center; }
    .banner-container { width: 100%; max-width: 699px; height: auto; }
    .banner-container img { width: 100%; height: auto; }
    .login-area-box { width: 100%; max-width: 400px; margin: 0 auto; height: auto; padding: 15px; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-mascot { display: none; }
    .tarja-content { flex-direction: column; text-align: center; }
    .tarja-saldos { justify-content: center; }
    .tarja-info { justify-content: center; flex-wrap: wrap; }
}

/* RESPONSIVO MOBILE */
@media (max-width: 768px) {
    .header { position: relative; padding: 5px 15px; }
    .header-content { flex-direction: column; align-items: center; gap: 5px; }
    .header-right { width: 100%; gap: 5px; }
    .nav-buttons { justify-content: center; flex-wrap: wrap; gap: 4px; }
    .logo-container { height: auto; position: relative; margin-bottom: 0; }
    .logo-container .logo-main { height: 200px; position: relative; top: 0; left: 0; margin-bottom: -40px; }
    .header.scrolled .logo-container .logo-main { opacity: 1; transform: none; }
    .banner-login-section { padding: 15px; gap: 15px; flex-direction: column; height: auto; }
    .banner-container { width: 100%; height: auto; }
    .banner-container picture, .banner-container img { width: 100%; height: auto; }
    .login-area-box { width: 100%; max-width: 100%; height: auto; padding: 15px; margin: 0; }
    .login-form { gap: 10px; }
    .form-group input { padding: 12px; font-size: 14px; }
    .btn-entrar { padding: 12px; font-size: 14px; }
.login-links { font-size: 11px; margin-top: 10px; }
    
    /* TARJA AMARELA MOBILE - Ocultar colunas via classe */
    .hide-on-mobile {
        display: none !important;
    }
    
    .user-info-content {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .user-info-content::before {
        display: none;
    }
    
    .bico-card { grid-template-columns: 1fr; }
    .bico-valor-container { text-align: left; border-top: 1px solid #eee; padding-top: 10px; }
    .main-content { margin: 15px auto; }
    .section-title { font-size: 18px; flex-wrap: wrap; }
}

/* RESPONSIVO MOBILE PEQUENO */
@media (max-width: 480px) {
    .header { padding: 5px 10px; }
    .nav-btn { padding: 5px 7px; font-size: 10px; }
    .logo-container .logo-main { height: 170px; }
    .banner-login-section { padding: 10px; }
    .login-area-box { padding: 15px; }
    .main-content { margin: 10px auto; padding: 0 10px; }
    .bico-valor { font-size: 18px; }
    .paginacao { flex-wrap: wrap; }
    .paginacao a, .paginacao span { padding: 6px 10px; font-size: 12px; }
}