/* AFL Hub. Mobile first. The look follows the YTB top bar, cards and chips. */
:root {
  --bar: #e8eef7;
  --text: #2c3a49;
  --muted: #55626f;
  --line: #d9dfe7;
  --green: #0b8a68;
  --green-dark: #08704f;
  --blue: #0f4c81;
  --orange: #c9600c;
  --purple: #5b2a86;
  --red: #c62828;
  --grey: #6b7785;
  --white: #ffffff;
  --radius: 6px;
}

/* Inter, free under the SIL Open Font License. See static/fonts. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 1rem/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
a { color: var(--blue); }
code { font-size: 0.95rem; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.icon { display: block; }

.env-banner {
  background: #fff3cd;
  color: #5c4400;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 16px;
  text-align: center;
}

/* Top bar: logo and tools on one row, the menu on its own row on a phone. */
.topbar {
  background: var(--bar);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 8px 12px 0;
}
.topbar-brand { display: block; line-height: 0; }
.topbar-brand img { border-radius: 8px; }
.topbar-tools {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}
.topbar-tools > a { color: #6e7b88; }
.topbar-quick { display: flex; gap: 6px; margin-right: auto; padding-left: 8px; }
.topbar-quick .button { font-size: .9rem; padding: 6px 12px; }
.topbar-nav {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: space-between;
  margin-top: 4px;
  gap: 2px;
}
.topbar-nav a {
  color: #6e7b88;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 600;
  min-width: 0;
  padding: 6px 0 8px;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.topbar-nav a, .topbar-tools > a, .avatar, .button { transition: color 0.12s, background-color 0.12s; }
.topbar-nav a:hover, .topbar-tools > a:hover { color: #0d1720; }
.topbar-tools .avatar:hover { background: #0d1720; }
.topbar-nav a.active { color: var(--text); }
.topbar-nav a.active:hover { color: #0d1720; }

.avatar {
  align-items: center;
  background: var(--text);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  flex: none;
  font-size: 0.85rem;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  list-style: none;
  width: 38px;
}
.avatar::-webkit-details-marker { display: none; }

/* Drop-down menus, used for the avatar and for Options. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(30, 45, 60, 0.15);
  margin-top: 6px;
  min-width: 220px;
  padding: 6px 0;
  position: absolute;
  z-index: 20;
}
.menu-right { right: 0; }
.menu-panel a,
.menu-panel button {
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: block;
  font: inherit;
  padding: 8px 14px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}
.menu-panel a:hover,
.menu-panel button:hover { background: var(--bar); }

.page { margin: 0 auto; max-width: 1040px; padding: 20px 16px 48px; }

/* Buttons */
.button {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 600;
  min-height: 42px;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: #d5dfec; }
.button-green { background: var(--green); border-color: var(--green); color: var(--white); }
.button-green:hover { background: var(--green-dark); }
.button-wide { display: block; width: 100%; }
.button-link {
  background: none;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  margin-top: 12px;
  padding: 4px 0;
  text-decoration: underline;
}

/* Forms */
.field { margin-bottom: 1rem; }
.field label,
.field-label { display: block; font-weight: 600; margin: 0 0 4px; }
.field p { margin: 0; }
.help { color: var(--muted); font-size: 0.88rem; margin: 0 0 6px; }
.help ul { margin: 4px 0; padding-left: 18px; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="date"], input[type="datetime-local"], select {
  background: var(--white);
  border: 1px solid #aeb7c2;
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  min-height: 44px;
  padding: 8px 12px;
  width: 100%;
}
input[type="file"] { display: block; font: inherit; max-width: 100%; padding: 6px 0; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #7aa7d9;
  outline-offset: 1px;
}
.field-error, .form-error { color: var(--red); font-weight: 600; }
.form-error ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.field div[id] > div { margin-bottom: 4px; }
.field div[id] label { font-weight: 400; }

.message { border-radius: var(--radius); margin: 0 0 1rem; padding: 10px 14px; }
.message-success { background: #dff3ec; color: #075c41; }
.message-info { background: var(--bar); }
.message-error { background: #fbe4e4; color: var(--red); }

/* Cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.card > h2 { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-title { align-items: center; display: flex; gap: 8px; }
.card-row { border-top: 1px solid var(--line); margin: 0; padding: 12px 16px; }
.card > h2 + .card-row, .card > .card-row:first-child { border-top: 0; }
.card-row form { margin-top: 8px; }
/* A form put straight into a card (about 50 pages) gets the same inset as a card row, not boxes touching the edges (Marc 27/11). */
.card > :is(.field, .form-error, .tick-line, label, .help, .field-label, p:not(.card-row), button, .button, .button-row) { margin-left: 16px; margin-right: 16px; }
.card > :is(.field, .form-error, .tick-line, label, .help, .field-label, p:not(.card-row), button, .button, .button-row):first-child { margin-top: 16px; }
.card > :is(.field, .form-error, .tick-line, label, .help, .field-label, p:not(.card-row), button, .button, .button-row):last-child { margin-bottom: 16px; }
.card > label { display: block; }
.card > :is(input, select, textarea) { display: block; margin-left: 16px; margin-right: 16px; width: calc(100% - 32px); }
.activity ul { list-style: none; margin: 0; padding: 0; }
.activity li { border-top: 1px solid var(--line); font-size: 0.92rem; padding: 10px 16px; }
.activity li:first-child { border-top: 0; }
.activity strong { font-weight: 600; }
.activity > p { margin: 0; padding: 12px 16px; }

/* Status chips: colour means status, everywhere. */
.chips { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.chip-label { color: var(--muted); display: block; font-size: 0.8rem; }
.chip { display: inline-block; font-weight: 700; }
.chip-green { color: var(--green); }
.chip-grey { color: var(--grey); }
.chip-owner { color: var(--blue); }
.chip-admin { color: var(--purple); }
.chip-field { color: var(--orange); }

/* Home */
.home-head { align-items: center; display: flex; gap: 16px; margin-bottom: 20px; }
.home-head h1 { margin: 0; }
.home-logo { max-height: 64px; max-width: 140px; object-fit: contain; }
.home-cards, .home-today { display: grid; gap: 16px; }
.home-cards .card { margin: 0; }
.home-today .card { margin: 0; }
.light-heading { font-size: 1.25rem; font-weight: 400; margin: 28px 0 10px; }

/* Settings */
.settings { display: grid; gap: 16px; }
.settings-menu { display: flex; flex-wrap: wrap; gap: 4px; }
.settings-heading { color: var(--muted); flex-basis: 100%; font-size: 0.85rem; margin: 0; }
.settings-menu a {
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  text-decoration: none;
}
.settings-menu a:hover { background: var(--bar); }
.settings-menu a.active { background: var(--bar); font-weight: 700; }
.settings-body { min-width: 0; }

/* Lists and records */
.list-head, .record-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.list-head h1, .record-head h1 { margin: 0; }
.record-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 16px;
  text-decoration: none;
}
.record-card:hover { background: #f6f8fb; }
.record-card-off { opacity: 0.65; }
.record-card-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.record-columns { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.rights { list-style: none; margin: 0; padding: 0; }
.rights li { border-top: 1px solid var(--line); padding: 8px 16px; }
.rights li:first-child { border-top: 0; }
.right-mark { display: inline-block; font-weight: 700; width: 2.2em; }
.right-yes .right-mark { color: var(--green); }
.right-no { color: var(--muted); }

.logo-preview { display: block; margin-bottom: 8px; max-height: 96px; max-width: 240px; object-fit: contain; }
.badge-row { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.badge-row form { margin: 0 0 0 auto; }
.badge-preview { height: 48px; max-width: 96px; object-fit: contain; }

/* Sign-in and other pages before the app proper */
.public { background: var(--bar); min-height: 100vh; }
.public-card {
  background: var(--white);
  border-radius: 8px;
  margin: 16px;
  padding: 24px 20px;
}
.public-brand { align-items: center; display: flex; font-size: 1.3rem; font-weight: 700; gap: 12px; margin-bottom: 20px; }
.public-brand img { border-radius: 10px; }
.steps { padding-left: 20px; }
.qr { margin: 12px 0; }
.qr svg { display: block; height: auto; margin: 0 auto; max-width: 300px; width: 100%; }
.key-box { margin-bottom: 16px; }
.key-box code { display: block; margin-top: 6px; }
.codes { column-gap: 16px; columns: 1; list-style: none; margin: 0 0 16px; padding: 0; }
.codes li { padding: 3px 0; }
.link-box { background: var(--bar); border-radius: var(--radius); padding: 12px; }

@media (min-width: 480px) {
  .topbar-nav a { font-size: 0.68rem; }
  .public-card { margin: 48px auto; max-width: 440px; padding: 32px; }
  .codes { columns: 2; }
}

@media (min-width: 720px) {
  .topbar-nav a { font-size: 0.75rem; }
  .home-cards { grid-template-columns: repeat(3, 1fr); }
  .home-today { grid-template-columns: 5fr 3fr; }
  .settings { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
  .settings-menu { align-content: flex-start; flex-direction: column; flex-wrap: nowrap; }
  .settings-heading { flex-basis: auto; }
  .record-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (min-width: 960px) {
  /* The YTB layout: one bar with the menu centred. */
  .topbar { grid-template-columns: 1fr auto 1fr; padding: 8px 24px 0; }
  .topbar-nav { grid-column: 2; grid-row: 1; gap: 8px; margin-top: 0; overflow: visible; }
  .topbar-nav a { min-width: 84px; }
  .topbar-tools { gap: 18px; }
}

@media (min-width: 1200px) {
  /* Full-size screens: the same generous sizes as the YTB bar and writing. */
  html { font-size: 22px; }
  h1 { font-size: 1.8rem; }
  .topbar { padding: 14px 24px 6px; }
  .topbar-brand img { height: 52px; width: 52px; }
  .topbar-nav { gap: 36px; }
  .topbar-nav a { font-size: 0.84rem; font-weight: 700; gap: 6px; min-width: 120px; padding: 0 0 6px; }
  .topbar .icon { height: 42px; width: 42px; }
  .topbar-tools { gap: 30px; }
  .topbar-tools .avatar { font-size: 1rem; height: 56px; width: 56px; }
  .page { max-width: 1300px; padding-top: 36px; }
  .settings { grid-template-columns: 280px minmax(0, 1fr); }
  /* Home fills the screen like the YTB home page. Forms stay a readable width. */
  .page-wide { max-width: 1542px; padding-top: 60px; }
  .page-wide h1 { font-size: 1.8rem; font-weight: 600; }
  .home-head { gap: 28px; margin-bottom: 44px; }
  .home-logo { max-height: 100px; max-width: 210px; }
  .home-cards { gap: 27px; }
  .home-today { gap: 27px; }
  .page-wide .card > h2 { font-size: 1.15rem; font-weight: 600; padding: 18px 27px; }
  .page-wide .card-title .icon { height: 32px; width: 32px; }
  .page-wide .card-row { padding: 20px 27px; }
  .page-wide .card > :is(.field, .form-error, .tick-line, label, .help, .field-label, p:not(.card-row), button, .button, .button-row) { margin-left: 27px; margin-right: 27px; }
  .page-wide .card > :is(.field, .form-error, .tick-line, label, .help, .field-label, p:not(.card-row), button, .button, .button-row):first-child { margin-top: 22px; }
  .page-wide .card > :is(.field, .form-error, .tick-line, label, .help, .field-label, p:not(.card-row), button, .button, .button-row):last-child { margin-bottom: 22px; }
  .page-wide .card > :is(input, select, textarea) { margin-left: 27px; margin-right: 27px; width: calc(100% - 54px); }
  .light-heading { font-size: 1.35rem; margin: 56px 0 18px; }
}

/* Customers */
.headlines { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; }
.headline { color: var(--blue); padding: 2px 0; text-decoration: none; border-bottom: 2px solid transparent; }
.headline:hover { color: #0d1720; }
.headline-on { border-bottom-color: var(--blue); font-weight: 700; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input[type="search"] {
  background: var(--white); border: 1px solid #aeb7c2; border-radius: 22px; color: var(--text);
  flex: 1; font: inherit; min-height: 44px; min-width: 0; padding: 8px 18px;
}
.customer-card { align-items: flex-start; }
.chip-stack { align-items: flex-end; display: flex; flex: none; flex-direction: column; font-size: 0.85rem; gap: 2px; text-align: right; }
.chip-red { color: var(--red); }
.pager { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.site-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.contact-row { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; overflow-wrap: anywhere; }
.contact-row .button { flex: none; }
textarea, input[type="number"] {
  background: var(--white); border: 1px solid #aeb7c2; border-radius: var(--radius); color: var(--text);
  font: inherit; padding: 8px 12px; width: 100%;
}
input[type="number"] { min-height: 44px; }
input[type="checkbox"] { height: 20px; width: 20px; }
.narrow-form { max-width: 760px; }

/* Leads: buttons side by side, and a form that sits in a row. */
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.button-row form { margin: 0; }
.pasted-email > summary { align-items: baseline; cursor: pointer; display: flex; gap: 8px; list-style: none; padding: 12px 16px; }
.pasted-email > summary::-webkit-details-marker { display: none; }
.pasted-email > summary::before { content: "\25B8"; color: #6e7b88; }
.pasted-email[open] > summary::before { content: "\25BE"; }
.pasted-email[open] > summary { border-bottom: 1px solid var(--line); }
.pasted-email summary h2 { display: inline; font-size: inherit; margin: 0; }
.pasted-email pre.card-row { border-top: 0; }
.pasted-email pre { font: inherit; font-size: 0.9rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.list-head .button-row { justify-content: flex-end; }

/* Leads report tables: they scroll sideways on a phone rather than squashing. */
.table-wrap { overflow-x: auto; }
.report-table { border-collapse: collapse; font-size: 0.85rem; min-width: 100%; }
.report-table th, .report-table td { border-top: 1px solid var(--line); padding: 8px 12px; text-align: right; white-space: nowrap; }
.report-table thead th { border-top: 0; color: #6e7b88; font-weight: 600; }
.report-table th[scope="row"], .report-table thead th:first-child { text-align: left; }
.report-table tfoot th, .report-table tfoot td { font-weight: 700; }

/* Tenders: the go/no-go questions, and long Dropbox paths that must wrap. */
.go-question { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; }
.go-question legend { font-weight: 600; padding: 0 4px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; }
.radio-row label { align-items: center; display: inline-flex; gap: 6px; font-weight: 400; }
.folder-path { font-size: 0.85rem; overflow-wrap: anywhere; }

/* Ten items on the top bar: on a laptop-sized screen the generous YTB sizes don't fit,
   so the bar tightens up until the screen is wide enough for them. */
@media (min-width: 1200px) and (max-width: 1799px) {
  .topbar-nav { gap: 20px; }
  .topbar-nav a { font-size: 0.72rem; min-width: 0; }
  .topbar .icon { height: 36px; width: 36px; }
}

/* Nine items on the top bar: on a narrow phone it scrolls sideways rather than squashing. */
@media (max-width: 479px) {
  .topbar-nav { overflow-x: auto; scrollbar-width: none; }
  .topbar-nav a { flex: 0 0 auto; min-width: 52px; padding-left: 4px; padding-right: 4px; }
}
.price-lines th[scope="row"] { white-space: normal; min-width: 220px; font-weight: 400; }
.line-left-out { opacity: 0.55; }
.email-text { font: inherit; font-size: 0.9rem; margin-top: 6px; width: 100%; border: 1px solid #aeb7c2; border-radius: var(--radius); padding: 8px 12px; }
.qualifications { margin: 6px 0 0; padding-left: 1.4rem; }
.qualifications li { margin-bottom: 4px; }
.report-table td.cell-left { text-align: left; }

/* Jobs: the tab bar across the top of a job, like YTB. It scrolls sideways on a phone. */
.job-tabs { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; }
.job-tabs a { border-bottom: 3px solid transparent; color: #6e7b88; flex: 0 0 auto; font-size: 0.9rem; font-weight: 600; padding: 8px 12px; text-decoration: none; }
.job-tabs a:hover { color: var(--text); }
.job-tabs a.tab-on { border-bottom-color: var(--text); color: var(--text); }
.todo-row { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
.todo-main { flex: 1 1 260px; }
.todo-done .todo-main strong { color: #6e7b88; text-decoration: line-through; }
.todo-input { flex: 1 1 220px; }
.todo-check { align-items: center; display: inline-flex; gap: 6px; font-weight: 400; }
.todo-preview { margin: 0; padding-left: 1.2rem; }

[hidden] { display: none !important; }

/* Job photos and files */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.photo-grid figure { margin: 0; }
.photo-grid img { aspect-ratio: 4 / 3; border-radius: var(--radius); display: block; object-fit: cover; width: 100%; }
.photo-grid figcaption { font-size: 0.8rem; margin-top: 4px; }
.link-button { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-size: 0.8rem; padding: 0; text-decoration: underline; }
.inline-form { display: inline; }
.file-caption { margin: 8px 0; width: 100%; }
.form-report summary { cursor: pointer; }
.form-report pre { font: inherit; font-size: 0.85rem; margin: 8px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.site-pack { margin: 0 auto; max-width: 640px; }
.site-pack h1 { font-size: 1.4rem; }

/* ---- Schedule and tasks (step 6) ---- */
.small { font-size: 0.85rem; }
.late { color: var(--red); font-weight: 600; }
.button-on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.schedule-bar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.schedule-heading { font-size: 1.05rem; }
.schedule-bar select { max-width: 220px; }
.week { display: grid; gap: 8px; }
.day { border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; padding: 8px; }
.day-weekend, .month-day.day-weekend { background: #f5f7fa; }
.day-today { border-color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
.day-head { align-items: center; display: flex; font-size: 0.95rem; justify-content: space-between; margin: 0 0 6px; }
.day-add { border: 1px solid var(--line); border-radius: var(--radius); color: var(--blue); line-height: 1; padding: 2px 8px; text-decoration: none; }
.day-empty { font-size: 0.85rem; margin: 0; }
.event { border-left: 5px solid var(--grey); border-radius: 4px; color: var(--text); display: flex; flex-direction: column; font-size: 0.85rem; margin: 0 0 6px; padding: 6px 8px; text-decoration: none; background: #f2f4f7; overflow-wrap: anywhere; }
.event-when { color: var(--muted); font-size: 0.78rem; }
.event-people { font-weight: 600; font-size: 0.78rem; }
.event-install { border-color: #0b8a8a; background: #e3f4f4; }
.event-survey { border-color: var(--orange); background: #fbeee2; }
.event-service { border-color: var(--blue); background: #e5edf6; }
.event-delivery { border-color: #8a6d0b; background: #f6f0dc; }
.event-holiday { border-color: var(--purple); background: #efe8f5; }
.event-training { border-color: #a0306a; background: #f7e6ef; }
.event-other { border-color: var(--grey); background: #eef0f3; }
.event-ytb { border-color: #9aa3ad; background: #f4f5f6; border-left-style: dashed; color: var(--muted); }
.event-task { border-color: var(--green); background: #e6f4ef; }
/* Colour by person: p0 to p9, one per team member in order (schedule/views.py PERSON_COLOURS). */
.event.by-person, .agenda-row.by-person { background: var(--who); }
.event-dot.by-person { border-left-color: var(--who); }
.by-person.nobody { --who: #9aa3ad; }
.by-person.p0 { --who: #1f77b4; }
.by-person.p1 { --who: #d62728; }
.by-person.p2 { --who: #2ca02c; }
.by-person.p3 { --who: #ff7f0e; }
.by-person.p4 { --who: #9467bd; }
.by-person.p5 { --who: #8c564b; }
.by-person.p6 { --who: #e377c2; }
.by-person.p7 { --who: #17becf; }
.by-person.p8 { --who: #bcbd22; }
.by-person.p9 { --who: #7f7f7f; }
/* List view: a day per block, one booking per full-width line. */
.agenda { display: grid; gap: 10px; }
.agenda-day { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.agenda-head { align-items: center; display: flex; font-size: 1rem; justify-content: space-between; margin: 0 0 6px; }
.agenda-row { align-items: baseline; border-left-style: solid; border-left-width: 9px; border-radius: 4px; color: var(--text); display: grid; gap: 4px 14px;
  grid-template-columns: 9rem 1fr auto; margin: 0 0 5px; padding: 7px 10px; text-decoration: none; }
.agenda-row .agenda-what { display: flex; flex-direction: column; min-width: 0; }
.agenda-when { color: var(--muted); font-size: 0.85rem; }
.agenda-who { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.agenda-empty { font-size: 0.9rem; margin: 0; }
@media (max-width: 640px) { .agenda-row { grid-template-columns: 1fr auto; } .agenda-when { grid-column: 1 / -1; } }
.event-dot { border-left: 10px solid var(--grey); display: inline-block; height: 10px; margin: 0 4px 0 10px; vertical-align: middle; width: 0; border-radius: 2px; }
.event-dot.event-ytb { border-left-style: solid; }
.key { line-height: 2; margin: 12px 0; }
.month { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-names span { background: var(--bar); font-size: 0.8rem; font-weight: 600; padding: 4px 6px; }
.month-day { border-top: 1px solid var(--line); border-left: 1px solid var(--line); color: var(--text); display: flex; flex-direction: column; gap: 2px; min-height: 84px; min-width: 0; padding: 4px; text-decoration: none; }
.month-day:first-child { border-left: 0; }
.month-day.day-other { color: #a0a8b2; }
.month-date { font-size: 0.8rem; font-weight: 600; }
.mweek { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 110px; position: relative; }
.mday { border-left: 1px solid var(--line); color: var(--text); grid-row: 1 / -1; padding: 4px 6px; text-decoration: none; }
.mday:first-child { border-left: 0; }
.mday.day-other { color: #a0a8b2; }
.mday.day-today .month-date { background: var(--green); border-radius: 10px; color: #fff; padding: 0 7px; }
.mstack { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0 4px 6px; position: relative; }
.mblock { border-radius: 6px; color: #fff; display: flex; flex-direction: column; font-size: 0.78rem; line-height: 1.25; margin: 0 4px 4px;
  min-width: 0; overflow-wrap: anywhere; padding: 4px 6px; position: relative; text-decoration: none; }
.mstack .mblock { margin: 0; }
.mblock strong { font-size: 0.82rem; }
.mwhen { opacity: 0.9; font-size: 0.72rem; }
.mwhere { opacity: 0.9; font-size: 0.72rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mweek > .mblock { align-self: start; }
.mk-install { background: #3fb3b0; }
.mk-survey { background: #e8935a; }
.mk-service { background: #4a7fc1; }
.mk-delivery, .mk-other { background: #9b84bd; }
.mk-holiday { background: #c06aa0; }
.mk-training { background: #b0566e; }
.mblock-ytb { opacity: 0.88; }
.mk-task { background: #2f8f6b; }
/* Week and List use the month's solid colours: white text on the activity (or person) colour. */
.event.solid, .agenda-row.solid { border-left-color: rgba(0, 0, 0, 0.22); color: #fff; }
.solid .muted, .solid .event-when, .solid .agenda-when, .solid .event-people, .solid .agenda-who { color: rgba(255, 255, 255, 0.92); }
.solid-ytb { opacity: 0.88; border-left-style: dashed; }
.event-dot.event-install { border-left-color: #3fb3b0; } .event-dot.event-survey { border-left-color: #e8935a; }
.event-dot.event-service { border-left-color: #4a7fc1; } .event-dot.event-delivery, .event-dot.event-other { border-left-color: #9b84bd; }
.event-dot.event-holiday { border-left-color: #c06aa0; } .event-dot.event-training { border-left-color: #b0566e; }
.mtasks { background: #e6f4ef; border-radius: 6px; color: var(--green); font-size: 0.72rem; font-weight: 600; padding: 2px 6px; text-decoration: none; }
.pill { border-left: 4px solid var(--grey); border-radius: 3px; font-size: 0.72rem; overflow: hidden; padding: 1px 4px; text-overflow: ellipsis; white-space: nowrap; }
.task-row { align-items: flex-start; display: flex; gap: 12px; }
.task-main { min-width: 0; overflow-wrap: anywhere; }
.task-done { color: var(--muted); text-decoration: line-through; }
.tick { align-items: center; background: var(--white); border: 2px solid var(--grey); border-radius: 50%; color: var(--white); cursor: pointer; display: inline-flex; font-size: 0.9rem; height: 28px; justify-content: center; padding: 0; width: 28px; }
.tick:hover { border-color: var(--green); }
.tick-done { background: var(--green); border-color: var(--green); }
.quick-task { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }
.quick-task input[type="text"] { flex: 1 1 260px; min-width: 0; }
@media (min-width: 960px) {
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .day { min-height: 160px; }
}
.inline-ticks, ul.inline-ticks, #id_which_days { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 0; }
#id_which_days label { font-weight: 400; }

/* ---- Home dashboard (step 7) ---- */
.headline-row { align-items: baseline; color: var(--text); display: flex; gap: 8px; text-decoration: none; }
.headline-row strong { color: var(--blue); flex: 0 0 2.2ch; font-size: 1.35rem; }
.headline-row:hover strong { text-decoration: underline; }
.headline-zero strong { color: var(--grey); }
.home-event { margin: 0; border-radius: 0; }
.action { border-left: 5px solid var(--blue); color: var(--text); display: flex; flex-direction: column; text-decoration: none; }
.action:hover strong { text-decoration: underline; }
.action-urgent { border-left-color: var(--red); }
.action-soon { border-left-color: var(--orange); }
.source-row { align-items: center; display: grid; gap: 10px; grid-template-columns: minmax(0, 9rem) 1fr auto; }
.source-bar { appearance: none; background: #eef1f5; border: 0; border-radius: 3px; height: 10px; width: 100%; }
.source-bar::-webkit-progress-bar { background: #eef1f5; border-radius: 3px; }
.source-bar::-webkit-progress-value { background: var(--blue); border-radius: 3px; }
.source-bar::-moz-progress-bar { background: var(--blue); border-radius: 3px; }
.source-count { font-size: 0.85rem; white-space: nowrap; }
@media (min-width: 720px) {
  .home-cards-4 { grid-template-columns: repeat(2, 1fr); }
  .home-cards-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .home-cards-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Diary (step 8) ---- */
.diary { list-style: none; margin: 0; padding: 0; }
.diary-entry { border-bottom: 1px solid var(--line); border-left: 4px solid var(--line); display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; overflow-wrap: anywhere; }
.diary-entry:last-child { border-bottom: 0; }
.diary-note, .diary-visit { border-left-color: var(--green); }
.diary-call_in, .diary-call_out, .diary-text { border-left-color: var(--orange); }
.diary-email_in, .diary-email_out { border-left-color: var(--blue); }
.diary-status { border-left-color: var(--purple); }
.diary-meta { color: var(--muted); font-size: 0.8rem; }
.diary-where { background: var(--bar); border-radius: 3px; margin-left: 8px; padding: 0 6px; }
.diary-detail { font: inherit; font-size: 0.85rem; margin: 6px 0 0; white-space: pre-wrap; }
.diary-add { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.diary-add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.diary-add-row input[type="text"] { flex: 1 1 240px; min-width: 0; }
.diary-add details { display: flex; flex-direction: column; gap: 8px; }
.diary-add details > * { margin-top: 8px; width: 100%; }
.proof-table { border-collapse: collapse; font-size: 0.85rem; width: 100%; }
.proof-table th, .proof-table td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; }
.proof-table th { background: var(--bar); }
@media print {
  .topbar, .env-banner, .no-print, .messages { display: none !important; }
  .proof { font-size: 10pt; }
}

/* Gates and assets */
.asset-photo { max-width: 100%; border-radius: 4px; }
.qr svg { width: 100%; max-width: 180px; height: auto; display: block; }
.labels { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.label { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--grey); padding: 8px; break-inside: avoid; }
.label .qr svg { width: 96px; }
.site-assets { margin: 0; padding: 0; list-style: none; }
@media print { .no-print, .topbar, .env-banner { display: none !important; } .label { border-style: solid; } }

.kind-pick { border: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; }
.kind-pick legend { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; padding: 0; }
.kind-pick label { align-items: center; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; display: inline-flex; gap: 4px; padding: 4px 10px; }
.kind-pick label:has(input:checked) { background: #e3f3ec; border-color: var(--green); font-weight: 700; }
.fingerprint { overflow-wrap: anywhere; word-break: break-all; }

/* The left-hand menu. On a wide screen it sits down the left; on a phone or tablet it
   folds away behind the More button in the top bar. */
.side-nav { display: none; }
.side-title { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; margin: 14px 0 4px; text-transform: uppercase; }
.side-title:first-child { margin-top: 0; }
.side-link { align-items: center; border-radius: 6px; color: var(--text); display: flex; gap: 8px; justify-content: space-between; padding: 6px 10px; text-decoration: none; }
a.side-link:hover { background: var(--bar); }
.side-on { background: var(--bar); font-weight: 700; }
.side-count { background: var(--red); border-radius: 10px; color: var(--white); font-size: 0.75rem; font-weight: 700; padding: 0 7px; }
.side-later { color: var(--muted); font-size: 0.9rem; }
.side-more .menu-panel { max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px); min-width: 240px; overflow-y: auto; overscroll-behavior: contain; padding: 10px; }
@media (min-width: 1100px) {
  .with-side { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
  .with-side > .page { width: 100%; } /* auto margins would otherwise let wide content stretch the page */
  .side-nav { border-right: 1px solid var(--line); display: block; font-size: 0.8rem; padding: 24px 12px; }
  .side-more { display: none; }
}

/* The service report, built for a phone on site. */
.report-form { max-width: 760px; }
.report-part { border: 1px solid var(--line); margin: 0 0 16px; padding: 12px 14px; }
.report-part legend { font-weight: 700; padding: 0 6px; }
.check-row { border-bottom: 1px solid var(--line); display: grid; gap: 4px; padding: 8px 0; }
.check-row:last-child { border-bottom: 0; }
.check-item { font-weight: 600; }
.check-states { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.9rem; }
.check-states label { align-items: center; display: inline-flex; gap: 4px; }
.check-row input[type="text"] { width: 100%; }
.force-point { border-top: 1px solid var(--line); padding: 6px 0; }
.force-point summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.force-table { border-collapse: collapse; width: 100%; }
.force-table th, .force-table td { padding: 3px; text-align: left; font-size: 0.85rem; }
.force-input { width: 100%; min-width: 0; }
.signature { background: var(--white); border: 1px dashed var(--grey); border-radius: 6px; display: block; height: auto; max-width: 100%; touch-action: none; width: 100%; }
.field-label { font-weight: 600; margin: 10px 0 4px; }
.report-problems ul { margin: 6px 0 0; padding-left: 20px; }
.report-problems a { color: inherit; }
.force-verdict { font-weight: 700; margin: 6px 0 0; }
.force-verdict:empty { display: none; }
.force-pass { color: var(--green); }
.force-fail { color: var(--red); }

/* Holidays */
.data-table { border-collapse: collapse; width: 100%; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.data-table thead th { color: var(--muted); font-size: 0.85rem; }
.big-number { font-size: 1.6rem; }

/* The customer's quote page */
.public-items { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }
.public-item { border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; padding: 10px 12px; }
.public-item:last-child { border-bottom: 0; }
.public-item strong { white-space: nowrap; }
.public-total { background: var(--bar); }
.public-accept { border-top: 2px solid var(--green); margin-top: 20px; padding-top: 8px; }
.public-decline { margin-top: 16px; }
.public-head { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; margin-bottom: 18px; }
.public-head .muted { margin: 0; overflow-wrap: anywhere; }
.public-logo { max-height: 64px; max-width: 220px; }
.public-item .public-title { display: block; white-space: normal; }
.public-detail { color: #5b6878; display: block; font-size: .93em; margin-top: 2px; }
.public-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.public-card:has(.public-items) { max-width: 760px; }

/* Price book picker */
.book-row { align-items: center; display: flex; gap: 10px; }
.book-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.book-row input.book-qty { flex: none; width: 5.5em; }
/* A drop-down beside a search box keeps its own width, so the search box isn't squashed. */
.search-bar select { flex: none; max-width: 45%; width: auto; }
.public-none { display: none; }
.public-items:not(:has(.public-item)) { display: none; }

/* Help guides */
.help-steps { counter-reset: none; margin: 16px 0; max-width: 720px; padding-left: 1.6em; }
.help-steps li { border-bottom: 1px solid var(--line); line-height: 1.5; padding: 10px 4px; }
.email-text textarea { width: 100%; }
.email-text { margin-top: 6px; }

/* Roles and permissions (16/11/2026) */
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem; }
.tabs a { padding: 0.35rem 0.75rem; border: 1px solid var(--line, #d0d7de); border-radius: 999px; text-decoration: none; color: inherit; }
.tabs a.active { background: var(--bar); font-weight: 700; }
.perm-groups { display: grid; gap: 0.5rem; margin: 0.5rem 0; }
.perm-group { padding: 0; }
.perm-group-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; cursor: pointer; list-style: none; }
.perm-group-head::-webkit-details-marker { display: none; }
.perm-group-head::after { content: "▸"; margin-left: auto; opacity: 0.6; }
.perm-group[open] > .perm-group-head::after { content: "▾"; }
.perm-group-box, .perm-row input { width: 1.15rem; height: 1.15rem; flex: none; }
.perm-count { font-size: 0.85rem; }
.perm-list { list-style: none; margin: 0; padding: 0 0.9rem 0.6rem 2.6rem; }
.perm-list li { border-top: 1px solid var(--line, #eaeef2); }
.perm-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0; cursor: pointer; }
.perm-locked { opacity: 0.7; cursor: default; }

.help-video { border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 40, 70, 0.12); display: block; margin: 0 0 20px; max-width: 100%; width: 760px; background: #000; }

.inline-form input[type="number"] { display: inline-block; width: 9em; }

/* Command centre */
.agent-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.agent-chip { display: flex; flex-direction: column; gap: 2px; min-width: 170px; padding: 10px 14px; text-decoration: none; color: var(--text); }
.board { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.board-col h2 { font-size: 1.05rem; margin: 0 0 8px; }
.decision p { margin: 0 0 6px; }
.decision-form { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
.decision-form input[type=text] { width: 100%; }
.key-box { font-family: ui-monospace, Consolas, monospace; width: 100%; margin: 6px 0 10px; }
.button-red { background: var(--red); border-color: var(--red); color: var(--white); }

/* Ask box */
.ask-form textarea { margin-top: 4px; margin-bottom: 10px; }
.ask-answer .ask-q { margin: 0 0 8px; }
.ask-answer div { overflow-wrap: anywhere; }

/* Training matrix */
.matrix th, .matrix td { white-space: nowrap; text-align: center; font-size: 0.85rem; }
.matrix th[scope=row] { text-align: left; }
.matrix-key { display: flex; flex-wrap: wrap; gap: 6px; }
.mx { border-radius: 6px; padding: 2px 6px; }
.mx-held { background: #d8f1df; color: #155c2a; }
.mx-soon { background: #ffe9c7; color: #7a4a00; }
.mx-expired, .mx-missing { background: #fbd9d9; color: #8a1c1c; font-weight: 600; }
.mx-applied { background: #dbe8fb; color: #1d4c8f; }
.mx-no_expiry { background: #e6f4ea; color: #155c2a; }

/* Send site paperwork */
.paperwork .tick-line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.paperwork .field-label { margin-top: 12px; }
.dbs-list { margin: 4px 0 4px 18px; padding: 0; }

/* Phone forms */
.site-form .field input, .site-form .field select, .site-form .field textarea { width: 100%; }
.site-form .say-it textarea { width: 100%; margin-bottom: 8px; }
.form-checks { border: 0; margin: 8px 0; padding: 0; }
.form-checks legend { font-weight: 600; margin-bottom: 4px; }
.form-checks .tick-line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.gate-block { border: 1px solid var(--line, #d9dfe7); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.gate-block summary { font-weight: 600; cursor: pointer; }
.button-wide { width: 100%; text-align: center; }
.ads-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 16px; }
.po-lines input:not([type=checkbox]) { min-width: 84px; }
.po-lines td:first-child input { min-width: 200px; }


/* The one-page quote editor */
.quote-editor { padding-bottom: 8px; }
.quote-facts { display: grid; gap: 4px 18px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); padding: 12px 16px 0; }
.quote-facts p { margin: 0; }
.quote-facts .field-label { display: block; }
.quote-parties { display: grid; gap: 0 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding: 0 16px; }
.quote-parties h2 { border: 0; padding: 12px 0 0; }
.quote-top > .field { padding: 0 16px; }
.quote-card { padding: 14px 16px; }
.quote-card-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 290px; }
.quote-wording input, .quote-wording textarea, .quote-figures input, .quote-figures select { box-sizing: border-box; width: 100%; }
.quote-wording input[type="checkbox"] { width: auto; }
.quote-wording input.quote-title { font-weight: 700; margin-bottom: 6px; }
.quote-more { margin-top: 8px; }
.quote-choice { display: block; margin-top: 8px; }
.quote-choice select { margin-left: 8px; width: auto; }
.quote-more label { display: block; margin-top: 6px; }
.quote-figures label:not(.quote-sum) { align-items: center; display: grid; gap: 8px; grid-template-columns: 108px 1fr; margin-bottom: 6px; white-space: nowrap; }
.quote-figures input { text-align: right; }
.quote-sum { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin: 6px 0; }
.quote-sum select { flex: 1; max-width: 170px; min-width: 0; }
.quote-sum-total { border-top: 1px solid var(--glass-line); font-size: 1.05em; padding-top: 6px; }
.quote-figures input[readonly] { background: var(--glass-soft); cursor: pointer; }
.quote-lines-toggle { display: block; font-size: .88em; margin: -2px 0 8px auto; }
.quote-lines { border-top: 1px solid var(--glass-line); margin-top: 12px; padding-top: 10px; }
.quote-lines h3 { font-size: 1em; margin: 0 0 8px; }
.quote-line { align-items: end; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) 70px 80px 100px 90px auto; margin-bottom: 8px; }
.quote-line label { color: #5b6878; font-size: .82em; }
.quote-line input { box-sizing: border-box; font-size: 1.2em; width: 100%; }
.quote-line-total { margin: 0 0 8px; text-align: right; }
.quote-line-total span { display: none; }
.quote-card-foot [data-duplicate] { color: var(--brand-2); }
.quote-card-foot { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.quote-stepper { align-items: center; display: inline-flex; gap: 4px; }
.quote-stepper input { text-align: center; width: 4.5em; }
.quote-heading { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 8px; }
.quote-heading.is-hidden { display: none; }
.quote-heading-box { align-items: center; display: flex; flex: 1; font-weight: 700; gap: 8px; min-width: 220px; }
.quote-heading-box input { flex: 1; font-weight: 700; min-width: 0; }
.quote-totals { margin-left: auto; max-width: 340px; padding: 12px 16px; }
.quote-dock { background: #fff; border: 1px solid var(--glass-edge); border-radius: 14px; bottom: 8px; box-shadow: var(--glass-shadow); display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; margin-top: 12px; padding: 6px 8px; position: sticky; z-index: 20; }
.quote-dock { border-top: 3px solid var(--green); box-shadow: 0 -4px 18px rgba(16, 42, 67, .18), var(--glass-shadow); }
.quote-dock .button { font-size: .88em; font-weight: 600; min-height: 40px; padding: 7px 11px; }
.quote-dock-add .button, .quote-dock-toggle { background: #e8f6f1; border: 1px solid var(--green); color: var(--green-dark); }
.quote-dock-add .button::before, .quote-dock-toggle::before { content: "+ "; font-weight: 800; }
.quote-dock-add .button:hover, .quote-dock-toggle:hover { background: #d4eee5; }
.quote-dock-toggle { display: none; }
.quote-dock-add, .quote-dock-save { align-items: center; display: flex; gap: 6px; }
.quote-dock-add { min-width: 0; overflow-x: auto; }
.quote-dock-add .button { flex: none; }
.quote-dock-save { margin-left: auto; }
.quote-picker { border: 0; border-radius: 14px; box-shadow: var(--glass-shadow); max-height: 80vh; max-width: 640px; padding: 16px; width: calc(100% - 32px); }
.quote-picker input[type="search"] { border: 1px solid var(--glass-line); border-radius: 8px; box-sizing: border-box; font: inherit; margin-bottom: 10px; padding: 9px 11px; width: 100%; }
.quote-pick { background: none; border: 0; border-bottom: 1px solid var(--glass-line); color: inherit; cursor: pointer; display: block; font: inherit; padding: 9px 4px; text-align: left; width: 100%; }
.quote-pick:hover, .quote-pick:focus { background: var(--glass-soft); }
.quote-pick span { color: #5b6878; display: block; font-size: .9em; }
.quote-wording { position: relative; }
.quote-suggest { background: #fff; border: 1px solid var(--glass-line); border-radius: 10px; box-shadow: var(--glass-shadow); left: 0; max-height: 60vh; overflow-y: auto; position: absolute; right: 0; z-index: 30; }
@media (max-width: 720px) {
  .quote-card-grid { grid-template-columns: minmax(0, 1fr); }
  .quote-line { border-bottom: 1px solid var(--glass-line); grid-template-columns: 1fr 1fr 1fr; padding-bottom: 10px; }
  .quote-line-what { grid-column: 1 / -1; }
  .quote-line-total { align-items: center; display: flex; grid-column: 1 / span 2; justify-content: space-between; margin: 0; }
  .quote-line-total span { color: #5b6878; display: inline; }
  .quote-totals { max-width: none; }
  .quote-dock { align-items: center; bottom: 4px; flex-wrap: wrap; padding: 6px; }
  .quote-dock-toggle { display: inline-flex; flex: none; }
  .quote-dock-add { display: none; order: 3; width: 100%; }
  .quote-dock-add.is-open { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; overflow: visible; }
  .quote-dock-add.is-open .button { justify-content: center; min-height: 44px; white-space: normal; }
  .quote-dock-save { flex: 1; justify-content: flex-end; margin-left: 0; min-width: 0; }
  .quote-dock-save .button { min-height: 44px; }
  .quote-dock-total { font-size: .9em; margin-right: auto; white-space: nowrap; }
}
.public-lines { display: block; font-size: .9em; margin-top: 8px; }
.public-lines > strong { display: block; }
.public-line { display: flex; gap: 12px; justify-content: space-between; }
.public-line span:last-child { white-space: nowrap; }
.public-item > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.price-sheet .money { text-align: right; white-space: nowrap; }
@media print { .price-sheet { font-size: 9pt; } .price-sheet a { color: inherit; text-decoration: none; } .price-sheet thead { display: table-header-group; } }
.duplicate-row { align-items: start; display: grid; gap: 4px 12px; grid-template-columns: auto auto minmax(0, 1fr); }
@media (max-width: 720px) { .duplicate-row { grid-template-columns: auto minmax(0, 1fr); } .duplicate-row > span { grid-column: 1 / -1; } }

/* Manuals library: headings, then makes, each folding (Marc 20/11) */
.manual-group > summary { cursor: pointer; list-style: none; }
.manual-group > summary h2 { display: inline; margin: 0; }
.manual-group > summary::before { content: "\25B8 "; }
.manual-group[open] > summary::before { content: "\25BE "; }
.manual-make { border-top: 1px solid var(--line); padding: 6px 0 6px 12px; }
.manual-make > summary { cursor: pointer; padding: 4px 0; }
pre.link-box { white-space: pre-wrap; word-break: break-word; font: inherit; }

/* Yard stock (Marc 03/12/2026) */
.stock-group { font-size: 1rem; margin: 18px 0 6px; color: var(--muted); }
.stock-system { font-size: .95rem; margin: 12px 0 4px; }
.stock-spare { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.stock-figures { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.stock-figure { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; text-align: center; }
.stock-figure .big-number { font-size: 2rem; line-height: 1.1; }
.stock-action summary { cursor: pointer; padding: 14px 16px; font-weight: 700; }
.stock-body { padding: 4px 16px 16px; }
.stock-body .field { margin: 0 0 12px; }
.stock-go { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 0; }
