﻿/* Blazor host adapters — keep prototype chat/social look inside .hcs-app-shell.
   Loaded last so leftover .hcs-app-shell / Bootstrap rules cannot restyle the sample. */

html:has(.hcs-app-shell),
html:has(.hcs-public-shell) {
  height: auto !important;
  max-height: none !important;
  max-width: 100%;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto !important;
}

body:has(.hcs-app-shell),
body.abp-application-layout:has(.hcs-app-shell),
body:has(.hcs-public-shell),
body.abp-application-layout:has(.hcs-public-shell) {
  height: auto !important;
  max-height: none !important;
  max-width: 100%;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto !important;
}

.hcs-app-shell {
  --bs-border-radius: var(--radius-xl, 16px);
  --bs-border-radius-sm: var(--radius-md, 8px);
  --bs-border-radius-lg: var(--radius-xl, 16px);
  --bs-btn-border-radius: var(--button-radius, var(--radius-xl, 16px));
  --bs-card-border-radius: var(--card-radius, var(--radius-xl, 16px));
  --bs-modal-border-radius: var(--radius-xl, 16px);
  --bs-input-border-radius: var(--input-radius, var(--radius-xl, 16px));
  --hcs-bottom-nav-height: 0px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.hcs-app-shell:not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
  height: auto;
  overflow: visible;
}

.hcs-app-shell:has(.hcs-chat-page),
.hcs-app-shell:has(.page-chat) {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: var(--hcs-bottom-nav-height, 0px);
}

.hcs-app-shell .hcs-main-content:not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
  height: auto;
  max-height: none;
  overflow: visible;
}

html:has(.hcs-chat-page),
html:has(.page-chat),
body:has(.hcs-chat-page),
body:has(.page-chat) {
  height: 100%;
  overflow: hidden;
}

.hcs-app-shell .hcs-header,
.hcs-app-shell .hcs-header__top,
.hcs-app-shell .hcs-top-nav,
.hcs-app-shell .hcs-main-content,
.hcs-app-shell .page,
.hcs-app-shell .page-wf,
.hcs-app-shell .docs-main,
.hcs-app-shell .kb-board,
.hcs-app-shell .docs-table-wrap {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

/* ——— Chat viewport (match docs/hcs-hanh-chinh-so/chat.html) ——— */
.hcs-app-shell .hcs-main-content:has(.hcs-chat-page),
.hcs-app-shell .hcs-main-content:has(.page-chat) {
  background: var(--color-background, #F3F7F8) !important;
  flex: 1 1 auto;
  height: auto !important;
  max-height: none;
  min-height: 0;
  padding: 0 !important;
}

.hcs-app-shell .chat-app.hcs-chat-page,
.hcs-app-shell .page-chat.hcs-chat-page {
  background: var(--color-background, #F3F7F8) !important;
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100% !important;
  min-height: 0;
  overflow: visible;
  padding: 12px 16px 16px !important;
}

.hcs-app-shell .page-chat .chat-shell,
.hcs-app-shell .chat-shell.hcs-chat {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: grid !important;
  flex: 1 1 auto;
  gap: 12px !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden;
}

.hcs-app-shell .page-chat .chat-shell.is-info-open {
  grid-template-columns: 280px minmax(0, 1fr) 420px !important;
}

.hcs-app-shell .page-chat .chat-list,
.hcs-app-shell .page-chat .chat-thread,
.hcs-app-shell .page-chat .chat-info {
  background: #fff !important;
  border: 0 !important;
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04)) !important;
  min-height: 0;
  overflow: hidden;
}

.hcs-app-shell .page-chat .chat-info[hidden] {
  display: none !important;
}

.hcs-app-shell .page-chat button.msg-like {
  box-sizing: border-box;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #fff !important;
  color: #8b95a1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16) !important;
}

.hcs-app-shell .page-chat button:not(.btn):not(.chat-send):not([role="menuitem"]):not(.doc-action):not(.chat-thumb):not(.chat-name-btn):not(.chat-pin-info):not(.msg-task-open):not(.hcs-chat__connection-action):not(.msg-react):not(.msg-like) {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: none;
  border: 0;
  box-shadow: none;
  min-height: 0;
}

.hcs-app-shell .page-chat .icon-btn,
.hcs-app-shell .page-chat .hcs-chat__icon.icon-btn,
.hcs-app-shell .page-chat .msg-more {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0 !important;
  border-radius: var(--radius-full, 9999px) !important;
  height: 40px;
  min-height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  width: 40px;
}

.hcs-app-shell .page-chat .msg-more:hover,
.hcs-app-shell .page-chat .msg-more[aria-expanded="true"],
.hcs-app-shell .page-chat .msg-more-wrap.is-open .msg-more {
  background: var(--color-gray-100, #F1F5F9) !important;
  color: var(--color-gray-700, #334155);
}

.hcs-app-shell .page-chat .chat-file-chip .icon-btn {
  height: 28px;
  min-height: 28px !important;
  min-width: 28px !important;
  width: 28px;
}

.hcs-app-shell .page-chat .chat-list-tabs {
  border-bottom: 1px solid var(--color-gray-100, #F1F5F9);
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  margin: 4px 12px 0;
}

.hcs-app-shell .page-chat .chat-list-tab {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--color-muted, #64748B);
  min-height: 44px !important;
  padding: 0 !important;
  width: 100%;
}

.hcs-app-shell .page-chat .chat-list-tab.is-active,
.hcs-app-shell .page-chat .chat-list-tab.is-active:active,
.hcs-app-shell .page-chat .chat-list-tab:active {
  background: transparent !important;
  border-bottom-color: var(--color-primary, #007f7c) !important;
  color: var(--color-primary, #007f7c) !important;
}

.hcs-app-shell .page-chat .chat-item {
  background: transparent;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  min-height: 64px !important;
}

.hcs-app-shell .page-chat .chat-item.is-active {
  background: #E7F7F4 !important;
  border-left-color: var(--color-primary, #007f7c) !important;
}

.hcs-app-shell .page-chat .chat-contact {
  min-height: 56px !important;
}

.hcs-app-shell .page-chat .chat-name-btn {
  height: auto !important;
  min-height: 40px !important;
  width: auto !important;
  max-width: 100%;
  padding: 6px 10px !important;
  border-radius: 10px !important;
}

.hcs-app-shell .page-chat .chat-name-btn:hover:not(:disabled) {
  background: var(--color-gray-50, #F8FAFC) !important;
}

.hcs-app-shell .page-chat .chat-rename-input {
  height: var(--input-height, 44px);
  min-height: var(--input-height, 44px) !important;
  width: 100%;
  max-width: 280px;
}

.hcs-app-shell .page-chat .doc-action {
  width: 36px;
  height: 36px;
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border-radius: var(--radius-md, 8px) !important;
}

.hcs-app-shell .page-chat .doc-action.is-danger {
  color: var(--color-danger, #DC2626) !important;
}

.hcs-app-shell .page-chat .doc-action.is-danger:hover {
  background: #FEF2F2 !important;
}

.hcs-app-shell .page-chat .chat-info-section-head .btn {
  gap: 8px;
  min-height: 32px !important;
  overflow: visible;
  padding: 0 10px !important;
  white-space: nowrap;
}

.hcs-app-shell .page-chat .chat-info-section-head .btn::before {
  content: none !important;
  display: none !important;
}

.hcs-app-shell .page-chat .chat-info-section-head .btn svg {
  display: block;
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

.hcs-app-shell .page-chat .chat-pin-info {
  min-height: 44px !important;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: #F0FDFA;
}

.hcs-app-shell .page-chat .chat-pin-info:hover {
  background: #DDF7F3 !important;
}

.hcs-app-shell .page-chat .chat-thumb {
  width: 100%;
  min-height: 0 !important;
  height: auto;
  padding: 0 !important;
  border-radius: 10px !important;
}

.hcs-app-shell .page-chat a.chat-thumb-file {
  color: inherit;
  text-decoration: none;
}

.hcs-app-shell .page-chat .chat-pin-bar-body,
.hcs-app-shell .page-chat .msg-quote,
.hcs-app-shell .page-chat .hcs-chat__pinned-item,
.hcs-app-shell .page-chat .forward-option,
.hcs-app-shell .page-chat .hcs-chat__older,
.hcs-app-shell .page-chat .chat-media-tab,
.hcs-app-shell .page-chat .chat-name-btn {
  min-height: 40px !important;
}

.hcs-app-shell .page-chat .hcs-chat__state,
.hcs-app-shell .page-chat .chat-list > .chat-empty {
  color: var(--color-muted, #64748B);
  font-size: var(--font-size-sm, 0.8125rem);
  margin: auto;
  padding: 24px 16px;
  text-align: center;
}

.hcs-app-shell .page-chat .hcs-chat__empty {
  align-items: center;
  color: var(--color-muted, #64748B);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  margin: auto;
  max-width: 22rem;
  padding: 32px 24px;
  text-align: center;
}

.hcs-app-shell .page-chat .hcs-chat__empty svg {
  color: var(--color-primary, #007f7c);
}

.hcs-app-shell .page-chat .hcs-chat__empty h2 {
  color: var(--color-primary, #007f7c);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.hcs-app-shell .page-chat .hcs-chat__empty p {
  margin: 0;
}

.hcs-app-shell .page-chat .chat-compose {
  flex-wrap: wrap;
  overflow: visible !important;
  position: relative;
  z-index: 6;
}

.hcs-app-shell .page-chat .chat-compose-banner,
.hcs-app-shell .page-chat .chat-compose-files,
.hcs-app-shell .page-chat .hcs-chat__composer-error {
  flex: 1 0 100%;
}

.hcs-app-shell .page-chat .chat-send {
  background: var(--color-primary, #007f7c) !important;
  border: 0 !important;
  border-radius: var(--radius-full, 9999px) !important;
  color: #fff !important;
}

.hcs-app-shell .page-chat .chat-input-wrap {
  align-items: center !important;
  border-radius: var(--radius-full, 9999px) !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  position: relative !important;
}

.hcs-app-shell .page-chat .chat-mention {
  background: var(--color-gray-50, #F8FAFC) !important;
  border: 0 !important;
  border-radius: 9999px !important;
  color: var(--color-primary, #007f7c) !important;
  height: 44px !important;
  min-width: 44px !important;
  width: 44px !important;
}

.hcs-app-shell .page-chat .chat-input-wrap.is-mentioning textarea {
  field-sizing: content;
  flex: 0 1 auto !important;
  max-width: 46% !important;
  min-width: 6ch !important;
  width: auto !important;
}

.hcs-app-shell .page-chat .chat-mention-inline {
  align-items: center;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: row !important;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  position: static !important;
}

.hcs-app-shell .page-chat .chat-mention-chip {
  background: var(--color-gray-100, #F1F5F9) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: var(--color-foreground, #0f172a) !important;
  flex: 0 0 auto;
  font-size: 13px !important;
  font-weight: 600;
  height: 28px !important;
  line-height: 28px;
  max-width: 180px;
  min-height: 28px !important;
  overflow: hidden;
  padding: 0 10px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: auto !important;
}

.hcs-app-shell .page-chat .chat-mention-chip.is-active,
.hcs-app-shell .page-chat .chat-mention-chip:hover {
  background: var(--color-primary, #007f7c) !important;
  color: #fff !important;
}

.hcs-app-shell .page-chat .chat-input-wrap > svg {
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

.hcs-app-shell .page-chat .chat-input-wrap textarea,
.hcs-app-shell .page-chat .chat-input-wrap input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--color-foreground);
  flex: 1 1 auto !important;
  font: inherit;
  font-size: var(--font-size-sm, 0.8125rem) !important;
  height: 44px !important;
  max-height: 120px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  outline: none;
  padding: 10px 0 !important;
  resize: none;
  width: auto !important;
}

.hcs-app-shell .page-chat a.msg-file,
.hcs-app-shell .page-chat a.hcs-chat-preview__download {
  color: inherit;
  text-decoration: none;
}

.hcs-app-shell .page-chat a.msg-file:hover,
.hcs-app-shell .page-chat a.msg-file:focus-visible {
  color: inherit;
  text-decoration: none;
}

.hcs-app-shell .page-chat .msg-task-open {
  background: none;
  border: 0;
  color: var(--color-primary, #007f7c);
  cursor: pointer;
  height: auto;
  min-height: 0 !important;
  padding: 0;
  text-decoration: none;
}

.hcs-app-shell .page-chat .msg-task-open:hover,
.hcs-app-shell .page-chat .msg-task-open:focus-visible {
  color: var(--color-primary-hover, #006866);
}

.hcs-app-shell .page-chat .chat-attach,
.hcs-app-shell .page-chat .chat-attach-input {
  cursor: pointer !important;
}

.hcs-app-shell .page-chat .chat-attach:hover,
.hcs-app-shell .page-chat .chat-attach:focus-within,
.hcs-app-shell .page-chat .chat-assign:hover:not(:disabled) {
  background: var(--color-gray-100, #F1F5F9) !important;
  color: var(--color-primary, #007f7c) !important;
}

.hcs-app-shell .page-chat .chat-attach-input:hover,
.hcs-app-shell .page-chat .chat-attach-input:focus,
.hcs-app-shell .page-chat .chat-attach-input:focus-visible {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.hcs-app-shell .page-chat .chat-info-actions .btn {
  width: 100%;
}

.hcs-app-shell .page-chat .chat-shell.is-info-open.chat-shell--compact-info {
  grid-template-columns: 280px minmax(0, 1fr) 300px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-avatar.lg,
.hcs-app-shell .page-chat .chat-info--compact .hcs-chat__avatar-wrap .chat-avatar.lg,
.hcs-app-shell .page-chat .chat-info--compact .hcs-chat__avatar-wrap--large .chat-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  font-size: 14px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-name-btn,
.hcs-app-shell .page-chat .chat-info--compact .chat-media-tab {
  min-height: 28px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-info-actions .btn {
  height: auto !important;
  min-height: 30px !important;
  padding: 4px 10px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-pin-info {
  min-height: 30px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-thumb {
  border-radius: 6px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-media-grid {
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-media-grid.is-files {
  grid-template-columns: 1fr !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-media-grid.is-files .chat-thumb-file {
  aspect-ratio: auto;
  flex-direction: row;
  height: auto !important;
  justify-content: flex-start;
  min-height: 32px !important;
  padding: 4px 8px !important;
}

.hcs-app-shell .page-chat .chat-info--compact .chat-thumb-ext {
  display: grid !important;
  place-items: center !important;
  flex: 0 0 36px !important;
  box-sizing: border-box !important;
  width: 36px !important;
  height: 22px !important;
  padding: 0 !important;
  font-size: 9px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  overflow: hidden !important;
}

.hcs-app-shell .page-chat a.chat-thumb-dl {
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-decoration: none;
}

.hcs-app-shell .page-chat .chat-thumb-wrap:hover a.chat-thumb-dl,
.hcs-app-shell .page-chat .chat-thumb-wrap:focus-within a.chat-thumb-dl,
.hcs-app-shell .page-chat a.chat-thumb-dl:focus-visible {
  color: #fff !important;
  opacity: 1;
  pointer-events: auto;
}

.hcs-app-shell .page-chat a.chat-thumb-dl:hover {
  color: #fff !important;
}

@media (hover: none) {
  .hcs-app-shell .page-chat a.chat-thumb-dl {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .hcs-app-shell .page-chat .chat-shell.is-info-open {
    grid-template-columns: minmax(0, 1fr) minmax(0, 390px) !important;
  }

  .hcs-app-shell .page-chat .chat-shell.is-info-open.chat-shell--compact-info {
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px) !important;
  }
}

@media (max-width: 900px) {
  .hcs-app-shell .page-chat .chat-shell,
  .hcs-app-shell .page-chat .chat-shell.is-info-open,
  .hcs-app-shell .page-chat .chat-shell.is-thread-open {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .hcs-app-shell .page-chat .chat-shell.is-info-open .chat-list,
  .hcs-app-shell .page-chat .chat-shell.is-info-open .chat-thread {
    display: none !important;
  }

  .hcs-app-shell .page-chat .chat-shell.is-info-open .chat-info {
    display: flex !important;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .hcs-app-shell .page-chat .chat-info[hidden] {
    display: none !important;
  }
}

.hcs-app-shell .msg.is-in .msg-mention {
  background: color-mix(in srgb, var(--color-primary, #007f7c) 14%, transparent);
  color: var(--color-primary-active, var(--color-primary, #007f7c)) !important;
}

.hcs-app-shell .msg.is-out .msg-mention {
  background: rgba(255, 255, 255, 0.22);
  color: #fff !important;
}

.hcs-app-shell .msg-bubble p {
  margin: 0;
}

.hcs-app-shell .msg-bubble .msg-name + p {
  margin-top: 2px;
}

.hcs-app-shell .hcs-chat__message-time {
  color: var(--color-muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.hcs-app-shell .msg.is-out .hcs-chat__message-time {
  text-align: right;
}

.hcs-app-shell .hcs-chat__avatar-wrap {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  position: relative;
}

.hcs-app-shell .page-chat .chat-avatar > img,
.hcs-app-shell .page-chat .chat-avatar > .chat-avatar-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.hcs-app-shell .page-chat .chat-avatar > .chat-dot,
.hcs-app-shell .page-chat .chat-avatar > .hcs-chat__presence {
  z-index: 1;
}

.hcs-app-shell .chat-item .hcs-chat__unread {
  align-self: center;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  margin-left: auto;
  min-width: 1.25rem;
  padding: 0.1rem 0.4rem;
  text-align: center;
}

.hcs-app-shell .hcs-chat__message-menu,
.hcs-app-shell .msg-menu,
.hcs-app-shell .page-chat .msg-menu {
  position: fixed !important;
  inset: auto auto auto auto;
  background: var(--color-white);
  border: 1px solid var(--color-border, #E2E8F0);
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  min-width: 220px;
  padding: 6px;
  z-index: calc(var(--hcs-z-popover, 350) + 20);
}

.hcs-app-shell .hcs-chat__message-menu button,
.hcs-app-shell .msg-menu button,
.hcs-app-shell .page-chat .msg-menu button {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--color-gray-700, #334155) !important;
  display: flex;
  font-size: 13px !important;
  font-weight: 500;
  gap: 10px;
  height: auto !important;
  justify-content: flex-start;
  min-height: 40px !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  width: 100% !important;
}

.hcs-app-shell .msg-menu button.is-danger,
.hcs-app-shell .page-chat .msg-menu button.is-danger {
  color: var(--color-danger) !important;
}

.hcs-app-shell .msg-menu button:hover,
.hcs-app-shell .page-chat .msg-menu button:hover {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary-active, var(--color-primary)) !important;
}

.hcs-app-shell .msg-menu button.is-danger:hover,
.hcs-app-shell .page-chat .msg-menu button.is-danger:hover {
  background: color-mix(in srgb, var(--color-danger) 10%, var(--color-white)) !important;
  color: var(--color-danger) !important;
}

.hcs-app-shell .page-chat .modal-overlay.is-open,
.hcs-app-shell .page-social .modal-overlay.is-open {
  position: fixed !important;
  inset: 0 !important;
  display: grid !important;
  align-content: center;
  align-items: center !important;
  justify-content: center;
  justify-items: center !important;
  place-items: center !important;
  padding: 24px 16px !important;
  background: rgba(15, 23, 42, 0.45);
  z-index: var(--hcs-z-modal, 300) !important;
}

.hcs-app-shell .page-chat .chat-dialog,
.hcs-app-shell .page-social .chat-dialog {
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px !important;
  max-height: min(86vh, 640px) !important;
  height: auto !important;
  align-self: center !important;
  justify-self: center !important;
  border-radius: var(--radius-xl, 16px) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(15, 23, 42, 0.16));
}

.hcs-app-shell .page-social .chat-preview-dialog,
.hcs-app-shell .page-chat .chat-preview-dialog {
  width: min(96vw, 88rem) !important;
  max-width: min(96vw, 88rem) !important;
  height: auto !important;
  max-height: min(94vh, 1100px) !important;
  align-self: center !important;
  justify-self: center !important;
  border-radius: var(--radius-xl, 16px) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-lg, 0 20px 50px rgba(15, 23, 42, 0.16));
}

.hcs-app-shell .page-chat .chat-preview-dialog {
  width: min(76.8vw, 70.4rem) !important;
  max-width: min(76.8vw, 70.4rem) !important;
}

/* ——— Social ——— */
.hcs-app-shell .hcs-social-page.page-social {
  display: flex;
  flex-direction: column;
  gap: var(--social-gap, 16px);
  margin-inline: auto;
  max-width: 1280px;
  width: 100%;
}

.hcs-app-shell .page-social .social-pill {
  background: transparent;
  border: 0;
  border-radius: var(--radius-full, 9999px) !important;
  min-height: 36px !important;
  height: 36px;
  padding: 0 14px !important;
}

.hcs-app-shell .page-social .social-pill.is-active,
.hcs-app-shell .page-social .social-pill.is-active:active {
  background: var(--color-primary);
  color: var(--color-white);
}

.hcs-app-shell .page-social .social-feed-head {
  align-items: flex-end;
  margin-bottom: 0;
}

.hcs-app-shell .page-social .social-feed-head h1 {
  color: var(--color-primary) !important;
  font-size: 22px !important;
  font-weight: 600;
  line-height: 1.25;
}

.hcs-app-shell .page-social .social-feed-head .page-actions .btn,
.hcs-app-shell .page-social .social-feed-head .btn,
.hcs-app-shell .page-social .social-composer .btn,
.hcs-app-shell .page-social .social-search-form .btn,
.hcs-app-shell .page-social .btn.btn-primary,
.hcs-app-shell .page-social .btn.btn-ghost,
.hcs-app-shell .page-social .btn.btn-outline {
  border-radius: var(--button-radius, var(--radius-xl, 16px)) !important;
  height: 40px;
  min-height: 40px !important;
  padding: 0 16px !important;
}

.hcs-app-shell .page-social .social-search-toggle.icon-btn {
  border-radius: var(--radius-full, 9999px) !important;
  height: 40px;
  min-height: 40px !important;
  min-width: 40px !important;
  width: 40px;
  padding: 0 !important;
}

.hcs-app-shell .page-social .social-cover-bar .social-search-toggle.icon-btn {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.18) !important;
}

.hcs-app-shell .page-social .social-cover-bar .social-search-toggle.icon-btn:hover,
.hcs-app-shell .page-social .social-cover-bar .social-search-toggle.icon-btn[aria-expanded="true"] {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.3) !important;
}

.hcs-app-shell .page-social .social-toolbar.card {
  min-height: 56px;
  overflow: visible !important;
  padding: 8px 18px !important;
}

.hcs-app-shell .page-social .social-feed-head,
.hcs-app-shell .page-social .social-feed-head .page-actions,
.hcs-app-shell .page-social .social-toolbar-main {
  overflow: visible;
}

.hcs-app-shell .page-social .docs-filter-pop {
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  padding: 12px 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(36rem, calc(100vw - 32px));
  z-index: var(--z-dropdown, 60);
}

.hcs-app-shell .page-social .docs-filter-pop.is-open {
  display: flex;
}

.hcs-app-shell .page-social .docs-filter-pop[hidden] {
  display: none !important;
}

.hcs-app-shell .page-social .docs-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hcs-app-shell .page-social .card,
.hcs-app-shell .page-social .post-card,
.hcs-app-shell .page-social .people-card,
.hcs-app-shell .page-social .social-cover,
.hcs-app-shell .page-social .social-toolbar.card,
.hcs-app-shell .page-social .social-composer {
  border-radius: var(--radius-xl, 16px) !important;
}

.hcs-app-shell .page-social .social-cover-avatar {
  overflow: hidden;
}

.hcs-app-shell .page-social .hcs-social-avatar.chat-avatar {
  background: #d8f4f0;
  color: var(--color-primary);
}

.hcs-app-shell .page-social .social-cover-avatar.hcs-social-avatar {
  font-size: 22px;
  height: 88px;
  margin-top: -44px;
  min-width: 88px;
  width: 88px;
}

.hcs-app-shell .page-social .comment-compose .input,
.hcs-app-shell .page-social .comment-compose textarea.input {
  flex: 1;
  height: 40px;
  min-height: 40px;
  resize: none;
}

.hcs-app-shell .page-social button:not(.btn):not(.social-mode):not([role="menuitem"]):not(.hcs-rating-star):not(.social-trust-chip):not(.social-cover-trust) {
  -webkit-appearance: none !important;
  appearance: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hcs-app-shell .page-social .icon-btn {
  background: transparent;
  border: 0 !important;
}

.hcs-app-shell .page-social .social-cover {
  overflow: visible;
}

.hcs-app-shell .page-social .social-cover-tool.icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  color: var(--color-primary);
  background: var(--color-teal-50, #e7f6f3) !important;
}

.hcs-app-shell .page-social .social-cover-tool.icon-btn:hover,
.hcs-app-shell .page-social .social-cover-tool.icon-btn.is-open,
.hcs-app-shell .page-social .social-cover-tool.icon-btn[aria-expanded="true"] {
  background: #d8f0eb !important;
}

.hcs-app-shell .page-social .post-action {
  min-height: 36px;
  padding: 4px 8px;
  background: transparent;
  border-radius: 0;
}

.hcs-app-shell .page-social .post-action:hover,
.hcs-app-shell .page-social .post-action.is-on {
  background: transparent;
}

.hcs-app-shell .page-social .post-actions-meta button,
.hcs-app-shell .page-social .post-actions-meta-btn {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--color-muted, #64748B);
  font: inherit;
  font-size: 12px;
  min-height: 32px;
  padding: 0;
}

.hcs-app-shell .page-social .post-actions-meta button:hover,
.hcs-app-shell .page-social .post-actions-meta-btn:hover {
  background: transparent;
  color: var(--color-primary, #00B4A9);
}

.hcs-app-shell .page-social .react-choice {
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hcs-app-shell .page-social .react-choice:hover,
.hcs-app-shell .page-social .react-choice.is-on {
  background: var(--color-gray-50) !important;
}

.hcs-app-shell .page-social .post-more-toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px !important;
  padding: 0 !important;
}

.hcs-app-shell .page-social .post-more-menu {
  position: absolute;
  min-width: 220px;
  padding: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-border, #E6EEF0);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: var(--hcs-z-popover, 350);
}

.hcs-app-shell .page-social .post-more-item {
  min-height: 40px !important;
  justify-content: flex-start;
  padding: 0 10px !important;
  background: transparent;
  text-align: left;
}

.hcs-app-shell .page-social .post-more-item:hover {
  background: var(--color-primary-soft);
}

.hcs-app-shell .page-social .post-more-item.is-danger:hover {
  background: #FEF2F2;
}

.hcs-app-shell .page-social .comment-meta-btn,
.hcs-app-shell .page-social .comment-meta button,
.hcs-app-shell .page-social .comment-react-open,
.hcs-app-shell .page-social .comment-delete,
.hcs-app-shell .page-social .comment-replying button {
  min-height: 0 !important;
  height: auto;
  padding: 4px 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hcs-app-shell .page-social .comment-compose .input {
  min-width: 0;
}

.hcs-app-shell .page-social .social-media-open {
  min-height: 0 !important;
  height: auto;
  width: 100%;
  padding: 0 !important;
  background: none;
}

.hcs-app-shell .page-social .comment-attachment-image {
  min-height: 0 !important;
  height: auto;
  width: min(220px, 100%);
  padding: 0 !important;
}

.hcs-app-shell .page-social .hcs-social-media-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-top: 12px;
}

.hcs-app-shell .page-social .hcs-social-media-grid.is-single {
  grid-template-columns: 1fr;
}


/* ——— Workspace dashboard (keep hcs-workspace layout, app control language) ——— */
.hcs-app-shell .hcs-workspace a.hcs-ws-kpi,
.hcs-app-shell .hcs-workspace .hcs-ws-kpi--static,
.hcs-app-shell .hcs-workspace a.hcs-ws-notif-item,
.hcs-app-shell .hcs-workspace a.hcs-ws-proj-name,
.hcs-app-shell .hcs-workspace a.hcs-ws-task-name,
.hcs-app-shell .hcs-workspace button.hcs-ws-proj-name,
.hcs-app-shell .hcs-workspace button.hcs-ws-task-name,
.hcs-app-shell .hcs-workspace button.hcs-ws-doc-name,
.hcs-app-shell .hcs-workspace button.hcs-ws-ev-name,
.hcs-app-shell .hcs-ws-project-modal button.hcs-ws-project__task-name {
  color: inherit !important;
  text-decoration: none !important;
}

.hcs-app-shell .hcs-workspace .hcs-ws-dn {
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--radius-full, 9999px) !important;
  box-shadow: none !important;
  height: 32px !important;
  min-height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  width: 32px !important;
}

.hcs-app-shell .hcs-workspace .hcs-ws-dn.is-today {
  background: var(--color-primary, #007F7C) !important;
  color: var(--color-white, #fff) !important;
}

.hcs-app-shell .hcs-workspace .btn {
  border-radius: var(--button-radius, var(--radius-xl, 16px)) !important;
}

.hcs-app-shell .hcs-workspace .hcs-ws-filter .btn {
  height: 40px;
  min-height: 40px !important;
}

.hcs-app-shell .hcs-workspace .btn-sm {
  height: 36px;
  min-height: 36px !important;
}

.hcs-app-shell .hcs-workspace .hcs-ws-card-hd .hcs-ws-add {
  flex: 0 0 36px;
  height: 36px !important;
  max-width: 36px;
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  width: 36px !important;
}

.hcs-app-shell .hcs-workspace :is(.hcs-ws-doc-row, .hcs-ws-task-row, .hcs-ws-proj-row) :is(.badge, .hcs-status-badge, .hcs-priority-badge, .hcs-progress-badge) {
  font-size: 10px;
  height: 22px;
  max-height: 22px;
  min-height: 22px;
  padding: 0 7px;
}

.hcs-app-shell .hcs-workspace :is(button.hcs-ws-doc-name, button.hcs-ws-proj-name, button.hcs-ws-task-name, button.hcs-ws-ev-name),
.hcs-app-shell .hcs-ws-project-modal button.hcs-ws-project__task-name {
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

.hcs-app-shell .hcs-workspace .hcs-ws-doc-row .icon-btn,
.hcs-app-shell .hcs-workspace .hcs-ws-task-row .icon-btn,
.hcs-app-shell .hcs-workspace .hcs-ws-proj-row .icon-btn,
.hcs-app-shell .hcs-workspace .icon-btn.eye {
  background: var(--color-primary-soft, #E6F3F2) !important;
  border: 0 !important;
  border-radius: var(--radius-full, 9999px) !important;
  color: var(--color-primary, #007F7C) !important;
  height: 26px !important;
  min-height: 26px !important;
  min-width: 26px !important;
  padding: 0 !important;
  width: 26px !important;
}

/* ——— Calendar / event dash (lich.html, su-kien.html) ——— */
.hcs-app-shell .page-cal .cal-nav .btn-sm,
.hcs-app-shell .page-cal .cal-view-btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  height: 36px;
  min-height: 36px !important;
}

.hcs-app-shell .page-cal .cal-view-btn svg {
  flex-shrink: 0;
}

.hcs-app-shell .page-cal .cal-board {
  overflow: hidden;
}

.hcs-app-shell .page-wf .event-kpi,
.hcs-app-shell .page-wf .event-panel {
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-sm);
}

.hcs-app-shell .page-wf .event-kpi {
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.hcs-app-shell .page-wf .event-kpi > div,
.hcs-app-shell .page-wf .event-kpi-value,
.hcs-app-shell .page-wf .event-kpi-label {
  text-align: center;
  width: 100%;
}

.hcs-app-shell .page-wf .event-kpis .card {
  padding: 16px 18px !important;
}

/* ——— Workflow list / kinds / detail (quy-trinh.html) ——— */
.hcs-app-shell .hcs-main-content > .page-wf {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 100%;
  min-width: 0;
  padding-inline: 0;
  width: 100%;
}

.hcs-app-shell .page-wf .page-head h1,
.hcs-app-shell .page-wf .vb-editor-head h1 {
  color: var(--color-primary) !important;
  font-size: 22px !important;
  font-weight: 600;
  line-height: 1.25;
}

.hcs-app-shell .page-wf .vb-editor-head h1,
.hcs-app-shell .hcs-event-detail .page-head h1 {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcs-app-shell .page-wf .page-actions .btn,
.hcs-app-shell .page-wf .docs-toolbar .btn,
.hcs-app-shell .page-wf .list-search .btn,
.hcs-app-shell .page-wf .queue-filter .btn,
.hcs-app-shell .page-wf .vb-chrome .btn,
.hcs-app-shell .page-wf .vb-assign .btn,
.hcs-app-shell .page-wf .wf-step-toolbar .btn,
.hcs-app-shell .page-wf .hcs-catalog-modal__footer .btn {
  border-radius: var(--button-radius, var(--radius-xl, 16px)) !important;
  font-weight: var(--font-weight-medium);
  gap: 8px;
  height: 40px;
  min-height: 40px !important;
  overflow: visible;
  padding: 0 16px !important;
  white-space: nowrap;
}

.hcs-app-shell .page-wf .docs-toolbar .btn::before,
.hcs-app-shell .page-wf .list-search .btn::before,
.hcs-app-shell .page-wf .vb-assign .btn::before,
.hcs-app-shell .page-wf .page-actions .btn::before {
  content: none !important;
  display: none !important;
}

.hcs-app-shell .page-wf .docs-toolbar .btn svg,
.hcs-app-shell .page-wf .list-search .btn svg,
.hcs-app-shell .page-wf .page-actions .btn svg,
.hcs-app-shell .page-wf .vb-chrome .btn svg {
  display: block;
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

.hcs-app-shell .page-wf .docs-table-wrap {
  border-radius: var(--radius-xl, 16px) !important;
  overflow: hidden;
}

.hcs-app-shell .page-wf .vb-card {
  border-radius: var(--radius-xl, 16px) !important;
  overflow: visible;
}

.hcs-app-shell .page-wf .vb-main,
.hcs-app-shell .page-wf .vb-pane,
.hcs-app-shell .page-wf .hcs-catalog-form {
  overflow: visible;
}

.hcs-app-shell .page-wf button.doc-action,
.hcs-app-shell .page-wf a.doc-action {
  background: var(--color-white) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary) 40%, var(--color-white)) !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-primary) !important;
  height: 36px !important;
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  width: 36px !important;
}

.hcs-app-shell .page-wf button.doc-action:hover:not(:disabled),
.hcs-app-shell .page-wf a.doc-action:hover {
  background: var(--color-primary-soft) !important;
}

.hcs-app-shell .page-wf button.doc-action.is-danger {
  border-color: #FECACA !important;
  color: var(--color-danger) !important;
}

.hcs-app-shell .page-wf button.doc-action.is-danger:hover:not(:disabled) {
  background: #FEF2F2 !important;
}

body:has(.hcs-app-shell) .hcs-catalog-modal .hcs-task-docs-toolbar,
.hcs-app-shell .hcs-catalog-modal .hcs-task-docs-toolbar {
  grid-template-columns: auto;
}

body:has(.hcs-app-shell) .hcs-catalog-modal .hcs-task-docs-toolbar .btn,
.hcs-app-shell .hcs-catalog-modal .hcs-task-docs-toolbar .btn {
  justify-self: start;
  width: auto !important;
}


body:has(.hcs-app-shell) .hcs-catalog-modal .docs-toolbar.list-search .btn,
body:has(.hcs-app-shell) .modal .hcs-catalog-modal .docs-toolbar.list-search .btn,
.hcs-app-shell .hcs-catalog-modal .docs-toolbar.list-search .btn,
.hcs-app-shell .modal .hcs-catalog-modal .docs-toolbar.list-search .btn {
  align-items: center;
  border-radius: var(--button-radius, var(--radius-xl, 16px)) !important;
  display: inline-flex !important;
  gap: 8px;
  height: 40px;
  min-height: 40px !important;
  overflow: visible;
  padding: 0 16px !important;
  white-space: nowrap;
}

body:has(.hcs-app-shell) .hcs-catalog-modal .docs-toolbar.list-search .btn::before,
body:has(.hcs-app-shell) .modal .hcs-catalog-modal .docs-toolbar.list-search .btn::before,
.hcs-app-shell .hcs-catalog-modal .docs-toolbar.list-search .btn::before,
.hcs-app-shell .modal .hcs-catalog-modal .docs-toolbar.list-search .btn::before {
  content: none !important;
  display: none !important;
}

body:has(.hcs-app-shell) .hcs-catalog-modal .docs-toolbar.list-search .btn svg,
body:has(.hcs-app-shell) .hcs-catalog-modal button.doc-action svg,
body:has(.hcs-app-shell) .modal .hcs-catalog-modal .btn svg,
.hcs-app-shell .hcs-catalog-modal .docs-toolbar.list-search .btn svg,
.hcs-app-shell .hcs-catalog-modal button.doc-action svg,
.hcs-app-shell .modal .hcs-catalog-modal .btn svg {
  display: block !important;
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}

body:has(.hcs-app-shell) .hcs-catalog-modal button.doc-action,
body:has(.hcs-app-shell) .hcs-catalog-modal a.doc-action,
.hcs-app-shell .hcs-catalog-modal button.doc-action,
.hcs-app-shell .hcs-catalog-modal a.doc-action {
  background: var(--color-white) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary) 40%, var(--color-white)) !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-primary) !important;
  height: 36px !important;
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  width: 36px !important;
}

body:has(.hcs-app-shell) .hcs-catalog-modal button.doc-action.is-danger,
.hcs-app-shell .hcs-catalog-modal button.doc-action.is-danger {
  border-color: #FECACA !important;
  color: var(--color-danger) !important;
}

body:has(.hcs-app-shell) .hcs-catalog-modal button.doc-action.is-danger:hover:not(:disabled),
.hcs-app-shell .hcs-catalog-modal button.doc-action.is-danger:hover:not(:disabled) {
  background: #FEF2F2 !important;
}

.hcs-app-shell .page-wf .docs-search,
.hcs-app-shell .page-wf .list-search .docs-search {
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  height: 40px;
  min-height: 40px !important;
}

.hcs-app-shell .hcs-journal-filters {
  align-items: center;
  flex-wrap: nowrap;
}

.hcs-app-shell .hcs-journal-filters .docs-search {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.hcs-app-shell .hcs-journal-filters select.select {
  flex: 0 0 220px;
  max-width: 220px;
  min-width: 0;
  width: 220px;
}

.hcs-app-shell .hcs-journal-filters .btn {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .hcs-app-shell .hcs-journal-filters {
    flex-wrap: wrap;
  }

  .hcs-app-shell .hcs-journal-filters .docs-search,
  .hcs-app-shell .hcs-journal-filters select.select {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
}

.hcs-app-shell .page-wf .doc-actions {
  flex-wrap: nowrap !important;
}

.hcs-app-shell .page-staff-survey .staff-respondents th,
.hcs-app-shell .page-staff-survey .staff-respondents td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hcs-app-shell .page-wf .docs-table th,
.hcs-app-shell .page-wf .docs-table td {
  white-space: nowrap;
}

.hcs-app-shell .page-wf .docs-table td:has(.doc-title),
.hcs-app-shell .page-wf .docs-table td:has(.pj-name),
.hcs-app-shell .page-wf .docs-table td:has(.wf-name),
.hcs-app-shell .task-tree td:has(.pj-name) {
  max-width: 32rem;
  min-width: 12rem;
  overflow: hidden;
}

.hcs-app-shell .vb-chrome-id,
.hcs-app-shell .pj-detail__chrome .vb-chrome-id {
  flex: 1 1 auto;
  min-width: 0;
}

.hcs-app-shell .vb-editor-head {
  min-width: 0;
}

.hcs-app-shell .page-wf .docs-table .col-actions,
.hcs-app-shell .page-wf .docs-table td:has(.doc-actions) {
  width: 6.5rem;
}

.hcs-app-shell .page-wf .docs-table .col-actions:has(.doc-action-label),
.hcs-app-shell .page-wf .docs-table td:has(.doc-action-label) {
  width: auto;
}

.hcs-app-shell .page-wf button.doc-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hcs-app-shell .page-sign .docs-table .col-actions,
.hcs-app-shell .page-sign .docs-table td:has(.doc-actions) {
  min-width: 12.5rem;
  overflow: visible;
  width: auto;
}

.hcs-app-shell .page-sign .doc-actions,
.hcs-app-shell .page-sign button.doc-action.has-count {
  overflow: visible;
  position: relative;
}

.hcs-app-shell .page-sign .doc-action-count {
  background: var(--color-danger);
  border-radius: 999px;
  color: var(--color-white, #fff);
  font-size: 0.65rem;
  font-weight: 700;
  height: 1.05rem;
  line-height: 1.05rem;
  min-width: 1.05rem;
  padding: 0 0.2rem;
  pointer-events: none;
  position: absolute;
  right: -0.2rem;
  text-align: center;
  top: -0.2rem;
  z-index: 1;
}

.hcs-app-shell .page-sign .doc-action-count.is-done {
  align-items: center;
  background: var(--color-primary, #00b4a9);
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 1.05rem;
}

.hcs-app-shell .page-sign button.doc-action .doc-action-count.is-done svg {
  height: 0.7rem;
  width: 0.7rem;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-tasks__document,
.hcs-app-shell .sign-related-tasks .sign-related-tasks__document {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-tasks__empty,
.hcs-app-shell .sign-related-tasks .sign-related-tasks__empty {
  color: var(--color-text-muted, #6b7280);
  margin: 1.5rem 0;
  text-align: center;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-tasks__list,
.hcs-app-shell .sign-related-tasks .sign-related-tasks__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-task,
.hcs-app-shell .sign-related-tasks .sign-related-task {
  align-items: center;
  appearance: none;
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border, #eef0f4);
  border-radius: var(--radius-md, 8px);
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  text-align: left;
  width: 100%;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-task:hover,
.hcs-app-shell .sign-related-tasks .sign-related-task:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-white));
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-task__title,
.hcs-app-shell .sign-related-tasks .sign-related-task__title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-task.is-done .sign-related-task__title,
.hcs-app-shell .sign-related-tasks .sign-related-task.is-done .sign-related-task__title {
  text-decoration: line-through;
}

body:has(.hcs-app-shell) .sign-related-tasks .sign-related-task__due,
.hcs-app-shell .sign-related-tasks .sign-related-task__due {
  color: var(--color-text-muted, #6b7280);
  white-space: nowrap;
}

.hcs-app-shell .page-wf .hcs-status-icon {
  display: inline-flex;
  font-size: 14px;
  justify-content: center;
  min-width: 20px;
  width: 20px;
}

.hcs-app-shell .page-wf .vb-tab {
  background: transparent;
  border: 0 !important;
  border-radius: var(--radius-full, 9999px) !important;
  box-shadow: none !important;
  height: 36px;
  min-height: 36px !important;
  padding: 0 14px !important;
}

.hcs-app-shell .page-wf .vb-tab.is-active,
.hcs-app-shell .page-wf .vb-tab.is-active:active,
.hcs-app-shell .page-wf .vb-tab:active {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
}

.hcs-app-shell .page-wf .icon-btn {
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--radius-full, 9999px) !important;
  height: 40px;
  min-height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  width: 40px;
}

.hcs-app-shell .page-wf .vb-drop {
  cursor: pointer;
}

.hcs-app-shell .page-wf .filter-menu button {
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 44px !important;
  text-align: left;
}

.hcs-app-shell .page-cv .filter-menu--tasks .filter-chip {
  background: var(--color-white) !important;
  border: 1px solid var(--color-border, #e2e8f0) !important;
  border-radius: 999px !important;
  min-height: 32px !important;
  text-align: center;
  width: auto;
}

.hcs-app-shell .page-cv .filter-menu--tasks .filter-chip.is-active {
  background: var(--color-primary-soft) !important;
  border-color: transparent !important;
  color: var(--color-primary) !important;
}

.hcs-app-shell .page-cv .filter-menu--tasks .filter-menu-actions .btn {
  height: 36px;
  min-height: 36px !important;
  text-align: center;
  width: auto;
}

.hcs-app-shell .page-cv .filter-menu--tasks .filter-menu-actions .btn-outline {
  background: var(--color-white) !important;
  border: 1px solid var(--color-border, #e2e8f0) !important;
  color: var(--color-gray-700, #334155) !important;
}

.hcs-app-shell .page-cv .filter-menu--tasks .filter-menu-actions .btn-primary {
  background: var(--color-primary) !important;
  border: 1px solid var(--color-primary) !important;
  color: #fff !important;
}

.hcs-app-shell .page-pj .docs-table td:has(.pj-name),
.hcs-app-shell .page-cv .docs-table td:has(.pj-name),
.hcs-app-shell .task-tree td:has(.pj-name) {
  white-space: normal;
}

.hcs-app-shell .page-pj .docs-table .col-code,
.hcs-app-shell .page-pj .docs-table .pj-code-cell {
  min-width: 9.5rem;
  max-width: 16rem;
  white-space: nowrap;
}

.hcs-app-shell .page-pj .docs-table .col-project,
.hcs-app-shell .page-pj .docs-table td:has(.pj-name) {
  max-width: none;
  min-width: 22rem;
  width: 42%;
}

.hcs-app-shell .page-pj .docs-table .col-dates,
.hcs-app-shell .page-pj .docs-table .pj-dates {
  min-width: 10.5rem;
  white-space: nowrap;
}

.hcs-app-shell .page-pj .docs-table .col-count {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.hcs-app-shell .page-pj .docs-table .col-status {
  width: auto;
  white-space: nowrap;
}

.hcs-app-shell .page-pj .pj-name {
  max-width: none;
}

.hcs-app-shell .page-pj .pj-name a {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.hcs-app-shell .page-pj .pj-code {
  max-width: 16rem;
}

.hcs-app-shell .page-pj .docs-table td:has(.doc-actions) {
  min-width: 11rem;
  width: auto;
}

.hcs-app-shell .page-cv .docs-table td:has(.doc-actions),
.hcs-app-shell .task-tree td:has(.doc-actions) {
  min-width: 5.5rem;
  width: auto;
}

.hcs-app-shell .hcs-select2,
.hcs-app-shell .list-search-select {
  position: relative;
  width: 100%;
}

.hcs-app-shell .hcs-select2 .select2-container,
.hcs-app-shell .list-search-select .select2-container {
  width: 100% !important;
}

body:has(.hcs-app-shell) .hcs-select2 .select2-selection--single,
body:has(.hcs-app-shell) .list-search-select .select2-selection--single,
body:has(.hcs-app-shell) select.hcs-catalog-select2 + .select2-container .select2-selection--single,
.hcs-app-shell .hcs-select2 .select2-selection--single,
.hcs-app-shell .list-search-select .select2-selection--single,
.hcs-app-shell select.hcs-catalog-select2 + .select2-container .select2-selection--single,
.hcs-app-shell .hcs-select2 .select2-container--open.select2-container--below .select2-selection--single,
.hcs-app-shell .hcs-select2 .select2-container--open.select2-container--above .select2-selection--single,
.hcs-app-shell .list-search-select .select2-container--open.select2-container--below .select2-selection--single,
.hcs-app-shell .list-search-select .select2-container--open.select2-container--above .select2-selection--single,
.hcs-app-shell select.hcs-catalog-select2 + .select2-container--open.select2-container--below .select2-selection--single,
.hcs-app-shell select.hcs-catalog-select2 + .select2-container--open.select2-container--above .select2-selection--single {
  background: var(--color-white) !important;
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  box-shadow: var(--shadow-sm) !important;
  height: 40px !important;
  max-height: 40px !important;
  min-height: 40px !important;
}

body:has(.hcs-app-shell) .hcs-select2 .select2-container--open .select2-selection--single,
body:has(.hcs-app-shell) .hcs-select2 .select2-container--focus .select2-selection--single,
body:has(.hcs-app-shell) .list-search-select .select2-container--open .select2-selection--single,
body:has(.hcs-app-shell) .list-search-select .select2-container--focus .select2-selection--single,
body:has(.hcs-app-shell) select.hcs-catalog-select2 + .select2-container--open .select2-selection--single,
body:has(.hcs-app-shell) select.hcs-catalog-select2 + .select2-container--focus .select2-selection--single {
  border-color: var(--input-focus-border, var(--hcs-input-border-focus, var(--color-primary, #007f7c))) !important;
  box-shadow: var(--shadow-sm) !important;
}

body:has(.hcs-app-shell) .hcs-select2 .select2-container--open.select2-container--below .select2-selection--single,
body:has(.hcs-app-shell) .hcs-select2 .select2-container--open.select2-container--above .select2-selection--single,
body:has(.hcs-app-shell) .list-search-select .select2-container--open.select2-container--below .select2-selection--single,
body:has(.hcs-app-shell) .list-search-select .select2-container--open.select2-container--above .select2-selection--single,
body:has(.hcs-app-shell) select.hcs-catalog-select2 + .select2-container--open.select2-container--below .select2-selection--single,
body:has(.hcs-app-shell) select.hcs-catalog-select2 + .select2-container--open.select2-container--above .select2-selection--single {
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
}

.hcs-app-shell .hcs-select2 .select2-selection--single .select2-selection__rendered,
.hcs-app-shell .list-search-select .select2-selection--single .select2-selection__rendered,
.hcs-app-shell select.hcs-catalog-select2 + .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 40px !important;
  padding: 0 3.5rem 0 16px !important;
}

.hcs-app-shell .hcs-select2 .select2-selection--single .select2-selection__clear,
.hcs-app-shell .list-search-select .select2-selection--single .select2-selection__clear,
.hcs-app-shell select.hcs-catalog-select2 + .select2-container .select2-selection--single .select2-selection__clear {
  align-items: center;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  float: none !important;
  height: 24px !important;
  justify-content: center;
  line-height: 1 !important;
  margin: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  position: absolute;
  right: 2.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px !important;
}

.hcs-app-shell .hcs-select2 .select2-selection--single .select2-selection__arrow,
.hcs-app-shell .list-search-select .select2-selection--single .select2-selection__arrow,
.hcs-app-shell select.hcs-catalog-select2 + .select2-container .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  padding-right: 14px;
}

.hcs-app-shell .hcs-select2 .select2-selection--multiple,
.hcs-app-shell .list-search-select .select2-selection--multiple {
  background: var(--color-white) !important;
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  box-shadow: none !important;
  min-height: 40px !important;
}

body:has(.hcs-app-shell) .select2-dropdown,
body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop {
  background: var(--color-white, #fff) !important;
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04)) !important;
  margin-top: 8px;
  overflow: hidden;
  padding: 8px;
  z-index: 1080;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop.select2-dropdown--below,
body:has(.hcs-app-shell) .select2-dropdown--below {
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop.select2-dropdown--above,
body:has(.hcs-app-shell) .select2-dropdown--above {
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  margin-bottom: 8px;
  margin-top: 0;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-search--dropdown {
  padding: 0 0 8px;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-search__field {
  background: var(--color-white) !important;
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  box-shadow: var(--shadow-sm) !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-search__field:focus,
body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-search__field:focus-visible {
  border-color: var(--input-focus-border, var(--hcs-input-border-focus, var(--color-primary, #007f7c))) !important;
  box-shadow: var(--input-focus-ring, var(--shadow-focus)) !important;
  outline: 0 !important;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option {
  align-items: center;
  border-radius: 8px !important;
  color: var(--color-gray-700) !important;
  display: flex;
  min-height: 44px;
  padding: 0 12px !important;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop:has(.hcs-user-option) .select2-results__options {
  max-height: 22rem;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option:has(.hcs-user-option) {
  align-items: center !important;
  display: flex !important;
  min-height: 0;
  padding: 8px 4px !important;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .hcs-user-option {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .hcs-user-option__avatar {
  align-self: center;
  flex: 0 0 36px;
  font-size: 12px;
  font-weight: 600;
  height: 36px;
  letter-spacing: 0.01em;
  line-height: 1;
  width: 36px;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .hcs-user-option__copy {
  flex: 1 1 auto;
  gap: 1px;
  justify-content: center;
  min-width: 0;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .hcs-user-option__name {
  color: var(--color-gray-900, #0f172a);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .hcs-user-option__phone,
body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .hcs-user-option__dept {
  color: var(--color-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option--highlighted .hcs-user-option__name,
body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option--selected .hcs-user-option__name {
  color: var(--color-primary, #007f7c);
}

body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option--highlighted.select2-results__option--selectable,
body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option--selected,
body:has(.hcs-app-shell) .select2-dropdown.hcs-select2-pop .select2-results__option--selected.select2-results__option--highlighted {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
}

.hcs-app-shell .page-cv .kb-col.is-drop {
  box-shadow: var(--shadow-focus);
  border-color: var(--kb-accent, var(--color-primary));
}

.hcs-app-shell .hcs-more-pop {
  position: relative;
  display: inline-flex;
}

.hcs-app-shell .hcs-more-pop.is-open {
  z-index: var(--z-dropdown, 60);
}

.hcs-app-shell .hcs-more-pop .msg-more {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  opacity: 1;
}

.hcs-app-shell .page-cv .kb-foot .msg-more {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--color-gray-500) !important;
  height: 32px !important;
  min-height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  width: 32px !important;
}

.hcs-app-shell .page-cv .kb-board {
  overflow-x: auto;
}

.hcs-app-shell .pj-detail__card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hcs-app-shell .pj-detail__chrome,
.hcs-app-shell .pj-detail__info.pj-detail__card {
  isolation: auto;
  overflow: visible !important;
}

.hcs-app-shell .pj-detail__info.pj-detail__card {
  position: relative;
  z-index: 4;
}

.hcs-app-shell .pj-detail__chrome,
.hcs-app-shell .pj-detail__info .pj-detail__card-head {
  border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
}

.hcs-app-shell .pj-detail__chrome {
  border-radius: var(--radius-xl, 16px) !important;
}

.hcs-app-shell .pj-detail__card-body--table .docs-table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
}

.hcs-app-shell .pj-detail__split {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
  position: relative;
  z-index: 1;
}

.hcs-app-shell .pj-detail__members.pj-detail__card {
  isolation: auto;
}

.hcs-app-shell .pj-detail__members:has(.select2-container--open) {
  overflow: visible !important;
  z-index: 5;
}

.hcs-app-shell .pj-detail__members:has(.select2-container--open) .pj-detail__card-body {
  overflow: visible;
}

@media (min-width: 1101px) {
  .hcs-app-shell .pj-detail__split {
    grid-template-columns: minmax(0, 65fr) minmax(0, 35fr) !important;
  }
}

.hcs-app-shell .pj-detail .hcs-member-list__item,
.hcs-app-shell .cv-detail .hcs-member-list__item {
  background: var(--color-white);
  border-color: var(--color-gray-100);
  box-shadow: var(--shadow-xs);
}

.hcs-app-shell .pj-detail .hcs-member-list__remove,
.hcs-app-shell .pj-detail .hcs-member-list__item .btn,
.hcs-app-shell .cv-detail .hcs-member-list__remove,
.hcs-app-shell .cv-detail .hcs-member-list__item .btn {
  height: auto;
  max-height: none;
  min-height: 0;
}

.hcs-app-shell .page-cv .kb-foot .dropdown-toggle::after {
  display: none;
}

.hcs-app-shell .task-tree button.doc-action,
.hcs-app-shell .task-tree a.doc-action {
  background: var(--color-white) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary) 40%, var(--color-white)) !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-primary) !important;
  height: 36px !important;
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  width: 36px !important;
}

.hcs-app-shell .task-tree button.doc-action:hover:not(:disabled) {
  background: var(--color-primary-soft) !important;
}

.hcs-app-shell .task-tree .tree-toggle {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  height: 28px !important;
  min-height: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  width: 28px !important;
}

.hcs-app-shell .task-tree .col-progress,
.hcs-app-shell .task-tree td.col-progress {
  white-space: nowrap;
  width: 9.5rem;
}

.hcs-app-shell .task-tree .task-progress-cell {
  align-items: center;
  display: inline-flex !important;
  gap: 8px;
  min-width: 7.75rem;
}

.hcs-app-shell .task-tree .task-progress-track {
  background: var(--color-gray-100, #e2e8f0);
  border-radius: 999px;
  display: block;
  flex: 0 0 72px;
  height: 8px;
  overflow: hidden;
  width: 72px;
}

.hcs-app-shell .task-tree .task-progress-fill {
  background: var(--color-primary, #0f766e);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.hcs-app-shell .task-tree .task-progress-cell.is-done .task-progress-fill {
  background: var(--color-success, #16a34a);
}

.hcs-app-shell .task-tree .task-progress-cell.is-empty .task-progress-fill {
  background: #cbd5e1;
}

.hcs-app-shell .task-tree .task-progress-value {
  color: var(--color-gray-800, #1e293b);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  min-width: 2.6rem;
  text-align: right;
}

.hcs-app-shell .task-tree .task-progress-cell.is-done .task-progress-value {
  color: var(--color-success, #15803d);
}

.hcs-app-shell .task-tree .task-progress-cell.is-empty .task-progress-value {
  color: #94a3b8;
  font-weight: 600;
}

.hcs-app-shell .task-tree .task-tree-item {
  --task-indent: 1.35rem;
  padding-left: calc(var(--task-depth, 0) * var(--task-indent));
}

.hcs-app-shell .page-wf .vb-preview {
  flex: 1;
  min-height: min(45rem, 70vh);
}

.hcs-app-shell .wf-wizard .vb-preview .hcs-pdf-frame,
.hcs-app-shell .wf-wizard .vb-preview .hcs-pdf-frame--fill,
.hcs-app-shell .wf-wizard .vb-preview .hcs-pdf-frame .hcs-pdf-frame__viewport,
.hcs-app-shell .wf-wizard .vb-preview .hcs-pdf-frame .hcs-pdf-frame__embed {
  flex: 1 1 auto;
  height: 100%;
  min-height: min(45rem, 70vh);
}

.hcs-app-shell .hcs-pdf-toolbar .hcs-pdf-tool {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  height: 40px !important;
  min-height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  width: 40px !important;
}

.hcs-app-shell .page-wf .vb-preview-file-card {
  min-height: 420px;
}

.hcs-app-shell .page-wf .vb-preview-file-card .hcs-file-preview-card__icon {
  font-size: 40px;
  margin-bottom: 4px;
}

/* Document list advanced filter panel (van-ban aligned) */
.hcs-app-shell .page-vb .docs-layout {
  align-items: start;
  display: grid !important;
  gap: var(--space-4, 16px);
  grid-template-columns: 220px minmax(0, 1fr);
  width: 100%;
}

.hcs-app-shell .page-vb .docs-side {
  background: var(--color-white, #fff);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px;
}

.hcs-app-shell .page-vb .docs-nav-row {
  align-items: center;
  display: flex;
  min-width: 0;
}

.hcs-app-shell .page-vb .docs-nav-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--color-gray-500, #64748b);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.hcs-app-shell .page-vb .docs-nav-toggle svg {
  transition: transform .15s ease;
}

.hcs-app-shell .page-vb .docs-nav-toggle.is-open svg {
  transform: rotate(90deg);
}

.hcs-app-shell .page-vb .docs-nav-toggle.is-leaf {
  visibility: hidden;
}

.hcs-app-shell .page-vb .docs-nav-row .docs-cat {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 4px !important;
  width: auto !important;
}

.hcs-app-shell .page-vb .docs-cat {
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--color-gray-800, #1e293b) !important;
  height: auto !important;
  min-height: 44px !important;
  min-width: 0 !important;
  padding: 0 14px !important;
  width: 100% !important;
}

.hcs-app-shell .page-vb .docs-cat:hover {
  background: var(--color-gray-50, #F8FAFC) !important;
}

.hcs-app-shell .page-vb .docs-cat.is-active,
.hcs-app-shell .page-vb .docs-cat.is-active:active,
.hcs-app-shell .page-vb .docs-cat:active {
  background: var(--color-primary-soft, #E0F7F5) !important;
  color: var(--color-primary, #00B4A9) !important;
  font-weight: var(--font-weight-semibold, 600);
}

.hcs-app-shell .page-vb .docs-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
  min-width: 0;
}

.hcs-app-shell :is(.page-vb, .page-sign) .page-head,
.hcs-app-shell :is(.page-vb, .page-sign) .page-actions {
  overflow: visible;
}

.hcs-app-shell :is(.page-vb, .page-sign) .page-actions .filter-pop {
  overflow: visible;
  position: relative;
  z-index: var(--z-dropdown, 60);
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop {
  background: var(--color-white, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  padding: 12px 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(36rem, calc(100vw - 32px));
  z-index: var(--z-dropdown, 60);
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop.is-open {
  display: flex;
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop[hidden] {
  display: none !important;
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .vb-field-row {
  align-items: end;
  gap: 10px 12px;
  width: 100%;
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field {
  border-top: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field .input,
.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field .select,
.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field .form-control,
.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field .hcs-datepicker,
.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field .b-is-datepicker,
.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .filter-menu-field .hcs-select2 {
  overflow: visible;
  position: relative;
  width: 100%;
}

.hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hcs-app-shell .page-vb .docs-empty {
  min-height: 260px;
}

.hcs-app-shell :is(.page-vb, .page-sign) .doc-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 32rem;
  min-width: 0;
}

.hcs-app-shell button.doc-title-open {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--color-primary, #00B4A9);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 0;
  padding: 0;
  text-align: left;
}

.hcs-app-shell button.doc-title-open:hover {
  color: var(--color-primary, #00B4A9);
  text-decoration: underline;
}

.hcs-app-shell :is(.page-vb, .page-sign) .doc-title a,
.hcs-app-shell :is(.page-vb, .page-sign) .doc-title button.doc-title-open,
.hcs-app-shell :is(.page-vb, .page-sign) .doc-title strong {
  color: inherit;
  display: block;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcs-app-shell :is(.page-vb, .page-sign) .doc-title button.doc-title-open {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  width: 100%;
}

.hcs-app-shell .docs-table .wf-name,
.hcs-app-shell .docs-table .pj-name a,
.hcs-app-shell .docs-table .pj-name strong,
.hcs-app-shell .task-tree .wf-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcs-app-shell :is(.page-vb, .page-sign) .doc-title a:hover,
.hcs-app-shell :is(.page-vb, .page-sign) .doc-title button.doc-title-open:hover {
  color: var(--color-primary, #00B4A9);
  text-decoration: underline;
}

.hcs-app-shell .page-vb .doc-title span,
.hcs-app-shell .page-vb .doc-code {
  color: var(--color-muted, #64748B);
  font-size: var(--font-size-xs, 0.75rem);
}

.hcs-app-shell .page-vb .vb-file-list {
  margin-top: 8px;
}

.hcs-app-shell .page-vb .vb-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.hcs-app-shell .page-vb .vb-assignees li,
.hcs-app-shell .page-vb .vb-chip {
  background: var(--color-primary-soft, #E6F3F2);
  border: 0;
  border-radius: var(--radius-full);
  color: var(--color-primary, #007F7C);
  display: inline-flex;
  font-size: var(--font-size-xs, 0.75rem);
  font-weight: var(--font-weight-medium);
  margin: 0;
  min-height: 32px;
  padding: 0 12px;
}

.hcs-app-shell .page-vb .vb-assign .hcs-select2,
.hcs-app-shell .page-vb .vb-assign .select2-container {
  overflow: visible;
  width: 100% !important;
}

.hcs-app-shell .page-vb .vb-assign .hcs-select2 .select2-selection--single,
.hcs-app-shell .page-vb .vb-assign .select2-container--default .select2-selection--single,
.hcs-app-shell .page-vb .vb-assign .select2-container .select2-selection,
.hcs-app-shell .page-vb .vb-assign .form-control,
.hcs-app-shell .page-vb .vb-assign .form-select,
.hcs-app-shell .page-vb .vb-assign .select,
.hcs-app-shell .page-vb .vb-assign input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  height: 40px !important;
  min-height: 40px !important;
}

.hcs-app-shell .page-vb .vb-assign .btn {
  border-radius: var(--button-radius, var(--radius-xl, 16px)) !important;
  height: 40px;
  min-height: 40px !important;
}

@media (max-width: 900px) {
  .hcs-app-shell .page-vb .docs-layout {
    grid-template-columns: 1fr !important;
  }

  .hcs-app-shell :is(.page-vb, .page-sign) .docs-filter-pop .vb-field-row {
    grid-template-columns: 1fr;
  }
}

.hcs-app-shell .page-sign .queue-filter {
  background: var(--color-white, #fff);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
}

.hcs-app-shell .page-sign .queue-filter .hcs-datepicker,
.hcs-app-shell .page-sign .queue-filter .b-is-datepicker,
.hcs-app-shell .page-sign .queue-filter .hcs-select2 {
  width: 100%;
}

.hcs-app-shell .page-sign .queue-filter .select {
  padding-right: 36px !important;
}

.hcs-app-shell .page-sign .queue-tab,
.hcs-app-shell .page-wf .queue-tab {
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  height: 36px !important;
  min-height: 36px !important;
  min-width: 0 !important;
  padding: 0 14px !important;
  border-radius: var(--radius-full, 9999px) !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell .page-sign .queue-tab:hover,
.hcs-app-shell .page-wf .queue-tab:hover,
.hcs-app-shell .page-sign .queue-tab:active:not(.is-active),
.hcs-app-shell .page-wf .queue-tab:active:not(.is-active) {
  background: var(--color-primary-soft, #E0F7F5) !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell .page-sign .queue-tab.is-active,
.hcs-app-shell .page-wf .queue-tab.is-active,
.hcs-app-shell .page-sign .queue-tab.is-active:active,
.hcs-app-shell .page-wf .queue-tab.is-active:active {
  background: var(--color-primary, #00B4A9) !important;
  color: var(--color-white, #fff) !important;
}

.hcs-app-shell .page-sign .queue-tab.is-active .count,
.hcs-app-shell .page-wf .queue-tab.is-active .count {
  background: rgba(255, 255, 255, 0.28);
  color: var(--color-white, #fff);
}

.hcs-app-shell .page-wf .vb-preview .hcs-pdf-frame,
.hcs-app-shell .page-wf .vb-preview .hcs-pdf-frame--fill,
.hcs-app-shell .page-wf .vb-preview .hcs-pdf-frame .hcs-pdf-frame__viewport,
.hcs-app-shell .page-wf .vb-preview .hcs-pdf-frame .hcs-pdf-frame__embed,
.hcs-app-shell .page-wf .vb-preview .hcs-pdf-frame .b-pdf-viewer,
.hcs-app-shell .page-wf .vb-preview .hcs-pdf-frame .pdf-viewer-container {
  flex: 1;
  height: 100%;
  min-height: 420px;
}

.hcs-app-shell .page-wf .hcs-event-detail textarea.input {
  min-height: 4.5rem !important;
}

.hcs-app-shell .modal-dialog.hcs-catalog-modal--pdf {
  display: flex;
  height: min(92dvh, calc(100dvh - 1.5rem));
  max-width: min(96vw, 88rem);
  width: min(96vw, 88rem);
}

.hcs-app-shell .modal-dialog.hcs-catalog-modal--pdf .modal-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  max-height: min(92dvh, calc(100dvh - 1.5rem));
  min-height: min(88dvh, 40rem);
  overflow: hidden !important;
}

.hcs-app-shell .hcs-catalog-modal__body--pdf {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-height: none !important;
  min-height: 0;
  overflow: hidden;
  padding: 0 !important;
}

.hcs-app-shell .hcs-catalog-modal__body--pdf .hcs-loading {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-height: 12rem;
}

.hcs-app-shell .modal-dialog.hcs-catalog-modal--pdf .hcs-catalog-modal__header,
.hcs-app-shell .modal-dialog.hcs-catalog-modal--pdf .modal-header {
  flex-wrap: nowrap;
  overflow: hidden;
}

.hcs-app-shell .modal-dialog.hcs-catalog-modal--pdf .hcs-catalog-modal__title,
.hcs-app-shell .modal-dialog.hcs-catalog-modal--pdf .modal-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.hcs-app-shell .hcs-inbox-preview-tabs.process-side-tabs {
  flex: 0 0 auto;
  gap: 20px;
  margin: 0;
  padding: 12px 20px 0;
}

.hcs-app-shell .hcs-inbox-preview-tabs .process-side-tab svg {
  flex-shrink: 0;
}

.hcs-app-shell .hcs-inbox-preview-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full, 999px);
  background: var(--color-primary-soft, #e6f7f6);
  color: var(--color-primary, #00B4A9);
  font-size: 11px;
  font-weight: var(--font-weight-semibold, 600);
  line-height: 18px;
}

.hcs-app-shell .hcs-inbox-preview-pane {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.hcs-app-shell .hcs-inbox-preview-pane[hidden] {
  display: none !important;
}

.hcs-app-shell .hcs-inbox-preview-pane--history {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 20px;
}

.hcs-app-shell .hcs-catalog-modal__body--pdf.is-inbox .hcs-pdf-frame,
.hcs-app-shell .hcs-catalog-modal__body--pdf.is-inbox .hcs-pdf-frame--fill {
  min-height: 0;
}

.hcs-app-shell .hcs-catalog-modal__body--pdf .hcs-pdf-frame,
.hcs-app-shell .hcs-catalog-modal__body--pdf .hcs-pdf-frame--fill {
  flex: 1 1 auto;
  height: 100%;
  min-height: min(70dvh, 36rem);
}

.hcs-app-shell .hcs-catalog-modal__body--pdf .hcs-pdf-frame__viewport,
.hcs-app-shell .hcs-catalog-modal__body--pdf .hcs-pdf-frame__embed {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.hcs-app-shell .hcs-catalog-modal__footer .btn {
  border-radius: var(--button-radius, var(--radius-xl, 16px)) !important;
  height: 40px;
  min-height: 40px !important;
  padding: 0 16px !important;
}

body:has(.hcs-app-shell) .modal .modal-footer .btn.hcs-decision-secondary,
body:has(.hcs-app-shell) .signing-action-modal .btn.hcs-decision-secondary {
  background: var(--color-white, #fff) !important;
  border: 1px solid var(--color-border, #e5e7eb) !important;
  color: var(--color-gray-700, #334155) !important;
}

body:has(.hcs-app-shell) .modal .modal-footer .btn.hcs-decision-secondary:hover:not(:disabled),
body:has(.hcs-app-shell) .signing-action-modal .btn.hcs-decision-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-primary, #00B4A9) 8%, #fff) !important;
  border-color: var(--color-primary, #00B4A9) !important;
  color: var(--color-primary, #007F7C) !important;
}

.hcs-app-shell .process-side-tab,
body:has(.hcs-app-shell) .process-side-tab {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--color-gray-500, #64748b) !important;
  height: auto !important;
  min-height: 40px !important;
  min-width: 0 !important;
  padding: 0 2px 10px !important;
  width: auto !important;
}

.hcs-app-shell .process-side-tab:hover,
body:has(.hcs-app-shell) .process-side-tab:hover,
.hcs-app-shell .process-side-tab:active,
body:has(.hcs-app-shell) .process-side-tab:active {
  background: transparent !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell .process-side-tab.is-active,
body:has(.hcs-app-shell) .process-side-tab.is-active,
.hcs-app-shell .process-side-tab.is-active:active,
body:has(.hcs-app-shell) .process-side-tab.is-active:active {
  background: transparent !important;
  border-bottom-color: var(--color-primary, #00B4A9) !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell .page-social .hcs-social-media-grid img,
.hcs-app-shell .page-social .hcs-social-media-grid video {
  border-radius: 12px;
  display: block;
  height: 180px;
  object-fit: cover;
  width: 100%;
}

/* Canonical control language (loaded last): buttons/inputs/textareas share
   16px (--radius-xl); table .doc-action stays 8px; pager is compact text + select. */
body:has(.hcs-app-shell) :is(
  input.form-control:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
  select.form-select,
  select.form-control,
  .hcs-catalog-form .form-select,
  .hcs-catalog-form .form-control:not(textarea):not([type="file"]),
  .hcs-catalog-form .b-is-datepicker .form-control,
  .hcs-datepicker .form-control,
  .input:not(textarea),
  select.select
):not(.pager select) {
  height: var(--input-height, 40px) !important;
  min-height: var(--input-height, 40px) !important;
  max-height: none !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  padding-inline: 14px;
}

body:has(.hcs-app-shell) .vb-drop input[type="file"] {
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
}

body:has(.hcs-app-shell) :is(textarea.form-control, textarea.input) {
  height: auto !important;
  min-height: 7rem !important;
  max-height: none !important;
  border-radius: var(--input-radius-multiline, var(--radius-xl, 16px)) !important;
  padding: 12px 14px !important;
}

.hcs-app-shell :is(input, textarea)::placeholder,
.hcs-app-shell :is(.input, .form-control, .form-select)::placeholder,
.hcs-app-shell .select2-selection__placeholder {
  font-size: 0.8rem;
  line-height: 1.25;
  opacity: 1;
}

body:has(.hcs-app-shell) .select2-container--default .select2-selection--single,
body:has(.hcs-app-shell) .select2-container .select2-selection--single,
.hcs-app-shell .select2-container--default .select2-selection--single,
.hcs-app-shell .select2-container .select2-selection {
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
}

body:has(.hcs-app-shell) .page-chat .chat-input-wrap textarea,
body:has(.hcs-app-shell) .page-chat .chat-input-wrap input,
body:has(.hcs-app-shell) .page-social .comment-compose textarea {
  height: auto !important;
  max-height: 120px !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
}

body:has(.hcs-app-shell) .page-chat .chat-input-wrap textarea {
  height: 44px !important;
}

body:has(.hcs-app-shell) .modal-content {
  border-radius: var(--card-radius, var(--radius-xl, 16px)) !important;
}

body:has(.hcs-app-shell) :is(.dropdown-menu, .filter-menu) {
  border-radius: var(--radius-lg, 12px) !important;
}

body:has(.hcs-app-shell) .select2-dropdown {
  border-color: var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
}

.hcs-app-shell .b-numeric {
  border-radius: var(--input-radius, var(--radius-xl, 16px));
  overflow: hidden;
}

.hcs-app-shell .pager {
  justify-content: flex-end;
}

.hcs-app-shell .pager button {
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-gray-500) !important;
  font-size: var(--font-size-sm, 0.8125rem) !important;
  font-weight: var(--font-weight-medium, 500);
  height: auto !important;
  min-height: 32px !important;
  min-width: 32px !important;
  padding: 0 8px !important;
  width: auto !important;
}

.hcs-app-shell .pager button:hover:not(:disabled) {
  background: var(--color-primary-soft, #E0F7F5) !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell .pager button:disabled {
  opacity: 0.45;
}

.hcs-app-shell .pager select {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--color-white, #fff) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: none !important;
  color: var(--color-gray-800, #1e293b);
  font-size: var(--font-size-sm, 0.8125rem);
  height: 32px !important;
  line-height: 30px;
  max-height: 32px !important;
  min-height: 32px !important;
  min-width: 64px;
  padding: 0 28px 0 10px !important;
  text-align: left;
  vertical-align: middle;
  width: auto !important;
}

@supports selector(::picker(select)) {
  .hcs-app-shell .pager select:not([multiple]):not([size]) {
    appearance: base-select;
    align-items: center;
    display: inline-flex;
    line-height: 1;
  }

  .hcs-app-shell .pager select:not([multiple]):not([size]) > button,
  .hcs-app-shell .pager select:not([multiple]):not([size]) selectedcontent {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    height: 100%;
    line-height: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }

  .hcs-app-shell .pager select:not([multiple]):not([size])::picker-icon {
    content: none;
    display: none !important;
  }

  .hcs-app-shell .pager select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
    background: var(--color-white, #fff);
    border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6));
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-md, 0 12px 32px rgba(15, 23, 42, 0.14));
    color: var(--color-gray-800, #1e293b);
    margin-block: 4px;
    overflow: hidden;
    padding: 4px;
  }

  .hcs-app-shell .pager select:not([multiple]):not([size]) option {
    align-items: center;
    border-radius: 8px;
    display: flex;
    min-height: 32px;
    padding: 6px 10px;
  }

  .hcs-app-shell .pager select:not([multiple]):not([size]) option:checked,
  .hcs-app-shell .pager select:not([multiple]):not([size]) option:hover {
    background: var(--color-primary-soft, #E0F7F5);
    color: var(--color-primary, #00B4A9);
  }
}

/* Shared table/grid icon actions — 8px × 36px, one hover. */
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, .event-table, .task-tree, table) :is(button.doc-action, a.doc-action),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, .event-table, table) :is(.hcs-action-button, .hcs-row-actions > .btn) {
  align-items: center;
  background: var(--color-white, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary, #00B4A9) 40%, var(--color-white)) !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-primary, #00B4A9) !important;
  display: inline-flex;
  height: 36px !important;
  justify-content: center;
  min-height: 36px !important;
  min-width: 36px !important;
  overflow: visible !important;
  padding: 0 !important;
  position: relative;
  width: 36px !important;
}

.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(button.doc-action-label, a.doc-action-label) {
  align-items: center;
  background: var(--color-white, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--color-primary, #00B4A9) 40%, var(--color-white)) !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-primary, #00B4A9) !important;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  height: 36px !important;
  justify-content: center;
  line-height: 1;
  min-height: 36px !important;
  min-width: 36px !important;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  padding: 0 12px !important;
  text-decoration: none;
  white-space: nowrap;
  width: auto !important;
}

.hcs-app-shell :is(.docs-table, .queue-table, .b-table, .event-table, .task-tree, table) :is(button.doc-action, a.doc-action):hover:not(:disabled),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(button.doc-action-label, a.doc-action-label):hover:not(:disabled),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, .event-table, table) :is(.hcs-action-button, .hcs-row-actions > .btn):hover:not(:disabled),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, .event-table, .task-tree, table) :is(button.doc-action, a.doc-action):active:not(:disabled),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(button.doc-action-label, a.doc-action-label):active:not(:disabled),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, .event-table, table) :is(.hcs-action-button, .hcs-row-actions > .btn):active:not(:disabled) {
  background: var(--color-primary-soft, #E0F7F5) !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(button.doc-action, a.doc-action).is-danger,
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(.hcs-action-button, .hcs-row-actions > .btn).btn-outline-danger,
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(.hcs-action-button, .hcs-row-actions > .btn).btn-danger {
  border-color: #FECACA !important;
  color: var(--color-danger, #e11d48) !important;
}

.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(button.doc-action, a.doc-action).is-danger:hover:not(:disabled),
.hcs-app-shell :is(.docs-table, .queue-table, .b-table, table) :is(.hcs-action-button, .hcs-row-actions > .btn).btn-outline-danger:hover:not(:disabled) {
  background: #FEF2F2 !important;
}

.hcs-app-shell :is(button.doc-action, a.doc-action) svg {
  pointer-events: none;
}

.hcs-app-shell :is(button.doc-action, a.doc-action)[aria-label]::after {
  background: var(--color-gray-800, #1E293B);
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-sm);
  color: var(--color-white, #fff);
  content: attr(aria-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  opacity: 0;
  padding: 6px 8px;
  pointer-events: none;
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  visibility: hidden;
  white-space: nowrap;
  z-index: 40;
}

.hcs-app-shell :is(button.doc-action, a.doc-action)[aria-label]:hover::after,
.hcs-app-shell :is(button.doc-action, a.doc-action)[aria-label]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.hcs-app-shell :is(.docs-table, .queue-table, .task-tree, table) td:first-child :is(button.doc-action, a.doc-action)[aria-label]::after {
  left: calc(100% + 8px);
  right: auto;
}

.hcs-app-shell .hcs-nav-menu__panel {
  gap: 4px;
  padding: 8px;
}

.hcs-app-shell .hcs-nav-menu__panel a {
  box-sizing: border-box;
  height: 40px !important;
  margin: 0;
  min-height: 40px !important;
  min-width: 0 !important;
  padding: 0 12px !important;
}

/* Status chips: 24px, horizontal padding only — long labels stay on one line. */
.hcs-app-shell :is(.badge, .hcs-status-badge, .hcs-priority-badge, .hcs-progress-badge) {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: var(--font-weight-semibold, 600);
  height: 24px;
  justify-content: center;
  line-height: 1;
  max-height: 24px;
  min-height: 24px;
  overflow: hidden;
  overflow-wrap: normal;
  padding: 0 8px;
  vertical-align: middle;
  white-space: nowrap;
  word-break: normal;
}

.hcs-app-shell .badge {
  border-radius: var(--radius-sm, 6px);
}

.hcs-app-shell .badge-warning {
  background: #fff2d9;
  color: #8a4d00;
}

.hcs-app-shell :is(.hcs-status-badge, .hcs-priority-badge, .hcs-progress-badge) {
  border-radius: var(--radius-full);
}

@media (max-width: 1100px) {
  .hcs-app-shell {
    --hcs-bottom-nav-height: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }

  .hcs-app-shell .hcs-workspace .hcs-ws-grid-73 { grid-template-columns: 1fr; }
  .hcs-app-shell .hcs-workspace .hcs-ws-card--notifications { display: none; }

  html:has(.hcs-app-shell):not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body:has(.hcs-app-shell):not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .hcs-app-shell:not(:has(.hcs-chat-page)):not(:has(.page-chat)),
  .hcs-app-shell .hcs-main-content:not(:has(.hcs-chat-page)):not(:has(.page-chat)),
  .hcs-app-shell .hcs-workspace,
  .hcs-app-shell .page,
  .hcs-app-shell .page-wf,
  .hcs-app-shell .docs-main {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .hcs-app-shell .hcs-workspace {
    min-height: 0;
    padding-bottom: 1.5rem;
  }

  .hcs-app-shell .hcs-workspace .hcs-ws-card {
    min-height: 0;
  }

  .hcs-app-shell .hcs-workspace .hcs-ws-donut {
    flex-shrink: 0;
    height: 8.5rem;
    min-height: 8.5rem;
    min-width: 8.5rem;
    width: 8.5rem;
  }

  .hcs-app-shell .hcs-workspace :is(.hcs-ws-doc, .hcs-ws-proj, .hcs-ws-task, .hcs-ws-ev, .hcs-ws-notif) {
    max-height: none;
    overflow: visible;
  }

  .hcs-app-shell .hcs-workspace .hcs-ws-doc-groups {
    max-height: 18rem;
    overflow: auto;
  }

  .hcs-app-shell .hcs-main-content:not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
    padding-bottom: var(--hcs-bottom-nav-height, 0px);
  }
}

/* Native selects (no search) match Select2 closed + open chrome. */
body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size),
.hcs-app-shell select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--color-white, #fff) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6)) !important;
  border-radius: var(--input-radius, var(--radius-xl, 16px)) !important;
  box-shadow: none !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 2.25rem 0 16px !important;
}

body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size):hover:not(:disabled):not(:focus),
.hcs-app-shell select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size):hover:not(:disabled):not(:focus) {
  border-color: var(--hcs-input-border-hover, var(--color-gray-300, #CBD5E1)) !important;
}

body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size):focus,
body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size):focus-visible,
.hcs-app-shell select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size):focus,
.hcs-app-shell select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size):focus-visible {
  border-color: var(--input-focus-border, var(--hcs-input-border-focus, var(--color-primary, #007f7c))) !important;
  box-shadow: var(--input-focus-ring, var(--hcs-focus-ring, var(--shadow-focus))) !important;
}

@supports selector(::picker(select)) {
  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) {
    appearance: base-select !important;
    align-items: center;
    display: flex;
    flex-direction: row;
  }

  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) > button,
  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) selectedcontent {
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
    display: flex;
    flex: 1 1 auto;
    font: inherit;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 0;
  }

  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size)::picker-icon {
    content: none;
    display: none !important;
  }

  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size)::picker(select) {
    appearance: base-select;
    background: var(--color-white, #fff);
    border: 1px solid var(--input-border, var(--hcs-input-border, #D7E2E6));
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-md, 0 12px 32px rgba(15, 23, 42, 0.14));
    margin-block: 4px;
    overflow: hidden;
    padding: 4px;
  }

  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) option {
    align-items: center;
    border-radius: 8px;
    display: flex;
    min-height: 36px;
    padding: 6px 10px;
  }

  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) option:checked,
  body:has(.hcs-app-shell) select:not([multiple]):not([size]):not(.hcs-catalog-select2):not(.pager select):not(.hcs-audit-page-size) option:hover {
    background: var(--color-primary-soft, #E0F7F5);
    color: var(--color-primary, #00B4A9);
  }
}

.hcs-app-shell :is(button.doc-action, a.doc-action):hover:not(:disabled),
.hcs-app-shell :is(button.doc-action, a.doc-action):active:not(:disabled) {
  background: var(--color-primary-soft, #E0F7F5) !important;
  border-color: var(--color-primary, #00B4A9) !important;
  color: var(--color-primary, #00B4A9) !important;
}

.hcs-app-shell :is(button.doc-action, a.doc-action).is-danger:hover:not(:disabled) {
  background: #FEF2F2 !important;
  border-color: #FECACA !important;
  color: var(--color-danger, #e11d48) !important;
}

body:has(.hcs-app-shell) .modal-dialog:has(.send-doc-modal) {
  max-width: 36rem !important;
  width: min(36rem, calc(100vw - 2rem));
}

body:has(.hcs-app-shell) .modal-content.send-doc-modal,
body:has(.hcs-app-shell) .send-doc-modal.modal-content {
  display: flex;
  flex-direction: column;
  height: min(42rem, 88vh);
  max-height: min(42rem, 88vh);
  width: 100%;
}

body:has(.hcs-app-shell) .send-doc-modal .hcs-catalog-modal__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  max-height: none !important;
  min-height: 0;
  overflow: hidden !important;
  padding-bottom: 8px !important;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-chip {
  align-items: center;
  background: var(--color-primary-soft, #E0F7F5);
  border-radius: var(--radius-xl, 16px);
  color: var(--color-gray-800, #1e293b);
  display: flex;
  flex-shrink: 0;
  font-size: var(--font-size-sm, 0.8125rem);
  font-weight: 600;
  gap: 10px;
  margin: 0;
  min-height: 48px;
  padding: 10px 14px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-chip svg {
  color: var(--color-primary, #00B4A9);
  flex-shrink: 0;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-to {
  flex-shrink: 0;
  gap: 8px;
  margin: 0;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-tabs {
  background: var(--color-gray-100, #F1F5F9);
  border-radius: var(--radius-lg, 12px);
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-tab {
  align-items: center;
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--radius-md, 8px) !important;
  box-shadow: none !important;
  color: var(--color-gray-600, #475569) !important;
  cursor: pointer;
  display: inline-flex;
  font-size: var(--font-size-sm, 0.8125rem);
  font-weight: var(--font-weight-semibold, 600);
  gap: 8px;
  height: 40px !important;
  justify-content: flex-start;
  min-height: 40px !important;
  padding: 0 14px !important;
  width: auto !important;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-tab:hover:not(.is-on) {
  background: color-mix(in srgb, var(--color-white, #fff) 70%, transparent) !important;
  color: var(--color-gray-800, #1e293b) !important;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-tab.is-on {
  background: var(--color-white, #fff) !important;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
  color: var(--color-primary, #00B4A9) !important;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-tab svg {
  flex-shrink: 0;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-pane {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-pane.is-tree {
  border: 1px solid var(--color-border, #E6EEF0);
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
}

body:has(.hcs-app-shell) .send-doc-modal .send-doc-pane .vb-empty-data {
  margin: 0;
  padding: 16px 14px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-tree,
body:has(.hcs-app-shell) .send-doc-modal .send-dept-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-tree {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-tree ul {
  padding-left: 22px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-row {
  align-items: center;
  border-radius: 10px;
  display: flex;
  gap: 6px;
  min-height: 36px;
  padding: 2px 6px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-row:hover {
  background: var(--color-primary-soft, #E0F7F5);
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-row label {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  flex: 1;
  font-size: var(--font-size-sm, 0.8125rem);
  gap: 8px;
  min-width: 0;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-row input {
  accent-color: var(--color-primary, #00B4A9);
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--color-gray-500, #64748B);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-toggle.is-open svg {
  transform: rotate(90deg);
}

body:has(.hcs-app-shell) .send-doc-modal .send-dept-toggle.is-leaf {
  visibility: hidden;
}

/* Approval / signing popup: wide dialog, sticky chrome, body scrolls. */
.modal:has(.signing-action-modal) {
  --bs-modal-width: min(96vw, 1360px);
}

.modal-dialog:has(.signing-action-modal) {
  margin: .75rem auto;
  max-width: min(96vw, 1360px);
  width: min(96vw, 1360px);
}

.modal-content.signing-action-modal {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, calc(100dvh - 1.5rem));
  overflow: hidden !important;
}

.modal-content.signing-action-modal .hcs-catalog-modal__header,
.modal-content.signing-action-modal .hcs-catalog-modal__footer {
  flex: 0 0 auto;
}

.modal-content.signing-action-modal .hcs-catalog-modal__body {
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  max-height: none !important;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-content.signing-action-modal .hcs-catalog-modal__footer {
  flex-wrap: wrap;
}

.signing-action-modal .process-split {
  align-items: start;
  grid-template-columns: minmax(22rem, 1fr) minmax(22rem, 1.1fr);
}

.signing-action-modal .hcs-signing-side-pane,
.signing-action-modal .hcs-signing-side-pane .process-pane {
  min-height: 0 !important;
}

.signing-action-modal .hcs-signing-side-pane .process-pane {
  max-height: min(52dvh, 36rem);
  overflow-y: auto;
}

.signing-action-modal .hcs-signing-side-pane .docs-empty {
  min-height: 8rem;
  padding: 1.25rem .75rem;
}

/* Mobile: pages must keep scrolling; two-column shells stack. */
@media (max-width: 1100px) {
  html:has(.hcs-app-shell):not(:has(.hcs-chat-page)):not(:has(.page-chat)),
  body:has(.hcs-app-shell):not(:has(.hcs-chat-page)):not(:has(.page-chat)),
  body.abp-application-layout:has(.hcs-app-shell):not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
    position: static !important;
    -webkit-overflow-scrolling: touch;
  }

  html:has(.hcs-app-shell--nav-open),
  body:has(.hcs-app-shell--nav-open) {
    overflow: hidden !important;
  }

  .hcs-app-shell .hcs-top-nav {
    justify-content: flex-start !important;
  }

  .hcs-app-shell:not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
    height: auto !important;
    min-height: 100dvh;
    overflow: visible !important;
  }

  .hcs-app-shell .hcs-main-content:not(:has(.hcs-chat-page)):not(:has(.page-chat)) {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-bottom: var(--hcs-bottom-nav-height, 0px);
  }

  .hcs-app-shell .page,
  .hcs-app-shell .page-wf,
  .hcs-app-shell .page-vb,
  .hcs-app-shell .vb-card,
  .hcs-app-shell .vb-shell,
  .hcs-app-shell .vb-main,
  .hcs-app-shell .docs-main {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .hcs-app-shell .vb-shell,
  .hcs-app-shell .process-split,
  .hcs-app-shell .hcs-event-detail-grid,
  .hcs-app-shell .hcs-detail-split,
  .hcs-app-shell .pj-detail__split,
  .signing-action-modal .process-split {
    grid-template-columns: 1fr !important;
  }

  .hcs-app-shell .vb-chrome {
    align-items: stretch;
    flex-direction: column;
    position: static;
  }

  .hcs-app-shell .vb-aside {
    border-bottom: 1px solid var(--color-gray-100, #DDE4EE);
    border-left: 0;
  }

  .hcs-app-shell .modal-dialog {
    margin: .5rem;
    max-width: calc(100vw - 1rem);
  }

  .hcs-app-shell .modal-content:not(.hcs-catalog-modal--pdf) {
    max-height: calc(100dvh - 1rem);
  }

  .hcs-app-shell .hcs-catalog-modal__body {
    max-height: none !important;
    overflow-y: auto;
  }

  .hcs-app-shell .hcs-catalog-modal__footer {
    flex-wrap: wrap;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 767.98px) {
  .modal-dialog:has(.signing-action-modal) {
    height: 100dvh;
    margin: 0;
    max-width: 100vw;
    width: 100vw;
  }

  .modal-content.signing-action-modal {
    border-radius: 0 !important;
    height: 100dvh;
    max-height: 100dvh;
  }

  .signing-action-modal .hcs-signing-side-pane .process-pane {
    max-height: none;
  }

  .modal-content.signing-action-modal .hcs-catalog-modal__footer .btn {
    flex: 1 1 calc(50% - 10px);
  }
}

/* Task detail is ExtraLarge and centered. The dialog's viewport min-height
   stretches the card, and the catalog body max-height cannot absorb the rest,
   so the leftover band sits under the footer. Size this card to its form. */
body:has(.hcs-app-shell) .modal-dialog:has(.hcs-task-view-modal) {
  align-items: safe center;
  height: auto !important;
  min-height: 0 !important;
}

body:has(.hcs-app-shell) .hcs-task-view-modal.modal-content {
  align-self: center !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: column !important;
  height: auto !important;
  max-height: calc(100dvh - 2rem);
  min-height: 0 !important;
}

body:has(.hcs-app-shell) .hcs-task-view-modal > :not(.modal-header):not(.modal-body):not(.modal-footer):not(.hcs-catalog-modal__header):not(.hcs-catalog-modal__body):not(.hcs-catalog-modal__footer) {
  display: contents;
}

body:has(.hcs-app-shell) .hcs-task-view-modal .hcs-catalog-modal__body {
  flex: 0 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body:has(.hcs-app-shell) .hcs-task-view-modal .tabs,
body:has(.hcs-app-shell) .hcs-task-view-modal .tab-content {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body:has(.hcs-app-shell) .hcs-task-view-modal .tab-pane:not(.active):not(.show) {
  display: none !important;
}

/* Report viewer fills the area under the header and above the bottom nav. */
html:has(.hcs-report-frame),
body:has(.hcs-report-frame),
body.abp-application-layout:has(.hcs-report-frame) {
  height: 100% !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

.hcs-app-shell:has(.hcs-report-frame) {
  display: flex !important;
  flex-direction: column;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  padding-bottom: var(--hcs-bottom-nav-height, 0px);
}

.hcs-app-shell:has(.hcs-report-frame) .hcs-header {
  flex: 0 0 auto;
}

.hcs-app-shell .hcs-main-content:has(.hcs-report-frame) {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column;
  height: auto !important;
  margin: 0 !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  width: 100% !important;
}

.hcs-app-shell .hcs-main-content > .hcs-report-frame {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100% !important;
  margin: 0 !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  width: 100% !important;
}

.hcs-report-frame iframe {
  border: 0;
  display: block;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  width: 100%;
}
