:root {
  --brand-primary: #55195c;
  --brand-primary-dark: #3f1246;
  --brand-accent: #c7e51f;
  --ink: #1e1b24;
  --muted: #756b79;
  --line: #ece6ee;
  --surface: #ffffff;
  --soft: #faf7fb;
  --good: #2f8c5f;
  --warn: #b97300;
  --bad: #b33d42;
  --shadow: 0 10px 30px rgba(51, 31, 57, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8f7f9;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-dark));
  color: white;
}

.brand {
  display: block;
  padding: 8px;
  margin-bottom: 22px;
  background: white;
  border-radius: 8px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: 8px;
}

.nav-link.active,
.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.13);
}

.icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--brand-accent);
  font-weight: 800;
}

main {
  min-width: 0;
  max-width: 1480px;
  width: 100%;
  padding: 32px 36px 48px;
}

.topbar,
.section-heading,
.panel-title,
.terms-row,
.settlement-row,
.settlement-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  line-height: 1.12;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.28rem;
}

h3 {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p,
.muted {
  margin-bottom: 0;
  color: var(--muted);
}

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

.primary-action,
.secondary-action,
.ghost-button,
.icon-button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-action {
  padding: 0 16px;
  color: var(--brand-primary-dark);
  background: var(--brand-accent);
  font-weight: 800;
}

.secondary-action,
.ghost-button {
  padding: 0 16px;
  color: var(--brand-primary);
  background: #eee6f0;
  font-weight: 700;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
}

.icon-button {
  width: 42px;
  color: var(--brand-primary);
  background: white;
  border: 1px solid var(--line);
  font-weight: 900;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

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

.metric {
  padding: 16px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--brand-primary);
  font-size: 1.45rem;
}

.panel {
  padding: 20px;
}

.operations-layout,
.dashboard-focus-grid,
.booking-layout,
.finance-grid,
.admin-grid,
.masters-layout,
.rate-master-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  gap: 20px;
}

.dashboard-focus-grid {
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  margin-bottom: 20px;
}

.rate-master-layout {
  grid-template-columns: minmax(0, 1fr);
}

.rate-master-panel {
  max-width: 1180px;
}

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

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.settings-form-grid .wide-field,
.settings-wide-panel {
  grid-column: 1 / -1;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.day-card {
  width: 100%;
  min-height: 96px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.day-card.has-booking {
  background: #fff8eb;
  border-color: #f0d49b;
}

.day-card.available {
  background: #f0fbf5;
  border-color: #b9e7cb;
}

.day-card.partial {
  background: #fff8eb;
  border-color: #f0d49b;
}

.day-card.booked {
  background: #fff0f2;
  border-color: #f0b9c0;
}

.day-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.day-card strong,
.day-card span {
  display: block;
}

.slot {
  margin-top: 9px;
  padding: 6px 8px;
  color: var(--brand-primary);
  background: white;
  border-left: 3px solid var(--brand-accent);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.queue-list,
.asset-list,
.line-editor,
.price-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.dashboard-finance,
.dashboard-bookings {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.today-board {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.today-booking-card,
.dashboard-empty-focus {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  color: var(--ink);
  background: #fffdf2;
  border: 1px solid #edd88f;
  border-left: 5px solid var(--brand-accent);
  border-radius: 8px;
  text-align: left;
}

.today-booking-card {
  cursor: pointer;
}

.today-booking-card span {
  color: var(--brand-primary);
  font-weight: 900;
}

.today-booking-card strong,
.dashboard-empty-focus strong {
  font-size: 1.1rem;
}

.today-booking-card small,
.dashboard-empty-focus span {
  color: var(--muted);
  font-weight: 800;
}

.today-booking-card em,
.selected-reservation-card em {
  justify-self: start;
  padding: 4px 8px;
  color: #1f7d4c;
  background: #dff4e8;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
}

.dashboard-empty-focus {
  background: #fbfafc;
  border-color: var(--line);
  border-left-color: var(--brand-primary);
}

.dashboard-calendar-panel {
  margin-bottom: 20px;
}

.dashboard-lower {
  margin-top: 20px;
}

.queue-item,
.asset-item,
.invoice-line,
.price-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.queue-item {
  border-left: 4px solid var(--line);
}

.queue-item.warning {
  border-left-color: #d8890b;
  background: #fff8eb;
}

.queue-item.danger {
  border-left-color: #b3313d;
  background: #fff0f2;
}

.queue-item.info {
  border-left-color: var(--brand-primary);
}

.queue-item.money {
  border-left-color: #26845a;
  background: #f0fbf5;
}

.rate-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.rate-list {
  max-height: 370px;
  overflow: auto;
}

.rate-item {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.rate-item:hover {
  background: #fffdf1;
  border-color: #efd98c;
}

.rate-item span {
  display: grid;
  gap: 3px;
}

.rate-item small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.count-badge,
.status-badge,
.date-pill {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--brand-primary);
  background: #eff8b8;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-form {
  display: grid;
  gap: 16px;
}

.public-calendar {
  margin-bottom: 18px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-controls select {
  min-height: 34px;
  min-width: 150px;
  padding: 6px 9px;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot.available {
  background: #2f8c5f;
}

.legend-dot.partial {
  background: #d99b24;
}

.legend-dot.booked {
  background: #b33d42;
}

.legend-dot.unavailable {
  background: #a69cab;
}

.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.weekday {
  padding: 0 6px 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.month-day {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 104px;
  padding: 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.month-day.empty {
  visibility: hidden;
}

.month-day strong {
  font-size: 1rem;
}

.month-day span {
  font-size: 0.8rem;
  font-weight: 900;
}

.month-day small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.month-day .slot-line {
  display: block;
  line-height: 1.25;
}

.month-day.available {
  background: #f2fbf6;
  border-color: #bfe6cf;
}

.month-day.available span {
  color: var(--good);
}

.month-day.partial {
  background: #fff8eb;
  border-color: #f0d49b;
}

.month-day.partial span {
  color: var(--warn);
}

.month-day.booked {
  background: #fff1f2;
  border-color: #efc2c5;
  cursor: not-allowed;
}

.month-day.booked span {
  color: var(--bad);
}

.month-day.unavailable {
  color: #7c7380;
  background: #f1eff2;
  cursor: not-allowed;
}

.month-day.selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(85, 25, 92, 0.12);
}

.form-intro {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.form-intro h3 {
  margin-bottom: 4px;
  color: var(--brand-primary);
  font-size: 1.12rem;
}

.form-intro p {
  margin-bottom: 0;
  color: var(--muted);
}

.sub-panel {
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sub-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.sub-panel summary::-webkit-details-marker {
  display: none;
}

.sub-panel summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  color: #3d3540;
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #918294;
  background: #f2eef4;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(85, 25, 92, 0.12);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
}

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

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
  margin-top: 0;
}

.upload-card {
  min-height: 132px;
  padding: 14px;
  background: white;
  border: 2px dashed #cdbdd1;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-card:hover,
.upload-card:focus-within {
  background: #fffdf4;
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.upload-card input {
  min-height: auto;
  padding: 0;
  border: 0;
  font-size: 0.78rem;
}

.upload-card em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 10px;
  color: var(--brand-primary);
  background: #f1e9f3;
  border-radius: 999px;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.upload-card strong,
.upload-card span {
  display: block;
}

.upload-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.customer-cancel-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-cancel-box > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.cancel-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.facility-card {
  min-height: 70px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.facility-card input {
  width: auto;
  min-height: auto;
  margin-right: 7px;
}

.facility-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.wide-label {
  width: 100%;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: 18px;
}

.link-button {
  padding: 0;
  color: var(--brand-primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  text-decoration: underline;
}

.estimate {
  position: sticky;
  top: 24px;
  align-self: start;
}

.estimate-lines {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.estimate-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.estimate-total,
.payment-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.estimate-total strong {
  color: var(--brand-primary);
  font-size: 1.35rem;
}

.payment-box {
  margin-bottom: 12px;
  padding: 12px;
  background: #f4f8d6;
  border: 0;
  border-radius: 8px;
}

.estimate-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  color: #6a4c00;
  background: #fff8df;
  border: 1px solid #efd98c;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.workflow-checks,
.policy-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.check-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  background: white;
  border: 2px solid #cdbdd1;
  border-radius: 999px;
}

.check-dot.done {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

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

.reservation-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.admin-calendar-panel {
  margin-bottom: 20px;
}

.admin-month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.admin-month-day {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 78px;
  padding: 9px;
  color: var(--ink);
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.admin-month-day.empty {
  visibility: hidden;
}

.admin-month-day.has-booking {
  background: #fff8eb;
  border-color: #f0d49b;
}

.admin-month-day.available {
  background: #f2fbf6;
  border-color: #bfe6cf;
}

.admin-month-day.partial {
  background: #fff8eb;
  border-color: #f0d49b;
}

.admin-month-day.booked {
  background: #fff1f2;
  border-color: #efc2c5;
}

.admin-month-day.unavailable {
  color: #7c7380;
  background: #f1eff2;
}

.admin-month-day.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(85, 25, 92, 0.11);
}

.admin-month-day span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-month-day.available span {
  color: var(--good);
}

.admin-month-day.partial span {
  color: var(--warn);
}

.admin-month-day.booked span {
  color: var(--bad);
}

.admin-month-day small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.selected-day-panel {
  margin-top: 14px;
  padding: 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selected-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selected-day-head h4 {
  margin: 0;
  color: var(--brand-primary);
  font-size: 1rem;
}

.selected-day-reservations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.selected-reservation-card,
.doc-view-button {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.selected-reservation-card small {
  color: var(--brand-primary);
  font-weight: 900;
}

.availability-rule-card {
  background: #fbfafc;
  border-style: dashed;
}

.availability-rule-card strong {
  color: var(--brand-primary);
}

.reservation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.summary-chip {
  display: grid;
  gap: 2px;
  min-height: 72px;
  padding: 12px;
  color: var(--ink);
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.summary-chip strong {
  color: var(--brand-primary);
  font-size: 1.45rem;
}

.summary-chip span {
  color: var(--muted);
  font-weight: 800;
}

.summary-chip.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(85, 25, 92, 0.1);
}

.reservation-detail {
  display: grid;
  gap: 12px;
  padding: 16px 18px 76px;
}

.reservation-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 1px solid #eaddea;
  border-top: 6px solid var(--brand-accent);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(28, 16, 31, 0.26);
  overflow: auto;
}

.reservation-dialog .dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(90deg, #fffdf1, #fbfafc 56%, #f4f8df);
  border-bottom: 1px solid #eaddea;
}

.cancellation-dialog {
  border-top-color: #b65a31;
}

.cancellation-dialog .dialog-head {
  background: linear-gradient(90deg, #fff6ef, #fbfafc 62%, #fffdf1);
}

.next-action-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: var(--brand-primary);
  background: #fffdf1;
  border: 1px solid #efd98c;
  border-radius: 8px;
}

.next-action-banner strong,
.next-action-banner span {
  display: block;
}

.next-action-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.reservation-dialog::backdrop {
  background: rgba(25, 15, 28, 0.45);
}

.compact-table-panel {
  margin-top: 16px;
  box-shadow: none;
}

.compact-table-panel table {
  min-width: 760px;
}

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

.detail-grid div,
.detail-money div {
  padding: 10px 11px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-grid span,
.detail-money span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.detail-grid strong,
.detail-money strong {
  display: block;
}

.reservation-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.uploaded-documents {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.uploaded-documents h4 {
  margin: 0;
  color: var(--brand-primary);
}

.document-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.workflow-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.workflow-timeline div {
  display: grid;
  gap: 6px;
  padding: 9px;
  color: var(--muted);
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workflow-timeline strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.workflow-timeline .done {
  color: var(--good);
  border-color: #bfe6cf;
  background: #f2fbf6;
}

.workflow-timeline .done strong {
  color: white;
  background: var(--good);
  border-color: var(--good);
}

.workflow-timeline .current {
  color: var(--warn);
  border-color: #f0d49b;
  background: #fff8eb;
}

.workflow-timeline .cancelled {
  color: var(--bad);
  border-color: #efc2c5;
  background: #fff1f2;
}

.reservation-checklist div {
  padding: 9px 10px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.detail-money,
.suggest-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

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

.admin-operation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.operation-box {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.operation-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.cancellation-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cancellation-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cancellation-item strong {
  overflow-wrap: anywhere;
}

.cancellation-item.active {
  border-color: #b65a31;
  box-shadow: 0 0 0 3px rgba(182, 90, 49, 0.1);
}

.cancellation-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.cancellation-actions .tag,
.cancellation-actions .mini-button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.refund-input {
  width: 110px;
  min-height: 32px;
  padding: 6px 9px;
}

.cancellation-item span,
.cancellation-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.money-mini {
  padding: 6px 8px;
  color: var(--brand-primary) !important;
  background: #fffdf1;
  border: 1px solid #efd98c;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.operation-box h4 {
  margin: 0;
  color: var(--brand-primary);
  font-size: 1rem;
}

.operation-fields {
  display: grid;
  gap: 10px;
}

.operation-box textarea {
  min-height: 58px;
}

.modal-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
}

.modal-section-title h4 {
  margin: 0;
  color: var(--brand-primary);
}

.modal-section-title span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.modal-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  margin: 0 -18px -76px;
  background: white;
  border-top: 1px solid var(--line);
}

.cancellation-banner {
  background: #fff6ef;
  border-color: #f0c3a8;
}

.cancellation-review-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.refund-decision-box {
  background: #fffdf1;
  border-color: #efd98c;
}

.cancellation-action-bar {
  background: linear-gradient(90deg, #fff6ef, white);
}

.modal-action-bar .primary-action,
.modal-action-bar .secondary-action,
.modal-action-bar .mini-button {
  min-height: 38px;
  padding: 0 14px;
}

.detail-actions {
  padding-top: 2px;
}

.selected-row {
  background: #fffdf1;
}

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

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: var(--brand-primary);
  background: #f1e9f3;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.confirmed {
  color: var(--good);
  background: #e6f4ec;
}

.tag.pending {
  color: var(--warn);
  background: #fff2d9;
}

.tag.awaiting-customer {
  color: var(--brand-primary);
  background: #f1e9f3;
}

.tag.request-rejected {
  color: var(--bad);
  background: #fae7e8;
}

.tag.cancel-request {
  color: var(--warn);
  background: #fff2d9;
}

.tag.cancelled {
  color: var(--bad);
  background: #fae7e8;
}

.tag.settled {
  color: var(--good);
  background: #e6f4ec;
}

.tag.invoice-open {
  color: var(--warn);
  background: #fff2d9;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--brand-primary);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

.mini-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-grid {
  margin-top: 18px;
}

.email-preview {
  margin-top: 16px;
  padding: 14px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.email-preview p {
  margin: 10px 0 12px;
  color: var(--muted);
}

.receipt-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.policy-list div {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.policy-list strong {
  color: var(--ink);
}

.settlement-row,
.settlement-due {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

.finance-summary-card {
  padding: 14px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finance-summary-card span,
.finance-profile span,
.expense-ledger-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.finance-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--brand-primary);
  font-size: 1.35rem;
}

.finance-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fffdf1;
  border: 1px solid #efd98c;
  border-radius: 8px;
}

.revenue-finance-grid {
  grid-template-columns: 1fr;
}

.finance-dialog {
  width: min(1040px, calc(100vw - 36px));
  border-top-color: var(--brand-primary);
}

.finance-dialog .dialog-head {
  grid-template-columns: 1fr auto auto;
}

.invoice-item-box {
  background: #fffdf1;
  border-color: #efd98c;
}

.invoice-item-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.45fr) auto;
  gap: 10px;
  align-items: end;
}

.voucher-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.editable-invoice-line {
  grid-template-columns: minmax(0, 1fr) 140px auto auto;
}

.editable-invoice-line input {
  min-height: 34px;
  padding: 6px 8px;
}

.modal-status {
  padding: 11px 12px;
  color: var(--brand-primary);
  background: #f4f8df;
  border: 1px solid #dbe8a0;
  border-radius: 8px;
  font-weight: 800;
}

.voucher-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.secondary-finance-grid {
  margin-top: 18px;
}

.expense-panel {
  background: #fffaf3;
  border-color: #efd7b0;
}

.expense-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #efd7b0;
}

.expense-panel-head h3 {
  margin: 0;
}

.expense-panel-head span {
  display: block;
  margin-top: 4px;
  color: #7a5a35;
  font-size: 0.84rem;
  font-weight: 800;
}

.expense-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.expense-summary-strip div {
  padding: 10px 12px;
  background: #fff3de;
  border: 1px solid #efd7b0;
  border-radius: 8px;
}

.expense-summary-strip span,
.expense-ledger-head span {
  display: block;
  color: #7a5a35;
  font-size: 0.78rem;
  font-weight: 900;
}

.expense-summary-strip strong {
  display: block;
  margin-top: 4px;
  color: #5f3c18;
  font-size: 1.12rem;
}

.expense-panel .expense-form {
  padding: 12px;
  background: white;
  border: 1px solid #efd7b0;
  border-radius: 8px;
}

.expense-ledger-head {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 118px 110px 110px 150px 78px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 0 12px;
}

.expense-ledger {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.expense-ledger-item {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 118px 110px 110px 150px 78px;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  background: white;
  border: 1px solid #efd7b0;
  border-radius: 8px;
}

.expense-amount-cell,
.expense-status-cell {
  text-align: right;
}

.expense-status-cell strong {
  color: #5f3c18;
}

.document-preview-dialog {
  width: min(860px, calc(100vw - 36px));
  border-top-color: var(--brand-accent);
}

.document-preview-body {
  padding: 18px 20px 82px;
}

.print-document {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.print-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--brand-primary);
}

.print-head strong,
.print-head span {
  display: block;
}

.print-head strong {
  color: var(--brand-primary);
  font-size: 1.25rem;
}

.print-document-title {
  color: var(--brand-primary);
  font-size: 1.55rem;
  font-weight: 900;
  text-align: right;
}

.print-head img {
  max-width: 170px;
  max-height: 62px;
  object-fit: contain;
}

.print-meta,
.print-party-grid,
.print-summary,
.print-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.print-meta div,
.print-party,
.print-summary div,
.print-note,
.print-signatures div {
  padding: 10px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.print-party p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.print-line-table {
  width: 100%;
  border-collapse: collapse;
}

.print-line-table th,
.print-line-table td {
  padding: 10px;
  border: 1px solid var(--line);
}

.print-line-table th {
  color: var(--brand-primary);
  background: #f7f3f8;
}

.print-line-table td:last-child,
.print-line-table th:last-child {
  text-align: right;
}

.print-summary {
  width: min(380px, 100%);
  margin-left: auto;
  grid-template-columns: 1fr;
}

.print-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.print-summary .grand-total {
  color: white;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.print-summary .grand-total span {
  color: white;
}

.print-note {
  color: var(--muted);
  line-height: 1.45;
}

.print-signatures div {
  min-height: 72px;
  display: grid;
  align-content: end;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.adjustment-grid,
.expense-form,
.pricing-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.adjustment-grid {
  grid-template-columns: 1fr;
}

.settlement-due {
  color: white;
  padding: 12px 14px;
  background: var(--brand-primary);
  border-radius: 8px;
}

.wide-button {
  width: 100%;
  margin-top: 12px;
}

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

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.report-actions .compact-select {
  min-width: 180px;
}

.report-table-panel {
  margin-bottom: 18px;
}

.report-table-panel table {
  min-width: 920px;
}

.requirement-panel {
  margin-top: 18px;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.coverage-item {
  min-height: 76px;
  padding: 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.coverage-item strong,
.coverage-item span {
  display: block;
}

.coverage-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.report-card {
  min-height: 198px;
}

.compact-report-card {
  min-height: 118px;
  padding: 18px;
  background: #fbfafc;
}

.compact-report-card h3 {
  margin-bottom: 10px;
  color: var(--brand-primary);
}

.compact-report-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.bar-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  background: #eee6f0;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: var(--brand-primary);
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  margin: 16px 0;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand-preview img {
  width: 148px;
  height: auto;
  background: white;
  border-radius: 6px;
}

.brand-preview span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
}

.role-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.role-list span {
  padding: 11px 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.role-user {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 4px 10px;
  width: 100%;
  padding: 11px 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.role-user span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  color: var(--brand-primary);
  background: #eff8b8;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.role-user strong,
.role-user small {
  min-width: 0;
}

.role-user small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.master-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.master-tab {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  color: var(--brand-primary);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.master-tab.active {
  color: white;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.master-tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 26px;
  color: var(--brand-primary);
  background: white;
  border-radius: 999px;
}

.master-tab.active strong {
  background: var(--brand-accent);
}

.master-category-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.master-category-summary div {
  padding: 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.master-category-summary strong,
.master-category-summary span {
  display: block;
}

.master-category-summary strong {
  color: var(--brand-primary);
  font-size: 1.25rem;
}

.master-category-summary span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.master-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  margin-top: 14px;
}

.master-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.master-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.master-item:hover {
  background: #fffdf1;
  border-color: #efd98c;
}

.master-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.master-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge.inactive {
  color: #755b00;
  background: #fff0c2;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: var(--muted);
  background: #fbfafc;
  border: 1px dashed #d9ccdd;
  border-radius: 8px;
}

.empty-state strong {
  color: var(--ink);
}

.master-modal .modal-shell {
  max-width: 760px;
}

.master-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 90px;
}

.master-form-grid .wide-field {
  grid-column: 1 / -1;
}

.day-selector {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day-option {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 54px;
  padding: 7px 4px;
  background: #fbfafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.day-option input {
  margin: 0;
}

.day-option span {
  color: var(--brand-primary);
  font-size: 0.76rem;
  font-weight: 900;
}

.rate-time-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.danger-action {
  min-height: 38px;
  padding: 0 14px;
  color: #a1222d;
  background: #fff0f1;
  border: 1px solid #f0bdc2;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.compact-select {
  max-width: 160px;
}

.toast {
  position: fixed;
  right: 24px;
  top: 24px;
  bottom: auto;
  transform: translateY(-140%);
  max-width: 360px;
  padding: 14px 16px;
  color: white;
  background: var(--brand-primary);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
  z-index: 10000;
}

.toast.show {
  transform: translateY(0);
}

.terms-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(28, 16, 31, 0.26);
}

.terms-dialog::backdrop {
  background: rgba(25, 15, 28, 0.45);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.terms-content {
  display: grid;
  gap: 12px;
  padding: 20px;
  color: var(--muted);
}

.terms-content p {
  margin-bottom: 0;
}

.terms-dialog .wide-button {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
}

@media (min-width: 1280px) {
  .booking-layout {
    grid-template-columns: minmax(0, 1.35fr) 380px;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 10px;
  }

  .nav-link span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .brand {
    padding: 6px;
  }

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

  .form-grid,
  .facility-grid,
  .document-grid,
  .coverage-grid,
  .settings-grid,
  .rate-master-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-layout,
  .booking-layout,
  .admin-grid,
  .masters-layout,
  .rate-master-layout,
  .reservation-workspace,
  .finance-grid,
  .dashboard-focus-grid {
    grid-template-columns: 1fr;
  }

  .estimate {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

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

  .brand {
    max-width: 240px;
    margin-bottom: 14px;
  }

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

  .nav-link {
    justify-content: center;
  }

  main {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .terms-row {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .public-calendar {
    overflow-x: auto;
  }

  .public-calendar .month-calendar {
    min-width: 760px;
  }

  .metric-grid,
  .form-grid,
  .detail-grid,
  .detail-money,
  .suggest-box,
  .workflow-timeline,
  .admin-operation-grid,
  .modal-lower-grid,
  .admin-week-calendar,
  .admin-month-calendar,
  .dashboard-focus-grid,
  .selected-day-reservations,
  .document-list,
  .facility-grid,
  .document-grid,
  .adjustment-grid,
  .expense-form,
  .expense-summary-strip,
  .expense-ledger-head,
  .pricing-controls,
  .rate-toolbar,
  .settings-grid,
  .settings-form-grid,
  .master-tabs,
  .master-category-summary,
  .master-toolbar,
  .master-form-grid,
  .day-selector,
  .report-grid,
  .coverage-grid,
  .settings-grid,
  .settings-form-grid,
  .rate-master-layout,
  .calendar-strip {
    grid-template-columns: 1fr;
  }

  .queue-item,
  .asset-item,
  .invoice-line,
  .price-item,
  .expense-ledger-item,
  .invoice-item-controls,
  .editable-invoice-line,
  .voucher-buttons,
  .reservation-summary,
  .cancel-fields,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .expense-ledger-head {
    display: none;
  }

  .expense-amount-cell,
  .expense-status-cell {
    text-align: left;
  }
}
