:root {
    color-scheme: light;
}
.table-responsive { max-height: 65vh; overflow-y: auto; }

#menuFormModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}
.menu-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-card .card-body {
    flex: 1 1 auto;
}

.menu-card-media {
    position: relative;
    flex: 0 0 220px;
    min-height: 180px;
    background-color: var(--bs-tertiary-bg);
}

.menu-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 576px) {
    .menu-card {
        flex-direction: row;
    }
}

@media (max-width: 575.98px) {
    .menu-card-media {
        min-height: 200px;
    }
}

.orders-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.orders-page__header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.orders-page__title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.orders-page__heading {
    font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
    font-weight: 700;
    margin-bottom: 0;
}

.orders-page__subtitle {
    color: var(--bs-secondary-color);
    font-size: 1rem;
    max-width: 620px;
}

.orders-page__flash {
    border-radius: 14px;
}

.orders-highlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 20px;
    background-color: var(--bs-light-bg-subtle);
    border: 1px solid var(--bs-border-color);
    align-items: center;
}

.orders-highlight__icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background-color: var(--bs-primary-bg-subtle);
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    color: var(--bs-primary-text-emphasis);
}

.orders-highlight__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--bs-body-color);
}

.orders-highlight__title {
    font-weight: 600;
    margin-bottom: 0;
}

.orders-highlight__description {
    margin-bottom: 0;
    color: var(--bs-secondary-color);
}

.orders-metric-list {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    align-self: stretch;
    justify-content: flex-end;
}

.orders-metric {
    min-width: 120px;
    padding: 0.75rem 1rem;
    background-color: var(--bs-tertiary-bg);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: right;
}

.orders-metric dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    margin: 0;
}

.orders-metric dd {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-body-color);
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.order-card {
    background-color: var(--bs-body-bg);
    border-radius: 18px;
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--bs-box-shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.order-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.order-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.order-card__number {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    min-width: 160px;
}

.order-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary-color);
}

.order-card__value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.order-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-weight: 600;
}

.order-chip--date {
    background-color: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis);
}

.order-chip--payment {
    background-color: var(--bs-secondary-bg-subtle);
    color: var(--bs-secondary-text-emphasis);
}

.order-chip--success {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
}

.order-chip--warning {
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}

.order-chip__icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.order-status {
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.order-status--pending {
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}

.order-status--confirmed,
.order-status--processing,
.order-status--paid {
    background-color: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis);
}

.order-status--completed,
.order-status--success,
.order-status--settlement {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
}

.order-status--cancelled,
.order-status--failed {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.order-card__body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem;
}

.order-card__info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 300px;
}

.order-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-size: 1.25rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 2px var(--bs-body-bg);
}

.order-card__title {
    font-size: 1.1rem;
    color: var(--bs-body-color);
}

.order-card__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.order-detail {
    background-color: var(--bs-tertiary-bg);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
}

.order-detail dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    color: var(--bs-secondary-color);
}

.order-detail dd {
    margin: 0;
    font-weight: 600;
    color: var(--bs-body-color);
}

.order-card__summary {
    flex: 1 1 240px;
}

.order-card__status-note {
    margin: 0;
    font-size: 0.95rem;
    color: var(--bs-info-text-emphasis);
    background-color: var(--bs-info-bg-subtle);
    border-left: 4px solid var(--bs-info-border-subtle);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.order-card__actions {
    display: grid;
    gap: 0.75rem;
}

.order-card__action {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-card__action .input-group-text {
    background-color: var(--bs-secondary-bg-subtle);
    border: 1px solid var(--bs-border-color);
    font-weight: 600;
}

.order-card__action .form-control {
    border: 1px solid var(--bs-border-color);
}

.order-empty {
    background-color: var(--bs-light-bg-subtle);
    border-radius: 18px;
    border: 1px dashed var(--bs-border-color);
    color: var(--bs-secondary-color);
}

.order-empty__icon {
    font-size: 2.5rem;
}

@media (min-width: 992px) {
    .orders-page {
        max-width: 860px;
        margin: 0 auto 4rem;
    }

    .order-card__body {
        align-items: center;
    }

    .order-card__summary {
        text-align: left;
    }

    .order-card__actions {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .orders-highlight {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .orders-highlight__icon {
        margin: 0 auto;
    }

    .orders-metric-list {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .orders-metric {
        text-align: center;
    }

    .order-card__number {
        align-items: flex-start;
    }
}
