/* CCH Native V3 structural module CSS: modules/formularcenter/css/formularcenter.css
   Old visual skin removed. Uses core/css/cch-design-v3.css. */
:root {
  --dc-bg: #061522;
  --dc-panel: #091d2b;
  --dc-panel-2: #0c2434;
  --dc-line: #1b5068;
  --dc-line-soft: #14374a;
  --dc-text: #f1f7fa;
  --dc-muted: #9ab0be;
  --dc-accent: #19c5e6;
  --dc-accent-ink: #031019;
  --dc-amber: #ffbd3f;
  --dc-green: #37d77b;
  --dc-red: #ff6470;
}

* {
  box-sizing: border-box;
}

.cch-module-formularcenter {
  margin: 0;
  font-family: Inter,Segoe UI,Arial,sans-serif;
}

.dc-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 214px minmax(0,1fr);
  margin: 0 auto;
}

.dc-sidebar {
  padding: 26px 12px;
  position: sticky;
  top: 0;
  height: calc(100vh - 64px);
  overflow: auto;
}

.dc-sidebar h2 {
  font-size: 16px;
  line-height: 1.25;
  margin: 0 10px 22px;
}

.dc-category {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  text-align: left;
  font: 600 13px/1.2 inherit;
  cursor: pointer;
}

.dc-category-icon {
  width: 20px;
  text-align: center;
  font-size: 17px;
}

.dc-main {
  padding: 26px 24px 40px;
  min-width: 0;
}

.dc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dc-header h1 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
}

.dc-header p {
  margin: 7px 0 0;
}

.dc-primary {
  font-weight: 800 !important;
}

.dc-header button,.dc-dialog button,.dc-list-head button,.dc-detail button {
  padding: 10px 14px;
  font: 700 13px/1 inherit;
  cursor: pointer;
}

.dc-search {
  margin: 20px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}

.dc-search span {
  font-size: 28px;
}

.dc-search input {
  width: 100%;
  height: 48px;
  font: 500 15px/1 inherit;
}

.dc-status {
  min-height: 20px;
  font-size: 13px;
}

.dc-overview {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin: 6px 0 16px;
}

.dc-overview article {
  padding: 14px;
  min-height: 126px;
}

.dc-overview h2 {
  font-size: 14px;
  margin: 0 0 10px;
}

.dc-mini-list {
  display: grid;
  gap: 7px;
}

.dc-mini {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  min-width: 0;
}

.dc-mini span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-mini.empty {
  display: block;
}

.dc-filterbar {
  display: flex;
  gap: 9px;
  align-items: end;
  padding: 11px;
  overflow: auto;
}

.dc-filterbar label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  min-width: 132px;
}

.dc-filterbar select,.dc-dialog input,.dc-dialog select,.dc-dialog textarea {
  padding: 9px 10px;
  min-height: 38px;
  font: 500 13px/1.3 inherit;
}

.dc-filterbar .dc-check,.dc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.dc-check input {
  width: 17px;
  height: 17px;
}

.dc-workspace {
  display: grid;
  grid-template-columns: minmax(520px,1.6fr) minmax(330px,.85fr);
  overflow: hidden;
  margin-top: 12px;
  min-height: 490px;
}

.dc-list-panel {
  min-width: 0;
}

.dc-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-size: 13px;
}

.dc-list-head button {
  padding: 6px 9px;
}

.dc-document-list {
  display: grid;
}

.dc-doc {
  display: grid;
  grid-template-columns: 34px minmax(180px,1.4fr) minmax(90px,.65fr) minmax(86px,.55fr) 64px 94px 34px;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
}

.dc-file-icon {
  width: 30px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 10px;
}

.dc-doc-title {
  min-width: 0;
}

.dc-doc-title strong,.dc-doc-title small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-doc-title strong {
  font-size: 13px;
}

.dc-doc-title small,.dc-doc-meta {
  font-size: 11px;
  margin-top: 3px;
}

.dc-state {
  font-size: 11px;
  white-space: nowrap;
}

.dc-state::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
}

.dc-fav {
  font-size: 20px;
}

.dc-detail {
  min-width: 0;
}

.dc-empty {
  height: 100%;
  min-height: 430px;
  display: grid;
  place-content: center;
  text-align: center;
}

.dc-empty span {
  font-size: 44px;
}

.dc-empty h2 {
  font-size: 17px;
  margin: 12px 0 5px;
}

.dc-detail-head {
  display: flex;
  gap: 11px;
  padding: 14px;
}

.dc-detail-head h2 {
  font-size: 15px;
  margin: 2px 0 5px;
}

.dc-detail-head p {
  font-size: 11px;
  margin: 0;
}

.dc-preview {
  height: 330px;
  display: grid;
  place-items: center;
}

.dc-preview iframe,.dc-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dc-preview-note {
  text-align: center;
  padding: 22px;
}

.dc-preview-note strong {
  display: block;
  margin-bottom: 6px;
}

.dc-detail-meta {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 9px;
  padding: 13px;
}

.dc-detail-meta div {
  font-size: 11px;
}

.dc-detail-meta strong {
  display: block;
  margin-top: 3px;
}

.dc-version-list {
  padding: 0 13px 12px;
}

.dc-version-list h3 {
  font-size: 12px;
}

.dc-version {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 11px;
}

.dc-actions {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 7px;
  padding: 13px;
}

.dc-dialog {
  width: min(760px,calc(100vw - 28px));
  padding: 0;
}

.dc-dialog form {
  padding: 20px;
}

.dc-dialog header,.dc-dialog footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.dc-dialog header {
  padding-bottom: 16px;
}

.dc-dialog header h2 {
  margin: 0;
  font-size: 21px;
}

.dc-dialog header p {
  margin: 5px 0 0;
  font-size: 13px;
}

.dc-dialog footer {
  justify-content: flex-end;
  padding-top: 16px;
}

.dc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 16px;
}

.dc-dialog label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.dc-dialog .wide {
  grid-column: 1/-1;
}

.dc-file-drop {
  padding: 14px;
}

.dc-dialog-small {
  width: min(500px,calc(100vw - 28px));
}

.dc-dialog-small form>label {
  margin-top: 14px;
}

.dc-bottom {
  display: none;
}

@media (max-width:1050px) {
.dc-shell {
  grid-template-columns: 1fr;
}

.dc-sidebar {
  display: none;
}

.dc-main {
  padding: 20px 14px 90px;
}

.dc-workspace {
  grid-template-columns: 1fr;
}

.dc-detail {
  display: none;
}

.dc-detail.mobile-open {
  display: block;
  position: fixed;
  inset: 62px 0 64px;
  z-index: 40;
  overflow: auto;
}

.dc-overview {
  grid-template-columns: 1fr;
  overflow: hidden;
}

.dc-overview article:not(:first-child) {
  display: none;
}

.dc-filterbar {
  scrollbar-width: thin;
}

.dc-doc {
  grid-template-columns: 32px minmax(150px,1fr) 72px 32px;
}

.dc-doc>:nth-child(3),.dc-doc>:nth-child(4),.dc-doc>:nth-child(6) {
  display: none;
}

.dc-bottom {
  display: grid;
  position: fixed;
  z-index: 60;
  bottom: 0;
  left: 0;
  right: 0;
  grid-template-columns: repeat(5,1fr);
  padding-bottom: env(safe-area-inset-bottom);
}

.dc-bottom button {
  padding: 8px 2px;
  font: 600 10px/1.1 inherit;
}

.dc-bottom button span {
  display: block;
  font-size: 19px;
  margin-bottom: 4px;
}
}

@media (max-width:620px) {
.dc-header h1 {
  font-size: 22px;
}

.dc-header p {
  font-size: 12px;
}

.dc-header {
  align-items: center;
}

.dc-primary {
  padding: 9px !important;
}

.dc-overview {
  margin-top: 2px;
}

.dc-filterbar {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: end;
  overflow: visible;
  margin-inline: -14px;
}

.dc-filterbar label {
  min-width: 0;
}

.dc-filterbar select {
  width: 100%;
  min-width: 0;
}

.dc-filterbar .dc-check {
  grid-column: 1/-1;
}

.dc-workspace {
  margin-inline: -14px;
}

.dc-form-grid {
  grid-template-columns: 1fr;
}

.dc-dialog .wide {
  grid-column: auto;
}

.dc-bottom button {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 9px !important;
  line-height: 1 !important;
  padding: 7px 1px !important;
}

.dc-bottom button span {
  font-size: 17px;
  margin-bottom: 3px;
}
}

@media (prefers-reduced-motion:no-preference) {
.dc-doc,.dc-category,.dc-header button {
  transition: background .16s ease,color .16s ease,transform .16s ease;
}

.dc-header button:hover {
  transform: translateY(-1px);
}
}

body.cch-theme-tech.cch-module-formularcenter button.dc-category {
  padding: 11px 12px !important;
  font-size: 13px !important;
  justify-content: flex-start !important;
}

body.cch-theme-tech.cch-module-formularcenter button.dc-mini {
  padding: 2px 0 !important;
  font-size: 12px !important;
  text-align: left !important;
  justify-content: stretch !important;
}

body.cch-theme-tech.cch-module-formularcenter button.dc-doc {
  padding: 12px 10px !important;
  font-size: 13px !important;
  justify-content: stretch !important;
}

body.cch-theme-tech.cch-module-formularcenter button.dc-primary {
  font-size: 13px !important;
}

.dc-shell {
  grid-template-columns: 206px minmax(0,1fr);
  gap: 18px;
  padding: calc(var(--cch-topnav-height,120px) + 34px) 22px 48px;
}

.dc-sidebar {
  top: 18px;
  height: calc(100vh - 110px);
  padding: 20px 10px;
}

.dc-sidebar h2 {
  font-size: 18px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.dc-category small {
  margin-left: auto;
  opacity: .72;
}

.dc-main {
  padding: 4px 0 40px;
}

.dc-header {
  align-items: center;
}

.dc-header h1 {
  font-size: clamp(25px,2.3vw,34px);
  letter-spacing: -.025em;
}

.dc-header p {
  font-size: 14px;
}

.dc-header #dcUploadOpen {
  min-height: 46px;
  padding-inline: 18px !important;
}

.dc-search {
  margin: 16px 0 8px;
}

.dc-search input {
  height: 50px;
}

.dc-status {
  padding: 0 4px;
}

.dc-overview {
  gap: 10px;
  margin: 4px 0 12px;
}

.dc-overview article {
  min-height: 96px;
  padding: 12px 14px;
}

.dc-overview h2 {
  margin-bottom: 7px;
}

.dc-filterbar {
  display: grid;
  grid-template-columns: repeat(5,minmax(120px,1fr)) auto;
  align-items: end;
  padding: 10px 12px;
}

.dc-filterbar label {
  min-width: 0;
}

.dc-filterbar select {
  width: 100%;
}

.dc-workspace {
  grid-template-columns: minmax(470px,1.55fr) minmax(320px,.8fr);
  min-height: 420px;
  margin-top: 10px;
}

.dc-list-head {
  min-height: 52px;
  padding: 10px 14px;
}

.dc-empty {
  min-height: 360px;
  padding: 30px;
}

.dc-empty-action {
  align-content: center;
}

.dc-empty-action p {
  max-width: 360px;
  line-height: 1.55;
}

.dc-empty-action button {
  justify-self: center;
  margin-top: 10px;
  min-height: 43px;
}

.dc-dialog form {
  padding: 24px;
}

.dc-dialog [hidden] {
  display: none !important;
}

@media (max-width:1180px) {
.dc-filterbar {
  grid-template-columns: repeat(3,minmax(130px,1fr));
}

.dc-workspace {
  grid-template-columns: minmax(420px,1.35fr) minmax(300px,.8fr);
}
}

@media (max-width:1050px) {
.dc-shell {
  display: block;
  padding: calc(var(--cch-topnav-height,124px) + 18px) 14px 90px;
}

.dc-main {
  padding: 0;
}

.dc-overview {
  grid-template-columns: repeat(3,minmax(220px,1fr));
  overflow: auto;
}

.dc-overview article:not(:first-child) {
  display: block;
}

.dc-workspace {
  grid-template-columns: 1fr;
}

.dc-empty {
  min-height: 300px;
}
}

@media (max-width:720px) {
.dc-shell {
  padding-inline: 12px;
}

.dc-header {
  align-items: flex-start;
}

.dc-header>div {
  min-width: 0;
}

.dc-header #dcUploadOpen {
  font-size: 0 !important;
  padding: 0 !important;
  width: 46px;
  min-width: 46px;
}

.dc-header #dcUploadOpen span {
  font-size: 24px;
}

.dc-overview {
  grid-template-columns: minmax(260px,1fr);
}

.dc-overview article:not(:first-child) {
  display: none;
}

.dc-filterbar {
  grid-template-columns: 1fr 1fr;
  margin-inline: -12px;
  padding-inline: 12px;
}

.dc-workspace {
  margin-inline: -12px;
}

.dc-dialog form {
  padding: 18px;
}

.dc-form-grid {
  gap: 11px;
}
}

/* Formularcenter v0.2.1: module-local layout + notification recipient UI */
.cch-module-formularcenter .dc-shell {
  width: 90vw;
  max-width: none;
  padding: var(--dc-shell-top-pad, 26px) 0 48px;
  gap: 20px;
}

.cch-module-formularcenter .dc-sidebar {
  top: 26px;
  height: calc(100vh - 52px);
}

.cch-module-formularcenter .dc-main {
  padding-top: 0;
}

.cch-module-formularcenter .dc-dialog {
  max-height: min(88vh, 860px);
  overflow: auto;
}

.cch-module-formularcenter .dc-notify-panel {
  margin: 2px 0 0;
  padding: 14px;
  border: 1px solid var(--dc-line-soft);
  border-radius: 14px;
  background: rgba(8, 28, 42, .72);
}

.cch-module-formularcenter .dc-notify-panel legend {
  padding: 0 8px;
  color: var(--dc-text);
  font-size: 12px;
  font-weight: 800;
}

.cch-module-formularcenter .dc-notify-toggle {
  min-width: 0;
  font-weight: 700;
}

.cch-module-formularcenter .dc-notify-controls {
  display: grid;
  gap: 12px;
  margin-top: 13px;
}

.cch-module-formularcenter .dc-notify-controls[hidden] {
  display: none !important;
}

.cch-module-formularcenter .dc-notify-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.cch-module-formularcenter .dc-notify-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.cch-module-formularcenter .dc-notify-count {
  color: var(--dc-muted);
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
}

.cch-module-formularcenter .dc-notify-recipients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
}

.cch-module-formularcenter .dc-notify-person {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px !important;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--dc-line-soft);
  border-radius: 11px;
  background: rgba(4, 18, 29, .78);
  cursor: pointer;
}

.cch-module-formularcenter .dc-notify-person:hover {
  border-color: var(--dc-line);
  background: rgba(10, 39, 57, .88);
}

.cch-module-formularcenter .dc-notify-person input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.cch-module-formularcenter .dc-notify-person span,
.cch-module-formularcenter .dc-notify-person strong,
.cch-module-formularcenter .dc-notify-person small {
  min-width: 0;
}

.cch-module-formularcenter .dc-notify-person strong,
.cch-module-formularcenter .dc-notify-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cch-module-formularcenter .dc-notify-person strong {
  color: var(--dc-text);
  font-size: 12px;
}

.cch-module-formularcenter .dc-notify-person small,
.cch-module-formularcenter .dc-form-hint {
  color: var(--dc-muted);
  font-size: 11px;
}

.cch-module-formularcenter .dc-notify-person small {
  margin-top: 3px;
}

.cch-module-formularcenter .dc-notify-empty {
  grid-column: 1 / -1;
  padding: 18px;
  text-align: center;
  color: var(--dc-muted);
  border: 1px dashed var(--dc-line-soft);
  border-radius: 11px;
}

.cch-module-formularcenter .dc-form-hint {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 1050px) {
  .cch-module-formularcenter .dc-shell {
    width: calc(100vw - 28px);
    padding: var(--dc-shell-top-pad, 22px) 0 90px;
  }
}

@media (max-width: 720px) {
  .cch-module-formularcenter .dc-shell {
    width: calc(100vw - 24px);
  }
  .cch-module-formularcenter .dc-notify-toolbar,
  .cch-module-formularcenter .dc-notify-recipients {
    grid-template-columns: 1fr;
  }
  .cch-module-formularcenter .dc-notify-toolbar-actions {
    justify-content: flex-start;
  }
}

.cch-module-formularcenter .dc-dialog label.dc-notify-toggle {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cch-module-formularcenter .dc-dialog label.dc-notify-toggle input {
  flex: 0 0 auto;
  margin: 0;
}

/* Formularcenter recipient lookup: API errors must not look like a normal empty search. */
.cch-module-formularcenter .dc-notify-empty.dc-notify-error {
  display: grid;
  gap: 5px;
  color: #ffb8b8;
  border-color: rgba(255, 104, 104, .35);
  background: rgba(87, 20, 28, .18);
}

.cch-module-formularcenter .dc-notify-empty.dc-notify-error strong,
.cch-module-formularcenter .dc-notify-empty.dc-notify-error span {
  display: block;
}


/* Formularcenter v0.2.5: category management + nested category rail. */
.cch-module-formularcenter .dc-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.cch-module-formularcenter .dc-header-actions > button {
  min-height: 46px;
}

.cch-module-formularcenter .dc-category-node {
  min-width: 0;
}

.cch-module-formularcenter .dc-category-node .dc-category {
  padding-left: calc(12px + (var(--dc-category-depth, 0) * 13px)) !important;
}

.cch-module-formularcenter .dc-category-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cch-module-formularcenter .dc-category-chevron {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  opacity: .68;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.cch-module-formularcenter .dc-category[aria-expanded="true"] .dc-category-chevron {
  transform: rotate(90deg);
}

.cch-module-formularcenter .dc-category-children[hidden] {
  display: none !important;
}

.cch-module-formularcenter #dcCategoryDialog .dc-form-hint {
  margin: 12px 0 0;
}

@media (max-width: 620px) {
  .cch-module-formularcenter .dc-header {
    align-items: flex-start;
  }

  .cch-module-formularcenter .dc-header-actions {
    justify-content: flex-start;
  }

  .cch-module-formularcenter .dc-header-actions > button {
    min-height: 40px;
  }
}
.dc-tag-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.dc-tag-row em{padding:2px 7px;border-radius:999px;background:rgba(36,183,233,.12);color:#9be8fa;font-size:.68rem;font-style:normal;font-weight:800}
