/* KTM Voyage CRM — Operations module styles [OPS].
   Najavi checklists · Rooming builder · Vouchers. Brand: gold #ccb52d, navy/dark,
   Lato/Playfair (tokens come from base.css :root). Vasko-proof: big click targets
   (>= 40px), calm cards, clear states. Responsive down to 390px. */

/* ------------------------------------------------------------------ *
 * Shared page bits
 * ------------------------------------------------------------------ */
.ops-body { margin-top: 16px; }

.ops-lead { margin-bottom: 10px; }

.ops-h3 {
  font-size: 15px;
  color: var(--ink, #292109);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-count {
  background: #efecdf;
  color: #5d5636;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
}

.ops-muted { color: var(--muted-2, #8b8877); font-size: 13px; }

/* "Add for a booking" bar (najava / rooming / voucher starters) */
.ops-newbar {
  padding: 14px 16px;
  margin: 12px 0 18px;
  border-left: 3px solid var(--gold, #ccb52d);
}
.ops-newbar > label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #6d6a58);
  letter-spacing: .02em;
  margin-bottom: 7px;
}
.ops-newrow { display: flex; gap: 10px; flex-wrap: wrap; }
.ops-newrow select {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e2dfd2);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--ink, #292109);
  font-family: inherit;
  max-width: 100%;
}
.ops-newrow .btn { min-height: 44px; }

/* Toolbar above a detail view (back · version · print · send) */
.ops-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ops-toolbar .spacer, .ops-filterbar .spacer { flex: 1 1 auto; }
.ops-toolbar .btn { min-height: 42px; }

/* List toolbar: search + filters + sort + count + CSV + print */
.ops-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2dfd2);
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(20, 24, 34, .05));
  padding: 10px 12px;
  margin: 4px 0 16px;
}
.ops-search {
  flex: 1 1 220px;
  min-width: 160px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line, #e2dfd2);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink, #292109);
  background: #fff;
}
.ops-search:focus, .ops-select:focus {
  outline: none;
  border-color: var(--gold, #ccb52d);
  box-shadow: 0 0 0 3px rgba(204, 181, 45, .18);
}
.ops-select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e2dfd2);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink, #292109);
  background: #fff;
  max-width: 100%;
}
.ops-resultcount {
  font-size: 13px;
  color: var(--muted, #6d6a58);
  white-space: nowrap;
}
.ops-resultcount b { color: var(--ink, #292109); }

/* Compact booking line reused on every card */
.ops-bkline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  line-height: 1.4;
}
.ops-bkline b { color: var(--ink, #292109); white-space: nowrap; }
.ops-bkline > span:not(.pill):not(.flag) { color: #4a4738; }
.ops-bkline small { color: var(--muted-2, #8b8877); flex-basis: 100%; }

/* Banners (rooming sent-lock) */
.ops-lockbanner, .ops-warnbanner {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  margin: 12px 0;
  line-height: 1.5;
}
.ops-lockbanner {
  background: #fdf1ef;
  border: 1px solid #eecdc5;
  color: #8a4335;
}
.ops-warnbanner {
  background: #f7f4e6;
  border: 1px solid #e6dcae;
  color: #4a4426;
}

/* Version badge */
.ver-badge {
  display: inline-flex;
  align-items: center;
  background: #f3f0e4;
  border: 1px solid #e3ddc4;
  color: #5d5636;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Najavi — checklist cards
 * ------------------------------------------------------------------ */
.naj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.naj-card { padding: 16px; }
.naj-card.is-done { opacity: .82; }
.naj-card.is-done .naj-bar { background: #6faf6f; }

.naj-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
  font-size: 12.5px;
  color: var(--muted, #6d6a58);
}
.naj-auto {
  background: #eef3f8;
  border: 1px solid #d4e0ec;
  color: #3d5a77;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.naj-assignee b { color: var(--ink, #292109); }

.naj-progress {
  height: 7px;
  background: #efecdf;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.naj-bar {
  height: 100%;
  background: var(--gold, #ccb52d);
  border-radius: 999px;
  transition: width .25s ease;
}
.naj-progress-txt {
  font-size: 11.5px;
  color: var(--muted-2, #8b8877);
  margin: 4px 0 10px;
}

.naj-items { list-style: none; margin: 0; padding: 0; }
.naj-item { border-top: 1px solid #f0eee7; }
.naj-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;              /* big tap target */
  padding: 6px 4px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink, #292109);
}
.naj-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--gold, #ccb52d);
  cursor: pointer;
}
.naj-item input[type="checkbox"][disabled] { cursor: not-allowed; }
.naj-item.done .naj-item-label {
  text-decoration: line-through;
  color: var(--muted-2, #8b8877);
}
.naj-doneby {
  display: block;
  color: var(--muted-2, #8b8877);
  font-size: 11.5px;
  padding: 0 4px 8px 38px;
}

/* ------------------------------------------------------------------ *
 * Rooming & voucher list rows
 * ------------------------------------------------------------------ */
.roo-list { display: flex; flex-direction: column; gap: 10px; }

.roo-row {
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.roo-row:hover {
  border-color: var(--gold, #ccb52d);
  box-shadow: 0 3px 10px rgba(41, 33, 9, .08);
}
.roo-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 9px;
  font-size: 13px;
  color: var(--muted, #6d6a58);
}
.roo-row-meta .roo-open-btn { margin-left: auto; pointer-events: none; }
.roo-sent { color: #3e7d3e; font-weight: 700; }

/* ------------------------------------------------------------------ *
 * Rooming builder
 * ------------------------------------------------------------------ */
.roo-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 8px;
}
.roo-namescard, .roo-gencard { padding: 16px; }

.roo-names input, .roo-names select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e2dfd2);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink, #292109);
  background: #fff;
}
.roo-names input:focus, .roo-names select:focus {
  outline: none;
  border-color: var(--gold, #ccb52d);
  box-shadow: 0 0 0 3px rgba(204, 181, 45, .18);
}
.roo-names td { padding: 6px 6px; border-bottom: 1px solid #f0eee7; }
.roo-names th { white-space: nowrap; }
.roo-del { width: 44px; text-align: center; }
.roo-del .btn { min-width: 40px; min-height: 40px; }

.roo-namesactions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.roo-namesactions .btn { min-height: 44px; }

.roo-gencard .btn-block { margin-top: 6px; min-height: 46px; }

/* Generated room lists */
.roo-listcard { padding: 16px; margin-bottom: 14px; }
.roo-listhead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 14px;
}
.roo-roomgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.roo-room {
  border: 1px solid var(--line, #e2dfd2);
  border-radius: 9px;
  padding: 10px 12px;
  background: #fbfaf5;
}
.roo-room-title {
  font-weight: 700;
  font-size: 12.5px;
  color: #5d5636;
  margin-bottom: 6px;
}
.roo-room-title small {
  font-weight: 400;
  color: var(--muted-2, #8b8877);
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 10.5px;
}
.roo-room-guests { display: flex; flex-direction: column; gap: 3px; }
.roo-room-guests span { font-size: 13.5px; color: var(--ink, #292109); }

/* ------------------------------------------------------------------ *
 * Voucher editor
 * ------------------------------------------------------------------ */
.vou-suppliers {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line, #e2dfd2);
  border-radius: 9px;
  padding: 4px 10px;
  background: #fff;
}
.vou-sup { margin: 0; min-height: 42px; border-bottom: 1px solid #f0eee7; }
.vou-sup:last-child { border-bottom: none; }
.vou-sup input { width: 20px; height: 20px; }
.vou-sup small { margin-left: 4px; }

.vou-history { list-style: none; margin: 0 0 8px; padding: 0; }
.vou-history li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 2px;
  border-bottom: 1px solid #f0eee7;
  font-size: 13px;
  color: var(--ink, #292109);
}
.vou-history li:last-child { border-bottom: none; }
.vou-history small {
  flex-basis: 100%;
  color: var(--muted-2, #8b8877);
  font-size: 12px;
}

/* ------------------------------------------------------------------ *
 * Print views (screen preview wrapper; A4 layout itself is print.css)
 * ------------------------------------------------------------------ */
.print-wrap { padding: 20px 14px 40px; }
.print-wrap .print-toolbar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  max-width: 820px;
  margin: 0 auto 14px;
}
.print-wrap .print-toolbar .btn { min-height: 44px; }

/* ------------------------------------------------------------------ *
 * Responsive — usable at 390px
 * ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .roo-cols { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .naj-grid { grid-template-columns: 1fr; }
  .ops-filterbar { padding: 10px; }
  .ops-search { flex-basis: 100%; }
  .ops-select { flex: 1 1 45%; }
  .ops-resultcount { order: 5; }
  .ops-newrow { flex-direction: column; }
  /* The column layout turns the 260px flex-BASIS into a HEIGHT — the booking
     picker rendered 260px tall and pushed the content off a phone screen. */
  .ops-newrow select { flex: 0 0 auto; width: 100%; height: 44px; }
  .ops-newrow .btn { width: 100%; }
  .roo-row-meta .roo-open-btn { margin-left: 0; }
  .roo-roomgrid { grid-template-columns: 1fr 1fr; }
  .ops-toolbar .btn { flex: 1 1 auto; }
  .print-wrap { padding: 10px 4px 30px; }
}

/* ---------- P2 polish: long booking names wrap instead of overflowing ---------- */
.ops-bkline{min-width:0}
.ops-bkline b{white-space:normal;overflow-wrap:anywhere}
.roo-room-guests span{overflow-wrap:anywhere}
