/* Turbo Hotel front desk: right-to-left, built for fingers (big targets, no hover tricks). */
:root {
    /* Metronic (Alansar ERP) palette */
    --navy: #181c32;
    --bg: #f5f8fa;
    --card: #ffffff;
    --line: #eff2f5;
    --text: #3f4254;
    --muted: #7e8299;
    --primary: #009ef7;
    --primary-dark: #0095e8;
    --ok: #50cd89;
    --danger: #f1416c;
    --warn: #ffc700;
    --reserved: #009ef7;
    --checked-in: #50cd89;
    --unassigned: #ffc700;
    --clean: #50cd89;
    --inspected: #7239ea;
    --dirty: #ffc700;
    --out-of-order: #a1a5b7;
    --radius: .475rem;
    --tap: 44px;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }


button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .45; }
h2 { margin: 0 0 .6rem; font-size: 1.5rem; }
h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
p { margin: .25rem 0; }
.muted { color: var(--muted); font-weight: 400; }
.warn { color: var(--warn); }
.empty { padding: 1.4rem; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); }

/* ---------------------------------------------------------------- buttons */
.btn {
    min-height: var(--tap);
    padding: 0 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: #f5f8fa;
    color: #5e6278;
    font-weight: 500;
    transition: color .2s, background-color .2s;
}
.btn:hover:not(:disabled) { background: #e4e6ef; color: #3f4254; }
.btn:active:not(:disabled) { background: #d9dbe7; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover:not(:disabled), .btn.primary:active:not(:disabled) { background: var(--primary-dark); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: #f5f8fa; border-color: transparent; color: #5e6278; }
.btn.big { min-height: 52px; font-size: 1.1rem; min-width: 140px; }
.btn.small { min-height: 34px; padding: 0 .8rem; font-size: .9rem; }
.btn.field { width: 100%; text-align: start; font-weight: 500; background: #fff; border: 1px solid #e4e6ef; }

/* ---------------------------------------------------------------- page actions row (the title lives in the Metronic toolbar) */
.topbar { display: flex; align-items: center; gap: .6rem; padding: 0 0 1rem; flex-wrap: wrap; }
.topbar-title { display: none; }
.topbar:not(:has(> *:not(.topbar-title))) { display: none; }
.property-select { min-height: var(--tap); border-radius: var(--radius); padding: 0 .8rem; border: 1px solid #e4e6ef; background: #fff; }

main { padding: 0; margin: 0; }

/* ---------------------------------------------------------------- home */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1rem; }
.summary div { background: var(--card); border-radius: var(--radius); padding: .9rem; text-align: center; display: flex; flex-direction: column; }
.summary b { font-size: 1.9rem; color: var(--navy); }
.summary span { color: var(--muted); font-size: .9rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.tile {
    min-height: 130px; padding: 1rem; border: 0; border-radius: 18px;
    background: var(--card); box-shadow: 0 2px 0 var(--line);
    display: flex; flex-direction: column; justify-content: center; gap: .3rem; text-align: start;
}
.tile b { font-size: 1.35rem; }
.tile span { color: var(--muted); }
.tile .count { font-size: 2.2rem; font-weight: 700; color: var(--primary); }
.tile.accent { background: var(--primary); color: #fff; }
.tile.accent span { color: rgba(255, 255, 255, .85); }
.tile:active { transform: scale(.98); }

/* ---------------------------------------------------------------- toolbar, legend */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.legend { margin-inline-start: auto; display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); flex-wrap: wrap; margin-bottom: .6rem; }
.tools .legend { margin-bottom: 0; }
.legend i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; margin-inline-start: .6rem; }

.st-reserved { background: var(--reserved); }
.st-checked_in { background: var(--checked-in); }
.st-checked_out { background: #94a3b8; }
.st-cancelled { background: #94a3b8; }
.st-unassigned { background: var(--unassigned); }
.hk-clean { background: var(--clean); color: #fff; }
.hk-inspected { background: var(--inspected); color: #fff; }
.hk-dirty { background: var(--dirty); color: #fff; }
.hk-out_of_order { background: var(--out-of-order); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.chip { min-height: 44px; border: 0; border-radius: 999px; padding: 0 1rem; color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------- room rack */
.rack { overflow-x: auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.rack-row { display: grid; grid-template-columns: 96px 1fr; min-width: 1010px; border-bottom: 1px solid var(--line); }
.rack-room {
    position: sticky; right: 0; z-index: 3;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: #f8fafc; border-inline-start: 1px solid var(--line); min-height: 58px;
}
.rack-room b { font-size: 1.15rem; }
.rack-room small { opacity: .85; font-size: .75rem; }
.rack-room.hk-dirty, .rack-room.hk-out_of_order, .rack-room.hk-inspected, .rack-room.hk-clean { box-shadow: inset -6px 0 0 currentColor; }
.rack-room.hk-clean { background: #eaf6ef; color: var(--clean); }
.rack-room.hk-inspected { background: #e6f3f7; color: var(--inspected); }
.rack-room.hk-dirty { background: #fcf0e4; color: var(--dirty); }
.rack-room.hk-out_of_order { background: #eceef1; color: var(--out-of-order); }
.rack-room b, .rack-room small { color: var(--text); }

.rack-cells { display: grid; grid-template-columns: repeat(var(--days), minmax(64px, 1fr)); position: relative; }
.rack-head .rack-cells { position: static; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .35rem 0; border-inline-end: 1px solid var(--line); background: #f8fafc; }
.day small { color: var(--muted); font-size: .72rem; }
.day.weekend { background: #f3eef7; }
.day.today { background: var(--primary); color: #fff; }
.day.today small { color: rgba(255, 255, 255, .85); }
.cell { grid-row: 1; min-height: 58px; border: 0; border-inline-end: 1px solid var(--line); background: transparent; }
.cell.weekend { background: rgba(120, 90, 160, .05); }
.cell.today { background: rgba(29, 111, 214, .07); }
.cell:active { background: rgba(29, 111, 214, .18); }
.bar {
    grid-row: 1; z-index: 2; margin: 7px 3px; min-height: 44px; border: 0; border-radius: 12px; color: #fff;
    font-weight: 600; font-size: .9rem; padding: 0 .6rem; overflow: hidden; text-align: start; box-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}
.bar span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- cards and lists */
.card {
    display: flex; align-items: center; gap: .8rem; justify-content: space-between;
    background: var(--card); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .7rem; border: 1px solid var(--line);
}
.card-main { display: flex; align-items: center; gap: 1rem; flex: 1; min-height: var(--tap); cursor: pointer; }
.card-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.card h3 { margin: 0; }
.room-badge {
    min-width: 76px; height: 64px; padding: 0 .6rem; border-radius: 14px; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700;
}
.room-badge.none { background: var(--unassigned); font-size: 1rem; }
.pill { display: inline-block; padding: .15rem .7rem; border-radius: 999px; background: #e7eef6; color: var(--navy); font-size: .85rem; font-weight: 600; }
.pill.res-active { background: #dff3e7; color: #17653a; }
.pill.res-cancelled { background: #f6e0dd; color: var(--danger); }

.search {
    width: 100%; min-height: var(--tap); padding: 0 1rem; margin-bottom: .8rem;
    border: 1px solid #e4e6ef; border-radius: var(--radius); font-size: 1rem; background: #fff; color: #5e6278;
}
.search:focus, input:focus, select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(0, 158, 247, .15); }

/* ---------------------------------------------------------------- housekeeping tiles */
.floor { margin: 1rem 0 .5rem; color: var(--muted); }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; margin-bottom: .8rem; }
.room-tile {
    min-height: 96px; border: 0; border-radius: var(--radius); display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .1rem; padding: .4rem;
}
.room-tile b { font-size: 1.6rem; }
.room-tile small { opacity: .95; }
.room-tile em { font-style: normal; font-size: .8rem; opacity: .95; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-tile.taken { background: #cbd5e1; color: #64748b; }

/* ---------------------------------------------------------------- wizard */
.steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.steps li { flex: 1; text-align: center; padding: .6rem .2rem; border-radius: 10px; background: #dde5ee; color: var(--muted); font-weight: 600; }
.steps li.on { background: var(--primary); color: #fff; }
.steps li.done { background: #cfe3f7; color: var(--primary-dark); }
.step { background: var(--card); border-radius: var(--radius); padding: 1rem; border: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.quick { display: flex; gap: .5rem; margin-bottom: .7rem; }
.quick .btn { flex: 1; }
.calendar { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.cal-head .btn { min-width: 56px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid small { color: var(--muted); padding: .2rem 0; }
.cal-day { min-height: 48px; border: 0; border-radius: 10px; background: #f3f6fa; font-weight: 600; }
.cal-day.off { background: transparent; }
.cal-day.pick { background: var(--primary); color: #fff; }
.cal-day:disabled { opacity: .3; }
.stepper { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; }
.stepper span { flex: 1; font-weight: 600; }
.stepper b { min-width: 54px; text-align: center; font-size: 1.6rem; }
.stepper .btn { min-width: 64px; font-size: 1.5rem; }
.plans { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.summary-line { margin-top: 1rem; padding: .8rem; background: #f3f6fa; border-radius: var(--radius); }
.wiz-nav { display: flex; gap: .8rem; justify-content: space-between; margin-top: 1rem; }
.wiz-nav .btn.primary { margin-inline-start: auto; }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.option {
    min-height: 140px; padding: 1rem; border: 3px solid var(--line); border-radius: 18px; background: #fff;
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; text-align: start;
}
.option b { font-size: 1.3rem; }
.option .price { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.option em { font-style: normal; color: var(--ok); font-weight: 600; }
.option em.bad { color: var(--danger); }
.option.pick { border-color: var(--primary); background: #eaf2fd; }

.tabs { display: flex; gap: .5rem; margin-bottom: .8rem; }
.form label { display: block; margin-bottom: .8rem; font-weight: 600; }
.form input { width: 100%; min-height: 60px; margin-top: .3rem; padding: 0 1rem; border: 2px solid var(--line); border-radius: var(--radius); }
.review { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.review div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.review div:last-child { border-bottom: 0; }
.hint { align-self: center; color: var(--warn); font-weight: 600; font-size: .9rem; }
.balance-box { display: flex; justify-content: space-between; align-items: center; margin: .8rem 0; padding: 1rem 1.2rem; border-radius: var(--radius); font-weight: 600; }
.balance-box b { font-size: 1.8rem; }
.balance-box.owe { background: #fcebe8; color: var(--danger); }
.balance-box.zero { background: #e4f4ea; color: #17653a; }
.balance-box.credit { background: #e7eefb; color: var(--primary-dark); }
.folio-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); }
.folio-row .d { color: var(--muted); min-width: 52px; font-size: .9rem; }
.folio-row .t { flex: 1; }
.folio-row.voided .t, .folio-row.voided b { text-decoration: line-through; color: var(--muted); }
.btn.small { min-height: 40px; padding: 0 .8rem; font-size: .9rem; }
.folio-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.empty.small { padding: .7rem; font-size: .95rem; }
.audit-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.audit-box div { background: var(--card); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; border: 1px solid var(--line); }
.audit-box span { color: var(--muted); font-size: .9rem; }
.audit-box b { font-size: 1.25rem; }
.review .total { background: #eaf2fd; font-size: 1.3rem; }
.review span { color: var(--muted); }

.finished { text-align: center; background: var(--card); border-radius: var(--radius); padding: 2rem 1rem; }
.check { width: 90px; height: 90px; margin: 0 auto 1rem; border-radius: 50%; background: var(--ok); color: #fff; font-size: 3.4rem; line-height: 90px; }
.big-number { font-size: 2.2rem; font-weight: 700; color: var(--navy); }
.done-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- overlays */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 30, 45, .55); display: flex; align-items: flex-end; justify-content: center; }
.overlay.top { z-index: 60; align-items: center; }
.sheet {
    position: relative; width: min(760px, 100%); max-height: 88vh; overflow-y: auto;
    background: #fff; border-radius: 22px 22px 0 0; padding: 1.2rem 1.2rem 1.6rem;
}
.close { position: absolute; top: .6rem; inset-inline-end: .8rem; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #eef2f6; font-size: 1.8rem; line-height: 1; }
.stay-box {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center;
    padding: .8rem 1rem; margin: .7rem 0; border-radius: var(--radius); border: 1px solid var(--line); border-inline-start: 8px solid;
    background: #fff;
}
.stay-box.st-reserved { border-inline-start-color: var(--reserved); }
.stay-box.st-checked_in { border-inline-start-color: var(--checked-in); }
.stay-box.st-checked_out, .stay-box.st-cancelled { border-inline-start-color: #94a3b8; }
.stay-box { background: #fff !important; }
.stay-actions { display: flex; flex-direction: column; gap: .5rem; min-width: 190px; }
.status-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1rem; }
.status-buttons .btn { border: 0; }

.dialog { width: min(440px, 92vw); background: #fff; border-radius: 22px; padding: 1.4rem; }
.dialog-actions { display: flex; gap: .7rem; margin-top: 1rem; }
.dialog-actions .btn { flex: 1; min-width: 0; }
.kp-value { min-height: 70px; padding: .5rem 1rem; border-radius: var(--radius); background: #f3f6fa; font-size: 2rem; text-align: center; letter-spacing: .12em; }
.kp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .8rem; direction: ltr; } /* keypads read 1-2-3 from the left everywhere */
.btn.kp { min-height: 72px; font-size: 1.8rem; }

.app-toast {
    position: fixed; z-index: 90; top: 76px; inset-inline: 1rem; margin: 0 auto; width: fit-content; max-width: 92vw; /* top, so it never covers the buttons at the bottom of a sheet */
    padding: .9rem 1.4rem; border-radius: 14px; color: #fff; background: var(--ok); font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.app-toast.error { background: var(--danger); }
.busy { position: fixed; top: 64px; inset-inline: 0; z-index: 95; height: 4px; overflow: hidden; background: rgba(29, 111, 214, .2); }
.busy span { display: block; height: 100%; width: 30%; background: var(--primary); animation: slide 1s infinite linear; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(450%); } }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--navy); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 22px; padding: 2rem 1.6rem; }
.login-card h1 { margin: 0; font-size: 2rem; color: var(--navy); }
.login-card label { display: block; margin: 1rem 0 0; font-weight: 600; }
.login-card input { width: 100%; min-height: 60px; margin-top: .3rem; padding: 0 1rem; border: 2px solid var(--line); border-radius: var(--radius); }
.login-card .btn { width: 100%; margin-top: 1.2rem; }
.error { color: var(--danger); font-weight: 600; margin: .8rem 0 0; }

@media (max-width: 760px) {
    html { font-size: 17px; }
    .two-col { grid-template-columns: 1fr; }
    .summary b { font-size: 1.5rem; }
    .card { flex-direction: column; align-items: stretch; }
    .who { display: none; }
    .topbar .btn { min-height: 44px; padding: 0 .7rem; }
}

/* the bar with many buttons (restaurant) wraps instead of pushing the page sideways */
@media (max-width: 1000px) {
    .topbar { flex-wrap: wrap; gap: .4rem; padding: .4rem .6rem; }
    .topbar-title { flex: 1 1 100%; order: -1; }
}

/* ---------------------------------------------------------------- restaurant (POS) */
a.tile { text-decoration: none; color: inherit; }
a.btn.link { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.pos-main { max-width: 1500px; }
.small-note { font-size: .85rem; margin-top: .5rem; }

.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.table-tile {
    min-height: 140px; border-radius: 18px; border: 3px solid var(--line); background: #fff; padding: .6rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
}
.table-tile b { font-size: 1.9rem; }
.table-tile small, .table-tile em { color: var(--muted); font-style: normal; }
.table-tile .amount { font-size: 1.25rem; font-weight: 700; }
.table-tile.free { border-color: #b9e0c9; }
.table-tile.occupied { background: #fdf1e1; border-color: var(--unassigned); }
.table-tile:active { transform: scale(.97); }
.tbl-free { background: #b9e0c9; }
.tbl-busy { background: var(--unassigned); }

.pos-layout { display: grid; grid-template-columns: 1fr 460px; gap: 1rem; align-items: start; }
.menu-panel { min-width: 0; }
.cats { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: .6rem; }
.cats .btn { white-space: nowrap; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.item-btn {
    min-height: 104px; border: 0; border-radius: var(--radius); background: #fff; border-bottom: 5px solid var(--kitchen, #e08a1e);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .5rem; text-align: center;
}
.item-btn b { font-size: 1.05rem; }
.item-btn span { color: var(--primary); font-weight: 700; }
.item-btn.st-kitchen { --kitchen: #e08a1e; }
.item-btn.st-bar { --kitchen: #1b7f9e; }
.item-btn.st-none { --kitchen: #94a3b8; }
.item-btn:active { transform: scale(.97); background: #eaf2fd; }

.order-panel { position: sticky; top: 76px; background: #fff; border-radius: 18px; border: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: .7rem; max-height: calc(100vh - 100px); }
.order-panel header h2 { font-size: 1.25rem; margin: 0; }
.lines { overflow-y: auto; min-height: 120px; flex: 1; }
.oline { display: grid; grid-template-columns: 124px 1fr auto auto; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.oline .qty { display: flex; align-items: center; gap: .3rem; justify-content: center; }
.oline .qty b { min-width: 28px; text-align: center; font-size: 1.15rem; }
.oline .qty .btn.small { min-width: 38px; padding: 0; }
.oline .name span { overflow-wrap: anywhere; }
.oline .name { display: flex; flex-direction: column; line-height: 1.25; }
.oline .name small { color: var(--muted); }
.oline .sent-tag { color: var(--ok) !important; font-weight: 600; }
.oline.sent { background: #f4faf6; }
.danger-text { color: var(--danger); }
.totals div { display: flex; justify-content: space-between; padding: .15rem 0; color: var(--muted); }
.totals .grand { color: var(--text); font-size: 1.4rem; font-weight: 700; border-top: 2px solid var(--line); margin-top: .3rem; padding-top: .4rem; }
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.order-actions .btn.danger-text { grid-column: 1 / -1; min-height: 44px; }
.big-stepper { justify-content: center; margin: 1rem 0; }
.big-stepper b { font-size: 2.4rem; min-width: 80px; }
.dialog.wide { width: min(620px, 94vw); max-height: 92vh; overflow-y: auto; }
.room-tile.pick { outline: 4px solid var(--primary); }
.room-tile small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.ticket { background: #fff; border-radius: 18px; border: 3px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.ticket header { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.ticket header .pill { margin-inline-start: auto; white-space: nowrap; }
.ticket header b { font-size: 1.25rem; }
.ticket ul { list-style: none; padding: 0; margin: 0; flex: 1; }
.ticket li { font-size: 1.15rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.ticket footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.ticket.tk-new { border-color: var(--reserved); }
.ticket.tk-preparing { border-color: var(--unassigned); background: #fffaf2; }
.ticket.tk-ready { border-color: var(--ok); background: #f1faf4; }
.ticket.late { border-color: var(--danger); }

@media (max-width: 1000px) {
    .pos-layout { grid-template-columns: 1fr; }
    .order-panel { position: static; max-height: none; }
}

/* ---------------------------------------------------------------- inventory */
.inv-main { padding: 0; }
.tools .search { flex: 1; min-width: 220px; }
.tools .search.narrow { flex: 0 0 220px; min-width: 0; }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.stock-tile {
    display: flex; flex-direction: column; gap: .2rem; text-align: start; min-height: 110px; padding: .9rem 1rem;
    background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
}
.stock-tile:active { transform: scale(.98); }
.stock-tile .qty-line { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stock-tile.low { border-color: var(--danger); background: #fcebe8; }
.stock-tile.low .qty-line, .stock-tile em { color: var(--danger); font-style: normal; font-weight: 600; }
.receive { display: flex; flex-direction: column; gap: .8rem; }
.rcv-lines { display: flex; flex-direction: column; gap: .5rem; }
.rcv-line { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.rcv-line b { flex: 1; }
.cost-list { display: flex; flex-direction: column; gap: .5rem; }
.cost-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.cost-row b { flex: 1; min-width: 140px; }
.margin { min-width: 70px; text-align: center; padding: .3rem .6rem; border-radius: 999px; font-weight: 700; color: #fff; background: #94a3b8; }
.margin.good { background: var(--ok); }
.margin.ok { background: var(--warn); }
.margin.bad { background: var(--danger); }
.kp-overlay { z-index: 70; }

/* ---------------------------------------------------------------- menu management */
.item-btn .per-person { display: block; color: var(--primary-dark); font-weight: 600; }
.menu-cat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; padding: .8rem 1rem; }
.menu-cat.off { opacity: .6; }
.menu-cat-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.menu-cat-head h3 { flex: 1; margin: 0; }
.catalog-item { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--line); }
.catalog-item.off b { text-decoration: line-through; color: var(--muted); }
.catalog-item b { flex: 1; min-width: 150px; }
.tag { padding: .2rem .7rem; border-radius: 999px; background: #eaf2fd; color: var(--primary-dark); font-size: .85rem; font-weight: 600; }
.btn.field.primary { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------------------------------------------------------- companies */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.co-card { display: flex; flex-direction: column; gap: .3rem; text-align: start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); min-height: var(--tap); }
.co-card.off { opacity: .6; }
.co-card:active { transform: scale(.98); }
.co-card .owed { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.co-card .owed.zero { color: var(--muted); font-weight: 400; font-size: 1rem; }
.co-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--line); }
.co-line .grow { flex: 1; min-width: 160px; }
.co-line.voided .grow { text-decoration: line-through; color: var(--muted); }
.co-line .out { color: var(--danger); font-weight: 600; }
.co-line .in { color: #17653a; font-weight: 600; }
.co-picks { display: flex; flex-direction: column; gap: .5rem; max-height: 50vh; overflow-y: auto; }
select.search { padding: 0 .8rem; }
.sheet button.field + button.field { margin-top: .5rem; }

/* ---------------------------------------------------------------- reports */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpis div { background: var(--card); border-radius: var(--radius); padding: .9rem; text-align: center; display: flex; flex-direction: column; gap: .2rem; }
.kpis b { font-size: 1.5rem; color: var(--navy); }
.kpis span { color: var(--muted); font-size: .9rem; }
.report-scroll { overflow-x: auto; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { padding: .7rem 1rem; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.report-table th { color: var(--muted); font-weight: 600; background: #f4f7fb; }
.report-table tfoot td { font-weight: 700; background: #eaf2fd; }
.report-table td.late { color: var(--danger); font-weight: 700; }

/* ---------------------------------------------------------------- housekeeping */
.hk-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.hk-chips button { display: flex; align-items: center; gap: .5rem; }
.hk-chips b { font-size: 1.3rem; }
.hk-room { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; min-height: 112px; padding: .6rem .4rem; border: 0; border-radius: var(--radius); text-align: center; }
.hk-room b { font-size: 1.6rem; }
.hk-room small, .hk-room em { font-style: normal; font-size: .8rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-room.selected { outline: 5px solid var(--primary); outline-offset: 2px; }
.hk-room .note-dot { position: absolute; top: .3rem; inset-inline-start: .4rem; }
.hk-bar { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--line); padding: .7rem 1rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; z-index: 5; }
.my-room { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem; margin-bottom: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); border-inline-start: 10px solid var(--dirty); }
.my-room.done { border-inline-start-color: var(--clean); opacity: .75; }
.my-room b.no { font-size: 2rem; min-width: 90px; }
.my-room .grow { flex: 1; min-width: 160px; }
.sheet a.btn.link, .co-line a.btn.link { color: var(--navy); border: 2px solid var(--line); background: #fff; }

/* ---------------------------------------------------------------- group booking */
.option-wrap { display: flex; flex-direction: column; gap: .4rem; }
.option-wrap .option { width: 100%; flex: 1; }
.opt-bar { display: flex; align-items: center; justify-content: space-between; }
.opt-count { background: var(--primary); color: #fff; padding: .2rem .9rem; border-radius: 999px; font-weight: 700; }
.opt-minus { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--primary); background: #fff; font-size: 1.8rem; line-height: 1; color: var(--primary); }
.rooming-row { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.rooming-row b { min-width: 110px; }
.rooming-row input { flex: 1; }
.group-tag { background: #fff3cd; color: #7a5b00; }

/* ---------------------------------------------------------------- extra services */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; margin: .8rem 0; }
.svc-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-height: 96px; padding: .7rem .8rem; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; text-align: start; }
.svc-tile b { font-size: 1.05rem; }
.svc-tile span { color: var(--primary); font-weight: 700; }
.svc-tile small { color: var(--muted); }
.svc-tile:active { transform: scale(.98); background: #eaf2fd; }
.report-table tr.clickable { cursor: pointer; } .report-table tr.clickable:active { background: #eaf2fd; }

/* ---------------------------------------------------------------- accounting */
.report-table tr.group-row td { font-weight: 700; background: #f4f7fb; }
.entry-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; }
.entry-row select.search:first-child { flex: 2; min-width: 220px; }
.entry-row .search.narrow { flex: 1; min-width: 110px; }
.kpis b.late { color: var(--danger); }


/* ---------------------------------------------------------------- Metronic frame tweaks */
.aside-logo { justify-content: center; position: relative; }
.aside-logo .wordmark { display: flex; flex-direction: column; align-items: center; line-height: 1.05; color: #fff; font-weight: 800; letter-spacing: .3em; font-size: 1.15rem; text-decoration: none; }
.aside-logo .aside-toggle { position: absolute; inset-inline-end: 1rem; }
[data-kt-aside-minimize=on] .aside-logo .wordmark { display: none; }
[data-kt-aside-minimize=on] .aside-logo .aside-toggle { position: static; }
.aside-menu .menu-link { cursor: pointer; }
.aside-menu .catalog-item .menu-link.active { background-color: rgba(63, 66, 84, .35); color: #fff; }
.drawer-start { inset-inline-start: 0; }

/* the page content sits on white cards, as in the ERP */
#kt_content_container > .app > main, #kt_content_container > .app > .inv-main {
    background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 0 20px 0 rgba(76, 87, 125, .02);
}
.card, .kpis div, .stat, .panel, .report-scroll, .co-line { border: 1px solid #eff2f5; box-shadow: none; background: #fff; border-radius: var(--radius); }
.empty { background: #f9f9f9; box-shadow: none; }

.tabs { flex-wrap: wrap; gap: .25rem; margin-bottom: 1.5rem; border-bottom: 1px solid #eff2f5; }
.tabs .btn { min-height: 46px; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #7e8299; font-weight: 600; }
.tabs .btn:hover { color: var(--primary); background: transparent; }
.tabs .btn.primary { background: transparent; color: var(--primary); border-bottom-color: var(--primary); }

.report-table th { background: #f9f9f9; color: #7e8299; text-transform: none; font-weight: 600; }
.report-table td, .report-table th { border-bottom: 1px dashed #e4e6ef; }
.tag { border-radius: .425rem; background: #f1faff; color: var(--primary); }
.pill { border-radius: .425rem; }

/* dashboard (reception home) */
.home-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.2rem; }
.home-head h2 { margin: 0; font-size: 1.4rem; color: var(--navy); }
.home-head h2 small { font-size: .9rem; font-weight: 400; margin-inline-start: .6rem; }
.home-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 1rem 1.2rem; border-inline-start: 3px solid var(--primary); }
.stat span { color: var(--muted); }
.stat b { font-size: 1.5rem; color: var(--navy); }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.2rem; }
.panel { padding: 1rem 1.2rem 1.2rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.panel-head h3 { margin: 0; font-size: 1.1rem; color: var(--navy); }
.link-btn { border: 0; background: transparent; color: var(--primary); font-weight: 600; min-height: 36px; }
.row-line { display: flex; align-items: center; gap: .8rem; padding: .6rem .3rem; border-top: 1px dashed #e4e6ef; cursor: pointer; min-height: 56px; }
.row-line:first-of-type { border-top: 0; }
.row-line:hover { background: #f9f9f9; }
.row-line .grow { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.room-badge.small { min-width: 44px; width: 44px; height: 44px; font-size: 1rem; border-radius: .475rem; }
.aside .catalog-item, .aside .menu-accordion, .aside .menu-sub { border: 0; }

/* ---------------------------------------------------------------- forms and details are pages, not pop-ups */
.app.has-sheet > main, .app.has-sheet > .inv-main, .app.has-sheet > .topbar { display: none; }
.app > .overlay:not(.top) { position: static; display: block; inset: auto; z-index: auto; background: none; padding: 0; }
.app > .overlay:not(.top) > .sheet {
    position: static; width: 100%; max-height: none; overflow: visible; border-radius: var(--radius); background: #fff;
    padding: 1.5rem; box-shadow: 0 0 20px 0 rgba(76, 87, 125, .02);
}
.sheet .close {
    position: static; width: auto; height: auto; min-height: 40px; padding: 0 1rem; margin-bottom: 1rem; border-radius: var(--radius);
    background: #f5f8fa; color: var(--primary); font-size: 1rem; font-weight: 600; display: inline-flex; align-items: center;
}
.sheet .close:hover { background: #e9f4fe; }
.sheet h2 { margin-top: 0; padding-bottom: .8rem; border-bottom: 1px dashed #e4e6ef; font-size: 1.35rem; color: var(--navy); }
.field-label { display: block; margin: 0 0 1rem; font-weight: 600; color: #5e6278; }
.field-label .search { margin-top: .4rem; margin-bottom: 0; font-weight: 400; }
.sheet .dialog-actions { justify-content: flex-start; flex-wrap: wrap; border-top: 1px dashed #e4e6ef; padding-top: 1rem; }
.sheet .dialog-actions .btn { flex: 0 0 auto; min-width: 140px; }
.rcv-line .search.qty { width: 160px; margin: 0; min-height: 40px; }
.page-h2 { margin: 0 0 1.2rem; font-size: 1.3rem; color: var(--navy); }
td.late, b.late, .late { color: var(--danger); }
.dialog-actions .dialog-actions { display: contents; }
input[inputmode="decimal"] { direction: ltr; text-align: right; }

/* report extras */
.report-table tr.group-row td { background: #f9f9f9; font-weight: 700; }
.report-table tr.total-row td { background: #f1faff; font-weight: 700; }
.databar { height: 10px; background: #eff2f5; border-radius: 5px; overflow: hidden; }
.databar i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.databar i.neg { background: var(--danger); }
.report-table thead th[colspan] { text-align: center; border-inline-start: 1px dashed #e4e6ef; }
@media print {
    .aside, .header, .toolbar, .footer, .tools, .app-toast, .busy, .drawer-overlay { display: none !important; }
    .wrapper { padding: 0 !important; }
    body { background: #fff; }
    #kt_content_container > .app > main, #kt_content_container > .app > .inv-main { box-shadow: none; padding: 0; }
    .report-scroll { border: 0; overflow: visible; }
}
.inv-lines .search { margin: 0; min-height: 38px; min-width: 130px; }
.inv-lines .search.qty { min-width: 80px; width: 90px; }
.inv-lines td { vertical-align: middle; }
.tag.late-tag { background: #fff5f8; color: var(--danger); }

/* the menu scrolls inside the sidebar (Metronic's own scroll script is not used), the contact buttons share one row */
.aside { display: flex; flex-direction: column; height: 100vh; }
.aside .aside-logo { flex: 0 0 auto; }
.aside .aside-menu { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.aside .aside-menu > .hover-scroll-overlay-y { flex: 1 1 auto; min-height: 0; margin-top: .5rem !important; margin-bottom: .5rem !important; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3a50 transparent; }
.aside .aside-footer { flex: 0 0 auto; display: flex; gap: .5rem; padding-top: .8rem !important; padding-bottom: 1rem !important; }
.aside .aside-footer .btn { flex: 1 1 0; width: auto !important; margin: 0 !important; padding: .55rem .2rem; font-size: 0; }
.aside .aside-footer .btn i { margin: 0 !important; font-size: 1.15rem; }
[data-kt-aside-minimize=on] .aside .aside-footer { flex-direction: column; }

/* ---------------------------------------------------------------- home page cards (like the Alansar ERP home) */
.home-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.home-bar .page-h2 { margin: 0; }
.home-bar .search { max-width: 320px; margin: 0; }
.chips-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.chips-row .btn { min-height: 38px; padding: 0 .9rem; font-size: .92rem; }
.chips-row .tag { margin-inline-start: .3rem; }
.screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 800px) { .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .screen-grid { grid-template-columns: 1fr; } }
.screen-card { display: flex; flex-direction: column; gap: .35rem; }
.screen-art { aspect-ratio: 16 / 9; overflow: hidden; border-radius: .85rem; display: block; color: rgba(255, 255, 255, .92); font-size: 3.4rem; cursor: pointer; box-shadow: 0 6px 16px rgba(20, 30, 50, .12); transition: transform .12s; }
.screen-art:hover { transform: translateY(-2px); }
.screen-card h3 { margin: .4rem 0 0; font-size: 1rem; font-weight: 700; color: var(--navy); cursor: pointer; }
.screen-card .crumb { margin: 0; font-weight: 600; }
.screen-card .info { margin: .2rem 0 0; color: #5e6278; font-size: .92rem; background: #f9f9f9; border-radius: .475rem; padding: .5rem .7rem; }
.screen-actions { display: flex; gap: .45rem; margin-top: .5rem; }
.screen-actions .act { width: 42px; height: 38px; border: 0; border-radius: .475rem; color: #fff; display: grid; place-items: center; cursor: pointer; }
.screen-actions .info-btn { background: #009ef7; }
.screen-actions .heart-btn { background: #cfd3de; }
.screen-actions .heart-btn.on { background: #f1416c; }
.screen-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-icon .svg-icon svg { width: 1.4rem; height: 1.4rem; }
.screen-actions .act i { color: #fff; font-size: 1rem; }
.chips-row .btn i { color: inherit; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 0 0 0 .4rem; accent-color: var(--primary); vertical-align: middle; flex: 0 0 20px; }
label.co-line { display: flex; align-items: center; gap: .8rem; }
