:root {
  --primary: #8C9474;
  --primary-hover: #747D5F;
  --primary-soft: #F1F3EA;
  --accent: #B08A57;
  --accent-hover: #987344;
  --accent-soft: #F6ECDD;
  --background: #FDFAF3;
  --surface: #FFFDF8;
  --surface-muted: #F8F1E6;
  --text-main: #1A1A1A;
  --text-muted: #6F685E;
  --border: #D7C7AE;
  --success: #8C9474;
  --warning: #B08A57;
  --danger: #9A3F35;
  --shadow: 0 1px 2px rgba(26, 26, 26, .08);
  --radius: 8px;
  --bs-primary: var(--primary);
  --bs-primary-rgb: 140, 148, 116;
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-hover);
}

* { letter-spacing: 0; }

body {
  background: var(--background);
  color: var(--text-main);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.app-shell { min-height: 100vh; display: flex; }
.app-sidebar {
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  display: flex;
  flex-direction: column;
}
.app-main { flex: 1; min-width: 0; margin-left: 280px; }
.app-content { padding: 24px; max-width: 1640px; margin: 0 auto; }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 72px;
  background: rgba(255,253,248,.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.sidebar-brand { height: 80px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.sidebar-close { flex: 0 0 auto; }
.brand-mark { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--primary); color: white; font-weight: 800; }
.brand-title { font-weight: 800; }
.brand-subtitle, .sidebar-section, .stat-label, .stat-hint, .page-breadcrumb, .text-muted { color: var(--text-muted) !important; }
.brand-subtitle { font-size: 12px; }
.sidebar-nav { padding: 20px 14px; flex: 1; overflow-y: auto; }
.sidebar-section { font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 0 12px 8px; }
.sidebar-link {
  min-height: 44px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #3F3A32;
  font-weight: 600;
  text-align: left;
}
.sidebar-link i { font-size: 18px; color: #9D927F; }
.sidebar-link:hover { background: var(--surface-muted); color: var(--text-main); }
.sidebar-link.active { background: var(--primary-soft); color: var(--primary-hover); }
.sidebar-link.active i { color: var(--primary); }
.sidebar-group-label { cursor: pointer; margin-bottom: 2px; }
.sidebar-group-label span { flex: 1; }
.sidebar-group-caret {
  margin-left: auto;
  font-size: 13px !important;
  transition: transform .18s ease;
}
.sidebar-group-label:not(.collapsed) .sidebar-group-caret { transform: rotate(180deg); }
.sidebar-submenu {
  gap: 2px;
  margin: -2px 0 8px 42px;
}
.sidebar-submenu.collapse:not(.show) { display: none; }
.sidebar-submenu.collapse.show,
.sidebar-submenu.collapsing { display: grid; }
.sidebar-sublink {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  color: #5F574C;
  font-size: 14px;
  font-weight: 650;
}
.sidebar-sublink:hover { background: var(--surface-muted); color: var(--text-main); }
.sidebar-sublink.active { background: var(--primary-soft); color: var(--primary-hover); }
.sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--border); }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.profile-btn, .icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 40px;
  border-radius: 8px;
  color: var(--text-main);
}
.icon-btn { width: 40px; display: inline-grid; place-items: center; padding: 0; }
.profile-btn { display: inline-flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary-hover); font-weight: 700; }
.page-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 18px; }

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.profile-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}
.profile-summary-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.profile-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 32px;
  font-weight: 850;
}
.profile-summary-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
}
.profile-summary-card p {
  margin: -6px 0 4px;
  color: var(--text-muted);
}
.profile-meta-list {
  width: 100%;
  display: grid;
  gap: 10px;
  text-align: left;
}
.profile-meta-list div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 10px 12px;
}
.profile-meta-list span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 4px;
}
.profile-meta-list strong {
  display: block;
  color: var(--text-main);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-title { font-size: 28px; font-weight: 800; margin: 0; }
.page-subtitle { color: var(--text-muted); margin: 4px 0 0; }

.app-card, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.app-card { padding: 20px; }
.card { overflow: hidden; }
.card-body { padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head h2, .app-card h2, .card h2 { font-size: 18px; font-weight: 750; margin: 0; }
.card-head p { margin: 4px 0 0; color: var(--text-muted); }
.card-actions { display: flex; gap: 8px; align-items: center; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 128px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.dashboard-stat-grid .stat-card {
  height: 100%;
}
.stat-card-link {
  display: block;
  color: inherit;
  height: 100%;
}
.stat-card-link:hover {
  color: inherit;
}
.stat-card-link:hover .stat-card {
  border-color: #BFC6A8;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26, 26, 26, .08);
}
.stat-card {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.stat-icon { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 20px; }
.tone-primary { background: var(--primary-soft); color: var(--primary-hover); }
.tone-success { background: var(--primary-soft); color: var(--success); }
.tone-warning { background: var(--accent-soft); color: var(--warning); }
.tone-danger { background: #F6E7E1; color: var(--danger); }
.stat-label { font-size: 13px; font-weight: 650; }
.stat-value { font-size: 24px; line-height: 1.25; font-weight: 800; margin-top: 4px; }
.stat-sensitive-value {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sensitive-mask,
.sensitive-real {
  min-width: 84px;
}
.sensitive-toggle {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
}
.sensitive-toggle:hover {
  color: var(--primary-hover);
  border-color: #BFC6A8;
  background: var(--primary-soft);
}
.stat-hint { font-size: 12px; margin-top: 4px; }
.report-summary-pill-h2 {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
}

.table { margin-bottom: 0; color: var(--text-main); }
.table thead th, .table > :not(caption) > * > th {
  background: var(--surface-muted);
  color: #5F574C;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 750;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table > :not(caption) > * > td { border-bottom-color: var(--border); vertical-align: middle; }
.table-hover tbody tr:hover { background: #FBF7EF; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

.form-label { font-weight: 650; color: #3F3A32; font-size: 13px; margin-bottom: 6px; }
.form-control, .form-select {
  border-color: var(--border);
  border-radius: 8px;
  min-height: 42px;
  color: var(--text-main);
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(140, 148, 116, .2); }
.invoice-form-card {
  padding: 18px;
}
.invoice-participant-list {
  display: grid;
  gap: 14px;
}
.invoice-participant-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 16px;
}
.invoice-participant-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.invoice-participant-head h3 {
  font-size: 16px;
  font-weight: 850;
  margin: 0;
}
.invoice-participant-head p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 3px 0 0;
}
.participant-treatment-list {
  display: grid;
  gap: 10px;
}
.invoice-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.invoice-form-head h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}
.member-preference-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 8px 10px;
}
.customer-type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.customer-entry-card {
  background: linear-gradient(180deg, #FFFDF8 0%, #FFFCF6 100%);
}
.customer-entry-head {
  margin-bottom: 14px;
}
.customer-entry-add {
  white-space: nowrap;
}
.customer-type-switch-cards {
  gap: 12px;
}
.customer-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.customer-type-option span {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 750;
  cursor: pointer;
}
.customer-type-segment {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  max-width: 360px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}
.customer-type-segment .customer-type-option span {
  min-height: 38px;
  border: 0;
  background: transparent;
  font-size: 14px;
}
.customer-type-segment .customer-type-option i {
  color: var(--text-muted);
  font-size: 16px;
}
.customer-type-segment .customer-type-option input:checked + span {
  background: var(--surface);
  color: var(--text-main);
  box-shadow: var(--shadow);
}
.customer-type-segment .customer-type-option input:checked + span i {
  color: var(--primary-hover);
}
.customer-type-switch-cards .customer-type-option span {
  min-height: 76px;
  justify-content: flex-start;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
}
.customer-type-switch-cards .customer-type-option i {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--accent);
  font-size: 18px;
  flex: 0 0 auto;
}
.customer-type-switch-cards .customer-type-option strong,
.customer-type-switch-cards .customer-type-option small {
  display: block;
}
.customer-type-switch-cards .customer-type-option strong {
  color: var(--text-main);
  line-height: 1.2;
}
.customer-type-switch-cards .customer-type-option small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  margin-top: 3px;
}
.customer-type-option input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.customer-type-option input:checked + span i {
  background: var(--primary);
  color: white;
}
.customer-input-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(240px, .72fr);
  gap: 12px;
  align-items: end;
}
.customer-input-grid-member {
  grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr);
}
.input-group-modern .input-group-text {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  border-radius: 8px 0 0 8px;
}
.input-group-modern .form-control {
  border-left: 0;
}
.customer-benefit-note {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 11px;
}
.customer-benefit-note i {
  color: var(--accent);
  font-size: 18px;
}
.customer-benefit-note strong,
.customer-benefit-note span {
  display: block;
  line-height: 1.25;
}
.customer-benefit-note strong {
  font-size: 13px;
}
.customer-benefit-note span {
  color: var(--text-muted);
  font-size: 12px;
}
.customer-note-row .form-control {
  min-height: 50px;
  resize: vertical;
}
.member-preference-box div {
  min-width: 0;
}
.member-preference-box span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.member-preference-box strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-preference-box div:last-child {
  border-left: 1px solid var(--border);
  padding-left: 10px;
}
@media (max-width: 575.98px) {
  .invoice-form-head {
    align-items: stretch;
    flex-direction: column;
  }
  .customer-entry-add {
    width: 100%;
  }
  .customer-type-switch,
  .customer-type-segment,
  .customer-input-grid,
  .customer-input-grid-member {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .member-preference-box {
    grid-template-columns: 1fr;
  }
  .member-preference-box div:last-child {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 8px;
  }
}
.btn { border-radius: 8px; font-weight: 700; min-height: 40px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-warning { background: var(--warning); border-color: var(--warning); color: white; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-outline-primary { color: var(--primary-hover); border-color: #BFC6A8; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: white; }
.text-primary { color: var(--primary-hover) !important; }
.btn-sm { min-height: 34px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  text-transform: capitalize;
  white-space: nowrap;
}
.status-success { background: var(--primary-soft); color: #596242; }
.status-warning { background: var(--accent-soft); color: #7D5A30; }
.status-danger { background: #F6E7E1; color: #7E3028; }
.status-neutral { background: var(--surface-muted); color: #3F3A32; }

.pos-grid { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.5fr) minmax(300px, .9fr); gap: 18px; align-items: start; }
.pos-layout { display: grid; gap: 18px; }
.pos-main-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.treatment-quick-grid { display: grid; gap: 10px; max-height: 520px; overflow: auto; }
.treatment-option { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #FFFCF5; }
.invoice-item-row { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: var(--surface); }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.summary-row.total { border-bottom: 0; font-size: 22px; font-weight: 800; padding-top: 16px; }
.closing-cash-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.closing-cash-breakdown div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 10px;
}
.closing-cash-breakdown span,
.closing-estimate-note span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}
.closing-cash-breakdown strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}
.closing-estimate-note {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px;
}
.closing-estimate-note div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.closing-estimate-note strong {
  white-space: nowrap;
  font-size: 13px;
}
.invoice-total-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.invoice-total-card,
.invoice-total-card .card-body {
  min-height: 128px;
}
.invoice-total-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.invoice-total-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.invoice-total-value {
  color: var(--text-main);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.invoice-total-hint {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  min-height: 18px;
}
.invoice-total-positive { color: var(--success); }
.invoice-total-negative { color: var(--danger); }
.payment-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.voucher-option {
  display: flex;
  gap: 12px;
  width: 100%;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  cursor: pointer;
}
.voucher-option:hover { border-color: #BFC6A8; background: var(--primary-soft); }
.voucher-option span { display: grid; gap: 2px; }
.voucher-option small { color: var(--text-muted); }
.voucher-option em { color: var(--primary); font-style: normal; font-weight: 800; }
.redeem-choice {
  width: 100%;
  min-height: 92px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  color: var(--text-main);
  padding: 14px;
  text-align: left;
}
.redeem-choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.redeem-choice span,
.redeem-choice small,
.redeem-choice strong { display: block; }
.redeem-choice small { color: var(--text-muted); margin-top: 3px; }
.redeem-choice em { flex: 0 0 auto; color: var(--primary-hover); font-style: normal; font-weight: 800; }
.redeem-option-card.is-disabled { opacity: .45; }
.redeem-option-card.is-disabled .redeem-choice { pointer-events: none; }
.booking-treatment-list { display: grid; gap: 10px; max-height: 360px; overflow: auto; }
.booking-treatment-option {
  display: grid;
  grid-template-columns: auto 1fr 72px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 12px;
}
.booking-treatment-option span { display: grid; gap: 2px; min-width: 0; }
.booking-treatment-option small { color: var(--text-muted); }
.treatment-card {
  display: flex;
  flex-direction: column;
}
.treatment-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}
.treatment-card-details div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 10px;
}
.treatment-card-details span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.treatment-card-details strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.therapist-card {
  display: flex;
  flex-direction: column;
}
.therapist-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.therapist-card-details div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 10px;
  min-width: 0;
}
.therapist-card-details span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.therapist-card-details strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.therapist-serving-detail {
  display: grid;
  gap: 2px;
  max-width: 420px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
}
.voucher-card {
  display: flex;
  flex-direction: column;
}
.voucher-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}
.voucher-card-details div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 10px;
  min-width: 0;
}
.voucher-card-details span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.voucher-card-details strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.room-management-card {
  display: flex;
  flex-direction: column;
}
.room-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}
.room-card-details div {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 10px;
  min-width: 0;
}
.room-card-details span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.room-card-details strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.booking-actions {
  align-items: center;
  justify-content: center;
}
.booking-icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.booking-action-button {
  min-height: 34px;
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.report-toolbar { padding: 16px; }
.report-filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(160px, .7fr) minmax(240px, 1.25fr) minmax(160px, .75fr) auto;
  gap: 12px;
  align-items: end;
}
.report-filter-compact {
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(240px, 1fr) auto;
}
.filter-field { min-width: 0; }
.filter-actions { display: flex; gap: 8px; justify-content: flex-end; }
.filter-actions .btn { white-space: nowrap; }
.report-summary { padding: 0; overflow: hidden; }
.report-summary-main {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
}
.report-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.report-summary h2 {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 850;
  margin: 0;
}
.report-summary p {
  color: var(--text-muted);
  margin: 6px 0 0;
}
.report-summary-pill {
  align-self: center;
  min-width: 190px;
  border: 1px solid #BFC6A8;
  background: var(--primary-soft);
  color: var(--primary-hover);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 2px;
}
.report-summary-pill i { font-size: 20px; }
.report-summary-pill span { font-size: 13px; font-weight: 700; }
.report-summary-pill strong { font-size: 18px; }
.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.report-metric {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
}
.report-metric:last-child { border-right: 0; }
.report-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.report-metric strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
}
.revenue-chart {
  min-height: 320px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(62px, 1fr);
  gap: 12px;
  align-items: end;
  overflow-x: auto;
  padding: 8px 2px 4px;
}
.revenue-bar-wrap {
  min-width: 62px;
  height: 290px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  align-items: end;
}
.revenue-bar-value {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.revenue-bar-track {
  height: 220px;
  border-radius: 8px;
  background: var(--surface-muted);
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--border);
}
.revenue-bar {
  width: 100%;
  min-height: 8px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 8px 8px 0 0;
}
.revenue-bar-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.room-card { position: relative; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-height: 170px; }
.room-card-compact { min-height: 92px; padding: 14px; }
.room-card-compact h3 { font-size: 15px; }
.room-card-compact .room-meta { font-size: 12px; }
.dashboard-room-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.dashboard-room-card-head .status-badge {
  align-self: flex-start;
  flex: 0 0 auto;
}
.dashboard-scroll-card {
  max-height: 650px;
  display: flex;
  flex-direction: column;
}
.dashboard-scroll-card > .card-head {
  flex: 0 0 auto;
}
.dashboard-scroll-card > .row,
.dashboard-scroll-card > .table-responsive {
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}
.dashboard-room-occupants {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.dashboard-room-occupant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.room-card.available { border-left: 4px solid var(--success); }
.room-card.occupied { border-left: 4px solid var(--warning); }
.room-card.inactive { border-left: 4px solid var(--danger); opacity: .78; }
.room-meta { color: var(--text-muted); font-size: 13px; }

.chart-placeholder {
  min-height: 260px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border: 1px dashed #BFB098;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 22px;
}
.chart-bar { flex: 1; border-radius: 8px 8px 0 0; background: #BFC6A8; min-height: 36px; }
.chart-bar:nth-child(2n) { background: var(--accent); }
.chart-bar:nth-child(3n) { background: var(--primary); }

.dashboard-booking-list {
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-right: 4px;
}
.dashboard-booking-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFCF5;
  padding: 12px;
}
.dashboard-booking-time {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 54px;
  border-right: 1px solid var(--border);
}
.dashboard-booking-time strong {
  font-size: 20px;
  line-height: 1;
}
.dashboard-booking-time span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.dashboard-booking-main,
.dashboard-booking-detail {
  min-width: 0;
}
.dashboard-booking-actions {
  grid-column: 2 / -1;
}
.dashboard-booking-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state { text-align: center; padding: 38px 16px; color: var(--text-muted); }
.empty-state i { display: block; font-size: 34px; color: #9D927F; margin-bottom: 10px; }
.empty-state p { margin: 4px 0 0; }
.app-alert { border-radius: 8px; border: 0; }
.alert-success { background: var(--primary-soft); color: #596242; }
.alert-danger { background: #F6E7E1; color: #7E3028; }
.alert-warning { background: var(--accent-soft); color: #7D5A30; }
.dropdown-menu {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.dropdown-item { color: var(--text-main); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-muted); color: var(--text-main); }

@media (max-width: 1199.98px) {
  .pos-grid { grid-template-columns: 1fr; }
  .pos-main-grid { grid-template-columns: 1fr; }
  .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { justify-content: flex-start; }
  .report-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-metric:nth-child(3n) { border-right: 0; }
  .dashboard-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .app-shell { display: block; }
  .app-sidebar {
    position: fixed;
    width: min(86vw, 312px);
    max-width: 312px;
    z-index: 1055;
    box-shadow: 20px 0 45px rgba(26, 26, 26, .16);
  }
  .app-sidebar.offcanvas-lg {
    background: var(--surface);
    border-right: 1px solid var(--border);
  }
  .offcanvas-backdrop { z-index: 1050; }
  .app-main { margin-left: 0; }
  .app-content { padding: 18px; }
  .app-topbar { z-index: 1035; }
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .page-title { font-size: 24px; }
  .card-actions,
  .page-header .card-actions,
  .page-header > .d-flex {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-actions .btn,
  .page-header .btn { width: 100%; }
  .profile-layout { grid-template-columns: 1fr; }
  .invoice-total-grid { grid-template-columns: 1fr; }
  .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-booking-list { grid-template-columns: 1fr; }
  .dashboard-booking-item { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); }
  .app-card,
  .card { border-radius: 8px; }
  .table-responsive { border-radius: 8px; }
}

@media (max-width: 575.98px) {
  .dashboard-booking-item { grid-template-columns: 72px minmax(0, 1fr); }
  .dashboard-booking-detail,
  .dashboard-booking-actions { grid-column: 2; }
}

@media (max-width: 575.98px) {
  .app-topbar { padding: 0 12px; height: 64px; gap: 10px; }
  .topbar-title { min-width: 0; }
  .topbar-title .fw-semibold {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }
  .topbar-actions { gap: 6px; }
  .profile-btn { padding: 0 8px; }
  .icon-btn { width: 38px; min-height: 38px; }
  .app-content { padding: 14px; }
  .page-breadcrumb { margin-bottom: 12px; overflow-x: auto; white-space: nowrap; }
  .page-title { font-size: 22px; }
  .page-subtitle { font-size: 14px; }
  .card-actions,
  .page-header .card-actions,
  .page-header > .d-flex,
  .filter-actions { grid-template-columns: 1fr; }
  .stat-card { min-height: auto; }
  .stat-value { font-size: 24px; }
  .dashboard-stat-grid { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
  .report-filter-grid { grid-template-columns: 1fr; }
  .filter-actions { display: grid; }
  .report-summary-main { display: grid; }
  .report-summary h2 { font-size: 26px; }
  .report-metrics-grid { grid-template-columns: 1fr; }
  .report-metric { border-right: 0; border-bottom: 1px solid var(--border); }
  .report-metric:last-child { border-bottom: 0; }
}
