/* Contract numbers service page (Службове → Номери договорів) */
.cn-page {
  padding: 12px 16px 32px;
  max-width: 1200px;
}
.cn-page .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.cn-page .section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.cn-page .toolbar-hint {
  color: var(--muted, #6b7280);
  font-size: 0.85rem;
}
.cn-page .card-panel {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.cn-page .card-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
}
.cn-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
}
.cn-stat { min-width: 120px; }
.cn-stat-label {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.cn-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cn-stat-next .cn-next,
.cn-next { color: var(--accent, #2563eb); }
.cn-stat-next .btn { margin-top: 6px; }
.cn-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}
.cn-form-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted, #6b7280);
}
.cn-form-row .input {
  min-width: 140px;
  padding: 6px 8px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 6px;
  font-size: 0.9rem;
}
.cn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cn-table th,
.cn-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.cn-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.cn-series-detail td {
  font-size: 0.8rem;
  background: var(--surface-2, #f9fafb);
}
.cn-page .empty-state {
  padding: 16px;
  color: var(--muted, #6b7280);
  text-align: center;
}
/* Reason history chips on contract form */
.reason-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.reason-history .rh-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-2, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  font-size: 0.8rem;
  overflow: hidden;
}
.reason-history .rh-chip:hover { border-color: var(--accent, #2563eb); }
.reason-history .rh-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 2px 8px;
}
.reason-history .rh-chip .rh-del { color: var(--muted, #6b7280); padding: 2px 8px 2px 2px; }
.reason-history .rh-chip .rh-del:hover { color: #b91c1c; }
.reason-history .rh-add { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.reason-history .rh-add-input { min-width: 200px; font-size: 0.8rem; padding: 3px 8px; }
.numhint .nh-reserved { color: var(--accent, #2563eb); }

/* Folder sidebar tools (contractors + nomenclature) */
.folder-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.folder-sidebar-tools {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
}
.folder-sidebar-tools .btn {
  padding: 2px 6px;
  font-size: 0.75rem;
}
