/*
 * components.css — shared UI pieces: brand, sidebar nav, buttons, badges, cards,
 * bars, notes, empty/lock states, tabs, chips, toast. Page-specific styles
 * (grid, stats, trip cards, export files) arrive with their pages.
 */

/* ---------- Brand ---------- */
.brand-logo { display: block; width: 100%; max-width: 200px; height: auto; margin-inline: auto; padding: 2px 6px 0; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px; }
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: var(--r-mark);
  background: linear-gradient(135deg, var(--primary), var(--primary-grad-end));
  color: var(--inverse);
  display: grid;
  place-items: center;
  box-shadow: var(--sh-md);
  flex: none;
}
.brand .mark svg { width: 20px; height: 20px; }
.brand h1 { font-size: 15px; margin: 0; font-weight: 700; letter-spacing: .2px; }
.brand span { font-size: 11px; color: var(--subtle); display: block; font-weight: 500; }

/* ---------- Sidebar nav ---------- */
.nav-sec { display: flex; flex-direction: column; gap: 2px; }
.nav-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--subtle);
  margin: 0 6px 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-lbl .hint { font-size: 9.5px; text-transform: none; letter-spacing: 0; color: var(--nav-hint); font-weight: 500; }
.nav-link {
  color: var(--nav-fg);
  text-align: start;
  text-decoration: none;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .12s, color .12s;
  width: 100%;
  min-width: 0;
}
.nav-link:hover { background: var(--nav-hover-bg); color: var(--inverse); }
.nav-link:focus-visible { outline: 2px solid var(--primary-grad-end); outline-offset: 1px; }
.nav-link.active { background: var(--primary); color: var(--inverse); }
.nav-link svg { width: 16px; height: 16px; opacity: .85; flex: none; }
.nav-link .nav-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link .av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--nav-avatar-bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--nav-avatar-fg);
  flex: none;
}
.nav-link.active .av { background: var(--nav-avatar-active-bg); color: var(--inverse); }
.nav-link .lock { margin-inline-start: auto; opacity: .6; }
.nav-empty { font-size: 12px; color: var(--nav-hint); padding: 2px 11px 6px; line-height: 1.45; }
.sidebar .foot { margin-top: auto; font-size: 11px; color: var(--subtle); padding: 6px; line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  padding: 8px 15px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .12s, box-shadow .12s, transform .04s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--inverse); box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); box-shadow: var(--sh-sm); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Badges & flags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.b-old { background: var(--old-bg); color: var(--old-fg); }
.b-new { background: var(--new-bg); color: var(--new-fg); }
.b-inhouse { background: var(--inhouse-bg); color: var(--inhouse-fg); }
.b-contractor { background: var(--contractor-bg); color: var(--contractor-fg); }
.b-pending { background: var(--surface-3); color: var(--text-2); }
.b-approved { background: var(--success-bg); color: var(--success); }
.b-warn { background: var(--warning-bg); color: var(--warning-strong); }
.flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--warning-strong);
  background: var(--warning-bg);
  padding: 2px 7px;
  border-radius: var(--r-sm);
  cursor: help;
}

/* ---------- Cards, bars, filters ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card-head { padding: 13px 18px; border-bottom: 1px solid var(--border-2); display: flex; align-items: center; gap: 12px; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.card-body { padding: 16px 18px; }
.master-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-bottom: 1px solid var(--border-2); }
.master-search input { flex: 1 1 260px; max-width: 380px; }

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}
.bar .count { font-size: 13px; color: var(--text-2); }
.bar .count b { color: var(--text); }

.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .2px; margin-inline-start: 2px; }

.note {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  margin-top: 12px;
  line-height: 1.55;
}

/* ---------- Empty, loading, lock / setup states ---------- */
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 10px; }

.loading { text-align: center; color: var(--muted); padding: 60px 20px; }
.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lock-wrap { max-width: 380px; margin: 60px auto; text-align: center; }
.lock-wrap-wide { max-width: 520px; }
.lock-wrap .ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.lock-wrap .ring-danger { background: var(--danger-bg); color: var(--danger); }
.lock-wrap h3 { margin: 0 0 6px; font-size: 18px; }
.lock-wrap p { color: var(--muted); margin: 0 0 18px; }
.lock-wrap input { text-align: center; letter-spacing: 3px; margin-bottom: 12px; width: 100%; }
.lock-wrap input.input-url { text-align: start; letter-spacing: 0; font-size: 13px; }
.lock-wrap .lock-hint { margin: 12px 0 0; font-size: 12px; }
.lock-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.form-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: 12.5px;
  margin: 0 0 12px;
  text-align: start;
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: var(--r-md); width: fit-content; margin-bottom: 18px; }
.tabs button { padding: 7px 16px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.tabs button.active { background: var(--surface); color: var(--navy); box-shadow: var(--sh-sm); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
}
.chip button { color: var(--muted); font-weight: 700; line-height: 1; font-size: 14px; }
.chip.excluded { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); text-decoration: line-through; }

/* ---------- Layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hint { color: var(--muted); font-size: 12px; }
.form-error.below { margin: 12px 0 0; }
.link-btn { color: var(--primary); font-weight: 700; font-size: inherit; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.warn-box {
  font-size: 12.5px;
  color: var(--warning-strong);
  background: var(--warning-bg);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  margin-top: 12px;
  line-height: 1.55;
}
.warn-box ul { margin: 0; padding-inline-start: 18px; }
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
}

/* ---------- Admin ---------- */
.admin-bar { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.drop {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
  transition: border-color .12s, background .12s;
}
.drop b { color: var(--text); }
.drop.over { border-color: var(--primary); background: var(--primary-subtle); }
.drop .hint { display: block; margin-top: 4px; }
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.file-pick b { color: var(--text); word-break: break-all; }

.kv { display: grid; grid-template-columns: 180px 1fr; gap: 12px 14px; align-items: center; }
.kv .k { font-weight: 600; color: var(--text-2); font-size: 13px; }
.kv .v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv input.short { width: 120px; }
.kv input[type=password] { width: 240px; max-width: 100%; }
@media (max-width: 600px) {
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv .v { margin-bottom: 10px; }
}

.taglist { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-subtle);
  color: var(--navy-3);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
}
.tag button { color: inherit; opacity: .5; font-weight: 700; font-size: 14px; line-height: 1; padding: 0; }
.tag button:hover, .tag button:focus-visible { opacity: 1; }

/* ---------- Trips by day ---------- */
.day-nav { display: flex; align-items: center; gap: 6px; }
.day-count { font-size: 12.5px; color: var(--muted); padding-top: 8px; display: inline-block; }
.note.note-lead { margin: 0 0 16px; }

.trip-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  background: var(--surface);
  margin-bottom: 14px;
  overflow: hidden;
}
.trip-card .th {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border-2);
  flex-wrap: wrap;
}
.trip-card .th .id { font-weight: 800; font-size: 13px; }
.trip-card .th .meta { color: var(--text-2); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.comp { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; padding: 14px 16px; align-items: end; }
.comp .f label { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.comp .f input { width: 100%; min-width: 0; text-align: end; }
.comp .f input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.comp .tot { text-align: end; padding-inline-start: 8px; }
.comp .tot .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.comp .tot .v { font-size: 20px; font-weight: 800; }
@media (max-width: 700px) {
  .comp { grid-template-columns: repeat(2, 1fr); }
  .comp .tot { grid-column: 1 / -1; }
}

.save-note {
  font-size: 12px;
  color: var(--warning-strong);
  background: var(--warning-bg);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  margin: 0 16px 14px;
}
.trip-card .sites { padding: 0 16px 14px; }
.trip-card .sites table { font-size: 13px; }
.trip-card .sites th { background: transparent; border: none; padding: 6px 10px; }
.trip-card .sites td { border-bottom: 1px dashed var(--border-2); padding: 7px 10px; }
.trip-card .split-cost { font-weight: 700; border-radius: var(--r-sm); padding: 1px 5px; }
.trip-card .split-cost.dirty { box-shadow: 0 0 0 2px var(--primary); }
.trip-card .rm-cell { text-align: end; }
.trip-card .is-busy { opacity: .6; }
.rm-site { color: var(--danger); font-weight: 700; font-size: 16px; line-height: 1; padding: 0 7px; }
.rm-site:disabled { opacity: .3; }
.site-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.site-actions input { max-width: 150px; }
.site-actions .hint { font-size: 11.5px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 90;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 22px 22px 18px;
  width: min(440px, 100%);
}
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal p { margin: 0 0 18px; color: var(--text-2); line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 4px 2px; }
.modal textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  resize: vertical;
  margin-bottom: 14px;
}
.modal textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.modal .form-error { margin-top: -6px; }

/* ---------- PM approvals ---------- */
.filters .push-end { align-self: flex-end; }
.row-actions { white-space: nowrap; text-align: end; }
.row-actions .btn + .btn { margin-inline-start: 6px; }

/* ---------- PM dashboard ---------- */
.filters .field[hidden] { display: none; }
.filters .dash-counts { align-self: flex-end; padding-bottom: 9px; }
.dash-body { transition: opacity .12s; }
.dash-body.is-busy { opacity: .55; pointer-events: none; }
.dash-mismatch { margin: -4px 0 16px; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 17px;
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}
.stat .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat .v { font-size: 23px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-inline-start: 3px; letter-spacing: 0; }
.stat .accent { position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; }
.stat-total .accent { background: var(--primary); }
.stat-labor .accent { background: var(--accent-labor); }
.stat-truck .accent { background: var(--accent-truck); }
.stat-hotel .accent { background: var(--accent-hotel); }
.stat-park .accent { background: var(--accent-park); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.split-row:last-of-type { border-bottom: none; }
.split-row .name { width: 150px; flex: none; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-row .name.unclassified { color: var(--muted); font-style: italic; }
.split-row .track { flex: 1; height: 9px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.split-row .fill { height: 100%; border-radius: var(--r-pill); }
.split-row .amt { width: 92px; flex: none; text-align: end; font-weight: 700; font-size: 13px; }

/* ---------- PM export ---------- */
.field-label { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .2px; margin: 2px 0 7px 2px; }
.export-hint { display: block; margin-top: 8px; }
.chip-count { color: var(--muted); font-size: 11px; font-weight: 600; }
.chip.excluded .chip-count { color: inherit; }
.chip button:disabled { opacity: .4; cursor: default; }
.btn svg { flex: none; }
.btn.is-spinning svg { animation: spin .8s linear infinite; }

.export-body { margin-top: 16px; transition: opacity .12s; }
.export-body.is-busy { opacity: .55; pointer-events: none; }
.export-body .note, .export-body .warn-box { margin: 0; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 13px; }
.file {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.file.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.file.is-empty { opacity: .6; }
.file .xl { display: flex; align-items: center; gap: 10px; }
.file .ic {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--success-bg);
  color: var(--success);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex: none;
}
.file .fname { font-weight: 700; font-size: 12.5px; word-break: break-all; line-height: 1.35; }
.file .meta { font-size: 11.5px; color: var(--muted); }
.file-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.export-done {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.export-done svg { flex: none; margin-top: 1px; }
.export-done h3 { margin: 0 0 4px; font-size: 14px; }
.export-done p { margin: 0; color: var(--text-2); line-height: 1.5; }
.export-preview .cost-cell { text-align: end; white-space: nowrap; }
.export-preview .file-total td { font-weight: 800; color: var(--text); }

/* ---------- Phone navigation strip (the sidebar is hidden under 900px) ---------- */
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .mobile-nav:not(.hidden) {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px;
    background: var(--navy);
  }
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px 12px; }
  .content { padding: 16px 12px; }
}
@media (max-width: 600px) {
  #userName { display: none; }
}
.mnav-link {
  flex: none;
  color: var(--nav-fg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.mnav-link.active { background: var(--primary); color: var(--inverse); }

/* ---------- Void (Trips by day, My trips) ---------- */
.trip-card.is-voided .th { background: var(--surface-2); }
.trip-card.is-voided .th .id,
.trip-card.is-voided .th .meta { text-decoration: line-through; color: var(--muted); }
.trip-card.is-voided .comp,
.trip-card.is-voided .sites,
.trip-card.is-voided .my-trip-body { opacity: .55; }
.void-note {
  font-size: 12.5px;
  color: var(--warning-strong);
  background: var(--warning-bg);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-2);
}

/* ---------- New trip (mobile-first) ---------- */
.entry-form { max-width: 620px; }
.ef-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ef-grid .field input, .ef-grid .field select { width: 100%; min-width: 0; }
.ef-section { margin-bottom: 14px; }
.ef-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.site-list { display: flex; flex-direction: column; gap: 8px; }
.site-row { display: flex; align-items: center; gap: 8px; }
.site-row .site-input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; font-weight: 700; }
.site-row .site-status { flex: none; min-width: 0; }
.ef-costs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ef-costs input { width: 100%; min-width: 0; text-align: end; }
.ef-costs input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.ef-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  background: var(--primary-subtle);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}
.ef-total span { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; margin-inline-end: auto; }
.ef-total b { font-size: 22px; font-weight: 800; }
.ef-total small { color: var(--muted); font-weight: 600; }
.ef-split table { font-size: 13px; }
.ef-split td { padding: 6px 10px; border-bottom: 1px dashed var(--border-2); }
.ef-split .ef-amount { text-align: end; font-weight: 700; }
.ef-save { margin-top: 16px; padding: 12px 15px; font-size: 15px; }
.ef-center { justify-content: center; }
@media (max-width: 600px) {
  .ef-grid { grid-template-columns: 1fr; }
  .ef-costs { grid-template-columns: 1fr 1fr; }
  .entry-form input, .entry-form select { font-size: 16px; padding: 10px 12px; } /* 16px: no zoom-on-focus on iPhone */
  .site-row .rm-site { padding: 6px 10px; font-size: 20px; }
}

/* ---------- My trips ---------- */
.mytrips-count { margin: 0 0 10px 2px; }
.my-trip-body .kv { grid-template-columns: 90px 1fr; gap: 8px 12px; }
.my-trip-costs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-2);
  font-size: 13px;
}
.my-trip-costs .k { color: var(--muted); font-weight: 600; font-size: 11.5px; margin-inline-end: 6px; }
.my-trip-costs .tot { margin-inline-start: auto; }
.my-trip-costs .tot b { font-size: 16px; }

/* ---------- Admin: coordinators & users ---------- */
.check-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; cursor: pointer; }
.check-label.quiet { font-weight: 500; color: var(--text-2); }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.admin-table input[type=text] { min-width: 150px; width: 100%; }
.admin-table input.short { width: 80px; min-width: 0; }
.admin-table select { min-width: 200px; max-width: 320px; }
.admin-table .role-cell .badge + .badge { margin-inline-start: 4px; }
.row-inactive td { color: var(--muted); }
.kv input.wide { width: 320px; max-width: 100%; }
.user-edit-row td { background: var(--surface-2); }
.users-notice { margin-top: 0; }
.user-edit { padding: 6px 2px; }
.user-edit .actions { margin-top: 12px; }
.user-edit .inline-form { padding-top: 12px; border-top: 1px dashed var(--border); }

/* ---------- New-version prompt (updates.js) ---------- */
.update-bar {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: calc(100vw - 40px);
  padding: 10px 12px 10px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--primary);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Toast ---------- */
.toast.toast-error { background: var(--danger); }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: var(--inverse);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transition: transform .25s, opacity .25s;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast .ok { color: var(--toast-ok); }
