:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --line: #ded7cd;
  --text: #26231f;
  --muted: #716b62;
  --brand: #0f766e;
  --brand-dark: #0a5751;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(39, 35, 31, 0.12);
  --room-width: 170px;
  --day-width: 36px;
  --row-height: 84px;
  font-family: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.64)),
    url("../assets/gallery-9.jpg") center / cover no-repeat;
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 26px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 18px;
}

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

.menu-wrap {
  position: relative;
}

.action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.action-menu button,
.action-menu a {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.action-menu button:hover,
.action-menu a:hover {
  background: #f4eee6;
}

.layout {
  padding: 16px 20px 26px;
}

.button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.button {
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-dark);
}

.button--ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.button--ghost:hover {
  background: #f4eee6;
}

.button--danger {
  background: var(--danger);
}

.button--danger:hover {
  background: #8f1c14;
}

.today-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.today-panel__title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 16px;
}

.today-panel__title strong {
  color: var(--text);
  font-size: 19px;
}

.today-panel__list {
  display: grid;
  gap: 6px;
}

.today-row {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 170px minmax(160px, 1fr) minmax(220px, 1.2fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 7px;
  background: #fbfaf7;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.today-row:hover {
  border-color: var(--brand);
  background: #f5fbf9;
}

.today-row--new {
  border-left-color: #2563eb;
}

.today-row--prepaid {
  border-left-color: #a34713;
}

.today-row--paid,
.today-row--confirmed,
.today-row--staying {
  border-left-color: var(--brand);
}

.today-row__label {
  font-weight: 800;
}

.today-row span,
.today-row small {
  color: var(--muted);
}

.today-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-panel__empty {
  padding: 8px 10px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 190px) minmax(180px, 240px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

input,
select {
  min-height: 34px;
  padding: 0 9px;
}

textarea {
  padding: 10px;
  resize: vertical;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary div {
  min-height: 58px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary span {
  display: block;
  font-size: 22px;
  font-weight: 800;
}

.summary small {
  color: var(--muted);
}

.unassigned {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.unassigned .section-title {
  margin-bottom: 10px;
}

.unassigned .section-title h2 {
  font-size: 14px;
}

.unassigned-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.unassigned-card {
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5fbfa;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

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

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

.board-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.board {
  position: relative;
  min-width: max-content;
}

.board-grid {
  display: grid;
  grid-template-columns: var(--room-width) repeat(var(--days), var(--day-width));
}

.corner,
.month-cell,
.day-cell,
.room-cell,
.slot-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.corner,
.room-cell {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #fff;
}

.corner {
  top: 0;
  z-index: 12;
  min-height: 32px;
  padding: 8px;
  font-size: 14px;
  font-weight: 800;
}

.month-cell,
.day-cell {
  position: sticky;
  z-index: 6;
  background: #fff;
  text-align: center;
}

.month-cell {
  top: 0;
  min-height: 32px;
  padding: 8px 3px;
  font-size: 14px;
  font-weight: 800;
}

.day-cell {
  top: 33px;
  min-height: 42px;
  padding: 5px 1px;
  color: var(--muted);
  font-size: 11px;
}

.day-cell strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.day-cell.is-weekend,
.slot-cell.is-weekend {
  background: #fbf7f0;
}

.day-cell.is-today,
.slot-cell.is-today {
  background: #e7f6f4;
}

.room-cell {
  height: var(--row-height);
  padding: 7px 9px;
  display: grid;
  align-content: center;
}

.room-cell strong {
  font-size: 14px;
}

.room-cell small {
  color: var(--muted);
  line-height: 1.25;
}

.slot-cell {
  position: relative;
  height: var(--row-height);
  background: #fff;
  padding: 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1;
}

.slot-cell:hover {
  background: #eef9f7;
}

.slot-cell.is-hotel-closed {
  background: #ece7dd;
  color: #8b8173;
  cursor: not-allowed;
}

.slot-cell.is-hotel-closed .slot-half {
  background: repeating-linear-gradient(
    -45deg,
    rgba(113, 107, 98, 0.12),
    rgba(113, 107, 98, 0.12) 5px,
    rgba(255, 255, 255, 0.16) 5px,
    rgba(255, 255, 255, 0.16) 10px
  );
}

.slot-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
}

.slot-half--am {
  left: 0;
  border-right: 1px dashed rgba(38, 35, 31, 0.18);
}

.slot-half--pm {
  right: 0;
}

.slot-price {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  width: 100%;
  padding: 0 1px 3px;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  text-overflow: ellipsis;
  pointer-events: none;
}

.slot-cell.has-period-price .slot-price {
  color: var(--brand);
  font-weight: 800;
}

.slot-half.is-booked-new {
  background: #b8d2ff;
}

.slot-half.is-booked-confirmed {
  background: #a7e2cc;
}

.slot-half.is-booked-prepaid {
  background: #ffc58f;
}

.slot-half.is-booked-paid {
  background: #a7e6ad;
}

.slot-half.is-booked-staying {
  background: #c7b0ff;
}

.slot-half.is-booked-out {
  background: #c2cad7;
}

.slot-half.is-booked-blocked {
  background: #b2bac9;
}

.slot-half.is-drop-preview {
  outline: 2px solid rgba(15, 118, 110, 0.72);
  outline-offset: -3px;
  background: rgba(15, 118, 110, 0.24);
}

.slot-half.is-drop-preview-invalid {
  outline: 2px solid rgba(180, 35, 24, 0.78);
  outline-offset: -3px;
  background: rgba(180, 35, 24, 0.24);
}

.booking-pill {
  position: absolute;
  z-index: 4;
  min-height: 42px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
}

.resize-handle--start {
  left: 0;
}

.resize-handle--end {
  right: 0;
}

.booking-pill.is-dragging {
  opacity: 0.74;
  z-index: 30;
  pointer-events: none;
}

.booking-pill.is-invalid-drop {
  background: var(--danger);
}

.booking-pill strong {
  display: block;
  font-size: 11px;
  line-height: 1.15;
}

.booking-pill span {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  opacity: 0.92;
}

.booking-pill .booking-pill__meta,
.booking-pill .booking-pill__total {
  font-size: 10px;
}

.booking-pill .booking-pill__total {
  font-weight: 800;
  opacity: 1;
}

.split-button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
}

.booking-pill:hover .split-button {
  opacity: 1;
}

.booking-pill.is-split-segment::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 3px;
  height: 2px;
  background: rgba(255, 255, 255, 0.72);
}

.split-connector {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.split-connector line {
  stroke-width: 2;
  stroke-dasharray: 4 4;
  opacity: 0.82;
}

.status-new,
.booking-new {
  background: #2563eb;
}

.status-confirmed,
.booking-confirmed {
  background: #0f766e;
}

.status-prepaid,
.booking-prepaid {
  background: #9a3412;
}

.status-paid,
.booking-paid {
  background: #15803d;
}

.status-staying,
.booking-staying {
  background: #7c3aed;
}

.status-out,
.booking-out {
  background: #64748b;
}

.status-cancelled,
.booking-cancelled {
  background: #9ca3af;
}

.status-blocked,
.booking-blocked {
  background: #111827;
}

.legend {
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

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

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.dialog {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  box-shadow: var(--shadow);
}

.dialog--wide {
  width: min(1120px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog form {
  padding: 22px;
}

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

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f1ede6;
  color: var(--text);
}

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

.full {
  margin-top: 12px;
}

.booking-total {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #e7f6f4;
  color: var(--brand-dark);
  font-weight: 800;
}

.payment-box,
.transfer-box,
.split-box,
.history-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.section-title {
  margin-bottom: 12px;
}

.section-title h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.transfer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 170px;
  overflow: auto;
}

.history-item {
  padding: 9px 10px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}

.history-item strong {
  display: block;
  margin-bottom: 3px;
}

.history-item small {
  color: var(--muted);
}

.form-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.dialog__actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  margin-top: 18px;
}

.dialog__actions--prices {
  grid-template-columns: 1fr auto;
}

.prices-table {
  display: grid;
  gap: 8px;
}

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

.price-menu {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.price-menu button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.price-menu button:hover,
.price-menu button.is-active {
  background: #fff;
  color: var(--brand);
  font-weight: 800;
}

.price-sections {
  min-width: 0;
}

.hotel-settings {
  display: grid;
  gap: 16px;
}

.hotel-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.hotel-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-line input {
  width: auto;
}

.hotel-settings-row {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) minmax(120px, 0.7fr) auto auto;
}

.price-row {
  display: grid;
  grid-template-columns: 84px minmax(210px, 1fr) 150px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.price-row strong {
  font-size: 15px;
}

.price-row small {
  color: var(--muted);
}

.price-row label {
  color: var(--muted);
}

.room-price {
  display: block;
  margin-top: 3px;
  color: var(--brand);
  font-weight: 800;
}

.room-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f1ede6;
}

.booking-room-preview {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.booking-room-preview img {
  width: 112px;
  height: 78px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.period-prices {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.price-section .period-prices {
  margin-top: 18px;
}

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

.period-prices h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.period-prices p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.period-price-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(130px, 160px));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5fbfa;
}

.extra-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.period-price-form__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

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

.period-price-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px 140px auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 150px 120px auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-row span {
  color: var(--muted);
}

.booking-extras {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.extras-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.fee-choice {
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.fee-choice input {
  width: auto;
}

.fee-choice strong,
.fee-choice small {
  display: block;
}

.fee-choice small {
  color: var(--muted);
}

.period-price-row strong {
  font-size: 14px;
}

.period-price-row small {
  color: var(--muted);
}

.period-price-row .mini-button {
  min-height: 34px;
  padding: 0 10px;
}

.system-badge,
.settings-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.backup-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
}

.backup-tools__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.backup-status {
  min-height: 20px;
  color: var(--brand);
  font-weight: 800;
}

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

.backup-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.backup-row div {
  display: grid;
  gap: 3px;
}

.backup-row span {
  color: var(--muted);
  font-weight: 800;
}

.checkbox-line {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: auto;
}

.empty-periods {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.rooms-manager {
  display: grid;
  gap: 12px;
}

.room-tools {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 12px;
  margin-bottom: 14px;
}

.room-tools__panel--wide {
  grid-column: 1 / -1;
}

.room-tools__panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.room-tools__panel h3 {
  margin: 0 0 10px;
}

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

.room-manager-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.room-manager-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.room-manager-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.room-manager-card strong {
  color: var(--brand);
}

.room-card-actions {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.room-photo-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.room-photo {
  position: relative;
  overflow: hidden;
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin: 0;
  cursor: grab;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.room-photo.is-main {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0, 128, 117, 0.16);
}

.room-photo.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.room-photo.is-drop-target {
  border-color: #2b6de8;
  box-shadow: 0 0 0 3px rgba(43, 109, 232, 0.18);
}

.room-photo img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.room-photo-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(0, 128, 117, 0.94);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.room-photo-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  z-index: 2;
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  pointer-events: none;
}

.room-photo-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(180, 35, 24, 0.92);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}

.room-photo-actions button[data-main-photo-room] {
  background: rgba(0, 128, 117, 0.94);
}

.photo-uploader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px dashed var(--brand);
  border-radius: 8px;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.photo-uploader--wide {
  min-height: 48px;
}

.photo-uploader input {
  display: none;
}

.photo-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.photo-save-status {
  min-height: 18px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.booking-log-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

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

.booking-log-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.booking-log-summary strong {
  display: block;
  font-size: 20px;
}

.booking-log-summary small {
  color: var(--muted);
}

.booking-log-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.booking-log-rooms__title {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.booking-log-room {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.booking-log-room:hover {
  border-color: var(--accent);
}

.booking-log-room span,
.booking-log-room small {
  color: var(--muted);
}

.booking-log-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.booking-log-item {
  display: grid;
  grid-template-columns: 132px minmax(170px, 1fr) 120px minmax(260px, 1.4fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.booking-log-item small {
  color: var(--muted);
}

.booking-log-badge {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f6f4;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .layout {
    padding: 16px;
  }

  .toolbar,
  .summary,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .today-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  h1 {
    font-size: 23px;
  }

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

  .price-row {
    grid-template-columns: 1fr;
  }

  .transfer-actions {
    flex-direction: column;
  }

  .period-prices__header,
  .period-price-form__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .period-price-form,
  .period-price-row,
  .price-settings,
  .extra-form,
  .settings-row,
  .hotel-rules-grid,
  .room-tools,
  .room-form-grid,
  .room-manager-card,
  .booking-log-filters,
  .booking-log-rooms,
  .booking-log-summary,
  .booking-log-item {
    grid-template-columns: 1fr;
  }
}
