.document-tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.document-tools input { flex: 1 1 220px; min-width: 0; }
.document-tools button { flex: 0 0 auto; }
.document-list { display: grid; gap: 10px; }
.document-row { display: flex; align-items: center; gap: 18px; padding: 16px; border: 1px solid #dce3ee; border-radius: 12px; background: #fff; }
.document-info { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.document-info strong, .document-info small { display: block; }
.document-info small { color: #64748b; margin-top: 6px; }
.document-status { border-radius: 20px; padding: 5px 12px; white-space: nowrap; background: #eef2f6; font-size: 14px; }
.status-published { color: #166534; background: #dcfce7; }
.status-inactive { color: #64748b; }
.document-actions { display: flex; gap: 8px; align-items: center; }
.document-actions button { padding: 9px 14px; }
.document-actions details { position: relative; }
.document-actions summary { cursor: pointer; padding: 8px 14px; font-size: 24px; list-style: none; }
.document-actions details[open] { z-index: 2; }
.document-actions details[open] button { display: block; width: 130px; margin: 6px 0; }
.document-danger { color: #b91c1c; background: #fff1f2; }
.document-phase-note { color: #64748b; font-size: 14px; }
.document-service-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: #64748b; font-size: 14px; }
.document-service-line [hidden] { display: none !important; }
#documentStatus.is-error, #documentEditorStatus { color: #b91c1c; }
.document-editor { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 0; border-radius: 18px; padding: 26px; color: #172b4d; box-sizing: border-box; }
.document-editor::backdrop, .document-reader::backdrop { background: rgb(15 23 42 / 65%); }
.document-editor form { display: grid; gap: 16px; }
.document-editor [hidden], .document-reader [hidden] { display: none !important; }
.document-editor h2 { margin: 0 0 6px; }
.document-editor label { display: grid; gap: 7px; }
.document-editor input:not([type=checkbox]), .document-editor textarea { width: 100%; box-sizing: border-box; }
.document-editor .document-publish { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.document-editor input[type=checkbox], .document-choice input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0; }
.document-editor details label { margin-top: 12px; }
.document-form-actions { display: flex; justify-content: flex-end; gap: 12px; }
.faq-document-picker { padding: 14px; border: 1px solid #dce3ee; border-radius: 10px; }
.faq-document-picker summary { cursor: pointer; }
.document-choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; overflow-wrap: anywhere; }
.document-source-button { display: block; margin: 8px 0; padding: 10px 14px; text-align: start; background: #edf4ff; color: #244a80; border: 1px solid #c6d7f0; border-radius: 10px; max-width: 100%; overflow-wrap: anywhere; }
.document-reader[open] { display: flex; flex-direction: column; }
.document-reader { inset: 0; width: min(1100px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 16px; box-sizing: border-box; color: #172b4d; background: #f5f7fa; overflow: hidden; }
.document-reader-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: white; flex: 0 0 auto; }
.document-reader-header h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; min-width: 0; max-height: 3em; overflow: hidden; }
.document-reader-header button { flex-shrink: 0; }
.document-reader-toolbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 10px; border-block: 1px solid #dce3ee; flex: 0 0 auto; }
.document-reader-toolbar button { padding: 8px 12px; background: white; color: #244a80; border: 1px solid #ccd7e5; }
.document-reader-toolbar button:disabled { opacity: .4; }
#documentPageLabel { min-width: 42px; text-align: center; }
#documentReaderStatus { text-align: center; margin: 0; padding: 0 16px; }
#documentReaderStatus:not(:empty) { padding-block: 14px; }
.document-viewport { flex: 1; min-height: 0; overflow: auto; overflow-y: scroll; padding: 16px; box-sizing: border-box; overscroll-behavior: contain; }
.document-viewport canvas, .document-viewport img { display: block; margin-inline: auto; max-width: none; background: white; box-shadow: 0 3px 14px #cbd5e1; height: auto; }
.document-video { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; background: #111; }
.message .assistant-preview-link { display: inline; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #244a80; font: inherit; text-align: start; text-decoration: underline; overflow-wrap: anywhere; cursor: pointer; }
.message .assistant-preview-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.document-link-frame { display: block; width: 100%; height: 100%; border: 0; background: white; }
.cloud-browser { height: 100%; display: flex; flex-direction: column; gap: 8px; }
.cloud-browser-controls:not([hidden]) { display: flex; gap: 8px; }
.cloud-browser-controls input { flex: 1; min-width: 0; }
.cloud-browser-screen { flex: 1; min-height: 0; text-align: center; overflow: hidden; }
.cloud-browser-screen img:not([hidden]) { width: 100%; height: 100%; object-fit: contain; touch-action: none; }
.cloud-browser [hidden] { display: none; }
.document-link-video { min-height: 200px; background: #111; }
.document-idle-warning { padding: 14px 20px; background: #fff4d4; flex: 0 0 auto; }
.document-idle-warning button { margin-inline-start: 12px; }
@media (max-width: 700px) {
  .document-row { flex-wrap: wrap; gap: 10px; }
  .document-info { flex-basis: 60%; }
  .document-actions { width: 100%; justify-content: flex-end; }
  .document-reader { width: 100vw; height: 100dvh; border-radius: 0; }
  .document-reader-header { padding: 12px; gap: 10px; }
  .document-reader-header h2 { font-size: 16px; }
  .document-reader-header button { max-width: 48%; padding: 10px; }
  .document-reader-toolbar { gap: 5px; }
  .document-reader-toolbar button { font-size: 13px; padding: 8px; }
}

#adminView.gli-guest #gliAccessSettings,
#adminView.gli-guest .item-actions,
#adminView.gli-guest .document-actions details,
#adminView.gli-guest button:not(:is(.admin-tab-btn, .admin-subtab-btn,
  #refreshDashboardBtn, #refreshConversationsBtn, #refreshRequestsBtn, #refreshLicensesBtn,
  #viewRequestsNotifyBtn, #clearFaqSearchBtn, #faqQuestionsTab, #faqTranslationsTab,
  #faqViewTranslationsBtn, [data-gli-read], [data-doc-preview])) { display: none !important; }
