
:root {
  --mercons-blue: #0A4FA0;
  --mercons-blue-hover: #083f80;
  --mercons-blue-border: #083f80;
}

body { background: #f6f8fb; }
.navbar.mercons-navbar {
  background: var(--mercons-blue) !important;
}
.btn-primary {
  background-color: var(--mercons-blue) !important;
  border-color: var(--mercons-blue) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--mercons-blue-hover) !important;
  border-color: var(--mercons-blue-border) !important;
}
.btn-primary:focus,
.btn-primary:active {
  box-shadow: 0 0 0 0.25rem rgba(10, 79, 160, 0.25) !important;
}

.stat-card, .dashboard-summary-card { border: 0; box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.08); }
.stat-card .label, .dashboard-summary-card .label { color: #64748b; font-size: 0.9rem; margin-bottom: 0.2rem; }
.stat-card .value, .dashboard-summary-card .value { font-size: 1.8rem; font-weight: 700; }
.card { border: 0; box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.06); }
.table th { white-space: nowrap; }
.build-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.action-cell { min-width: 110px; }
.form-card .form-label { font-weight: 600; color: #475569; }
.form-card textarea { min-height: 110px; }
.status-inline-form { min-width: 720px; }
.modal .modal-header { border-bottom: 0; }
.modal .modal-footer { border-top: 0; }

.dashboard-summary-row .col-xl { flex: 1 0 0; }
.dashboard-house-toggle { background: var(--block-header-bg) !important; color: var(--block-header-text) !important; border-bottom: 1px solid var(--block-header-border) !important; }
.dashboard-house-badges { min-width: 440px; justify-content: flex-end; }
.dashboard-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}
.dashboard-pill-summary {
  min-width: 92px;
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
  background: transparent !important;
  border: 1px solid var(--pill-color);
  color: var(--pill-color);
}
.dashboard-pill-dynamic { background: transparent !important; }

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.9rem;
}
.room-tile-wrap {
  position: relative;
}
.room-tile {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 1rem;
  padding: 0.9rem 1rem 1.3rem;
  min-height: 132px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.room-tile:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12), 0 0.35rem 1rem rgba(15, 23, 42, 0.08);
}
.room-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.room-tile-name { font-size: 1rem; font-weight: 700; color: #111827; }
.room-tile-type, .room-tile-status, .room-tile-date { font-size: 0.86rem; margin-top: 0.25rem; color: #475569; }
.room-tile-type { opacity: 0.9; }
.room-tile-status { font-weight: 600; color: #1f2937; }
.room-tile-date { font-weight: 700; color: #0f172a; }
.room-equipment-alert { font-size: 0.95rem; line-height: 1; }
.room-equipment-alert-link { cursor: pointer; text-decoration: none; }
.room-equipment-alert-link:hover { transform: translateY(-1px); }
.dashboard-room-issue-btn {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  border: 0;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 0 0 1px rgba(146, 64, 14, 0.12);
  z-index: 3;
}
.dashboard-room-issue-btn:hover {
  background: rgba(245, 158, 11, 0.24);
}
.dashboard-room-issue-btn .count {
  font-weight: 700;
}
.room-tile.has-guest-issues { padding-bottom: 2.6rem; }
.room-tile-state-dot {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  width: 1.4rem;
  height: 1.4rem;
  min-width: 1.4rem;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.18);
}
.room-state-available,
.room-state-reserved,
.room-state-future_reservation,
.room-state-occupied,
.room-state-checkout,
.room-state-dirty,
.room-state-pending_cleaning,
.room-state-cleaning,
.room-state-maintenance,
.room-state-blocked,
.room-state-out_of_service { background: #ffffff; }

@media (max-width: 992px) {
  .navbar .d-flex { gap: 0.75rem !important; }
  .status-inline-form { min-width: 0; }
  .dashboard-house-badges { min-width: 0; justify-content: flex-start; }
}


.accordion-button {
  background: var(--block-header-bg) !important;
  color: var(--block-header-text) !important;
  border: 1px solid var(--block-header-border) !important;
  box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
  background: var(--block-header-bg) !important;
  color: var(--block-header-text) !important;
  box-shadow: none !important;
}
.accordion-button::after {
  filter: none;
}
.accordion-button .small, .accordion-button .text-muted {
  color: var(--block-header-text) !important;
  opacity: 0.8;
}
.accordion-item { border: 1px solid var(--block-header-border) !important; }

.gantt-panel { background: #fff; }
.gantt-wrapper { overflow-x: auto; }
.gantt-axis {
  display: grid;
  grid-template-columns: repeat(var(--gantt-days, 30), minmax(32px, 1fr));
  gap: 2px;
  min-width: var(--gantt-min-width, 1260px);
  margin-bottom: 0.5rem;
}
.gantt-axis-cell {
  text-align: center;
  font-size: 0.72rem;
  color: #64748b;
}
.gantt-axis-day { font-weight: 700; }
.gantt-axis-month { min-height: 1rem; }
.gantt-body {
  position: relative;
  min-width: var(--gantt-min-width, 1260px);
  min-height: calc(var(--gantt-tracks) * 34px + 20px);
  border-radius: 0.75rem;
  background-image: repeating-linear-gradient(
    to right,
    rgba(148,163,184,0.18) 0,
    rgba(148,163,184,0.18) calc(100% / var(--gantt-days, 30)),
    transparent calc(100% / var(--gantt-days, 30)),
    transparent calc(100% / var(--gantt-days, 30) + 2px)
  );
  background-color: #f8fafc;
}
.gantt-bar {
  position: absolute;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  max-width: 100%;
  padding: 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.08);
}
.gantt-bar span { overflow: hidden; text-overflow: ellipsis; }

.room-status-badge { border: 1px solid rgba(15,23,42,0.08); }
.room-table tbody td, .room-table tbody th { transition: background-color 0.15s ease; }

.room-table tbody tr:nth-child(even) > * { background: #f8fafc; }
.room-table tbody tr:nth-child(odd) > * { background: #ffffff; }
.room-table tbody tr:hover > * { background: #eef2f7; }
.room-code-cell { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.room-state-dot {
  width: 0.7rem;
  height: 0.7rem;
  min-width: 0.7rem;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.16);
}
.room-state-dot-available { background: var(--dash-color-available); }
.room-state-dot-reserved { background: var(--dash-color-reserved); }
.room-state-dot-future-reservation { background: var(--dash-color-future-reservation); }
.room-state-dot-occupied { background: var(--dash-color-occupied); }
.room-state-dot-checkout { background: var(--dash-color-checkout); }
.room-state-dot-dirty { background: var(--dash-color-dirty); }
.room-state-dot-pending-cleaning { background: var(--dash-color-pending-cleaning); }
.room-state-dot-cleaning { background: var(--dash-color-cleaning); }
.room-state-dot-maintenance { background: var(--dash-color-maintenance); }
.room-state-dot-blocked { background: var(--dash-color-blocked); }
.room-state-dot-out-of-service { background: var(--dash-color-out-of-service); }
.room-status-text { font-weight: 600; color: #1f2937; }
.room-status-badge { border: 1px solid rgba(15,23,42,0.08); }
.room-equipment-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  cursor: help;
}
.room-equipment-flag-link { cursor: pointer; color: inherit; text-decoration: none; }
.room-equipment-flag-link:hover { transform: translateY(-1px); }

.login-page-body {
  background: #f1f3f5;
}
.login-page-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.login-screen-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.login-card .card-body > .text-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card {
  border-radius: 0.5rem;
  box-shadow: 0 0.4rem 1.2rem rgba(15, 23, 42, 0.08) !important;
}
.login-logo {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}
.login-app-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
}
.login-title {
  font-size: 1.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #1f2937;
}
.login-input {
  min-height: 44px;
}
.login-submit {
  min-height: 42px;
  font-weight: 600;
  background: var(--mercons-blue) !important;
  border-color: var(--mercons-blue) !important;
}
.login-submit:hover,
.login-submit:focus,
.login-submit:active {
  background: var(--mercons-blue-hover) !important;
  border-color: var(--mercons-blue-border) !important;
}


.room-ops-modal-dialog {
  max-width: min(1340px, 96vw);
  margin: 0.35rem auto;
}
.room-ops-modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 0.7rem);
  overflow: hidden;
}
.room-ops-modal-header {
  padding-top: 0.8rem;
  padding-bottom: 0.55rem;
  align-items: flex-start;
  flex-shrink: 0;
  background: #ffffff;
}
.room-ops-header-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  min-width: 0;
}
.room-ops-header-title {
  margin-bottom: 0;
  line-height: 1.15;
}
.room-ops-header-meta {
  line-height: 1.2;
}
.room-ops-modal-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.room-ops-modal-footer {
  flex-shrink: 0;
  background: #ffffff;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.05);
}
.room-ops-top-row {
  align-items: flex-start;
}
.room-ops-panel {
  min-height: 0;
  padding: 0.9rem !important;
}
.room-ops-immediate-panel {
  align-self: flex-start;
}
.room-op-summary {
  margin-bottom: 0.8rem !important;
}
.room-ops-actions {
  margin-bottom: 0.65rem !important;
}
.room-checkin-form .form-label,
.room-planned-grid .form-label {
  margin-bottom: 0.35rem;
}
.room-checkin-form .form-text,
.room-planned-form .form-text {
  margin-top: 0.22rem;
  font-size: 0.78rem;
}
.room-planned-form fieldset {
  margin: 0;
}
.room-planned-form textarea {
  min-height: 72px;
}
.room-planned-submit {
  min-height: 72px;
}
.room-planned-form-footer .form-text {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-planned-grid .form-text {
  min-height: 1rem;
}
.room-planned-helper-spacer {
  visibility: hidden;
}
.room-gantt-panel,
.room-timeline-table-panel {
  padding: 0.85rem !important;
}
.room-timeline-table-scroll {
  max-height: 178px;
  overflow: auto;
}
.room-timeline-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.gantt-axis {
  margin-bottom: 0.35rem;
}
.gantt-axis-cell {
  font-size: 0.68rem;
}
.gantt-axis-month {
  min-height: 0.85rem;
}
.gantt-body {
  min-height: calc(var(--gantt-tracks) * 30px + 16px);
}
.gantt-bar {
  height: 22px;
  font-size: 0.74rem;
}
@media (max-width: 991.98px) {
  .room-ops-modal-dialog {
    max-width: 98vw;
    margin: 0.35rem auto;
  }
  .room-ops-modal-content {
    max-height: none;
  }
  .room-ops-header-line {
    align-items: flex-start;
  }
  .room-ops-header-meta {
    flex-basis: 100%;
  }
  .room-planned-form-footer .form-text {
    white-space: normal;
  }
  .room-timeline-table-scroll {
    max-height: none;
  }
}

.dashboard-view-tabs .nav-link {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  font-weight: 600;
}
.dashboard-view-tabs .nav-link.active {
  background: var(--mercons-blue);
  border-color: var(--mercons-blue);
  color: #ffffff;
}
.dashboard-house-title-only {
  font-size: 1.05rem;
}
.planning-board-shell {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.95rem;
}
.planning-legend {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.planning-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--legend-color);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--legend-color);
}
.planning-board-wrapper {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.planning-board {
  display: grid;
  grid-template-columns: 118px minmax(var(--gantt-min-width, 1260px), 1fr);
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  align-items: start;
  min-width: calc(118px + var(--gantt-min-width, 1260px) + 0.75rem);
}
.planning-axis-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #475569;
  padding: 0.3rem 0.5rem;
  border-radius: 0.7rem;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16);
}
.planning-gantt-axis {
  margin-bottom: 0;
}
.planning-gantt-axis .gantt-axis-cell {
  padding: 0.2rem 0;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.75);
}
.planning-room-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.8rem;
  text-decoration: none;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
}
.planning-room-label:hover {
  background: #eff6ff;
  color: #0f172a;
}
.planning-room-code {
  font-weight: 800;
  line-height: 1.1;
}
.planning-room-type {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.1;
}
.planning-room-track {
  min-height: calc(var(--gantt-tracks) * 26px + 12px);
  border-radius: 0.9rem;
  background-color: #eef2f7;
}
.planning-gantt-bar {
  height: 19px;
  font-size: 0.69rem;
  box-sizing: border-box;
  max-width: 100%;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.05);
}
@media (max-width: 991.98px) {
  .planning-board {
    grid-template-columns: 96px minmax(var(--gantt-min-width, 1080px), 1fr);
    min-width: calc(96px + var(--gantt-min-width, 1080px) + 0.75rem);
  }
  .dashboard-view-tabs {
    gap: 0.5rem;
  }
}


.admin-equipment-filters .form-control,
.admin-equipment-filters .form-select {
  min-width: 11rem;
}


.admin-house-modal-dialog {
  max-width: min(1480px, 97vw);
  height: calc(100vh - 0.75rem);
  max-height: calc(100vh - 0.75rem);
  margin: 0.375rem auto;
}

.admin-house-modal-content {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.admin-house-modal-content > form {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-house-modal-content .modal-header,
.admin-house-modal-content .modal-footer {
  flex: 0 0 auto;
}

.admin-house-modal-content .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 8rem);
  padding-top: 1rem;
  padding-bottom: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}



.guesthouse-default-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.6rem 1rem;
}

.guesthouse-default-equipment-grid .form-check {
  margin: 0;
}

.guesthouse-default-equipment-grid .form-check-label {
  word-break: break-word;
}

.house-equipment-quick-form {
  display: grid;
  grid-template-columns: minmax(12rem, 1.25fr) minmax(14rem, 1.6fr) minmax(10rem, 1fr) minmax(9rem, 0.9fr) minmax(14rem, 1.5fr) minmax(9rem, 0.85fr);
  gap: 0.75rem 0.9rem;
  align-items: end;
}

.house-equipment-quick-form .form-label {
  margin-bottom: 0.3rem;
}

.house-equipment-quick-form .house-eq-field {
  min-width: 0;
}

.house-equipment-quick-form .house-eq-notes input,
.house-equipment-quick-form .house-eq-name input,
.house-equipment-quick-form .house-eq-brand input,
.house-equipment-quick-form select {
  width: 100%;
}

@media (max-width: 1199.98px) {
  .house-equipment-quick-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .house-equipment-quick-form .house-eq-category {
    grid-column: span 1;
  }

  .house-equipment-quick-form .house-eq-name {
    grid-column: span 2;
  }

  .house-equipment-quick-form .house-eq-brand,
  .house-equipment-quick-form .house-eq-status {
    grid-column: span 1;
  }

  .house-equipment-quick-form .house-eq-notes {
    grid-column: span 3;
  }

  .house-equipment-quick-form .house-eq-submit {
    grid-column: span 1;
  }
}

@media (max-width: 767.98px) {
  .house-equipment-quick-form {
    grid-template-columns: 1fr;
  }

  .house-equipment-quick-form .house-eq-category,
  .house-equipment-quick-form .house-eq-name,
  .house-equipment-quick-form .house-eq-brand,
  .house-equipment-quick-form .house-eq-status,
  .house-equipment-quick-form .house-eq-notes,
  .house-equipment-quick-form .house-eq-submit {
    grid-column: auto;
  }
}

.equipment-house-badge {
  border: 1px solid rgba(13, 110, 253, 0.35);
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.08);
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .admin-house-modal-dialog {
    max-width: 99vw;
    margin: 0.35rem auto;
  }

  .admin-house-modal-content {
    height: auto;
    max-height: calc(100vh - 0.7rem);
  }

  .admin-house-modal-content .modal-body {
    max-height: calc(100vh - 7.5rem);
  }
}


.cash-book-table-wrap {
  overflow-x: auto;
}
.cash-book-table {
  min-width: 1480px;
}
.cash-book-table th,
.cash-book-table td {
  vertical-align: middle;
}
.cash-book-table .cash-book-nowrap {
  white-space: nowrap;
}
.cash-book-table .cash-book-money {
  white-space: nowrap;
  min-width: 7.75rem;
}
.cash-book-table .badge {
  max-width: 22rem;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cash-book-col-date { width: 7.5rem; }
.cash-book-col-description { width: 16rem; }
.cash-book-col-supplier { width: 14rem; }
.cash-book-col-doc { width: 8.5rem; }
.cash-book-col-plate { width: 8rem; }
.cash-book-col-cc { width: 6rem; }
.cash-book-col-money { width: 8.25rem; }
.cash-book-col-flag { width: 7rem; }
.cash-book-col-docs { width: 21rem; }
.cash-book-col-notes { width: 16rem; }
.cash-book-col-actions { width: 7rem; }
