html, body {
    height: 100%;
}

[x-cloak] {
    display: none !important;
}

.w-5em {
    width: 5em;
}

.w-8em {
    width: 8em;
}

.w-90 {
    width: 90%;
}

.sidemenu-area {
    width: 18rem;
    background-color: #40663c;
}

.content-area {
    flex-grow: 1;
    padding: 0.75rem;
    background-color: #f6fff6;
}

.sidemenu-title {
    margin: 0.25rem 0.75rem 1rem 0.75rem;
    display: flex;
    align-items: baseline;
}

.sidemenu-title > a.return {
    font-size: 1.2em;
    color: #fff;
}

.return-big {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.75em;
}

.sidemenu-title > div {
    flex-grow: 1;
    font-size: 1.5em;
    text-align: center;
    padding: 0 0.25rem;
    color: #fff;
}

ul.sidemenu {
    padding-left: 0;
}

ul.sidemenu li {
    list-style: none;
}

ul.sidemenu li a {
    text-decoration: none;
    padding: 0.25rem 1rem;
    display: block;
    color: #f0f0f0;
}

ul.sidemenu li a:hover {
    background-color: #88b982;
    color: #ffff90;
}

ul.sidemenu li.selected a {
    font-weight: bold;
    color: #ffff70;
}

.table-search-input {
    width: 15em;
}

.list-table {
    border: 1px solid #c0c0c0;
}

.list-table th,
.list-table td {
    white-space: nowrap;
    padding: 0.5rem 0.5rem;
    border: 1px solid #c0c0c0;
}

.list-table > thead {
    background-color: #c0ffdf;
}

.list-table > tbody > tr {
    background-color: #e8ffe8;
}

.list-table > tbody > tr:hover {
    background-color: #e8f0ff;
}

.list-table > tbody > tr.selected {
    background-color: var(--bs-warning-bg-subtle);
}

.list-table > tbody > tr.selected:hover {
    background-color: var(--bs-warning-border-subtle);
}

.th-sort-button {
    cursor: pointer;
    padding: 0.25rem;
    margin: -0.25rem;
    color: #f00;
}

.th-sort-button.th-sort-inactive {
    color: #707070;
}

.fixed-header-table {
    border: 1px solid #c0c0c0;
}

.fixed-header-table .fht-header,
.fixed-header-table .fht-row {
    display: grid;
    border-bottom: 1px solid #c0c0c0;
}

.fixed-header-table .fht-header > div,
.fixed-header-table .fht-row > div {
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #c0c0c0;
}

.fixed-header-table .fht-header > div:last-child,
.fixed-header-table .fht-row > div:last-child {
    border-right: 0;
}

.fixed-header-table .fht-header > div {
    font-weight: bold;
}

.fixed-header-table .fht-header {
    background-color: #c0ffdf;
}

.fixed-header-table .fht-body {
    overflow-y: auto;
    background-color: #f0fff0;
}

.fixed-header-table .fht-row {
    background-color: #e8ffe8;
}

.fixed-header-table .fht-row:hover {
    background-color: #e8f0ff;
}

.fixed-header-table .fht-row.selected {
    background-color: var(--bs-warning-bg-subtle);
}

.fixed-header-table .fht-row.selected:hover {
    background-color: var(--bs-warning-border-subtle);
}

.fixed-header-table.fht-variant-list .fht-header,
.fixed-header-table.fht-variant-list .fht-row {
    grid-template-columns: 1fr 2fr 1fr;
}

.fixed-header-table.fht-recipe-ingredients .fht-header,
.fixed-header-table.fht-recipe-ingredients .fht-row {
    grid-template-columns: 5fr 1fr 2fr 2fr;
}

.fixed-header-table.fht-recipe-ingredients-b .fht-header,
.fixed-header-table.fht-recipe-ingredients-b .fht-row {
    grid-template-columns: 5fr 1fr 2fr 2fr 2fr 2fr;
}

.fixed-header-table.fht-replacement-list .fht-header,
.fixed-header-table.fht-replacement-list .fht-row {
    grid-template-columns: 1fr 8rem 6rem;
}

.fixed-header-table.fht-portion-list .fht-header,
.fixed-header-table.fht-portion-list .fht-row {
    grid-template-columns: 2.5fr 2.5fr 1fr;
}

.div-deleted-strikethrough {
    position: relative;
    color: #a0a0a0;
}

.div-deleted-strikethrough::after {
	content: "";
	position: absolute;
	height: 1px;
	top: 50%;
	left: 0.25rem;
	right: 0.25rem;
	background: #a0a0a0;
}

.btn-gray-disabled:disabled {
  --bs-btn-disabled-color: var(--bs-secondary-color);
  --bs-btn-disabled-border-color: var(--bs-secondary-color);
}

.btn-outline-danger,
.btn-outline-primary {
    --bs-btn-bg: #fff;
    --bs-btn-disabled-bg: #fff;
}

.nav-tabs .nav-link {
	border-color: var(--bs-border-color);
	background-color: #e8ffe8;
	border-right-width: 0;
}

.nav-tabs .nav-link:last-child {
    border-right-width: 1px;
}

.nav-tabs .nav-link.active {
    background-color: #f6fff6;
    font-weight: bold;
    border-bottom-color: #f6fff6;
}

.modal-body .nav-tabs .nav-link.active {
    background-color: var(--bs-secondary-bg-subtle);
    border-bottom-color: var(--bs-secondary-bg-subtle);
    font-weight: normal;
}

label.col-form-label:after {
    content: ":";
}

.col-content {
    flex: 0 0 content;
}

.btn-minw {
    min-width: 10em;
}

.btn-text {
    padding: 0;
    border: 0;
    background: none;
}

.btn-text.btn-action {
    color: var(--bs-primary);
}

.btn-text.btn-action:hover {
    font-weight: bold;
}

div.form-check-input {
    width: 1.25em;
    height: 1.25em;
    border-radius: 0.25em;
    margin-top: 0;
    user-select: none;
    cursor: pointer;
}

div.form-check-input[data-value="1"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%230d6efd' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94'/%3e%3c/svg%3e");
}

div.form-check-input[data-value="2"] {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.cursor-pointer {
    cursor: pointer;
}

.tab-content {
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-top: 0;
    padding: 0rem 1rem 1rem 1rem;
}

.content-title {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--bs-secondary-color);
    font-weight: lighter;
}

.popup-table {
    margin-top: 0.25rem;
    background-color: var(--bs-tertiary-bg);
    border: 2px solid var(--bs-primary-border-subtle);
    border-radius: var(--bs-border-radius);
    overflow-x: hidden;
    overflow-y: scroll;
}

.popup-table.popup-recipe-search {
    height: 300px;
}

.popup-table.popup-float {
    position: absolute;
    z-index: 2;
    left: 0.5rem;
    right: 0.5rem;
    --pt-line-height: calc((var(--bs-body-line-height) + 0.375*2 + 0.25/4) * 1em);
    max-height: calc(var(--pt-line-height)*10);
}

.full-width-popup .popup-table {
    left: 0;
    right: 0;
}

.popup-table-row {
    display: flex;
    border-bottom: 1px solid var(--bs-secondary-border-subtle);
    scroll-margin-top: var(--pt-line-height);
}

.popup-table.popup-float .popup-table-row:last-child {
    border-bottom: 0;
}

.popup-table-row > div {
	padding: 0.375rem 0.75rem 0.375rem 1rem;
	border-right: 1px solid var(--bs-secondary-border-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-table-row > div:last-child {
	border-right: 0;
}

.search-substring {
    font-weight: bold;
}

.popup-table-row:hover {
    background-color: #f0f8ff;
}

.popup-table-row.selected {
    background-color: var(--bs-warning-bg-subtle);
}

.popup-table-row.selected:hover {
    background-color: var(--bs-warning-border-subtle);
}

.popup-block-title {
    text-align: center;
    padding: 0.5rem;
    color: var(--bs-primary);
    border-bottom: 1px solid var(--bs-secondary-border-subtle);
    background-color: var(--bs-white);
}

.popup-no-results {
    text-align: center;
    padding: 0.375rem;
    color: var(--bs-danger);
    border-bottom: 1px solid var(--bs-secondary-border-subtle);
}

.popup-table-nullable-text {
    color: var(--bs-secondary);
    font-style: italic;
}

.nutrients-sum-output {
    margin-bottom: 0.5rem;
}

.nutrients-sum-output-div {
    display: inline-block;
    text-align: right;
    width: 6em;
}

.quick-nutrients .nutrients-sum-output-div {
    width: 5em;
}


.calendar-parent-div .date-text {
    width: 16.5rem;
    white-space: nowrap;
    text-align: center;
}

.calendar-text-full-width .calendar-parent-div .date-text {
    width: auto;
    flex-grow: 1;
}

.calendar-div {
    position: absolute;
    z-index: 5;
    background-color: #fff;
    top: calc(100% + 0.25rem);
}

.calendar-div > div {
    border: 1px solid var(--bs-secondary-border-subtle);
    border-radius: var(--bs-border-radius);
    padding: 1rem;
}

.calendar-div .days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-div .days-grid > div {
    width: 2.5em;
    text-align: center;
    user-select: none;
}

.calendar-div .day-name-cell {
    color: var(--bs-secondary);
}

.calendar-div .day-name-cell.dayoff {
    color: var(--bs-danger);
}

.calendar-div .number-cell {
    color: var(--bs-secondary);
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0.25rem 0.5rem;
}

.calendar-div .number-cell.dayoff {
    color: var(--bs-danger);
}

.calendar-div .number-cell.not-in-month {
    opacity: 0.6;
}

.calendar-div .number-cell:hover {
    background-color: var(--bs-secondary-bg-subtle);
    border-color: var(--bs-secondary-border-subtle);
}

.calendar-div .number-cell.selected {
    background-color: var(--bs-info-bg-subtle);
    border-color: var(--bs-info-border-subtle);
}

.calendar-div .number-cell.focused {
    border-color: var(--bs-primary);
}

.calendar-div .year-month-control {
    text-align: center;
    width: 11em;
}


.plan-table-scroll-container {
    overflow-y: auto;
    height: calc(100vh - 9rem);
}

.plan-table {
    margin-top: 1rem;
    display: grid;
    border: 1px solid #c0c0c0;
    border-bottom: 0;
}

.plan-empty {
    grid-column: 1 / -1;
    text-align: center;
    border-bottom: 1px solid #c0c0c0;
    color: var(--bs-primary);
    padding: 2rem;
}

.grid-span-row {
    grid-column: 1 / -1;
}

.plan-title-weekly,
.plan-title-daily {
    text-align: center;
    background-color: var(--bs-warning-bg-subtle);
    border-bottom: 1px solid #c0c0c0;
    border-right: 1px solid #c0c0c0;
    padding: 0.25rem;
}

.plan-menu-container {
    display: contents;
}

.plan-cell-meal,
.plan-cell-menu-text-daily {
    position: relative;
    background-color: #c0ffdf;
    align-content: center;
    border-bottom: 1px solid #c0c0c0;
    border-right: 1px solid #c0c0c0;
    text-align: center;
}

.plan-cell-menu-text-daily > span {
    display: block;
    font-weight: bold;
    text-align: center;
}

.plan-cell-menu-text-weekly {
    grid-column: 1 / -1;
    position: relative;
    background-color: #99e4be;
    align-content: center;
    text-align: center;
    border-bottom: 1px solid #c0c0c0;
    height: 3rem;
    font-weight: bold;
}

.plan-cell {
    position: relative;
    background-color: #e8ffe8;
    border-bottom: 1px solid #c0c0c0;
    border-right: 1px solid #c0c0c0;
    min-height: 12rem;
}

.plan-cell-nutrients {
    background-color: #c0ffdf;
    border-bottom: 1px solid #c0c0c0;
    border-right: 0;
    padding: 0.25rem;
}

.plan-weekly .plan-cell-nutrients {
    border-right: 1px solid #c0c0c0;
}

.plan-nutrients {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8em;
}

.plan-nutrients > div {
    flex: 1 1 50%;
}

.plan-nutrients > div > div {

    white-space: nowrap;
}

.plan-nutrients > div > span {
    padding-left: 0.25rem;
    font-weight: bold;
}

.plan-nutrients-allergens {
    margin-top: 0.5rem;
}

.plan-cell-menu-text-daily .plan-cell-iconbar-floating {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
}

.plan-cell-menu-text-weekly .plan-cell-iconbar-floating {
	position: absolute;
	top: 0;
	left: 0.5rem;
	height: 3rem;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.plan-cell-iconbar {
    padding: 0.25rem;
}

.plan-cell-iconbar .btn,
.plan-cell-iconbar-floating .btn {
    padding: 0.25rem 0.5rem;
}

.plan-recipe-list {
    display: grid;
    grid-template-columns: 1fr min-content;
    width: 100%;
}

.plan-recipe-name {
    border-top: 1px dashed #a0a0a0;
    padding-left: 0.5rem;
    align-content: center;
    margin-bottom: 0.125rem;
    word-break: break-word;
}

.plan-recipe-icons {
    border-top: 1px dashed #a0a0a0;
}

.plan-recipe-icons .btn {
    padding: 0.125rem 0.5rem;
}

.plan-copy-form-grid {
    display: grid;
    grid-template-columns: 75% 25%;
}

.plan-copy-form-grid.copywholeplan {
    grid-template-columns: 50% 16% 34%;
}

.plan-copy-form-grid > div {
    margin: 0.25rem;
}

.plan-copy-variant-list {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow-y: auto;
    padding: 1rem;
}


/* ----------------- */


.institutes-sidemenu {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 17rem;
    background-color: #fff;
    border-right: 1px solid #e3e9f2;
    padding: 1.3rem 1rem;
    height: 100vh;
}

.institutes-sidemenu .institute-selection {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.5rem 1.4rem;
    border-bottom: 1px solid #edf1f6;
}

.institutes-sidemenu .institute-icon {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.65rem;
    background: #eaf3ff;
    color: #1871df;
    font-size: 1.5rem;
}

.institutes-sidemenu .institute-title {
    color: #60708a;
    font-size: 0.75rem;
}

.institutes-sidemenu .institute-select-div {
    width: 100%;
}

.institute-select-div > span {
	display: block;
    overflow: hidden;
	padding-right: 1.5em;
    font-weight: bold;
}

.institute-select-div > div {
	position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.institute-select-div > i {
	display: block;
	position: absolute;
	top: 50%;
	right: 0;
	margin-top: -0.75rem;
}

.institute-select-div ul {
    max-height: 20em;
    overflow-y: auto;
}


.institute-select-div li {
    cursor: pointer;
}

.institute-select-div .dropdown-menu {
    --bs-dropdown-link-hover-bg: var(--bs-secondary-bg);
    --bs-dropdown-link-active-bg: var(--bs-primary-bg-subtle);
    --bs-dropdown-link-active-color: var(--bs-body-color);
}

.institutes-sidemenu-nav {
    display: grid;
    gap: 0.4rem;
    padding-top: 1.25rem;
}

.institutes-sidemenu-nav a,
.institutes-sidemenu-exit {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.65rem;
    color: #50617b;
    text-decoration: none;
}

.institutes-sidemenu-nav a i,
.institutes-sidemenu-exit i {
    width: 1.4rem;
    font-size: 1.2rem;
    text-align: center;
}

.institutes-sidemenu-nav a:hover,
.institutes-sidemenu-exit:hover {
    background: #f3f7fc;
    color: #125fce;
}

.institutes-sidemenu-nav a.selected {
    background: #eaf3ff;
    color: #125fce;
    font-weight: 650;
}


.ipage {
    --ipage-border: #dfe7f1;
    color: #14213d;
}

.ipage .content-area {
    background: none;
}

.ipage .content-area::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 90% 0, #eef6ff 0, transparent 35%), #fbfcfe;
}

.ipage header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.ipage header h1 {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: -0.04em;
}

.daily-order-deadline {
    border: 1px solid var(--ipage-border);
    border-radius: 0.6rem;
    background-color: #dff8ed;
    color: var(--bs-green);
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
}

.daily-order-deadline.deadline-end {
    background-color: #f8d7da;
    color: var(--bs-red);
}

.daily-order-deadline .span-deadline-ok,
.daily-order-deadline.deadline-end .span-deadline-end {
    display: inline;
}

.daily-order-deadline .span-deadline-end,
.daily-order-deadline.deadline-end .span-deadline-ok {
    display: none;
}

.daily-orders-card {
    overflow: hidden;
    border: 1px solid var(--ipage-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 16px 45px rgba(25, 54, 90, 0.06);
}


.daily-orders-card table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.daily-orders-card th,
.daily-orders-card td {
    border-right: 1px solid #edf1f6;
    border-bottom: 1px solid #edf1f6;
    padding: 1rem;
    text-align: center;
}

.daily-orders-card th:first-child,
.daily-orders-card td:first-child {
    width: 18rem;
    padding-left: 1.4rem;
    text-align: left;
}

.daily-orders-card th:last-child,
.daily-orders-card td:last-child {
    border-right: 0;
}

.daily-orders-card thead th {
    height: 5rem;
    font-weight: bold;
}

.daily-orders-card thead th i {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.55rem;
}

.daily-orders-card tbody tr:hover {
    background: #f8fbff;
}

.daily-orders-allplusminus {
    display: flex;
    justify-content: center;
    column-gap: 0.25rem;
}

.daily-orders-number-input {
    display: flex;
    justify-content: center;
}

.daily-orders-number-input input {
    width: 4.4rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #dce5ef;
    border-radius: 0.6rem 0 0 0.6rem;
    background: #fff;
    color: #14213d;
    font-size: 1rem;
    outline: none;
}

.daily-orders-number-input input:focus {
    border-color: #62c87a;
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.12);
}

.daily-orders-number-input > div {
    display: flex;
    flex-direction: column;
}

.daily-orders-number-input > div > button {
	padding: 0 0.25rem;
	border-color: #dce5ef;
}

.daily-orders-allplusminus > button:focus,
.daily-orders-number-input > div > button:focus {
    border-color: #62c87a;
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.12);
}

.daily-orders-number-input > div > button:first-child {
	border-radius: 0 0.6rem 0 0;
	border-width: 1px 1px 0 0;
}

.daily-orders-number-input > div > button:last-child {
	border-radius: 0 0 0.6rem 0;
	border-width: 1px 1px 1px 0;
}

.quantity-button:disabled {
	border-color: #ff8686;
}

.daily-orders-number-input input:disabled {
	border-color: #ff8686;
	opacity: 0.65;
}

.daily-orders-card tfoot td {
    border-bottom: 0;
    background: #f8fafc;
    font-size: 1.15rem;
    font-weight: bold;
}

.daily-orders-row-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.daily-orders-row-toggle span {
    display: block;
    margin-top: 0.18rem;
    color: var(--bs-secondary-color);
    font-size: 0.88rem;
}

.daily-orders-row-toggle small {
    display: block;
    margin-top: .18rem;
    color: var(--bs-secondary-color);
    font-size: .88rem;
}

.daily-orders-row-toggle i {
    color: #718096;
    transition: transform .2s ease;
}

.daily-orders-row-toggle:not(.collapsed) i {
    transform: rotate(180deg);
}

.daily-orders-menu-row > td {
    padding: 0 !important;
    background: #f8fbff;
}

.daily-orders-menu-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem 0.75rem;
    color: #52647d;
}

.daily-orders-menu-heading > div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #14213d;
}

.daily-orders-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(10rem, 1fr));
    gap: 0.8rem;
    padding: 0 1.4rem 1.35rem;
    --menu-color: #000000;
}

.daily-orders-menu-card {
    min-height: 9rem;
    padding: .9rem;
    border: 1px solid #e0e8f1;
    border-top: 3px solid var(--menu-color);
    border-radius: .7rem;
    background: #fff;
    text-align: left;
    box-shadow: 0 5px 16px rgba(25, 54, 90, .04);
}

.daily-orders-menu-card div {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--menu-color);
}

.daily-orders-menu-grid ul {
    margin: .65rem 0 0;
    padding-left: 1.1rem;
    color: #52647d;
    font-size: .82rem;
    line-height: 1.5;
}

.daily-orders-menu-grid li {
    word-break: break-word;
}
