/* ---------------------------------------------------------------
   Admin pages -- used from a phone or laptop, never on the screen,
   so unlike the board they are sized in ordinary rem units.
   --------------------------------------------------------------- */

:root {
  --bg: #0b0e13;
  --panel: #131821;
  --line: #262f3d;
  --text: #e9edf3;
  --muted: #94a0b2;
  --accent: #4f8ef7;
  --good: #35d07f;
  --bad: #ff7a6b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  padding: 1rem;
}

a { color: var(--accent); }
h1 { font-size: 1.4rem; font-weight: 600; }
h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.9rem; }
h3 { font-size: 0.95rem; font-weight: 600; margin: 1.1rem 0 0.5rem; }

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  max-width: 60rem;
  margin: 0 auto 1rem;
}
.page-head .who { font-size: 0.9rem; color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline; }

.wrap { max-width: 60rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.narrow { max-width: 24rem; margin: 3rem auto; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1.1rem 1.2rem 1.2rem;
}

.field { margin-top: 1rem; }
.field > label, .label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.35rem; }

.hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.hint.good { color: var(--good); }
.hint.bad { color: var(--bad); }

.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1 1 12rem; min-width: 0; }

input[type="text"], input[type="search"], input[type="number"], input[type="password"],
input[type="url"], select, textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
input[type="number"] { max-width: 7rem; }
textarea { font-family: Consolas, "Courier New", monospace; font-size: 0.85rem; min-height: 14rem; resize: vertical; }
input[readonly] { color: var(--muted); }

button, .button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button.quiet, .button.quiet {
  background: none;
  color: var(--accent);
  border: 1px solid var(--line);
  font-weight: 400;
}
button.danger { background: none; color: var(--bad); border: 1px solid var(--line); font-weight: 400; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }
button:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.9rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--accent); }

input[type="color"] {
  width: 2.6rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: none;
  cursor: pointer;
  flex: none;
}

/* ------------------------------ households ------------------------------ */

.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.tabs button { background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 400; }
.tabs button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }

.calendar {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.7rem;
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.results { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; }
.results button { background: var(--bg); color: var(--text); border: 1px solid var(--line); font-weight: 400; text-align: left; }
.results button:hover { border-color: var(--accent); }

.list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}
.list .meta { font-size: 0.85rem; color: var(--muted); }

.copy-out {
  margin-top: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px dashed var(--accent);
  border-radius: 0.4rem;
  word-break: break-all;
  font-size: 0.9rem;
}

/* ------------------------------ background pictures ------------------------------ */

input[type="range"] { width: 100%; accent-color: var(--accent); }
.field output { color: var(--text); margin-left: 0.4rem; }
.steps { margin: 0.6rem 0 0.7rem 1.3rem; }
.steps b { color: var(--text); font-weight: 600; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.7rem;
  margin: 0.9rem 0;
}
.thumbs:empty { display: none; }
.thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
  background: var(--bg) center / cover no-repeat;
  overflow: hidden;
}
.thumb button {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  background: rgba(0, 0, 0, 0.7);
}

.upload { position: relative; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload span {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 0.4rem;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
.upload input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------ save ------------------------------ */

.savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  background: linear-gradient(transparent, var(--bg) 35%);
}
.savebar button { padding: 0.65rem 1.8rem; }
.savebar .hint { margin: 0; }

.credits { font-size: 0.8rem; color: var(--muted); padding-bottom: 1rem; }
