/* Resource libraries: compact blue-gray surfaces, readable names and reachable actions. */
.library-page { max-width: 1500px; margin: 0 auto; padding: 28px 24px; color: #24374e; }
.library-page *, .doc-center-page *, .doc-preview-page * { min-width: 0; }
.library-page :is(a, button, input, select, summary):focus-visible,
.doc-center-page :is(a, button, input, select, summary):focus-visible,
.doc-preview-page :is(a, button):focus-visible { outline: 3px solid #4380c6; outline-offset: 3px; }
.library-page .btn, .doc-center-page .btn { white-space: nowrap; }
.library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.library-heading h1 { font-size: clamp(23px, 2.2vw, 29px); font-weight: 700; margin: 0 0 7px; }
.library-heading p { color: #586b81; margin: 0 0 12px; }
.library-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: #586b81; }
.library-catalog-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 24px; }
.library-catalog-main { min-width: 0; }
.library-category-panel { background: #fff; border: 1px solid #dce4ee; border-radius: 8px; overflow: hidden; }
.library-category-panel summary { padding: 15px; font-weight: 700; cursor: pointer; color: #24374e; }
.library-category-panel summary span { display: block; margin: 7px 0 0 18px; font-size: 12px; font-weight: 400; color: #586b81; }
.library-category-panel .category-nav .list-group-item { font-size: 13px; padding: 11px 15px; overflow-wrap: anywhere; }
.library-search-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(130px, 160px) auto auto; gap: 12px; align-items: end; }
.library-search-toolbar .form-label, .library-standard-filters .form-label { font-size: 13px; font-weight: 600; color: #42566d; margin-bottom: 6px; }
.library-search-toolbar .btn { min-height: 42px; }
.library-view-switch { display: flex; gap: 0; }
.library-view-switch .btn { border-radius: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.library-view-switch .btn:first-child { border-radius: 6px 0 0 6px; }
.library-view-switch .btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.library-standard-filters { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) minmax(150px, 1fr) auto; gap: 12px; align-items: end; padding: 16px; margin-bottom: 18px; background: #fff; border: 1px solid #dce4ee; border-radius: 8px; }
.library-standard-filters .btn, .library-standard-filters :is(input, select) { min-height: 42px; }
.library-results { background: #fff; border: 1px solid #dce4ee; border-radius: 8px; overflow: hidden; }
.standards-page .standard-table { min-width: 0; width: 100%; table-layout: fixed; }
.standards-page .standard-table :is(th, td) { padding: 14px 12px; line-height: 1.65; overflow-wrap: anywhere; }
.standards-page .standard-table th { font-size: 12px; color: #52657b; background: #f4f7fb; }
.standards-page .standard-table td { font-size: 13px; vertical-align: top; }
.standards-page .standard-col-code { width: 16%; }
.standards-page .standard-col-status { width: 7%; }
.standards-page .standard-col-func { width: 10%; }
.standards-page .standard-col-date { width: 10%; }
.standards-page .standard-col-action { width: 88px; }
.standards-page .standard-name-text { font-weight: 600; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.standards-page .standard-replaced-text { margin-top: 6px; overflow-wrap: anywhere; }
.library-cell-label { display: none; }
.library-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-top: 1px solid #dce4ee; font-size: 13px; }
.library-page-size, .library-page-links, .library-page-jump { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.library-pagination :is(label, .btn, .library-page-current, .library-page-disabled) { white-space: nowrap; }
.library-pagination :is(select, input) { width: auto; min-height: 36px; }
.library-page-jump input { width: 64px; }
.library-page-current { font-variant-numeric: tabular-nums; font-weight: 600; }
.library-page-disabled { color: #65768a; padding: 6px; }
.library-empty, .standards-page .standard-table .library-empty { padding: 36px 20px; text-align: center; color: #586b81; }
.library-empty strong { display: block; color: #24374e; font-size: 17px; }
.library-empty p { margin: 8px 0 16px; }
.standard-detail-page :is(h2, h4, .card-footer) { overflow-wrap: anywhere; }
.doc-center-page .doc-center-shell { grid-template-columns: 220px minmax(0, 1fr); }
.library-doc-filters > summary { padding: 14px; font-weight: 600; color: #24374e; cursor: pointer; background: #fff; border: 1px solid #dce4ee; border-radius: 6px; margin-bottom: 12px; }
.library-doc-filters > summary span { font-size: 12px; font-weight: 400; margin-left: 6px; color: #586b81; }
.library-doc-filters > .doc-center-sidecard { margin-bottom: 12px; }
.doc-center-page .doc-center-table { table-layout: fixed; width: 100%; }
.doc-center-page .doc-col-title { min-width: 0; width: auto; }
.doc-center-page .doc-col-check { width: 42px; }
.doc-center-page .doc-col-cat { width: 14%; }
.doc-center-page .doc-col-tag { width: 80px; }
.doc-center-page .doc-col-action { width: 174px; }
.doc-center-page :is(td, h6, .doc-preview-chip, .card-body, .doc-center-filter-item) { overflow-wrap: anywhere; }
.doc-center-page .doc-center-filter-item { gap: 10px; }
.doc-center-page .doc-center-filter-item span { flex-shrink: 0; }
.doc-center-page .doc-center-saved-item .btn { padding: 4px 6px !important; }
.doc-preview-page { padding: 24px; }
.doc-preview-page .tool-header { text-align: left; }
.doc-preview-page .tool-title { font-size: 24px; line-height: 1.5; color: var(--text, #24374e); }
.doc-preview-page :is(.tool-title, .tool-subtitle) { overflow-wrap: anywhere; }
.doc-preview-page .doc-preview-frame { min-height: 380px; height: 72vh; }
.tw.tw-list-page { max-width: 1400px; padding: 28px 24px; --tw-muted: #596c83; }
.tw.tw-list-page .tw-list-heading { gap: 20px; margin-bottom: 22px; }
.tw.tw-list-page .tw-list-heading h1 { font-size: clamp(24px, 2.2vw, 29px); margin: 7px 0; }
.tw.tw-list-page .tw-list-bar { flex-wrap: wrap; gap: 12px 20px; padding-bottom: 12px; align-items: end; }
.tw.tw-list-page .tw-tabs { flex-wrap: wrap; gap: 20px; margin-right: auto; }
.tw.tw-list-page .tw-list-bar label { display: grid; gap: 5px; font-size: 12px; color: #596c83; }
.tw.tw-list-page .tw-list-bar input { width: 240px; margin: 0; }
.tw.tw-list-page .tw-list-bar select { width: 240px; }
.tw.tw-list-page .tw-document-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.tw.tw-list-page .tw-empty { padding: 32px 20px; }
.tw.tw-list-page .tw-empty h2 { font-size: 19px; color: #24374e; margin-bottom: 8px; }
.tw.tw-list-page .tw-empty p { margin-bottom: 16px; }
.tw.tw-list-page .tw-card-actions { flex-wrap: wrap; gap: 12px 18px; }
@media (max-width: 1199px) {
  .library-search-toolbar { grid-template-columns: minmax(140px, 1fr) minmax(130px, 1fr) auto; }
  .library-search-toolbar .library-view-switch { grid-column: 1 / -1; justify-self: end; }
  .library-standard-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .library-standard-filters .library-search-field { grid-column: 1 / -1; }
  .standards-page .standard-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .standards-page .standard-table tbody, .standards-page .standard-table { display: block; }
  .standards-page .standard-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 16px; padding: 16px; border-bottom: 1px solid #dce4ee; }
  .standards-page .standard-table td { display: block; padding: 0; border: 0; box-shadow: none; }
  .standards-page .standard-name-cell { grid-column: 1 / -1; grid-row: 1; font-size: 16px; }
  .standards-page .standard-code-cell { grid-column: 1 / -1; }
  .standards-page .standard-action-cell { grid-column: 1 / -1; padding-top: 5px !important; }
  .standards-page .standard-action-cell .btn { min-height: 40px; min-width: 88px; }
  .standards-page .library-cell-label { display: block; font-size: 11px; color: #64748b; margin-bottom: 2px; }
  .standards-page .standard-code-cell .library-cell-label { display: inline; margin-right: 8px; }
  .standards-page .standard-table .library-empty-row { display: block; }
}
@media (max-width: 991px) {
  .doc-center-page .doc-center-shell { grid-template-columns: minmax(0, 1fr); }
  .doc-center-page .doc-center-filter-item { padding: 7px; }
}
@media (max-width: 767px) {
  .library-page, .tw.tw-list-page { padding: 20px 14px; }
  .library-catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .library-category-panel .category-nav { max-height: 45vh; overflow-y: auto; }
  .library-category-panel summary span { display: inline; margin-left: 6px; }
  .library-heading { flex-wrap: wrap; margin-bottom: 16px; }
  .library-standard-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; }
  .library-standard-filters > .btn { grid-column: 1 / -1; }
  .library-pagination { gap: 16px; padding: 14px; }
  .library-page-links { order: -1; flex-basis: 100%; justify-content: space-between; }
  .library-page-edge { display: none; }
  .library-page-jump { margin-left: auto; }
  .library-search-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .library-search-toolbar .library-search-field { grid-column: 1 / -1; }
  .library-search-toolbar .library-view-switch { justify-self: stretch; }
  .library-view-switch .btn { flex: 1; }
  .doc-center-page .doc-center-sidecard { max-height: 220px; overflow-y: auto; }
  .doc-center-page .doc-center-table { min-width: 0; }
  .doc-center-page .doc-center-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .doc-center-page .doc-center-table, .doc-center-page .doc-center-table tbody { display: block; }
  .doc-center-page .doc-center-table tr { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 16px; border-bottom: 1px solid #dce4ee; }
  .doc-center-page .doc-center-table td { display: block; padding: 0; border: 0; box-shadow: none; }
  .doc-center-page .doc-center-table .doc-title-cell, .doc-center-page .doc-center-table .doc-actions-cell { flex-basis: 100%; }
  .doc-center-page .doc-center-table .doc-select-cell { margin-left: auto; }
  .doc-center-page .doc-center-table .doc-actions-cell { text-align: left !important; }
  .doc-center-page .library-cell-label { display: block; color: #64748b; font-size: 11px; margin-bottom: 3px; }
  .doc-center-page .doc-actions-cell .btn { min-height: 40px; }
  .doc-center-page .table-responsive { scrollbar-width: thin; }
  .doc-preview-page .doc-preview-frame { height: 65vh; }
  .doc-preview-page { padding: 16px; }
  .doc-preview-page .tool-title { font-size: 20px; }
  .tw.tw-list-page .tw-list-heading { flex-wrap: wrap; }
  .tw.tw-list-page .tw-list-bar .tw-tabs { flex-basis: 100%; }
  .tw.tw-list-page .tw-list-bar label, .tw.tw-list-page .tw-list-bar :is(input, select) { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .library-page *, .doc-center-page *, .tw.tw-list-page * { scroll-behavior: auto !important; transition: none !important; }
}
