:root {
    --app-bg: #f4f7f6;
    --app-panel: #ffffff;
    --app-border: #dbe3e0;
    --app-text: #102a2a;
    --app-accent: #0f766e;
    --app-accent-hover: #115e59;
    --app-warm: #c2410c;
}

body.app-body {
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.05), rgba(194, 65, 12, 0.03)),
        var(--app-bg);
    color: var(--app-text);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.app-navbar {
    background: #102a2a;
}

.panel {
    background: var(--app-panel);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 42, 42, 0.05);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--app-accent);
}

.btn-primary {
    background: var(--app-accent);
    border-color: var(--app-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--app-accent-hover);
    border-color: var(--app-accent-hover);
}

.table > :not(caption) > * > * {
    padding: 0.75rem 0.85rem;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #51646a;
    border-bottom-width: 1px;
}

.products-panel {
    overflow: hidden;
}

.products-search-group {
    min-width: min(100%, 28rem);
}

.products-page-size {
    width: 7.5rem;
}

.products-table-shell {
    width: 100%;
    overflow: hidden;
}

.products-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.88rem;
}

.products-table thead th,
.products-table tbody td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
    vertical-align: top;
}

.products-table thead th {
    line-height: 1.2;
}

.products-table tbody td {
    line-height: 1.35;
}

.products-table thead th.products-sortable {
    cursor: pointer;
    user-select: none;
}

.products-table thead th[aria-sort="ascending"]::after {
    content: " ▲";
    font-size: 0.72em;
}

.products-table thead th[aria-sort="descending"]::after {
    content: " ▼";
    font-size: 0.72em;
}

.products-table tbody td.products-actions {
    width: 9.5rem;
    min-width: 9.5rem;
}

.products-table tbody td.products-actions .btn {
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products-table tbody td.products-actions form {
    margin: 0;
}

.products-pagination .page-link {
    min-width: 2.25rem;
    text-align: center;
}

.recipe-preview {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
}

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

.recipe-summary-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.recipe-summary-layout > .col-lg-8,
.recipe-summary-layout > .col-12.col-lg-8 {
    flex: 1 1 0;
    min-width: 0;
}

.recipe-summary-layout > .col-lg-4,
.recipe-summary-layout > .col-12.col-lg-4 {
    flex: 0 0 380px;
    max-width: 380px;
}

.recipe-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.recipe-summary-item {
    min-width: 0;
}

.recipe-summary-item--full {
    grid-column: 1 / -1;
}

.recipe-notes {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #f7fbfa;
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: normal;
}

.recipe-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.recipe-image-frame {
    position: relative;
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    overflow: hidden;
    background: #eef4f2;
    margin: 0 auto;
}

.recipe-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1199.98px) {
    .recipe-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .recipe-summary-layout > .col-lg-8,
    .recipe-summary-layout > .col-12.col-lg-8,
    .recipe-summary-layout > .col-lg-4,
    .recipe-summary-layout > .col-12.col-lg-4 {
        flex-basis: 100%;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .recipe-summary-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .recipe-summary-grid {
        grid-template-columns: 1fr;
    }
}

.form-label {
    font-weight: 600;
}

.select-search {
    position: relative;
}

.select-search__results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 25;
    max-height: 16rem;
    overflow-y: auto;
    box-shadow: 0 10px 24px rgba(16, 42, 42, 0.12);
}

.select-search__results .list-group-item {
    border-radius: 0;
}

.select-search__results .list-group-item:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.select-search__results .list-group-item:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.alert ul {
    padding-left: 1.2rem;
}
