:root {
  --ink: #24272e;
  --muted: #56606e;
  --accent: #e13b3f;
  --accent-dark: #c52830;
  --green: #176344;
  --green-soft: #e6f2eb;
  --line: #e9eaee;
  --surface: #fff;
  --bg: #f5f6f8;
  --amber: #865117;
  --amber-soft: #fff3df;
  --red: #a43737;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: #515b6d;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 7px;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
button:hover,
.button:hover {
  text-decoration: none;
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--accent-dark);
  color: #fff;
}
.primary:hover {
  background: #aa2028;
  color: #fff;
  filter: none;
}
.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.quiet {
  padding: 8px 4px;
  color: var(--muted);
  border: 0;
  background: transparent;
  min-height: 36px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e13b3f66;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: white;
  padding: 10px;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  width: 224px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #191c21;
  color: #9ca1ad;
  border-right: 1px solid #191c21;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 16px;
}
.brand {
  display: flex;
  gap: 15px;
  align-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  padding: 0 10px;
}
.brand:hover {
  text-decoration: none;
  color: #fff;
}
.brand-mark {
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -4px;
  padding-right: 6px;
}
.brand-mark > span {
  position: absolute;
  right: -2px;
  bottom: 1px;
  width: 5px;
  height: 5px;
  background: var(--accent);
}
.brand-divider {
  height: 26px;
  width: 1px;
  background: #44474e;
  flex-shrink: 0;
}
.brand-title {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 6px;
  letter-spacing: 1.6px;
  font-weight: 500;
  color: #969daa;
  margin-top: 4px;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #969daa;
  margin: 46px 12px 12px;
}
nav a {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 7px;
  color: #a6acb7;
  margin: 3px 0;
  font-weight: 500;
  font-size: 12px;
}
nav a:hover {
  background: #242830;
  color: #e7e9ee;
  text-decoration: none;
}
nav a[aria-current="page"] {
  background: #2c242a;
  color: #f9f5f6;
}
nav a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 14px;
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
nav a[aria-current="page"] .nav-icon {
  color: #f56164;
}
nav a .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #2b2f37;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #353b43;
  color: #bbc5d1;
  flex-shrink: 0;
  font-weight: 650;
}
.user-name {
  color: #fff;
  font-size: 11px;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.user-name small {
  color: #969daa;
  font-size: 11px;
}
.workspace {
  margin-left: 224px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 18px 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  font-size: 12px;
}
.topbar-note {
  color: var(--muted);
  white-space: nowrap;
}
main {
  padding: 36px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-width: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 6px;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.7px;
  margin: 0;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 16px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
  line-height: 1.4;
}
p {
  overflow-wrap: anywhere;
}
.lede {
  color: var(--muted);
  margin: 0 0 26px;
  font-size: 14px;
}
.muted {
  color: var(--muted);
}
small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
strong {
  font-weight: 650;
}
.green {
  color: var(--green);
}
.amber {
  color: var(--amber);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
  overflow: hidden;
}
.metrics > div,
.metrics > a {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.metrics > :last-child {
  border: 1px solid var(--line);
}
.metrics span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.metrics strong {
  display: block;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 2px 3px #17203603;
}
.padded {
  padding: 24px;
}
.section-heading {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-heading h2 {
  margin: 0;
}
.padded > .section-heading {
  padding: 0 0 20px;
}
.filters {
  display: flex;
  gap: 12px;
  padding: 0 24px 22px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filters label {
  font-size: 11px;
  min-width: 100px;
  flex: 1;
}
.filters .search-label {
  flex: 2;
  min-width: 180px;
}
label {
  display: block;
  font-weight: 550;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  margin-bottom: 16px;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
.filters label {
  margin: 0;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #dfe1e7;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
textarea {
  resize: vertical;
}
.table-wrap {
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  table-layout: auto;
  text-align: left;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  background: #fafbfc;
  padding: 13px 18px;
  border-block: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 18px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  max-width: 420px;
}
td small {
  margin-top: 4px;
}
tr:last-child td {
  border-bottom: 0;
}
.check-cell {
  width: 40px;
  padding-inline: 20px 0;
}
.check-target { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; cursor: pointer; }
.row-title {
  font-weight: 650;
  color: var(--ink);
}
.badge {
  display: inline-flex;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  background: #eef0f4;
  color: var(--muted);
  white-space: normal;
  line-height: 1.4;
}
.badge.ready,
.badge.sent,
.badge.approved {
  background: var(--green-soft);
  color: var(--green);
}
.badge.review,
.badge.incomplete,
.badge.unknown {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge.failed {
  background: #fce9e9;
  color: var(--red);
}
.badge.queued,
.badge.sending {
  background: #eaf0fa;
  color: #365884;
}
.doc-tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 7px;
  background: #edf5ef;
  color: var(--green);
  border-radius: 4px;
  margin-block: 2px;
}
.doc-tag.missing {
  background: #f1f2f5;
  color: var(--muted);
}
.selection-bar {
  padding: 20px 24px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-radius: 0 0 10px 10px;
}
.selection-bar small {
  margin-top: 3px;
}
.repeat-label {
  margin: 0;
  flex: 1;
  max-width: 320px;
}
.repeat-label input {
  font-size: 12px;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #eed9ae;
  border-radius: 7px;
  background: var(--amber-soft);
  color: #704a1d;
  font-size: 13px;
  margin: 18px 0;
  overflow-wrap: anywhere;
}
.notice-success {
  background: var(--green-soft);
  border-color: #bfdbc9;
  color: var(--green);
}
.notice-error {
  background: #fceeee;
  border-color: #e9c7c7;
  color: var(--red);
}
.empty {
  text-align: center;
  padding: 50px 20px;
  max-width: 580px;
  margin: auto;
}
.empty h3 {
  font-size: 19px;
  margin: 12px 0;
}
.empty p {
  color: var(--muted);
  max-width: 440px;
  margin: 12px auto 20px;
}
.empty-symbol {
  font-size: 28px;
  color: var(--green);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.pagination div {
  display: flex;
  gap: 8px;
}
.pagination a {
  margin: 0;
  padding: 8px 12px;
}
.review-link {
  display: block;
  margin: 16px 0;
}
.two-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: start;
}
.two-columns > .panel {
  margin-bottom: 0;
}
.two-columns {
  margin-bottom: 22px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-width: 0;
}
.list-row:last-child {
  border: 0;
}
.list-row > div,
.list-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.list-row small {
  color: var(--muted);
  margin-top: 5px;
}
.list-row .button {
  flex-shrink: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.actions form {
  max-width: 100%;
}
.back {
  display: inline-block;
  margin: 0 0 22px;
  color: var(--muted);
}
dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  font-size: 13px;
  margin: 0 0 24px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.file-link {
  display: block;
  padding: 12px 0;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}
.file-name,
code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
code {
  font-family: Consolas, monospace;
  font-size: 12px;
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.file-card {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  color: var(--ink);
  min-width: 0;
}
.file-card > span:last-child {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.file-card small {
  color: var(--muted);
  margin-top: 6px;
}
.pdf-icon {
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  background: #fbeeee;
  flex: 0 0 34px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}
.recipient-box {
  background: #f7f8fa;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.recipient-box > span {
  font-size: 12px;
  color: var(--muted);
}
.recipient-card {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.recipient-card p {
  margin: 6px 0;
}
.recipient-card .badge {
  margin: 12px 0;
}
.recipient-card:last-child {
  border: 0;
}
.form-panel {
  max-width: 760px;
}
.form-panel p {
  margin-bottom: 20px;
}
.helptext {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.errorlist {
  list-style: none;
  padding: 0;
  color: var(--red);
  font-size: 13px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-label input {
  flex-shrink: 0;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  flex-wrap: wrap;
}
.inline-form input,
.inline-form select {
  width: auto;
  max-width: 100%;
}
.timeline {
  border-left: 2px solid var(--line);
  padding: 0 0 22px 18px;
  font-size: 12px;
}
.timeline p {
  margin: 4px 0;
}
.timeline small {
  color: var(--muted);
}
.message-body {
  white-space: pre-wrap;
}
.action-form {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
footer {
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.auth-workspace {
  margin: 0;
}
.auth-workspace main {
  max-width: 550px;
  padding-top: 70px;
}
.auth-panel {
  padding: 36px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #191c21;
  color: #fff;
  margin: -36px -36px 28px;
  padding: 30px 36px;
}
.auth-brand small {
  font-size: 6px;
  letter-spacing: 1.6px;
  color: #969daa;
  margin-top: 4px;
}
.auth-panel h2 {
  font-size: 23px;
  margin-top: 22px;
}
.auth-panel .primary {
  width: 100%;
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
}
@media (min-width: 1400px) {
  td {
    padding-block: 20px;
  }
  .filters label {
    min-width: 110px;
  }
}
@media (max-width: 1190px) {
  .brand {
    padding-inline: 2px;
    gap: 12px;
  }
  .sidebar {
    width: 200px;
    padding-inline: 12px;
  }
  .workspace {
    margin-left: 200px;
  }
  .auth-workspace {
    margin: 0;
  }
  main {
    padding: 28px 24px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .metrics > div,
  .metrics > a {
    padding: 18px;
  }
  .two-columns {
    grid-template-columns: 1fr;
  }
  .selection-bar {
    gap: 16px;
  }
  .repeat-label {
    max-width: none;
  }
  .table-wrap {
    overflow-x: auto;
  }
  td {
    padding: 14px 10px;
  }
  th {
    padding: 12px 10px;
  }
  .check-cell {
    padding-left: 14px;
  }
  .nav-caption {
    letter-spacing: 0.7px;
  }
  .page-heading {
    align-items: flex-start;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px 20px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0;
  }
  .brand-mark {
    font-size: 32px;
  }
  .nav-caption {
    display: none;
  }
  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 16px;
  }
  .sidebar nav a {
    padding: 8px 10px;
    font-size: 12px;
    margin: 0;
  }
  .sidebar nav .nav-icon {
    display: none;
  }
  nav a[aria-current="page"]::before {
    display: none;
  }
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    min-height: 48px;
    padding-block: 12px;
  }
  .metrics {
    margin: 20px 0;
  }
  .file-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    padding: 18px 20px;
  }
  .filters {
    padding-inline: 20px;
  }
}
@media (max-width: 650px) {
  main {
    padding: 24px 16px;
  }
  h1 {
    font-size: 25px;
  }
  .page-heading {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 14px;
  }
  .page-heading > .actions,
  .page-heading > form {
    width: 100%;
  }
  .page-heading > form button {
    width: 100%;
  }
  .topbar {
    padding-inline: 16px;
    font-size: 11px;
  }
  .topbar-note {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .metrics > div,
  .metrics > a {
    padding: 16px;
  }
  .metrics > :nth-child(2) {
    border-right: 1px solid var(--line);
  }
  .metrics > :nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metrics strong {
    font-size: 28px;
  }
  .metrics span {
    font-size: 11px;
  }
  .filters {
    padding: 0 16px 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .filters label,
  .filters .search-label {
    min-width: 0;
  }
  .filters .search-label {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .filters .quiet {
    text-align: center;
  }
  .padded {
    padding: 18px;
  }
  .section-heading {
    padding: 18px 16px;
    gap: 12px;
  }
  .responsive thead {
    display: none;
  }
  .responsive,
  .responsive tbody,
  .responsive tr,
  .responsive td {
    display: block;
    width: 100%;
    max-width: none;
  }
  .responsive tr {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  .responsive td {
    border: 0;
    padding: 5px 0;
  }
  .responsive td[data-label] {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 6px 10px;
  }
  .responsive td[data-label]:before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    padding-top: 2px;
  }
  .responsive td[data-label] > small {
    grid-column: 2;
  }
  .responsive .check-cell {
    width: auto;
    padding: 0 0 8px;
  }
  .responsive .badge {
    justify-self: start;
  }
  .responsive .doc-tag {
    justify-self: start;
  }
  .responsive td[data-label="Документы"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .responsive td[data-label="Документы"]:before {
    width: 88px;
    flex-shrink: 0;
  }
  .selection-bar {
    padding: 18px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .selection-bar button {
    width: 100%;
  }
  .repeat-label {
    max-width: none;
  }
  .list-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .list-row .button {
    flex-shrink: 1;
  }
  .recipient-box {
    flex-direction: column;
    gap: 4px;
  }
  .pagination {
    padding: 16px;
    flex-wrap: wrap;
  }
  .pagination .button {
    min-height: 36px;
  }
  .inline-form {
    width: 100%;
  }
  .inline-form input,
  .inline-form select {
    flex: 1;
    min-width: 0;
  }
  .file-card {
    padding: 12px;
  }
  .form-panel {
    padding: 18px;
  }
  dl {
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 10px;
  }
  .auth-workspace main {
    padding-top: 30px;
  }
  .auth-panel {
    padding: 24px;
  }
  .auth-brand {
    margin: -24px -24px 24px;
    padding: 24px;
  }
  .sidebar {
    padding: 16px;
  }
  .sidebar nav {
    gap: 2px;
  }
  .sidebar nav a {
    padding: 7px 9px;
  }
  .notice {
    padding: 12px;
    font-size: 12px;
  }
  footer {
    padding: 20px 16px;
    gap: 10px;
  }
  .actions {
    gap: 10px;
  }
  .recipient-card button {
    max-width: 100%;
  }
  .form-panel input[type="checkbox"] {
    margin-right: 8px;
  }
}

/* Entity workspace: clear boundaries, contextual editing and import review. */
.page-lede { max-width: 72ch; color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.directory-panel { border-color: #dce0e6; }
.directory-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.segmented-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 9px; background: #f0f2f5; }
.segmented-nav a { padding: 9px 13px; border-radius: 6px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.segmented-nav a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #17203612; }
.segmented-nav a:hover { text-decoration: none; color: var(--ink); }
.directory-search { min-width: min(360px, 100%); }
.directory-search label { margin: 0 0 6px; }
.directory-search > div { display: flex; gap: 8px; }
.directory-table td { padding-block: 16px; }
.selection-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #f7f8fa; border-block: 1px solid var(--line); }
.selection-tools strong { display: block; font-size: 14px; }
.list-purpose { padding: 15px 20px; margin: 0; background: #f7f8fa; color: var(--muted); border-block: 1px solid var(--line); }
.selection-tools small { color: var(--muted); margin-top: 2px; }
.selection-tools button { flex-shrink: 0; }
.selection-cell-label { display: none; font-size: 12px; color: var(--ink); font-weight: 600; margin-left: 10px; }
.registry-panel tbody tr:has(input[name="bundles"]:checked) { background: #fff8f8; }
.registry-panel tbody tr:has(input[name="bundles"]:checked) .row-title { color: #8d2930; }
.directory-table td:last-child { white-space: nowrap; }
.row-open { color: #3d485c; font-weight: 600; text-decoration: underline; text-decoration-color: #bdc4cf; text-underline-offset: 3px; }
.issue-label { display: block; color: var(--amber); font-size: 12px; line-height: 1.45; margin-top: 4px; }
.success-label { display: block; color: var(--green); font-size: 12px; margin-top: 4px; }
.entity-overview { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; background: #e9ecf1; border-radius: 9px; margin: 0 0 22px; }
.entity-overview-label { display: block; color: var(--muted); font-size: 12px; }
.entity-overview p { margin: 3px 0 0; font-size: 15px; font-weight: 600; }
.entity-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.entity-section { min-width: 0; background: var(--surface); border: 1px solid #dce0e6; border-radius: var(--radius); overflow: hidden; }
.entity-section-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.entity-section-head h2 { margin: 0 0 4px; font-size: 19px; }
.entity-section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.entity-section-head .button { flex-shrink: 0; }
.entity-list { padding: 18px; display: grid; gap: 12px; }
.entity-card { border: 1px solid #dce0e6; border-radius: 9px; padding: 18px; background: #fff; min-width: 0; }
.entity-card-attention { border-color: #e2c99e; background: #fffdfa; }
.entity-card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.entity-card h3 { margin: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.entity-card .badge { flex-shrink: 0; }
.entity-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; margin: 14px 0; font-size: 13px; }
.entity-meta > div { min-width: 0; }
.entity-meta dt { color: var(--muted); font-size: 12px; }
.entity-meta dd { margin: 3px 0 0; font-weight: 550; overflow-wrap: anywhere; }
.recipient-address { margin: 9px 0 0; color: #455063; overflow-wrap: anywhere; }
.entity-card-actions { display: flex; align-items: start; gap: 14px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.entity-card-actions > .row-open { margin-top: 14px; }
.verification { width: 100%; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.verification summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.verification form { max-width: 500px; padding-top: 12px; }
.verification p { color: var(--muted); margin: 0 0 12px; }
.verification .checkbox-label { color: var(--ink); }
.entity-empty { padding: 24px; background: #f6f7f9; border: 1px dashed #cfd4dd; border-radius: 8px; color: var(--ink); }
.entity-empty p { color: var(--muted); margin: 6px 0 0; }
.form-panel { border-color: #dce0e6; }
.form-intro { color: var(--muted); margin: 0 0 24px; max-width: 65ch; }
.entity-form .form-field { color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.entity-form .form-field small { color: var(--muted); margin-top: 6px; font-weight: 400; }
.entity-form .form-field input, .entity-form .form-field select { font-weight: 400; }
.entity-form .form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.toggle-field { display: flex; align-items: start; gap: 12px; color: var(--ink); padding: 14px 16px; border: 1px solid #dce0e6; border-radius: 7px; margin: 12px 0 24px; background: #f9fafb; }
.toggle-field input { flex: 0 0 auto; margin-top: 2px; }
.toggle-field small { color: var(--muted); font-weight: 400; margin-top: 3px; }
.recipient-sites { padding: 16px; border: 1px solid #dce0e6; border-radius: 7px; margin-bottom: 20px; }
.recipient-sites label { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.entity-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(90dvh, 900px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 80px #101a2e40; overflow: auto; }
.entity-dialog::backdrop { background: #14192399; }
.dialog-shell { background: #fff; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; background: #fff; }
.dialog-head h2 { margin: 0; font-size: 23px; }
.dialog-x { width: 44px; min-width: 44px; padding: 0; background: #f2f3f5; color: var(--ink); border: 0; font-size: 24px; }
.dialog-body { padding: 24px 26px 28px; }
body:has(.entity-dialog[open]) { overflow: hidden; }
.import-layout { display: grid; grid-template-columns: minmax(320px,.85fr) minmax(0,1.15fr); gap: 20px; align-items: start; }
.import-layout > .panel { margin: 0; border-color: #dce0e6; }
.section-intro { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.section-intro h2 { margin: 0 0 6px; font-size: 19px; }
.section-intro p { color: var(--muted); margin: 0; }
.source-field { margin-bottom: 18px; }
.source-field label { color: var(--ink); font-size: 13px; }
.source-field input[type="file"] { padding: 9px; }
.import-format { font-size: 12px; margin: 0 0 20px; }
.import-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.import-totals > div { padding: 14px 16px; background: #eaf3ed; border-radius: 7px; }
.import-totals > .has-issues { background: var(--amber-soft); }
.import-totals strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.import-totals span { color: var(--muted); font-size: 12px; }
.import-row-list { border: 1px solid #dce0e6; border-radius: 8px; overflow: hidden; }
.import-row { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.import-row:last-child { border: 0; }
.import-row-error { background: #fffbf5; }
.import-row-number { color: var(--muted); font-size: 12px; }
.import-row strong { display: block; overflow-wrap: anywhere; }
.import-row small { color: var(--muted); margin-top: 3px; }
.import-commit { margin-top: 18px; display: flex; justify-content: flex-end; }
.settings-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 20px; }
.settings-section { margin-bottom: 20px; }
.settings-rows { padding: 4px 24px; }
.settings-rows > div { display: grid; grid-template-columns: minmax(120px,.55fr) minmax(0,1fr); gap: 4px 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-rows > div:last-child { border: 0; }
.settings-rows > div > span:first-child { color: var(--muted); }
.settings-rows strong { font-weight: 600; }
.settings-rows small { grid-column: 2; color: var(--muted); }
.settings-note { padding: 16px 24px; background: #f7f8fa; color: var(--muted); font-size: 13px; }
.settings-note a { text-decoration: underline; text-underline-offset: 2px; }
.settings-source-list { grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); }
.settings-source-list .entity-card > p { margin: 10px 0 16px; }
.settings-template-list { display: grid; }
.settings-template-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 24px; border-top: 1px solid var(--line); color: var(--ink); }
.settings-template-list a:hover { background: #f7f8fa; text-decoration: none; }
.settings-template-list span { color: var(--muted); }
.delivery-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.8fr); gap: 20px; align-items: start; }
.delivery-layout > div { display: grid; gap: 20px; min-width: 0; }
.delivery-summary .entity-section-head h2 { overflow-wrap: anywhere; }
.delivery-summary .notice { margin: 0 22px 22px; }
.delivery-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 18px 22px; }
.delivery-facts span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.delivery-facts strong { display: block; overflow-wrap: anywhere; }
.delivery-message-content { padding: 22px; }
.delivery-message-content h3 { margin: 0 0 12px; }
.delivery-message-content h3:not(:first-child) { margin-top: 26px; }
.delivery-message-content .message-body { white-space: pre-wrap; max-width: 70ch; }
.delivery-files { display: grid; gap: 8px; }
.delivery-files a { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #dce0e6; border-radius: 7px; color: var(--ink); min-width: 0; }
.delivery-files a > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.delivery-files small { color: var(--muted); margin-top: 3px; }
.delivery-decision form { padding: 20px 22px 22px; }
.delivery-decision label { color: var(--ink); }
.delivery-timeline { padding: 18px 22px; }
.technical-details { border-top: 1px solid var(--line); padding: 18px 22px; }
.technical-details summary { cursor: pointer; font-weight: 600; }
.technical-details dl { margin: 16px 0 0; }
.bundle-overview p { overflow-wrap: anywhere; }
.bundle-blockers { margin: 0 0 20px; }
.bundle-blockers p { margin: 7px 0 0; }
.bundle-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.8fr); gap: 20px; align-items: start; }
.bundle-layout > div { display: grid; gap: 20px; min-width: 0; }
.bundle-docs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 20px; }
.bundle-doc { display: grid; align-content: start; gap: 7px; border: 1px solid #dce0e6; border-radius: 8px; padding: 16px; min-width: 0; }
.bundle-doc > span { color: var(--muted); font-size: 12px; }
.bundle-doc strong { overflow-wrap: anywhere; }
.bundle-doc a { justify-self: start; font-weight: 600; }
.document-choice { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.document-choice summary { cursor: pointer; font-weight: 600; }
.document-choice form { padding-top: 18px; }
.document-choice fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.document-choice legend { font-weight: 650; margin-bottom: 8px; }
.candidate-document { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid #dce0e6; border-radius: 7px; margin-bottom: 7px; }
.candidate-document label { display: flex; align-items: start; gap: 10px; color: var(--ink); margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.candidate-document input[type="radio"] { display: inline-block; width: 18px; height: 18px; min-height: 18px; max-width: 18px; padding: 0; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--accent); }
.candidate-document a { flex-shrink: 0; }
.bundle-recipient-list { padding: 12px 20px; }
.bundle-recipient-list > div:not(.entity-empty) { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bundle-recipient-list > div:last-child { border: 0; }
.bundle-recipient-list strong { display: block; overflow-wrap: anywhere; }
.bundle-recipient-list small { color: var(--muted); margin-top: 4px; }
.section-footer { border-top: 1px solid var(--line); padding: 16px 20px; }
.bundle-deliveries { display: grid; gap: 0; padding: 0 20px; }
.bundle-deliveries > a { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.bundle-deliveries > a:last-child { border: 0; }
.bundle-deliveries strong { display: block; overflow-wrap: anywhere; }
.bundle-deliveries small { color: var(--muted); margin-top: 3px; }
.bundle-deliveries .entity-empty { margin: 18px 0; }
.bundle-layout .repeat-form { border-top: 1px solid var(--line); padding: 18px 20px; }
.history-filters { display: flex; align-items: end; gap: 10px; padding: 18px 20px; flex-wrap: wrap; }
.history-filters label { flex: 1 1 150px; margin: 0; }
.history-filters label:first-of-type { flex-grow: 2; }
.history-count { padding: 0 20px 14px; margin: 0; color: var(--muted); font-size: 12px; }
.history-panel td:last-child { white-space: nowrap; }
.review-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.review-intro > p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 15px; }
.review-intro .period-form { margin: 0; }
.review-content { padding: 22px; }
.review-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.review-heading h2 { margin: 0 0 4px; font-size: 19px; }
.review-heading p { margin: 0; color: var(--muted); }
.review-cards { display: grid; gap: 10px; }
.review-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid #dce0e6; border-radius: 8px; padding: 16px 18px; min-width: 0; }
.review-card > div { min-width: 0; }
.review-card h3 { margin: 4px 0; overflow-wrap: anywhere; }
.review-card p { margin: 4px 0; }
.review-kind { font-size: 11px; color: var(--muted); }
.review-reason { color: var(--amber); font-weight: 600; }
.review-card .button { flex-shrink: 0; }
.audit-head, .audit-item { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(180px,.65fr); gap: 20px; padding: 16px 22px; }
.audit-head { background: #f7f8fa; color: var(--muted); font-size: 12px; font-weight: 600; }
.audit-item { border-top: 1px solid var(--line); }
.audit-item p { margin: 5px 0 0; color: var(--muted); }
.audit-item time { font-weight: 600; }
.audit-item small { color: var(--muted); margin-top: 4px; }
.audit-item details { margin-top: 8px; color: var(--muted); }
.audit-item summary { cursor: pointer; }
.audit-list .entity-empty { margin: 18px; }
.map-layout { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); gap: 20px; align-items: start; }
.map-document { padding: 22px; }
.map-document > strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.map-document dl { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; margin: 18px 0; }
.map-document dt { color: var(--muted); }
.map-document dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.map-document .notice { margin-bottom: 0; }
.map-form { padding: 22px; }
.map-form label { color: var(--ink); font-size: 13px; }
.map-form .form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
@media (max-width: 1100px) {
  .entity-grid, .import-layout, .settings-layout, .delivery-layout, .bundle-layout, .map-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 650px) {
  .selection-tools { display: grid; padding: 16px; }
  .selection-tools button { justify-self: start; }
  .registry-panel .responsive tr { border-bottom: 8px solid #f1f2f5; }
  .registry-panel .responsive tr:last-child { border-bottom: 0; }
  .registry-panel .responsive .check-cell { padding-bottom: 5px; }
  .registry-panel .check-target { justify-content: flex-start; width: 100%; }
  .selection-cell-label { display: inline; }
  .directory-toolbar { display: grid; padding: 16px; }
  .directory-search { min-width: 0; }
  .entity-overview { align-items: start; }
  .entity-section-head { display: grid; padding: 18px; }
  .entity-section-head .button { justify-self: start; }
  .entity-list { padding: 12px; }
  .entity-card { padding: 15px; }
  .entity-meta { grid-template-columns: minmax(0,1fr); }
  .entity-card-top { flex-wrap: wrap; }
  .entity-form .form-grid { grid-template-columns: minmax(0,1fr); }
  .entity-dialog { width: 100vw; max-width: none; max-height: 100dvh; min-height: 100dvh; border-radius: 0; margin: 0; }
  .dialog-head { padding: 16px; }
  .dialog-body { padding: 20px 16px 32px; }
  .import-row { grid-template-columns: minmax(0,1fr); gap: 3px; }
  .settings-rows { padding-inline: 18px; }
  .settings-rows > div { grid-template-columns: minmax(0,1fr); }
  .settings-rows small { grid-column: 1; }
  .settings-note { padding-inline: 18px; }
  .settings-template-list a { padding-inline: 18px; }
  .delivery-summary .entity-section-head { display: flex; flex-wrap: wrap; }
  .delivery-facts { grid-template-columns: minmax(0,1fr); padding-inline: 18px; }
  .delivery-message-content, .delivery-decision form, .delivery-timeline, .technical-details { padding-inline: 18px; }
  .bundle-docs { grid-template-columns: minmax(0,1fr); padding: 16px; }
  .bundle-recipient-list, .bundle-deliveries { padding-inline: 16px; }
  .candidate-document { display: grid; }
  .history-filters { display: grid; padding: 16px; }
  .history-panel td:last-child { white-space: normal; }
  .review-intro { display: grid; }
  .review-heading, .review-card { display: grid; }
  .review-card .button { justify-self: start; }
  .review-content { padding: 14px; }
  .audit-head { display: none; }
  .audit-item { grid-template-columns: minmax(0,1fr); padding: 16px; gap: 12px; }
  .map-form, .map-document { padding: 18px; }
  .map-form .form-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.responsive td[data-label="Период"],
.responsive td:last-child > a {
  white-space: nowrap;
}
.responsive th:last-child {
  min-width: 88px;
}
.selection-bar > div:first-child {
  flex: 1 0 220px;
}
.selection-bar .repeat-label {
  min-width: 220px;
}
.all-filtered {
  margin: 10px 0 0;
  font-size: 11px;
}
.all-filtered input {
  margin: 0;
}
progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
  margin: 10px 0 24px;
}
@media (max-width: 650px) {
  .responsive td[data-label="Площадка"],
  .responsive td[data-label="Партнёр"] {
    display: block;
  }
  .responsive td[data-label="Площадка"]:before,
  .responsive td[data-label="Партнёр"]:before {
    display: block;
    margin-bottom: 4px;
  }
  .selection-bar > div:first-child {
    flex: initial;
  }
  .selection-bar .repeat-label {
    min-width: 0;
  }
}

/* Monthly sending workflow */
.sidebar-utility { display: block; color: #bbc5d1; font-size: 11px; margin-top: 8px; }
.sidebar-utility:hover { color: #fff; }
.topbar { min-height: 52px; padding-block: 14px; }
main { padding-block: 28px; }
h1 { font-size: 27px; }
.registry-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 10px 0 20px; }
.registry-intro h2 { font-size: 25px; margin: 0 0 4px; }
.registry-intro p { margin: 0; }
.period-form { display: grid; grid-template-columns: minmax(175px, 1fr) auto; align-items: end; gap: 8px; }
.period-form label { margin: 0; }
.period-form input { min-width: 175px; }
.work-in-progress { padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; }
.work-in-progress h2 { font-size: 14px; margin: 0 0 8px; }
.work-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.view-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 16px 20px 0; border-bottom: 1px solid var(--line); }
.view-tabs a { color: var(--muted); padding: 10px 14px; border-bottom: 2px solid transparent; font-weight: 600; }
.view-tabs a { min-height: 44px; }
.view-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.view-tabs span { margin-left: 5px; color: inherit; font-variant-numeric: tabular-nums; }
.registry-filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 20px; }
.registry-filters label { margin: 0; }
.registry-filters .search-label { flex: 1 1 320px; }
.registry-filters details { position: relative; flex: 0 1 230px; }
.registry-filters summary { cursor: pointer; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; min-height: 42px; }
.advanced-filters { position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; width: min(380px, 90vw); padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 30px #17203620; }
.advanced-filters label { margin-bottom: 12px; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 20px 16px; }
.filter-chips span { padding: 5px 9px; background: var(--bg); border-radius: 5px; font-size: 12px; }
.registry-panel table th, .registry-panel table td { padding-block: 13px; }
.registry-panel .selection-dock { position: static; border-radius: 0; box-shadow: none; }
.registry-panel { overflow: visible; }
.selection-dock .quiet { padding-left: 0; margin-right: 10px; min-height: 30px; }
.no-js-selection { margin: 8px 0 0; }
.process-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 12px; margin: 12px 0 22px; }
.process-steps strong { color: var(--accent-dark); }
.batch-summary { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 18px; }
.batch-summary > div { display: grid; min-width: 110px; }
.batch-summary span, .message-read small { color: var(--muted); font-size: 12px; }
.batch-summary strong { font-size: 17px; }
.preview-layout { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); align-items: start; gap: 16px; }
.message-list-head { padding: 18px; }
.message-list-head h2 { margin-bottom: 10px; }
.message-list-head form { display: flex; gap: 6px; }
.message-list-head input { min-width: 0; }
.message-list-item { display: grid; gap: 3px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--ink); }
.message-list-item span, .message-list-item small { overflow-wrap: anywhere; }
.message-list-item small { color: var(--muted); }
.message-list-item.selected { background: #fff4f4; box-shadow: inset 0 0 0 1px #e8a0a2; }
.message-list .pagination { padding: 14px; }
.message-detail { min-width: 0; }
.mobile-list-back { display: none; }
.message-detail .section-heading { margin-bottom: 8px; }
.message-detail h3 { margin: 24px 0 10px; }
.message-read { padding: 12px 0; border-bottom: 1px solid var(--line); }
.message-read strong { display: block; margin-top: 4px; }
.message-body { white-space: pre-wrap; margin: 8px 0 0; }
#edit-message { margin-top: 18px; }
#message-editor { margin-top: 18px; }
#message-editor[hidden] { display: none; }
.attachment-group { padding: 12px 0; border-top: 1px solid var(--line); }
.attachment-group > strong { display: block; margin-bottom: 10px; }
.preview-actions { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.confirm-panel { max-width: 760px; }
.result-counts { display: flex; flex-wrap: wrap; gap: 10px; }
.result-counts span { padding: 8px 12px; background: var(--bg); border-radius: 6px; }
.empty-inline { padding: 20px; color: var(--muted); }
.setup-guide ol { padding-left: 20px; line-height: 1.9; }
.review-period { margin: 0 0 18px; }
.review-row > div, .review-row > span { flex: 1; }
.review-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.edit-documents, .repeat-form { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.edit-documents summary, .repeat-form summary { cursor: pointer; color: var(--ink); font-weight: 600; margin-bottom: 16px; }
.verify-form { width: 100%; }
.verify-form .checkbox-label { max-width: 420px; }
.settings-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-jump a { color: var(--ink); background: #fff; border: 1px solid var(--line); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
@media (max-width: 1199px) {
  .preview-layout { grid-template-columns: 1fr; }
  .preview-layout:not(.preview-has-message) .message-detail { display: none; }
  .preview-layout.preview-has-message .message-list { display: none; }
  .mobile-list-back { display: inline-block; }
  .message-list { margin-bottom: 0; }
  .message-list-item { padding-block: 10px; }
}
@media (max-width: 900px) { .sidebar nav a { min-height: 44px; align-items: center; } }
@media (max-width: 650px) {
  .registry-intro { display: block; }
  .period-form { margin-top: 16px; grid-template-columns: minmax(0, 1fr); }
  .period-form label, .period-form input, .period-form button { width: 100%; }
  .view-tabs { flex-wrap: wrap; padding: 6px 10px 0; }
  .view-tabs a { white-space: nowrap; padding: 10px; }
  .registry-filters { display: grid; padding: 16px; }
  .registry-filters details { width: 100%; }
  .advanced-filters { position: static; width: 100%; box-shadow: none; margin-top: 6px; }
  .registry-panel .selection-dock { position: static; }
  .message-list-head form { flex-wrap: wrap; }
  .batch-summary { gap: 12px; }
  .batch-summary > div { min-width: calc(50% - 12px); }
  .process-steps { gap: 5px 12px; }
  .result-counts { display: grid; }
  .review-row { display: grid; align-items: start; gap: 12px; }
  .review-row > div, .review-row > span { min-width: 0; width: 100%; }
  .review-row .button { justify-self: start; }
}
