.user-info {
    text-align: right;
    font-size: 0.9rem;
    font-weight: 500;
}
@media (max-width: 768px) {
    .user-info {
        text-align: center !important;
    }
}

.saldo-destaque {
    color: var(--laranja-caixa);
    font-weight: 800;
    font-size: 1.35rem;
}

/* HEADER FLEX LAYOUT FIX */
.hub-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

/* SEGMENTED CONTROL NAVIGATION - UNIFIED VIA GLOBAL.CSS */
nav.tabs-container {
    margin-top: 10px;
    margin-bottom: 24px;
}

.painel {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.painel.active {
    display: block;
}

/* PREMIUM TITLES - COHESIVE */
h2 {
    font-weight: 800 !important;
    color: var(--azul-caixa) !important;
    font-size: 1.7rem !important;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.lojinha-panel-subtitle {
    font-size: 0.95rem;
    color: var(--texto-secundario);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.badge-cota {
    background: #fff7ed;
    color: var(--laranja-texto);
    border: 1px solid #fdba74;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================
   GAMIFIED VIP PROGRESS CARD - CAIXA BRANDED
   ========================================== */
.vip-card {
    background: linear-gradient(135deg, var(--azul-caixa) 0%, #001f3f 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.4s ease-out;
}

.vip-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(240, 130, 0, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.vip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.vip-title-group h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.5px;
    margin: 0;
}

.vip-title-group p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 2px 0 0 0;
}

.vip-badge-level {
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.1);
}

.vip-progress-container {
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

.vip-bar-outer {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.vip-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--laranja-caixa) 0%, #facc15 100%);
    border-radius: var(--radius-pill);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(240, 130, 0, 0.5);
}

.vip-milestones {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    font-weight: 600;
}

.vip-next-tier-info {
    font-size: 0.78rem;
    color: #e2e8f0;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

/* ==========================================
   VITRINE, CARDS, FILTROS E FAVORITOS
   ========================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--borda);
    background: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--texto-secundario);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--azul-claro);
    color: var(--azul-caixa);
}

.filter-btn.active {
    background: #fff7ed;
    border-color: var(--laranja-caixa);
    color: var(--laranja-texto);
    box-shadow: 0 4px 10px rgba(240, 130, 0, 0.15);
}

.grid-premios {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    align-items: stretch;
}

.card {
    background: white;
    border-radius: var(--radius-md) !important;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--borda) !important;
    border-left: none !important; /* Remove legacy hub left border */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--azul-claro) !important;
}

.card-img-wrapper {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-sm);
    background: var(--fundo-sutil);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--fundo-hover);
}

.card-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent !important;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.btn-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 1.25rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #cbd5e1 !important;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-fav:hover {
    transform: scale(1.15);
    background: white !important;
    color: #f43f5e !important;
    box-shadow: 0 6px 12px rgba(244, 63, 94, 0.15) !important;
}

.btn-fav.is-fav {
    color: #f43f5e !important;
    background: #fff1f2 !important;
    animation: heartPulse 0.4s ease-in-out;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: white !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    padding: 5px 10px !important;
    border-radius: var(--radius-pill) !important;
    z-index: 4;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25) !important;
    letter-spacing: 0.5px;
}

.countdown {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    color: #ef4444;
    margin-bottom: 10px;
    background: #fff5f5;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px dashed #fca5a5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.card h3 {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--texto) !important;
    margin-bottom: 6px !important;
    line-height: 1.25 !important;
}

.card .desc {
    font-size: 0.8rem;
    color: var(--texto-secundario) !important;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card .preco-riscado {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: auto !important;
    margin-bottom: 2px;
    display: block;
}

.card .preco {
    color: var(--azul-caixa) !important;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card .preco.is-promo {
    color: #ef4444 !important;
    font-size: 1.25rem !important;
    margin-top: 0;
}

.card .estoque {
    font-size: 0.72rem;
    color: var(--texto-secundario);
    margin-top: 8px;
    font-weight: 700;
}

/* FORMS */
.box-form {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--borda);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 200px;
    min-width: 0;
}

@media (max-width: 640px) {
    .form-group {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    .box-form {
        padding: 16px !important;
    }
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--azul-caixa);
    text-transform: uppercase;
}

.form-group input, .form-group select {
    padding: 10px 14px;
    border: 1.5px solid var(--borda);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
}
.form-group select {
    padding-right: 36px;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--laranja-caixa);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.box-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.box-form input[type="number"]::-webkit-outer-spin-button,
.box-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.box-form .btn-primary,
.box-form .btn-secondary {
    min-height: 44px;
    padding: 11px 16px;
    font-size: 0.94rem;
    white-space: nowrap;
}

.vitrine-footer {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--borda);
    font-size: 0.82rem;
    color: var(--texto-secundario);
    line-height: 1.6;
}

.vitrine-footer h4 {
    color: var(--azul-caixa);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.vitrine-footer ul {
    padding-left: 20px;
}

/* MODAL PRODUCT IMAGE FIT */
.modal-img-wrapper {
    width: 100%;
    max-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fundo-sutil);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--borda);
    overflow: hidden;
}

.modal-img-wrapper img {
    max-width: 100%;
    max-height: 210px;
    object-fit: contain;
}

/* TABLE CONTAINER & STACKED ACTIONS (NO SCROLLBAR) */
.table-container {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--borda);
    box-shadow: var(--shadow-sm);
    margin-top: 15px;
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

#tabela-master-container {
    table-layout: fixed;
    min-width: 560px;
}

th, td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--fundo-hover);
    font-size: 0.85rem;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    background: var(--azul-caixa);
    color: white;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 10px 6px;
}

.td-favs {
    text-align: center !important;
    white-space: nowrap !important;
}

.td-acoes {
    text-align: center !important;
    padding: 6px 2px !important;
}

.td-acoes-flex {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.td-acoes-flex button {
    padding: 4px 6px !important;
    font-size: 0.68rem !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 800 !important;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
    max-width: 82px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    text-align: center !important;
}
