:root {
  --bg: #faf8f4;
  --panel: #fffdf9;
  --line: #ebe3d8;
  --ink: #191714;
  --muted: #70695f;
  --gold: #a98245;
  --gold-dark: #7c5d2f;
  --black: #10120f;
  --green: #dff1df;
  --blue: #e3f0fb;
  --amber: #fbebc9;
  --red: #f7dddd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px 13px;
  color: var(--ink);
}

label {
  display: grid;
  gap: 8px;
  font-weight: 650;
}

textarea {
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--black);
  color: #f7efe3;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-transform: uppercase;
  color: #d6b77a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  padding-bottom: 22px;
}

.brand span {
  font-family: Georgia, serif;
  font-size: 32px;
  letter-spacing: 7px;
}

.brand small {
  font-family: Georgia, serif;
  letter-spacing: 5px;
  font-size: 14px;
}

.brand em {
  color: #e9dec9;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: 12px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav a,
.profile-link,
.logout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 6px;
  color: #f5efe6;
}

.sidebar-account-actions {
  display: grid;
  gap: 4px;
  margin-top: -10px;
}

.profile-link {
  padding-left: 44px;
}

.sidebar nav a.active,
.sidebar nav a:hover,
.profile-link:hover,
.logout:hover {
  background: rgba(169, 130, 69, 0.25);
}

.nav-icon {
  color: #d4ad6d;
  width: 22px;
  text-align: center;
}

.sidebar-spacer {
  flex: 1;
}

.hotel-logo {
  display: inline-grid;
  justify-items: center;
  gap: 3px;
  width: max-content;
  color: inherit;
  line-height: 1;
  text-align: center;
}

.hotel-logo b,
.hotel-logo small {
  display: block;
  line-height: 1;
}

.hotel-logo-peppers b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 5px;
}

.hotel-logo-peppers small {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.hotel-logo-mantra b {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 23px;
  font-weight: 300;
  letter-spacing: -1px;
  text-transform: lowercase;
}

.hotel-logo-mantra small {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.hotel-logo-sidebar {
  display: grid;
  align-self: center;
  justify-content: center;
  color: #f8f3eb;
  margin-top: 4px;
}

.hotel-logo-sidebar.hotel-logo-peppers b {
  font-size: 18px;
  letter-spacing: 7px;
}

.hotel-logo-sidebar.hotel-logo-peppers small {
  font-size: 7px;
  letter-spacing: 1.7px;
}

.hotel-logo-sidebar.hotel-logo-mantra b {
  font-size: 32px;
}

.hotel-logo-sidebar.hotel-logo-mantra small {
  font-size: 8px;
}

.hotel-logo-table {
  min-width: 76px;
  color: #59534b;
}

.hotel-logo-table.hotel-logo-peppers b {
  font-size: 12px;
  letter-spacing: 4px;
}

.hotel-logo-table.hotel-logo-mantra b {
  font-size: 22px;
}

.hotel-logo-compact {
  color: inherit;
}

.hotel-logo-compact.hotel-logo-peppers b,
.hotel-logo-summary.hotel-logo-peppers b {
  font-size: 13px;
  letter-spacing: 4px;
}

.hotel-logo-compact.hotel-logo-mantra b,
.hotel-logo-summary.hotel-logo-mantra b {
  font-size: 22px;
}

.main {
  padding: 36px 42px 56px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 6px;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  margin: 0;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 24px;
}

h3 {
  margin-top: 24px;
  font-size: 18px;
}

.page-subtitle {
  color: var(--muted);
  margin: 0 0 28px;
}

.dashboard-datetime {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.dashboard-datetime span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-datetime span + span::before {
  content: '•';
  color: #b9aa94;
  margin-right: 2px;
}

.dashboard-datetime svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--gold-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notification-menu {
  position: relative;
}

.notification-bell {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  position: relative;
}

.notification-bell b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #9b2c2c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  width: min(360px, calc(100vw - 32px));
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(16, 18, 15, 0.16);
  padding: 14px;
}

.notification-popover[hidden] {
  display: none;
}

.notification-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.notification-popover-head span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 11px 16px;
  cursor: pointer;
  min-height: 42px;
}

.button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.button.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.button.full {
  width: 100%;
}

.user-pill {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 2px;
  line-height: 1.2;
  min-width: 170px;
}

.user-pill strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.user-pill span {
  color: var(--muted);
}

.panel,
.metric-card,
.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 22px;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.metric-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.metric-card strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 40px;
  line-height: 1;
}

.metric-card span {
  color: var(--muted);
}

.metric-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  border-radius: 50%;
  color: var(--gold-dark);
  background: #f2eadf;
  line-height: 1;
}

.metric-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}



.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.chart-panel {
  display: grid;
  gap: 18px;
}

.chart-panel h2 {
  margin: 0 0 4px;
}

.chart-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.pie-chart {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: var(--month-gradient);
  transition: background 0.18s ease;
}

.pie-chart:hover {
  background: var(--overall-gradient);
}

.pie-chart::after {
  content: '';
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: var(--panel);
}

.pie-chart span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.pie-chart b {
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.pie-chart small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pie-chart .pie-overall {
  display: none;
}

.pie-chart:hover .pie-current {
  display: none;
}

.pie-chart:hover .pie-overall {
  display: grid;
}

.chart-legend.chart-legend-overall {
  display: none;
}

.pie-chart:hover ~ .chart-legend-month {
  display: none;
}

.pie-chart:hover ~ .chart-legend.chart-legend-overall {
  display: grid;
}

.chart-legend {
  display: grid;
  gap: 9px;
}

.chart-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) max-content max-content;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.chart-legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-legend-row b {
  color: var(--ink);
}

.chart-legend-row em {
  font-style: normal;
  color: var(--muted);
}

.response-time-panel {
  align-content: center;
  display: grid;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.response-time-panel:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.response-time-panel h2 {
  margin: 0;
}

.response-time-panel strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 54px;
  line-height: 1;
}

.response-time-panel span {
  color: var(--muted);
}

.response-time-overall {
  display: none;
}

.response-time-panel:hover .response-time-current {
  display: none;
}

.response-time-panel:hover .response-time-overall {
  display: block;
}

.unread-enquiry-link {
  font-weight: 800;
  color: var(--ink);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.table-wrap {
  overflow-x: auto;
}

.enquiry-past-departure td,
.enquiry-closed td {
  background: #efefec;
  color: #77716a;
}

.enquiry-past-departure .muted,
.enquiry-past-departure .hotel-logo,
.enquiry-past-departure .count-icons span,
.enquiry-closed .muted,
.enquiry-closed .hotel-logo,
.enquiry-closed .count-icons span {
  color: #89837b;
}

.enquiry-past-departure .badge,
.enquiry-past-departure .status,
.enquiry-past-departure .button,
.enquiry-closed .badge,
.enquiry-closed .status,
.enquiry-closed .button {
  opacity: 0.72;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 650;
}

.badge {
  background: #eef2f3;
  color: #45616b;
}

.status.new-enquiry,
.status.quoted,
.status.enquiry-updated,
.status.requote-requested,
.status.rate-updated {
  background: var(--blue);
  color: #356384;
}

.status.pending {
  background: var(--amber);
  color: #8a631e;
}

.status.rate-submitted,
.status.rate-received,
.status.confirmed {
  background: var(--green);
  color: #3d7342;
}

.status.closed {
  background: #ecebea;
  color: #5f5a54;
}

.status.cancelled,
.status.expired {
  background: var(--red);
  color: #894343;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 8px;
  background: #eef2f3;
  color: #45616b;
  font-size: 12px;
  font-weight: 650;
}

.timer-badge.warning {
  background: #fff3df;
  color: #946015;
}

.timer-badge.overdue {
  background: #fff1f1;
  color: #9b2c2c;
}

.count-icons {
  white-space: nowrap;
  text-align: center;
}

.count-icons span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 650;
}

.count-icons span + span {
  margin-left: 12px;
}

.count-icons svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--gold-dark);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-cell {
  text-align: center;
}

.status-cell .status {
  justify-content: center;
}

.status-detail {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.status-alert {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: #d33b2f;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.status-detail-timer {
  color: #946015;
}

.status-detail-timer::before {
  content: "◷";
  margin-right: 4px;
}

.reminder-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-top: 14px;
  background: #fffaf1;
}

.reminder-card.soon {
  background: #fff3df;
  border-color: #e5a34a;
}

.reminder-card.urgent {
  background: #fff1f1;
  border-color: #e05c5c;
}

.reminder-card.soon b {
  color: #946015;
}

.reminder-card.urgent b {
  color: #9b2c2c;
}

.reminder-card span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  text-align: center;
}

.calendar-filter {
  margin-top: 8px;
}

.calendar-filter select {
  min-width: 160px;
  padding: 9px 11px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
}

.calendar-weekdays span {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-weeks {
  display: grid;
}

.calendar-week {
  position: relative;
  border-top: 1px solid var(--line);
}

.calendar-week:last-child {
  border-bottom: 1px solid var(--line);
}

.calendar-week-days,
.calendar-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day {
  min-height: max(132px, calc(42px + (var(--bar-count, 1) * 84px)));
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.calendar-day:last-child {
  border-right: 1px solid var(--line);
}

.calendar-bars {
  position: absolute;
  inset: 34px 0 10px;
  align-content: start;
  grid-auto-rows: 78px;
  gap: 6px 0;
  pointer-events: none;
}

.calendar-day.muted-day {
  background: #faf7f0;
}

.calendar-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.calendar-event {
  grid-column: var(--start) / var(--end);
  grid-row: var(--row);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf1;
  padding: 6px 8px;
  margin: 0 4px;
  pointer-events: auto;
  min-width: 0;
  min-height: 0;
  height: 78px;
  overflow: hidden;
}

.calendar-event.continues-before {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: 0;
}

.calendar-event.continues-after {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: 0;
}

.calendar-event:hover {
  border-color: var(--gold);
}

.calendar-event strong,
.calendar-event span,
.calendar-event small {
  display: block;
  min-width: 0;
  text-align: center;
}

.calendar-event strong {
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 12px;
  line-height: 1.15;
}

.calendar-event span {
  width: 100%;
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.calendar-event small {
  width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.payment-status {
  display: block;
  margin-top: auto;
  text-align: center;
  width: fit-content;
  border-radius: 5px;
  padding: 2px 6px;
  font-style: normal;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
}

.payment-paid {
  background: var(--green);
  color: #3d7342;
}

.payment-pending {
  background: var(--amber);
  color: #8a631e;
}

.payment-partial {
  background: var(--blue);
  color: #356384;
}

.payment-incomplete {
  background: var(--red);
  color: #894343;
}

.notification-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  margin-top: 12px;
  background: #fff;
}

.notification-card:hover {
  border-color: var(--gold);
}

.notification-card span,
.notification-card small {
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.reminder-form [hidden] {
  display: none;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 42px;
  font-weight: 650;
}

.checkbox-field input {
  width: auto;
}

.tabs-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs a {
  padding: 10px 13px;
  border-radius: 6px;
  color: var(--muted);
}

.tabs a.active {
  background: #f0e8dc;
  color: var(--ink);
}

.tabs b {
  margin-left: 4px;
  color: var(--gold-dark);
}

.export-button {
  flex: 0 0 auto;
  min-height: 40px;
  gap: 7px;
}

.export-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.month-filter {
  display: flex;
  gap: 10px;
  align-items: center;
}

.month-filter select {
  min-width: 180px;
}

.report-filter-panel {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.report-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  align-items: end;
  column-gap: 24px;
  row-gap: 8px;
}

.report-month-field {
  justify-self: end;
  min-width: 220px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  color: var(--muted);
}

.report-month-field > span {
  display: block;
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.report-month-picker {
  position: relative;
}

.report-month-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.report-month-selected::-webkit-details-marker {
  display: none;
}

.report-month-selected::after {
  content: '+';
  color: var(--gold-dark);
  font-size: 13px;
}

.report-month-picker[open] .report-month-selected::after {
  content: '-';
}

.report-month-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 14px 28px rgba(16, 18, 15, 0.12);
  padding: 6px;
}

.report-year-group + .report-year-group {
  margin-top: 4px;
}

.report-year-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 5px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.report-year-group summary::-webkit-details-marker {
  display: none;
}

.report-year-group summary a {
  color: inherit;
  flex: 1;
}

.report-year-group.active summary {
  color: var(--gold-dark);
}

.report-year-group summary::after {
  content: '+';
  color: var(--gold-dark);
  font-size: 13px;
}

.report-year-group[open] summary {
  background: #f4ecdf;
}

.report-year-group.active summary {
  background: #fff7ea;
  color: var(--gold-dark);
}

.report-year-group[open] summary::after {
  content: '-';
}

.report-month-list {
  display: grid;
  gap: 2px;
  padding: 5px 0 2px 12px;
}

.report-month-list a {
  display: block;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-month-list a:hover,
.report-month-list a.active {
  background: #fff7ea;
  color: var(--gold-dark);
}

.report-hotel-tab-group {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-width: 0;
}

.report-hotel-tab-group > span {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.report-hotel-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
}

.report-hotel-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 255px;
  min-height: 54px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  background: #fffaf2;
}

.report-hotel-tabs a + a {
  margin-left: -1px;
}

.report-hotel-tabs a.active {
  background: var(--panel);
  border-color: #d8cdbd;
  color: var(--ink);
}

.report-hotel-tabs a.active::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  background: var(--gold);
  content: '';
}

.calendar-title {
  text-align: center;
}

.calendar-hotel-tab-group {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 12px;
}

.calendar-hotel-tabs {
  justify-content: flex-start;
}

.calendar-hotel-tabs a {
  flex-basis: 220px;
}

.report-hotel-tabs svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-hotel-tabs a.active svg {
  color: var(--gold-dark);
}

.reports-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.vertical-report {
  min-width: 0;
}

.vertical-report .panel-head {
  margin-bottom: 14px;
}

.vertical-report .panel-head .muted {
  margin: 6px 0 0;
}

.report-metrics-table {
  min-width: 0;
}

.report-metrics-table th,
.report-metrics-table td {
  padding: 16px 0;
}

.report-metrics-table th {
  width: 50%;
}

.report-metrics-table td {
  text-align: right;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: var(--ink);
}

.report-total-row th,
.report-total-row td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  padding-top: 20px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.report-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.report-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.report-summary strong {
  font-family: Georgia, serif;
  font-size: 28px;
}

.trend-panel {
  margin-top: 22px;
}

.trend-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.trend-chart-wrap {
  overflow-x: auto;
}

.trend-chart {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.trend-gridline {
  stroke: var(--line);
  stroke-dasharray: 3 5;
}

.trend-axis-label,
.trend-month-label {
  fill: var(--muted);
  font-size: 11px;
}

.trend-axis-label {
  text-anchor: end;
}

.trend-month-label {
  text-anchor: middle;
}

/* compact reports */

.reports-main {
  padding: 22px 32px 24px;
}

.reports-main .topbar {
  margin-bottom: 2px;
}

.reports-main h1 {
  font-size: 32px;
}

.reports-main .page-subtitle {
  margin-bottom: 12px;
}

.report-filter-panel {
  padding: 0;
  margin-bottom: 16px;
}

.reports-compare-grid {
  gap: 14px;
}

.vertical-report {
  padding: 16px 18px;
  margin-bottom: 14px;
}

.vertical-report .panel-head {
  margin-bottom: 8px;
}

.vertical-report h2,
.trend-panel h2 {
  font-size: 21px;
}

.report-metrics-table th,
.report-metrics-table td {
  padding: 8px 0;
}

.report-metrics-table td {
  font-size: 20px;
}

.report-total-row th,
.report-total-row td {
  padding-top: 10px;
}

.trend-panel {
  padding: 16px 18px;
  margin-top: 0;
  margin-bottom: 0;
}

.trend-panel .panel-head {
  margin-bottom: 8px;
}

.trend-legend {
  margin: -2px 0 4px;
}

.trend-chart {
  min-width: 620px;
}

@media (min-width: 1101px) {
  .calendar-main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 28px 14px;
  }

  .calendar-main .topbar {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .calendar-main h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .calendar-main .page-subtitle {
    flex: 0 0 auto;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .calendar-main .calendar-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    margin-bottom: 0;
    overflow: hidden;
  }

  .calendar-main .calendar-toolbar {
    flex: 0 0 auto;
    gap: 12px;
    margin-bottom: 8px;
  }

  .calendar-main .calendar-toolbar h2 {
    font-size: 20px;
  }

  .calendar-main .calendar-filter {
    margin-top: 4px;
  }

  .calendar-main .calendar-filter select {
    min-width: 150px;
    padding: 7px 10px;
  }

  .calendar-main .calendar-weekdays {
    flex: 0 0 auto;
  }

  .calendar-main .calendar-weekdays span {
    padding: 6px 8px;
    font-size: 11px;
  }

  .calendar-main .calendar-weeks {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(var(--week-count, 6), minmax(0, 1fr));
    overflow: auto;
  }

  .calendar-main .calendar-week {
    min-height: 0;
    overflow: hidden;
  }

  .calendar-main .calendar-week-days {
    height: 100%;
  }

  .calendar-main .calendar-day {
    min-height: 0;
    height: 100%;
    border-bottom: 0;
    padding: 6px 8px;
  }

  .calendar-main .calendar-date {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .calendar-main .calendar-bars {
    inset: 26px 0 6px;
    grid-auto-rows: minmax(42px, 1fr);
    gap: 4px 0;
    overflow: hidden;
  }

  .calendar-main .calendar-event {
    height: auto;
    min-height: 42px;
    padding: 4px 6px;
    margin: 0 3px;
    gap: 1px;
  }

  .calendar-main .calendar-event strong {
    font-size: 10px;
    line-height: 1.1;
    -webkit-line-clamp: 1;
  }

  .calendar-main .calendar-event span,
  .calendar-main .calendar-event small,
  .calendar-main .payment-status {
    font-size: 9px;
  }

  .calendar-main .payment-status {
    padding: 1px 5px;
  }

  .enquiry-view-main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 28px 14px;
  }

  .enquiry-view-main .topbar {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .enquiry-view-main h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .enquiry-view-main .page-subtitle {
    flex: 0 0 auto;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .enquiry-view-main .alert {
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  .enquiry-view-main .summary-grid {
    flex: 0 0 auto;
    gap: 10px;
    margin-bottom: 10px;
  }

  .enquiry-view-main .summary-card {
    padding: 12px 14px;
  }

  .enquiry-view-main .summary-card span {
    margin-bottom: 4px;
    font-size: 12px;
  }

  .enquiry-view-main .detail-grid {
    flex: 1 1 auto;
    min-height: 0;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .enquiry-view-main .detail-grid > div:first-child {
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
  }

  .enquiry-view-main .panel {
    padding: 14px 16px;
    margin-bottom: 10px;
  }

  .enquiry-view-main .panel-head {
    margin-bottom: 10px;
  }

  .enquiry-view-main .detail-list {
    grid-template-columns: 160px 1fr;
    gap: 8px 14px;
    font-size: 13px;
  }

  .enquiry-view-main .rates-reminders-grid {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  }

  .enquiry-view-main th,
  .enquiry-view-main td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .enquiry-view-main .payment-reminders-widget h2 {
    margin-bottom: 10px;
  }

  .enquiry-view-main .payment-reminder-card {
    min-height: 50px;
    padding: 8px 10px;
  }

  .enquiry-view-main .add-reminder-dropdown {
    margin-top: 10px;
  }

  .enquiry-view-main .timeline {
    gap: 10px;
  }

  .enquiry-view-main .chat-panel {
    position: static;
    height: auto;
    min-height: 0;
    margin-bottom: 0;
  }

  .enquiry-view-main .chat-messages {
    min-height: 0;
    margin: 10px 0;
  }

  .dashboard-main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 28px 14px;
  }

  .dashboard-main .topbar {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .dashboard-main h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .dashboard-main .dashboard-datetime {
    flex: 0 0 auto;
    margin-bottom: 4px;
    font-size: 12px;
  }

  .dashboard-main .page-subtitle {
    flex: 0 0 auto;
    margin-bottom: 10px;
    font-size: 13px;
  }

  .dashboard-main .metric-grid {
    flex: 0 0 auto;
    gap: 12px;
    margin-bottom: 10px;
  }

  .dashboard-main .metric-card {
    min-height: 82px;
    padding: 14px 16px;
    gap: 12px;
  }

  .dashboard-main .metric-card strong {
    font-size: 30px;
  }

  .dashboard-main .metric-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .dashboard-main .metric-icon svg {
    width: 23px;
    height: 23px;
  }

  .dashboard-main .dashboard-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    margin-bottom: 10px;
  }

  .dashboard-main .dashboard-grid > .panel {
    min-height: 0;
    padding: 12px 16px;
    margin-bottom: 0;
  }

  .dashboard-main .dashboard-grid > .panel:first-child {
    display: flex;
    flex-direction: column;
  }

  .dashboard-main .panel-head {
    margin-bottom: 8px;
  }

  .dashboard-main .panel-head h2,
  .dashboard-main .analytics-grid h2,
  .dashboard-main .reminders h2 {
    font-size: 18px;
  }

  .dashboard-main .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
  }

  .dashboard-main table {
    min-width: 760px;
  }

  .dashboard-main th,
  .dashboard-main td {
    padding: 7px 9px;
    font-size: 12px;
  }

  .dashboard-main .badge,
  .dashboard-main .status {
    min-height: 21px;
    padding: 2px 7px;
    font-size: 11px;
  }

  .dashboard-main .status-cell {
    text-align: left;
  }

  .dashboard-main .status-cell .status {
    justify-content: flex-start;
  }

  .dashboard-main .status-detail {
    margin-top: 3px;
    font-size: 10px;
  }

  .dashboard-main .reminders {
    overflow: auto;
  }

  .dashboard-main .reminder-card {
    gap: 4px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 12px;
  }

  .dashboard-main .reminder-card span,
  .dashboard-main .muted {
    font-size: 11px;
  }

  .dashboard-main .analytics-grid {
    flex: 0 0 auto;
    gap: 12px;
    margin-bottom: 0;
  }

  .dashboard-main .analytics-grid > .panel {
    padding: 12px 16px;
    margin-bottom: 0;
  }

  .dashboard-main .chart-panel {
    gap: 8px;
  }

  .dashboard-main .chart-body {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
  }

  .dashboard-main .pie-chart {
    width: 110px;
  }

  .dashboard-main .pie-chart::after {
    inset: 25px;
  }

  .dashboard-main .pie-chart b {
    font-size: 22px;
  }

  .dashboard-main .chart-legend {
    gap: 5px;
  }

  .dashboard-main .chart-legend-row {
    font-size: 11px;
  }

  .dashboard-main .response-time-panel {
    gap: 4px;
  }

  .dashboard-main .response-time-panel strong {
    font-size: 38px;
  }

  .reports-main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 28px 14px;
  }

  .reports-main .topbar {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .reports-main h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .reports-main .page-subtitle {
    flex: 0 0 auto;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .reports-main .report-filter-panel {
    flex: 0 0 auto;
    margin-bottom: 10px;
  }

  .reports-main .report-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
    column-gap: 20px;
    row-gap: 6px;
  }

  .reports-main .report-month-selected {
    min-height: 38px;
    padding: 7px 10px;
  }

  .reports-main .report-month-menu {
    max-height: 190px;
  }

  .reports-main .report-year-group summary {
    min-height: 26px;
    padding: 5px 8px;
  }

  .reports-main .report-month-list a {
    padding: 4px 8px;
  }

  .reports-main .report-hotel-tab-group > span {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .reports-main .report-hotel-tabs a {
    flex-basis: 238px;
    min-height: 44px;
    padding: 9px 16px;
    font-size: 11px;
  }

  .reports-main .report-hotel-tabs svg {
    width: 16px;
    height: 16px;
  }

  .reports-main .reports-compare-grid {
    flex: 0 0 auto;
    gap: 12px;
  }

  .reports-main .vertical-report {
    padding: 11px 16px;
    margin-bottom: 10px;
  }

  .reports-main .vertical-report .panel-head {
    margin-bottom: 4px;
  }

  .reports-main .vertical-report .panel-head .muted {
    margin-top: 2px;
  }

  .reports-main .vertical-report h2,
  .reports-main .trend-panel h2 {
    font-size: 18px;
  }

  .reports-main .report-metrics-table th,
  .reports-main .report-metrics-table td {
    padding: 5px 0;
    font-size: 12px;
  }

  .reports-main .report-metrics-table td {
    font-size: 17px;
  }

  .reports-main .report-total-row th,
  .reports-main .report-total-row td {
    padding-top: 7px;
  }

  .reports-main .trend-panel {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 16px 10px;
  }

  .reports-main .trend-panel .panel-head {
    flex: 0 0 auto;
    margin-bottom: 4px;
  }

  .reports-main .trend-panel .muted {
    margin: 2px 0 0;
  }

  .reports-main .trend-legend {
    flex: 0 0 auto;
    gap: 18px;
    margin: -2px 0 2px;
    font-size: 11px;
  }

  .reports-main .trend-chart-wrap {
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
  }

  .reports-main .trend-chart {
    min-width: 0;
    height: 132px;
    max-height: 132px;
  }
}

.pagination,
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination span {
  margin-right: auto;
  color: var(--muted);
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.pagination-pages .button {
  min-width: 36px;
  justify-content: center;
}

.form-grid {
  display: grid;
  gap: 20px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subpanel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin: 22px 0;
}

.subpanel h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.subpanel-head h2 {
  margin: 0;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 16px;
}

legend {
  font-weight: 650;
}

.radio {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin-right: 18px;
  font-weight: 500;
}

.radio input {
  width: auto;
}

.commission-rate {
  margin-top: 14px;
}

.stay-rows {
  display: grid;
  gap: 10px;
}

.more-details-field {
  margin-top: 16px;
}

.stay-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.stay-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 22px;
}

.alert {
  background: #fff1f1;
  border: 1px solid #efbaba;
  color: #8b3434;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.field-error {
  color: #8b3434;
  font-size: 13px;
  font-weight: 600;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-card {
  padding: 18px;
}

.summary-card span {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
}

.detail-list {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 13px 20px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.closed-reason {
  color: #9b2c2c;
}

.quote-expiry-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.quote-expiry-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}

.quote-expiry-form input {
  min-height: 36px;
  padding: 8px 10px;
}

.quote-expiry-display {
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 8px;
}

.quote-expiry-solid {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  min-height: 40px;
  margin: 14px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.quote-expiry-solid span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.quote-expiry-solid strong {
  font-size: 13px;
}

.quote-expiry-solid .reminder-menu summary {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 22px;
}

.quote-expiry-menu form {
  min-width: 190px;
}

.quote-expiry-menu label {
  display: grid;
  gap: 6px;
  padding: 6px 8px 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.quote-expiry-menu input {
  min-height: 34px;
  padding: 7px 9px;
}


.copy-details-waiting {
  margin: 14px 0 4px;
}

.copy-details-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin-top: 10px;
}

.copy-status {
  color: var(--muted);
  font-size: 13px;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.attachment-list a {
  display: grid;
  gap: 2px;
  color: var(--gold-dark);
}

.attachment-list a strong {
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.attachment-list a span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-upload-actions {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  justify-items: start;
}

.attachment-upload-form {
  margin: 0;
}

.attachment-upload-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--gold-dark);
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
}

.attachment-upload-link:hover {
  color: var(--ink);
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status-change-shell {
  display: flex;
  justify-content: flex-end;
  min-width: min(100%, 520px);
}

.status-current-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-current-row[hidden],
.status-form[hidden] {
  display: none;
}

.status-form {
  justify-content: flex-end;
}

.status-form select {
  width: auto;
  min-width: 150px;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.status-readonly-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 10px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-readonly-details dt {
  font-weight: 650;
}

.status-readonly-details dd {
  margin: 0;
  color: var(--ink);
}

.status-confirm-field,
.status-cancel-field {
  display: grid;
  gap: 4px;
  min-width: 150px;
  font-size: 12px;
}

.status-confirm-field[hidden],
.status-cancel-field[hidden] {
  display: none;
}

.status-confirm-field input,
.status-cancel-field textarea {
  padding: 8px 10px;
}

.rate-input {
  max-width: 140px;
}

.rates-reminders-grid.single,
.enquiry-view-main .rates-reminders-grid.single {
  grid-template-columns: minmax(0, min(100%, 1080px));
  justify-content: center;
}

.rates-entry-widget {
  width: 100%;
}


.rates-entry-widget h2 {
  margin-bottom: 18px;
}

.rates-entry-widget .table-wrap {
  overflow-x: visible;
}

.rates-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.rates-table th,
.rates-table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.rates-table th:nth-child(1),
.rates-table td:nth-child(1) {
  width: 13%;
}

.rates-table th:nth-child(2),
.rates-table td:nth-child(2) {
  width: 13%;
}

.rates-table th:nth-child(3),
.rates-table td:nth-child(3) {
  width: 14%;
}

.rates-table .rates-offered-head {
  padding-left: 10px;
  text-align: left;
}

.rates-table .rate-type-head th,
.rates-table td.rate-cell {
  width: 15%;
}

.rates-table td.rate-cell {
  white-space: nowrap;
}

.rates-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.table-action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.table-action-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rates-table .rate-type-head th {
  font-size: 12px;
  text-align: left;
}

.rates-table .rate-type-head small,
.rates-table th span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
}

.rate-cell {
  min-width: 150px;
}

.room-requirement-input {
  width: 100%;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 8px 10px;
}

.rooms-required-input {
  max-width: 88px;
}

.money-input,
.meal-rate-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0 8px;
}

.money-input {
  max-width: 118px;
}

.meal-rate-stack {
  display: grid;
  gap: 6px;
}

.meal-rate-input {
  width: 132px;
}

.money-input span,
.meal-rate-input .currency {
  color: var(--muted);
}

.meal-rate-input .meal-label {
  min-width: 22px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.money-input input,
.meal-rate-input input {
  min-width: 0;
  width: 72px;
  border: 0;
  padding: 8px 0;
}

.money-input input:focus,
.meal-rate-input input:focus {
  outline: 0;
}

.rate-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rate-actions textarea {
  width: 100%;
}

.revenue-action-field[hidden] {
  display: none;
}

.decline-form,
.quoted-overlap-notes {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.decline-form textarea {
  width: 100%;
}

.button.danger {
  background: var(--red);
  color: #894343;
}

.quoted-overlap-notes h3 {
  margin: 0;
}


.overlap-widget {
  position: relative;
  display: inline-grid;
  gap: 8px;
  align-self: end;
}

.overlap-widget[hidden] {
  display: none;
}

.overlap-widget.inline {
  align-self: stretch;
  grid-column: 1 / -1;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8ea;
}

.overlap-list {
  display: grid;
  gap: 8px;
}

.overlap-trigger {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff8ea;
  color: var(--gold-dark);
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.overlap-trigger b {
  margin-left: 6px;
}

.overlap-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: min(380px, 88vw);
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 35px rgba(25, 23, 20, 0.14);
}

.overlap-popover[hidden] {
  display: none;
}

.quoted-overlap-note {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  background: #fbfaf8;
}

.quoted-overlap-note span {
  color: var(--muted);
  font-size: 13px;
}

.overlap-lines {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8ea;
}

.overlap-lines > strong {
  color: var(--gold-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.overlap-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.3;
}

.overlap-line:hover {
  color: var(--gold-dark);
}

.overlap-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlap-line span + span::before {
  content: '·';
  margin-right: 8px;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 16px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 8px;
}

.timeline div {
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}

.timeline span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.chat-panel {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  margin: 18px 0;
}

.chat-messages article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.chat-messages article.mine {
  background: #f5eadb;
}

.chat-messages p {
  margin: 8px 0;
}

.chat-messages span {
  color: var(--muted);
  font-size: 12px;
}

.chat-form {
  display: grid;
  gap: 10px;
}

.confirmed-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.reminder-line {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reminder-line form {
  margin: 0;
}

.rates-reminders-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: 34px;
  align-items: start;
}

.payment-reminders-widget h2 {
  margin-bottom: 18px;
}

.payment-reminder-list {
  display: grid;
  gap: 10px;
}

.payment-reminder-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 10px 12px;
}

.payment-reminder-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--gold-dark);
  font-size: 17px;
}

.payment-reminder-card strong,
.payment-reminder-card small {
  display: block;
}

.payment-reminder-card strong {
  font-size: 13px;
  line-height: 1.2;
}

.payment-reminder-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.add-reminder-dropdown {
  margin-top: 18px;
}

.add-reminder-dropdown summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gold-dark);
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.add-reminder-dropdown summary::-webkit-details-marker {
  display: none;
}

.compact-reminder-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.reminder-paid-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.reminder-menu {
  position: relative;
}

.reminder-menu summary {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
}

.reminder-menu summary::-webkit-details-marker {
  display: none;
}

.reminder-menu form {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  min-width: 96px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 12px 24px rgba(16, 18, 15, 0.12);
}

.reminder-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--gold-dark);
  cursor: pointer;
  padding: 7px 8px;
  text-align: left;
  font-weight: normal;
}

.reminder-menu button:hover {
  background: #fff7ea;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  display: grid;
  gap: 18px;
}

.login-brand {
  border-bottom: 0;
  padding-bottom: 0;
}

.login-brand span,
.login-brand small {
  color: var(--gold-dark);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-spacer,
  .hotel-logo-sidebar {
    display: none;
  }

  .sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabs-row {
    display: grid;
  }

  .export-button {
    justify-self: end;
  }

  .dashboard-grid,
  .detail-grid,
  .reports-compare-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid,
  .calendar-week-days,
  .calendar-bars {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-week {
    border: 0;
  }

  .calendar-week-days {
    display: none;
  }

  .calendar-bars {
    position: static;
    display: grid;
    gap: 10px;
  }

  .calendar-event,
  .calendar-event.continues-before,
  .calendar-event.continues-after {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 10px;
    border-radius: 6px;
  }

  .report-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rates-reminders-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    position: static;
    height: auto;
  }

  .metric-grid,
  .summary-grid,
  .report-summary,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 24px 16px 36px;
  }

  .topbar,
  .panel-head,
  .calendar-toolbar,
  .inline-form,
  .confirmed-tools {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .top-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 30px;
  }

  .metric-grid,
  .summary-grid,
  .report-summary,
  .analytics-grid,
  .form-grid.two,
  .filters,
  .report-filter-form,
  .stay-row,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .month-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .report-month-field,
  .report-hotel-tab-group {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }

  .report-hotel-tabs a {
    flex-basis: min(255px, 85vw);
  }

  .chart-body,
  .calendar-grid,
  .calendar-week-days,
  .calendar-bars {
    grid-template-columns: 1fr;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }
}

.contact-person + .contact-person {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
}

.contact-form {
  align-items: end;
  margin-bottom: 18px;
}

.contact-form label {
  min-width: 180px;
}

.contact-person {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.contact-person .button {
  flex: 0 0 auto;
}

.contact-person-line + .contact-person-line {
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 10px;
}

.detail-menu form,
.detail-menu div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  min-width: max-content;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 12px 24px rgba(16, 18, 15, 0.12);
  text-align: left;
}

.detail-menu a {
  display: block;
  color: var(--gold-dark);
  padding: 7px 8px;
  text-decoration: none;
  font-weight: normal;
}

.detail-menu a:hover {
  background: #fff7ea;
}

.enquiry-detail-edit-form {
  display: grid;
  gap: 16px;
}


@media (min-width: 1024px) {
  .enquiries-main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 28px 14px;
  }

  .enquiries-main .topbar {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .enquiries-main h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .enquiries-main .page-subtitle {
    flex: 0 0 auto;
    margin-bottom: 10px;
    font-size: 13px;
  }

  .enquiries-main > .panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    margin-bottom: 0;
  }

  .enquiries-main .filters,
  .enquiries-main .tabs-row,
  .enquiries-main .pagination {
    flex: 0 0 auto;
  }

  .enquiries-main .filters {
    gap: 8px;
    margin-bottom: 10px;
  }

  .enquiries-main .filters input,
  .enquiries-main .filters select {
    min-height: 36px;
    padding: 8px 10px;
  }

  .enquiries-main .tabs-row {
    margin-bottom: 10px;
  }

  .enquiries-main .tabs {
    gap: 8px;
  }

  .enquiries-main .tabs a {
    min-height: 34px;
    padding: 8px 10px;
  }

  .enquiries-main .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  .enquiries-main table {
    min-width: 1160px;
  }

  .enquiries-main th,
  .enquiries-main td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .enquiries-main .hotel-logo-table {
    transform: scale(0.82);
    transform-origin: left center;
  }

  .enquiries-main .pagination {
    margin-top: 10px;
  }
}


.invoice-generate-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.invoice-generate-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 185px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 12px 28px rgba(40, 28, 12, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.invoice-generate-menu:hover .invoice-generate-options,
.invoice-generate-menu:focus-within .invoice-generate-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.invoice-generate-options a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.invoice-generate-options a:hover,
.invoice-generate-options a:focus {
  background: var(--soft-gold);
  color: var(--gold-dark);
}

.copy-details-actions > .button,
.copy-details-actions > .invoice-generate-menu > .button {
  min-width: 170px;
  justify-content: center;
}

.copy-details-actions > .invoice-generate-menu {
  width: 170px;
}

.contact-actions-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-actions-line form {
  margin: 0;
}

.contact-page-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: -8px 0 18px;
}

.contact-agent-line {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.contact-agent-menu {
  flex: 0 0 auto;
}

.contact-agent-menu div form {
  position: static;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  background: transparent;
  margin: 0;
}

.section-heading-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-heading-row h2 {
  margin: 0;
}

.section-heading-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.contact-section-menu summary {
  height: 34px;
  width: 34px;
}

.contact-parent-name {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.contact-select {
  accent-color: var(--gold);
  display: none;
  height: 16px;
  margin: 0;
  width: 16px;
}

.contact-selecting .contact-select {
  display: inline-block;
}

.contact-delete-selected[hidden] {
  display: none;
}

.contacts-table {
  table-layout: fixed;
  width: 100%;
}

.contacts-col-name {
  width: 45%;
}

.contacts-col-agent {
  width: 20%;
}

.contacts-col-phone {
  width: 12%;
}

.contacts-col-email {
  width: 17%;
}

.contacts-col-action {
  width: 6%;
}

.contacts-table th:last-child,
.contacts-table td:last-child {
  padding-right: 14px;
  text-align: right;
}

.contacts-table .contact-agent-menu {
  display: inline-flex;
  justify-content: center;
}

.contact-row-actions {
  text-align: right;
  white-space: nowrap;
}

.contact-row-actions input,
.contact-row-actions .button {
  vertical-align: middle;
}

.pagination .button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.pagination-gap {
  color: var(--muted);
  padding: 0 4px;
}

.contact-parent-edit-form {
  display: grid;
  gap: 8px;
  max-width: 260px;
}

.contact-parent-edit-form input {
  width: 100%;
}

.contact-parent-edit-form .button {
  justify-content: center;
}


.user-create-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  align-items: end;
}

.user-create-form label {
  display: grid;
  gap: 6px;
}

@media (max-width: 1200px) {
  .user-create-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}


.topbar-title {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-user-grid {
  display: grid;
  gap: 18px;
}

.role-users-panel .panel-head.compact {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.role-users-panel .panel-head.compact h2 {
  margin: 0;
}

.user-card-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fffdfa;
}

.user-card form,
.profile-form {
  display: grid;
  gap: 12px;
}

.user-card label,
.profile-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-card-head {
  display: grid;
  gap: 3px;
  margin-bottom: 4px;
}

.user-card-head strong,
.profile-summary-card strong {
  color: var(--ink);
  font-size: 18px;
}

.user-card-head span,
.profile-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.muted-badge {
  background: #f3eee6;
  color: var(--muted);
}

.profile-panel {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
}

.profile-summary-card {
  align-self: start;
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 18px;
}

@media (max-width: 900px) {
  .profile-panel {
    grid-template-columns: 1fr;
  }
}

/* App-wide responsive refinements */
img,
svg {
  max-width: 100%;
}

.table-wrap {
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.notification-popover,
.detail-menu form,
.detail-menu div,
.invoice-generate-options,
.overlap-popover,
.report-month-menu {
  max-width: calc(100vw - 24px);
}

@media (max-width: 1100px) {
  .main,
  .dashboard-main,
  .reports-main,
  .calendar-main,
  .enquiry-view-main,
  .enquiries-main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .sidebar {
    gap: 14px;
  }

  .dashboard-main .dashboard-grid,
  .reports-main .reports-compare-grid,
  .enquiry-view-main .detail-grid,
  .enquiry-view-main .rates-reminders-grid,
  .profile-panel,
  .user-create-form {
    grid-template-columns: 1fr;
  }

  .dashboard-main .dashboard-grid > .panel:first-child,
  .enquiries-main > .panel,
  .enquiry-view-main .detail-grid > div:first-child {
    overflow: visible;
  }

  .rates-entry-widget .table-wrap {
    overflow-x: auto;
  }

  .rates-table {
    min-width: 940px;
  }

  .contacts-table {
    min-width: 860px;
  }
}

@media (max-width: 768px) {
  body {
    min-width: 0;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px;
  }

  .brand {
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-bottom: 12px;
  }

  .brand span {
    font-size: 24px;
    letter-spacing: 4px;
  }

  .brand small {
    font-size: 11px;
    letter-spacing: 3px;
  }

  .brand em {
    display: none;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .sidebar nav a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 11px 12px;
    white-space: nowrap;
  }

  .sidebar-account-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 0;
  }

  .profile-link,
  .logout {
    min-height: 44px;
    padding: 11px 14px;
  }

  .main,
  .dashboard-main,
  .reports-main,
  .calendar-main,
  .enquiry-view-main,
  .enquiries-main {
    padding: 18px 14px 28px;
  }

  .topbar,
  .panel-head,
  .section-heading-row,
  .calendar-toolbar,
  .confirmed-tools,
  .inline-form,
  .contact-page-actions,
  .contact-form,
  .subpanel-head {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .topbar-title {
    display: block;
  }

  .top-actions,
  .form-actions,
  .section-heading-actions,
  .status-current-row,
  .status-form,
  .copy-details-actions,
  .rates-table-actions,
  .contact-actions-line,
  .pagination,
  .pagination-pages,
  .month-filter {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .top-actions .button,
  .form-actions .button,
  .inline-form .button,
  .confirmed-tools .button,
  .copy-details-actions > .button,
  .copy-details-actions > .invoice-generate-menu,
  .copy-details-actions > .invoice-generate-menu > .button,
  .rate-actions .button,
  .rates-table-actions .button,
  .contact-page-actions .button,
  .section-heading-actions .button,
  .pagination .button,
  .export-button {
    width: 100%;
  }

  .notification-bell,
  .reminder-menu summary,
  .detail-menu summary,
  .contact-section-menu summary {
    width: 44px;
    min-width: 44px;
  }

  .notification-menu {
    align-self: flex-start;
  }

  .notification-popover {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 28px));
  }

  .user-pill {
    min-width: 0;
  }

  h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  h2 {
    font-size: 22px;
  }

  .page-subtitle {
    margin-bottom: 18px;
  }

  .panel,
  .metric-card,
  .summary-card,
  .subpanel,
  fieldset {
    padding: 14px;
  }

  .metric-grid,
  .summary-grid,
  .analytics-grid,
  .dashboard-main .metric-grid,
  .dashboard-main .analytics-grid,
  .reports-main .reports-compare-grid,
  .reports-compare-grid,
  .report-summary,
  .detail-grid,
  .rates-reminders-grid,
  .form-grid.two,
  .filters,
  .report-filter-form,
  .user-create-form,
  .profile-panel,
  .chart-body,
  .confirmed-tools,
  .stay-row,
  .detail-list,
  .status-readonly-details {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 76px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 32px;
  }

  .metric-icon {
    flex-basis: 48px;
    height: 48px;
    width: 48px;
  }

  .filters input,
  .filters select,
  .filters button,
  .report-month-field,
  .month-filter select,
  .status-form select,
  .status-confirm-field,
  .status-cancel-field,
  .contact-form label,
  .contact-parent-edit-form,
  .quote-expiry-form label {
    min-width: 0;
    width: 100%;
  }

  .tabs-row {
    display: grid;
    gap: 10px;
  }

  .tabs,
  .report-hotel-tabs,
  .calendar-hotel-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .tabs a,
  .report-hotel-tabs a,
  .calendar-hotel-tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .report-hotel-tabs a,
  .calendar-hotel-tabs a {
    flex-basis: min(245px, 82vw);
  }

  .report-month-field,
  .report-hotel-tab-group {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }

  .report-month-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .table-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  table {
    min-width: 760px;
  }

  .dashboard-main table,
  .enquiries-main table {
    min-width: 1050px;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .rates-entry-widget .table-wrap {
    overflow-x: auto;
  }

  .rates-table {
    min-width: 920px;
  }

  .rate-cell,
  .meal-rate-input,
  .money-input {
    min-width: 128px;
  }

  .money-input,
  .meal-rate-input {
    max-width: none;
    width: 100%;
  }

  .money-input input,
  .meal-rate-input input {
    width: 100%;
  }

  .stay-head {
    display: none;
  }

  .chat-panel {
    height: auto;
    position: static;
  }

  .chat-messages {
    max-height: 360px;
    min-height: 180px;
  }

  .chat-form textarea {
    min-height: 96px;
  }

  .payment-reminder-card,
  .reminder-line,
  .contact-person,
  .contact-agent-line {
    align-items: stretch;
  }

  .payment-reminder-card {
    grid-template-columns: 24px minmax(0, 1fr) 32px;
  }

  .add-reminder-dropdown summary {
    width: 100%;
  }

  .invoice-generate-menu {
    width: 100%;
  }

  .invoice-generate-options {
    width: 100%;
  }

  .calendar-panel {
    overflow: hidden;
  }

  .calendar-title,
  .calendar-filter,
  .calendar-hotel-tab-group {
    margin-left: 0;
    width: 100%;
  }

  .calendar-event {
    min-width: 0;
  }

  .login-page {
    align-items: start;
    padding: 16px;
  }

  .login-card {
    padding: 22px 18px;
  }
}

@media (max-width: 480px) {
  .main,
  .dashboard-main,
  .reports-main,
  .calendar-main,
  .enquiry-view-main,
  .enquiries-main {
    padding: 14px 10px 24px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand span {
    font-size: 21px;
    letter-spacing: 3px;
  }

  .brand small {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .sidebar nav a {
    gap: 8px;
    padding-inline: 10px;
  }

  .nav-icon {
    width: 18px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 20px;
  }

  .metric-grid,
  .summary-grid,
  .analytics-grid,
  .dashboard-main .metric-grid,
  .dashboard-main .analytics-grid {
    grid-template-columns: 1fr;
  }

  .chart-body {
    justify-items: start;
  }

  .pie-chart {
    width: 132px;
  }

  .pie-chart::after {
    inset: 29px;
  }

  .quote-expiry-form,
  .quote-expiry-solid {
    width: 100%;
  }

  .quote-expiry-solid {
    justify-content: space-between;
  }

  .payment-reminder-card {
    grid-template-columns: 22px minmax(0, 1fr) 28px;
    gap: 8px;
  }

  .notification-popover {
    width: calc(100vw - 20px);
  }

  .contact-parent-name {
    align-items: flex-start;
  }

  .pagination-pages {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 360px) {
  .main,
  .dashboard-main,
  .reports-main,
  .calendar-main,
  .enquiry-view-main,
  .enquiries-main {
    padding-inline: 8px;
  }

  .panel,
  .metric-card,
  .summary-card,
  .subpanel,
  fieldset,
  .login-card {
    padding: 12px;
  }

  h1 {
    font-size: 25px;
  }

  .button,
  input,
  select,
  textarea {
    padding-left: 10px;
    padding-right: 10px;
  }

  .report-hotel-tabs a,
  .calendar-hotel-tabs a {
    flex-basis: 88vw;
  }
}

/* Compact contacts index tabs */
.contacts-page {
  display: grid;
  gap: 12px;
}

.contact-kind-tab-group {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.contact-kind-tab-group > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.contact-kind-tabs {
  border-bottom: 1px solid var(--line);
}

.contact-kind-tabs a {
  flex-basis: 255px;
  min-height: 50px;
  padding: 10px 18px;
}

.contact-tab-icon {
  color: var(--gold-dark);
  font-size: 17px;
  line-height: 1;
}

.contacts-panel {
  padding: 16px 20px;
}

.contacts-panel .section-heading-row {
  margin-bottom: 10px;
}

.contacts-panel h2 {
  font-size: 22px;
}

.contacts-panel .table-wrap {
  max-height: calc(100vh - 250px);
  overflow: auto;
}

.contacts-table {
  min-width: 980px;
}

.contacts-table th,
.contacts-table td {
  padding: 10px 14px;
  font-size: 13px;
}

.contacts-table th {
  font-size: 11px;
}

.contacts-table input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.contacts-table .button.small {
  min-height: 30px;
  padding: 6px 10px;
}

.contact-parent-name strong {
  font-size: 13px;
}

@media (max-width: 768px) {
  .contact-kind-tabs a {
    flex-basis: min(245px, 82vw);
  }

  .contacts-panel {
    padding: 14px;
  }

  .contacts-panel .table-wrap {
    max-height: none;
  }
}

/* Compact one-screen new enquiry form */
@media (min-width: 1024px) {
  .enquiry-new-main {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 28px 14px;
  }

  .enquiry-new-main .topbar {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .enquiry-new-main h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .enquiry-new-main .page-subtitle {
    flex: 0 0 auto;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .enquiry-new-main .alert {
    flex: 0 0 auto;
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .enquiry-new-main .enquiry-form {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 8px;
    overflow: hidden;
    padding: 12px 14px;
    margin-bottom: 0;
  }

  .enquiry-new-main .form-grid {
    gap: 8px 12px;
  }

  .enquiry-new-main .form-grid.two {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .enquiry-new-main label {
    gap: 4px;
    font-size: 12px;
  }

  .enquiry-new-main input,
  .enquiry-new-main select,
  .enquiry-new-main textarea {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .enquiry-new-main textarea {
    min-height: 48px;
    max-height: 64px;
  }

  .enquiry-new-main .subpanel {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0;
    padding: 12px;
  }

  .enquiry-new-main .subpanel-head {
    margin-bottom: 0;
  }

  .enquiry-new-main .subpanel h2 {
    font-size: 17px;
  }

  .enquiry-new-main .stay-rows {
    min-height: 0;
    max-height: none;
    overflow: auto;
    gap: 6px;
    padding-right: 3px;
  }

  .enquiry-new-main .stay-row {
    gap: 8px;
  }

  .enquiry-new-main .stay-head {
    font-size: 10px;
  }

  .enquiry-new-main .empty-state {
    align-content: center;
    min-height: 64px;
    padding: 12px;
    font-size: 13px;
  }

  .enquiry-new-main .more-details-field {
    margin-top: 0;
  }

  .enquiry-new-main fieldset {
    padding: 10px 12px;
  }

  .enquiry-new-main legend {
    font-size: 12px;
  }

  .enquiry-new-main .radio {
    margin-right: 10px;
    font-size: 12px;
  }

  .enquiry-new-main .commission-rate {
    margin-top: 6px;
  }

  .enquiry-new-main .form-actions {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .enquiry-new-main .button {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .enquiry-new-main .overlap-widget.inline {
    max-height: 78px;
    overflow: auto;
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .enquiry-new-main {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .enquiry-new-main .topbar h1 {
    font-size: 28px;
  }

  .enquiry-new-main .enquiry-form {
    gap: 6px;
    padding: 10px 12px;
  }

  .enquiry-new-main .subpanel {
    padding: 10px;
  }

  .enquiry-new-main input,
  .enquiry-new-main select,
  .enquiry-new-main textarea,
  .enquiry-new-main .button {
    min-height: 31px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .enquiry-new-main textarea {
    min-height: 40px;
    max-height: 50px;
  }
}

/* Sectioned new enquiry layout */
.enquiry-form-sectioned {
  display: grid;
  gap: 10px;
}

.new-enquiry-section,
.new-enquiry-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.new-enquiry-section {
  padding: 14px 16px;
}

.new-enquiry-section h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 750;
}

.new-enquiry-section h2 span {
  color: var(--gold-dark);
  font-size: 17px;
}

.new-enquiry-grid {
  display: grid;
  gap: 10px 14px;
}

.new-enquiry-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.new-enquiry-grid.two-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nightly-requirements-section .subpanel-head {
  margin-bottom: 8px;
}

.nightly-requirements-section .subpanel-head p {
  margin: 4px 0 0;
  font-size: 12px;
}

.new-enquiry-bottom-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.new-enquiry-tile {
  padding: 12px;
}

.new-enquiry-tile textarea {
  min-height: 86px;
}

.more-details-tile {
  grid-row: span 2;
}

.additional-info-tile {
  grid-column: 4;
  grid-row: span 2;
}

.compact-fieldset legend {
  margin-bottom: 8px;
}

@media (min-width: 1024px) {
  .enquiry-new-main .enquiry-form-sectioned {
    grid-template-rows: auto auto auto minmax(110px, .9fr) auto auto;
    gap: 8px;
    padding: 10px;
    background: transparent;
    border: 0;
  }

  .enquiry-new-main .new-enquiry-section {
    padding: 10px 12px;
  }

  .enquiry-new-main .new-enquiry-section h2 {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .enquiry-new-main .new-enquiry-grid {
    gap: 7px 12px;
  }

  .enquiry-new-main .nightly-requirements-section {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .enquiry-new-main .nightly-requirements-section .stay-rows {
    overflow: auto;
  }

  .enquiry-new-main .new-enquiry-bottom-grid {
    gap: 8px;
  }

  .enquiry-new-main .new-enquiry-tile {
    padding: 9px 10px;
  }

  .enquiry-new-main .new-enquiry-tile textarea {
    min-height: 58px;
    max-height: 72px;
  }

  .enquiry-new-main .more-details-tile textarea,
  .enquiry-new-main .additional-info-tile textarea {
    min-height: 98px;
    max-height: 118px;
  }
}

@media (max-width: 1023px) {
  .new-enquiry-grid.four,
  .new-enquiry-grid.two-wide,
  .new-enquiry-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .more-details-tile,
  .additional-info-tile {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .new-enquiry-grid.four,
  .new-enquiry-grid.two-wide,
  .new-enquiry-bottom-grid {
    grid-template-columns: 1fr;
  }
}

