:root {
    --paper: #fff;
    --ink: #000000;
    --muted: #000000;
    --line: #000000;
    --dash: #000000;
    --accentak: #fff;
    --ok: #00b894;
    --danger: #000000;
}

/* área do “cupom” */
.ak-receipt-wrapper {
    max-width: 420px;
    margin: 18px auto;
    background: var(--paper);
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 16px;
    position: relative;
    overflow: hidden;
}

/* “perfuração” do cupom (efeito lateral) */
.ak-receipt-wrapper:before,
.ak-receipt-wrapper:after {
    content: "";
    position: absolute;
    top: 70px;
    bottom: 70px;
    width: 14px;
    background:
        radial-gradient(circle at 7px 10px, transparent 7px, rgba(0, 0, 0, 0) 8px) repeat-y;
    background-size: 14px 20px;
    opacity: .55;
    pointer-events: none;
}

.ak-receipt-wrapper:before {
    left: -7px;
}

.ak-receipt-wrapper:after {
    right: -7px;
}

/* header/logo */
.ak-header {
    text-align: center;
    margin-bottom: 10px;
}

.ak-logo img {
    max-width: 140px;
    height: auto;
    margin: 0 auto 6px;
    display: block;
}

/* bloco do pedido */
.ak-order-title {
    text-align: center;
    border: 1px dashed var(--dash);
    border-radius: 10px;
    padding: 10px 10px;
    margin: 10px 0 12px;
    background-color: #000;
}

.ak-order-title strong {
    font-size: 25px;
    letter-spacing: .8px;
    color: var(--accentak);
    display: block;
}

.ak-order-title span {
    display: block;
    font-size: 14px;
    color: #fff;
    line-height: 10px;
}

/* divisores estilo cupom */
.ak-divider {
    height: 0;
    border: 0;
    border-top: 1px dashed var(--dash);
    margin: 12px 0;
}

/* títulos de seção */
.ak-section-title {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
    margin: 4px 0 8px;
}

/* linhas de info */
.ak-info-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.25;
}

.ak-info-row .ak-label {
    color: var(--muted);
}

.ak-info-row .ak-value {
    font-weight: 700;
    text-align: right;
    color: var(--ink);
}

.ak-info-row .ak-value[style*="text-align: left"] {
    font-weight: 600;
}

/* ===== LISTA DE ITENS EM FORMATO “COLUNAS” ===== */
.ak-section-itens {
    margin-top: 2px;
}

/* cabeçalho das colunas */
.ak-items-head {
    display: grid;
    grid-template-columns: 1fr 56px 92px;
    gap: 8px;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .9px;
    padding: 6px 0 8px;
    border-bottom: 1px solid var(--line);
}

.ak-items-head span:nth-child(2) {
    text-align: center;
}

.ak-items-head span:nth-child(3) {
    text-align: right;
}

/* item do pedido */
.ak-item-pedido {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

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

/* linha principal do item como grid (nome | qtd | total) */
.ak-item-header {
    display: grid;
    grid-template-columns: 1fr 56px 92px;
    gap: 8px;
    align-items: start;
}

.ak-item-nome {
    font-weight: 800;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.25;
}

.ak-item-nome small {
    display: block;
    margin-top: 2px;
    font-weight: 700;
    font-size: 10px;
    color: var(--accentak);
}

.ak-item-qtd {
    text-align: center;
    font-weight: 900;
    font-size: 12px;
    color: var(--ink);
}

.ak-item-preco {
    text-align: right;
    font-weight: 900;
    font-size: 12px;
    color: var(--ink);
}

/* metadados do item (unitário etc.) */
.ak-item-details {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--muted);
}

/* agrupadores (kit / extras) com destaque e recuo */
.ak-sub-container {
    margin-top: 8px;
    padding: 10px 10px;
    border: 1px dashed var(--dash);
    border-radius: 10px;
    background: #ffffff;
}

/* título do grupo */
.ak-sub-title {
    font-size: 10px;
    font-weight: 900;
    color: var(--accentak);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* itens internos (kit/extras): mantém padrão QTD e TOTAL */
.ak-sub-item {
    display: grid;
    grid-template-columns: 1fr 56px 92px;
    gap: 8px;
    font-size: 11px;
    padding: 4px 0;
    color: var(--ink);
    border-bottom: 1px dotted rgba(0, 0, 0, 0.65);
}

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

.ak-sub-item-name {
    color: var(--muted);
    line-height: 1.25;
}

.ak-sub-item-qtd {
    text-align: center;
    font-weight: 900;
    color: var(--ink);
}

.ak-sub-item-total {
    text-align: right;
    font-weight: 900;
    color: var(--ink);
}

/* extras com “faixa” lateral */
.ak-sub-container.ak-extras {
    border-left: 4px solid var(--accentak);
    background: #ffffff;
}

/* resumo financeiro */
.ak-section-resumo {
    margin-top: 8px;
}

.ak-resumo-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 5px 0;
    font-size: 12px;
}

.ak-resumo-row .ak-label {
    color: var(--muted);
}

.ak-resumo-row .ak-value {
    font-weight: 900;
    color: var(--ink);
}

.ak-resumo-row[style*="#e74c3c"] .ak-label,
.ak-resumo-row[style*="#e74c3c"] .ak-value {
    color: var(--danger) !important;
}

.ak-resumo-row.ak-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--ink);
    font-size: 16px;
}

/* status */
.ak-section-info .ak-info-row:last-child .ak-value {
    font-weight: 900;
}

/* impressão */
@media print {
    .ak-receipt-wrapper {
        box-shadow: none;
        border: 1px dashed var(--dash);
        margin: 0;
        max-width: 100%;
        border-radius: 0;
    }

    .ak-receipt-wrapper:before,
    .ak-receipt-wrapper:after {
        display: none;
    }
}

/* Item principal em uma linha: Qtd x Nome | Unit | Total */
.ak-item-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 2px 0;
}

.ak-item-line-left {
    flex: 1;
    min-width: 0;
    font-weight: 800;
    font-size: 12px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ak-item-line-mid {
    font-weight: 700;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.ak-item-line-right {
    font-weight: 900;
    font-size: 12px;
    color: var(--ink);
    white-space: nowrap;
    margin-left: auto;
}

/* variação (se existir) pode ficar logo abaixo, menor */
.ak-item-variation {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accentak);
}