/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Cores Principais - Seguindo o padrão da imagem 2 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --success-color: #4CAF50;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --border-color: #dee2e6;
    --sidebar-bg: #ffffff;
    --sidebar-text: #6c757d;
    --sidebar-active: #4CAF50;
}

/* Layout Principal - Corrigindo o layout da sidebar */
#wrapper {
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    -webkit-transition: margin .25s ease-out;
    -moz-transition: margin .25s ease-out;
    -o-transition: margin .25s ease-out;
    transition: margin .25s ease-out;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar-wrapper .list-group {
    width: 15rem;
    background-color: transparent;
}

#page-content-wrapper {
    min-width: 100vw;
    background-color: #f8f9fa;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

/* Corrigindo os itens da sidebar */
.list-group-item {
    border: none;
    outline: none;
    background-color: transparent !important;
    color: var(--sidebar-text);
    padding: 0.75rem 1.25rem;
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.list-group-item:hover {
    background-color: rgba(76, 175, 80, 0.1) !important;
    color: var(--primary-color);
    transform: translateX(5px);
}

.list-group-item.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.list-group-item.text-danger {
    color: var(--danger-color) !important;
}

.list-group-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: var(--danger-color) !important;
}

/* Responsividade */
@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

/* Navbar superior */
.navbar {
    background-color: white !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .primary-text {
    color: var(--primary-color) !important;
}

.navbar .second-text {
    color: var(--sidebar-text) !important;
}

/* Cores de Texto */
.primary-text {
    color: var(--primary-color) !important;
}

.second-text {
    color: #6c757d !important;
}

/* Cards e Componentes */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background-color: white;
}

.card:hover {
    transform: translateY(-5px);
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    text-align: center;
    display: flex; /* Adicionado para alinhar conteúdo */
    flex-direction: column; /* Adicionado para alinhar conteúdo */
    align-items: center; /* Adicionado para alinhar conteúdo */
    justify-content: center; /* Adicionado para alinhar conteúdo */
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px; /* Quadrado com bordas arredondadas */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem; /* Centraliza o ícone */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Adicionando sombra para profundidade */
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

/* Formulários */
.form-control {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    background-color: white;
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Tabelas */
.table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: none;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 500;
    padding: 1rem;
    text-align: center;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid #f8f9fa;
    text-align: center;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-light th {
    background-color: #f8f9fa !important;
    color: var(--text-color) !important;
    border-bottom: 2px solid var(--primary-color);
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

/* Modais */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: 15px 15px 0 0;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 15px 15px;
    background-color: #f8f9fa;
}

/* Paginação */
.pagination .page-link {
    border-radius: 10px;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Estilos específicos para páginas de autenticação */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.btn-auth {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-auth:hover {
    background-color: #45a049;
}

.auth-links {
    text-align: center;
    margin-top: 2rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Estilos para a página pública */
.public-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.public-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.public-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.public-content {
    padding: 2rem;
}

/* Dashboard específico - seguindo o padrão da imagem 2 */
.dashboard-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.welcome-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #4CAF50;
}

.welcome-section h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-section .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    background: #d4edda;
    color: #155724;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    margin-top: 1rem;
}

.status-badge i {
    margin-right: 0.5rem;
}



/* Correções específicas para o problema visual */
.container-fluid {
    padding: 0;
}

.border-bottom {
    border-bottom: 1px solid var(--border-color) !important;
}

.h2 {
    color: var(--text-color);
    font-weight: 600;
}

/* Melhorias para a página de alimentos */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state i {
    color: var(--sidebar-text);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--sidebar-text);
    margin-bottom: 2rem;
}

/* Melhorias para botões de ação */
.btn-group .btn {
    margin: 0 2px;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Melhorias para a busca */
.form-control[type="text"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23999' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m11.25 11.25 3 3m-3-3a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Melhorias para o menu toggle */
#menu-toggle {
    cursor: pointer;
    transition: color 0.3s ease;
}

#menu-toggle:hover {
    color: var(--primary-color) !important;
}

/* Correções para dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
}

/* Estilos para autenticação com Google */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #ccc;
    text-decoration: none;
    color: #333;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Utilitários */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Responsividade adicional */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .public-container {
        padding: 1rem;
    }
    
    .public-header,
    .public-content {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-main {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Cache busting - versão 2.0 */
.cache-version-2-0 {
    display: none;
}



/* Dashboard - Estilos para um visual mais elegante */

/* Grid de Estatísticas */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza os balões */
    gap: 2rem; /* Aumenta o espaçamento entre os balões */
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 50%; /* Completamente redondo para o efeito 'balão' */
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Sombra mais pronunciada */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none; /* Remover borda */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px; /* Tamanho fixo para o balão */
    height: 180px; /* Tamanho fixo para o balão */
    flex-shrink: 0; /* Impede que os balões encolham */
}

.stat-card:hover {
    transform: translateY(-8px); /* Efeito de flutuação */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 80px; /* Aumentar o tamanho do ícone */
    height: 80px; /* Aumentar o tamanho do ícone */
    border-radius: 50%; /* Completamente redondo para o efeito 'balão' */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem; /* Aumentar o tamanho da fonte do ícone */
    margin: 0 auto 1rem; /* Centraliza o ícone */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Sombra para o ícone */
}

.stat-number {
    font-size: 2.2rem; /* Ajustar tamanho do número */
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.85rem; /* Ajustar tamanho do texto */
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats-grid {
        flex-direction: column; /* Empilha os balões verticalmente em telas pequenas */
        align-items: center;
    }
    .stat-card {
        width: 150px; /* Reduz o tamanho do balão em telas pequenas */
        height: 150px;
        padding: 1rem;
    }
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* Ações Rápidas */
.actions-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.actions-section h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.actions-list {
    display: grid;
    grid-template-columns: 1fr; /* Uma coluna para a lista de ações */
    gap: 1rem;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.action-item:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateX(5px);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.action-content h5 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: #2c3e50;
}

.action-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Seção de Indicações */
.referral-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #45a049 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.referral-section h3 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.referral-link-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.referral-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.referral-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
}

.copy-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bonus-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsividade para o novo layout */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr; /* Empilha em telas muito pequenas */
    }
    .actions-list {
        grid-template-columns: 1fr;
    }
    .welcome-section, .actions-section, .referral-section {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .welcome-section h1 {
        font-size: 1.8rem;
    }
    .welcome-section .subtitle {
        font-size: 1rem;
    }
    .stat-number {
        font-size: 2.2rem;
    }
    .stat-label {
        font-size: 0.85rem;
    }
    .action-item {
        flex-direction: column;
        text-align: center;
    }
    .action-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    .action-content h5 {
        font-size: 1rem;
    }
    .action-content p {
        font-size: 0.8rem;
    }
    .referral-input-group {
        flex-direction: column;
    }
    .copy-btn {
        width: 100%;
    }
}



/* Responsividade da Tabela de Alimentos */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 700px; /* Garante que a tabela não fique muito espremida em telas pequenas */
}

@media (max-width: 768px) {
    .table thead th,
    .table tbody td {
        white-space: nowrap; /* Evita que o texto quebre em várias linhas */
    }
}


