:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #1c2733;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --phase-red: #dc2626;
  --phase-yellow: #d9a406;
  --phase-green: #16a34a;
  --phase-orange: #ea580c;
  --phase-blue: #2563eb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.hidden { display: none !important; }

/* ---------- top bar ---------- */
#topbar {
  background: #10233f;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.brand-icon { font-size: 20px; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#user-label { opacity: .85; font-size: 13px; margin-right: 4px; }
.brand > span:last-child { white-space: nowrap; }
@media (max-width: 560px) {
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  .brand { font-size: 15px; gap: 6px; }
  .topbar-right { flex-wrap: nowrap; gap: 6px; }
  #user-label, .hide-sm { display: none; }
  .topbar-right .btn { padding: 5px 9px; font-size: 12px; }
  #btn-change-pw { text-transform: capitalize; }
}

/* ---------- layout ---------- */
#view { max-width: 1080px; margin: 0 auto; padding: 24px 20px 80px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.sub { color: var(--muted); font-size: 13px; }

/* ---------- buttons & inputs ---------- */
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: #f1f5f9; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1e40af; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; font-size: 13px; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-danger { color: #b91c1c; border-color: #fecaca; margin-right: auto; }
.btn-danger:hover { background: #fef2f2; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
label.field { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.field > span { display: block; margin-bottom: 4px; font-weight: 600; color: var(--ink); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }

/* ---------- login ---------- */
.login-wrap { max-width: 380px; margin: 9vh auto 0; }
.login-logo { text-align: center; font-size: 40px; margin-bottom: 8px; }
.login-wrap h1 { text-align: center; margin-bottom: 2px; }
.login-wrap .sub { text-align: center; display: block; margin-bottom: 20px; }
.error-msg { color: #b91c1c; font-size: 13px; margin: 8px 0 0; min-height: 18px; }

/* ---------- phase groups ---------- */
.progress-summary { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 20px; }
.big-progress { flex: 1 1 260px; }
.progress-track { background: #e2e8f0; border-radius: 99px; height: 12px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.phase-section { margin-bottom: 26px; }
.phase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.phase-chip {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
}
.phase-meta { color: var(--muted); font-size: 13px; }
.flight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.flight-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flight-card:hover { border-color: var(--accent); }
.flight-card .fc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fc-code { font-weight: 700; font-size: 14px; }
.fc-title { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 2px; }
.status-badge { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.status-complete { background: #dcfce7; color: #15803d; }
.status-in_progress { background: #fef3c7; color: #b45309; }
.status-not_started { background: #f1f5f9; color: #64748b; }
.mini-track { background: #eef2f7; height: 5px; border-radius: 99px; overflow: hidden; }
.mini-fill { height: 100%; background: var(--ok); }

/* ---------- sheet detail ---------- */
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--accent); cursor: pointer; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.sheet-note { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px; border-radius: 8px; padding: 6px 12px; display: inline-block; margin: 4px 6px 4px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
@media (max-width: 720px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.items-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
@media (max-width: 720px) { .items-list { grid-template-columns: 1fr; } }
.item-group-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
  padding: 2px 2px 4px;
  border-bottom: 2px solid var(--line);
  color: var(--ink);
}
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-head h2 { flex: 1; }
.btn-mini {
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  white-space: nowrap;
}
.btn-mini:hover { background: #e0e7ff; }
.items-list > .item-group-header:first-child { margin-top: 0; }
.item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  font-size: 14px;
}
.item-row.done { background: #f0fdf4; border-color: #bbf7d0; }
.item-row input { width: 17px; height: 17px; margin-top: 1px; flex: none; accent-color: var(--ok); }
.item-row.readonly { cursor: default; }
.tick-mark { color: var(--ok); font-weight: 700; flex: none; width: 17px; text-align: center; }
.tick-mark.empty { color: #cbd5e1; }

.sheet-section { margin-top: 18px; }
.sheet-section h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.readonly-block { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; min-height: 20px; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
.kv > div > span { color: var(--muted); font-size: 12px; display: block; }
.save-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 16px 0 4px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- pre-flight brief ---------- */
.time-totals { display: flex; gap: 26px; font-size: 15px; font-weight: 700; margin-left: 18px; }
.time-totals .sub { display: block; font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.last-flight { margin-bottom: 14px; border-left: 4px solid #64748b; }
.last-flight-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.last-flight-facts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fact-chip { background: #f1f5f9; color: #334155; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 4px 12px; white-space: nowrap; }
.all-done-note { color: var(--ok); font-size: 13px; font-weight: 600; margin-top: 6px; }
.last-flight-notes {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  white-space: pre-wrap;
  margin-top: 8px;
}
.sheet-crumbs { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-switch { display: flex; align-items: center; gap: 6px; }
.sheet-switch select { width: auto; padding: 4px 8px; font-size: 13px; }
#next-flight-select { width: auto; max-width: 320px; padding: 7px 8px; font-size: 13px; }

/* ---------- next flight & carry-over ---------- */
.next-flight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  border-left: 4px solid var(--accent);
}
.next-flight-title { font-size: 15px; margin-top: 2px; }
.next-flight-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.carry-note { color: var(--warn); font-size: 13px; font-weight: 600; margin-top: 6px; }
.fc-outstanding { color: var(--warn); font-weight: 700; }
.attempt-chip {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border-radius: 99px;
  padding: 1px 7px;
  vertical-align: 1px;
}

.carry-section h2 { color: #b45309; border-bottom-color: #fde68a; }
.carry-block { margin-bottom: 14px; }
.carry-src { font-weight: 700; font-size: 13px; color: #92400e; margin: 8px 0 6px; }
.item-row.carry { background: #fffbeb; border-color: #fde68a; }
.item-row.carry.done { background: #f0fdf4; border-color: #bbf7d0; }
.item-group-header.carry { border-bottom-color: #fde68a; }
.carry-full { color: var(--warn); font-size: 12px; }

.attempt-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.attempt-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
}
.attempt-tab.active { background: #10233f; border-color: #10233f; color: #fff; font-weight: 600; }
.attempt-tab.plus { color: var(--accent); border-style: dashed; }
.attempt-tab:not(.active):hover { background: #f1f5f9; }

/* ---------- instructor ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=text] { flex: 1 1 240px; width: auto; }
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.student-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  cursor: pointer;
}
.student-card:hover { border-color: var(--accent); }
.student-card-name { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.student-card .progress-track { height: 8px; }
.student-card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 7px; }
table.students { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.students th, table.students td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.students th { background: #f8fafc; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.students tr.clickable { cursor: pointer; }
table.students tr.clickable:hover { background: #f1f5f9; }
.progress-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.progress-cell .progress-track { flex: 1; height: 8px; }

/* ---------- credit prior training ---------- */
.credit-flight {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  padding: 8px 12px;
}
.credit-flight-row { display: flex; align-items: center; gap: 10px; }
.credit-flight-row input.cf-check { width: 17px; height: 17px; flex: none; accent-color: var(--ok); cursor: pointer; }
.cf-code { font-weight: 700; flex: none; }
.cf-title { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-count { flex: none; }
.credit-items { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- admin overview ---------- */
.page-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-tab {
  border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 8px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.page-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
/* student tabs: one row, scrolls sideways on a narrow phone */
.student-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.student-tabs::-webkit-scrollbar { display: none; }
.student-tabs .page-tab { white-space: nowrap; flex: none; }
.my-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.my-details h3 { margin: 0 0 10px; font-size: 15px; }
.my-instructors div { margin-top: 2px; }
.logbook .log-row { display: grid; grid-template-columns: 96px 1fr; gap: 2px 12px; width: 100%; text-align: left; background: none; border: 0; border-left: 4px solid #cbd5e1; border-top: 1px solid var(--line); padding: 9px 10px; font: inherit; color: inherit; cursor: pointer; }
.logbook .log-row:hover { background: #f8fafc; }
.log-date { color: var(--muted); font-size: 13px; grid-row: span 2; }
.log-main { font-size: 14px; }
.log-meta { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) {
  .logbook .log-row { grid-template-columns: 1fr; }
  .log-date { grid-row: auto; }
  .student-head h1 { font-size: 22px; }
}
.page-tab:hover { color: var(--ink); }
.stage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stage-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-align: center; }
.stage-count { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stage-name { margin: 6px 0 4px; }
.stage-card .sub { font-size: 11px; }
.bar-chart-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; overflow-x: auto; }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; min-width: 720px; height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 12px; }
.bar-n { font-size: 10px; font-weight: 700; color: var(--muted); height: 14px; }
.bar { width: 100%; border-radius: 3px 3px 0 0; }
.bar-label { font-size: 8.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }

/* ---------- modal & toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 16px 16px; z-index: 50;
}
.modal { background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.3); max-height: 82vh; overflow-y: auto; }
.modal.modal-wide { max-width: 560px; }
.grid-2m { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .grid-2m { grid-template-columns: 1fr; } }
.student-details { margin-bottom: 14px; padding: 12px 18px; }
.student-details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); }
.student-details summary:hover { color: var(--accent); }
.modal h2 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #10233f; color: #fff; border-radius: 8px; padding: 10px 18px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* renter currency: last flight with us (90-day checkout) and SEP rating */
.renter-alert { background: #fffbeb; border-color: #fcd34d; }
.renter-alert h3 { font-size: 16px; }

/* Students › Renters */
.rt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rt-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; text-align: left; font: inherit; cursor: pointer; }
.rt-tile:hover { border-color: var(--accent, #3A7899); }
.rt-tile span { font-size: 12px; color: var(--muted); }
.rt-tile strong { font-size: 24px; }
.rt-tile small { font-size: 12px; color: var(--muted); }
.rt-tile.bad strong { color: #b91c1c; }
.rt-tile.warn strong { color: #b45309; }
.rt-tile.muted strong { color: #64748b; }
.rt-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.rt-toolbar input { width: 240px; max-width: 100%; padding: 8px 12px; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; }
.rt-n { opacity: .65; font-size: 11px; margin-left: 2px; }
.rt-wrap { overflow-x: auto; }
.rt-table td { vertical-align: top; }
.rt-sub { font-size: 12px; margin-top: 2px; }
.rt-table td.rt-bad { color: #b91c1c; font-weight: 600; }
.rt-table td.rt-warn { color: #b45309; font-weight: 600; }
.rt-flag { color: #b91c1c; font-weight: 700; }
.rt-chip { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; margin: 0 2px 2px 0; white-space: nowrap; }
.rt-bad { background: #fee2e2; color: #b91c1c; }
.rt-warn { background: #fef3c7; color: #92400e; }
.rt-info { background: #ede9fe; color: #6d28d9; }
.rt-muted { background: #f1f5f9; color: #64748b; }
.rt-ok { background: #dcfce7; color: #15803d; }
.rt-table td.rt-bad, .rt-table td.rt-warn { background: none; }

.renter-alert.renter-soon { background: #eff6ff; border-color: #bfdbfe; }
.sep-booked { margin: 8px 0 0; color: #15803d; font-size: 14px; }

/* students & renters: "Complete your details" on Home, and the empty fields it points to */
.details-missing, .student-ui .card.details-missing { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: #fff7ed; border-color: #fed7aa; }
.details-missing p { font-size: 14px; }
.field-missing { border-color: #fb923c !important; box-shadow: 0 0 0 3px rgba(251, 146, 60, .18) !important; background: #fffaf5 !important; }

/* renter details popup (Customers › Renters, Today's SEP renewals): room for the dates and the tools */
.modal.modal-renter { max-width: 640px; }
.renter-actions { justify-content: space-between; flex-wrap: wrap; row-gap: 10px; }
.renter-tools, .renter-save { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .renter-actions, .renter-save { width: 100%; } .renter-save { justify-content: flex-end; } }
.rt-pw { color: var(--muted); font-size: 11.5px; } .rt-pw:hover { color: var(--accent, #3A7899); }

/* renter record page (Customers › Renters › a renter) */
.rr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rr-alert { background: #fef2f2; border-color: #fecaca; color: #991b1b; font-size: 14px; margin-bottom: 12px; }
.rr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rr-grid > .card { margin: 0; }
@media (max-width: 820px) { .rr-grid { grid-template-columns: 1fr; } }
.rr-grid + .card, .rr-grid + section { margin-top: 14px; }
.card h3 .sub, .card h4 .sub { font-weight: 400; font-size: 13px; }
.rr-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 4px 0 10px; }
.rr-kv > div { display: flex; flex-direction: column; }
.rr-kv span { font-size: 12px; color: var(--muted); }
.rr-kv strong { font-size: 18px; margin: 2px 0 1px; }
.rr-kv small { font-size: 12px; color: var(--muted); }
.rr-bad { color: #b91c1c; } .rr-warn { color: #b45309; }
.rr-cur { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px 10px; align-items: end; }
.rr-cur .field { margin: 0; }
@media (max-width: 560px) { .rr-cur { grid-template-columns: 1fr; } }
.rr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 12px; }
.rr-stats > div { background: #f8fafc; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.rr-stats strong { font-size: 20px; font-variant-numeric: tabular-nums; } .rr-stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .rr-stats { grid-template-columns: 1fr 1fr; } }
.rr-sep-bar { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.rr-sep-bar i { display: block; height: 100%; background: var(--accent, #3A7899); border-radius: 999px; }
.rr-sep .sub { font-size: 12.5px; }
.rr-flights h4 { margin: 0 0 6px; font-size: 14px; }
.rr-bk { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.rr-bk-d { color: var(--muted); }
.rr-bk.cx { opacity: .6; } .rr-cx { font-size: 11px; font-weight: 700; color: #b91c1c; margin-left: 4px; }
.rr-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 22px; }
.rr-training { margin-top: 14px; }
.rr-training summary { cursor: pointer; font-size: 15px; }
.rr-training summary .sub { font-size: 13px; }
.rr-phases { display: grid; gap: 6px; margin-top: 12px; }
.rr-phase { display: grid; grid-template-columns: 260px 1fr 50px; gap: 10px; align-items: center; font-size: 13px; }
.rr-phase .progress-track { margin: 0; }
.rr-phase small { color: var(--muted); text-align: right; }
@media (max-width: 560px) { .rr-phase { grid-template-columns: 1fr 50px; } .rr-phase .progress-track { grid-column: 1 / -1; order: 3; } }
.rr-flown { font-size: 11px; font-weight: 700; color: #15803d; margin-left: 4px; }

/* trials: awaiting payment / pays on the day */
.sched-block.bk-awaiting { outline: 2px dashed #b7791f; outline-offset: -2px; }
.sb-pay { margin-left: 6px; font-size: 11px; font-weight: 600; color: #8a5a00; background: #fff3d6; border-radius: 4px; padding: 0 4px; }
.slot-btn.slot-notice { opacity: .45; cursor: not-allowed; }
.ob-pay { display: grid; gap: 8px; margin-top: 6px; }
.ob-pay .radio-row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; flex-wrap: wrap; }
.ob-guest-grid .ob-pay input[type=radio], .ob-guest-grid .checkbox-row input[type=checkbox] { width: 17px; height: 17px; padding: 0; flex: none; accent-color: var(--accent); }
.ob-guest-grid .ob-pay #og-voucherRef { width: auto; flex: 1 1 200px; padding: 7px 10px; font-size: 14px; }
.ob-guest-grid .ob-pay input:disabled { opacity: .5; }
.tp-panel { margin-bottom: 12px; border-left: 4px solid #b7791f; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tp-summary p { margin: 6px 0; }
.ml-st { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #eef1f4; }
.ml-sent { background: #e3f4e8; color: #1e6b36; } .ml-failed { background: #fde2e1; color: #9b1c1c; } .ml-preview { background: #eef1f4; color: #5b6573; }
.ml-settings { margin-top: 14px; }
@media (prefers-color-scheme: dark) { .sb-pay { background: #4a3a14; color: #ffd98a; } }
.tp-actions select { width: auto; padding: 4px 8px; font-size: 13px; }
.mx-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #fff3d6; border: 1px solid #f0d58a; }
@media (prefers-color-scheme: dark) { .mx-pay { background: #3a2f12; border-color: #6b5520; } }
