/* The six base colours below are the defaults; the settings page overrides them with an inline
   <style> (see core/theme.py). Everything else is derived from them. */
:root {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1e1e1e;
  --topbar: #000000;
  --text: #ffffff;
  --accent: #fff200;
  --inactive: #ff6b66;
  --accent-text: #000000;

  --surface-alt: color-mix(in srgb, var(--surface), var(--text) 6%);
  --muted: color-mix(in srgb, var(--text), var(--surface) 38%);
  --border: color-mix(in srgb, var(--surface), var(--text) 20%);
  --danger: var(--inactive);
  --inactive-bg: color-mix(in srgb, var(--surface), var(--inactive) 14%);
  --ok-bg: color-mix(in srgb, var(--surface), var(--text) 10%);
  --err-bg: color-mix(in srgb, var(--surface), var(--inactive) 28%);
  --chip-bg: color-mix(in srgb, var(--surface), var(--text) 16%);
  --chip-text: var(--text);
  --contact: var(--muted);
  --sponsor: var(--text);
  --warning-bg: color-mix(in srgb, var(--surface), var(--accent) 14%);
  --warning-border: color-mix(in srgb, var(--surface), var(--accent) 50%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Layout */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  padding: 8px 16px;
  background: var(--topbar);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--accent); text-decoration: none; }
.brand img { display: block; height: 48px; width: auto; max-width: 160px; object-fit: contain; }
.brand span { color: var(--accent); font-size: 1.25rem; letter-spacing: 0.02em; }
.topbar nav { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.topbar nav a { color: var(--text); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover { border-bottom-color: var(--border); }
.topbar nav a.current { border-bottom-color: var(--accent); font-weight: 600; }
.topbar .system { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-left: auto; }
.topbar .system .link { padding: 2px 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }

h1 { font-size: 1.6rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 12px; }
.card h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.page-head h1, .page-head h2 { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.page-head .actions { margin-top: 0; }

/* Buttons */

.btn, button.btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--accent-text); }
.btn.disabled { color: var(--muted); cursor: default; opacity: 0.6; }

form.inline { display: inline; margin: 0; }
button.link {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--text); cursor: pointer;
}
button.link:hover { text-decoration: underline; }

/* Forms */

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field.checkbox label { font-weight: 400; display: flex; align-items: center; gap: 8px; }
.field ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.field ul li label { font-weight: 400; display: flex; align-items: center; gap: 6px; margin: 0; }
.req { color: var(--accent); margin-left: 2px; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"],
input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.help { color: var(--muted); display: block; margin-top: 4px; }
.help ul { margin: 4px 0 0; padding-left: 20px; display: block; }
p.error { color: var(--danger); margin: 4px 0; }

.messages { list-style: none; margin: 0 0 16px; padding: 0; }
.message { padding: 10px 14px; border-radius: 6px; background: var(--ok-bg); margin-bottom: 8px; }
.message.error { background: var(--err-bg); }
.message.warning, .message.info { background: var(--warning-bg); border: 1px solid var(--warning-border); }

/* Sub navigation and filters */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a {
  padding: 8px 16px; color: var(--muted); text-decoration: none;
  border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0;
}
.tabs a:hover { color: var(--text); }
.tabs a.current {
  color: var(--text); font-weight: 600; background: var(--surface);
  border-color: var(--border); margin-bottom: -1px; padding-bottom: 9px;
}

.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  padding: 14px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.filter { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.filter.grow { flex: 1 1 240px; }
.filter label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.filter.buttons { flex-direction: row; min-width: 0; gap: 8px; }
.result-count { margin: 0 0 8px; }

/* Tables */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.card .table-wrap { border-radius: 6px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table thead th { background: var(--surface-alt); font-size: 0.85rem; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-alt); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .sub { font-size: 0.85rem; color: var(--muted); }
.table .strong { font-weight: 600; }
.table .row-actions { white-space: nowrap; text-align: right; }
.table .row-actions a { margin-left: 12px; }
.table a { color: inherit; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table a[href^="mailto:"] { text-decoration: underline; }
.table a.sort:hover, .table a.sort.active { color: var(--accent); }

/* Inactive entries are shown in red */
.table tr.inactive td, .table tr.inactive td a, .table tr.inactive .sub { color: var(--inactive); }
.table tr.inactive { background: var(--inactive-bg); }
.inactive-text, a.inactive-text { color: var(--inactive); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }

/* Badges, tags, chips */

.badge {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}
.badge-sponsor { color: var(--sponsor); }
.badge-contact { color: var(--contact); }
.tag {
  font-size: 0.75rem; padding: 1px 6px; border-radius: 4px;
  background: var(--border); color: var(--muted); vertical-align: middle;
}
.tag.primary { background: var(--chip-bg); color: var(--chip-text); }
tr.inactive .tag { background: transparent; border: 1px solid currentColor; color: var(--inactive); }
.chip {
  display: inline-block; padding: 1px 10px; margin: 1px 0;
  border-radius: 999px; background: var(--chip-bg); color: var(--chip-text);
  font-size: 0.85rem; text-decoration: none;
}
a.chip:hover { text-decoration: underline; }

.breadcrumb { margin-bottom: 12px; color: var(--muted); }

dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
dt { font-weight: 600; color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.empty { color: var(--muted); }

/* Company files */

.card h3 { font-size: 1rem; margin: 20px 0 8px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.file-slot h3 { margin-top: 0; }
.preview-box {
  display: flex; align-items: center; justify-content: center;
  height: 140px; padding: 8px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; /* logos are designed for a white background */
  text-decoration: none;
}
.preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-box .muted { color: #6b6b70; }
.doc-icon { font-weight: 700; color: #1c1c1e; border: 2px solid #1c1c1e; border-radius: 6px; padding: 6px 10px; }
.file-meta { margin: 8px 0; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.file-slot .actions form, .ad .actions form { margin: 0; }
form.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
form.upload input[type="file"] { flex: 1 1 200px; min-width: 0; font: inherit; color: var(--text); }
.ads { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.ad .preview-box { height: 120px; }


/* Tag colours */

.chip-violet { background: #2d2a4a; color: #bdb4ff; }
.chip-blue { background: #1c3350; color: #9cc8ff; }
.chip-teal { background: #153b38; color: #8fe0d6; }
.chip-green { background: #1f3a19; color: #a3e18f; }
.chip-yellow { background: #3d3410; color: #f1d46b; }
.chip-orange { background: #47290f; color: #ffba7a; }
.chip-red { background: #4a2020; color: #ff9d9d; }
.chip-pink { background: #482039; color: #ff9fd2; }
.chip-gray { background: #3a3a3d; color: #cfcfd4; }

/* Filters, export links, bulk actions */

.filter-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.tag-filter { position: relative; }
.tag-filter summary {
  list-style: none; cursor: pointer; padding: 8px 10px; min-width: 160px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
}
.tag-filter-panel {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 260px; max-height: 320px;
  overflow: auto; padding: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.tag-filter-panel ul { list-style: none; margin: 0 0 10px; padding: 0; }
.tag-filter-panel li label { display: flex; gap: 8px; align-items: center; padding: 2px 0; }
.tag-filter-panel select { margin-top: 4px; }
.export-links { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; margin-bottom: 8px; font-size: 0.9rem; }

.bulk-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.bulk-bar select, .bulk-bar input[type="text"] { width: auto; min-width: 180px; }
.bulk-count { color: var(--muted); min-width: 110px; }
.table .check { width: 36px; text-align: center; }

/* Company search field */

.company-search { position: relative; }
.company-search-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px 0;
  list-style: none; max-height: 280px; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.company-search-list li { padding: 6px 12px; cursor: pointer; }
.company-search-list li[aria-selected="true"], .company-search-list li:hover { background: var(--surface-alt); outline: 1px solid var(--border); }
.company-search-list li.empty { color: var(--muted); cursor: default; }

/* Messages and notes */

.warning {
  padding: 12px 16px; margin-bottom: 16px; border-radius: 8px;
  background: var(--warning-bg); border: 1px solid var(--warning-border);
}
.warning ul { margin: 6px 0; padding-left: 20px; }
.inactive-note { color: var(--inactive); margin: -4px 0 16px; }
.nowrap { white-space: nowrap; }

.primary-contact { border-left: 4px solid var(--accent); }
.contact-name { font-size: 1.1rem; margin: 0 0 8px; }

.note-form { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.note-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.notes-list { list-style: none; margin: 0; padding: 0; }
.note { padding: 12px 0; border-bottom: 1px solid var(--border); }
.note:last-child { border-bottom: 0; }
.note.due { border-left: 4px solid var(--inactive); padding-left: 12px; }
.note-head { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.note-follow-up { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.danger-link { color: var(--danger); }
.changes { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.expired-tag { background: var(--inactive-bg); color: var(--inactive); border: 1px solid var(--inactive); }

/* Advertisements */

.ad.expired { opacity: 0.75; }
.ad .preview-box video { max-width: 100%; max-height: 100%; }
form.validity { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 0.85rem; }
form.validity input[type="date"] { width: auto; padding: 4px 6px; }
form.upload input[type="date"] { width: auto; }

/* Dashboard */

.section-title { margin-top: 32px; }
.warning.info-note { border-color: var(--border); background: var(--surface-alt); color: var(--text); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card.module { display: flex; flex-direction: column; gap: 12px; margin-bottom: 0; }
.card.module h2 { margin: 0; }
.card.module p { margin: 0; }
.card.module .btn { align-self: flex-start; margin-top: auto; }
.card.module.planned { background: transparent; border-style: dashed; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stats a { color: inherit; text-decoration: none; display: block; }
.stats a:hover .stat-value { color: var(--accent); }
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat-label { display: block; color: var(--muted); font-size: 0.85rem; }

/* Settings */

.logo-preview {
  display: flex; align-items: center; justify-content: center;
  height: 160px; margin: 12px 0; padding: 12px;
  background: #000; border: 1px solid var(--border); border-radius: 8px;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.settings-form { margin-top: 16px; max-width: 520px; }
.settings-form input[type="file"] { width: 100%; font: inherit; color: var(--text); }

@media (max-width: 520px) {
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: 10px; }
}

/* Settings: design preview, dashboard table */

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.theme-layout { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 24px; align-items: start; }
.theme-layout .settings-form { margin-top: 0; }
.field input[type="color"] { width: 64px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); cursor: pointer; }
.theme-preview {
  --bg: #121212; --surface: #1e1e1e; --topbar: #000; --text: #fff; --accent: #fff200; --inactive: #ff6b66; --accent-text: #000;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg); color: var(--text);
}
.theme-preview .tp-bar { background: var(--topbar); padding: 10px 14px; display: flex; gap: 16px; align-items: center; }
.theme-preview .tp-brand { color: var(--accent); font-weight: 700; }
.theme-preview .tp-body { padding: 16px; }
.theme-preview .tp-card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--surface), var(--text) 20%); border-radius: 10px; padding: 16px; }
.theme-preview .tp-muted { color: color-mix(in srgb, var(--text), var(--surface) 38%); }
.theme-preview .tp-btn { display: inline-block; background: var(--accent); color: var(--accent-text); padding: 6px 12px; border-radius: 6px; margin-right: 12px; }
.theme-preview .tp-inactive { color: var(--inactive); }
.position-cell input { width: 5rem; }
.stat-toggle { display: block; font-weight: 400; }
@media (max-width: 760px) { .theme-layout { grid-template-columns: 1fr; } }

/* Sponsorships: status, payment, detail layout, public form */

.status {
  display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid currentColor; white-space: nowrap;
}
.status-draft, .link-revoked, .link-expired { color: var(--muted); }
.status-requested, .link-active { color: var(--accent); }
.status-accepted, .link-completed { color: #5fd3a2; background: color-mix(in srgb, #5fd3a2, transparent 88%); }
.status-declined { color: var(--inactive); }
.status-no_response { color: color-mix(in srgb, var(--accent), var(--text) 35%); border-style: dashed; }
.pay { font-size: 0.8rem; font-weight: 600; }
.pay-paid { color: #5fd3a2; }
.pay-partial { color: var(--accent); }
.pay-open { color: var(--inactive); }
.pay-none { color: var(--muted); }
.warn-text { color: var(--inactive); }
.contact-number { margin: -6px 0 16px; }
.stats.totals { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 16px; }
.stats.totals li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.detail-grid .card { margin-bottom: 0; }
.detail-grid + .card, .card + .card { margin-top: 20px; }
.cards > .card { margin-top: 0; }  /* the grid has its own gap; the rule above would push every card after the first down */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 4px 0; }
.inline-form { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.inline-form .actions { margin-bottom: 14px; }
.copy-link { display: flex; gap: 6px; margin-bottom: 4px; }
.copy-link input { min-width: 220px; font-size: 0.8rem; }
.row-actions form.inline { margin-left: 12px; }
code { background: var(--surface-alt); padding: 1px 5px; border-radius: 4px; }

.public-container { max-width: 760px; }
.public h1 { margin-top: 8px; }
.public-footer { margin-top: 24px; text-align: center; font-size: 0.9rem; }
.choice { border: 0; margin: 0; padding: 0; }
.choice > div, .choice ul { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.choice label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 1.05rem; font-weight: 400;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; margin: 0;
}
.choice label:has(input:checked) { border-color: var(--accent); }
.field > div[id] { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.field > div[id] > div label { font-weight: 400; display: flex; align-items: center; gap: 6px; margin: 0; }
.contract-text { max-height: 340px; overflow: auto; padding: 12px 16px; margin-bottom: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.suggestions { margin: -6px 0 14px; }
.intro p { margin: 0 0 10px; }

/* E-mail templates: editor, preview, log */

.rich-editor { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.rich-toolbar .btn { padding: 3px 10px; }
.rich-toolbar select { width: auto; max-width: 260px; }
.rich-surface {
  min-height: 260px; padding: 14px 16px; background: #fff; color: #222;
  font: 14px/1.5 Arial, Helvetica, sans-serif;
}
.rich-surface:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.rich-surface a { color: #0b57d0; }
.rich-surface img { cursor: pointer; }
.rich-surface img:hover { outline: 2px solid var(--accent); outline-offset: 2px; }

/* E-mail pictures: dialog of the editor, library list */

.image-dialog {
  width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 20px 22px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
}
.image-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.image-dialog h2 { margin-top: 0; }
.image-dialog [hidden] { display: none !important; }
.image-dialog .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.image-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.image-choice {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px; padding: 8px;
  background: #fff; color: #222; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.8rem;
}
.image-choice[aria-pressed="true"] { border-color: var(--accent); }
.image-choice img { max-width: 100%; max-height: 64px; object-fit: contain; }
.image-choice span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 16px; }
.image-preview { padding: 12px; margin-bottom: 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: auto; max-height: 220px; }
.image-preview img { display: block; max-width: none; }
.image-thumb { display: block; max-width: 120px; max-height: 60px; background: #fff; border: 1px solid var(--border); border-radius: 4px; }
.inline-check { display: flex; align-items: center; gap: 6px; font-weight: 400; margin-bottom: 10px; }
.mail-preview { margin-top: 20px; }
.mail-frame { width: 100%; min-height: 360px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.placeholder-help { margin-top: 16px; }
.placeholder-help dl { margin-top: 8px; }

/* Error pages */

.not-found { text-align: center; padding: 32px 20px; }
.not-found .error-code { margin: 0; font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--accent); }
.not-found .actions { justify-content: center; }

/* Settings: PDF layout */

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pills a {
  padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); text-decoration: none; background: var(--surface);
}
.pills a:hover { border-color: var(--muted); }
.pills a.current { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.placeholder-help { padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.placeholder-help h3 { margin-top: 0; }
.placeholder-help dl { grid-template-columns: 1fr; gap: 0; font-size: 0.9rem; }
.placeholder-help dt { color: var(--text); margin-top: 8px; }
.pdf-form .field ul { flex-direction: column; }
.pdf-form .field > div[id] { flex-direction: column; }

/* Mailing progress */

.send-progress p { margin: 0 0 8px; }
.send-progress ul { margin: 6px 0 10px; padding-left: 20px; }
.send-progress .btn { margin-right: 8px; }

/* Address import */

tr.row-error { background: color-mix(in srgb, var(--inactive), transparent 90%); }
.column-use { margin: 12px 0 0; }
.column-use summary { cursor: pointer; color: var(--muted); }
.column-use .table-wrap { margin-top: 8px; }
