:root {
  --at-primary: #3b4ba3;
  --at-primary-dark: #2a367c;
  --at-blue-card: #3b538a;
  --at-teal: #1db4a6;
  --at-pink: #df6da9;
  --at-orange: #f18867;
  --at-purple: #9b86d3;
  --at-red: #dc5341;
  --at-green: #55a858;
  --at-olive: #879d58;
  --at-olive-dark: #6f8344;
  --at-yellow: #f4d046;
  --at-brown: #c2591a;
  --at-checked-out: #0d3b8e;
  --at-today-out: #ef3b2d;
  --at-checked-in: #489e44;
  --at-today-in: #7e3886;
  --at-bg: #f1f3f8;
  --at-card-bg: #ffffff;
  --at-border: #dce1eb;
  --at-text: #252b3b;
  --at-muted: #6c7589;
  --sidebar-width: 245px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--at-bg);
  color: var(--at-text);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e264a 0%, #141a35 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: 3px 0 15px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #df6da9 0%, #f18867 50%, #f4d046 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #1e264a;
  box-shadow: 0 3px 8px rgba(241, 136, 103, 0.35);
}

.brand-text h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}

.brand-text span {
  font-size: 11px;
  color: #9ba6d1;
  display: block;
}

.sidebar-nav {
  list-style: none;
  padding: 14px 10px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7986b8;
  padding: 10px 12px 6px;
  font-weight: 700;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  color: #c5cde8;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-link.active {
  background: linear-gradient(90deg, #4b5bd6 0%, #3b4ba3 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(75, 91, 214, 0.38);
}

.nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  color: #9ba6d1;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: 62px;
  background: #4e54c8;
  background: linear-gradient(90deg, #4a50c4 0%, #5b61d6 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-dot.red { background: #ff5f56; }
.window-dot.yellow { background: #ffbd2e; }
.window-dot.green { background: #27c93f; }

.hotel-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 13px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-yellow {
  background: var(--at-yellow);
  color: #1f2430;
  border: 1.5px solid #3a3520;
  font-weight: 700;
}

.btn-yellow:hover {
  background: #e9c230;
}

.btn-primary {
  background: var(--at-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--at-primary-dark);
}

.btn-teal {
  background: var(--at-teal);
  color: #fff;
}

.btn-teal:hover {
  background: #179a8e;
}

.btn-olive {
  background: var(--at-olive);
  color: #fff;
}

.btn-olive:hover {
  background: var(--at-olive-dark);
}

.btn-danger {
  background: var(--at-red);
  color: #fff;
}

.btn-danger:hover {
  background: #c54231;
}

.btn-outline {
  background: #fff;
  color: var(--at-text);
  border-color: var(--at-border);
}

.btn-outline:hover {
  background: #f5f7fb;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Content Container */
.content-area {
  padding: 22px 24px 40px;
  flex: 1;
}

.view-section {
  display: none;
  animation: fadeIn 0.2s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.pms-card {
  background: var(--at-card-bg);
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(24, 34, 65, 0.08);
  border: 1px solid var(--at-border);
  margin-bottom: 20px;
  overflow: hidden;
}

.pms-card-header {
  padding: 14px 20px;
  background: #f9fafc;
  border-bottom: 1px solid var(--at-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13.5px;
  color: #555f77;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pms-card-body {
  padding: 18px 20px;
}

/* Dashboard 6 KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  border-radius: 10px;
  padding: 16px 16px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
}

.kpi-card.teal { background: var(--at-teal); }
.kpi-card.pink { background: var(--at-pink); }
.kpi-card.orange { background: var(--at-orange); }
.kpi-card.purple { background: var(--at-purple); }
.kpi-card.red { background: var(--at-red); }
.kpi-card.green { background: var(--at-green); }
.kpi-card.blue { background: #0e7490; }

.kpi-inner {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.95;
}

.kpi-value {
  font-size: 20px;
  font-weight: 800;
  margin-top: 3px;
}

.kpi-sub {
  font-size: 11px;
  margin-top: 6px;
  opacity: 0.9;
  display: flex;
  justify-content: space-between;
}

/* Dashboard Middle Row: Property Setup + Today's Task */
.dash-mid-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.setup-segmented-bar {
  display: flex;
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #e9edf5;
}

.setup-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.setup-list {
  list-style: none;
}

.setup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 11px;
  font-size: 13px;
}

.setup-dot {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex-shrink: 0;
}

.setup-bar-wrap {
  flex: 1;
  background: #e4e7ed;
  height: 11px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.setup-bar-fill {
  height: 100%;
  background: #d4d8e1;
  border-radius: 3px;
}

/* Today's Task Blue Card */
.task-blue-card {
  background: var(--at-blue-card);
  color: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 4px 15px rgba(59, 83, 138, 0.28);
  display: flex;
  flex-direction: column;
}

.task-blue-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #c8d4f0;
  margin-bottom: 4px;
}

.task-blue-date {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.task-list-container {
  max-height: 210px;
  overflow-y: auto;
  padding-right: 6px;
}

.task-row {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 11px 14px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.15s;
}

.task-row:hover {
  background: rgba(255, 255, 255, 0.25);
}

.task-row.done {
  opacity: 0.65;
  text-decoration: line-through;
}

/* Standard PMS Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.pms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pms-table th,
.pms-table td {
  border: 1px solid #dce1eb;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.pms-table th {
  background: #f8f9fc;
  font-weight: 700;
  color: #1f2533;
}

.pms-table tr:hover td {
  background-color: #f9fbff;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.status-checked-out { background: var(--at-checked-out); }
.status-today-out { background: var(--at-today-out); }
.status-checked-in { background: var(--at-checked-in); }
.status-today-in { background: var(--at-today-in); }
.status-booking { background: var(--at-brown); }
.status-hold { background: var(--at-yellow); color: #1f2430; }
.status-cancelled { background: #6c757d; }

/* ROOM CHART STYLES */
.room-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.room-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.legend-btn {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.legend-btn.active-filter {
  outline: 2px solid #1e264a;
  transform: scale(1.04);
}

.legend-btn.checked-out { background: var(--at-checked-out); }
.legend-btn.today-out { background: var(--at-today-out); }
.legend-btn.checked-in { background: var(--at-checked-in); }
.legend-btn.today-in { background: var(--at-today-in); }
.legend-btn.booking { background: var(--at-brown); }
.legend-btn.hold { background: var(--at-yellow); color: #1a1d24; }

.chart-grid-wrapper {
  overflow-x: auto;
  border: 2px solid #725b3a;
  border-radius: 4px;
  background: #fff;
}

.room-chart-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
  table-layout: fixed;
}

.room-chart-table th,
.room-chart-table td {
  border: 1px solid #d5d9e0;
  text-align: center;
  height: 36px;
  padding: 0;
  position: relative;
  font-size: 12px;
}

.room-chart-table th.room-col-header {
  width: 190px;
  background: #f8f9fb;
  text-align: left;
  padding-left: 12px;
  font-weight: 700;
  color: #2c3547;
}

.room-chart-table th.date-header {
  background: #fff;
  padding: 6px 2px;
  font-weight: 700;
  line-height: 1.25;
  color: #222;
}

.room-chart-table th.date-header.is-today {
  background: #b1e3a8;
  color: #103b0c;
}

.room-chart-table tr.category-row td {
  background: #f3f5f9;
  font-weight: 700;
  text-align: left;
  padding: 6px 12px;
  color: #364156;
  font-size: 12.5px;
}

.room-chart-table td.room-label-cell {
  text-align: left;
  padding: 0 10px;
  font-weight: 600;
  background: #fafbfd;
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-chart-cell {
  cursor: pointer;
  transition: background 0.12s;
}

.room-chart-cell:hover {
  background: #eef4ff;
}

.chart-booking-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 2px;
  right: 2px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 7px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 5;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chart-booking-bar.hold {
  color: #1f2430;
}

.chart-booking-bar:hover {
  filter: brightness(1.08);
  z-index: 15;
}

/* Room Chart Popover Card */
.chart-popover {
  position: fixed;
  z-index: 201;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid #595959;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  padding: 12px;
  display: none;
}

.chart-popover.show {
  display: block;
}
.chart-popover-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 200; display: none; }
.chart-popover-backdrop.show { display: block; }

.chart-popover-logo {
  text-align: center;
  padding: 8px 0 10px;
  border-bottom: 1px solid #e1e5ee;
  font-weight: 800;
  font-size: 18px;
  color: #6b2039;
}

.chart-popover-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 6px;
}

.chart-popover-table td {
  border: 1px solid #e0e4ec;
  padding: 6px 9px;
}

.chart-popover-table td:first-child {
  font-weight: 600;
  width: 42%;
  background: #fafbfd;
}

/* BOOKING FLOW / CONTROL WHOLE GUEST STAY */
.booking-flow-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.flow-step-bar {
  border-radius: 6px;
  padding: 13px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: filter 0.15s;
}

.flow-step-bar.completed {
  background: #80d8b4;
  color: #154230;
}

.flow-step-bar.pending {
  background: #bde0f0;
  color: #1f4256;
}

.flow-step-bar:hover {
  filter: brightness(0.97);
}

.flow-step-body {
  background: #fff;
  border: 1px solid var(--at-border);
  border-radius: 8px;
  padding: 18px;
  margin-top: -6px;
  margin-bottom: 14px;
  display: none;
}

.flow-step-body.open {
  display: block;
}

/* HOUSEKEEPING */
.hk-cell-clean {
  background-color: #e2f0d9 !important;
  color: #38761d;
  font-weight: 700;
  text-align: center !important;
}

.hk-cell-dirty {
  background-color: #f4dede !important;
  color: #983232;
  font-weight: 700;
  text-align: center !important;
}

.hk-cell-inspected {
  background-color: #d9eaf7 !important;
  color: #1d5b8c;
  font-weight: 700;
  text-align: center !important;
}

.hk-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.hk-dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #cbd2e0;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  min-width: 210px;
  z-index: 80;
  display: none;
  overflow: hidden;
}

.hk-dropdown-menu.show {
  display: block;
}

.hk-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  font-size: 13px;
  color: #2e3646;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f7;
}

.hk-dropdown-item:hover {
  background: #f2f6ff;
  color: var(--at-primary);
}

.checklist-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dce1eb;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #fff;
  font-size: 13px;
}

/* POS MODULE */
.pos-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.pos-tree-list {
  list-style: none;
  padding-left: 6px;
}

.pos-tree-category {
  margin-bottom: 10px;
}

.pos-tree-header {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.tree-icon-box {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  border-radius: 2px;
  line-height: 1;
}

.tree-icon-box.plus { background: #e61919; }
.tree-icon-box.minus { background: #1c8c1c; }

.pos-sub-tree {
  list-style: none;
  margin-left: 22px;
  padding-left: 12px;
  border-left: 1.5px solid #3c3c3c;
  margin-top: 4px;
}

.pos-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 8px;
  margin: 3px 0;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #2b3242;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s;
}

.pos-item-btn:hover {
  background: #eef3ff;
  color: var(--at-primary);
}

/* RESERVATION ACCORDION */
.res-accordion-step {
  background: #fff;
  border: 1px solid #d0d7e6;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.res-accordion-header {
  padding: 13px 18px;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  color: #2a3347;
}

.res-accordion-body {
  padding: 18px;
  border-top: 1px solid #e1e6f0;
  display: none;
}

.res-accordion-step.active .res-accordion-body {
  display: block;
}

.res-rooms-split {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  align-items: start;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
}

.form-control {
  padding: 8px 11px;
  border: 1px solid #cbd2e0;
  border-radius: 5px;
  font-size: 13px;
  color: var(--at-text);
  background: #fff;
  outline: none;
}

.form-control:focus {
  border-color: var(--at-primary);
  box-shadow: 0 0 0 2px rgba(59, 75, 163, 0.15);
}

/* Reports */
.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.report-tab-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--at-border);
  background: #fff;
  font-weight: 600;
  font-size: 12.5px;
  color: #49546a;
  cursor: pointer;
}

.report-tab-btn.active {
  background: var(--at-primary);
  color: #fff;
  border-color: var(--at-primary);
}

.striped-progress {
  height: 12px;
  border-radius: 8px;
  background: #eaedf4;
  overflow: hidden;
  margin-top: 5px;
}

.striped-progress-bar {
  height: 100%;
  border-radius: 8px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.22) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.22) 75%,
    transparent 75%,
    transparent
  );
  background-size: 18px 18px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  padding: 14px 20px;
  background: #4e54c8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 20px;
  background: #f8f9fc;
  border-top: 1px solid var(--at-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: #1e264a;
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--at-teal);
}

/* Staff Restricted Mode Banner */
.staff-mode-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #92400e;
  font-size: 13px;
}

/* Modern Restaurant Menu Card Style (POS) */
.pos-category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.pos-cat-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pos-cat-pill:hover, .pos-cat-pill.active {
  background: var(--at-primary);
  color: #fff;
  border-color: var(--at-primary);
}

.pos-menu-scroll-area {
  overflow-y: auto;
  max-height: 580px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.pos-dish-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 11px 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pos-dish-card:hover {
  border-color: var(--at-primary);
  box-shadow: 0 4px 12px rgba(62, 79, 172, 0.14);
  transform: translateY(-1px);
}

.pos-dish-card.plan-included {
  background: #f0fdf4;
  border-color: #86efac;
}

.pos-dish-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.diet-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid;
  flex-shrink: 0;
}

.diet-icon.veg {
  border-color: #16a34a;
}

.diet-icon.veg::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
}

.diet-icon.non-veg {
  border-color: #dc2626;
}

.diet-icon.non-veg::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #dc2626;
  border-radius: 50%;
}

.pos-dish-cat-tag {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pos-dish-plan-tag {
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.pos-dish-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  line-height: 1.3;
}

.pos-dish-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 7px;
  margin-top: 2px;
}

.pos-dish-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.pos-dish-stock {
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
}

.pos-dish-stock.in-stock {
  background: #dcfce7;
  color: #15803d;
}

.pos-dish-stock.out-stock {
  background: #fee2e2;
  color: #b91c1c;
}

.pos-add-btn {
  background: var(--at-primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.pos-add-btn:hover {
  opacity: 0.88;
}

/* Settings Subtabs */
.settings-subtabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.settings-tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}

.settings-tab-btn:hover {
  color: var(--at-primary);
}

.settings-tab-btn.active {
  color: var(--at-primary);
  border-bottom-color: var(--at-primary);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .booking-flow-top-grid { grid-template-columns: 1fr; }
  .pos-layout, .res-rooms-split, .dash-mid-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 820px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Print Styles for Invoices & KOT */
@media print {
  /* No browser date/URL header-footer; our own margin instead */
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }

  /* Bill / invoice / KOT: print ONLY the popup content, as normal flowing pages */
  body.print-modal .app-layout,
  body.print-modal #toastContainer,
  body.print-modal #chartPopoverCard,
  body.print-modal .modal-backdrop:not(#invoicePrintModal),
  body.print-modal #invoicePrintModal .modal-header,
  body.print-modal #invoicePrintModal .modal-footer { display: none !important; }
  body.print-modal #invoicePrintModal { position: static !important; display: block !important; padding: 0 !important; background: none !important; inset: auto !important; }
  body.print-modal #invoicePrintModal .modal-dialog { max-width: none !important; width: 100% !important; max-height: none !important; overflow: visible !important; box-shadow: none !important; border-radius: 0 !important; display: block !important; }
  body.print-modal #invoicePrintModal .modal-body { overflow: visible !important; max-height: none !important; padding: 10mm 10mm !important; }
  body.print-modal #printableArea > div { border: none !important; padding: 0 !important; }

  /* Report: print ONLY the report */
  body.print-report .sidebar,
  body.print-report .topbar,
  body.print-report #toastContainer,
  body.print-report .modal-backdrop,
  body.print-report .view-section:not(#view-reports),
  body.print-report #view-reports .report-tabs,
  body.print-report #view-reports .pms-card-header > div { display: none !important; }
  body.print-report .app-layout, body.print-report .main-wrapper, body.print-report .content-area { display: block !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; height: auto !important; }
  body.print-report #view-reports { display: block !important; padding: 10mm !important; }
  body.print-report #view-reports .pms-card { box-shadow: none !important; border: none !important; }

  /* Keep table rows and summary boxes in one piece */
  tr, .pms-table tbody tr { page-break-inside: avoid; break-inside: avoid; }
  thead { display: table-header-group; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .no-print { display: none !important; }
}

/* 2-Option Login Switcher Tabs (Admin vs Staff) */
.login-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.login-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.login-tab-btn.active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.login-tab-btn.active.admin-active {
  color: #6b21a8;
  border-bottom: 2px solid #6b21a8;
}
.login-tab-btn.active.staff-active {
  color: #0f766e;
  border-bottom: 2px solid #0f766e;
}

/* Server Sync Badge in Topbar */
.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.server-badge.online {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}
.server-badge.online:hover {
  background: #dcfce7;
}
.server-badge.syncing {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
}
.server-badge.local {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: default;
}
.server-badge.offline {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}
.server-badge.offline:hover {
  background: #fef3c7;
}



/* Login gate: app is hidden until the user logs in */
body.logged-out .app-layout { display: none; }
body.logged-out #loginModal { background: linear-gradient(135deg, #1e2a5e 0%, #3b1c5a 100%); }
#loginModal .modal-dialog { box-shadow: 0 20px 60px rgba(0,0,0,0.35); }

/* ===== Invoice — Style 1 (Classic GST) ===== */
.inv1 { font-family: Inter, 'Segoe UI', Arial, sans-serif; font-size: 11.5px; color: #111827; background: #fff; padding: 6px 2px; }
.inv1 .r { text-align: right; } .inv1 .c { text-align: center; } .inv1 .l { text-align: left; }
.inv1 .small { font-size: 10px; }
.inv1-title { text-align: center; font-weight: 800; letter-spacing: 3px; font-size: 13px; margin-bottom: 12px; }
.inv1-subtitle { text-align: center; font-size: 10px; color: #92400e; margin: -8px 0 10px; font-weight: 600; }
.inv1-box { border: 1px solid #374151; }
.inv1-head { display: grid; grid-template-columns: minmax(0, 1fr) 235px; }
.inv1-head > div { padding: 12px 14px; }
.inv1-supplier { border-right: 1px solid #374151; display: flex; gap: 14px; align-items: center; }
.inv1-logo { height: 54px; max-width: 170px; object-fit: contain; flex-shrink: 0; }
.inv1-name { font-size: 18px; font-weight: 800; max-width: 170px; flex-shrink: 0; }
.inv1-legal { font-weight: 700; font-size: 12px; margin-bottom: 3px; }
.inv1-muted { color: #4b5563; line-height: 1.5; }
.inv1-gstin { font-weight: 700; margin-top: 2px; }
.inv1-kv { display: grid; grid-template-columns: 96px 1fr; row-gap: 5px; align-content: center; }
.inv1-kv span { color: #4b5563; } .inv1-kv b { font-weight: 600; }
.inv1-parties { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #374151; }
.inv1-parties > div { padding: 10px 14px; }
.inv1-parties > div + div { border-left: 1px solid #374151; }
.inv1-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: 1px; color: #6b7280; margin-bottom: 4px; }
.inv1 table { width: 100%; border-collapse: collapse; }
.inv1-items th { background: #f3f4f6; font-size: 10px; font-weight: 700; padding: 7px 6px; border-top: 1px solid #374151; border-bottom: 1px solid #374151; text-align: center; }
.inv1-items th.r { text-align: right; } .inv1-items th.l { text-align: left; }
.inv1-items th + th, .inv1-items td + td { border-left: 1px solid #d1d5db; }
.inv1-items td { padding: 7px 6px; vertical-align: top; border-bottom: 1px solid #e5e7eb; font-variant-numeric: tabular-nums; }
.inv1-sub { color: #6b7280; font-size: 10px; margin-top: 2px; }
.inv1-items tfoot td { font-weight: 700; border-top: 1px solid #374151; border-bottom: none; background: #f9fafb; }
.inv1-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 260px; border-top: 1px solid #374151; }
.inv1-bottom > div { padding: 10px 14px; }
.inv1-words { font-weight: 600; margin-bottom: 10px; }
.inv1-tot { border-left: 1px solid #374151; font-variant-numeric: tabular-nums; }
.inv1-tot td { padding: 5px 14px; }
.inv1-tot tr.grand td { border-top: 1px solid #374151; border-bottom: 1px solid #374151; font-weight: 800; font-size: 13px; }
.inv1-tot tr.bal td { font-weight: 700; }
.inv1-sign { display: grid; grid-template-columns: minmax(0, 1fr) 260px; border-top: 1px solid #374151; }
.inv1-sign > div { padding: 10px 14px; }
.inv1-sign > div + div { border-left: 1px solid #374151; }
.inv1 tr { page-break-inside: avoid; break-inside: avoid; }
.inv1-tot tr.disc td { color: #b91c1c; font-weight: 600; }
/* Booking voucher */
.vch .inv1-parties > div.vch-dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vch-policies { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #374151; }
.vch-policies > div { padding: 10px 14px; }
.vch-policies > div + div { border-left: 1px solid #374151; }
.vch-policies ul { margin: 0; padding-left: 16px; color: #4b5563; font-size: 10.5px; line-height: 1.55; }
.vch-foot { border-top: 1px solid #374151; padding: 9px 14px; text-align: center; font-size: 10.5px; color: #374151; }
/* Extend / Reduce stay */
.stay-btn { margin-top: 6px; display: flex; width: 100%; }
.stay-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; background: #f8f9fc; border: 1px solid #e1e6f0; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.stay-info span { display: block; font-size: 11px; color: var(--at-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stay-info b { font-size: 13.5px; }
.stay-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.stay-alert { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; padding: 10px 12px; font-size: 12.5px; margin: 6px 0 10px; }
.stay-alert.bad { background: #fdeaea; border-color: #f3a99f; color: #8a1f11; }
.stay-table td:first-child { font-weight: 600; }
.stay-chip { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 10px; margin-left: 4px; }
.stay-chip.up { background: #dcfce7; color: #166534; }
.stay-chip.down { background: #fee2e2; color: #991b1b; }
/* Detailed food bill */
.fb-order td { background: #f3f4f6; font-weight: 700; border-top: 1px solid #9ca3af; }
.fb-order td .fb-meta { font-weight: 500; color: #6b7280; font-size: 10px; margin-left: 6px; }
.fb-sum td { color: #4b5563; font-size: 10.5px; border-bottom: none !important; padding-top: 2px !important; padding-bottom: 2px !important; }
.fb-sum.last td { border-bottom: 1px solid #e5e7eb !important; padding-bottom: 7px !important; font-weight: 700; color: #111827; }
.fb-free { font-size: 9px; font-weight: 700; color: #166534; background: #dcfce7; padding: 0 5px; border-radius: 3px; margin-left: 4px; }
.fb-note { border-top: 1px solid #374151; padding: 9px 14px; font-size: 10.5px; color: #374151; }

/* ==========================================================================
   MOBILE & TABLET (v3.7) — drawer menu, compact header, touch-friendly layout
   ========================================================================== */
.mobile-menu-btn, .lbl-short, .sidebar-close, .sidebar-mobile-user, .nav-backdrop, #topViewTitle { display: none; }
.hb-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.inv-kpi { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .inv-kpi { grid-template-columns: repeat(3, 1fr); } }

@media screen and (max-width: 820px) {
  html, body { overflow-x: hidden; }
  body.nav-open { overflow: hidden; }
  .desk-only { display: none !important; }

  /* --- Drawer menu --- */
  .sidebar { width: 288px; max-width: 86vw; transform: translateX(-105%); box-shadow: none; z-index: 400; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 10px 0 34px rgba(0, 0, 0, 0.38); }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(12, 17, 38, 0.5); z-index: 350; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-brand { padding: 14px 14px 14px 16px; }
  .sidebar-close { display: flex; align-items: center; justify-content: center; margin-left: auto; width: 36px; height: 36px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; flex-shrink: 0; }
  .sidebar-mobile-user { display: block; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .smu-row { display: flex; align-items: center; gap: 12px; }
  .smu-avatar { width: 40px; height: 40px; border-radius: 50%; background: #0f766e; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
  .smu-avatar.adm { background: linear-gradient(135deg, #7c3aed, #581c87); }
  .smu-text { min-width: 0; }
  .smu-text b { display: block; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .smu-text span { font-size: 11.5px; color: #9ba6d1; }
  .smu-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
  .smu-actions button { flex: 1 1 auto; min-height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: #e4e8f7; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; cursor: pointer; font-family: inherit; }
  .smu-actions .smu-logout { background: rgba(220, 83, 65, 0.22); border-color: rgba(220, 83, 65, 0.5); color: #ffd9d3; }
  .sidebar-nav { padding: 8px 10px 16px; }
  .nav-link { padding: 12px 14px; font-size: 14.5px; min-height: 46px; }
  .main-wrapper { margin-left: 0; }

  /* --- Header --- */
  .topbar { height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; gap: 10px; }
  .topbar-left { gap: 10px; min-width: 0; flex: 1 1 auto; }
  .window-dots { display: none; }
  .mobile-menu-btn { display: inline-flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 4px; width: 42px; height: 42px; padding: 0 11px; border-radius: 11px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.24); cursor: pointer; flex-shrink: 0; }
  .mobile-menu-btn span { display: block; height: 2px; border-radius: 2px; background: #fff; }
  .hotel-badge { background: none; padding: 0; gap: 0; min-width: 0; }
  .hotel-badge > i { display: none; }
  #topHotelName { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #topViewTitle { display: block; font-size: 11.5px; font-weight: 500; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 8px; flex-shrink: 0; }
  #serverSyncStatusBadge .server-badge { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; font-size: 14px; }
  #serverSyncStatusBadge .server-badge > span { display: none; }
  #serverSyncStatusBadge .server-badge.online { background: #22c55e; border-color: #bbf7d0; color: #fff; }
  #serverSyncStatusBadge .server-badge.syncing { background: #0ea5e9; border-color: #bae6fd; color: #fff; }
  #serverSyncStatusBadge .server-badge.offline { background: #f59e0b; border-color: #fde68a; color: #fff; animation: stbPulse 1.4s infinite; }
  .top-res-btn { height: 38px; padding: 0 14px; border-radius: 19px; border-width: 1px; font-size: 13px; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }

  /* --- Page & cards --- */
  .content-area { padding: 12px 10px calc(28px + env(safe-area-inset-bottom)); }
  .pms-card { border-radius: 10px; margin-bottom: 14px; }
  .pms-card-header { padding: 11px 12px; font-size: 12.5px; flex-wrap: wrap; gap: 8px; align-items: flex-start; letter-spacing: 0.2px; }
  .pms-card-header > * { min-width: 0; max-width: 100%; }
  .pms-card-body { padding: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kpi-grid, .inv-kpi { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; margin-bottom: 14px; }
  .kpi-card { padding: 10px; }
  .kpi-inner { padding: 8px 10px; }
  .kpi-inner > i { font-size: 1.4em !important; }
  .kpi-label { font-size: 10.5px; }
  .kpi-value { font-size: 17px; }
  .staff-mode-banner { font-size: 12.5px; padding: 10px 12px; }
  .staff-mode-banner .btn { width: 100%; }

  /* fixed multi-column layouts written inline -> one column */
  .content-area [style*="grid-template-columns: 1fr 1fr"],
  .content-area [style*="grid-template-columns:1fr 1fr"],
  .content-area [style*="grid-template-columns: repeat(3"],
  .content-area [style*="grid-template-columns:repeat(3"],
  .content-area [style*="grid-template-columns: repeat(4"],
  .content-area [style*="grid-template-columns:repeat(4"],
  .content-area [style*="grid-template-columns: repeat(5"],
  .content-area [style*="grid-template-columns:repeat(5"],
  .content-area [style*="240px 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-column: span"], [style*="grid-column:span"] { grid-column: 1 / -1 !important; }
  .content-area [style*="min-width:310px"], .content-area [style*="min-width: 310px"] { min-width: 0 !important; width: 100% !important; }
  .content-area [style*="width:230px"], .content-area [style*="width: 230px"] { width: 100% !important; }

  /* --- Forms & buttons (finger friendly; 16px stops iPhone zoom) --- */
  .form-control { font-size: 16px; min-height: 42px; }
  textarea.form-control { min-height: 80px; }
  .btn { min-height: 38px; }
  .btn-sm { min-height: 34px; }

  /* --- Tables scroll sideways inside their card --- */
  .pms-table th, .pms-table td { padding: 8px 9px; font-size: 12.5px; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
  #bookingFlowTopTables .pms-table { min-width: 0; }

  /* --- Tabs scroll sideways --- */
  .report-tabs, .settings-subtabs, .pos-category-pills { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .report-tabs > *, .settings-subtabs > *, .pos-category-pills > * { flex-shrink: 0; white-space: nowrap; }

  /* --- Room chart: room column stays fixed while dates scroll --- */
  .room-chart-toolbar { flex-direction: column; align-items: stretch; }
  .room-chart-toolbar > div:first-child { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px !important; width: 100%; }
  .room-chart-toolbar > div:first-child > * { min-width: 0; }
  .room-chart-toolbar > div:first-child .btn-sm { padding: 5px 4px; }
  .room-chart-toolbar > div:first-child > .btn-yellow, .room-chart-toolbar > div:first-child > div { grid-column: 1 / -1; }
  .room-chart-toolbar > div:first-child > div .form-control { flex: 1; }
  .room-chart-legend { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .legend-btn { flex-shrink: 0; white-space: nowrap; }
  .room-chart-table { min-width: 0; width: calc(86px + 14 * 46px); }
  .room-chart-table th.room-col-header { width: 86px; padding-left: 8px; font-size: 11px; position: sticky; left: 0; z-index: 8; }
  .room-chart-table td.room-label-cell, .room-chart-table tr.category-row td:first-child { position: sticky; left: 0; z-index: 8; padding: 0 6px; font-size: 11.5px; }
  .room-chart-table tr.category-row td:first-child { white-space: normal; line-height: 1.2; padding: 4px 6px; font-size: 10.5px; }
  .room-chart-table tr.category-row td { padding: 4px 2px; }
  .chart-booking-bar { font-size: 10.5px; padding: 0 5px; }
  .chart-popover { border-radius: 14px; max-height: calc(100vh - 24px); }

  /* --- Guest stay steps --- */
  .flow-step-bar { padding: 12px 12px; font-size: 12.5px; gap: 8px; }
  .flow-step-bar > span { min-width: 0; }
  .flow-step-body { padding: 12px; overflow-x: auto; }

  /* --- Pop-up windows open as bottom sheets --- */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-dialog { max-width: 100% !important; width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal-body { padding: 14px; -webkit-overflow-scrolling: touch; }
  .modal-footer { flex-wrap: wrap; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .modal-footer .btn { flex: 1 1 140px; }
  #loginModal { align-items: center; padding: 14px; }
  #loginModal .modal-dialog { border-radius: 14px; }
  #invoicePrintModal .modal-body { overflow-x: auto; }
  #printableArea { width: 720px; }
  #invoicePrintModal .modal-body { padding: 10px; }

  .toast-container { left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .toast-msg { font-size: 12.5px; }
  .stay-info { grid-template-columns: 1fr 1fr; }
}

@media screen and (max-width: 480px) {
  .stay-info { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr !important; }
  .top-res-btn { padding: 0 12px; }
}

/* Installed app (opened from home screen) */
@media (display-mode: standalone) {
  .sidebar-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@keyframes stbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.6); } 50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); } }
/* Change room */
.rc-rate { background: #f8f9fc; border: 1px solid #e1e6f0; border-radius: 8px; padding: 10px 14px; margin: 4px 0 10px; }
.rc-rate .rc-title { font-weight: 700; font-size: 12.5px; margin-bottom: 6px; }
.rc-rate label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px 0; font-size: 13px; cursor: pointer; }
