.login-page {
  max-width: none;
  margin: 0;
}
.login-page .login-gate { min-height: 100vh; }
.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 400px at 10% 0%, #f7e7c6, transparent 50%),
    #f3eee4;
}
.login-gate[hidden] { display: none; }
.login-card {
  width: min(420px, 100%);
  background: #fffdf8;
  border: 1px solid #e6dfd2;
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 50px rgba(40,28,12,.12);
}
.login-card h1 { margin: 0; letter-spacing: -0.04em; }
.role-badge {
  background: #0f6e6b;
  color: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}
.admin-body {
  background: #f3eee4;
  max-width: 1400px;
  margin: 0 auto;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 22px 22px 8px;
}
.admin-top h1 { margin: 4px 0 0; font-size: 32px; letter-spacing: -0.04em; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 22px 16px;
  align-items: center;
}
.admin-stats .stat { min-width: 120px; }
.legend-inline { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-left: auto; }
.legend-inline i {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px;
}
.lg.free { background: #b8e3cf; }
.lg.booked { background: #c45c4a; }
.lg.inhouse { background: #b7791f; }
.lg.today { background: #1d4ed8; }

.admin-board {
  margin: 0 22px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.board-nav { display: flex; align-items: center; justify-content: center; gap: 12px; }
.board-nav h2 { margin: 0; min-width: 220px; text-align: center; }
.simple-scroll { overflow-x: auto; padding-bottom: 8px; }

.simple-head, .sg-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  min-width: 860px;
}
.simple-head { margin-bottom: 8px; }
.simple-head .sg-day, .simple-head {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.simple-head {
  display: grid;
  grid-template-columns: 150px repeat(31, minmax(22px, 1fr));
}
.sg-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  margin-bottom: 6px;
}
.sg-name {
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.sg-name i { width: 8px; height: 18px; border-radius: 99px; display: inline-block; }
.sg-cells, .simple-head {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(22px, 1fr);
  gap: 3px;
}
.simple-head { grid-template-columns: 150px 1fr; }
.simple-head {
  display: flex;
  gap: 3px;
  margin-left: 158px;
  margin-bottom: 8px;
}
.simple-head .sg-day {
  flex: 1 0 22px;
  text-align: center;
}
.simple-head .sg-day.is-today { color: #1d4ed8; }
.sg-cells { display: flex; gap: 3px; }
.sg-cell {
  flex: 1 0 22px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 9px;
  color: white;
}
.sg-cell.free { background: #ccefe0; }
.sg-cell.booked { background: #c45c4a; }
.sg-cell.checked-in { background: #b7791f; }
.sg-cell.past { opacity: .4; cursor: not-allowed; }
.sg-cell.selected { outline: 2px solid #0f6e6b; background: #0f6e6b; }
.sg-cell.in-range { background: #8fd0c2; }
.sg-cell.free:hover:not(.past) { background: #9eddbf; }

.admin-list-wrap { padding: 0 22px 40px; }
.admin-list-wrap .booking-list { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.invoice {
  background: white;
  color: #111;
  padding: 8px 6px 16px;
}
.inv-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #0f6e6b; padding-bottom: 12px; margin-bottom: 16px; }
.inv-head h2 { margin: 0 0 4px; }
.inv-head p, .inv-meta { margin: 0; color: #555; font-size: 13px; }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.inv-grid span { display: block; font-size: 11px; color: #777; text-transform: uppercase; letter-spacing: .06em; }
.inv-grid strong { display: block; font-size: 16px; margin: 4px 0; }
.inv-grid p { margin: 0; color: #444; font-size: 13px; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table th, .inv-table td { border-bottom: 1px solid #eadfce; padding: 8px 6px; text-align: left; vertical-align: top; }
.inv-table th { font-size: 11px; color: #666; }
.inv-total { display: flex; justify-content: flex-end; gap: 18px; align-items: baseline; margin-top: 14px; font-size: 18px; }
.inv-notes, .inv-foot { font-size: 12px; color: #555; }
.invoice-box { width: min(720px, 100%); }

@media print {
  body * { visibility: hidden !important; }
  #invoiceModal, #invoiceModal * { visibility: visible !important; }
  #invoiceModal {
    display: block !important;
    position: static !important;
    background: white !important;
    padding: 0 !important;
  }
  #invoiceModal .modal {
    box-shadow: none;
    width: 100%;
    padding: 0;
  }
  .no-print { display: none !important; }
}

@media (max-width: 720px) {
  .admin-top { flex-direction: column; align-items: stretch; }
  .simple-head { margin-left: 120px; }
  .sg-row { grid-template-columns: 120px 1fr; }
}

.settings-modal {
  width: min(560px, 100%);
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 12px;
}
.settings-form {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(92vh - 72px);
  padding-right: 6px;
  padding-bottom: 12px;
}
.set-title {
  margin: 16px 0 4px;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.operator-list { display: grid; gap: 8px; margin-top: 10px; }
.op-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.op-row span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  padding-top: 10px;
}

.custom-wrap { padding: 8px 22px 40px; display: grid; gap: 16px; }
.custom-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
.custom-card h2 { margin: 0 0 12px; font-size: 20px; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.photo-slot {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}
.photo-slot img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  background: #efe8db;
  margin: 8px 0;
}
.custom-save {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f3eee4;
  padding: 12px 0 20px;
}

.pay-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.pay-box div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.pay-box span { display: block; font-size: 11px; color: var(--muted); }
.inv-pay { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eadfce; font-size: 13px; }

.pay-transfer, .pay-qris { margin: 10px 0; }
.pay-qris img { width: min(240px, 100%); border-radius: 12px; background: #fff; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.day-readonly { cursor: default !important; }
.day-readonly:hover { transform: none; }
.cabin-price { font-weight: 700; color: var(--teal-dark); margin: 0; }
