/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS & VARIÁVEIS (TEMA ALAGOAS PIZZA)
   ========================================================================== */
:root {
    /* Cores da Identidade Visual */
    --brand-orange-start: #ffffff;
    --brand-orange-end: #F2A900;   /* Laranja da Logo */
    --brand-blue: #006080;         /* Azul da Logo */
    --brand-brown: #6d3b00;        /* Sombra/Contorno */
    
    /* Cores de Fundo e Texto */
    --bg-main: #212121;
    --bg-card: #333333;
    --text-light: #ffffff;
    
    /* Cores do Admin */
    --admin-bg: #f0f2f5;
    --admin-sidebar: #2c3e50;
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-light); 
    margin: 0; 
    padding-bottom: 80px; 
}

/* ==========================================================================
   2. HEADER E LOGO
   ========================================================================== */
header { 
    background-color: #000; 
    padding: 10px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 3px solid var(--brand-orange-end); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.logo-container { display: flex; align-items: center; }
.logo-img { max-height: 110px; width: auto; object-fit: contain; }
.info-header { font-size: 0.8rem; color: #ccc; text-align: right; }

/* Títulos com Degradê da Marca */
h1, h2, .intro-title h2 {
    background: linear-gradient(to bottom, var(--brand-orange-start) 20%, var(--brand-orange-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(1px 2px 0px var(--brand-brown));
    text-transform: uppercase;
    font-weight: 900;
}

.container { max-width: 600px; margin: 0 auto; padding: 20px; }

/* Animações */
.step { display: none; animation: fadeIn 0.5s; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   3. COMPONENTES DO CLIENTE (LOJA)
   ========================================================================== */

/* Hero Banner */
.hero-banner { text-align: center; margin-top: 40px; }
.hero-banner h1 { font-size: 2.5rem; margin-bottom: 10px; }
.store-info { background: var(--bg-card); padding: 20px; border-radius: 15px; margin: 30px 0; text-align: left; border: 1px solid #444; }
.store-info p { border-bottom: 1px solid #444; padding-bottom: 5px; margin: 10px 0; }

/* Cards (Categorias, Tamanhos, Bebidas) */
.categories-grid, .sizes-grid, .drink-grid { 
    display: grid; gap: 15px; margin-top: 20px; 
}
.categories-grid, .drink-grid { grid-template-columns: repeat(2, 1fr); }

.category-card, .size-card, .drink-card { 
    background: var(--bg-card); 
    padding: 20px; 
    border-radius: 15px; 
    border: 2px solid #444; 
    transition: all 0.3s ease; 
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.size-card { display: flex; justify-content: space-between; align-items: center; text-align: left; }

/* Efeito Hover/Active nos Cards */
.category-card:hover, .size-card:hover, .drink-card:hover,
.category-card.active, .size-card.selected, .drink-card.selected {
    border-color: var(--brand-orange-end);
    background-color: #3a3a3a;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(242, 169, 0, 0.4);
}

.cat-icon { font-size: 40px; display: block; margin-bottom: 10px; }
.size-price, .flavor-price { font-size: 1.1rem; font-weight: bold; color: var(--brand-blue); }

/* Lista de Sabores */
.sticky-header { position: sticky; top: 0; background: var(--bg-main); z-index: 10; padding-bottom: 10px; border-bottom: 1px solid #333; }
.category-title { color: var(--brand-orange-end); margin: 20px 0 10px; border-bottom: 1px solid #444; text-transform: uppercase; font-size: 1rem; }

.flavor-item { 
    background: var(--bg-card); 
    padding: 15px; 
    margin-bottom: 10px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    border: 2px solid transparent; 
    transition: 0.3s; 
}
.flavor-item:hover { background-color: #3a3a3a; }
.flavor-item.selected { border-color: var(--brand-orange-end); background: #332b00; }

.flavor-img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin-right: 15px; border: 2px solid #555; }
.flavor-info { flex: 1; }
.flavor-info h4 { margin: 0; color: var(--brand-orange-end); font-size: 1rem; }
.flavor-info p { margin: 5px 0 0; font-size: 0.75rem; color: #aaa; }

.check-icon {
    width: 25px; height: 25px; border-radius: 50%; border: 2px solid #555;
    display: flex; align-items: center; justify-content: center; color: transparent; font-size: 14px;
}
.flavor-item.selected .check-icon {
    background-color: var(--brand-orange-end);
    border-color: var(--brand-orange-end);
    color: var(--brand-brown);
    font-weight: bold;
}

/* ==========================================================================
   4. BOTÕES E RODAPÉ
   ========================================================================== */

/* Botões Principais (Laranja 3D) */
.btn-large, .btn-primary, #intro-btn {
    width: 100%; padding: 15px; font-size: 1.1rem;
    background: linear-gradient(to right, var(--brand-orange-end), #ffc107);
    color: var(--brand-brown);
    border: none; border-radius: 30px;
    font-weight: 900; text-transform: uppercase;
    cursor: pointer; 
    box-shadow: 0 4px 0px #b37400;
    transition: all 0.1s;
}
.btn-large:active, .btn-primary:active { transform: translateY(4px); box-shadow: none; }

.action-footer { display: flex; gap: 10px; margin-top: 20px; }
.btn-secondary { flex: 1; padding: 15px; background: #555; color: white; border: none; border-radius: 8px; cursor: pointer; }

/* Botão Azul (+ Add) */
.btn-add {
    background-color: var(--brand-blue);
    color: white; padding: 8px 15px; border-radius: 20px; font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Carrinho Flutuante */
#cart-btn { 
    position: fixed; bottom: 40px; right: 20px; 
    background: var(--brand-orange-end); color: var(--brand-brown); 
    padding: 15px; border-radius: 50%; font-size: 24px; 
    cursor: pointer; box-shadow: 0 4px 0px #b37400; z-index: 100; 
}

/* Rodapé do Desenvolvedor (Discreto) */
.dev-footer {
    position: fixed; bottom: 10px; left: 0; width: 100%;
    text-align: center; color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem; font-weight: 300;
    z-index: 9999; pointer-events: none;
}
.dev-footer span { color: rgba(255, 255, 255, 0.4); font-weight: 500; }

/* Modal do Carrinho */
.modal { display: none; position: fixed; z-index: 200; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); }
.modal-content { background: #222; margin: 10% auto; padding: 20px; width: 90%; max-width: 400px; border-radius: 12px; color: white; }
.close { float: right; font-size: 28px; cursor: pointer; }
input { width: 100%; padding: 12px; margin: 5px 0; background: #333; border: 1px solid #444; color: white; border-radius: 5px; box-sizing: border-box; }
.btn-success { width: 100%; padding: 15px; background: #25D366; color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; margin-top: 10px; }

/* ==========================================================================
   5. ADMIN (DASHBOARD E GESTÃO)
   ========================================================================== */
.admin-body { background-color: var(--admin-bg); color: #333; display: flex; height: 100vh; overflow: hidden; }
.admin-container { display: flex; width: 100%; }

.sidebar { width: 250px; background-color: var(--admin-sidebar); color: white; padding: 20px; display: flex; flex-direction: column; }
.sidebar h2 { margin-bottom: 30px; text-align: center; color: var(--brand-orange-end); }
.sidebar ul { list-style: none; padding: 0; }
.sidebar li { margin-bottom: 15px; }
.sidebar a { color: #ecf0f1; text-decoration: none; font-size: 16px; display: block; padding: 10px; border-radius: 5px; }
.sidebar a:hover, .sidebar a.active { background-color: #34495e; border-left: 4px solid var(--brand-orange-end); }

.content { flex: 1; padding: 30px; overflow-y: auto; }

/* Header do Dashboard */
.dashboard-header {
    display: flex; justify-content: space-between; align-items: center;
    background: white; padding: 20px; border-radius: 10px;
    margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.subtitle { color: #7f8c8d; font-size: 0.9rem; margin-top: 5px; }

/* Filtros */
.date-filter { display: flex; gap: 10px; align-items: center; background: #f8f9fa; padding: 10px; border-radius: 8px; }
.date-filter input { padding: 8px; border: 1px solid #ddd; border-radius: 5px; color: #555; }
.btn-filter { background: var(--admin-sidebar); color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; }

/* KPIs (Cards Coloridos) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.kpi-card, .card {
    background: white; padding: 20px; border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-top: 4px solid var(--brand-orange-end); /* Detalhe Laranja */
}
.kpi-card { display: flex; align-items: center; gap: 20px; }
.kpi-card .icon { font-size: 2.5rem; background: #fff3e0; padding: 15px; border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; }
.kpi-card h3 { font-size: 0.9rem; text-transform: uppercase; color: #7f8c8d; margin-bottom: 5px; }
.kpi-card p { font-size: 1.8rem !important; color: var(--admin-sidebar); margin: 0; }
.kpi-card small { color: #27ae60; font-weight: bold; font-size: 0.8rem; }

/* Gráficos */
.charts-container { display: flex; flex-direction: column; gap: 20px; }
.chart-row { display: flex; gap: 20px; flex-wrap: wrap; }
.chart-box { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); flex: 1; min-width: 300px; }
.chart-box.big { flex: 2; } 
.chart-box.small { flex: 1; }

/* Tabelas e Listas */
.orders-list { background: white; padding: 20px; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
table th, table td { text-align: left; padding: 12px; border-bottom: 1px solid #eee; }

/* Botões de Ação Admin */
.btn-action { padding: 8px 12px; border: none; border-radius: 5px; cursor: pointer; font-size: 1.2rem; margin-right: 5px; }
.btn-print { background-color: #3498db; color: white; }
.btn-check { background-color: #2ecc71; color: white; }

/* Itens de Configuração */
.config-item { display: flex; gap: 10px; margin-bottom: 10px; padding: 10px; background: #f8f9fa; border-radius: 5px; align-items: center; }
.config-item input, .config-item select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; }

/* --- ÁREA DO GARÇOM --- */
.waiter-header { background: var(--admin-sidebar); padding: 15px; color: white; text-align: center; border-bottom: 3px solid var(--brand-orange-end); }
.table-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.table-btn { padding: 15px; background: #333; color: white; border: 2px solid #555; border-radius: 8px; cursor: pointer; text-align: center; font-weight: bold; }
.table-btn.active { background: var(--brand-orange-end); border-color: #d35400; color: #fff; text-shadow: 1px 1px 0 #000; }
.table-btn.occupied { border-color: #e74c3c; color: #e74c3c; background: rgba(231, 76, 60, 0.1); }

/* ==========================================================================
   CORREÇÃO VISUAL PARA O ADMIN (CAMPOS DE EDIÇÃO)
   ========================================================================== */

/* Garante que a área de configuração tenha fundo legível */
#config-area {
    background-color: #f4f4f4; /* Fundo cinza claro para a área de edição */
    color: #333; /* Texto preto */
    padding: 20px;
    border-radius: 10px;
}

/* Estilo dos itens de configuração (linhas de edição) */
.config-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #ffffff; /* Fundo branco para cada item */
    border: 1px solid #ddd;
    border-radius: 8px;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Campos de entrada (Input) no Admin */
.config-item input[type="text"], 
.config-item input[type="number"],
.config-item select {
    background-color: #fff !important; /* Força fundo branco */
    color: #333 !important; /* Força texto escuro */
    border: 1px solid #ccc !important;
    padding: 8px;
    border-radius: 4px;
    width: auto;
    flex: 1; /* Ocupa o espaço disponível */
}

/* Botões de Remover (X) */
.config-item button {
    background-color: #e74c3c !important;
    color: white !important;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Títulos das seções no Admin */
#config-area h3 {
    color: var(--brand-blue); /* Azul da marca */
    border-bottom: 2px solid var(--brand-orange-end);
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 1.1rem;
}

/* Área de "Novo Item" */
.new-item-area {
    background-color: #e8f6f3; /* Fundo verde/azul bem claro */
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #2ecc71;
    margin-top: 20px;
}

/* FORÇAR CAMPOS BRANCOS NO ADMIN */
.config-item input, 
.new-item-area input, 
.new-item-area select,
#config-area input {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #ccc !important;
}