* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #121418;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

.icone-laranja { color: #ff6400; }
.icone-verde { color: #2ed573; }
.icone-laranja-destaque { color: #ff6400; font-size: 2.5rem; margin-bottom: 12px; }

/* LOADER GLOBAL */
#global-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #121418;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 99999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#global-loader.hidden-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 45px; height: 45px;
    border: 4px solid rgba(255, 100, 0, 0.2);
    border-top-color: #ff6400;
    border-radius: 50%;
    animation: girar 0.8s linear infinite;
}

.loader-texto { color: #94a3b8; font-size: 0.95rem; }

@keyframes girar { to { transform: rotate(360deg); } }

/* TOAST NOTIFICAÇÕES */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1e293b;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    border-left: 4px solid #ff6400;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
}

.toast.erro { border-left-color: #ff4757; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* SELEÇÃO DE ESTABELECIMENTO */
.secao-atendente {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container-selecao {
    background: #1a1d24;
    border: 1px solid #2d3748;
    border-radius: 16px;
    padding: 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.header-selecao h2 { font-size: 1.3rem; margin-bottom: 6px; }
.header-selecao p { color: #94a3b8; font-size: 0.85rem; margin-bottom: 24px; }

.grid-lojas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.card-loja-opcao {
    background: #242933;
    border: 1px solid #374151;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.card-loja-opcao:hover {
    border-color: #ff6400;
    background: #2b323f;
}

.card-loja-opcao i { font-size: 1.4rem; color: #ff6400; }
.card-loja-opcao h4 { font-size: 0.95rem; font-weight: 600; }
.card-loja-opcao small { color: #94a3b8; font-size: 0.75rem; }

.btn-secundario-sair {
    background: transparent;
    border: 1px solid #374151;
    color: #94a3b8;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-secundario-sair:hover { color: #ff4757; border-color: #ff4757; }

/* LAYOUT DO APP ATENDENTE */
.app-atendente-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-bottom: 80px;
}

.header-atendente {
    background: #1a1d24;
    border-bottom: 1px solid #2d3748;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-info-loja h1 { font-size: 1.1rem; font-weight: 600; color: #fff; }
.header-info-loja span { font-size: 0.75rem; color: #ff6400; }

.header-acoes { display: flex; gap: 8px; }

.btn-icone-header {
    background: #242933;
    border: 1px solid #374151;
    color: #e2e8f0;
    width: 38px; height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-icone-header:hover { border-color: #ff6400; color: #ff6400; }

/* BARRA DE FILTROS */
.barra-filtros {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: #15181e;
    overflow-x: auto;
}

.btn-filtro {
    background: #242933;
    border: 1px solid #374151;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}

.btn-filtro.ativo {
    background: #ff6400;
    color: #fff;
    border-color: #ff6400;
    font-weight: 500;
}

/* GRID DE COMANDAS */
.main-comandas {
    padding: 20px;
    flex: 1;
}

.grid-comandas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card-comanda {
    background: #1a1d24;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.card-comanda:hover {
    transform: translateY(-2px);
    border-color: #ff6400;
}

.card-comanda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-mesa {
    background: rgba(255, 100, 0, 0.15);
    color: #ff6400;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.card-comanda-cliente {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.card-comanda-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #242933;
    padding-top: 10px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.card-comanda-total {
    font-size: 1rem;
    font-weight: 700;
    color: #2ed573;
}

.estado-vazio {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.estado-vazio i { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }

/* BOTÃO FLUTUANTE */
.btn-flutuante-adicionar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff6400;
    color: #fff;
    border: none;
    padding: 14px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 100, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 90;
}

.btn-flutuante-adicionar:hover { transform: scale(1.04); }

/* MODAIS GERAIS */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-card {
    background: #1a1d24;
    border: 1px solid #2d3748;
    border-radius: 14px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-fechar-modal {
    background: none; border: none;
    color: #94a3b8; font-size: 1.5rem;
    cursor: pointer;
}

.modal-body { padding: 20px; overflow-y: auto; }

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #2d3748;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.input-padrao {
    width: 100%;
    background: #242933;
    border: 1px solid #374151;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 6px;
}

.input-padrao:focus { outline: none; border-color: #ff6400; }

.btn-confirmar, .btn-confirmar-fechamento {
    background: #ff6400;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancelar {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #374151;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

/* MODAL DE EDIÇÃO DA COMANDA (SPLIT VIEW) */
.modal-full-mobile {
    max-width: 900px;
    height: 85vh;
}

.modal-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
}

.col-comanda-itens, .col-comanda-catalogo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.lista-itens-consumo {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #2d3748;
    border-radius: 8px;
    padding: 10px;
    background: #15181e;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-linha-consumo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e2430;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.resumo-total-comanda {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding-top: 10px;
}

.resumo-total-comanda strong { color: #2ed573; }

.filtros-categorias-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pill-cat {
    background: #242933;
    border: 1px solid #374151;
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.pill-cat.ativa { background: #ff6400; color: #fff; border-color: #ff6400; }

.grid-produtos-rapidos {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    padding-right: 4px;
}

.card-prod-rapido {
    background: #242933;
    border: 1px solid #374151;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: 0.15s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-prod-rapido:hover { border-color: #ff6400; }
.card-prod-rapido h5 { font-size: 0.8rem; margin-bottom: 4px; color: #fff; }
.card-prod-rapido span { font-size: 0.8rem; color: #ff6400; font-weight: 600; }

.btn-fechar-conta {
    background: #2ed573;
    color: #0b381a;
    font-weight: 600;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.total-destaque { color: #2ed573; font-size: 2rem; margin-top: 6px; }

/* ABAS DE SELEÇÃO NO HUB INICIAL */
.abas-selecao-container {
    display: flex;
    gap: 8px;
    background: #242933;
    padding: 6px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.btn-aba-selecao {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-aba-selecao.ativo {
    background: #ff6400;
    color: #ffffff;
    font-weight: 600;
}

.card-convite-recebido {
    background: #242933;
    border: 1px solid rgba(234, 179, 8, 0.3);
    padding: 16px;
    border-radius: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-convite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-convite-header h4 {
    font-size: 0.95rem;
    color: #ffffff;
}

.card-convite-acoes {
    display: flex;
    gap: 8px;
}

.btn-aceitar-mini {
    flex: 1;
    background: #2ed573;
    color: #0b381a;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-recusar-mini {
    background: transparent;
    color: #ff4757;
    border: 1px solid #ff4757;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
    .modal-full-mobile { height: 95vh; max-height: 95vh; }
    .modal-split-view { grid-template-columns: 1fr; overflow-y: auto; }
    .col-comanda-itens { max-height: 200px; }
}