:root {
  color-scheme: light;
  font-family: "Segoe UI", "Inter", "Noto Sans", system-ui, sans-serif;
  color: #162c3f;
  background: #f4f6f8;
  font-synthesis: none;
  --surface: #fff;
  --ink: #162c3f;
  --muted: #566b7d;
  --quiet: #657b8b;
  --line: #e1e6eb;
  --side: #132738;
  --accent: #1d625c;
  --accent-hover: #154e49;
  --accent-soft: #eaf4ef;
  --warning: #8b601b;
  --warning-soft: #fff5dc;
  --danger: #a54d43;
  --danger-soft: #f8e7e4;
  --cool: #3d6281;
  --cool-soft: #edf3f9;
  --radius: 9px;
  --shadow: 0 1px 2px #1b365703;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.access-screen { min-height: 100dvh; padding: 30px 16px; display: grid; place-items: center; background: #edf3f9; }
.site-condition { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 4px 0 0; min-width: 0; }
.site-condition legend { color: var(--ink); font-weight: 700; font-size: 13px; padding-inline: 5px; }
.settings-admin-links { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-back { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); margin-bottom: 18px; font-size: 13px; font-weight: 650; }
.wall-table table { min-width: 1000px; }
.wall-table .wall-group { vertical-align: top; min-width: 160px; background: #f5f8fb; }
.wall-table .wall-group .button { margin-top: 9px; }
.wall-table .wall-group-start td { border-top: 2px solid #d7e2ec; }
.wall-table thead th { position: sticky; top: 0; }
.life-open { background: #e7f1fb; color: #2c5881; }
.life-closed { background: #eaf4ef; color: #1d625c; }
.life-overdue { background: #fff5dc; color: #8b601b; }
.life-reopened { background: #fbece1; color: #915122; }
.protocol-relations { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 10px; }
.registry-people { min-width: 0; }
.registry-people table { min-width: 860px; }
.registry-people th:nth-child(3) { width: 27%; }
.registry-people th:nth-child(4) { width: 16%; }
.access-card { width: min(100%, 450px); padding: 30px; }
.access-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.access-brand strong { display: block; font-size: 21px; color: var(--ink); }
.access-brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.access-card h1 { font-size: 24px; margin-bottom: 12px; }
.access-fields { display: grid; gap: 14px; margin-block: 20px; }
.access-card form > .button { margin-top: 16px; }
.account-panel { border-top: 1px solid #345066; margin-top: 8px; padding-top: 12px; }
.account-panel strong { display: block; font-size: 12px; padding: 0 10px 6px; overflow-wrap: anywhere; }
.sidebar { overflow-y: auto; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #369c83; outline-offset: 2px; }
button:disabled { cursor: default; opacity: .53; }
h1, h2, h3, p { margin: 0; }
input, select, textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid #d2dddf;
  border-radius: 7px;
  min-height: 40px;
  padding: 8px 11px;
  width: 100%;
}
input, select { min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--quiet); }
input[readonly] { background: #f3f6f6; color: var(--muted); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: auto; margin: 0; accent-color: var(--accent); }
textarea { min-height: 82px; resize: vertical; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th {
  color: var(--muted);
  font-weight: 650;
  background: #f7f9f9;
  font-size: 12px;
  letter-spacing: .005em;
  white-space: nowrap;
}
th, td { padding: 12px 16px; border-bottom: 1px solid #e9eeef; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:not(.blank-row):hover { background: #f8fbfa; }
td { overflow-wrap: anywhere; }
td.is-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  vertical-align: middle;
  background: currentColor;
  mask: url("./icons.png") var(--ix, 0px) 0 / 576px 24px no-repeat;
}
.i-grid { --ix: 0px; }
.i-key { --ix: -24px; }
.i-transfer { --ix: -48px; }
.i-clipboard { --ix: -72px; }
.i-clock { --ix: -96px; }
.i-settings { --ix: -120px; }
.i-exit { --ix: -144px; }
.i-plus { --ix: -168px; }
.i-back { --ix: -192px; }
.i-warning { --ix: -216px; }
.i-search { --ix: -240px; }
.i-right { --ix: -264px; }
.i-close { --ix: -288px; }
.i-download { --ix: -312px; }
.i-upload { --ix: -336px; }
.i-box { --ix: -360px; }
.i-calendar { --ix: -384px; }
.i-print { --ix: -408px; }
.i-check { --ix: -432px; }
.i-building { --ix: -456px; }
.i-file { --ix: -480px; }
.i-out { --ix: -504px; }
.i-dots { --ix: -528px; }
.i-filter { --ix: -552px; }
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  height: 100dvh;
  position: sticky;
  top: 0;
  background: var(--side);
  color: #b9c6d0;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px; color: #fff; }
.brand .brand-mark {
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: contain;
  background: #03294b;
}
.brand strong { display: block; font-size: 21px; line-height: 1.25; font-weight: 750; letter-spacing: .105em; }
.brand small { display: block; color: #c2cfd8; font-size: 9px; font-weight: 600; letter-spacing: .22em; }
.project-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 32px 4px 21px;
  padding: 11px 10px;
  border: 1px solid #2e4253;
  border-radius: 9px;
}
.project-icon { display: grid; place-items: center; flex: 0 0 33px; height: 33px; background: #304355; border-radius: 6px; color: #dfe7ec; }
.project-meta { min-width: 0; }
.project-meta strong { display: block; color: #edf0f3; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-meta small { display: block; color: #b1c2ce; font-size: 10px; margin-top: 2px; }
.sidebar nav, .sidebar-bottom { display: grid; gap: 4px; }
.sidebar nav a, .sidebar-bottom a, .sidebar-bottom button {
  width: 100%;
  min-height: 44px;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #b8c7d3;
  font-size: 13px;
  font-weight: 550;
}
.sidebar nav a:hover, .sidebar-bottom a:hover, .sidebar-bottom button:hover { background: #203749; color: #fff; }
.sidebar a[aria-current="page"] {
  color: #fff;
  background: #284255;
  box-shadow: inset 3px 0 #eda948;
  font-weight: 650;
}
.sidebar-bottom { margin-top: auto; }
.sidebar-label {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #2b3b47;
  margin: 10px 7px 0;
  padding: 16px 0 0;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .11em;
  color: #a8b9bf;
}
.sidebar-label span { letter-spacing: 0; }
.workspace { min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 35px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 14px;
}
.breadcrumb, .date, .connection, .topbar-right { display: flex; align-items: center; gap: 8px; }
.breadcrumb { font-size: 12px; font-weight: 550; color: var(--quiet); }
.breadcrumb strong { font-weight: 650; color: var(--muted); }
.breadcrumb .icon { color: #8194a3; width: 18px; flex-basis: 18px; }
.date .icon { color: #5c778a; }
.topbar-right { gap: 18px; flex-shrink: 0; }
.date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.connection { color: #355f55; background: #edf5f1; padding: 5px 9px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.connection i { background: #23856d; width: 7px; height: 7px; border-radius: 50%; }
.connection[data-state="offline"] { color: var(--danger); background: var(--danger-soft); }
.connection[data-state="offline"] i { background: var(--danger); }
.connection[data-state="busy"] { color: var(--warning); background: var(--warning-soft); }
.connection[data-state="busy"] i { background: #bc7b21; }
main { padding: 34px 35px 45px; max-width: 1570px; margin: 0 auto; }
main:focus { outline: none; }
.boot { padding: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 27px; }
h1 { color: #152d40; font-size: clamp(26px, 2.5vw, 32px); font-weight: 650; letter-spacing: -.025em; line-height: 1.25; }
.page-head p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-head .actions { justify-content: flex-end; }
.button {
  border: 1px solid #d9e2e9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  min-height: 40px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s, border .15s;
}
.button .icon { margin: -2px 0; }
.button:hover:not(:disabled) { background: #eff5f4; border-color: #aebfbe; }
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.subtle { color: var(--accent); border-color: transparent; background: transparent; padding-inline: 6px; }
.button.danger { color: var(--danger); }
.button.danger-fill { background: #a13239; color: white; border-color: #a13239; }
.button.danger-fill:hover:not(:disabled) { background: #8b2730; border-color: #8b2730; }
.button.is-icon { width: 37px; min-height: 35px; padding: 4px; }
.text-button {
  border: 0;
  padding: 2px 0;
  background: none;
  color: var(--accent);
  font-weight: 760;
  text-align: left;
}
.text-button:hover { text-decoration: underline; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-head {
  padding: 15px 17px;
  min-height: 58px;
  border-bottom: 1px solid #edf0f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.panel h2 { font-size: 16px; font-weight: 740; letter-spacing: -.015em; }
.panel p { line-height: 1.5; }
.panel-body { padding: 15px 17px 17px; }
.icon-chip {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 9px;
  width: 37px;
  height: 37px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 37px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf1f2;
  color: #52636b;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}
.badge.available { background: var(--accent-soft); color: var(--accent); }
.badge.issued { background: var(--cool-soft); color: var(--cool); }
.badge.safe { background: #e9edf7; color: #3f527b; }
.badge.overdue { background: var(--warning-soft); color: var(--warning); }
.badge.missing { background: var(--danger-soft); color: var(--danger); }
.table-wrap { overflow-x: auto; }
.table-wrap td:first-child, .table-wrap th:first-child { padding-left: 17px; }
.registry-grid table { table-layout: fixed; }
.registry-grid th, .registry-grid td { padding: 9px 10px; }
.registry-keys table { min-width: 1010px; }
.registry-keys th:nth-child(1) { width: 14%; }
.registry-keys th:nth-child(2) { width: 8%; }
.registry-keys th:nth-child(3) { width: 6%; }
.registry-keys th:nth-child(4) { width: 11%; }
.registry-keys th:nth-child(5) { width: 13%; }
.registry-keys th:nth-child(6) { width: 11%; }
.registry-keys th:nth-child(8) { width: 12%; }
.registry-people table { min-width: 610px; }
.registry-people th:nth-child(1) { width: 25%; }
.registry-people th:nth-child(2) { width: 28%; }
.registry-grid th:last-child { width: 114px; position: sticky; right: 0; z-index: 1; }
.registry-action-cell { position: sticky; right: 0; z-index: 1; background: var(--surface); }
.registry-grid tbody tr:hover .registry-action-cell { background: #f8fbfa; }
.registry-actions { display: flex; flex-direction: column; gap: 4px; }
.registry-actions .button { min-height: 32px; padding: 4px 8px; }
.registry-note-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.registry-grid tbody tr.registry-editing > td,
.registry-grid tbody tr.registry-form-row > td { background: var(--cool-soft); }
.registry-editing input, .registry-editing textarea { padding: 6px 7px; font-size: 13px; }
.registry-editing textarea { min-height: 48px; width: 100%; display: block; }
.registry-grid tbody tr.registry-form-row > td { padding: 0; }
.registry-form-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; padding: 9px 17px 11px; }
.registry-form-fields .field { width: 200px; }
.registry-form-fields .small { padding-bottom: 7px; }
.registry-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.registry-form-row .form-error { margin: 8px 17px 11px; }
.empty {
  min-height: 168px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px;
  color: var(--muted);
}
.empty .icon-chip { background: #eef3f3; color: #658087; margin-bottom: 3px; }
.empty strong { color: var(--ink); font-size: 14px; }
.empty p { font-size: 13px; max-width: 460px; }
.small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.table-note { display: block; margin-top: 3px; }
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.filter-field { flex: 0 1 155px; }
.filter-field.grow { flex: 1 1 225px; }
.filter-field label, .field > label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-field .search-control { position: relative; }
.search-control .icon { position: absolute; top: 8px; left: 7px; color: var(--quiet); pointer-events: none; }
.search-control input { padding-left: 36px; }
.filters input, .filters select { font-size: 13px; }
.wall-tools { margin-bottom: 18px; }
.wall-tools .filters { border-bottom: 0; padding-top: 0; }
.wall-search { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
.wall-search input { font-size: 14px; }
#wall-filters { border-top: 1px solid var(--line); }
#wall-filters > summary, .form-options > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  cursor: pointer;
  min-height: 36px;
  font-size: 13px;
  font-weight: 680;
}
#wall-filters > summary { padding: 3px 16px; }
#wall-filters > summary::after, .form-options > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  margin-right: 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
#wall-filters[open] > summary::after, .form-options[open] > summary::after { transform: rotate(225deg); }
#wall-filters > summary:hover, .form-options > summary:hover { color: var(--accent); }
.view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  align-items: center;
  background: #edf1f5;
  border: 1px solid #dce4eb;
  border-radius: 7px;
}
.view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.view-switch button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  border-color: #d8e1e9;
  box-shadow: inset 0 -2px #e6ad51;
}
.view-switch button:hover { color: var(--accent); }
.wall-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wall-notice .button { min-height: 30px; }
.wall-locks { display: grid; gap: 13px; }
.wall-lock { padding: 13px 15px 15px; }
.wall-lock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.wall-lock-head > div { min-width: 0; overflow-wrap: anywhere; }
.wall-lock-head h2 { margin-bottom: 2px; }
.wall-copies { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.copy-tile {
  --copy-line: #6588a1;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dce5e9;
  border-inline-start: 3px solid var(--copy-line);
  border-radius: 7px;
  background: #fbfcfd;
}
.copy-tile[data-role="bam"] { --copy-line: #55938a; }
.copy-tile[data-role="reserve"] { --copy-line: #c89d53; }
.copy-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.copy-role { color: var(--muted); font-size: 11px; font-weight: 720; }
.copy-tile .text-button { max-width: 100%; overflow-wrap: anywhere; font-size: 15px; }
.copy-meta { color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.copy-meta time { font-variant-numeric: tabular-nums; }
.copy-actions { margin-top: 2px; }
.copy-actions .button { min-height: 33px; padding: 3px 9px 3px 5px; color: var(--accent); }
.wall-pager { margin-top: 12px; }
.wall-pager .pager { border-top: 0; }
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(175px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 7px;
  align-items: start;
}
.kanban-column {
  border: 1px solid #dce4eb;
  border-top: 3px solid #718b9e;
  border-radius: 8px;
  background: #edf1f5;
}
.kanban-column[data-column="available"] { border-top-color: #55938a; }
.kanban-column[data-column="overdue"] { border-top-color: #c99642; }
.kanban-column[data-column="safe"] { border-top-color: #7986a7; }
.kanban-column[data-column="missing"] { border-top-color: #bc776e; }
.kanban-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 10px;
  border-bottom: 1px solid #dae3ea;
}
.kanban-column h2 { margin: 0; font-size: 13px; font-weight: 740; }
.kanban-count { font-size: 11px; font-weight: 730; color: var(--muted); border-radius: 6px; padding: 2px 6px; background: white; }
.kanban-stack { display: grid; align-content: start; gap: 8px; padding: 8px; min-height: 72px; max-height: 70vh; overflow-y: auto; }
.kanban-empty { color: var(--quiet); padding: 12px 4px; font-size: 12px; }
.lock-copy-form { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.lock-copy-fields { min-width: 0; margin: 0; padding: 9px 10px 11px; border: 1px solid #dae4e9; border-radius: 7px; }
.lock-copy-fields legend { padding: 0 4px; color: var(--ink); font-size: 12px; font-weight: 720; }
.lock-copy-fields[data-role="reserve"] { background: #fbf7ee; }
.lock-copy-fields .field + .field { margin-top: 8px; }
.form-options { border-top: 1px solid var(--line); padding: 3px 1px 0; }
.form-options > :not(summary) { margin-top: 9px; }
.movement-context {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
  padding: 11px 13px;
  background: #edf4f5;
  border-radius: 7px;
  border: 1px solid #d8e7e8;
}
.movement-context > .icon { color: var(--accent); }
.movement-context strong, .movement-context .small { display: block; overflow-wrap: anywhere; }
.movement-context strong { font-size: 15px; margin-bottom: 3px; }
.movement-roles { margin: 0 0 15px; padding: 0; border: 0; }
.movement-roles legend { font-size: 13px; font-weight: 690; margin-bottom: 6px; }
.movement-roles > div { display: flex; gap: 8px; flex-wrap: wrap; }
.movement-roles label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  padding: 5px 11px;
  border: 1px solid #d9e3e9;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
}
.movement-roles label:has(input:checked) { background: var(--accent-soft); border-color: #82b4a8; }
.movement-roles label:has(input:disabled) { cursor: default; opacity: .53; }
.movement-roles input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--accent); }
.import-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.import-options section { padding: 13px; border: 1px solid var(--line); border-radius: 7px; min-width: 0; }
.import-options strong { font-size: 15px; }
.import-options p { min-height: 42px; margin: 4px 0 10px; }
.import-options .button { white-space: normal; text-align: left; }

.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pager .button { min-height: 31px; padding: 3px 9px; }
.span-2 { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid .field { min-width: 0; }
.form-grid .field input, .form-grid .field textarea, .form-grid .field select { font-size: 14px; }
.form-grid .help { display: block; margin-top: 5px; }
.party-fields { position: relative; display: grid; min-width: 0; gap: 9px; }
.contact-picker {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 12px 30px #15293226;
}
.contact-picker .button {
  width: 100%;
  justify-content: start;
  min-height: 32px;
  padding: 6px 8px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.protocol-party {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.protocol-party h3 { margin: 0 0 1px; color: var(--muted); font-size: 12px; }
.protocol-party .button { justify-self: start; margin-top: 7px; }
.protocol-sign-status { display: flex; gap: 6px; margin-top: 7px; color: var(--accent); font-size: 13px; }
.signature-pad {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  border: 1px solid #9dbad6;
  border-radius: 9px;
  background: linear-gradient(#fbfdff 71%, #d6e4f1 71%, #d6e4f1 calc(71% + 1px), #fbfdff calc(71% + 1px));
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}
.catalog-list { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.catalog-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}
.catalog-list li span { overflow-wrap: anywhere; }
.delivery-list { padding: 0; margin: 6px 0 13px; list-style: none; }
.delivery-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 0; overflow-wrap: anywhere; font-size: 13px; }
.delivery-list small { flex-basis: 100%; }
.detail-grid {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  column-gap: 12px;
  row-gap: 10px;
}
.detail-grid dt { color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.detail-grid dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-block { border-top: 1px solid var(--line); padding: 13px 0 0; margin-top: 13px; }
.detail-block h3 { font-size: 14px; margin-bottom: 7px; }
.detail-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.settings-grid .panel { padding-bottom: 2px; }
.settings-grid .panel-body p { margin: 0 0 12px; }
.settings-grid .form-grid { margin-bottom: 13px; }
.settings-grid .actions { margin-top: 10px; }
.notice, .form-error {
  padding: 10px 12px;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #efced1;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.notice.soft { background: #eef5f5; color: var(--muted); border-color: #dce8e7; }
.notice + .actions, .form-error { margin-top: 12px; }
[hidden] { display: none !important; }
dialog {
  border: 1px solid #d9e2e2;
  border-radius: 13px;
  padding: 0;
  max-width: min(640px, calc(100vw - 26px));
  width: 100%;
  color: var(--ink);
  max-height: calc(100dvh - 40px);
  background: var(--surface);
  box-shadow: 0 24px 90px #15293245;
}
dialog.wide { max-width: min(820px, calc(100vw - 26px)); }
dialog::backdrop { background: #102b3b85; backdrop-filter: blur(2px); }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 13px 19px;
  gap: 15px;
}
.dialog-head h2 { font-size: 20px; font-weight: 730; letter-spacing: -.03em; }
.dialog-body { padding: 17px 19px; }
.dialog-body p { line-height: 1.5; }
.dialog-body > p + * { margin-top: 12px; }
.dialog-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 19px; background: #f8fbfa; border-top: 1px solid var(--line); }
.chooser { margin-bottom: 14px; }
.chooser-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.chooser-top input { max-width: 65%; font-size: 13px; }
.chooser-list { max-height: 174px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.chooser-option {
  display: grid;
  grid-template-columns: 16px minmax(85px,.5fr) minmax(80px,1fr) minmax(0,.8fr);
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 7px 9px;
  font-size: 13px;
  cursor: pointer;
}
.chooser-option + .chooser-option { border-top: 1px solid #ecf0f0; }
.chooser-option:hover { background: #eef7f3; }
.chooser-option > span { overflow-wrap: anywhere; }
.chooser-empty { padding: 13px; color: var(--muted); font-size: 13px; }
#import-preview { margin-top: 9px; }
#notifications { position: fixed; bottom: 22px; right: 24px; z-index: 5; max-width: min(390px, calc(100vw - 30px)); }
.toast {
  padding: 11px 14px;
  border-radius: 9px;
  background: #173c32;
  color: #fff;
  box-shadow: 0 8px 24px #142e3840;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.toast.error { background: #7d3035; }
@media (max-width: 1080px) {
  .shell { grid-template-columns: 215px minmax(0,1fr); }
  .topbar, main { padding-left: 23px; padding-right: 23px; }
}
@media (max-width: 850px) {
  .settings-grid { grid-template-columns: minmax(0,1fr); }
  .page-head { align-items: start; flex-direction: column; }
  .page-head .actions { justify-content: start; }
  .date { display: none; }
}
@media (max-width: 620px) {
  .shell { display: block; }
  .sidebar {
    position: static;
    height: auto;
    padding: 10px 12px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand { margin: 0 auto 1px 0; }
  .project-card { display: none; }
  .sidebar nav { display: flex; flex-wrap: wrap; order: 3; }
  .sidebar nav a, .sidebar-bottom a, .sidebar-bottom button { min-height: 35px; font-size: 12px; padding: 4px 6px; gap: 4px; }
  .sidebar .icon { flex-basis: 20px; width: 20px; }
  .sidebar-bottom { display: flex; }
  .sidebar-label { display: none; }
  .topbar { min-height: 48px; padding-inline: 13px; }
  main { padding: 19px 12px 30px; }
  .form-grid, .import-options { grid-template-columns: minmax(0, 1fr); }
  .wall-copies, .lock-copy-form { grid-template-columns: minmax(0,1fr); }
  .chooser-option { grid-template-columns: 16px minmax(65px,.6fr) minmax(80px,1fr); }
  .chooser-option .small { display: none; }
}

.hosting-login { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; background: #edf4fb; border: 1px solid #cedeea; border-radius: 8px; font-size: 13px; }
