/* Reset e Configurações Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --secondary: #2D3047;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--secondary);
}

.usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
}

/* Layout Principal */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    min-height: calc(100vh - 140px);
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    color: var(--secondary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botões */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Lista de Mesas */
.mesas-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.mesa-card {
    background: var(--light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.mesa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mesa-card.ocupada {
    background: #ffe6e6;
    border-color: var(--danger);
}

.mesa-card.livre {
    background: #e6ffe6;
    border-color: var(--success);
}

.mesa-card .numero {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary);
}

.mesa-card .status {
    font-size: 0.9rem;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}

.mesa-card.livre .status {
    background: var(--success);
    color: white;
}

.mesa-card.ocupada .status {
    background: var(--danger);
    color: white;
}

/* Área de Conteúdo */
.content-area {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

/* Container de Pedido */
.pedido-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    height: calc(100vh - 220px);
}

/* Produtos */
.produtos-section {
    overflow-y: auto;
}

.produtos-header {
    margin-bottom: 20px;
}

.produtos-header h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.categorias {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.categoria-btn {
    padding: 8px 15px;
    background: var(--light-gray);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.categoria-btn.active {
    background: var(--primary);
    color: white;
}

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.produto-card {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.produto-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.produto-card h4 {
    color: var(--secondary);
    margin-bottom: 5px;
    font-size: 1rem;
}

.produto-card .descricao {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.produto-card .preco {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Carrinho */
.carrinho-section {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.carrinho-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.carrinho-header h3 {
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.carrinho-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.carrinho-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrinho-item-info h4 {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 5px;
}

.carrinho-item-info .preco {
    color: var(--primary);
    font-weight: 600;
}

.carrinho-item-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantidade-controle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantidade-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantidade {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remover-btn {
    background: var(--danger);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrinho-footer {
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary);
}

.total span:last-child {
    color: var(--primary);
}

.vazio {
    text-align: center;
    color: var(--gray);
    padding: 40px 20px;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Formulários */
.form-container {
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-produto {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    color: var(--secondary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Responsividade */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .pedido-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .mesas-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .mesas-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.produto-card, .mesa-card {
    animation: fadeIn 0.3s ease-out;
}
/* Estilos para a gestão de produtos */
.produto-admin-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.produto-info h5 {
    margin: 0 0 5px 0;
    color: var(--secondary);
}

.produto-info .categoria,
.produto-info .preco,
.produto-info .status {
    display: inline-block;
    margin-right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.produto-info .categoria {
    background: #e3f2fd;
    color: #1976d2;
}

.produto-info .preco {
    background: #f3e5f5;
    color: #7b1fa2;
}

.produto-info .status.ativo {
    background: #e8f5e9;
    color: #388e3c;
}

.produto-info .status.inativo {
    background: #ffebee;
    color: #d32f2f;
}

.produto-acoes {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* Estilos para o modal de fechamento */
.resumo-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resumo-info h5 {
    margin: 0 0 5px 0;
    color: var(--secondary);
}

.resumo-info span {
    color: var(--gray);
    font-size: 0.9rem;
}

.resumo-total {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
}

.total-final {
    text-align: right;
    margin: 20px 0;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
}

.total-final h4 {
    color: var(--secondary);
    margin: 0;
}

.opcoes-pagamento {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    background: #e9ecef;
}

.radio-option input[type="radio"] {
    margin: 0;
}

/* Estilos para o carrinho */
.carrinho-item .subtotal {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 3px;
}

/* Indicador de mesa selecionada */
.mesa-card.selecionada {
    border: 3px solid var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

/* Menu admin no header */
.menu-admin {
    display: flex;
    gap: 10px;
}

/* Melhorias responsivas */
@media (max-width: 768px) {
    .pedido-container {
        grid-template-columns: 1fr;
    }
    
    .carrinho-section {
        margin-top: 20px;
    }
    
    .header {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .menu-admin {
        width: 100%;
        justify-content: center;
    }
}
/* Adicione ao CSS existente */

/* Botão amarelo/warning */
.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    color: #212529;
}

/* Estilo específico para o botão Liberar Mesa */
.btn-warning i {
    margin-right: 5px;
}

/* Destaque visual para mesa sem consumo */
.mesa-card.sem-consumo {
    border-left: 5px solid #ffc107;
    background: #fff8e1;
}

.mesa-card.sem-consumo .status {
    background: #ffc107;
    color: #212529;
}

/* Indicador visual no status da mesa */
.mesa-card .status.com-consumo {
    background: linear-gradient(45deg, #dc3545, #ff6b6b);
}

.mesa-card .status.sem-consumo {
    background: linear-gradient(45deg, #ffc107, #ffd54f);
}
