:root {
    --brand-primary: #001E4B;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-v30-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-v30-latin-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-v30-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: Montserrat, sans-serif;
    background-color: #f3f5f8;
    color: #10213f;
    margin: 0;
}

.bg-brand {
    background-color: var(--brand-primary) !important;
}

.btn-brand {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: #0a2d67;
    border-color: #0a2d67;
    color: #fff;
}

.btn-outline-brand {
    background: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background-color: var(--brand-primary);
    color: #fff;
}

.section-header {
    background: linear-gradient(90deg, var(--brand-primary), #164182);
    color: #fff;
    font-weight: 600;
}

.card {
    border-radius: 0.8rem;
}

.table th {
    white-space: nowrap;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row td {
    cursor: pointer;
}

.clickable-row:hover td {
    background-color: #eaf0fb !important;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #001e4b 0%, #022c70 100%);
    color: #fff;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-box {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 6px 4px 14px;
    margin-bottom: 18px;
    text-align: center;
}

.brand-link {
    display: inline-block;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 215px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}


.menu-list {
    display: grid;
    gap: 8px;
}

.menu-item {
    text-decoration: none;
    color: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 10px;
    font-weight: 600;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.19);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.app-main {
    flex: 1;
    padding: 22px;
}

.main-topbar {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e9f1;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.topbar-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 0.25rem 0.65rem;
}

.flow-message {
    border-left: 5px solid var(--brand-primary);
}

.section-spacer {
    height: 40px;
}

.chem-block-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 12px;
}

.chem-groupbox {
    border: 1px solid #cfd4da;
    background: #f7f7f2;
    padding: 10px;
}

.chem-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 7px 10px;
    align-items: center;
}

.chem-name {
    margin: 0;
    font-weight: 600;
}

.allergen-groupbox {
    border: 1px solid #cfd4da;
    background: #f7f7f2;
    padding: 10px;
}

.allergen-block-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 14px;
}

.allergen-block-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.allergen-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background-color 0.15s ease-in-out;
}

.allergen-grid:last-child {
    margin-bottom: 0;
}

.allergen-grid-head {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.allergen-name {
    margin: 0;
    font-style: italic;
}

.allergen-select {
    background-color: #cfdcb3;
}

.allergen-row.allergen-minus .allergen-select {
    background-color: #e5efd3;
}

.allergen-row.allergen-plus .allergen-select {
    background-color: #f6d9bd;
}

.allergen-row.allergen-unknown .allergen-select {
    background-color: #f4efbf;
}

.allergen-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 6px 10px;
    max-width: 100%;
}

.legend-item {
    padding: 6px 10px;
    font-size: 0.86rem;
    font-weight: 600;
}

.legend-minus {
    background-color: #e5efd3;
}

.legend-plus {
    background-color: #f6d9bd;
}

.legend-unknown {
    background-color: #f4efbf;
}

.legend-cross {
    background-color: #ffffff;
    border: 1px solid #d8d8d8;
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .app-main {
        padding: 14px;
    }

    .allergen-block-grid {
        grid-template-columns: 1fr;
    }

    .allergen-legend {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .chem-block-grid {
        grid-template-columns: 1fr;
    }
}

