:root {
  --blue: #1e3a8a;
  --blue-dark: #172554;
  --blue-light: #3b5bdb;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --bg: #f1f5f9;
  --bg-soft: #e2e8f0;
  --card: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  min-height: 100vh;
  color: var(--text);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.container {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 20px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  position: relative;
}

/* BRAND HEADER */
.brand {
  background: white;
  padding: 24px;
  text-align: center;
  border-bottom: 3px solid var(--blue);
  position: relative;
}
.brand::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 50%, var(--red) 50%, var(--red) 100%);
}
.brand svg { display: block; margin: 0 auto; max-width: 280px; height: auto; }
.brand .module-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: var(--blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 20px;
  text-transform: uppercase;
}
.brand .module-tag.ops { background: var(--red); }

.header {
  padding: 20px 24px;
  background: linear-gradient(180deg, #f8fafc 0%, white 100%);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.header h1 { font-size: 19px; font-weight: 700; color: var(--blue); }
.header .subtitle {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
}
.header .subtitle .hotel-name {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  color: var(--blue);
  font-size: 14px;
}

.content { padding: 24px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}
input::placeholder, textarea::placeholder {
  color: #cbd5e1;
  opacity: 1;
  font-weight: 400;
  letter-spacing: normal;
}

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 22px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-soft);
}
.section-title:first-child { margin-top: 0; }

button, .btn {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  display: block;
  text-align: center;
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--blue-dark); box-shadow: 0 6px 18px rgba(30, 58, 138, 0.25); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.secondary, .btn.secondary { background: white; color: var(--blue); border: 1.5px solid var(--blue); }
button.secondary:hover, .btn.secondary:hover { background: var(--blue); color: white; }
button.danger, .btn.danger { background: var(--red); color: white; }
button.danger:hover, .btn.danger:hover { background: var(--red-dark); }
button.small, .btn.small { width: auto; padding: 8px 14px; font-size: 13px; margin: 0; display: inline-block; }

/* VOUCHER ENTRY */
.voucher-entry { text-align: center; padding: 12px 0 8px; }
.voucher-entry input {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 6px;
  padding: 18px;
  font-family: monospace;
  color: var(--blue);
  background: #f8fafc;
}
.voucher-hint { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* FILTER PILLS */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pill {
  padding: 7px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}
.pill:hover { border-color: var(--blue); }
.pill.active { background: var(--blue); color: white; border-color: var(--blue); }
.pill .count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.pill.active .count { background: rgba(255,255,255,0.25); }

/* TRANSFER ROWS */
.transfer-row {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.transfer-row:hover { border-color: var(--blue); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15,23,42,0.1); }
.transfer-row.ready { border-left-color: #16a34a; }
.transfer-row.waiting { border-left-color: #2563eb; }
.transfer-row .info { flex: 1; min-width: 0; }
.transfer-row .vcode {
  font-family: monospace;
  font-size: 17px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 1px;
}
.transfer-row .vname { font-size: 14px; color: var(--text); margin-top: 4px; font-weight: 500; }
.transfer-row .vmeta { font-size: 12px; color: var(--text-soft); margin-top: 3px; }
.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.waiting { background: #dbeafe; color: #1e40af; }
.status-badge.ready { background: #dcfce7; color: #166534; }

/* DATE GROUPS */
.date-group { margin-bottom: 14px; }
.date-header {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  padding: 14px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  user-select: none;
}
.date-header .date-label { flex: 1; font-size: 15px; }
.date-header .date-count {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.date-header .date-count.has-pending { background: var(--red); color: white; }
.date-header.today { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.date-items { padding: 10px 4px 4px 4px; }
details.date-group > summary { list-style: none; cursor: pointer; }
details.date-group > summary::-webkit-details-marker { display: none; }

/* FLIGHT SUB-GROUPS within a date */
.flight-subgroup {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: white;
  box-shadow: var(--shadow);
}
.flight-subgroup:last-child { margin-bottom: 0; }
.flight-subheader {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-bottom: 1.5px solid var(--border);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.flight-subheader .flight-count {
  background: var(--blue);
  color: white;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.flight-time-input {
  width: auto;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  background: white;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  color: var(--blue);
  font-family: monospace;
}
.flight-subgroup .transfer-row {
  border: none;
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}
.flight-subgroup .transfer-row:last-child { border-bottom: none; }
.flight-subgroup .transfer-row.ready { border-left-color: #16a34a; }
.flight-subgroup .transfer-row.waiting { border-left-color: #2563eb; }
.flight-subgroup .transfer-row:hover { transform: none; background: #f8fafc; }
html[dir="rtl"] .flight-subgroup .transfer-row { border-left: none; border-right: 4px solid var(--red); }
html[dir="rtl"] .flight-subgroup .transfer-row.ready { border-right-color: #16a34a; }
html[dir="rtl"] .flight-subgroup .transfer-row.waiting { border-right-color: #2563eb; }

/* CUSTOMER INFO CARDS */
.info-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  box-shadow: var(--shadow);
}
.info-card .label {
  font-size: 11px; color: var(--red);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 6px; font-weight: 700;
}
.info-card .value { font-size: 17px; color: var(--text); font-weight: 500; }
.info-card .value.big { font-size: 30px; font-weight: 800; color: var(--blue); }
.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.passenger-list { list-style: none; padding: 0; }
.passenger-list li {
  padding: 7px 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 14px;
}
.passenger-list li:last-child { border-bottom: none; }

/* GENERIC LICENSE PLATE */
.license-plate {
  display: inline-block;
  background: white;
  border-radius: 8px;
  padding: 12px 26px;
  border: 3px solid var(--text);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  min-width: 220px;
  text-align: center;
}
.license-plate .plate-text {
  font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #000;
  line-height: 1.1;
}

/* DRIVER CARD */
.driver-card {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  color: white;
}
.driver-card .label { color: rgba(255,255,255,0.75); }
.driver-card .value { color: white; }
.call-btn {
  display: inline-block;
  margin-top: 10px; margin-right: 6px;
  padding: 10px 18px;
  background: #25D366; color: white;
  border-radius: 8px; text-decoration: none;
  font-weight: 700; font-size: 14px;
}
.call-btn.phone { background: var(--red); }

.info-readonly {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.info-readonly strong { color: var(--blue); }

/* TABS (admin) */
.nav-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.nav-tab {
  flex: 1;
  min-width: 100px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-tab:hover { color: var(--blue); }
.nav-tab.active { color: var(--blue); border-bottom-color: var(--red); }

/* MODE TOGGLE */
.mode-toggle {
  position: absolute; top: 14px; right: 14px;
  background: white;
  color: var(--blue);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--blue);
  z-index: 50;
  box-shadow: var(--shadow);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mode-toggle:hover { background: var(--blue); color: white; }

.alert { padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert.ok { background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; }
.alert.warn { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }

.hidden { display: none !important; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
.app-version {
  position: fixed; bottom: 6px; left: 0; right: 0;
  text-align: center; color: var(--text-muted);
  font-size: 11px; letter-spacing: 0.3px;
  pointer-events: none; z-index: 1;
}

@media (max-width: 480px) {
  .form-row, .info-row { grid-template-columns: 1fr; }
  .voucher-entry input { font-size: 24px; letter-spacing: 4px; }
}

/* ===== RTL (Hebrew) support ===== */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .info-card { border-left: none; border-right: 4px solid var(--blue); }
html[dir="rtl"] .transfer-row { border-left: none; border-right: 4px solid var(--red); }
html[dir="rtl"] .transfer-row.ready { border-right-color: #16a34a; }
html[dir="rtl"] .transfer-row.waiting { border-right-color: #2563eb; }
html[dir="rtl"] .info-readonly { border-left: none; border-right: 3px solid var(--blue); }
html[dir="rtl"] .mode-toggle { right: auto; left: 16px; }
html[dir="rtl"] .lang-toggle { left: auto; right: 16px; }
html[dir="rtl"] .voucher-entry input { letter-spacing: normal; }

/* Language toggle pill */
.lang-toggle {
  position: absolute; top: 14px; left: 14px;
  background: white;
  color: var(--blue);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid var(--blue);
  z-index: 50;
  box-shadow: var(--shadow);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-toggle a { color: var(--blue); text-decoration: none; }
.lang-toggle .lang-active {
  background: var(--blue);
  color: #fff;
  padding: 3px 8px;
  border-radius: 12px;
  margin: -3px 0;
}

/* MODAL (disclaimer) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px; overflow-y: auto;
}
.modal {
  background: white; border-radius: 16px;
  width: 100%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 18px 24px; border-bottom: 2px solid var(--bg-soft);
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--red); }
.modal-body { padding: 24px; }
.disclaimer-box {
  background: #fef3c7; border: 1.5px solid #fde68a; border-radius: 12px;
  padding: 18px; margin-bottom: 16px; color: #78350f; line-height: 1.7; font-size: 14px;
}
.disclaimer-ack {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px;
  background: #f8fafc; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer;
}
.disclaimer-ack input { width: auto; margin-top: 3px; flex-shrink: 0; }

/* Pickup time shown on each row of the operations board, so the team can scan a flight
   for gaps without opening every voucher. */
.pickup-chip {
    background: #eff6ff;
    color: var(--blue);
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    padding: 3px 9px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    margin-inline-end: 8px;
    flex: 0 0 auto;
}

/* Busy state for a submit button. Sending a code waits on the booking engine and an SMS
   gateway; without visible movement the page reads as broken and people press again. */
button.is-busy { opacity: .75; cursor: progress; }
.spinner {
    display: inline-block;
    width: 15px; height: 15px;
    margin-inline-end: 9px;
    vertical-align: -2px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: fc-spin .7s linear infinite;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* The one sentence in the disclaimer that asks the guest to do something, rather than
   telling them what we are not liable for. Set apart so it survives being skimmed. */
.disclaimer-callout {
    font-weight: 800;
    color: #7f1d1d;
    background: #fee2e2;
    border-radius: 5px;
    padding: 1px 5px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Pickup entered as a date and a time, or a window of two times -- the transfer company
   often answers "between 08:00 and 08:20". On a phone the date takes its own line. */
.pickup-window { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pickup-window .pw-date { flex: 1 1 150px; width: auto; }
.pickup-window .pw-time { flex: 1 1 96px; width: auto; }
.pickup-window .pw-dash { font-weight: 800; color: var(--text-soft); }
@media (max-width: 480px) { .pickup-window .pw-date { flex-basis: 100%; } }

/* After saving, the board reopens on the row that was edited; mark it so the eye lands there. */
.transfer-row { scroll-margin-top: 90px; }
.transfer-row:target { outline: 2px solid var(--blue); outline-offset: -2px; }

/* A transfer the airport guide has marked done: the guests were met, nothing is outstanding. */
.status-badge.done { background: #e2e8f0; color: #334155; }
.transfer-row.done, .flight-subgroup .transfer-row.done { border-left-color: #64748b; }
/* What the guide recorded, on the admin boards: met, no show, or a booking that went both ways. */
.status-badge.noshow { background: #fee2e2; color: #991b1b; }
.status-badge.partial { background: #fef3c7; color: #92400e; }
.transfer-row.noshow, .flight-subgroup .transfer-row.noshow { border-left-color: #7f1d1d; }
.transfer-row.partial, .flight-subgroup .transfer-row.partial { border-left-color: #f59e0b; }
html[dir="rtl"] .flight-subgroup .transfer-row.done { border-right-color: #64748b; }
html[dir="rtl"] .flight-subgroup .transfer-row.noshow { border-right-color: #7f1d1d; }
html[dir="rtl"] .flight-subgroup .transfer-row.partial { border-right-color: #f59e0b; }
.transfer-row.static { cursor: default; }
.transfer-row.static:hover, .flight-subgroup .transfer-row.static:hover { transform: none; background: white; }
.meet-line { font-weight: 700; }
.meet-line.done { color: #166534 !important; }
.meet-line.noshow { color: #991b1b !important; }
.meet-line.partial { color: #92400e !important; }
.meet-people { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; color: var(--text-soft); }
.meet-people li { padding: 1px 0; }
.meet-people li.done { color: #166534; }
.meet-people li.noshow { color: #991b1b; }
.meet-people .muted { color: var(--text-muted); }

/* Airport page for guides: one big button per voucher, readable on a phone in a terminal. */
.guide-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    border-left: 4px solid var(--blue); background: white;
    scroll-margin-top: 90px;
}
.guide-row:last-child { border-bottom: none; }
.guide-row.done { border-left-color: #16a34a; background: #f0fdf4; }
.guide-row:target { outline: 2px solid var(--blue); outline-offset: -2px; }
.guide-row .info { flex: 1 1 220px; min-width: 0; }
.guide-row .vcode { font-family: monospace; font-size: 16px; color: var(--blue); font-weight: 800; letter-spacing: 1px; }
.guide-row .vname { font-size: 15px; font-weight: 700; margin-top: 3px; }
.guide-row .vmeta { font-size: 12px; color: var(--text-soft); margin-top: 3px; }
.guide-row form { margin: 0; flex: 0 0 auto; }
.guide-row .done-btn { background: #16a34a; color: #fff; font-size: 15px; padding: 12px 16px; width: auto; margin: 0; }
.guide-row .done-mark { font-weight: 800; color: #166534; font-size: 14px; }
.guide-row .undo-btn { background: none; color: var(--text-soft); border: 1px solid var(--border); padding: 6px 10px; font-size: 12px; width: auto; margin: 0 0 0 8px; }
.guide-row.noshow { border-left-color: #dc2626; background: #fef2f2; }
.guide-row.partial { border-left-color: #f59e0b; background: #fffbeb; }

/* Done / No show controls: for the booking, and one row per passenger when there are several. */
.marks { flex: 0 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.marks.multi { flex: 1 1 100%; }
.marks .alert { margin: 0; }
.mark-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mark-slot form { margin: 0; }
.mark-state { font-weight: 800; font-size: 14px; }
.mark-state.done { color: #166534; }
.mark-state.noshow { color: #991b1b; }
.pax-list { border-top: 1px dashed var(--border); }
.pax-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pax-row:last-child { border-bottom: none; }
.pax-row .pname { flex: 1 1 160px; font-weight: 700; font-size: 14px; }
.pax-row.done .pname { color: #166534; }
.pax-row.noshow .pname { color: #991b1b; }
.pax-row .done-btn { font-size: 13px; padding: 8px 12px; }
.pax-row .noshow-box > summary { font-size: 13px; padding: 7px 12px; }
.undo-all { margin: 0; align-self: flex-start; }
.undo-all .undo-btn { margin: 0; }

/* No show opens below its button: a reason in one tap, or typed. */
.noshow-box > summary {
    list-style: none; cursor: pointer; user-select: none; display: inline-block;
    background: white; color: #b91c1c; border: 1.5px solid #fca5a5; border-radius: 10px;
    font-weight: 700; font-size: 15px; padding: 11px 16px;
}
.noshow-box > summary::-webkit-details-marker { display: none; }
.noshow-box[open] { flex-basis: 100%; }
.noshow-box[open] > summary { background: #fef2f2; }
.noshow-form { margin-top: 8px; padding: 10px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.reason-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; cursor: pointer;
    border: 1.5px solid #fca5a5; border-radius: 20px; background: white;
    font-size: 14px; font-weight: 600; color: #991b1b; text-transform: none; letter-spacing: normal; margin: 0;
}
.reason-chip:has(input:checked) { background: #dc2626; border-color: #dc2626; color: white; }
.reason-chip input { width: auto; margin: 0; padding: 0; accent-color: #991b1b; }
.noshow-form textarea { font-size: 14px; padding: 8px 10px; resize: vertical; }
.noshow-form .noshow-save { background: #dc2626; width: auto; padding: 10px 16px; font-size: 14px; }
@media (max-width: 480px) {
    .marks { flex-basis: 100%; }
    .pax-row .mark-slot { flex: 1 1 100%; }
    .mark-slot > form, .mark-slot > .noshow-box { flex: 1 1 120px; }
    .mark-slot > .noshow-box[open] { flex-basis: 100%; }
    .mark-slot .done-btn, .mark-slot .noshow-box > summary { width: 100%; text-align: center; font-size: 14px; padding: 11px 8px; }
    .noshow-form .noshow-save { width: 100%; }
}

/* Admin tables (Users). Scrolls sideways inside its card on a phone instead of the page. */
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.table-head .section-title { margin: 0; flex: 1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    text-align: start; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
    color: var(--blue); background: #f8fafc; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .mono { font-family: monospace; font-weight: 700; font-size: 14px; white-space: nowrap; }
.data-table .muted { color: var(--text-muted); font-family: inherit; font-weight: 400; font-size: 12px; }
.row-actions { white-space: nowrap; text-align: end; }
.row-actions form { display: inline; margin: 0; }
.row-actions .small { padding: 6px 10px; font-size: 12px; }
/* On a phone five columns do not fit and the actions fell off the edge, so each row becomes
   a small card: the details stacked on the left, the buttons (icons only) on the right. */
@media (max-width: 520px) {
    .data-table thead { display: none; }
    .data-table, .data-table tbody { display: block; }
    .data-table tr {
        display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center;
        padding: 10px 12px; border-bottom: 1px solid var(--border);
    }
    .data-table tbody tr:last-child { border-bottom: none; }
    .data-table td { grid-column: 1; padding: 0; border: none; font-size: 13px; }
    .data-table td.col-label, .data-table td.col-country { color: var(--text-soft); }
    .data-table .row-actions { grid-column: 2; grid-row: 1 / span 4; }
    .row-actions .btn-text { display: none; }
}
.role-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.role-badge.admin { background: #fee2e2; color: #991b1b; }
.role-badge.operator { background: #dbeafe; color: #1e40af; }
.role-badge.guide { background: #dcfce7; color: #166534; }

/* Smaller popup for a short form, with a close button in the header. */
.modal.modal-sm { max-width: 460px; }
.modal-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header-row .mono { font-family: monospace; color: var(--blue); }
.modal-close {
    width: auto; margin: 0; padding: 4px 10px; background: none; color: var(--text-soft);
    font-size: 18px; line-height: 1; border-radius: 8px;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); box-shadow: none; transform: none; }
.modal-section { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.field-hint { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
/* A field shown for information only (an operator's fixed country, their own access level). */
.modal input:disabled { background: #f8fafc; color: var(--text-soft); cursor: not-allowed; }

/* Guide report: printed or saved as PDF on the Flying Carpet letterhead, every line ruled. */
.container.report { max-width: 1000px; }
.report-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.report-toolbar select, .report-toolbar input { width: auto; padding: 8px 10px; font-size: 14px; }
.report-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 2px solid var(--blue); padding-bottom: 10px; margin-bottom: 12px; }
.report-head h1 { font-size: 18px; color: var(--blue); }
.report-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.report-totals { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; margin-bottom: 12px; }
.report-totals .done strong { color: #166534; }
.report-totals .noshow strong { color: #991b1b; }
.report-table td { font-size: 13px; }
.report-table td.result { font-weight: 700; white-space: nowrap; }
.report-table tr.done td.result { color: #166534; }
.report-table tr.noshow td.result { color: #991b1b; }
.report-table tr.unmarked td.result { color: var(--text-muted); font-weight: 400; }
.report-foot { margin-top: 14px; font-size: 11px; color: var(--text-muted); text-align: center; }
@media print {
    @page { size: A4; margin: 12mm; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body { background: white; padding: 0; display: block; }
    .no-print, .app-version { display: none !important; }
    .container, .container.report { max-width: none; box-shadow: none; border-radius: 0; margin: 0; }
    .content { padding: 0; }
    .table-wrap { border: none; overflow: visible; }
    .report-table { font-size: 11px; }
    .report-table th, .report-table td { padding: 5px 6px; border-bottom: 1px solid #cbd5e1; font-size: 11px; }
    .report-table thead { display: table-header-group; }
    .report-table tr { break-inside: avoid; }
    .report-table tbody tr:hover { background: none; }
}
