.recipe-pricing-card {
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 10px 35px rgba(15,23,42,0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pricing-card__divider {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 0.25rem 0 0.5rem;
}

.pricing-input-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.pricing-portion-row {
    grid-template-columns: minmax(220px, 320px);
}

.pricing-per-portion-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pricing-price-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pricing-pill-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.pricing-pill {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    min-height: 70px;
    text-align: center;
    background: #f3f4f6;
    color: #0f172a;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.pill-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.pill-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.pill-neutral {
    background: #f3f4f6;
}

.pill-info {
    background: #f3f4f6;
    color: #0f172a;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.pill-good {
    background: #22c55e;
    color: #052e16;
    box-shadow: inset 0 0 0 1px #16a34a;
}

.pill-medium {
    background: #fde68a;
    color: #713f12;
    box-shadow: inset 0 0 0 1px #eab308;
}

.pill-bad {
    background: #fca5a5;
    color: #7f1d1d;
    box-shadow: inset 0 0 0 1px #ef4444;
}

.margin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    min-height: 34px;
}

.self-cost-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 10px 35px rgba(15,23,42,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.self-cost-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.self-cost-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.self-cost-title {
    font-weight: 700;
    font-size: 1rem;
}

.self-cost-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.self-cost-value {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.self-cost-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.self-cost-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.self-cost-table-card {
    background: #f7f8fc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.self-cost-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.25rem;
    min-width: 480px;
}

.self-cost-table th,
.self-cost-table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.6rem;
    text-align: left;
    font-size: 0.95rem;
}

.self-cost-table th {
    background: #f8fafc;
    font-weight: 600;
}

.self-cost-table__empty {
    font-style: italic;
    color: #475569;
}

@media (max-width: 1023px) {
    .pricing-input-grid,
    .pricing-pill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-portion-row {
        grid-template-columns: minmax(220px, 320px);
    }

    .pricing-price-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .self-cost-values {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .pricing-input-grid,
    .pricing-pill-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .pricing-portion-row,
    .pricing-price-row {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

.ai-format-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.ai-format-dialog {
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.ai-format-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
}

.ai-format-body {
    padding: 1rem 1.25rem;
    overflow: auto;
}

.ai-format-footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.pricing-formula-hint {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.35;
}

.pricing-portion-row {
    align-items: end;
}

.pricing-portion-formula {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.35;
    align-self: center;
    padding-bottom: 0.2rem;
}

.pricing-netto-input input,
.pricing-netto-input .rz-inputtext {
    font-weight: 700;
}
