/* Registration page — builds on the tokens and components in styles.css */

body.page-scroll { overflow: auto; }
body.page-scroll .topbar { position: sticky; top: 0; }
a.brand { color: inherit; text-decoration: none; }
body.page-scroll .topbar-actions { margin-left: auto; }

.reg { max-width: 880px; margin: 0 auto; padding: 32px 20px 64px; }

.reg-hero { margin-bottom: 24px; }
.reg-hero h1 { margin: 6px 0 10px; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
.reg-hero p { margin: 0; color: var(--muted); max-width: 640px; font-size: 15px; }

.reg-progress {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: flex; gap: 6px; counter-reset: step;
}
.reg-progress li {
  flex: 1; counter-increment: step;
  font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em;
  padding-top: 8px; border-top: 3px solid var(--line-2);
}
.reg-progress li::before { content: counter(step) " · "; color: var(--accent); font-weight: 600; }
.reg-progress li.is-done { border-top-color: var(--accent); color: var(--text); }

.notice {
  margin-bottom: 18px; padding: 12px 16px; border-radius: var(--radius); font-size: 13px;
}
.notice b { display: block; margin-bottom: 2px; }
.notice-warn { border: 1px dashed rgba(242,180,67,.5); background: rgba(242,180,67,.07); color: var(--warn); }
.notice-info { border: 1px solid rgba(47,211,166,.4); background: var(--accent-soft); color: var(--text); }

.reg-form { display: grid; gap: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.panel {
  margin: 0; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px 22px;
  display: grid; gap: 16px;
}
.panel legend {
  float: left; width: 100%; padding: 0; margin: 0 0 2px;
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600;
}
.panel legend + * { clear: both; }
.step-n {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.span-2 { grid-column: 1 / -1; }

.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.label { font-size: 12.5px; font-weight: 500; color: var(--text); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.req { color: var(--accent); font-style: normal; }
.hint { margin: 0; font-size: 12.5px; color: var(--faint); }

.field input[type="text"], .field input[type="tel"], .field input[type="email"],
.field input[type="number"], .field input[type="time"], .field select, .field textarea {
  width: 100%; min-width: 0;
  height: 40px; padding: 0 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%238a99aa' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus, .tt input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.7); }
input[type="number"] { -moz-appearance: textfield; }

.err { font-size: 12px; color: var(--danger); min-height: 0; }
.err:empty { display: none; }

/* Submitter toggle */
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle-opt { position: relative; cursor: pointer; }
.toggle-opt input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-opt span {
  display: grid; gap: 2px; height: 100%;
  padding: 12px 14px 12px 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg);
  transition: border-color .15s, background .15s;
}
.toggle-opt span::before {
  content: ""; position: absolute; left: 14px; top: 15px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--bg);
}
.toggle-opt small { color: var(--muted); font-size: 12px; }
.toggle-opt input:checked + span { border-color: rgba(47,211,166,.55); background: var(--accent-soft); }
.toggle-opt input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); }
.toggle-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Checkbox chips */
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: 13px; color: var(--muted); transition: all .15s;
}
.checks.compact .check-chip span { height: 32px; padding: 0 12px; font-size: 12.5px; }
.check-chip small { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.check-chip input:checked + span { border-color: rgba(47,211,166,.55); background: var(--accent-soft); color: var(--accent); }
.check-chip input:checked + span small { color: var(--accent); }
.check-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.check-chip input:checked + span::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* Location picker */
.pick-map {
  height: 320px; border-radius: 10px; border: 1px solid var(--line);
  overflow: hidden; background: #0d1218; cursor: crosshair;
}
.pick-map .leaflet-container { cursor: crosshair; }
.pick-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.pick-meta .mono.is-set { color: var(--accent); }
.field.has-error .pick-map { border-color: var(--danger); }

/* Photos */
.drop {
  position: relative; display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 28px 20px; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed var(--line-2); background: var(--bg); color: var(--muted);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: rgba(47,211,166,.04); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 4px; }
.drop b { color: var(--text); font-size: 14px; }
.drop span { font-size: 12.5px; max-width: 460px; }
.drop.is-full { display: none; }
.drop.has-error { border-color: var(--danger); }

.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumbs:empty { display: none; }
.thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  font-size: 11px; color: #d6dee6; font-family: var(--mono);
}
.thumb-x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 7px;
  border: 0; background: rgba(10,14,19,.85); color: var(--text); font-size: 16px; line-height: 1;
}
.thumb-x:hover { background: var(--danger); }
.thumb.is-busy { display: grid; place-items: center; color: var(--muted); font-size: 12px; }

/* Timetable */
.tt-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.tt { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tt-row {
  display: grid; grid-template-columns: 110px 1fr auto auto; gap: 12px; align-items: center;
  padding: 9px 14px; border-top: 1px solid var(--line); background: var(--bg);
}
.tt-row:first-child { border-top: 0; }
.tt-day { font-weight: 500; font-size: 13.5px; }
.tt-times { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.tt-times input {
  width: 116px; height: 34px; padding: 0 8px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.tt-times input:disabled { opacity: .35; }
.tt-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tt-flag input { accent-color: var(--accent); width: 15px; height: 15px; }
.tt-row.is-closed .tt-day { color: var(--faint); }
.tt-row.has-error { box-shadow: inset 3px 0 0 var(--danger); }
.tt-summary { font-size: 12.5px; color: var(--muted); }

/* Submit */
.submit-panel { gap: 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.consent input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 1px; flex: none; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.submit-row .hint { flex: 1; min-width: 200px; }
#form-status.is-error { color: var(--danger); }

/* Done */
.done { text-align: center; justify-items: center; padding: 40px 24px; gap: 12px; }
.done h2 { margin: 4px 0 0; font-size: 22px; }
.done p { margin: 0; color: var(--muted); max-width: 480px; }
.done-icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 8px var(--accent-soft);
}
.done-icon svg { width: 28px; height: 28px; }
.ref { font-size: 13px; color: var(--muted); padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.ref .mono { color: var(--accent); font-size: 14px; margin-left: 6px; }
.done-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

@media (max-width: 760px) {
  .reg { padding: 22px 16px 48px; }
  .reg-hero h1 { font-size: 23px; }
  .reg-progress li { font-size: 0; }
  .reg-progress li::before { font-size: 11px; content: counter(step); }
  .panel { padding: 16px; border-radius: 12px; }
  .grid-2, .grid-3, .toggle { grid-template-columns: 1fr; }
  .pick-map { height: 260px; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .tt-row { grid-template-columns: 1fr auto auto; gap: 8px 12px; padding: 10px 12px; }
  .tt-times { grid-column: 1 / -1; grid-row: 2; }
  .tt-times input { flex: 1; width: auto; }
  .submit-row .btn-lg { width: 100%; }
  .topbar-actions .btn { padding: 0 10px; }
}
