body.bg-light {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Guest Counter — Bootstrap 5 overrides */

.hgc-page {
    max-width: 640px;
}

.hgc-date-nav {
    width: auto;
    flex-wrap: nowrap;
}

.hgc-date-nav .btn {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    line-height: 1;
}

.hgc-date-nav input[type="date"] {
    width: 9.5rem;
    min-width: 0;
    border-left: 0;
    border-right: 0;
}

.hgc-date-nav .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.hgc-date-nav .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#hgcToastBody {
    white-space: pre-line;
    max-width: min(92vw, 440px);
    font-size: 0.875rem;
    line-height: 1.35;
}

.hgc-scroll-fab {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    z-index: 1045;
    pointer-events: none;
}

.hgc-fab {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    padding: 0;
    font-size: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.hgc-fab--left {
    left: max(12px, env(safe-area-inset-left));
}

.hgc-fab--right {
    right: max(12px, env(safe-area-inset-right));
}

.hgc-fab:hover,
.hgc-fab:focus {
    background-color: #fff;
}

.hgc-page .card.room {
    position: relative;
    margin-bottom: 1rem;
    border-width: 2px;
    border-color: #d1d5db;
    overflow: visible;
    background: #fff;
}

.hgc-page .card.room.room--has-guests {
    border-color: #86efac;
}

.hgc-page .room--invalid {
    border-color: var(--bs-danger) !important;
    box-shadow: 0 0 0 2px rgba(var(--bs-danger-rgb), 0.25);
}

.hgc-page .room--turnover {
    border-color: #86efac;
}

.hgc-page .card.room > .card-body {
    padding: 0;
}

.room-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 2px;
    min-height: 24px;
}

.room-header-main {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1 1 auto;
}

.room-temp-badge {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.temp-stay-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.temp-stay-badge--outgoing {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
}

.temp-stay-badge--incoming {
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.12);
}

.temp-stay-wrap {
    display: inline-flex;
}

.temp-stay-btn--on {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.1) !important;
}

.temp-stay-badge--conflict {
    color: #856404;
    background: rgba(255, 193, 7, 0.25);
    border: 1px solid rgba(255, 193, 7, 0.5);
}

/* Reports grid */
.hgc-reports-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 24px;
}

.report-section {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.report-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f3f4f6;
}

.report-section__icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    color: #6b7280;
    opacity: 0.9;
}

.report-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
}

.report-section__date {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.5);
    margin: 0;
}

.report-section > .chef-meal-line,
.report-section > p,
.report-section > .chef-print-extras-block,
.report-section > #maid-report-body,
.report-section > .report-actions {
    padding-left: 16px;
    padding-right: 16px;
}

.report-section > .chef-meal-line:first-of-type,
.report-section > p:first-of-type,
.report-section > #maid-report-body {
    padding-top: 12px;
}

.report-section > .report-actions {
    padding-bottom: 12px;
}

/* Admin report */
.report-section--admin {
    border-color: rgba(13, 110, 253, 0.25);
}

.admin-report-blocks {
    padding: 12px 16px 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 20px;
}

.admin-report-block {
    min-width: 0;
}

.admin-report-block__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-report-line {
    font-size: 0.92rem;
    line-height: 1.45;
}

/* Driver report filters */
.driver-report-filters .driver-filter-btn {
    font-size: 0.8rem;
}

.report-wa-btn {
    border-color: #25d366 !important;
    color: #128c7e !important;
}

.report-wa-btn:hover {
    background: #25d366 !important;
    color: #fff !important;
}

.maid-task-line {
    padding: 4px 8px 4px 12px;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
}

.maid-task-line--urgent {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.12);
}

.maid-order-item {
    cursor: grab;
    user-select: none;
}

.maid-order-handle {
    cursor: grab;
    padding: 6px 4px;
    min-width: 36px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.maid-order-actions .btn {
    min-width: 32px;
    min-height: 28px;
    line-height: 1;
}

.maid-order-item--dragging {
    opacity: 0.85;
    background: rgba(13, 110, 253, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 2;
    position: relative;
}

.clear-room-btn {
    flex-shrink: 0;
    box-shadow: none !important;
    text-decoration: none !important;
    color: var(--bs-danger) !important;
    border: 1px solid var(--bs-danger) !important;
    border-radius: 6px;
    background: transparent !important;
    padding: 2px 6px;
    line-height: 1;
}

.clear-room-btn:hover,
.clear-room-btn:focus {
    color: #fff !important;
    background-color: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
}

.hgc-page .room-number {
    position: relative;
    top: auto;
    left: auto;
    z-index: 3;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.hgc-page .room--has-guests .room-number {
    background-color: #10b981;
    color: #fff;
    border-color: #10b981;
}

.room-flow-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.flow-badge {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 5px;
    border: 1px solid transparent;
    line-height: 1.2;
}

.flow-badge--arrival {
    color: #059669;
    border-color: #a7f3d0;
    background: rgba(240, 253, 244, 0.85);
}

.flow-badge--departure {
    color: #dc2626;
    border-color: #fecaca;
    background: rgba(254, 242, 242, 0.85);
}

.flow-badge--staying {
    color: #6b7280;
    border-color: #d1d5db;
    background: rgba(249, 250, 251, 0.95);
}

.flow-arrow {
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0.85;
}

.guest-row {
    position: relative;
    padding: 10px 8px;
    margin-bottom: 0;
    border-radius: 0;
    overflow: visible;
}

.guest-row--occupied {
    background-color: rgba(240, 253, 244, 0.45);
}

.guest-row--arrival {
    background-color: rgba(240, 253, 244, 0.55);
}

.guest-row--departure {
    background-color: rgba(254, 242, 242, 0.55);
}

.guest-row--turnover {
    background: linear-gradient(to bottom, rgba(254, 242, 242, 0.55) 50%, rgba(240, 253, 244, 0.55) 50%);
}

.row-section-label {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.55;
    pointer-events: none;
}

.guest-row--departure .row-section-label {
    color: #b91c1c;
}

.guest-row--arrival .row-section-label,
.row-section-label--arrival {
    color: #047857;
}

.room--turnover .guest-row--departure {
    padding-top: 22px;
}

.room--turnover .guest-row--arrival {
    padding-top: 22px;
}

.contact-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
    flex: 1 1 auto;
    order: -1;
}

.guest-contact-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    font-size: 0.8rem;
}

.guest-contact-line .btn-link {
    flex-shrink: 0;
    line-height: 1;
}

.guest-contact-line .guest-name-text,
.guest-contact-line .guest-phone-text {
    flex: 0 1 auto;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
}

.guest-wa-btn {
    line-height: 1;
    font-size: 1.1rem;
    text-decoration: none !important;
}

.guest-wa-btn:hover,
.guest-wa-btn:focus {
    color: #128c7e !important;
}

.guest-name {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.guest-phone {
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
}

.guest-name-input {
    width: 100%;
    max-width: 220px;
    font-size: 0.8rem;
}

.guest-phone-input {
    max-width: 220px;
}

.guest-phone-input .form-control.is-invalid {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.15rem rgba(var(--bs-danger-rgb), 0.2);
}

.top-row {
    margin-bottom: 10px;
}

.guest-top-row {
    position: relative;
}

@media (min-width: 576px) {
    .guest-top-row {
        flex-wrap: nowrap;
        align-items: center;
    }

    .guest-top-row .contact-row {
        order: 3;
        flex: 0 1 auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        margin-left: auto;
        padding-right: 0;
        margin-bottom: 0;
        border: none;
        padding-top: 0;
        text-align: right;
    }

    .guest-top-row .counter-row {
        order: 1;
        flex-shrink: 0;
    }

    .guest-top-row .checkout-row {
        order: 2;
        flex-shrink: 0;
        margin-left: 0;
    }
}

@media (min-width: 576px) {
    .hgc-page {
        max-width: 960px;
    }

    .room-header {
        padding: 9px 12px 4px;
        min-height: 36px;
        gap: 9px;
    }

    .hgc-page .room-number {
        font-size: 1.1rem;
        padding: 3px 12px;
    }

    .flow-badge {
        font-size: 0.85rem;
        padding: 2px 9px;
    }

    .guest-row {
        padding: 15px 12px;
    }

    .top-row,
    .controls-row {
        margin-bottom: 15px;
    }

    .transport-row {
        margin-bottom: 9px;
    }

    .guest-top-row .guest-contact-line {
        font-size: 0.9rem;
        gap: 9px;
    }

    .hgc-counter .btn {
        min-width: 60px;
        min-height: 60px;
        font-size: 1.7rem;
        padding: 6px 15px;
    }

    .hgc-counter input[type="number"] {
        width: 78px;
        min-height: 60px;
        font-size: 1.65rem;
    }

    .hgc-counter-label {
        min-width: 51px;
        min-height: 60px;
        font-size: 1rem;
    }

    .meal-btn,
    .status-btn,
    .transport-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .guest-name-input,
    .guest-phone-input {
        max-width: 330px;
    }
}

.hgc-counter {
    width: auto;
    flex: 0 0 auto;
}

.hgc-counter .btn {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 4px 10px;
}

.hgc-counter input[type="number"] {
    width: 52px;
    min-height: 40px;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.hgc-counter-label {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 34px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-row {
    min-width: 0;
}

.checkout-row label {
    white-space: nowrap;
}

.checkout-row input[type="date"] {
    max-width: 140px;
}

.meals-ribbon,
.button-row,
.transport-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.transport-row {
    margin-bottom: 6px;
}

.meal-btn,
.status-btn,
.transport-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.meal-btn::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent transparent transparent transparent;
    pointer-events: none;
    opacity: 0;
}

.meal-btn--on::after {
    opacity: 1;
    border-color: transparent var(--bs-success) transparent transparent;
}

.meal-btn--early::after {
    border-color: transparent transparent transparent transparent;
}

.meal-btn--early.meal-btn--on::after {
    opacity: 1;
    border-color: transparent var(--bs-info) transparent transparent;
}

.meal-btn--early:not(.meal-btn--on) {
    color: var(--bs-secondary-color) !important;
    border-color: var(--bs-border-color) !important;
    background-color: #fff;
}

.meal-btn--early.meal-btn--on {
    border-color: var(--bs-info) !important;
    color: #1d4ed8 !important;
    background-color: rgba(239, 246, 255, 0.9);
}

.add-guest-btn--active {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    background-color: rgba(239, 246, 255, 0.9) !important;
    font-weight: 700;
}

.status-btn {
    filter: grayscale(1);
    opacity: 0.55;
    background-color: #fff !important;
}

.status-btn:hover,
.status-btn:focus,
.status-btn:active {
    background-color: #fff !important;
    box-shadow: none;
}

.status-btn:not(.status-btn--on):hover,
.status-btn:not(.status-btn--on):focus {
    filter: grayscale(0.35);
    opacity: 0.8;
}

.status-btn[id^="newGuest"] .bi,
.status-btn[id^="departure"] .bi {
    font-size: 1.2em;
    line-height: 1;
}

.status-btn .bi {
    font-size: 1.05em;
    line-height: 1;
}

.status-btn--on {
    filter: none;
    opacity: 1;
}

.status-btn--on:hover,
.status-btn--on:focus,
.status-btn--on:active {
    box-shadow: none;
}

.status-btn--on:not([id^="newGuest"]):not([id^="departure"]):not([id^="urgentCleaning"]) {
    border-color: var(--bs-warning) !important;
    color: var(--bs-warning-text-emphasis, #854d0e) !important;
    background-color: #fff !important;
}

.status-btn[id^="newGuest"].status-btn--on {
    border-color: var(--bs-success) !important;
    color: #fff !important;
    background-color: var(--bs-success) !important;
}

.status-btn[id^="newGuest"].status-btn--on:hover,
.status-btn[id^="newGuest"].status-btn--on:focus,
.status-btn[id^="newGuest"].status-btn--on:active {
    border-color: var(--bs-success) !important;
    color: #fff !important;
    background-color: var(--bs-success) !important;
}

.status-btn[id^="departure"].status-btn--on {
    border-color: var(--bs-danger) !important;
    color: #fff !important;
    background-color: var(--bs-danger) !important;
}

.status-btn[id^="departure"].status-btn--on:hover,
.status-btn[id^="departure"].status-btn--on:focus,
.status-btn[id^="departure"].status-btn--on:active {
    border-color: var(--bs-danger) !important;
    color: #fff !important;
    background-color: var(--bs-danger) !important;
}

.status-btn[id^="urgentCleaning"].status-btn--on,
.status-btn--urgent.status-btn--on {
    filter: none;
    opacity: 1;
    border-color: var(--bs-warning) !important;
    color: var(--bs-warning) !important;
    background-color: #fff !important;
}

.status-btn[id^="urgentCleaning"]:not(.status-btn--on) {
    filter: grayscale(1);
    opacity: 0.55;
}

.day-trip-row .form-select {
    max-width: 220px;
}

.early-meal-togo-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #fff !important;
}

.early-meal-togo-btn--on {
    border-color: var(--bs-success) !important;
    color: var(--bs-success) !important;
    background-color: #fff !important;
}

.early-meal-togo-btn--on:hover,
.early-meal-togo-btn--on:focus,
.early-meal-togo-btn--on:active {
    border-color: var(--bs-success) !important;
    color: var(--bs-success) !important;
    background-color: #fff !important;
}

.early-meal-time .form-select {
    min-width: 3.2rem;
}

.transport-btn {
    background-color: #fff !important;
}

.transport-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 0 10px;
    border-color: transparent transparent transparent transparent;
    pointer-events: none;
    opacity: 0;
}

.transport-btn--on {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    background-color: #fff !important;
}

.transport-btn--on:hover,
.transport-btn--on:focus,
.transport-btn--on:active {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    background-color: #fff !important;
    box-shadow: none;
}

.transport-btn--on::after {
    opacity: 1;
    border-color: transparent transparent transparent var(--bs-primary);
}

.transport-label {
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
    min-width: 42px;
}

.transport-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bus-self-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff !important;
}

.bus-self-btn--on {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    background-color: #fff !important;
}

.bus-self-btn--on:hover,
.bus-self-btn--on:focus,
.bus-self-btn--on:active {
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    background-color: #fff !important;
}

.meal-btn--on {
    border-color: var(--bs-success) !important;
    color: var(--bs-success) !important;
    background-color: #fff !important;
}

.meal-btn--off {
    background-color: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}

.meal-btn--off::after {
    opacity: 0 !important;
}

.meal-btn--inactive {
    background-color: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #cbd5e1 !important;
    opacity: 0.7;
    cursor: not-allowed;
}

.meal-btn--inactive::after {
    opacity: 0 !important;
}

.room-extras-wrap {
    padding: 0 10px 10px;
    border-top: 1px dashed var(--bs-border-color);
    margin-top: 4px;
}

.room-extras-header {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    margin-bottom: 4px;
}

.room-extras-toggle {
    display: inline-block;
    text-decoration: none !important;
    border-bottom: 1px dashed currentColor;
    color: var(--bs-secondary-color) !important;
    font-size: 0.8rem;
}

.room-extras-toggle:hover,
.room-extras-toggle:focus {
    color: var(--bs-primary) !important;
}

.room-extras-panel {
    padding-top: 4px;
}

.room-extras-group + .room-extras-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--bs-border-color);
}

.room-extras-counters {
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    max-width: 100%;
    padding-bottom: 2px;
}

.infant-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: grayscale(1);
    opacity: 0.55;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-secondary-color) !important;
    background-color: #fff !important;
}

.infant-btn:hover,
.infant-btn:focus {
    filter: grayscale(0.35);
    opacity: 0.85;
}

.infant-btn--on {
    filter: none;
    opacity: 1;
    border-color: #db2777 !important;
    color: #db2777 !important;
    background-color: #fdf2f8 !important;
}

.infant-btn--on:hover,
.infant-btn--on:focus {
    border-color: #be185d !important;
    color: #be185d !important;
    background-color: #fce7f3 !important;
}

.extras-counter,
.infant-counter {
    flex: 0 0 auto;
}

.hgc-counter--extras {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    height: 32px;
    width: auto;
    max-width: none;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-sm);
    overflow: hidden;
    vertical-align: middle;
    background: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hgc-counter--extras .hgc-counter-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-width: 2.15rem;
    min-height: 0;
    height: auto;
    padding: 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    background: var(--bs-tertiary-bg);
    border-right: 1px solid var(--bs-border-color);
    user-select: none;
}

.hgc-counter--extras .btn {
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    height: 32px;
    min-height: 0;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--bs-border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hgc-counter--extras input[type="number"] {
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    height: 32px;
    min-height: 0;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--bs-border-color);
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    appearance: textfield;
    -moz-appearance: textfield;
    flex-shrink: 0;
}

.hgc-counter--extras input[type="number"]::-webkit-outer-spin-button,
.hgc-counter--extras input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hgc-counter--compact:not(.hgc-counter--extras) .btn {
    min-width: 28px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.hgc-counter--compact:not(.hgc-counter--extras) input[type="number"] {
    width: 34px;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
    text-align: center;
}

.hgc-counter--compact:not(.hgc-counter--extras) .hgc-counter-label {
    min-width: 2.1rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: 0.68rem;
}

.hgc-request-btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hgc-request-picker--me .hgc-request-btn {
    border-color: #6366f1;
    color: #4338ca;
}

.hgc-request-item__role {
    font-size: 0.72em;
    color: var(--bs-secondary-color);
    font-weight: 600;
}

.hgc-request-picker .dropdown-menu {
    max-height: 240px;
    overflow-y: auto;
    min-width: 240px;
}

.hgc-request-item {
    cursor: pointer;
    white-space: normal;
}

.hgc-request-item .form-check-input {
    pointer-events: none;
}

.flow-badge .flow-transport-icon {
    font-size: 0.85rem;
    opacity: 0.85;
}

.hgc-schedule-picker {
    position: relative;
}

.hgc-schedule-picker .dropdown-menu {
    z-index: 1060;
}

.hgc-schedule-hint {
    text-decoration: none !important;
    line-height: 1;
}

.hgc-schedule-hint:hover,
.hgc-schedule-hint:focus {
    color: var(--bs-primary) !important;
}

.hgc-offcanvas-picker {
    max-height: 70vh;
}

.hgc-slot-item.active {
    background-color: var(--bs-primary);
    color: #fff;
}

.hgc-slot-item.active.text-muted {
    color: #fff !important;
}

#hgcToast.bg-danger {
    background-color: var(--bs-danger) !important;
}

#hgcToast.bg-dark {
    background-color: var(--bs-dark) !important;
}

.train-modal-row--active {
    background: var(--bs-success-bg-subtle);
    font-weight: 600;
}

.train-modal-row--inactive {
    color: var(--bs-secondary-color);
}

.extra-room-btn {
    width: 100%;
}

.d-none-custom {
    display: none !important;
}

#chef-report .chef-print-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

#chef-report .chef-print-date {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

#chef-report .chef-meal-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 2;
    margin-bottom: 0.25rem;
}

#chef-report .chef-num {
    font-size: 0.9em;
}

#chef-report .chef-num-total {
    font-size: 1.35em;
    font-weight: 900;
}

#chef-report .chef-print-extras-block {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    padding-top: 0.35rem;
}

#chef-report .chef-print-extras-title {
    margin-bottom: 0.85rem !important;
}

#chef-report .chef-print-extra,
#chef-report .chef-print-extras {
    font-size: 0.95rem;
    line-height: 1.6;
}

#chef-report .chef-print-extra--early {
    margin-bottom: 0.65rem;
}

#chef-report .chef-print-extra--early .chef-extra-text {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

#chef-report .chef-print-extra--early .chef-extra-detail {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
}

#chef-report .chef-print-extra--early .chef-extra-at,
#chef-report .chef-print-extra--early .chef-extra-time,
#chef-report .chef-print-extra--early .chef-extra-formula,
#chef-report .chef-print-extra--early .chef-extra-formula .chef-num,
#chef-report .chef-print-extra--early .chef-extra-formula .chef-num-total {
    font-size: inherit;
    font-weight: inherit;
}

@media print {
    body { margin: 0; padding: 0; }
    .hgc-page { max-width: none; }
    #roomGrid,
    .action-bar,
    .d-print-none,
    .toast-container,
    .modal,
    .offcanvas,
    #nightBanner,
    .hgc-scroll-fab,
    .hgc-page > .card {
        display: none !important;
    }

    /* A4: все 4 отчёта (кнопка «Печать A4») */
    body:not([class*="print-receipt-"]) #report {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        width: 210mm;
        height: 297mm;
    }
    body:not([class*="print-receipt-"]) #admin-report {
        display: none !important;
    }
    body:not([class*="print-receipt-"]) .report-section { padding: 6mm; overflow: hidden; }
    body:not([class*="print-receipt-"]) #chef-report { grid-column: 1; grid-row: 1; border-right: 1px dashed #000; border-bottom: 1px dashed #000; }
    body:not([class*="print-receipt-"]) #waiter-report { grid-column: 2; grid-row: 1; border-bottom: 1px dashed #000; }
    body:not([class*="print-receipt-"]) #maid-report { grid-column: 1; grid-row: 2; border-right: 1px dashed #000; }
    body:not([class*="print-receipt-"]) #driver-report { grid-column: 2; grid-row: 2; }

    /* Чек 80 мм: один отчёт (кнопка «Чек») — только текст отчёта */
    body[class*="print-receipt-"] .container,
    body[class*="print-receipt-"] .hgc-page {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
    body[class*="print-receipt-"] .hgc-page > *:not(#report) {
        display: none !important;
    }
    body[class*="print-receipt-"] #report {
        display: block !important;
        width: 72mm;
        max-width: 72mm;
        height: auto;
        margin: 0;
        padding: 0;
    }
    body[class*="print-receipt-"] .report-section {
        display: none !important;
        padding: 0;
        border: none !important;
        box-shadow: none !important;
    }
    body.print-receipt-chef #chef-report,
    body.print-receipt-waiter #waiter-report,
    body.print-receipt-maid #maid-report,
    body.print-receipt-driver #driver-report,
    body.print-receipt-admin #admin-report {
        display: block !important;
    }
    body[class*="print-receipt-"] .report-section h2 {
        font-size: 14pt;
        font-weight: 900;
        margin: 0 0 0.5rem;
        color: #000;
        -webkit-font-smoothing: none;
        font-smooth: never;
    }
    body[class*="print-receipt-"] .report-section p,
    body[class*="print-receipt-"] .report-section strong {
        font-size: 12pt;
        font-weight: 700;
        line-height: 1.4;
        margin-bottom: 0.35rem;
        word-break: break-word;
        color: #000;
        -webkit-font-smoothing: none;
        font-smooth: never;
    }
    body[class*="print-receipt-"] .report-actions {
        display: none !important;
    }
}

@page {
    margin: 4mm;
}

@media print {
    body.print-receipt-chef,
    body.print-receipt-waiter,
    body.print-receipt-maid,
    body.print-receipt-driver {
        width: 72mm;
        font-family: "Courier New", Courier, monospace;
        font-weight: 700;
        -webkit-font-smoothing: none;
        font-smooth: never;
        text-rendering: geometricPrecision;
        color: #000;
    }
}

@media (max-width: 575px) {
    .meal-btn, .status-btn, .transport-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .guest-top-row {
        flex-direction: column;
        align-items: stretch;
    }

    .guest-top-row .contact-row {
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 14px;
        padding-bottom: 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .guest-top-row .guest-contact-line {
        flex: 0 1 auto;
    }

    .hgc-counter .btn {
        min-width: 36px;
        min-height: 38px;
        font-size: 1.05rem;
    }

    .hgc-counter input[type="number"] {
        width: 46px;
        min-height: 38px;
        font-size: 1rem;
    }

    .hgc-counter-label {
        min-height: 38px;
        min-width: 30px;
        font-size: 0.8rem;
    }

    .room-extras-counters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .room-extras-counters .hgc-counter--extras {
        height: 30px;
        flex-shrink: 0;
    }

    .room-extras-counters .hgc-counter--extras .btn {
        width: 24px;
        min-width: 24px;
        max-width: 24px;
        height: 30px;
        font-size: 0.8125rem;
    }

    .room-extras-counters .hgc-counter--extras input[type="number"] {
        width: 24px;
        min-width: 24px;
        max-width: 24px;
        height: 30px;
        line-height: 30px;
        font-size: 0.75rem;
    }

    .room-extras-counters .hgc-counter--extras .hgc-counter-label {
        font-size: 0.625rem;
        padding: 0 0.3rem;
    }

    .room-extras-counters .infant-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    .room-extras-requests {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .room-extras-requests .hgc-request-btn {
        font-size: 0.72rem;
        padding: 0.2rem 0.45rem;
    }

    .hgc-request-picker .dropdown-menu {
        min-width: min(100vw - 32px, 280px);
    }

    .checkout-row {
        width: 100%;
        margin-top: 4px;
    }
}

.otelix-sync-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.otelix-sync-toolbar__meta {
    flex: 1 1 200px;
    line-height: 1.35;
}

.otelix-sync-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.otelix-sync-controls {
    background: rgba(248, 249, 250, 0.9);
    border: 1px solid var(--bs-border-color);
}

.otelix-sync-controls__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.otelix-sync-controls__row + .otelix-sync-controls__row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--bs-border-color);
}

.otelix-sync-filter {
    width: auto;
    max-width: 11rem;
    min-width: 8.5rem;
}

.otelix-sync-table th,
.otelix-sync-table td {
    vertical-align: middle;
}

.otelix-sync-th-check {
    width: 2rem;
}

.otelix-sync-th-toggle {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.otelix-sync-th-toggle:hover {
    background: rgba(13, 110, 253, 0.06);
}

.otelix-sync-th-toggle .bi {
    font-size: 0.85em;
    opacity: 0.65;
}

.otelix-sync-table .otelix-sync-raw {
    max-width: 10ch;
    width: 10ch;
    min-width: 0;
    vertical-align: top;
    overflow: hidden;
}

.otelix-sync-raw--clickable {
    cursor: pointer;
}

.otelix-sync-table--raw-expanded .otelix-sync-raw {
    max-width: 280px;
    min-width: 180px;
    width: auto;
}

.otelix-sync-raw__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.otelix-sync-table--raw-expanded .otelix-sync-raw__text {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 6rem;
    overflow-y: auto;
    text-overflow: clip;
}

.otelix-sync-raw__was {
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px dashed var(--bs-border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otelix-sync-table--raw-expanded .otelix-sync-raw__was {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.otelix-sync-dates .otelix-date-line {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.otelix-sync-dates .bi {
    font-size: 0.9em;
    opacity: 0.7;
}

.otelix-sync-counts .otelix-count-pair {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.otelix-sync-counts input {
    width: 2.5rem;
    text-align: center;
}

.otelix-sync-fields {
    min-width: 4.5rem;
}

.otelix-sync-fields label {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    margin-right: 4px;
    white-space: nowrap;
}

.otelix-turnover-wrap {
    background: rgba(13, 110, 253, 0.03);
}

.otelix-sync-globals label {
    white-space: nowrap;
    margin-bottom: 0;
}

.otelix-raw-btn {
    color: var(--bs-secondary-color) !important;
    vertical-align: middle;
}

.otelix-raw-btn:hover {
    color: var(--bs-primary) !important;
}

.otelix-raw-popover-wrap {
    max-width: min(420px, 92vw);
}

.otelix-raw-popover-wrap .popover-body {
    max-height: 320px;
    overflow-y: auto;
}

.otelix-raw-popover__text {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
    font-size: 0.875rem;
}

.otelix-sync-row--conflict {
    background-color: rgba(255, 193, 7, 0.12);
}

.otelix-sync-row--synced {
    background-color: rgba(25, 135, 84, 0.08);
    opacity: 0.85;
}

.otelix-sync-row--phone-match {
    background-color: rgba(13, 202, 240, 0.08);
}

.otelix-diff-old {
    background: rgba(220, 53, 69, 0.12);
    text-decoration: line-through;
}

.otelix-diff-new {
    background: rgba(25, 135, 84, 0.18);
    padding: 0 0.1em;
}

.otelix-sync-row--turnover > td {
    background: rgba(13, 110, 253, 0.04);
}

.otelix-turnover-wrap {
    border-left: 3px solid var(--bs-primary);
}

.otelix-turnover-inner {
    background: #fff;
}

.otelix-raw-btn--synced {
    color: var(--bs-success) !important;
}

.otelix-raw-btn--dirty {
    color: #d97706 !important;
}

.otelix-raw-btn--synced:hover,
.otelix-raw-btn--dirty:hover {
    opacity: 0.85;
}
