/* ===================================================================
   Reception Desk - shared look for the new reception screens.
   Everything is scoped under .rd so it cannot fight the admin theme.

   Built for a busy counter: big targets, few choices on screen at once,
   and colour that means something rather than decorates.
   =================================================================== */

.rd {
  --rd-ink:      #17211d;
  --rd-muted:    #5f6f68;
  --rd-faint:    #8b9a93;
  --rd-line:     #dbe3df;
  --rd-surface:  #ffffff;
  --rd-ground:   #f4f7f5;

  --rd-green:    #0e6b52;
  --rd-green-bg: #e4f1ec;
  --rd-blue:     #1f5d84;
  --rd-blue-bg:  #e3eef6;
  --rd-amber:    #96560d;
  --rd-amber-bg: #fbeedb;
  --rd-red:      #9a2320;
  --rd-red-bg:   #fae7e5;
  --rd-grey:     #5f6f68;
  --rd-grey-bg:  #eaefec;

  color: var(--rd-ink);
  font-size: 16px;
}

.rd *, .rd *::before, .rd *::after { box-sizing: border-box; }

/* ---------- search ---------- */

.rd-search {
  background: var(--rd-surface);
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 22px;
}

.rd-search h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--rd-ink);
}

.rd-search p {
  margin: 0 0 16px;
  color: var(--rd-muted);
  font-size: 15px;
}

.rd-searchrow { display: flex; flex-wrap: wrap; gap: 12px; }

.rd-searchrow .rd-input {
  flex: 1 1 320px;
  min-width: 0;
  font-size: 22px;
  padding: 16px 18px;
  border: 2px solid var(--rd-line);
  border-radius: 8px;
  background: var(--rd-ground);
  color: var(--rd-ink);
  font-family: inherit;
}

.rd-searchrow .rd-input:focus {
  outline: none;
  border-color: var(--rd-green);
  background: var(--rd-surface);
}

.rd-searchrow .rd-input::placeholder { color: var(--rd-faint); font-size: 18px; }

/* ---------- buttons ---------- */

.rd-btn {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  font-family: inherit;
}

.rd-btn:hover, .rd-btn:focus { text-decoration: none; opacity: .92; }
.rd-btn:focus-visible { outline: 3px solid var(--rd-blue); outline-offset: 2px; }

.rd-btn-go     { background: var(--rd-green); color: #fff; }
.rd-btn-go:hover, .rd-btn-go:focus { color: #fff; }
.rd-btn-plain  { background: var(--rd-surface); color: var(--rd-ink); border-color: var(--rd-line); }
.rd-btn-plain:hover, .rd-btn-plain:focus { color: var(--rd-ink); }
.rd-btn-money  { background: var(--rd-amber); color: #fff; }
.rd-btn-money:hover, .rd-btn-money:focus { color: #fff; }

.rd-btn-sm { font-size: 15px; padding: 11px 18px; }

/* ---------- quick filters ---------- */

.rd-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.rd-chip {
  background: var(--rd-ground);
  border: 1px solid var(--rd-line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rd-muted);
  cursor: pointer;
  font-family: inherit;
}

.rd-chip:hover { border-color: var(--rd-green); color: var(--rd-green); }
.rd-chip b { color: var(--rd-ink); }

/* ---------- result cards ---------- */

.rd-cards { display: flex; flex-direction: column; gap: 14px; }

.rd-card {
  background: var(--rd-surface);
  border: 1px solid var(--rd-line);
  border-left: 6px solid var(--rd-grey);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.rd-card.s-READY      { border-left-color: var(--rd-green); }
.rd-card.s-INHOUSE    { border-left-color: var(--rd-green); }
.rd-card.s-BOOKED     { border-left-color: var(--rd-blue); }
.rd-card.s-PENDING_DR { border-left-color: var(--rd-amber); }
.rd-card.s-OVERDUE    { border-left-color: var(--rd-red); }
.rd-card.s-REJECTED   { border-left-color: var(--rd-red); }

.rd-photo {
  width: 62px; height: 62px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rd-ground);
  border: 1px solid var(--rd-line);
  flex: 0 0 auto;
}

.rd-initials {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--rd-grey-bg);
  color: var(--rd-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex: 0 0 auto;
}

.rd-who { flex: 1 1 240px; min-width: 0; }

.rd-name {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  word-break: break-word;
}

.rd-meta { color: var(--rd-muted); font-size: 15px; line-height: 1.5; }
.rd-meta .sep { color: var(--rd-faint); padding: 0 6px; }
.rd-uhid { font-family: Consolas, "Courier New", monospace; font-size: 14px; }

.rd-state { flex: 0 0 auto; text-align: right; min-width: 170px; }

.rd-pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.p-NEW        { background: var(--rd-grey-bg);  color: var(--rd-grey); }
.p-LEFT       { background: var(--rd-grey-bg);  color: var(--rd-grey); }
.p-READY      { background: var(--rd-green-bg); color: var(--rd-green); }
.p-INHOUSE    { background: var(--rd-green-bg); color: var(--rd-green); }
.p-BOOKED     { background: var(--rd-blue-bg);  color: var(--rd-blue); }
.p-PENDING_DR { background: var(--rd-amber-bg); color: var(--rd-amber); }
.p-OVERDUE    { background: var(--rd-red-bg);   color: var(--rd-red); }
.p-REJECTED   { background: var(--rd-red-bg);   color: var(--rd-red); }

.rd-money { margin-top: 8px; font-size: 15px; color: var(--rd-muted); }
.rd-money b { color: var(--rd-ink); font-size: 17px; }

.rd-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rd-line);
}

.rd-hint {
  flex: 1 1 100%;
  font-size: 15px;
  color: var(--rd-muted);
  background: var(--rd-ground);
  border-radius: 6px;
  padding: 10px 14px;
}

.rd-hint.warn  { background: var(--rd-amber-bg); color: var(--rd-amber); }
.rd-hint.stop  { background: var(--rd-red-bg);   color: var(--rd-red); }

/* ---------- empty / message ---------- */

.rd-empty {
  background: var(--rd-surface);
  border: 2px dashed var(--rd-line);
  border-radius: 10px;
  padding: 46px 24px;
  text-align: center;
  color: var(--rd-muted);
}

.rd-empty h3 { font-size: 20px; color: var(--rd-ink); margin: 0 0 8px; font-weight: 700; }
.rd-empty p  { margin: 0 0 18px; font-size: 16px; }

/* ---------- today strip ---------- */

.rd-today { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.rd-stat {
  flex: 1 1 150px;
  background: var(--rd-surface);
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  padding: 16px 18px;
}

.rd-stat .n {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.rd-stat .l { font-size: 14px; color: var(--rd-muted); margin-top: 2px; }

.rd-stat.good .n { color: var(--rd-green); }
.rd-stat.warn .n { color: var(--rd-amber); }
.rd-stat.stop .n { color: var(--rd-red); }

@media (max-width: 640px) {
  .rd-state { text-align: left; min-width: 0; flex: 1 1 100%; }
  .rd-searchrow .rd-input { font-size: 19px; }
  .rd-btn { width: 100%; }
}

/* ===================================================================
   Money screen
   =================================================================== */

.rd-bookinghead {
  background: var(--rd-surface);
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
}

.rd-bookinghead .bh-name { font-size: 22px; font-weight: 700; }
.rd-bookinghead .bh-bit  { color: var(--rd-muted); font-size: 15px; }
.rd-bookinghead .bh-bit b { color: var(--rd-ink); }

/* the one number that matters */
.rd-balance {
  border-radius: 10px;
  padding: 26px 24px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.rd-balance .bl-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .85;
}

.rd-balance .bl-amount {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.rd-balance .bl-note { font-size: 15px; margin-top: 8px; opacity: .9; }

.rd-balance.due     { background: var(--rd-red-bg);   border-color: var(--rd-red);   color: var(--rd-red); }
.rd-balance.refund  { background: var(--rd-amber-bg); border-color: var(--rd-amber); color: var(--rd-amber); }
.rd-balance.clear   { background: var(--rd-green-bg); border-color: var(--rd-green); color: var(--rd-green); }

/* the entry box */
.rd-box {
  background: var(--rd-surface);
  border: 1px solid var(--rd-line);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 16px;
}

.rd-box > h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--rd-ink);
}

.rd-field { margin-bottom: 18px; }

.rd-field > label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--rd-muted);
  margin-bottom: 7px;
}

.rd-amountrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }

.rd-amount {
  flex: 1 1 200px;
  min-width: 0;
  font-size: 34px;
  font-weight: 700;
  padding: 12px 16px;
  border: 2px solid var(--rd-line);
  border-radius: 8px;
  background: var(--rd-ground);
  color: var(--rd-ink);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}

.rd-amount:focus { outline: none; border-color: var(--rd-green); background: var(--rd-surface); }

.rd-billno {
  width: 130px;
  font-size: 20px;
  padding: 12px 14px;
  border: 2px solid var(--rd-line);
  border-radius: 8px;
  background: var(--rd-ground);
  color: var(--rd-ink);
  font-family: inherit;
}

/* how paid - big pickable tiles instead of a dropdown */
.rd-modes { display: flex; flex-wrap: wrap; gap: 10px; }
.rd-modes label {
  border: 2px solid var(--rd-line);
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  background: var(--rd-surface);
  margin: 0;
  color: var(--rd-muted);
}
.rd-modes input[type=radio] { margin-right: 9px; transform: scale(1.3); vertical-align: -1px; }
.rd-modes label:hover { border-color: var(--rd-green); }

/* fold-away sections */
.rd-fold { border-top: 1px solid var(--rd-line); margin-top: 6px; padding-top: 14px; }
.rd-fold > summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--rd-green);
  list-style: none;
  padding: 6px 0;
}
.rd-fold > summary::-webkit-details-marker { display: none; }
.rd-fold > summary::before { content: "+ "; font-weight: 700; }
.rd-fold[open] > summary::before { content: "\2212 "; }
.rd-foldbody { padding-top: 12px; }

/* the bill breakdown */
.rd-bill { width: 100%; border-collapse: collapse; font-size: 16px; }
.rd-bill td { padding: 9px 4px; border-bottom: 1px solid var(--rd-line); }
.rd-bill td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-bill tr.sum td { font-weight: 700; border-top: 2px solid var(--rd-line); border-bottom: none; font-size: 18px; }
.rd-bill tr.less td { color: var(--rd-muted); }

.rd-small { font-size: 14px; color: var(--rd-faint); margin-top: 6px; }

.rd-msg { border-radius: 8px; padding: 14px 18px; font-size: 16px; margin-bottom: 16px; }
.rd-msg.ok   { background: var(--rd-green-bg); color: var(--rd-green); border: 1px solid var(--rd-green); }
.rd-msg.bad  { background: var(--rd-red-bg);   color: var(--rd-red);   border: 1px solid var(--rd-red); }
.rd-msg.warn { background: var(--rd-amber-bg); color: var(--rd-amber); border: 1px solid var(--rd-amber); }

/* receipts list */
.rd-receipts { width: 100%; border-collapse: collapse; font-size: 15px; }
.rd-receipts th {
  text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rd-faint); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--rd-line);
}
.rd-receipts td { padding: 11px 10px; border-bottom: 1px solid var(--rd-line); vertical-align: middle; }
.rd-receipts td.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rd-receipts .out { color: var(--rd-red); }
.rd-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rd-tag.t-1 { background: var(--rd-blue-bg);  color: var(--rd-blue); }
.rd-tag.t-2 { background: var(--rd-green-bg); color: var(--rd-green); }
.rd-tag.t-3 { background: var(--rd-amber-bg); color: var(--rd-amber); }

/* ===================================================================
   Room board
   =================================================================== */

.rd-typegroup { margin-bottom: 26px; }

.rd-typehead {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 12px;
}
.rd-typehead h3 { font-size: 19px; font-weight: 700; margin: 0; }
.rd-typehead .sub { font-size: 14px; color: var(--rd-muted); }

.rd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.rd-room {
  border: 1px solid var(--rd-line);
  border-top: 5px solid var(--rd-grey);
  border-radius: 8px;
  background: var(--rd-surface);
  padding: 14px 15px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rd-room .no {
  font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.rd-room .st {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.rd-room .who { font-size: 14px; color: var(--rd-muted); line-height: 1.4; word-break: break-word; }
.rd-room .cap { font-size: 12px; color: var(--rd-faint); margin-top: auto; }

.rd-room.r-FREE    { border-top-color: var(--rd-green); background: var(--rd-green-bg); }
.rd-room.r-FREE    .st { color: var(--rd-green); }
.rd-room.r-SPACE   { border-top-color: var(--rd-blue); }
.rd-room.r-SPACE   .st { color: var(--rd-blue); }
.rd-room.r-LEAVING { border-top-color: var(--rd-amber); background: var(--rd-amber-bg); }
.rd-room.r-LEAVING .st { color: var(--rd-amber); }
.rd-room.r-FULL    { border-top-color: var(--rd-red); }
.rd-room.r-FULL    .st { color: var(--rd-red); }

.rd-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--rd-muted); margin-bottom: 18px; }
.rd-legend span { display: flex; align-items: center; gap: 7px; }
.rd-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.rd-legend .l-FREE    { background: var(--rd-green); }
.rd-legend .l-SPACE   { background: var(--rd-blue); }
.rd-legend .l-LEAVING { background: var(--rd-amber); }
.rd-legend .l-FULL    { background: var(--rd-red); }

.rd-assign { width: 100%; border-collapse: collapse; font-size: 15px; }
.rd-assign th {
  text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rd-faint); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--rd-line);
}
.rd-assign td { padding: 12px 10px; border-bottom: 1px solid var(--rd-line); vertical-align: middle; }
.rd-assign select { font-size: 16px; padding: 9px 12px; border: 2px solid var(--rd-line); border-radius: 6px; min-width: 150px; }
