/* P.HD SI v1 — brand blue #5bc5f2; automatic / light / dark theme */
:root {
  --blue: #5bc5f2; --blue-dark: #1f8fc0; --on-accent: #0b2734; --text: #1d1d1b; --text-2: #5f6368; --bg: #f5f6f8; --surface: #ffffff;
  --border: #e2e5e9; --danger: #c62828; --danger-bg: #fdecea; --ok: #2e7d32; --ok-bg: #e9f5ea; --warn-bg: #fff6e5; --hover: #f0f2f5;
}
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] {
  --text: #e8eaed; --text-2: #a5abb3; --bg: #121417; --surface: #1b1e23; --border: #2c3138; --danger-bg: #3b1d1d; --ok-bg: #1c3220; --warn-bg: #352c1c; --hover: #23272d; --blue-dark: #5bc5f2; } }
:root[data-theme="dark"] { --text: #e8eaed; --text-2: #a5abb3; --bg: #121417; --surface: #1b1e23; --border: #2c3138; --danger-bg: #3b1d1d; --ok-bg: #1c3220; --warn-bg: #352c1c; --hover: #23272d; --blue-dark: #5bc5f2; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--blue-dark); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 16px; font-weight: 650; } h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; } h3 { font-size: 14px; margin: 18px 0 8px; font-weight: 650; }
code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
code.big { font-size: 18px; padding: 4px 10px; user-select: all; }
pre { white-space: pre-wrap; font-size: 12px; margin: 4px 0; }

/* logo: dark version on dark theme */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; } :root[data-theme="dark"] .logo-dark { display: inline; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .logo-light { display: none; } :root[data-theme="auto"] .logo-dark { display: inline; } }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text) !important; font-weight: 700; } .brand .logo { height: 20px; } .brand:hover { text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; } .topbar-right form { margin: 0; }
.current-user { color: var(--text) !important; font-weight: 600; }
.preferences { display: flex; align-items: center; gap: 10px; }
.company-switch { margin: 0; }
.company-switch select { max-width: 220px; padding: 4px 8px; font-size: .9rem; }
/* «hidden» always hides, whatever display a class gives (form tabs, record tabs, fields shown on a checkbox) */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.group-grid td, .group-grid th { text-align: center; }
.group-grid td:first-child, .group-grid th:first-child { text-align: left; }
.locale-switch { display: flex; align-items: center; gap: 2px; margin: 0; color: var(--text-2); }
.locale-switch button { background: none; border: 0; color: var(--text-2); cursor: pointer; font-weight: 600; padding: 2px 4px; }
.locale-switch button.active { color: var(--text); }
.layout { display: flex; align-items: flex-start; }
.sidebar { position: sticky; top: 54px; width: 240px; height: calc(100vh - 54px); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 10px 8px 24px; overflow-y: auto; overscroll-behavior: contain; }
.nav-link { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; color: var(--text) !important; }
.nav-link:hover { background: var(--hover); text-decoration: none; }
.nav-link.active { background: var(--hover); font-weight: 600; }
.nav-link.external { color: var(--text-2) !important; } .sidebar .arrow { font-size: 11px; color: var(--text-2); }
.nav-group { margin-top: 2px; }
.nav-group-title { display: flex; width: 100%; justify-content: space-between; align-items: center; background: none; border: 0; padding: 8px 10px 4px; cursor: pointer;
  font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); font-weight: 600; border-radius: 6px; }
.nav-group-title:hover { color: var(--text); }
.nav-group-title { text-align: left; gap: 8px; }
.nav-group .chevron { font-size: 14px; transition: transform .15s; }
.nav-group.open .chevron { transform: rotate(90deg); }
.nav-group:not(.open) .nav-items { display: none; }
.nav-items { padding-left: 6px; }
.content { flex: 1; min-width: 0; padding: 22px 26px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; } .page-head h1 { margin: 0; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.box.narrow { max-width: 480px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 12.5px; color: var(--text-2); letter-spacing: .01em; }
.form label > input, .form label > select, .form label > textarea, .form .select-row select { font-weight: 400; font-size: 14px; color: var(--text); }
.form label .label-text { display: inline; }
.form small, .form label small { font-weight: 400; color: var(--text-2); }
.form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 14px; color: var(--text); }
.multi label.check { color: var(--text); font-size: 14px; } .form label.check small { display: block; }
.form.inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; } .form.inline label.wide { flex: 1; min-width: 200px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 22px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; min-height: 36px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue); }
input:disabled { opacity: .6; }
fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; } legend { font-weight: 600; padding: 0 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 38px; line-height: 1.2; vertical-align: middle; font: inherit; font-weight: 650; text-decoration: none !important; background: var(--blue); color: var(--on-accent) !important; border: 1px solid var(--blue); border-radius: 6px; padding: 8px 16px; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(.95); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text) !important; border-color: var(--border); } .btn-secondary:hover { background: var(--hover); filter: none; }
.btn-danger { background: transparent; color: var(--danger) !important; border-color: var(--danger); } .btn-danger:hover { background: var(--danger-bg); filter: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-dark); cursor: pointer; font: inherit; text-align: left; }
.icon-btn { background: none; border: 1px solid var(--border); border-radius: 6px; width: 32px; height: 32px; cursor: pointer; color: var(--text); font-size: 16px; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .buttons > form { display: inline-flex; } .buttons.column { flex-direction: column; align-items: flex-start; } .buttons form { margin: 0; }
.notice { border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; background: var(--warn-bg); }
.notice.ok { background: var(--ok-bg); } .notice.error { background: var(--danger-bg); color: var(--text); }
.notice.highlight { background: var(--surface); border: 1px solid var(--border); }
.muted { color: var(--text-2); } .small, small { font-size: 12px; } .pre { white-space: pre-line; }
.rich { line-height: 1.5; } .rich img { max-width: 100%; height: auto; } .rich table { border-collapse: collapse; margin: 8px 0; } .rich td, .rich th { border: 1px solid var(--line); padding: 4px 8px; } .rich ul, .rich ol { padding-left: 20px; } .rich h1, .rich h2, .rich h3 { margin: 12px 0 6px; }
.amount-input { width: 6rem; }
.check.locked { opacity: .65; } .check.locked input { cursor: not-allowed; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 12px; color: var(--text-2); font-weight: 600; }
.table tfoot .list-footer td { font-weight: 600; border-top: 2px solid var(--border); border-bottom: 0; white-space: nowrap; }
.table tr.faded { opacity: .5; } .table tr.row-danger td:nth-child(2) code { color: var(--danger); }
.scroll-x { overflow-x: auto; }
.grid td, .grid th { text-align: center; padding: 4px 6px; } .grid td:first-child { text-align: left; white-space: nowrap; }
.grid .module-row th { text-align: left; background: var(--bg); color: var(--text); font-size: 13px; padding-top: 12px; }
.depth-1 { padding-left: 26px !important; } .depth-2 { padding-left: 44px !important; }
.grid thead th { position: sticky; top: 54px; background: var(--surface); z-index: 1; }
dialog .grid thead th { top: 0; }                                          /* in a modal there is no top bar above the table */
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; }
.tag.ok { color: var(--ok); } .tag.danger { color: var(--danger); } .tag.accent { color: var(--blue-dark); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; } .filters input { min-width: 200px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; color: var(--text) !important; display: flex; flex-direction: column; }
.stat b { font-size: 26px; font-weight: 650; } .stat span { color: var(--text-2); font-size: 13px; } a.stat:hover { text-decoration: none; background: var(--hover); }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.module { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; } .module h3 { margin: 0 0 8px; }
.module ul { margin: 0; padding-left: 18px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; } .details dt { color: var(--text-2); } .details dd { margin: 0; }
.activity-list { list-style: none; padding: 0; margin: 0; font-size: 13px; } .activity-list li { padding: 4px 0; border-bottom: 1px solid var(--border); } .activity-list span { color: var(--text-2); margin-right: 6px; }
.plain-list { padding-left: 18px; } .inline-form { display: inline; }
.codes { columns: 2; font-size: 16px; } .codes li { margin: 6px 0; }
.pagination { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 14px 0; }
.page-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text) !important; font-weight: 600; text-decoration: none !important; }
a.page-btn:hover { border-color: var(--blue); background: var(--hover); }
.page-btn.disabled { opacity: .4; }
.page-of { color: var(--text-2); }
.qr { display: block; width: 220px; height: 220px; margin: 10px auto; background: #fff; padding: 8px; border-radius: 6px; }
.nowrap { white-space: nowrap; } .clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.sticky-bar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin: 0; }
details summary { cursor: pointer; color: var(--text-2); font-size: 12px; }
.guest { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.guest-top { position: absolute; top: 14px; right: 16px; }
.guest-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 32px 28px; }
.guest-logo { text-align: center; margin-bottom: 24px; } .guest-logo .logo { width: 230px; max-width: 100%; }
.brand .logo-own { height: 32px; width: auto; max-width: 180px; object-fit: contain; } .guest-logo .logo-own { width: auto; max-height: 90px; max-width: 260px; object-fit: contain; }
.guest-card h1 { font-size: 18px; } .guest-card .btn { width: 100%; }
.secondary-actions { display: flex; gap: 16px; justify-content: center; margin: 14px 0; flex-wrap: wrap; } .secondary-actions form { margin: 0; }
.footer { text-align: center; color: var(--text-2); font-size: 12px; margin: 20px 0 0; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 6px; }
.bar-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; align-items: flex-end; gap: 2px; height: 140px; width: 100%; justify-content: center; }
.bar { width: 40%; max-width: 12px; border-radius: 3px 3px 0 0; min-height: 1px; }
.bar.ok, .dot.ok { background: var(--blue); } .bar.bad, .dot.bad { background: var(--danger); opacity: .75; }
.bar-day small { color: var(--text-2); font-size: 10px; }
.legend { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; margin: 10px 0 0; } .dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.mobile-only { display: none; }
.translations-table td.source { width: 45%; color: var(--text-2); } .translations-table input, .translations-table textarea { width: 100%; }
.lang-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-2); margin-left: 4px; vertical-align: 1px; }
.field label.translation { flex-direction: row; align-items: flex-start; gap: 8px; } .field label.translation .lang-tag { margin: 10px 0 0; min-width: 26px; text-align: center; }
.field label.translation input, .field label.translation textarea { flex: 1; }
.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; } .file-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-list .remove { margin-left: auto; font-size: 12px; } .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: #fff; } .thumb.big { width: 96px; height: 96px; }
.section-title { margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); } .section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
input[type=file] { padding: 6px; }
.quick-search { display: block; width: 100%; max-width: 320px; margin: 0 0 10px; }
[data-results] { transition: opacity .12s; } [data-results].loading { opacity: .55; }
.columns-editor td { padding: 4px 6px; } .columns-editor label.check { margin: 0; } .reset-columns { margin-top: 12px; gap: 16px; }
.table .col-action { width: 72px; text-align: center; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.table .col-check { width: 32px; padding-left: 8px; padding-right: 0; }
.table .col-check input { width: 16px; height: 16px; cursor: pointer; margin: 0; vertical-align: middle; display: block; }
.table td.col-check, .table td.col-action, .table th.col-check { vertical-align: middle; }
.table tr:has(> td.col-action, > td.col-check) > td { vertical-align: middle; }   /* a row with selection / actions: everything on one line */
.table td.col-action > * { vertical-align: middle; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.bulk-bar[hidden] { display: none !important; }
.bulk-bar form { margin: 0; }
.bulk-field { position: relative; }
.bulk-apply { position: absolute; right: 0; top: 0; font-size: 12px; font-weight: 600; color: var(--blue-dark); }
.row-del-form { display: inline-flex; margin: 0; vertical-align: middle; }
.row-del { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; border: 0; background: none; color: var(--text-2); cursor: pointer; padding: 0; vertical-align: middle; }
.row-del:hover { background: var(--danger-bg); color: var(--danger); }
.row-as:hover { background: var(--hover); color: var(--blue-dark); }
.row-edit { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; color: var(--text-2) !important; text-decoration: none !important; font-size: 15px; }
.row-edit:hover { background: var(--hover); color: var(--blue-dark) !important; }
.passkey-suggest { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .passkey-suggest[hidden] { display: none; }
.passkey-login { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12px; } .or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
/* modal */
dialog.modal { border: 1px solid var(--border); border-radius: 10px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.modal.wide { width: min(1180px, calc(100vw - 32px)); }
@media (min-width: 1100px) { body.ai-open dialog.modal { margin-left: 24px; margin-right: auto; max-width: calc(100vw - 500px); } }
dialog.modal::backdrop { background: rgba(15,17,20,.45); }
.modal-content { position: relative; padding: 22px 24px; overflow: auto; max-height: calc(100vh - 50px); }
.modal-content h2 { margin-right: 32px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--text-2); cursor: pointer; }
.modal-actions { display: flex; gap: 8px; margin-top: 8px; }
.delete-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 8px; z-index: 100; font-size: 13px; }
/* records */
.record-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 24px; margin: 0; }
.record-fields div.wide { grid-column: 1 / -1; } .record-fields dt { font-size: 12px; color: var(--text-2); } .record-fields dd { margin: 2px 0 0; }
.fields .field.wide, .fields label.wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field[hidden] { display: none; }
.field > label:not(.check) { color: var(--text-2); font-weight: 500; font-size: 12.5px; }
.req { color: var(--danger); } .field-error { color: var(--danger) !important; }
.multi { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-weight: 400; }
.select-row { display: flex; gap: 6px; align-items: center; } .select-row select { flex: 1; min-width: 0; }
.icon-btn.small { width: 28px; height: 28px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--text) !important; text-decoration: none !important; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; border-bottom: 1px solid var(--border); }
.tabs > button, .tabs > a { background: none; border: 0; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--text-2) !important; border-radius: 6px 6px 0 0; }
.tabs > .active { color: var(--text) !important; background: var(--surface); font-weight: 600; box-shadow: 0 1px 0 var(--surface), 0 0 0 1px var(--border); }
.tabs .count { font-size: 11px; color: var(--text-2); margin-left: 2px; }
.tag.warn { color: #b26a00; } .issues { margin: 6px 0 0; padding-left: 18px; }
.rows-link tbody tr[data-href] { cursor: pointer; } .rows-link tbody tr[data-href]:hover { background: var(--hover); }
.list-editor td { vertical-align: middle; } .list-editor input:not([type=checkbox]):not([type=color]) { width: 100%; }
.list-editor .handle { cursor: grab; color: var(--text-2); user-select: none; width: 24px; }
.list-editor tr.dragging { opacity: .4; }
input[type=color] { padding: 2px; width: 44px; height: 32px; } input[type=color]:disabled { opacity: .3; cursor: pointer; }
@media (max-width: 800px) {
  .mobile-only { display: inline-block; } .sidebar { position: fixed; top: 54px; bottom: 0; left: 0; height: auto; z-index: 9; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 2px 0 12px rgba(0,0,0,.15); } .content { padding: 16px; } .current-user { display: none; }
  .cols { grid-template-columns: 1fr; } .brand span { display: none; }
}

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type=color] { width: 48px; height: 32px; padding: 2px; min-height: 0; }
.field.static .static-value { padding: 8px 0; color: var(--text); }
.field.static .label-text { color: var(--text-2); font-size: .85rem; }
.bell { position: relative; display: inline-flex; color: var(--text-2); text-decoration: none !important; }
.bell:hover { color: var(--blue-dark); }
.bell .badge { position: absolute; top: -6px; right: -10px; background: var(--blue); color: var(--on-accent); border-radius: 9px; font-size: .7rem; font-weight: 700; padding: 0 5px; line-height: 16px; }
.notification-list li.unread a { font-weight: 600; }
code.token { display: inline-block; margin-top: 6px; padding: 6px 8px; background: var(--hover); border-radius: 4px; word-break: break-all; user-select: all; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

/* numbers in tables, warnings */
.table th.num, .table td.num { text-align: right; white-space: nowrap; } .text-danger { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; } .btn.btn-small { padding: 4px 10px; font-size: .85em; min-height: 30px; }
.lightbox { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox figcaption { font-size: 12.5px; color: var(--text-2); } .lightbox button { position: absolute; top: 0; right: 0; }
.table td .thumb { cursor: zoom-in; }
.progress-row { display: flex; align-items: center; gap: 10px; } .progress-row progress { flex: 1; height: 10px; accent-color: var(--blue); }
.chart { width: 100%; height: 140px; } .chart-line { fill: none; stroke: var(--blue); stroke-width: 2; } .chart-target { stroke: var(--text-2); stroke-dasharray: 4 4; } .chart-dot { fill: var(--blue); } .chart-dot.off { fill: var(--danger); }
/* SWOT matrix */
.swot { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 10px; }
.swot-head { font-weight: 600; text-align: center; color: var(--text-2); }
.swot-side { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; justify-self: center; font-weight: 600; color: var(--text-2); }
.swot-cell { display: block; min-height: 170px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.swot-cell:hover { border-color: var(--blue); }
.swot-cell .swot-title { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.swot-cell ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.swot-strength { background: color-mix(in srgb, #188038 8%, var(--surface)); } .swot-weakness { background: color-mix(in srgb, #f9ab00 10%, var(--surface)); }
.swot-opportunity { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); } .swot-threat { background: color-mix(in srgb, #d93025 8%, var(--surface)); }
/* phone: the top bar keeps to the screen (company select shrinks; language and theme are in My profile, linked from the menu) */
@media (max-width: 640px) {
  .topbar { gap: 8px; padding: 0 10px; } .topbar-right { gap: 10px; min-width: 0; }
  .company-switch { min-width: 0; } .company-switch select { max-width: 120px; min-width: 0; text-overflow: ellipsis; }
  .sidebar .nav-link.mobile-only { display: flex; font-weight: 600; }
  .topbar-right .preferences { display: none; }                       /* language and theme: in My profile */
}
@media (max-width: 640px) { .swot { grid-template-columns: 1fr; } .swot-head, .swot-side { display: none; } }
/* organisation chart: top-down tree from nested lists (connectors drawn with borders) */
.orgtree-wrap { overflow-x: auto; padding: 8px 0 16px; }
.orgtree, .orgtree ul { display: flex; justify-content: center; margin: 0; padding: 20px 0 0; position: relative; list-style: none; }
.orgtree { padding-top: 0; min-width: max-content; }
.orgtree li { position: relative; padding: 20px 6px 0; text-align: center; }
.orgtree li::before, .orgtree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 20px; border-top: 1px solid var(--text-2); }
.orgtree li::after { right: auto; left: 50%; border-left: 1px solid var(--text-2); }
.orgtree li:only-child::before, .orgtree li:only-child::after { display: none; }
.orgtree li:only-child { padding-top: 0; }
.orgtree li:first-child::before, .orgtree li:last-child::after { border: 0 none; }
.orgtree li:last-child::before { border-right: 1px solid var(--text-2); border-radius: 0 6px 0 0; }
.orgtree li:first-child::after { border-radius: 6px 0 0 0; }
.orgtree ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 20px; border-left: 1px solid var(--text-2); }
.orgtree > li::before, .orgtree > li::after { display: none; }
.orgtree > li { padding-top: 0; }
/* from the third level down: a list under each box, joined by a rail on the left and a tick to each box */
.orgtree > li > ul > li > .org-box { width: 210px; }
.orgtree-wrap .orgtree > li > ul > li > ul { display: block; padding: 6px 0 0; margin-left: calc(50% - 105px); text-align: left; }
.orgtree-wrap .orgtree > li > ul > li > ul::before { display: none; }
.orgtree-wrap .orgtree > li > ul > li > ul ul { display: block; padding: 0 0 0 20px; }
.orgtree-wrap .orgtree > li > ul > li > ul ul::before { display: none; }
.orgtree-wrap .orgtree > li > ul > li > ul li { display: block; padding: 8px 0 0 20px; text-align: left; }
.orgtree-wrap .orgtree > li > ul > li > ul li::before { content: ''; display: block; position: absolute; left: 8px; right: auto; top: 0; bottom: 0; width: 0; height: auto; border: 0; border-left: 1px solid var(--text-2); border-radius: 0; }
.orgtree-wrap .orgtree > li > ul > li > ul li:first-child::before { top: -8px; }
.orgtree-wrap .orgtree > li > ul > li > ul li:last-child::before { bottom: auto; height: 34px; }
.orgtree-wrap .orgtree > li > ul > li > ul li:first-child:last-child::before { height: 42px; }
.orgtree-wrap .orgtree > li > ul > li > ul li::after { content: ''; display: block; position: absolute; left: 8px; right: auto; top: 34px; width: 12px; height: 0; border: 0; border-top: 1px solid var(--text-2); border-radius: 0; }
.orgtree-wrap .orgtree > li > ul > li > ul li:only-child { padding-top: 8px; }
.orgtree-wrap .orgtree > li > ul > li > ul li:only-child::before, .orgtree-wrap .orgtree > li > ul > li > ul li:only-child::after { display: block; }
.orgtree-wrap .orgtree > li > ul > li > ul li:first-child::before, .orgtree-wrap .orgtree > li > ul > li > ul li:last-child::before { border: 0; border-left: 1px solid var(--text-2); border-radius: 0; }
.orgtree-wrap .orgtree > li > ul > li > ul li:first-child::after, .orgtree-wrap .orgtree > li > ul > li > ul li:last-child::after { border: 0; border-top: 1px solid var(--text-2); border-radius: 0; }
.orgtree-wrap .orgtree > li > ul > li > ul .org-box { min-width: 160px; width: max-content; max-width: 230px; }
.org-box { display: inline-flex; flex-direction: column; gap: 2px; min-width: 150px; max-width: 220px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.org-role { font-weight: 700; color: var(--text); text-decoration: none; }
.org-role:hover { color: var(--blue); }
.org-person { font-size: 13px; color: var(--text-2); text-decoration: none; }
a.org-person:hover { color: var(--blue); }
@media print {
  .topbar, .sidebar, .page-head .buttons, .no-print { display: none !important; }
  .content { margin: 0 !important; padding: 0 !important; }
  .orgtree-wrap { overflow: visible; }
}
.nav-section { padding: 10px 14px 2px 22px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
/* organisation chart drawn by the OrgChart library (vendor/orgchart): platform colours, plain cards */
.org-host { position: relative; overflow: hidden; min-height: 460px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); text-align: center;
  --org-line: var(--text-2); --org-hover: transparent; }
.org-host.org-live { cursor: grab; }
.org-host .orgchart { background-image: none; padding: 24px; }
.org-host .orgchart .node { padding: 0; }
.org-card { display: flex; flex-direction: column; gap: 2px; width: 200px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-align: center; cursor: default; }
.org-card-company { background: var(--hover); }
.org-card-title { font-weight: 700; color: var(--text) !important; text-decoration: none !important; }
.org-card-person { font-size: 13px; color: var(--text-2) !important; text-decoration: none !important; }
a.org-card-title:hover, a.org-card-person:hover { color: var(--blue-dark) !important; }
@media print { .org-host { overflow: visible; border: 0; min-height: 0; } .org-host .orgchart { transform: none !important; } }
/* sales pipeline: one column per stage (stacked on a phone) */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pipeline-col { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; min-width: 0; }
.pipeline-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin-top: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text) !important; text-decoration: none !important; font-size: 13px; }
.pipeline-card:hover { border-color: var(--blue); }
@media (max-width: 800px) { .pipeline { grid-template-columns: 1fr; } }
/* install wizard */
.wizard-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.wizard-steps a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text) !important; text-decoration: none !important; background: var(--surface); }
.wizard-steps span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--hover); font-size: 12px; font-weight: 700; }
.wizard-steps .current a { border-color: var(--blue); }
.wizard-steps .current span { background: var(--blue); color: var(--on-accent); }
.choice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; margin: 8px 0 12px; }
.org-card-staff { border-style: dashed; }
.org-card-external { font-style: italic; }
.ai-chat { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-width: 900px; }
.ai-q { align-self: flex-end; max-width: 80%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; white-space: pre-wrap; }
.ai-a { align-self: flex-start; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-ask { max-width: 900px; }
.ai-ask textarea { width: 100%; }
/* user manual */
.udi-label { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 12px; background: #fff; color: #000; border-radius: 8px; max-width: 520px; }
.udi-code svg { display: block; width: 150px; height: auto; }
.udi-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.udi-text code { font-size: 12px; overflow-wrap: anywhere; color: #000; background: none; }
.release-notes { white-space: pre-wrap; font: inherit; font-size: 13px; max-height: 360px; overflow: auto; background: var(--bg); padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.dash-company { font-weight: 500; font-size: .8em; }
.dash-area { margin: 0 0 18px; }
.dash-area h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 0 0 8px; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.dash-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: var(--text) !important; text-decoration: none !important; transition: transform .1s, box-shadow .1s; }
.dash-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.dash-card b { font-size: 26px; line-height: 1.1; }
.dash-card span { font-size: 13px; color: var(--text-2); }
.dash-card small { font-size: 12px; color: var(--text-2); }
.dash-card.tone-danger b { color: var(--danger); }
.dash-card.tone-warn b { color: #b26a00; }
.dash-card.tone-info b { color: var(--blue-dark); }
.dash-card.tone-ok b { color: var(--text-2); }
.overview-figures { margin-bottom: 18px; }
.overview-lists td { vertical-align: middle; }
.tex-grid td, .tex-grid th { white-space: nowrap; }
.tex-grid .tex-total td { font-weight: 600; border-top: 1.5px solid var(--text-2); }
.tex-done { color: var(--ok); font-weight: 700; }
.survey-form { max-width: 760px; }
.survey-intro { white-space: normal; }
.survey-q { border: 0; border-bottom: 1px solid var(--border); padding: 10px 0; margin: 0; }
.survey-q legend { font-weight: 600; padding: 0; margin-bottom: 6px; color: var(--text); font-size: 14px; }
.survey-options { display: flex; gap: 6px; flex-wrap: wrap; }
.survey-options label { flex-direction: row !important; align-items: center; gap: 0 !important; }
.survey-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.survey-options span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border); font-weight: 700; color: var(--text); cursor: pointer; }
.survey-options small { display: none; }
.survey-options input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.survey-options input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 2px; }
.survey-scale-head { display: none; }
.guest-card.wide { max-width: 820px; }
.dash-system summary { cursor: pointer; list-style: none; }
.dash-system summary h2 { display: inline; }
.dash-system[open] summary { margin-bottom: 12px; }
.impersonating { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-color: var(--blue); }
.impersonating form { margin: 0; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell form { display: inline-block; margin: 2px 0 2px 6px; }
.setup-logo { height: 24px; width: auto; vertical-align: middle; background: #fff; border-radius: 4px; }
.setup-table td { padding: 4px 6px; vertical-align: middle; }
.setup-table input, .setup-table select { width: 100%; min-width: 120px; }
.setup-table .w-short { min-width: 90px; }
.token-form { display: grid !important; grid-template-columns: minmax(200px, 1fr) 160px auto auto; gap: 12px 16px; align-items: end; max-width: 900px; }
.token-form label { margin: 0; }
.token-form .check { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 40px; white-space: nowrap; }
.token-form .btn { min-height: 40px; }
@media (max-width: 700px) { .token-form { grid-template-columns: 1fr; } .token-form .btn { justify-self: start; } }
.cert-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--blue); border-radius: 16px; color: var(--blue-dark) !important; font-weight: 600; font-size: 13px; text-decoration: none !important; }
.cert-link:hover, .cert-link.active { background: var(--blue); color: var(--on-accent) !important; }
@media (max-width: 700px) { .cert-link span { display: none; } .cert-link { padding: 5px 7px; } }
.cert-steps { list-style: none; margin: 0; padding: 0; }
.cert-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.cert-step:first-child { border-top: 0; }
.cert-mark { flex: 0 0 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 2px solid var(--border); color: var(--text-2); }
.cert-step.done .cert-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.cert-step.next .cert-mark { border-color: var(--blue); color: var(--blue-dark); }
.cert-step.next { background: var(--hover); border-radius: 8px; padding: 12px 10px; }
.cert-body { flex: 1; min-width: 0; }
.cert-body p { margin: 4px 0; }
.cert-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: var(--blue); color: var(--on-accent); font-size: 11px; font-weight: 700; vertical-align: middle; }
.cert-missing { color: var(--text-2); }
.cert-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .cert-step { flex-wrap: wrap; } .cert-actions { width: 100%; justify-content: flex-start; padding-left: 40px; } }
.help-link { color: var(--text-2) !important; font-weight: 500; }
.manual { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.manual-toc { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.manual-toc a { padding: 5px 10px; border-radius: 6px; color: var(--text) !important; text-decoration: none; }
.manual-toc a:hover { background: var(--hover); } .manual-toc a.active { background: var(--hover); font-weight: 600; }
.manual-body { max-width: 860px; line-height: 1.6; }
.manual-body h2 { margin: 28px 0 8px; font-size: 19px; } .manual-body h3 { margin: 20px 0 6px; font-size: 16px; }
.manual-body p, .manual-body li { color: var(--text); } .manual-body ul, .manual-body ol { padding-left: 22px; }
.manual-body figure { margin: 16px 0 22px; } .manual-body figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; }
.manual-body figcaption { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.manual-body .tip { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.manual-body kbd, .manual-body .ui { font-weight: 600; }
.manual-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--border); }
.manual-print .manual-chapter { break-before: page; }
.manual-cover { text-align: center; padding: 120px 0 60px; } .manual-cover h1 { font-size: 34px; margin-bottom: 6px; }
@media (max-width: 860px) { .manual { grid-template-columns: 1fr; } .manual-toc { position: static; flex-direction: row; flex-wrap: wrap; } }
@media print { .manual-toc, .manual-nav { display: none !important; } .manual { display: block; } .manual-body { max-width: none; } .manual-body figure { break-inside: avoid; } }
.manual-cover svg, .manual-cover img { width: 280px; max-width: 70%; height: auto; }
@media print { body, .layout, .content { background: #fff !important; } }

/* AI assistant: round button at the bottom right + panel */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--blue); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .15s; }
.ai-fab:hover { transform: scale(1.06); }
.ai-fab:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.ai-fab.open { transform: rotate(20deg); }
.ai-panel { position: fixed; right: 20px; bottom: 88px; z-index: 900; width: min(440px, calc(100vw - 32px)); height: min(620px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); overflow: hidden; }
.ai-panel[hidden] { display: none !important; }
.ai-panel.min { height: auto; }
.ai-panel.min > :not(.ai-panel-head) { display: none !important; }
.ai-panel-head { cursor: default; user-select: none; }
.ai-panel-list { flex: 1; overflow-y: auto; padding: 8px 12px; }
.ai-panel-list[hidden], .ai-panel-log[hidden] { display: none !important; }
.ai-conv { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border); }
.ai-conv-open { flex: 1; min-width: 0; text-align: left; padding: 8px 0; display: flex; flex-direction: column; gap: 2px; color: var(--text) !important; }
.ai-conv-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-conv-del { padding: 4px 8px; color: var(--text-2) !important; }
.ai-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ai-panel-tools { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ai-panel-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.ai-panel-log .ai-q { max-width: 85%; }
.ai-panel-log .ai-a { font-size: 14px; }
.ai-wait { color: var(--text-2); font-style: italic; }
.ai-error { color: var(--danger); }
.ai-panel-ask { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); }
.ai-panel-ask textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; }
.ai-panel-off { margin: 10px 12px; }
@media (max-width: 600px) { .ai-fab { right: 16px; bottom: 16px; } .ai-panel { right: 16px; bottom: 80px; height: calc(100vh - 140px); } }
@media print { .ai-fab, .ai-panel { display: none !important; } }
.ai-panel-suggest { padding: 8px 12px 0; border-top: 1px solid var(--border); }
.ai-panel-suggest + .ai-panel-ask { border-top: 0; }
body:has(.ai-fab) .content { padding-bottom: 88px; }   /* the round AI button never covers the end of a page */

/* self-service registration */
.signup-slug { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.signup-slug input { flex: 1; min-width: 140px; }
.signup-slug .muted { font-size: 13px; overflow-wrap: anywhere; }
.antispam { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.antispam-icon { font-size: 22px; line-height: 1; }
.antispam.done b { color: var(--blue); }
.form .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* print estimates: costing */
.estimate-qty { font-size: 15px; margin: 16px 0 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.table.options tr.row-chosen td { background: var(--ok-bg); }
.table tr.row-incomplete td { color: var(--text-2); }
.plan-svg { display: block; width: 100%; max-width: 560px; height: auto; max-height: 340px; margin: 8px 0; }
.table.cost-lines { font-size: 13px; }
.signup-progress { margin: 14px 0 6px; }
.signup-progress progress { width: 100%; height: 12px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; overflow: hidden; background: var(--bg); }
.signup-progress progress::-webkit-progress-bar { background: var(--bg); border-radius: 6px; }
.signup-progress progress::-webkit-progress-value { background: var(--blue); border-radius: 6px; transition: width .6s ease; }
.signup-progress progress::-moz-progress-bar { background: var(--blue); border-radius: 6px; }
.signup-progress-text { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.signup-phone { display: flex; gap: 6px; } .signup-phone select { width: auto; flex: 0 0 auto; } .signup-phone input { flex: 1; min-width: 0; }

/* product configurator (print requests) */
.cfg-step { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.cfg-step h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cfg-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: var(--on-accent); font-size: 14px; }
.cfg-internal { margin-left: auto; font-size: 13px; font-weight: 400; }
.cfg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cfg-cards.cfg-subs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cfg-card { padding: 12px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); cursor: pointer; font-weight: 600; text-align: center; }
.cfg-card.sub { font-weight: 500; font-size: 14px; }
.cfg-card:hover { border-color: var(--blue); }
.cfg-card.on { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.cfg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; }
.cfg-grid .wide { grid-column: 1 / -1; }
.cfg-colours { display: contents; }
.cfg-colours[hidden] { display: none !important; }
.cfg-comp { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px 12px; margin: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
.cfg-comp > legend { font-weight: 700; padding: 0 6px; }
.cfg-comp > .link-btn { grid-column: 1 / -1; justify-self: start; }
.cfg-draw { color: var(--text-2); }
.cfg-svg { width: 100%; height: auto; max-height: 240px; }
.cfg-sheet { fill: rgba(91,197,242,.16); stroke: #5bc5f2; stroke-width: 1.5; }
.cfg-dim { fill: none; stroke: currentColor; stroke-width: 1; }
.cfg-dimt { fill: currentColor; font-size: 13px; } .cfg-dimt-p { text-align: center; font-size: 13px; margin: 2px 0 6px; }
.cfg-fold { stroke: #5bc5f2; stroke-width: 1; stroke-dasharray: 4 3; fill: none; } .cfg-mark { fill: currentColor; font-size: 10px; }
.cfg-draws { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 10px 0 4px; }
.cfg-boxrow { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.cfg-boxrow .cfg-draw { text-align: center; }
.cfg-rubrics { margin: 12px 0; } .cfg-rubric { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.cfg-die { margin-top: 8px; }
.cfg-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 8px; }
.cfg-model { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13px; text-align: center; }
.cfg-model input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-model.on, .cfg-model:focus-within { border-color: var(--blue); background: rgba(91,197,242,.10); }
.cfg-model-fig svg { width: 96px; height: 80px; }
.cfg-pack { margin-top: 12px; }
.cfg-review .notice { margin: 6px 0; }
.part-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.part-head .section-title { margin-bottom: 6px; }
.cfg-lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.cfg-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; }
.cfg-radios { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.cfg-recent { position: relative; } .cfg-recent > summary { list-style: none; } .cfg-recent > summary::-webkit-details-marker { display: none; }
.cfg-recent-list { position: absolute; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px; min-width: 320px; max-height: 360px; overflow: auto; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.cfg-recent-list a { display: block; padding: 6px 8px; border-radius: 6px; } .cfg-recent-list a:hover { background: var(--hover); }
@media (max-width: 900px) { .cfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cfg-comp, .cfg-boxrow, .cfg-draws { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .cfg-grid { grid-template-columns: 1fr; } }
.guest-card.guest-wide { max-width: 760px; }
.signup-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.signup-form .wide, .signup-form .hp { grid-column: 1 / -1; }
.signup-url { color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 680px) { .signup-form { grid-template-columns: 1fr; } }
.ai-attach { cursor: pointer; font-size: 20px; align-self: center; padding: 4px 6px; border-radius: 6px; border: 1px solid transparent; }
.ai-attach:hover { border-color: var(--border); } .ai-attach.on { border-color: var(--blue); background: var(--hover); }
.ai-file { display: flex; align-items: center; gap: 6px; margin: 0 12px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 13px; overflow-wrap: anywhere; }
.ai-file[hidden] { display: none !important; }
.ai-file .link-btn { margin-left: auto; font-size: 16px; }
/* dropdown with several choices (partials/multiselect) */
.msel { position: relative; display: inline-block; min-width: 240px; }
.msel > summary { list-style: none; cursor: pointer; border: 1px solid var(--border); border-radius: 6px; padding: 8px 32px 8px 10px; background: var(--surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.msel > summary::-webkit-details-marker { display: none; }
.msel > summary::after { content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-70%) rotate(45deg); }
.msel-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; }
.msel-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; min-width: 0 !important; }
.msel-options { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.msel-options label.check { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; white-space: nowrap; font-size: 14px; }
.msel-options label.check:hover { background: var(--hover); }
.msel-panel { width: max-content; min-width: 100%; max-width: min(440px, 92vw); box-sizing: border-box; }
.msel-options label.check { justify-content: flex-start; width: auto; }
.msel-options input[type=checkbox] { width: 16px !important; height: 16px; min-width: 0 !important; flex: 0 0 16px; margin: 0; padding: 0; }
.msel-options label.check { overflow: hidden; text-overflow: ellipsis; }
/* indicator configurator */
.ind-calc .ind-source { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 12px; }
.ind-calc .ind-measure { margin: 12px 0; }
.ind-calc .ind-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; }
.ind-calc .ind-cond-title { margin: 12px 0 4px; font-weight: 600; }
.ind-calc .ind-cond { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 1fr) minmax(140px, 1.4fr) auto; gap: 8px; align-items: start; margin-bottom: 6px; }
.ind-calc .ind-val select, .ind-calc .ind-val input { width: 100%; }
.ind-calc .ind-preview { margin: 12px 0; }
@media (max-width: 640px) { .ind-calc .ind-cond { grid-template-columns: 1fr; } }
.ind-calc [data-den] > label.check { display: block; margin-top: 14px; }
.num-input { text-align: right; max-width: 120px; }
/* whistleblowing: conversation with the reporter, codes given at the end */
.wb-thread { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.wb-msg { max-width: 85%; padding: 10px 12px; border-radius: 10px; background: var(--surface-2, rgba(127,127,127,.08)); }
.wb-msg.wb-mine { align-self: flex-end; background: rgba(91,197,242,.14); }
.wb-meta { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.wb-body { white-space: normal; overflow-wrap: anywhere; }
.wb-codes { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.wb-codes dt { color: var(--text-2); } .wb-codes dd { margin: 0; } .wb-codes code { font-size: 1.15em; letter-spacing: .04em; }

/* Dashboard of the administrators: the bar with the wizards */
.wizard-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.wizard-bar > .muted { font-weight: 600; margin-right: 4px; }

/* Licences › Licence an installation: the modules in two columns (one on a phone) */
.check-columns { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
@media (max-width: 640px) { .check-columns { grid-template-columns: 1fr; } }

/* Licences: codes, keys and the licence of the installation (My licence) */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
textarea.mono { font-size: 12px; word-break: break-all; }
.licence-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
.licence-facts dt { color: var(--text-2); } .licence-facts dd { margin: 0; }
.licence-card form + form { margin-top: 10px; }
@media (max-width: 640px) { .licence-facts { grid-template-columns: 1fr; } .licence-facts dd { margin-bottom: 6px; } }

.check-all { grid-column: 1 / -1; }

.fields dd { margin: 0; }

/* PDF preview (pdf.js, pages drawn as pictures) — e.g. Audit › Validate the CV */
.pdf-preview { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 6px; background: #e9ecef; padding: 8px; }
.pdf-preview canvas { display: block; width: 100%; height: auto; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.cv-image { max-width: 100%; max-height: 60vh; border: 1px solid var(--border); border-radius: 6px; }

/* «Update in progress» (maintenance page and Administration › Updates) */
.updating-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); color: var(--text); margin: 0; padding: 16px; }
.updating { max-width: 560px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 28px; }
.updating-logo { height: 40px; margin-bottom: 12px; }
.updating h1 { font-size: 1.35rem; margin: 0 0 8px; }
.updating-bar { height: 10px; border-radius: 6px; background: var(--hover); overflow: hidden; margin: 18px 0; }
.updating-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .6s; }
.updating-steps { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); }
.updating-steps li { margin: 4px 0; }
.updating-steps li.done { color: var(--ok); }
.updating-steps li.done::after { content: ' ✓'; }
.updating-steps li.now { color: var(--text); font-weight: 600; }

/* Terms of use (EULA) */
.legal-page { max-width: 820px; margin: 0 auto; }
.legal h1 { font-size: 1.5rem; } .legal h2 { font-size: 1.1rem; margin-top: 20px; }
.legal p { line-height: 1.6; }
.legal-box { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 18px 22px; background: var(--surface); margin: 14px 0; }
.legal-accept { margin-top: 8px; } .legal-accept .inline { display: inline; }
.app-footer { margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-2); font-size: .85em; }

/* Non-production installation (PHD_ENV_LABEL): orange top bar so it is never confused with production */
.env-marked .topbar { background: #dc911b; border-bottom-color: #b5760f; }
.env-marked .topbar .brand span, .env-marked .topbar a, .env-marked .topbar .link-btn, .env-marked .topbar .current-user { color: #241500; }
.env-marked .topbar svg { stroke: #241500; }
.env-badge { font-weight: 700; letter-spacing: .05em; background: #241500; color: #ffd27a; padding: 2px 8px; border-radius: 5px; margin-right: 6px; }

/* Dashboard · Purchases and sales */
.dash-commerce .chart-legend { font-size: .85em; } .chart-legend .lg { margin-left: 12px; }
.chart-legend .lg::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg-p::before { background: #8aa0b3; } .lg-s::before { background: var(--blue); }
.commerce-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .commerce-grid { grid-template-columns: 1fr; } }
.month-bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.mb-pair { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; justify-content: center; }
.mb-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.mb { width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; }
.mb-val { font-size: .62rem; line-height: 1; margin-bottom: 2px; white-space: nowrap; }
.mb-val-p { color: #8aa0b3; } .mb-val-s { color: var(--blue); }
.mb-p { background: #8aa0b3; } .mb-s { background: var(--blue); }
.mb-label { font-size: .7em; color: var(--text-2); margin-top: 4px; }
.commerce-tables { display: grid; gap: 14px; }
.mini-table h3 { font-size: .95rem; margin: 0 0 6px; } .mini-table .table td { padding: 5px 6px; }

/* Install wizard: checkbox settings (Security step) */
.fields .check-field { justify-content: flex-end; } .check-field span { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.inbox tr.unread td { font-weight: 600; }   /* internal messages not read yet */
/* communications: unread internal messages window */
.comms-popup { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.comms-popup[open] { display: flex; flex-direction: column; }
.comms-popup::backdrop { background: rgba(0,0,0,.45); }
.comms-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.comms-popup-head h2 { margin: 0; font-size: 1.05rem; }
.comms-popup-body { padding: 8px 16px; overflow-y: auto; }
.comms-popup-msg { padding: 10px 0; border-bottom: 1px solid var(--border); }
.comms-popup-msg:last-child { border-bottom: 0; }
.comms-popup-msg h3 { margin: 0 0 2px; font-size: 1rem; }
.comms-popup-msg p { margin: 0 0 6px; }
.comms-popup-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
.comms-popup-foot form { margin: 0; }
@media print { .comms-popup { display: none !important; } }
/* list configurator: the lists of a register, above its list */
.saved-lists { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; }
.saved-lists .chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.saved-lists .chip:hover { border-color: var(--blue); }
.saved-lists .chip.active { background: var(--blue); border-color: var(--blue); color: var(--on-accent); font-weight: 600; }
.saved-lists .chip-add { border-style: dashed; color: var(--text-2); }
.ind-calc .ind-sub:empty { display: none; }
.ind-calc .ind-sub { grid-column: 1 / -1; margin: 0 0 8px 16px; padding: 8px 12px; background: var(--bg); border-radius: 8px; }   /* the conditions of a linked register */
/* rich text fields (public/js/rich.js) */
.rich { flex: 1 1 auto; min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.rich-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--border); background: var(--bg); border-radius: 8px 8px 0 0; }
.rich-btn { min-width: 30px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font-weight: 700; cursor: pointer; }
.rich-btn:hover, .rich-btn:focus-visible { border-color: var(--border); background: var(--surface); }
.rich-box { min-height: 140px; max-height: 60vh; overflow-y: auto; padding: 10px 12px; color: var(--text); }
.rich-box:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.rich-box h3 { margin: 6px 0; font-size: 1.1rem; }
.rich-box ul, .rich-box ol { padding-left: 22px; }
.rich-view h3 { font-size: 1.1rem; margin: 8px 0; } .rich-view ul, .rich-view ol { padding-left: 22px; } .rich-view img { max-width: 100%; height: auto; }
fieldset.plain { display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.break-all { overflow-wrap: anywhere; }
.rich-box img, .rich-view img { max-width: 100%; height: auto; }
