/* The back office. Same palette as the site so it does not feel like a
   different product, but plainer — this is a working tool, not a shopfront. */

:root {
  --bg: #0c0c0c;
  --panel: #151515;
  --panel-2: #1c1c1c;
  --text: #f5f3ee;
  --soft: rgba(245, 243, 238, 0.72);
  --muted: #8c8c88;
  --accent: #b89b5e;
  --line: rgba(245, 243, 238, 0.13);
  --line-strong: rgba(245, 243, 238, 0.28);
  --danger: #e8817f;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }

.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.brand { font-weight: 700; letter-spacing: 0.01em; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); }
.bar__nav { display: flex; align-items: center; gap: 14px; }
.bar__nav a { font-size: 14px; }

main { padding: clamp(16px, 4vw, 32px); max-width: 940px; margin-inline: auto; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.filters { display: flex; gap: 8px; }
.chip {
  padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; text-decoration: none; color: var(--soft);
}
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.stats { margin: 0; color: var(--muted); font-size: 14px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: clamp(20px, 4vw, 32px);
}
.empty h1 { font-size: 22px; margin-bottom: 10px; }
.empty p { color: var(--soft); max-width: 58ch; }
.empty code { background: var(--panel-2); padding: 2px 6px; border-radius: 3px; font-size: 14px; }

/* --- an enquiry --- */
.enq {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 20px; margin-bottom: 14px;
}
.enq.is-handled { border-left-color: var(--line-strong); opacity: 0.62; }
.enq__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
}
.enq h2 { font-size: 20px; }
.enq__meta {
  margin: 5px 0 0; font-size: 13.5px; color: var(--muted);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.tag {
  border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 2px 8px; font-size: 11.5px; color: var(--soft);
}
.tag--done { border-color: var(--accent); color: var(--accent); }

.enq__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.enq__actions form { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 15px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 4px;
  color: var(--text); font: inherit; font-size: 14px; text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--text); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.btn--primary:hover { background: #c9ad74; }
.btn--quiet { color: var(--muted); }
.btn--quiet:hover { color: var(--danger); border-color: var(--danger); }

.enq__fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 22px; margin: 18px 0 0;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.enq__fields > div { min-width: 0; }
.enq__fields dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
.enq__fields dd { margin: 3px 0 0; font-size: 15px; overflow-wrap: anywhere; }

.enq__message {
  margin: 16px 0 0; padding: 14px 16px;
  background: var(--panel-2); border-radius: 4px;
  white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: 15px; color: var(--soft);
}

/* --- login --- */
.login { max-width: 380px; margin: 12vh auto 0; display: grid; gap: 14px; }
.login h1 { font-size: 24px; margin-bottom: 4px; }
.login label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.login input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 4px;
  color: var(--text); font: inherit;
}
.login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,155,94,0.22); }
.login button {
  min-height: 48px; background: var(--accent); border: 0; border-radius: 4px;
  color: #111; font: inherit; font-weight: 600; cursor: pointer;
}
.error { margin: 0; color: var(--danger); font-size: 14px; }

/* Show/hide for a password field. The wrapper is built by admin.js, so none
   of this applies until the script has run — which is why the input's own
   styling lives on .login input and not here.
   Selectors are doubled up because `.login button` above is (0,1,1) and would
   otherwise paint the eye gold like a submit button. */
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw .pw__eye {
  position: absolute; top: 0; right: 0;
  width: 48px; height: 100%; min-height: 0;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 0 4px 4px 0;
  color: var(--muted); cursor: pointer; padding: 0;
}
.pw .pw__eye:hover { color: var(--text); }
.pw .pw__eye:focus-visible {
  outline: none; color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.pw .pw__eye svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 560px) {
  .enq__head { flex-direction: column; }
  .enq__actions { width: 100%; }
  .enq__actions .btn { flex: 1; }
}

/* --- tabs, reviews --- */
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 16px; text-decoration: none; color: var(--muted);
  font-size: 15px; font-weight: 600; border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--text); }
.tab.is-on { color: var(--text); border-bottom-color: var(--accent); }
.pip {
  min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: var(--line-strong); color: var(--text);
  font-size: 12px; text-align: center;
}
.pip--warn { background: var(--accent); color: #111; }

.note {
  margin: 0 0 18px; padding: 12px 16px;
  background: var(--panel); border-left: 2px solid var(--accent); border-radius: 4px;
  font-size: 14px; color: var(--soft);
}

/* Confirmation, as opposed to .note's neutral "read this". Same green as an
   approved review, so the interface has one colour for "that worked". */
.note--ok { border-left-color: #5bbf8a; color: var(--text); }

/* The password form is a .login card inside the signed-in shell, so it needs
   the top margin taken off — 12vh is right when the card is the whole page
   and wrong when it sits under the tabs. */
.login--inset { margin-top: 0; }

.confirm { max-width: 560px; margin: 6vh auto 0; display: grid; gap: 16px; }
.confirm h1 { font-size: 24px; }
.confirm__detail { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.6; }
.confirm__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.note--warn { border-left-color: var(--danger); color: var(--text); }
.btn--danger {
  background: var(--danger); border-color: var(--danger); color: #241111; font-weight: 600;
}
.btn--danger:hover { filter: brightness(1.1); }

.stars { color: var(--accent); font-size: 16px; letter-spacing: 1px; margin-left: 8px; }
.stars__off { opacity: 0.22; }

.review--approved { border-left-color: #5bbf8a; }
.review--rejected { border-left-color: var(--line-strong); opacity: 0.55; }
.review--pending  { border-left-color: var(--accent); }

.tag--approved { border-color: #5bbf8a; color: #5bbf8a; }
.tag--rejected { color: var(--muted); }
.tag--pending  { border-color: var(--accent); color: var(--accent); }
.tag--warn     { border-color: var(--danger); color: var(--danger); }

.btn--disabled { opacity: 0.4; cursor: not-allowed; }
.review__contact { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }

/* --- editor --- */
.page-title { font-size: 22px; font-weight: 700; margin: 0; }
.editor { display: grid; gap: 6px; }
.editor label {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-top: 14px;
}
.editor label em { text-transform: none; letter-spacing: 0; opacity: 0.75; }
.editor input, .editor textarea {
  width: 100%; padding: 11px 13px;
  background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 4px;
  color: var(--text); font: inherit; font-size: 15px;
}
.editor textarea { resize: vertical; line-height: 1.6; }
.editor__body { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.editor input:focus, .editor textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,155,94,0.22);
}
.editor__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor__foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.55; }
.hint code { background: var(--panel-2); padding: 1px 5px; border-radius: 3px; }
.post__summary { margin: 12px 0 0; color: var(--soft); font-size: 15px; }
.post--published { border-left-color: #5bbf8a; }
.post--draft { border-left-color: var(--line-strong); }
.tag--published { border-color: #5bbf8a; color: #5bbf8a; }
.tag--draft { color: var(--muted); }
.toolbar .page-title { margin-right: auto; }
@media (max-width: 560px) { .editor__row { grid-template-columns: 1fr; } }
