/* AMESS Docs ------------------------------------------------------------- */

.docs-workspace-card {
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#docsApp { min-width: 0; }
#docsApp button,
#docsApp input,
#docsApp select { font: inherit; }
#docsApp button { cursor: pointer; }

#docsApp button:focus-visible,
#docsApp a:focus-visible,
#docsApp input:focus-visible,
#docsApp select:focus-visible {
  outline: 3px solid rgba(40, 85, 203, 0.24);
  outline-offset: 2px;
}

#docsApp [tabindex="-1"]:focus { outline: none; }

.docs-shell {
  --docs-ink: #161616;
  --docs-muted: #6f737b;
  --docs-border: #e1e3e7;
  --docs-accent: #2855cb;
  min-width: 0;
  color: var(--docs-ink);
}

.docs-shell .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.docs-shell-state {
  display: flex;
  min-height: 420px;
  flex-direction: column;
}

.docs-collection-heading h2,
.docs-reader-header h2,
.docs-state-panel h2 {
  color: var(--docs-ink);
  font-weight: 1000;
  letter-spacing: -0.04em;
}

/* Compact library controls, aligned with the Heartbeat resource catalog. */
.docs-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(260px, 430px) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.docs-search,
.docs-filter-wrap { position: relative; }

.docs-toolbar .docs-search {
  width: 100%;
}

.docs-filter-wrap {
  width: 100%;
}

.docs-search > svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #758196;
  stroke-width: 2;
  pointer-events: none;
}

.docs-search input,
.docs-filter-wrap select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8dadd;
  border-radius: 8px;
  background: #fff;
  color: #242424;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(20, 24, 33, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.docs-search input { padding: 10px 16px 10px 44px; }
.docs-filter-wrap select { padding: 10px 38px 10px 14px; }

.docs-search input:focus,
.docs-filter-wrap select:focus {
  border-color: #8c9fd2;
  box-shadow: 0 0 0 3px rgba(40, 85, 203, 0.1);
  outline: none;
}

.docs-toolbar-summary {
  justify-self: end;
  color: #858991;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Catalog section and collection cards. */
.docs-catalog-panel {
  padding: 30px;
  border: 1px solid #e0e2e6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 31, 43, 0.025);
}

.docs-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.docs-panel-heading h3 {
  margin: 0;
  color: #161b26;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 1000;
  letter-spacing: -0.03em;
}

.docs-panel-heading p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.docs-panel-heading > strong {
  padding-top: 5px;
  color: #778197;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.docs-grid,
.docs-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.docs-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe1e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 28, 36, 0.035);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.docs-card:hover,
.docs-card:focus-within {
  transform: translateY(-2px);
  border-color: #c7cbd1;
  box-shadow: 0 9px 22px rgba(24, 28, 36, 0.09);
}

.docs-card-hitarea {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 13px;
  background: transparent;
}

.docs-card-hitarea:focus-visible { outline-offset: -4px !important; }

.docs-card-cover {
  position: relative;
  display: flex;
  min-height: 172px;
  align-items: flex-end;
  padding: 20px 18px 19px;
  overflow: hidden;
  background: #171717;
  color: #fff;
}

.docs-card-cover::after {
  display: none;
}

.docs-card-brand {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.docs-cover-status {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.docs-cover-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f2d6b4;
}

.docs-cover-status[data-status="draft"] > span { background: #e3a145; }

.docs-card-cover-title {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  color: #f2dfc6;
  font-size: clamp(25px, 2.15vw, 34px);
  font-weight: 1000;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-transform: uppercase;
}

.docs-card-cover-title > span { display: block; }

.docs-card-cover-title > span:only-child {
  white-space: nowrap;
}

.docs-card-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 19px 16px 16px;
}

.docs-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.docs-card-title {
  min-width: 0;
  flex: 1 1 112px;
  margin: 0;
  color: #171b23;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-transform: uppercase;
}

.docs-status-chip,
.docs-document-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff1df;
  color: #9a5a0b;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.docs-status-chip > span,
.docs-document-status > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8891b;
}

.docs-card-description {
  display: -webkit-box;
  min-height: 38px;
  margin: 16px 0 14px;
  overflow: hidden;
  color: #4f5663;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.docs-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.docs-open-label,
.docs-card-document-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.docs-card-document-count {
  color: #8a8e96;
  font-weight: 700;
}

.docs-card-document-count svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.docs-open-label {
  flex: 0 0 auto;
  min-width: 52px;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 7px;
  background: #f0f0f1;
  color: #161616;
  font-weight: 900;
}

.docs-open-label svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Collection view. */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0 0 14px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.docs-breadcrumb > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: #98a2b3;
  stroke-width: 2;
}

.docs-breadcrumb button,
.docs-breadcrumb span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-breadcrumb button {
  max-width: 220px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-breadcrumb button:hover { color: #1f2937; }

.docs-collection-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  padding: 24px 28px;
  border: 1px solid #dce2eb;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 8%, rgba(40, 85, 203, 0.09), transparent 28%),
    #fff;
  box-shadow: 0 16px 38px rgba(28, 42, 75, 0.07);
}

.docs-collection-header-empty {
  grid-template-columns: minmax(0, 1fr);
}

.docs-collection-heading { min-width: 0; }

.docs-collection-heading > span {
  color: #65728a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.docs-collection-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.06;
}

.docs-collection-heading p {
  max-width: 650px;
  margin: 9px 0 0;
  color: #5f6878;
  font-size: 13px;
  line-height: 1.5;
}

.docs-collection-header .docs-search { width: 100%; }

.docs-document-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  border: 1px solid #dce2eb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(32, 48, 82, 0.055);
}

.docs-document {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  background: #fff;
  color: #171b23;
  text-align: left;
  box-shadow: 0 3px 10px rgba(25, 38, 70, 0.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.docs-document:hover,
.docs-document:focus-visible {
  transform: translateY(-2px);
  border-color: #aebddd;
  box-shadow: 0 9px 22px rgba(25, 38, 70, 0.09);
}

.docs-document-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 10px;
  background: #e9efff;
  color: #3259c7;
}

.docs-document-icon svg,
.docs-document-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.docs-document-copy { min-width: 0; flex: 1; }

.docs-document-copy strong,
.docs-document-copy > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-document-copy strong {
  color: #1d2532;
  font-size: 13px;
  font-weight: 900;
}

.docs-document-copy > span {
  margin-top: 4px;
  color: #768093;
  font-size: 11px;
}

.docs-document-status[data-status="draft"] { background: #fff1df; color: #9a5a0b; }
.docs-document-status-row { min-height: 22px; padding: 0 7px; }

.docs-attachment-count {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #eceff3;
  color: #657082;
  font-size: 10px;
  font-weight: 900;
}

.docs-document-arrow { display: inline-flex; flex: 0 0 auto; color: #8d98aa; }
.docs-document-arrow svg { width: 16px; height: 16px; }

/* Native document reader. */
.docs-reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 20px;
  align-items: start;
}

.docs-reader-layout-single { display: block; }
.docs-reader-layout-single .docs-reader-article { max-width: 930px; margin: 0 auto; }

.docs-reader-layout-gallery {
  grid-template-columns: 1fr;
}

.docs-reader-layout-gallery .docs-reader-article {
  max-width: 930px;
  margin: 0 auto;
}

.docs-reader-layout-gallery .docs-reader-assets {
  position: static;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.docs-reader-layout-gallery .docs-assets-title {
  grid-column: 1 / -1;
}

.docs-reader-article {
  min-width: 0;
  padding: clamp(26px, 3.2vw, 42px);
  border: 1px solid #dce2eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(28, 42, 75, 0.08);
}

.docs-reader-header { max-width: 760px; }

.docs-reader-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.docs-document-status-reader { min-height: 23px; }

.docs-reader-header h2 {
  margin: 0;
  font-size: clamp(29px, 3.4vw, 42px);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.docs-reader-header p {
  max-width: 700px;
  margin: 12px 0 0;
  color: #5d6676;
  font-size: 14px;
  line-height: 1.55;
}

.docs-reader-divider {
  width: 52px;
  height: 3px;
  margin: 22px 0 26px;
  border-radius: 999px;
  background: #2855cb;
}

.docs-prose {
  max-width: 760px;
  color: #343c49;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.docs-prose > :first-child { margin-top: 0; }
.docs-prose > :last-child { margin-bottom: 0; }

.docs-prose h1,
.docs-prose h2,
.docs-prose h3,
.docs-prose h4,
.docs-prose h5,
.docs-prose h6 {
  margin: 1.55em 0 0.52em;
  color: #171b23;
  font-weight: 1000;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.docs-prose h1 { font-size: 1.9em; }
.docs-prose h2 { font-size: 1.5em; }
.docs-prose h3 { font-size: 1.25em; }
.docs-prose h4,
.docs-prose h5,
.docs-prose h6 { font-size: 1.06em; }

.docs-prose p,
.docs-prose ul,
.docs-prose ol,
.docs-prose blockquote,
.docs-prose pre,
.docs-prose figure,
.docs-prose table { margin: 0 0 1.1em; }

.docs-prose ul,
.docs-prose ol { padding-left: 1.5em; }
.docs-prose li + li { margin-top: 0.35em; }
.docs-prose strong,
.docs-prose b { color: #202735; font-weight: 900; }

.docs-prose a {
  color: #2855cb;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: #9fb3e8;
  text-underline-offset: 3px;
}

.docs-prose a:not([href]) { color: inherit; font-weight: inherit; text-decoration: none; }

.docs-prose blockquote {
  padding: 15px 18px;
  border-left: 4px solid #3259c7;
  border-radius: 0 10px 10px 0;
  background: #f1f5ff;
  color: #33456f;
}

.docs-prose code {
  padding: 0.16em 0.38em;
  border-radius: 5px;
  background: #edf1f6;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.docs-prose pre {
  max-width: 100%;
  padding: 17px;
  overflow: auto;
  border-radius: 10px;
  background: #18202d;
  color: #edf3ff;
  line-height: 1.55;
}

.docs-prose pre code { padding: 0; background: transparent; color: inherit; }
.docs-prose hr { height: 1px; margin: 1.75em 0; border: 0; background: #dfe4eb; }

.docs-prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-spacing: 0;
  border-collapse: collapse;
}

.docs-prose th,
.docs-prose td {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid #dfe4eb;
  text-align: left;
  vertical-align: top;
}

.docs-prose th { background: #eef2f7; color: #263044; font-size: 12px; font-weight: 900; }
.docs-prose figcaption { margin-top: 7px; color: #7a8494; font-size: 11px; text-align: center; }

/* Attachment previews. */
.docs-reader-assets {
  position: sticky;
  top: 18px;
  display: grid;
  min-width: 0;
  gap: 11px;
}

.docs-assets-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 2px;
}

.docs-assets-title span { color: #242b38; font-size: 13px; font-weight: 1000; }
.docs-assets-title strong {
  color: #778197;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-attachment-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce2eb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 42, 75, 0.06);
}

.docs-attachment-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 13px;
}

.docs-attachment-kind {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 9px;
  background: #e9efff;
  color: #3259c7;
}

.docs-attachment-kind svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.docs-attachment-heading > div { min-width: 0; }
.docs-attachment-heading span,
.docs-attachment-heading strong { display: block; }

.docs-attachment-heading > div > span {
  margin-bottom: 2px;
  color: #8a94a6;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-attachment-heading strong {
  overflow: hidden;
  color: #263044;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-attachment-preview {
  border-top: 1px solid #e5e9ef;
  border-bottom: 1px solid #e5e9ef;
  background: #edf0f4;
}

.docs-image-preview {
  display: grid;
  max-height: 320px;
  place-items: center;
  overflow: hidden;
}

.docs-image-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; }

.docs-audio-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  background: #202b45;
  color: #dbe4f7;
}

.docs-audio-preview > svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.docs-audio-preview audio { width: 100%; min-width: 0; height: 38px; }
.docs-video-preview video { display: block; width: 100%; max-height: 320px; background: #101318; }
.docs-pdf-preview { height: 410px; background: #dfe3e8; }
.docs-pdf-preview iframe { width: 100%; height: 100%; border: 0; background: #fff; }

.docs-attachment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
}

.docs-primary-button,
.docs-secondary-button,
.docs-secondary-link,
.docs-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.docs-primary-button,
.docs-download-link { border: 1px solid #111; background: #111; color: #fff; }
.docs-primary-button:hover,
.docs-download-link:hover { background: #252525; }

.docs-secondary-button,
.docs-secondary-link { border: 1px solid #d6dde8; background: #fff; color: #344054; }
.docs-secondary-button { margin-top: 14px; }
.docs-secondary-button:hover,
.docs-secondary-link:hover { background: #f6f8fb; }

.docs-download-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.docs-attachment-preview:fullscreen {
  display: flex;
  width: 100vw;
  height: 100vh;
  max-height: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: #101318;
}

.docs-attachment-preview:fullscreen img,
.docs-attachment-preview:fullscreen iframe,
.docs-attachment-preview:fullscreen video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

/* Folder workspace: compact document rail + persistent preview. */
.docs-folder-workspace {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce2eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(32, 48, 82, 0.08);
}

.docs-folder-sidebar {
  min-width: 0;
  border-right: 1px solid #e1e6ee;
  background: #f8fafc;
}

.docs-folder-sidebar-header {
  padding: 16px 17px 13px;
  border-bottom: 1px solid #e4e8ef;
}

.docs-folder-count-row {
  display: flex;
  min-height: 23px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.docs-folder-count-row > [data-docs-count] {
  color: #778197;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-folder-sidebar h2 {
  margin: 6px 0 0;
  color: #171b23;
  font-size: 19px;
  font-weight: 1000;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.docs-sidebar-search { display: block; margin-top: 10px; }
.docs-sidebar-search input {
  min-height: 40px;
  padding: 8px 12px 8px 40px;
  border-radius: 10px;
  box-shadow: none;
  font-size: 12px;
}
.docs-sidebar-search > svg { left: 13px; width: 16px; height: 16px; }

.docs-folder-sidebar .docs-document-list {
  display: flex;
  max-height: calc(100vh - 245px);
  min-height: 0;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-gutter: stable;
}

.docs-folder-sidebar .docs-document {
  position: relative;
  gap: 9px;
  min-height: 50px;
  padding: 7px 9px;
  border-color: transparent;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.docs-folder-sidebar .docs-document:hover,
.docs-folder-sidebar .docs-document:focus-visible {
  border-color: #d7dfeb;
  background: #fff;
  box-shadow: 0 5px 14px rgba(30, 45, 75, 0.06);
  transform: none;
}

.docs-folder-sidebar .docs-document.is-active {
  border-color: #b9c8eb;
  background: #fff;
  box-shadow: 0 7px 18px rgba(39, 73, 157, 0.1);
}

.docs-folder-sidebar .docs-document.is-active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -1px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #2855cb;
  content: "";
}

.docs-folder-sidebar .docs-document-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 8px;
  background: #e9efff;
}

.docs-folder-sidebar .docs-document-icon svg { width: 17px; height: 17px; }
.docs-folder-sidebar .docs-document-copy strong { font-size: 12px; }
.docs-folder-sidebar .docs-document-copy > span { margin-top: 3px; font-size: 9.5px; }
.docs-folder-sidebar .docs-document-status-row { min-height: 19px; padding: 0 6px; font-size: 7px; }
.docs-folder-sidebar .docs-document-status-row > span { display: none; }
.docs-folder-sidebar .docs-attachment-count { min-width: 20px; height: 20px; font-size: 9px; }

.docs-folder-sidebar .docs-empty {
  padding: 34px 14px;
  border: 0;
  background: transparent;
}

.docs-folder-sidebar .docs-empty-icon { width: 38px; height: 38px; }
.docs-folder-sidebar .docs-empty strong { font-size: 14px; }
.docs-folder-sidebar .docs-empty p { font-size: 11px; }

.docs-folder-main {
  min-width: 0;
  background: #fff;
}

.docs-folder-main-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 28px;
}

.docs-folder-main-empty .docs-empty { max-width: 520px; }

.docs-active-viewer {
  min-width: 0;
  padding: 30px clamp(24px, 3vw, 42px) 40px;
}

.docs-active-document-header {
  padding-bottom: 22px;
  border-bottom: 1px solid #e6e9ef;
}

.docs-active-document-header h2 {
  margin: 0;
  color: #161b26;
  font-size: clamp(29px, 3.2vw, 42px);
  font-weight: 1000;
  letter-spacing: -0.04em;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.docs-active-document-header p {
  max-width: 800px;
  margin: 11px 0 0;
  color: #5d6676;
  font-size: 14px;
  line-height: 1.55;
}

.docs-preview-panel {
  min-width: 0;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #d9e0e9;
  border-radius: 13px;
  background: #f1f3f6;
  box-shadow: 0 10px 26px rgba(25, 38, 70, 0.07);
}

.docs-preview-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe4eb;
  background: #fff;
}

.docs-preview-file {
  display: flex;
  min-width: 150px;
  flex: 1 1 260px;
  align-items: center;
  gap: 9px;
}

.docs-preview-file > div { min-width: 0; }
.docs-preview-file > div > span,
.docs-preview-file strong { display: block; }
.docs-preview-file > div > span {
  margin-bottom: 2px;
  color: #8a94a6;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.docs-preview-file strong {
  overflow: hidden;
  color: #263044;
  font-size: 11.5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-preview-actions {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.docs-preview-action,
.docs-preview-pagination button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.docs-preview-action:hover,
.docs-preview-pagination button:hover:not(:disabled) { background: #f4f6fa; }

.docs-preview-action svg,
.docs-preview-pagination button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.docs-preview-pagination {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #fff;
}

.docs-preview-pagination button {
  min-width: 32px;
  padding: 6px;
  border: 0;
  border-radius: 0;
}

.docs-preview-pagination button:disabled { cursor: default; color: #b1b8c3; }
.docs-preview-pagination span {
  min-width: 88px;
  padding: 0 7px;
  color: #5e687a;
  font-size: 9.5px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.docs-preview-panel .docs-download-link { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.docs-preview-panel .docs-attachment-preview { border: 0; }
.docs-preview-panel .docs-pdf-preview { height: clamp(600px, 72vh, 900px); }
.docs-preview-panel .docs-image-preview {
  min-height: min(560px, 68vh);
  max-height: none;
  padding: 18px;
}
.docs-preview-panel .docs-image-preview img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}
.docs-preview-panel .docs-video-preview video { max-height: 72vh; }
.docs-preview-panel .docs-audio-preview { min-height: 96px; padding: 20px; }

.docs-file-preview {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 30px;
  color: #657082;
  text-align: center;
}
.docs-file-preview svg { width: 42px; height: 42px; fill: none; stroke: #4868b7; stroke-width: 1.6; }
.docs-file-preview strong { color: #263044; }
.docs-file-preview p { margin: 0; font-size: 12px; }

.docs-native-document { padding-top: 8px; }
.docs-native-document.has-preview {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid #e6e9ef;
}
.docs-active-viewer .docs-prose { max-width: 860px; }

/* Empty, error, and loading states. */
.docs-empty {
  grid-column: 1 / -1;
  width: 100%;
  padding: 48px 24px;
  border: 1px dashed #c9d2df;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #667085;
  text-align: center;
}

.docs-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 12px;
  background: #e9efff;
  color: #3259c7;
}

.docs-empty-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.docs-empty strong { display: block; color: #263044; font-size: 17px; font-weight: 1000; }
.docs-empty p { margin: 6px auto 0; color: #667085; font-size: 12px; line-height: 1.5; }

.docs-state-panel {
  width: min(480px, 100%);
  margin: auto;
  padding: 38px 28px;
  border: 1px solid #dce2eb;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 15px 40px rgba(28, 42, 75, 0.08);
}

.docs-state-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 13px;
  background: #fff0ee;
  color: #b42318;
  font-size: 19px;
  font-weight: 1000;
}

.docs-state-panel h2 { margin: 0; font-size: 25px; }
.docs-state-panel p { margin: 9px auto 19px; color: #667085; font-size: 13px; line-height: 1.55; }

.docs-loading-head {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
  padding: 20px 24px;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #fff;
}

.docs-loading-head span {
  position: relative;
  display: block;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}

.docs-loading-head span:first-child { width: min(260px, 60%); height: 26px; }
.docs-loading-head span:last-child { width: min(380px, 82%); }

.docs-skeleton-card {
  min-height: 310px;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 13px;
  background: #fff;
}

.docs-skeleton-card div,
.docs-skeleton-card span {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e9edf3;
}

.docs-skeleton-card div::after,
.docs-skeleton-card span::after,
.docs-loading-head span::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.74), transparent);
  content: "";
  animation: docs-shimmer 1.35s infinite;
}

.docs-skeleton-card div { height: 172px; background: #e8edf5; }
.docs-skeleton-card span { height: 12px; margin: 22px 18px 0; border-radius: 999px; }
.docs-skeleton-card span:last-child { width: 60%; margin-top: 12px; }

@keyframes docs-shimmer {
  100% { transform: translateX(100%); }
}

@media (max-width: 1180px) {
  .docs-grid,
  .docs-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-reader-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .docs-reader-layout-gallery { grid-template-columns: 1fr; }
  .docs-reader-layout-gallery .docs-reader-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .docs-collection-header {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }

  .docs-reader-layout { grid-template-columns: 1fr; }
  .docs-reader-assets {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-reader-layout-gallery .docs-reader-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-assets-title { grid-column: 1 / -1; }
  .docs-pdf-preview { height: 360px; }
}

@media (max-width: 760px) {
  .docs-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .docs-toolbar .docs-search,
  .docs-filter-wrap { width: 100%; flex: auto; }

  .docs-toolbar-summary { justify-self: start; }

  .docs-catalog-panel {
    padding: 18px 15px;
    border-radius: 14px;
  }

  .docs-panel-heading { margin-bottom: 15px; }
  .docs-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .docs-panel-heading > strong { padding-top: 0; font-size: 10px; }

  .docs-grid,
  .docs-document-list,
  .docs-skeleton-grid,
  .docs-reader-assets { grid-template-columns: 1fr; }

  .docs-reader-layout-gallery .docs-reader-assets { grid-template-columns: 1fr; }

  .docs-card-cover { min-height: 150px; }

  .docs-breadcrumb { margin-bottom: 12px; font-size: 10px; }
  .docs-breadcrumb button { max-width: 92px; }

  .docs-collection-header {
    gap: 16px;
    padding: 20px 18px;
    border-radius: 14px;
  }

  .docs-collection-heading h2 { font-size: 29px; }
  .docs-document-list { padding: 12px; border-radius: 14px; }
  .docs-document { min-height: 68px; }

  .docs-reader-article {
    padding: 25px 20px;
    border-radius: 14px;
  }

  .docs-reader-header h2 { font-size: 31px; }
  .docs-reader-divider { margin: 19px 0 22px; }
  .docs-prose { font-size: 14px; line-height: 1.67; }
  .docs-assets-title { grid-column: 1; }
  .docs-pdf-preview { height: min(480px, 62vh); }
}

@media (max-width: 430px) {
  .docs-card-body { padding: 16px; }
  .docs-card-title { font-size: 15px; }
  .docs-document { gap: 9px; padding: 10px; }
  .docs-document-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .docs-attachment-count,
  .docs-document-arrow { display: none; }
  .docs-document-status-row { min-height: 20px; padding: 0 6px; font-size: 7.5px; }

  .docs-attachment-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .docs-secondary-link,
  .docs-download-link { width: 100%; }
}

@media (max-width: 1100px) {
  .docs-folder-workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .docs-preview-toolbar { flex-wrap: wrap; align-items: flex-start; }
  .docs-preview-actions { flex: 1 1 100%; justify-content: flex-start; }
  .docs-preview-panel .docs-pdf-preview { height: clamp(540px, 68vh, 760px); }
}

@media (max-width: 760px) {
  .docs-folder-workspace { grid-template-columns: minmax(0, 1fr); border-radius: 14px; }
  .docs-folder-sidebar { border-right: 0; border-bottom: 1px solid #e1e6ee; }
  .docs-folder-sidebar-header { padding: 17px 15px 13px; }
  .docs-folder-sidebar h2 { font-size: 18px; }
  .docs-folder-sidebar .docs-document-list {
    max-height: 310px;
    padding: 7px;
    border-radius: 0;
  }
  .docs-folder-sidebar .docs-document { min-height: 50px; padding: 7px 9px; }
  .docs-active-viewer { padding: 24px 16px 30px; }
  .docs-active-document-header { padding-bottom: 18px; }
  .docs-active-document-header h2 { font-size: 30px; }
  .docs-preview-panel { margin-top: 18px; border-radius: 11px; }
  .docs-preview-toolbar { gap: 10px; padding: 10px; }
  .docs-preview-file { flex-basis: 100%; }
  .docs-preview-actions { width: 100%; }
  .docs-preview-action { flex: 1 1 auto; }
  .docs-preview-panel .docs-download-link { width: auto; flex: 1 1 auto; }
  .docs-preview-panel .docs-pdf-preview { height: min(68vh, 620px); min-height: 420px; }
  .docs-preview-panel .docs-image-preview { min-height: min(430px, 58vh); padding: 10px; }
  .docs-folder-main-empty { min-height: 320px; padding: 18px; }
  .docs-native-document.has-preview { margin-top: 24px; padding-top: 22px; }
}

@media (max-width: 430px) {
  .docs-preview-pagination { width: 100%; justify-content: space-between; }
  .docs-preview-pagination span { flex: 1; }
  .docs-preview-action span,
  .docs-preview-panel .docs-download-link span { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .docs-card,
  .docs-document,
  .docs-search input,
  .docs-filter-wrap select { transition: none; }

  .docs-skeleton-card div::after,
  .docs-skeleton-card span::after,
  .docs-loading-head span::after { animation: none; }
}
