/* Hunter Coast Plumbing website editor, in the site's colours: white cards on a cool grey, ink text, and the logo's
   ripple blue for buttons and markers (blue text is the darker --accent). Montserrat, as on the site.
   Layout: a top bar with the actions, a section list on the left, one view at a time on the right. */
@font-face { font-family: Montserrat; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat.woff2) format("woff2"); }

:root {
  --bg: #f3f6f7; --surface: #ffffff; --surface-2: #e7edef; --line: #dbe3e6; --line-2: #8a979c;
  --ink: #12191d; --text: #3b464c; --muted: #5d696f;
  --accent: #00788e;      /* blue as text on white (5.0:1) */
  --fill: #00afce; --fill-hover: #33c0d8; --on-fill: #04252d; /* filled buttons: dark on the ripple blue */
  --ok: #1f7a45; --warn: #8a5a00; --bad: #b3261e;
  --radius: 6px;
  --shadow: 0 1px 2px rgb(12 19 22 / .06), 0 8px 28px rgb(12 19 22 / .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font: 400 15px/1.5 Montserrat, system-ui, sans-serif; color: var(--text); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--fill); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2 { line-height: 1.2; }
.logo { margin: 0; display: inline-flex; align-items: center; gap: .45em; font: 600 18px/1 Montserrat, system-ui, sans-serif; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.logo img { width: 1.7em; height: auto; }
.logo__w { font-weight: 600; color: var(--ink); }
.logo__w span { color: var(--fill); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 1px solid var(--ink); background: var(--surface);
  border-radius: var(--radius); padding: .55em 1.1em; cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.btn-primary:hover { background: var(--fill-hover); border-color: var(--fill-hover); }
.btn-ghost { background: none; border-color: var(--line-2); }
.btn-small { padding: .35em .8em; font-size: 11px; }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled, button:disabled { opacity: .4; cursor: not-allowed; }
.icon { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; width: 30px; height: 30px; cursor: pointer; }
.icon:hover:not(:disabled) { border-color: var(--accent); }

/* ---------------------------------------------------------------- login and plain pages */
.login, .plain { min-height: 100vh; display: grid; place-items: center; padding: 24px 20px; background: var(--bg); }
.login form, .plain .card { width: min(380px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; background: var(--surface); padding: 30px 26px; border-radius: 4px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.login form { container-type: inline-size; }
.login .logo { justify-self: center; font-size: min(23px, 7cqi); }
.login .hint { text-align: center; margin: 4px 0 0; text-wrap: balance; }
.login h1 { margin: 0 0 6px; font-size: 18px; text-align: center; }
.login .btn { padding: .8em; font-size: 14px; }
.plain .card h1 { margin: 0; font-size: 20px; }

/* ---------------------------------------------------------------- fields */
label, .label { display: block; font-weight: 700; font-size: 13px; color: var(--ink); }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.warn { color: var(--warn); } .count.bad { color: var(--bad); font-weight: 700; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="email"], input[type="search"], textarea, select {
  width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 4px; padding: .6em .75em;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: 2px solid var(--fill); outline-offset: 0; }
textarea { resize: vertical; min-height: 4.5em; }
.field { margin-bottom: 18px; }
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check label { margin: 0; font-weight: 600; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.error { color: var(--bad); font-size: 13px; min-height: 1.3em; margin: 0; }
fieldset.group { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 2px; margin: 0 0 20px; }
fieldset.group > legend { padding: 0 8px; font-weight: 700; color: var(--accent); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.narrow { max-width: 420px; }

/* rich text */
.rich { border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); color: var(--ink); }
.rich:focus-within { border-color: var(--ink); outline: 2px solid var(--fill); }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.toolbar button { background: var(--surface-2); color: var(--ink); border: 1px solid transparent; border-radius: 4px; padding: .2em .6em; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--muted); }
.toolbar button:hover { background: var(--line); }
.toolbar button.on { color: var(--on-fill); background: var(--fill); }
.toolbar .sep { width: 1px; background: var(--line); margin: 2px 4px; }
.prose .ProseMirror { min-height: 7em; padding: 10px 12px; outline: none; }
.prose .ProseMirror > :first-child { margin-top: 0; }
.prose .ProseMirror h2 { font-size: 1.25em; } .prose .ProseMirror h3 { font-size: 1.08em; }
.prose .ProseMirror { color: var(--ink); }
.prose blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 12px; color: var(--muted); }

/* lists of items */
.list { display: grid; gap: 10px; margin-bottom: 8px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 0 14px; }
.item.simple { padding: 8px 8px 8px 10px; align-items: center; }
.item.simple .item__body > * { margin: 0; }
.item .controls { display: flex; gap: 4px; align-items: flex-start; }
.item .controls button { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; width: 28px; height: 28px; cursor: pointer; }
.item .controls button:hover:not(:disabled) { border-color: var(--accent); }
.item .controls .del:hover { border-color: var(--bad); color: var(--bad); }
.add { margin-bottom: 18px; }

/* images */
.image-pick { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: start; }
.image-pick__side { display: grid; gap: 8px; justify-items: start; }
.thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); display: block; }
.thumb.empty { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.mini { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); flex: none; }
.mini.empty { display: none; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.media-card.needs-alt { border-color: var(--warn); }
.media-card .thumb { border: 0; border-radius: 4px; }
.media-card__body { padding: 12px 14px; }
.media-id { margin: 0 0 10px; font-weight: 700; font-size: 13px; color: var(--accent); word-break: break-all; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- app layout */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 10px 20px; background: rgb(255 255 255 / .94); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgb(21 20 15 / .06); backdrop-filter: blur(6px); }
.top .title { color: var(--muted); font-size: 13px; }
.top .status { margin-right: auto; }
.me { color: var(--muted); font-size: 13px; align-self: center; padding-left: 6px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status { font-size: 12.5px; color: var(--muted); }
.status.dirty { color: var(--warn); } .status.ok { color: var(--ok); }
.layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.nav { border-right: 1px solid var(--line); background: rgb(255 255 255 / .6); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav button { text-align: left; background: none; border: 0; padding: .6em .85em; border-radius: 4px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 14px; }
.nav button:hover { color: var(--ink); background: var(--surface-2); }
.nav button[aria-current="page"] { color: var(--on-fill); background: var(--fill); }
.main { padding: 24px 28px 80px; max-width: 980px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.view-head h1 { margin: 0; font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2.sub { font-size: 13px; margin: 32px 0 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { position: relative; background: var(--surface); border: 0; box-shadow: var(--shadow); padding: 16px 18px; }
/* a blue rule along the top, like the site's service cards */
.card { border-radius: var(--radius); border-top: 3px solid var(--fill); }
.login form { border-top: 3px solid var(--fill) !important; border-radius: var(--radius); }
.card h2 { margin: 0 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card p { margin: 0; }
.ok { color: var(--ok); }
.problems > div { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-size: 13.5px; }
.problems ul { margin: 6px 0 0; padding-left: 18px; }
.problems .bad { background: #fbeceb; border: 1px solid #e3a8a3; color: var(--ink); }
.problems .warn { background: #fff6dc; border: 1px solid #ecd28a; color: var(--ink); }
.badge { font-size: 11.5px; font-weight: 700; border-radius: 4px; padding: .1em .6em; }
.badge.bad { background: var(--bad); border-color: var(--bad); color: #fff; }

/* rows (pages, people, history) */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.row, .rows > li { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; text-align: left; }
button.row { cursor: pointer; }
button.row:hover { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--fill); }
.rows > li > .row { border: 0; padding: 0; background: none; }
.row__title { font-weight: 700; }
.row__meta { color: var(--muted); font-size: 13px; margin-right: auto; }
.row__btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.log { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.log li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.log .when { color: var(--muted); min-width: 150px; }
.log .ip { margin-left: auto; color: var(--muted); font-size: 12px; }
.log .who { color: var(--ink); font-weight: 700; min-width: 110px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: min(560px, calc(100vw - 32px));
  background: var(--surface-2); border: 1px solid var(--ok); border-radius: 4px; padding: 12px 18px; box-shadow: var(--shadow); font-size: 14px; }
.toast.bad { border-color: var(--bad); }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .nav button { white-space: nowrap; }
  .main { padding: 20px 16px 80px; }
  .image-pick { grid-template-columns: 1fr; }
  .top { padding: 10px 16px; }
}

/* lists of objects fold away to one line each (credits, courses, team) */
.list-search { margin-bottom: 10px; }
.item.fold { display: block; padding: 0; }
.item.fold > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.item.fold > summary::-webkit-details-marker { display: none; }
.item.fold > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 700; }
.item.fold[open] > summary::after { content: "–"; }
.item.fold[open] > summary { border-bottom: 1px solid var(--line); }
.item__title { font-weight: 700; }
.item__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px 0 14px; }
.badge { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: var(--ok); background: none; }
fieldset.readonly { border: 0; padding: 0; margin: 0; opacity: .75; }

/* people */
.users > li { flex-wrap: wrap; }
.users > li.off { opacity: .6; }
.user__who { display: grid; margin-right: auto; }
.users select { width: auto; padding: .3em .6em; font-size: 13px; }
.temp-pw { border: 1px solid var(--fill); background: #fff6dc; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.temp-pw p { margin: 0 0 6px; }
.temp-pw__value { font: 700 22px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .04em; user-select: all; }

/* ---------------------------------------------------------------- Packages and Tips lists */
.list-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 12px 0 16px; }
.list-tools .list-search { flex: 1 1 260px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 4px; padding: .35em .9em; cursor: pointer; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); font-weight: 700; }
.row--thumb .mini { width: 56px; height: 42px; }

/* ---------------------------------------------------------------- photos */
.media-grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.media-card__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
div.media-card__img { display: grid; place-items: center; color: var(--muted); }
.media-card__body { padding: 12px 14px 14px; }
.media-card__id { margin: 0 0 8px; }
.media-card__btns { display: flex; gap: 8px; margin-top: 10px; }
