#guestPage [hidden] { display: none !important; }
#guestPage { --qlna-list-gutter: 10px; }
#guestPage.has-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 40%); grid-template-rows: auto auto; column-gap: 10px; align-items: start; }
#guestPage.has-detail > .qlna-list-header,
#guestPage.has-detail > .qlna-list-main { grid-column: 1; width: 100%; min-width: 0; }
#guestPage.has-detail > .guest-detail { grid-column: 2; grid-row: 1 / span 2; }
#guestPage > .qlna-list-main { padding: 10px 10px 14px; }
#guestPage.has-detail > .qlna-list-main { padding-right: 0; }
#guestPage .qlna-list-title-row { margin-top: 0; }
.guest-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.guest-list { min-width: 0; container-type: inline-size; }
.guest-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.guest-stat { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px; border: 1px solid var(--qlna-list-border); border-radius: 6px; background: #fff; }
.guest-stat > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 6px; min-width: 0; }
.guest-stat div > span { grid-column: 1 / -1; }
.guest-stat strong { display: block; margin: 0; font-size: 21px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.guest-stat small { display: none; }
.guest-stat div > span, .guest-stat small { color: #626a76; font-size: 11px; }
.stat-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: #e8f6ed; color: #087538; font-size: 15px; }
.stat-icon.blue { color: #1769d1; background: #e9f2ff; }
.stat-icon.orange { color: #d96a0b; background: #fff0e3; }
.guest-filter-grid { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(100px, .9fr)) minmax(0, 1.1fr) minmax(0, .9fr) auto; gap: 6px; }
#guestPage .qlna-list-filter-panel { padding: 6px 8px; margin-bottom: 8px; }
.guest-filter-grid .qlna-list-field > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-filter-grid .qlna-list-filter-actions { justify-content: flex-end; white-space: nowrap; gap: 6px; }
.guest-filter-grid .qlna-list-btn { padding-right: 10px; padding-left: 10px; }
#guestPage .qlna-list-panel-heading { gap: 8px 16px; padding: 10px 12px; flex-wrap: wrap; }
.guest-list-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin-left: auto; }
.guest-list-options .guest-check { white-space: nowrap; }
.guest-check { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; font-weight: 400; cursor: pointer; }
#guestPage input[type=checkbox] { accent-color: #087538; width: 14px; height: 14px; margin: 0; flex-shrink: 0; }
#guestTable tbody tr[data-uid] { cursor: pointer; }
#guestTable .guest-row-selected td { background: #e8f6ed; }
#guestTable .guest-name { font-weight: 600; color: #26372e; }
.guest-cell-sub { color: #7b858f; font-size: 11px; margin-top: 3px; }
.guest-badge { display: inline-block; padding: 4px 7px; border-radius: 5px; white-space: nowrap; font-size: 11px; font-weight: 500; }
.guest-badge.serving { color: #ad5700; background: #fff0df; }
.guest-badge.completed { color: #087538; background: #e8f6ed; }
.guest-badge.waiting { color: #1769d1; background: #e9f2ff; }
.guest-badge.draft { color: #66717e; background: #eef1f4; }
.guest-row-actions { display: flex; gap: 5px; justify-content: center; }
.guest-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #d5dae0; border-radius: 5px; background: #fff; color: #56616b; cursor: pointer; }
.guest-icon-button:hover { color: #087538; border-color: #087538; background: #e8f6ed; }
.guest-detail { display: flex; flex-direction: column; position: sticky; top: 0; min-width: 0; min-height: 0; overflow: hidden; }
.guest-detail-header, .guest-detail-footer { flex-shrink: 0; }
#detailForm { display: flex; flex: 1; flex-direction: column; min-height: 0; margin: 0; overflow: hidden; }
.guest-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #dfe3e8; background: #f5fbf7; }
.guest-detail-header h2 { margin: 0; font-size: 18px; font-weight: 700; }
.guest-detail-header .guest-icon-button { font-size: 24px; }
.guest-detail-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#detailFields { min-width: 0; margin: 0; padding: 0; border: 0; }
.guest-section { padding: 9px 11px; border-bottom: 1px solid #e8ecf0; }
.guest-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: 13px; font-weight: 700; }
.guest-section h3 > span { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 50%; color: #fff; background: #087538; font-size: 12px; }
#detailStatus { margin-left: auto; }
.guest-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.guest-full { grid-column: 1 / -1; }
.guest-detail .qlna-list-field b { color: #d73535; }
.guest-detail textarea.qlna-list-control { min-height: 58px; height: auto; resize: vertical; }
.guest-detail .k-numerictextbox { width: 100%; }
.guest-detail .k-numeric-wrap { border-color: #cfd4db; border-radius: 5px; }
.guest-detail .k-numeric-wrap .k-input { height: 34px; padding: 0 9px; line-height: 34px; box-sizing: border-box; }
.guest-detail .qlna-list-control:disabled { background: #f8fafb; color: #46515d; }
.guest-field-caption { margin: 9px 0 6px; font-size: 12px; color: #46515d; }
.guest-field-caption em, .guest-help { color: #88929e; font-size: 11px; }
.guest-help { margin: 8px 0 0; }
.guest-weekdays { display: flex; flex-wrap: wrap; gap: 9px 13px; }
.guest-date-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; max-height: 180px; overflow: auto; }
.guest-date { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid #dfe3e8; border-radius: 5px; font-size: 12px; font-weight: 400; margin: 0; cursor: pointer; }
.guest-date.selected { border-color: #6aab80; background: #f0f8f2; }
.guest-date small { display: block; margin-top: 2px; color: #79838e; }
.guest-dish-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.guest-dish { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 0; border: 1px solid #dfe3e8; border-radius: 5px; font-size: 12px; font-weight: 400; cursor: pointer; }
.guest-dish.selected { border-color: #bad7c4; background: #f8fcf9; }
.guest-dish-icon { font-size: 23px; line-height: 1; }
.guest-summary { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 8px; }
.guest-summary > div { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border: 1px solid #dfe3e8; border-radius: 5px; }
.guest-summary .glyphicon { font-size: 21px; }
.guest-summary small { font-size: 10px; }
.guest-summary strong { display: block; margin-top: 4px; font-size: 21px; }
.guest-summary-total { background: #eef8f1; border-color: #6aab80 !important; color: #087538; }
.guest-detail-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 9px 11px; background: #fff; border-top: 1px solid #dfe3e8; }
.guest-detail-footer > button:first-child { margin-right: auto; }
.guest-message { margin-bottom: 12px; padding: 10px 12px; border: 1px solid #b8d9c4; border-radius: 6px; background: #edf8f1; color: #17663a; }
.guest-message.error { background: #fff1f0; border-color: #f0b8b3; color: #b42318; }
#detailMessage { margin: 9px 11px 0; }
.guest-empty { padding: 65px 25px; text-align: center; color: #7b858f; }
.guest-empty > span { font-size: 30px; color: #7fa78e; }
.guest-empty h3 { font-size: 16px; color: #46515d; }
.guest-empty p { font-size: 12px; }
.has-detail #guestTable .k-pager-wrap { flex-wrap: wrap; white-space: normal; }
.has-detail #guestTable .k-pager-info { width: 100%; margin-left: 0; }
@media (max-width: 1000px) {
    #guestPage.has-detail { display: block; }
    #guestPage.has-detail > .qlna-list-main { padding-right: 10px; }
    .guest-detail { position: static; }
    #detailForm { flex: none; overflow: visible; }
    .guest-detail-body { flex: none; overflow: visible; }
}
@container (max-width: 1100px) {
    .guest-filter-button-text { display: none; }
    .guest-filter-grid .qlna-list-btn { min-width: 32px; width: 32px; padding: 0; }
    .guest-filter-grid .qlna-list-filter-actions { gap: 4px; }
    .guest-filter-grid .qlna-list-control,
    #guestPage .guest-filter-grid .k-input { font-size: 12px; padding-right: 4px; padding-left: 5px; }
}
@container (max-width: 650px) {
    .guest-stats { gap: 5px; }
    .guest-stat { gap: 5px; padding: 6px; }
    .guest-stat div > span { font-size: 10px; }
    .stat-icon { width: 24px; height: 24px; font-size: 13px; }
}
@media (max-width: 600px) {
    #guestPage > .qlna-list-main { padding: 8px 6px calc(12px + env(safe-area-inset-bottom)); }
    .guest-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guest-search, .guest-filter-grid .qlna-list-filter-actions { grid-column: 1 / -1; }
    .guest-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .guest-stat { padding: 7px 9px; gap: 8px; }
    .stat-icon { width: 32px; height: 32px; font-size: 17px; }
    .guest-stat strong { font-size: 22px; }
    .guest-form-grid, .guest-dish-list { grid-template-columns: 1fr; }
    .guest-summary .glyphicon { display: none; }
    .guest-detail-footer { flex-wrap: wrap; }
    .guest-detail-footer .qlna-list-btn { padding: 8px 10px; font-size: 12px; }
}
