.pedidos-dia-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "top top" "left right";
    gap: 20px;
    height: 750px;
}

.superior-pedido-dia {
    grid-area: top;
}

.esquerda-pedido-dia {
    grid-area: left;
}

.direita-pedido-dia {
    grid-area: right;
}

.superior-pedido-dia {
    grid-column: 1 / -1;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 20px;
    border: 1px solid #e4ecea;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 10px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.pedidos-dia-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    background: #e9f7ef;
    color: #004e4c;

    border: 1px solid #cfe7e3;
    border-radius: 10px;
    padding: 8px 14px;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;

    transition: all 0.2s ease;
}

.btn-voltar i {
    color: #00995d;
    font-size: 14px;
}

.btn-voltar:hover {
    background: #dff2eb;
    box-shadow: 0 4px 10px rgba(0, 153, 93, 0.2);
    transform: translateY(-1px);
}

/* ===== CARDS ===== */
.esquerda-pedido-dia,
.direita-superior-pedido-dia,
.direita-inferior-pedido-dia {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid #e4ecea;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.05);
    height: 100%;
    overflow: hidden;
}

.esquerda-pedido-dia {
    display: flex;
    flex-direction: column;
    height: 100%; /* impede crescer */
}

/* só a lista rola */
.esquerda-pedido-dia .lista-pedidos {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.direita-pedido-dia {
    display: grid;
    grid-template-rows: 65% 35%;
    gap: 20px;
    height: 100%; /* trava */
}

.direita-superior-pedido-dia {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.direita-superior-pedido-dia .grafico-container {
    flex: 1;
    overflow: hidden; /* nunca cria scroll no gráfico */
}

.direita-inferior-pedido-dia {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

/* ===== TÍTULOS ===== */
.esquerda-pedido-dia h2,
.direita-superior-pedido-dia h2,
.direita-inferior-pedido-dia h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 600;
    color: #004e4c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.esquerda-pedido-dia h2 i,
.direita-superior-pedido-dia h2 i,
.direita-inferior-pedido-dia h2 i {
    color: #00995d;
    font-size: 18px;
}

/* ===== COLUNA DIREITA ===== */
.direita-pedido-dia {
    display: grid;
    grid-template-rows: 64% 33%;
    gap: 24px;
}

/* ===== LISTA DE PEDIDOS ===== */
.lista-pedidos {
    overflow-y: auto;
    padding-right: 6px;
}

.pedido-item {
    background: #f9fbfa;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e2eeeb;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.pedido-item:hover {
    background: #f3f8f6;
    border-color: #cfe5df;
}

.pedido-nome {
    font-size: 14px;
    font-weight: 600;
    color: #2f3e3c;
    margin-bottom: 4px;
}

.pedido-itens {
    font-size: 13px;
    color: #5b6f6c;
    line-height: 1.5;
}

/* ===== GRÁFICO ===== */
.grafico-container {
    flex: 1;
    position: relative;
    padding-top: 8px;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== RELATÓRIOS ===== */
.direita-inferior-pedido-dia {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 18px 20px;
}

.relatorios-header {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 17px;
    font-weight: 600;
    color: #004e4c;

    /* ISSO É O PULO DO GATO */
    align-self: flex-start;
}

/* ÍCONE */
.relatorios-header i {
    color: #00995d;
    font-size: 18px;
}

/* AÇÕES CENTRALIZADAS */
.relatorios-acoes {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* BOTÕES */
.btn-download {
    background: none;
    text-align: left;
    padding: 8px;
    width: 100%;
    height: 70px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
}

/* ÍCONES */
.btn-download i {
    font-size: 22px;
}

/* PDF */
.btn-download.pdf {
    background: linear-gradient(135deg, #00995d, #007f50);
}

.btn-download.pdf:hover {
    box-shadow: 0 8px 18px rgba(0, 153, 93, 0.35);
    transform: translateY(-2px);
}

/* EXCEL */
.btn-download.excel {
    background: linear-gradient(135deg, #00734a, #005f3e);
}

.btn-download.excel:hover {
    box-shadow: 0 8px 18px rgba(0, 115, 74, 0.35);
    transform: translateY(-2px);
}

/* ===== SCROLL ===== */
.lista-pedidos::-webkit-scrollbar {
    width: 6px;
}

.lista-pedidos::-webkit-scrollbar-thumb {
    background: #cfe7e3;
    border-radius: 6px;
}
