/* =========================================
   1. CORE & RESET
   ========================================= */
:root {
    /* Cores Gerais */
    --olive-dark: #2F3E22;    /* Verde Muito Escuro (Textos/Headers) */
    --olive-main: #3A4B35;    /* Verde Oliva (Fundo Hero / Botões) */
    --gold-main: #C5A059;     /* Dourado (Destaques) */
    --text-main: #333333;     /* Texto Padrão */
    --bg-light: #F4F4F0;      /* Fundo do Cardápio (Creme) */
    
    /* Variáveis de Layout */
    --radius: 20px;
    --shadow-soft: 0 10px 30px rgba(47, 62, 34, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* PADRÃO (CLIENTE): Fundo Claro */
body {
    background-color: var(--bg-light);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    line-height: 1.5;
}

/* Links e Listas */
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* =========================================
   2. CARDÁPIO CLIENTE (VISUAL "EXPERIENCE")
   ========================================= */

/* Hero Section (Topo Verde Arredondado) */
.hero-banner {
    background-color: var(--olive-main);
    padding: 50px 20px 80px;
    text-align: center;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    margin-bottom: -40px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: white;
}
.logo-display { 
    font-family: 'Playfair Display', serif; font-size: 2.8rem; 
    color: var(--gold-main); font-weight: 700; letter-spacing: 2px; 
}
.subtitle-display { 
    font-size: 0.8rem; letter-spacing: 3px; 
    color: rgba(255,255,255,0.8); text-transform: uppercase; margin-top: 5px; 
}

/* Títulos de Categoria */
.category-title {
    font-family: 'Playfair Display', serif; font-size: 1.6rem; 
    color: var(--olive-dark); margin: 40px 0 20px; 
    padding-left: 15px; border-left: 4px solid var(--gold-main);
}

/* Grid de Produtos */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 colunas */
    gap: 15px;
    padding-bottom: 120px; /* Espaço para o carrinho flutuante */
}
@media (min-width: 768px) {
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
}

/* --- CARD DO PRODUTO --- */
.dish-card {
    position: relative;
    width: 100%;
    height: 250px;        /* ALTURA FIXA */
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-soft);
}

.dish-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}
.dish-card:hover .dish-img { transform: scale(1.05); }

/* Overlay Escuro */
.dish-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 70%;
    background: linear-gradient(to top, rgba(30, 40, 20, 0.95) 10%, transparent);
    pointer-events: none;
    z-index: 1;
}

/* Informações */
.dish-info {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px;
    color: white; z-index: 2;
}
.dish-title { 
    font-family: 'Playfair Display', serif; font-size: 1rem; 
    margin-bottom: 5px; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.dish-price { font-size: 0.95rem; font-weight: 700; color: var(--gold-main); }

/* Botões do Card */
.btn-add {
    position: absolute; bottom: 12px; right: 12px; z-index: 3;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.25); 
    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.5);
    color: white; font-size: 1.4rem; 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.btn-add:active, .btn-add.added { background: var(--gold-main); color: var(--olive-dark); border-color: var(--gold-main); }

.btn-info {
    position: absolute; bottom: 12px; right: 60px; z-index: 3;
    width: 32px; height: 32px; border-radius: 50%;
    background: transparent; border: none;
    color: rgba(255,255,255,0.7); font-weight: bold; font-family: serif; font-size: 1rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Camada de Descrição (Slide Up) */
.dish-desc-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(47, 62, 34, 0.95);
    padding: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    color: #EEE;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 5;
}
.dish-card.show-details .dish-desc-layer { transform: translateY(0); }
.btn-close-desc { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; margin-top: 10px; }

/* Carrinho Flutuante */
.float-cart {
    position: fixed; bottom: 25px; left: 5%; width: 90%;
    background: var(--olive-dark); color: white;
    padding: 15px 25px; border-radius: 50px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 90; cursor: pointer;
}
.cart-badge { background: var(--gold-main); color: var(--olive-dark); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* BOTÃO FLUTUANTE DE RASTREAMENTO */
.floating-tracker {
    position: fixed; 
    bottom: 95px; /* Acima do carrinho */
    right: 20px; 
    z-index: 95;
    background: var(--gold-main);
    color: var(--olive-dark);
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
    border: 2px solid white;
    animation: bounceIn 0.5s;
    transition: transform 0.2s;
}
.floating-tracker:active { transform: scale(0.95); }
.floating-tracker i { font-style: normal; font-size: 1.2rem; }
@keyframes bounceIn { 0% { transform: scale(0); } 80% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Botões de Quantidade (+/-) no Carrinho */
.qty-btn {
    width: 30px; height: 30px;
    border-radius: 50%; border: none;
    font-weight: bold; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.qty-minus { background: #EEE; color: #555; }
.qty-plus { background: var(--olive-main); color: white; }
.qty-minus:active, .qty-plus:active { transform: scale(0.9); }

/* =========================================
   3. MODAIS & FORMULÁRIOS
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 2000; display: none; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: white; width: 90%; max-width: 450px;
    border-radius: 20px; padding: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4); max-height: 90vh; overflow-y: auto;
}

.form-input {
    width: 100%; padding: 14px; border: 1px solid #DDD;
    background: #FAFAFA; border-radius: 10px; margin-bottom: 15px;
    font-family: 'Montserrat'; font-size: 0.95rem; color: #333;
}
.btn-submit { width: 100%; padding: 16px; background: var(--olive-dark); color: white; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn-outline { width: 100%; padding: 12px; border: 1px solid var(--olive-dark); color: var(--olive-dark); background: transparent; border-radius: 12px; margin-top: 10px; font-weight: 600; cursor: pointer; }

/* Toast Notification */
.toast { position: fixed; top: 30px; left: 50%; transform: translateX(-50%); background: var(--olive-dark); color: white; padding: 12px 25px; border-radius: 30px; z-index: 3000; opacity: 0; transition: 0.3s; }
.toast.show { opacity: 1; top: 40px; }

/* =========================================
   4. MODAL DE RASTREAMENTO (TIMELINE)
   ========================================= */
.tracking-container { text-align: center; padding: 20px 10px; }
.tracking-title { font-family: 'Playfair Display', serif; color: var(--olive-dark); font-size: 1.5rem; margin-bottom: 30px; }

.timeline {
    position: relative; display: flex; flex-direction: column; align-items: flex-start;
    gap: 30px; padding-left: 20px; border-left: 2px solid #E0E0E0; margin-left: 20px;
}

.timeline-step { position: relative; padding-left: 20px; opacity: 0.5; transition: all 0.4s ease; }
.timeline-step::before {
    content: ''; position: absolute; left: -26px; top: 5px;
    width: 14px; height: 14px; background: #FFF; border: 3px solid #CCC;
    border-radius: 50%; z-index: 2; transition: all 0.4s ease;
}

.step-label { font-weight: 700; font-size: 1.1rem; color: #555; display: block; }
.step-desc { font-size: 0.85rem; color: #888; }

/* Estado Ativo */
.timeline-step.active { opacity: 1; }
.timeline-step.active::before {
    background: var(--gold-main); border-color: var(--gold-main);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.2); transform: scale(1.2);
}
.timeline-step.active .step-label { color: var(--olive-dark); }

/* Pulso na etapa atual */
.timeline-step.current::before { animation: pulseStep 1.5s infinite; }
@keyframes pulseStep {
    0% { box-shadow: 0 0 0 0 rgba(58, 75, 53, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(58, 75, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(58, 75, 53, 0); }
}

.cancelled-msg {
    color: #D32F2F; font-weight: bold; background: #FFEBEE;
    padding: 15px; border-radius: 10px; margin-top: 20px; display: none;
}

/* =========================================
   5. PAINEL DO BARMAN (DARK OLIVE FUSION)
   ========================================= */

/* Fundo Escuro */
.barman-bg {
    background-color: #2F3E22; 
    background-image: radial-gradient(circle at top right, #3A4B35 0%, #2F3E22 100%);
    min-height: 100vh; color: #F4F4F0;
}

/* Header Transparente */
.admin-nav {
    background: rgba(0,0,0,0.25); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}

/* Grid */
.barman-layout {
    display: grid; grid-template-columns: 2fr 1fr;
    gap: 30px; max-width: 1600px; margin: 30px auto; padding: 0 20px;
}
@media (max-width: 1100px) { .barman-layout { grid-template-columns: 1fr; } }

/* Colunas Glass */
.panel-col {
    background: rgba(0, 0, 0, 0.25); border-radius: 20px; padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05);
}
.col-head {
    font-family: 'Montserrat', sans-serif; font-size: 1.1rem; 
    color: var(--gold-main); text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
    margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid rgba(197, 160, 89, 0.3);
    display: flex; justify-content: space-between;
}

/* Tickets */
.ticket {
    background: #F4F4F0; color: #333;
    border-radius: 12px; margin-bottom: 20px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-left: 8px solid #CCC; transition: transform 0.2s;
}
.ticket:hover { transform: translateY(-3px); }

.ticket.status-pending { border-left-color: #F57C00; }
.ticket.status-preparing { border-left-color: #2F3E22; }
.ticket.status-call { border-left-color: #C5A059; animation: pulseGold 2s infinite; background: #FFFCF2; }
@keyframes pulseGold { 0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5); } 70% { box-shadow: 0 0 0 15px rgba(197, 160, 89, 0); } }

/* Ticket Content */
.ticket-header {
    padding: 10px 20px; background: #E8EAE6; border-bottom: 1px solid #DDD;
    display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: #555;
    text-transform: uppercase;
}
.ticket.status-call .ticket-header { background: #C5A059; color: #2F3E22; }

.ticket-content { padding: 20px; }
.ticket-client { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: #2F3E22; display: block; margin-bottom: 10px; }
.ticket-item { font-size: 1rem; padding: 5px 0; border-bottom: 1px dashed #DDD; display: flex; align-items: center; }
.ticket-item strong { background: #2F3E22; color: #C5A059; padding: 2px 8px; border-radius: 4px; margin-right: 10px; font-size: 0.9rem; }

.ticket-obs {
    background: #FFF3CD; color: #856404; padding: 10px; border-radius: 8px;
    margin-top: 15px; font-size: 0.9rem; font-weight: 600; border: 1px solid #FFEEBA;
}

/* Ticket Actions */
.ticket-actions { padding: 15px 20px; background: #FFF; border-top: 1px solid #EEE; display: flex; gap: 10px; flex-wrap: wrap; }
.act-btn { flex: 1; padding: 12px; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; text-transform: uppercase; font-size: 0.85rem; min-width: 100px; }
.btn-green { background: #3A4B35; color: white; }
.btn-gold { background: #C5A059; color: #2F3E22; }
.btn-gray { background: #EEE; color: #555; }
