/* Organiser panel. Built for someone who does not enjoy computers, holding a
   phone, in a dim hall, in a hurry. Big targets, plain words, no surprises. */

body { background-attachment: scroll; }
body::before { display: none; }

.wrap--admin {
  width: min(760px, 100% - 20px);
  padding-top: 16px;
  padding-bottom: 90px;
}

/* Same single spacing rule as the public page: one gap between stacked
   blocks, and nothing sets its own margin. This replaces the mix of
   margin-bottom on panels plus margins on the bits inside them, which was
   giving uneven gaps between boxes. */
.wrap--admin > * + * { margin-top: var(--stack); }

/* Kill trailing margins that doubled up with card padding. */
.step > *:last-child,
.panel > *:last-child,
.list > *:last-child,
.field:last-child,
.item:last-child { margin-bottom: 0; }

.step > h2:first-child,
.step > .step__summary:first-child { margin-top: 0; }

.gate { max-width: 420px; margin: 10vh auto !important; }
.gate h2 { font-family: var(--font-display); margin: 0 0 6px; color: #fff; font-size: 1.5rem; }

.muted { color: #a9c9ea; font-size: 0.92rem; line-height: 1.55; }
.muted a { color: var(--ice); }

/* ------------------------------------------------------------------ topbar */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  color: #fff;
}

.topbar__right { display: flex; gap: 8px; flex-wrap: wrap; }

.btn--sm { padding: 10px 14px; font-size: 0.88rem; min-height: 42px; }

/* Everything important is thumb-sized. */
.btn--big {
  width: 100%;
  padding: 18px 22px;
  font-size: 1.15rem;
  min-height: 60px;
  border-radius: 16px;
}

.btn--danger { background: #e0325c; color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.row .btn { flex: 1 1 180px; }

/* -------------------------------------------------------------------- help */

.help summary {
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--ice-bright);
  padding: 4px 0;
}

.help__list { margin: 14px 0 10px; padding-left: 24px; line-height: 1.75; }
.help__list li { margin-bottom: 10px; }
.help__list b { color: #fff; }

/* -------------------------------------------------------------- big switch */

.bigswitch { text-align: center; padding: 22px 20px; }

.bigswitch__state {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 7vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 4px;
}

.bigswitch.is-open { border-color: rgba(88, 232, 176, .55); background: linear-gradient(160deg, rgba(88,232,176,.16), rgba(255,255,255,.06)); }
.bigswitch.is-open .bigswitch__state { color: var(--good); }
.bigswitch.is-shut { border-color: rgba(224, 50, 92, .55); background: linear-gradient(160deg, rgba(224,50,92,.18), rgba(255,255,255,.06)); }
.bigswitch.is-shut .bigswitch__state { color: #ff9ab4; }
.bigswitch .btn { margin-top: 12px; }
.bigswitch .muted { margin: 10px 0 0; }

/* ------------------------------------------------------------------- steps */

.step { margin-bottom: 0; }

.step > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 6px;
  color: #fff;
}

.step__n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ice);
  color: #06284d;
  font-size: 1.05rem;
  font-weight: 800;
}

.step__summary {
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--ice-bright);
  padding: 4px 0;
  line-height: 1.5;
}

.step__summary b { color: #fff; }

.subhead {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ice);
  margin: 20px 0 8px;
}

.footnote { text-align: center; font-size: 0.85rem; }

/* ------------------------------------------------------------------ fields */

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--frost);
}

.field input[type='text'],
.field input[type='password'],
.field input[type='number'],
.field input[type='datetime-local'],
.field textarea {
  width: 100%;
  padding: 15px 15px;
  border: 1px solid var(--edge);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.08rem;
}

.field small { display: block; margin-top: 7px; font-size: 0.85rem; color: #92b4d8; line-height: 1.5; }

.moneyrow { display: flex; align-items: center; gap: 10px; }
.moneyrow span { font-size: 1.6rem; font-weight: 800; color: var(--gold); }
.moneyrow input { font-size: 1.4rem !important; font-weight: 800; }

/* Big obvious tick boxes */
.tickbox {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--edge);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  margin-bottom: 14px;
}

.tickbox input { width: 28px; height: 28px; flex: 0 0 auto; accent-color: var(--good); }
.tickbox span { font-size: 1rem; font-weight: 700; }

/* ------------------------------------------------------------------- lists */

.list { margin: 8px 0 0; }

.item {
  padding: 14px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
}

.item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.item__name { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: #fff; }
.item__sub { font-size: 0.9rem; color: #a9c9ea; margin-top: 3px; }
.item__amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--gold);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.item__actions .btn { flex: 1 1 140px; }
.item.is-voided { opacity: .5; }
.item.is-voided .item__amount { text-decoration: line-through; }
.item.is-paid { border-color: rgba(88,232,176,.5); background: rgba(88,232,176,.1); }

.contactline {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 20, 46, .5);
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.empty-note { padding: 18px 4px; color: #a9c9ea; }

/* Lot editing panel, opened on demand and never rebuilt underneath you. */
.editpanel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--edge);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.chips button {
  padding: 11px 15px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.08);
  color: #eaf8ff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.chips button:hover { background: var(--ice); color: #06284d; }

/* ---------------------------------------------------------------- flashes */

#flashes {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 95;
  width: min(460px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.flash {
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--good);
  color: #04301f;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  box-shadow: var(--shadow);
  animation: flashIn .3s ease-out;
}

.flash.bad { background: #e0325c; color: #fff; }

@keyframes flashIn {
  from { transform: translateY(14px); opacity: 0; }
}

/* Paused-while-editing badge */
.pausenote { color: var(--gold); font-weight: 700; }
