/* Meus Pedidos - Página de listagem de pedidos do cliente */

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

body {
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    min-height: 100vh;
    padding: 0;
    font-size: 16px; */
}

.page-wrapper {
    /* margin-top: calc(var(--header-height) + 16rem); */
    margin-top: calc(var(--header-height) - 3rem);
}

.container {
    /* max-width: 640px;
    width: 100%;
    margin: 0 auto; */
}

/* Header */
.pedidos-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-voltar {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}

.btn-voltar:hover {
    opacity: 0.8;
}

.pedidos-titulo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pedidos-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Seções */
.secao-pedidos {
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-card);
    border-radius: 15px;
}

.secao-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.secao-titulo i {
    font-size: 1.4rem;
}

/* Botão Refresh */
.btn-refresh {
    margin-left: auto;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(25, 58, 132, 0.15);
}

.btn-refresh:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 58, 132, 0.25);
}

.btn-refresh:active {
    transform: translateY(0) scale(0.95);
}

.btn-refresh .icon {
    width: 2rem;
    height: 2rem;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.btn-refresh:hover .icon {
    transform: rotate(180deg);
}

.btn-refresh.refreshing .icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Lista de Pedidos */
.lista-pedidos {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Card de Pedido */
.pedido-card {
background: white;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.5s, box-shadow 0.5s;
}

.pedido-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.6rem 2rem;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.pedido-numero {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.pedido-numero i {
    color: var(--color-primary);
    font-size: 1.6rem;
}

.pedido-header-meta {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex: 1;
    justify-content: center;
}

.header-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: #64748b;
    padding: 0.4rem 0.9rem;
    background: white;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
}

.header-meta-item .icon {
    width: 1.4rem;
    height: 1.4rem;
    fill: var(--color-primary);
}

.status-badge {
    display: inline-block;
    padding: 0.6rem 1.3rem;
    border-radius: 1.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-badge.status-NOVO {
    background: #dbeafe;
    color: var(--color-primary);
}

.status-badge.status-PREPARO {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-PRONTO {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-ENTREGUE {
    background: #dcfce7;
    color: #166534;
}

.status-badge.status-CANCELADO {
    background: #fee2e2;
    color: #991b1b;
}

.pedido-card-body {
    padding: 2rem;
}

.pedido-tempo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    background: #eff6ff;
    border-radius: 0.9rem;
    border-left: 3px solid var(--color-primary);
    font-size: 1.3rem;
    font-weight: 500;
    color: #1e293b;
}

.pedido-tempo .icon {
    width: 1.6rem;
    height: 1.6rem;
    fill: var(--color-primary);
}

/* Mantém para compatibilidade (caso seja usado em outro lugar) */
.pedido-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.3rem;
    margin-bottom: 1.5rem;
    flex-direction: column;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.2rem;
    color: #64748b;
}

.meta-item i {
    color: var(--color-primary);
    font-size: 1.3rem;
}

.pedido-resumo {
    background: #f8fafc;
    border-radius: 0.9rem;
    padding: 1.4rem;
}

.resumo-itens {
    margin-bottom: 1.3rem;
}

/* Novo estilo detalhado dos itens */
.resumo-item-detalhado {
    padding: 1rem;
    border-left: 3px solid #e2e8f0;
    margin-bottom: 1.2rem;
    background: #ffffff;
    border-radius: 0.5rem;
}

.resumo-item-detalhado:last-child {
    margin-bottom: 0;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    justify-content: space-between;
}

.item-nome-principal {
    flex: 1;
    color: #0f172a;
    font-weight: 600;
    font-size: 1.5rem;
}

.item-preco {
    text-align: right;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.4rem;
    white-space: nowrap;
    margin-left: 1rem;
}

.item-detalhes {
    margin-left: 3.6rem;
    font-size: 1.3rem;
}

.detalhe-linha {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    color: #64748b;
}

.detalhe-linha i {
    margin-top: 0.2rem;
    color: #94a3b8;
    font-size: 1.2rem;
}

.detalhe-linha .icon {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--color-primary);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.detalhe-linha strong {
    color: #1e293b;
}

.detalhe-linha small {
    color: #059669;
    font-weight: 600;
    font-size: 10px;
}

.lista-adicionais {
    list-style: none;
    padding-left: 2.4rem;
    margin: 0.3rem 0 0.8rem 0;
}

.lista-adicionais li {
    color: #475569;
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}

.lista-adicionais small {
    color: #059669;
    font-weight: 600;
}

.obs-texto {
    color: #64748b;
    font-style: italic;
}

/* Estilos antigos para compatibilidade */
.resumo-item {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
    font-size: 1.4rem;
    color: #475569;
}

.resumo-item:last-child {
    margin-bottom: 0;
}

.item-qty {
    font-weight: 700;
    color: var(--color-primary);
    min-width: 36px;
    font-size: 1.5rem;
}

.item-nome {
    flex: 1;
    color: #1e293b;
}

.resumo-mais {
    font-size: 1.1rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.5rem;
    padding-left: 44px;
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.3rem;
    border-top: 2px solid #e2e8f0;
}

.resumo-total .total-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: #475569;
}

.resumo-total .total-valor {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
}

.pedido-card-footer {
    padding: 1.4rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-acompanhar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: -webkit-fill-available;
    padding: 1.2rem;
    background: white;
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 1rem;
    border: 1px solid var(--color-primary);
    font-size: 1.5rem;
    font-weight: 600;
    height: 2.5rem;
    transition: transform 0.2s, box-shadow 0.5s;
    box-shadow: 0 1px 12px rgba(37, 99, 235, 0.1);
}

.btn-acompanhar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-acompanhar:active {
    transform: translateY(0);
}

/* Pedido Finalizado */
.pedido-finalizado {
    opacity: 0.85;
}

.pedido-finalizado .pedido-card-header {
    background: #f1f5f9;
}

/* Sem Pedidos */
.sem-pedidos {
    background: white;
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.sem-pedidos i {
    font-size: 5rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.sem-pedidos h3 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.sem-pedidos p {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-voltar-cardapio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-voltar-cardapio:hover {
    transform: translateY(-2px);
}

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

.pedido-card {
    animation: fadeIn 0.3s ease backwards;
}

.pedido-card:nth-child(1) { animation-delay: 0.05s; }
.pedido-card:nth-child(2) { animation-delay: 0.1s; }
.pedido-card:nth-child(3) { animation-delay: 0.15s; }
.pedido-card:nth-child(4) { animation-delay: 0.2s; }
.pedido-card:nth-child(5) { animation-delay: 0.25s; }

/* Seção Conta */
.secao-conta {
    margin-bottom: 2.5rem;
}

.conta-card {
    background: white;
    border-radius: 1.2rem;
    padding: 1.8rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
}

.info-label i {
    font-size: 1.3rem;
    color: var(--color-primary);
}

.info-valor {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
}

.status-badge.status-ativo {
    background: #dcfce7;
    color: #166534;
    padding: 0.4rem 0.9rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Preferências Info */
.preferencias-info {
    text-align: center;
    padding: 2rem 1rem;
}

.preferencias-info i {
    font-size: 3.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.preferencias-info p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
}

/* ========== RESUMO DA CONTA - REDESIGN ========== */

/* Total Geral Destacado */
.conta-total-destaque {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(25, 58, 132, 0.25);
}

.total-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.conta-total-destaque .total-label {
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0.95;
    color: #ffffff;
}

.total-pedidos {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.conta-total-destaque .total-valor {
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

/* Divisor de Conta Wrapper */
.divisor-conta-wrapper {
    background: #f8fafc;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Divisor Toggle Button */
.divisor-toggle {
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.3rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.divisor-toggle:hover {
    background: #f8fafc;
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.divisor-toggle:active {
    transform: translateY(0);
}

.divisor-toggle .icon {
    width: 2rem;
    height: 2rem;
    fill: var(--color-primary);
}

.divisor-toggle .icon-chevron {
    width: 1.6rem;
    height: 1.6rem;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.divisor-toggle.active .icon-chevron {
    transform: rotate(180deg);
}

/* Divisor Content (Collapsible) */
.divisor-content {
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Legacy styles kept for backwards compatibility */
.conta-total-geral {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.conta-total-geral .label {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 0.5rem;
}

.conta-total-geral .valor {
    font-size: 2.5rem;
    font-weight: 700;
}

.divisor-conta {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.divisor-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.divisor-titulo i {
    color: var(--color-primary);
}

.divisor-controle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.divisor-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
}

.divisor-input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.divisor-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divisor-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.divisor-btn:active {
    transform: scale(0.95);
}

.divisor-input {
    width: 70px;
    height: 50px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 2px solid #cbd5e1;
    border-radius: 0.6rem;
    background: white;
    color: #1e293b;
}

.divisor-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.divisor-resultado {
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 0.9rem;
    padding: 1.3rem;
    text-align: center;
}

.divisor-resultado-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.divisor-resultado-valor {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.conta-itens-lista {
    margin-top: 1.5rem;
}

.conta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.conta-item:last-child {
    border-bottom: none;
}

.conta-item-info {
    flex: 1;
}

.conta-item-nome {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.3rem;
}

.conta-item-detalhes {
    font-size: 1rem;
    color: #64748b;
}

.conta-item-preco {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 480px) {
    .pedidos-header {
        padding: 1.5rem;
    }

    .pedidos-titulo {
        font-size: 1.7rem;
    }

    .btn-voltar {
        left: 1rem;
        font-size: 1rem;
    }

    .pedido-card-header,
    .pedido-card-body,
    .pedido-card-footer {
        padding: 1.3rem;
    }

    .pedido-meta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .secao-titulo {
        font-size: 1.3rem;
    }

    .divisor-controle {
        flex-direction: column;
        gap: 0.8rem;
    }

    .conta-total-geral .valor {
        font-size: 2rem;
    }

    .divisor-resultado-valor {
        font-size: 1.9rem;
    }
}
