/* Invitation site on top of the shared Cluster theme (style.css, same file as the quiz / matching). */

/* inputs the shared sheet doesn't cover */
input[type="email"], input[type="tel"], input[type="number"], input[type="search"], textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%; padding: 0 16px; font: 500 16px var(--font); color: var(--text);
  background: var(--bg-deep); border: 1px solid var(--line-strong); border-radius: var(--r); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="email"], input[type="tel"], input[type="number"], input[type="search"] { height: 50px; }
textarea { padding: 12px 16px; line-height: 1.5; resize: vertical; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14); }
textarea::placeholder { color: var(--text-3); }
input[type="file"] { display: none; }

/* app shell */
.wrapx { max-width: 1120px; margin: 0 auto; padding: 22px 20px 70px; }
.appbar .me-chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-deep); border: 1px solid var(--line-strong); border-radius: var(--r); overflow-x: auto; }
.tabs button, .tabs a {
  height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2);
  font: 500 15px var(--font); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none;
}
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 var(--highlight) inset; }
.tabs .n { font-family: var(--num); font-weight: 700; margin-inline-start: 6px; color: var(--accent); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card + .card, .card + .grid2, .grid2 + .card { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 14px; line-height: 1.5;
  color: var(--text); background: rgba(var(--gold-rgb), 0.08); border: 1px solid rgba(var(--gold-rgb), 0.35); white-space: pre-line;
}
.notice.good { background: rgba(var(--good-rgb), 0.08); border-color: rgba(var(--good-rgb), 0.35); }
.notice.bad { background: rgba(var(--bad-rgb), 0.1); border-color: rgba(var(--bad-rgb), 0.4); }
.notice:empty { display: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row .grow { flex: 1 1 220px; }
.form-grid { display: grid; gap: 16px; text-align: start; margin-top: 18px; }
.form-grid .modal-actions { margin-top: 6px; }

/* status pills */
.st { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--text-2); }
.st.yes { color: var(--good); border-color: rgba(var(--good-rgb), 0.45); background: rgba(var(--good-rgb), 0.08); }
.st.no { color: var(--bad); border-color: rgba(var(--bad-rgb), 0.45); background: rgba(var(--bad-rgb), 0.08); }
.st.pending { color: var(--gold); border-color: rgba(var(--gold-rgb), 0.45); background: rgba(var(--gold-rgb), 0.08); }
.st.in { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.st svg { width: 12px; height: 12px; }

/* people: search + filter tiles + rows */
.search-big { position: relative; }
.search-big input { height: 58px; font-size: 19px; padding-inline-start: 50px; }
.search-big .icon { position: absolute; inset-inline-start: 16px; top: 19px; color: var(--text-3); }
.tiles.filters .tile { cursor: pointer; text-align: start; font: inherit; color: inherit; transition: border-color 0.15s, background 0.15s; }
.tiles.filters .tile:hover { border-color: var(--line-strong); }
.tiles.filters .tile[aria-pressed="true"] { border-color: rgba(var(--accent-rgb), 0.6); background: var(--surface-2); }
.tile.good .v { color: var(--good); } .tile.bad .v { color: var(--bad); } .tile.gold .v { color: var(--gold); } .tile.acc .v { color: var(--accent); }
.plist { list-style: none; margin: 0; padding: 0; }
.prow {
  display: grid; grid-template-columns: 24px 54px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: var(--r-sm);
}
.prow:hover, .prow:focus-visible { background: rgba(255, 255, 255, 0.03); outline: none; }
.prow .serial { font-family: var(--num); font-size: 26px; font-weight: 700; color: var(--accent); text-align: center; }
.prow .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .who small { color: var(--text-3); font-size: 13px; }
.prow .side { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.prow .mails { font-size: 12px; color: var(--text-3); }
.list-foot { padding: 12px 8px 2px; color: var(--text-3); font-size: 14px; }

/* person card (modal) */
.modal-wide { width: min(560px, 100%); text-align: start; }
.pcard-head { display: flex; align-items: center; gap: 16px; }
.pcard-head .bigcode { font-family: var(--num); font-size: 56px; font-weight: 700; color: var(--accent); line-height: 1; text-align: center; min-width: 76px; }
.pcard-head .bigcode small { display: block; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text-3); }
.pcard-head .name { font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pcard .checkin { width: 100%; margin-top: 18px; }
.pcard dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 18px 0 0; font-size: 14px; }
.pcard dt { color: var(--text-3); }
.pcard dd { margin: 0; overflow-wrap: anywhere; }
.pcard .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.pcard .acts .btn { flex: 1 1 auto; }

/* emails */
.camp { padding: 20px 22px; }
.camp + .camp { margin-top: 14px; }
.camp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.camp-head .count { font-family: var(--num); font-size: 34px; font-weight: 700; line-height: 1; color: var(--accent); text-align: center; }
.camp-head .count small { display: block; font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--text-3); }
.camp .names { margin-top: 12px; font-size: 13px; color: var(--text-3); max-height: 96px; overflow: auto; line-height: 1.6; }
.camp .row { margin-top: 14px; }
.camp .row input { height: 40px; font-size: 15px; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; margin: 12px 0; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s var(--ease); }
.joblog { font-size: 13px; max-height: 180px; overflow: auto; padding: 10px 12px; background: var(--bg-deep); border-radius: var(--r); white-space: pre-wrap; color: var(--text-2); }
iframe.preview { width: 100%; height: 560px; border: 0; border-radius: var(--r); background: #f3f4f6; }
.sender { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* dashboard */
.dash-big { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-big .tile .v { font-size: 48px; }
.bigbar { height: 14px; border-radius: 14px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.bigbar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--good)); transition: width 0.6s var(--ease); }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th { text-align: start; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ptable td.num { font-family: var(--num); font-size: 18px; font-weight: 700; }
.recent { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.recent span { color: var(--text-3); }

/* toast: same shape as the shared one, colour by kind */
.toast { border-color: rgba(var(--good-rgb), 0.5); }
.toast[data-kind="err"] { border-color: rgba(var(--bad-rgb), 0.6); }

@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .dash-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-big .tile .v { font-size: 36px; }
}
@media (max-width: 640px) {
  .wrapx { padding: 16px 14px 60px; }
  .prow { grid-template-columns: 24px 44px minmax(0, 1fr); }
  .prow .side { grid-column: 1 / -1; justify-content: flex-start; }
  .pcard dl { grid-template-columns: 90px minmax(0, 1fr); }
  .hide-narrow { display: none !important; }
}

/* "other" chip with its own text box (registration form) */
.toggle-chip.other input[type="text"] {
  position: static; opacity: 1; pointer-events: auto; height: 30px; width: 150px; padding: 0 10px; font-size: 14px;
  border-radius: 999px; background: var(--bg-deep);
}

.modal:focus { outline: none; }
.search-row { flex-wrap: nowrap; }
.search-row .btn { flex: none; }
@media (max-width: 640px) { .search-row .btn.lg { min-height: 58px; padding: 0 18px; } }
a.btn { text-decoration: none; }
a:not(.btn) { color: var(--accent); }

/* picking people to email */
.pick {
  -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 0; cursor: pointer;
  border: 1.5px solid var(--text-3); border-radius: 6px; background: var(--bg-deep); display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.pick:checked { background: var(--accent); border-color: var(--accent); }
.pick:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-all { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; padding: 0 8px 10px; }
.prow.picked { background: rgba(var(--accent-rgb), 0.07); }
.selbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px max(20px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(7, 26, 34, 0.92); border-top: 1px solid var(--line-strong);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); animation: rise 0.2s var(--ease) both;
}
.selbar .selcount { font-size: 15px; }
.selbar .selcount b { font-family: var(--num); font-size: 22px; color: var(--accent); margin-inline-end: 4px; }
body:has(.selbar:not([hidden])) .wrapx { padding-bottom: 110px; }
.list-tools { align-items: flex-end; }
