/* Document editing surfaces, following the shared library. */
#app_view #view_office .office-page:has(.office-layout.has-selection) > .office-suite-header { display: none !important; }
#app_view #view_office .office-document-chrome .office-editor-head { padding: 14px 18px !important; gap: 10px !important; }
#app_view #view_office .office-document-titlebar { gap: 8px !important; flex-wrap: wrap !important; }
#app_view #view_office .office-document-titlebar .office-title-field { flex: 1 1 240px; min-width: 120px; }
#app_view #view_office .office-document-titlebar input { font-size: 18px !important; padding: 7px 9px !important; min-height: 38px !important; }
#app_view #view_office .office-document-context,
#app_view #view_office .office-library-context { gap: 10px !important; font-size: 12px !important; }
#app_view #view_office .office-library-context label { display: flex; align-items: center; gap: 7px; }
#app_view #view_office .office-library-context input { padding: 5px 8px; min-height: 34px; }
#app_view #view_office .office-library-context { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; flex-wrap: wrap; width: 100%; padding: 0 !important; border: 0 !important; background: transparent !important; }
#app_view #view_office .office-library-context label { flex: 0 1 auto; white-space: nowrap; }
#app_view #view_office .office-library-context input { width: 200px; max-width: 100%; }
#app_view #view_office :is(.office-document-metadata,.office-editor-info) { display: block; height: auto; min-height: 0; flex: 0 0 auto; font-size: 12px; color: #526a80; }
#app_view #view_office :is(.office-document-metadata,.office-editor-info) > summary { cursor: pointer; line-height: 1.5; padding: 2px 0; }
#app_view #view_office .office-document-metadata[open] .office-library-context { padding-top: 8px !important; }
#app_view #view_office .office-library-actions { gap: 8px !important; flex-wrap: wrap; align-items: center; }
#app_view #view_office .office-library-actions .office-save-button { display: inline-flex !important; align-items: center; justify-content: center; background: #205d9e !important; border-color: #205d9e !important; color: white !important; }
#app_view #view_office .office-library-more { position: relative; margin-left: auto; }
#app_view #view_office .office-library-more summary { cursor: pointer; padding: 9px 12px; border: 1px solid #ccd8e3; border-radius: 8px; background: white; font-size: 13px; font-weight: 600; }
#app_view #view_office .office-library-more[open] > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px; display: grid; gap: 5px; padding: 8px; border: 1px solid #ccd8e3; border-radius: 10px; background: white; box-shadow: 0 10px 24px #10294424; }
#app_view #view_office .office-library-more button { justify-content: flex-start; width: 100%; }
#app_view #view_office .office-library-notice { padding: 8px 12px !important; font-size: 12px !important; line-height: 1.5; }
#app_view #view_office .office-library-notice p { margin: 0; }
#app_view #view_office .office-editor-tabs { display: flex !important; align-items: center; flex-wrap: wrap; gap: 4px; padding: 7px 14px 0; background: #f1f5fa; border-bottom: 1px solid #d6e0ea; }
#app_view #view_office .office-editor-tabs > button { padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 7px 7px 0 0; background: transparent; color: #40536a; font: 600 14px Arial,sans-serif; cursor: pointer; }
#app_view #view_office .office-editor-tabs > button[aria-selected="true"] { border-color: #2362a6; color: #164b83; background: #fff; }
#app_view #view_office .office-editor-tab-end { margin-left: auto; padding-bottom: 6px; }
#app_view #view_office .office-word-panel { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid #dce4ed; background: #fff; }
#app_view #view_office .office-word-panel[hidden] { display: none !important; }
#app_view #view_office .office-word-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 4px; }
#app_view #view_office .office-word-more-tools { flex: 1 0 100%; min-width: 0; font-size: 12px; color: #3e6182; }
#app_view #view_office .office-word-more-tools > summary { cursor: pointer; padding: 5px 0; }
#app_view #view_office .office-word-more-tools > div { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; padding-top: 6px; }
#app_view #view_office .office-word-field { display: flex; flex-direction: column; gap: 5px; margin: 0; color: #506174; font-size: 11px; font-weight: 600; }
#app_view #view_office .office-word-field select,
#app_view #view_office .office-word-field input { width: auto; min-width: 0; min-height: 36px; height: 36px; padding: 6px 9px; border: 1px solid #ccd8e4; border-radius: 6px; background: #fff; color: #18324d; font: 14px Arial,sans-serif; }
#app_view #view_office .office-word-field input[type="color"] { width: 45px; padding: 3px; cursor: pointer; }
#app_view #view_office .office-word-tool,
#app_view #view_office .office-word-table-tools button { min-width: 36px; min-height: 36px; height: auto; padding: 7px 10px; margin: 0; border: 1px solid #cfdbe6; border-radius: 6px; background: #fff; color: #243e59; font: 500 13px Arial,sans-serif; cursor: pointer; }
#app_view #view_office .office-word-tool:hover:not(:disabled) { background: #eef5fd; border-color: #7c9fc5; }
#app_view #view_office .office-word-tool[aria-pressed="true"] { color: #174d86; background: #e4effc; border-color: #588bc1; }
#app_view #view_office .office-word-tool:disabled { opacity: .4; cursor: default; }
#app_view #view_office .office-word-table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #5d6e80; font-size: 12px; }
#app_view #view_office .office-word-table-tools > span { flex-basis: 100%; }
#app_view #view_office .office-word-search input { max-width: 210px; }
#app_view #view_office #office_word_find_state { color: #52667d; font-size: 12px; min-width: 80px; align-self: center; }
#app_view #view_office .office-word-guide { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 18px; color: #57718b; font-size: 12px; line-height: 1.5; background: #f8fafc; }
#app_view #view_office .office-word-guide button { padding: 0; border: 0; background: transparent; color: #205d9e; text-decoration: underline; font: inherit; cursor: pointer; }
#app_view #view_office .office-word-modern .office-word-canvas { padding: 24px !important; background: #eaf0f6; overflow: auto; max-height: none; min-height: 440px; }
#app_view #view_office .office-word-modern .office-word-page { width: min(100%, 794px) !important; max-width: 794px !important; min-width: 0 !important; min-height: 760px !important; height: auto !important; margin: 0 auto !important; padding: 54px 60px !important; border: 1px solid #d9e2eb !important; border-radius: 2px !important; background: white !important; color: #102944; box-shadow: 0 4px 16px #17334e12; font: 12pt/1.55 Arial,sans-serif; overflow-wrap: anywhere; box-sizing: border-box; outline-offset: 4px; }
#app_view #view_office .office-word-page:focus { outline: 2px solid #80a8d4; }
#app_view #view_office .office-word-page h1 { font-size: 24pt; line-height: 1.25; margin: .5em 0; }
#app_view #view_office .office-word-page h2 { font-size: 18pt; line-height: 1.3; margin: .7em 0 .4em; }
#app_view #view_office .office-word-page h3 { font-size: 14pt; line-height: 1.4; }
#app_view #view_office .office-word-page p { margin: .5em 0; }
#app_view #view_office .office-word-page :is(td,th) { min-width: 25px; overflow-wrap: anywhere; padding: 7px; border: 1px solid #aebfd0; }
#app_view #view_office .office-word-page table { width: 100%; table-layout: fixed; border-collapse: collapse; }
#app_view #view_office .office-word-page th { background: #f0f4f8; font-weight: bold; text-align: left; }
#app_view #view_office .office-word-page a { color: #1d5d9f; text-decoration: underline; }
#app_view #view_office .office-word-modern .office-statusbar { display: flex !important; flex-wrap: wrap; gap: 12px; padding: 10px 16px; font-size: 12px; border-top: 1px solid #dce4ed; }
#app_view #view_office .office-statusbar select { border: 1px solid #ccd8e4; border-radius: 5px; padding: 4px; color: #314e68; background: white; }
#app_view #view_office .office-check-label { flex-direction: row; align-items: center; gap: 10px; }
#app_view #view_office .office-check-label input { width: 18px; min-height: 18px; height: 18px; }
.office-print-frame { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; border: 0; }
#app_view #view_office .office-native-steps { display: grid; gap: 14px; max-width: 660px; margin: 12px auto; text-align: left; }
#app_view #view_office .office-native-steps li { margin: 8px 0; line-height: 1.6; }
#app_view #view_office .office-native-steps button { padding: 10px 14px; border: 1px solid #a8bfd6; border-radius: 7px; background: white; color: #164a7a; cursor: pointer; }
#app_view #view_office .office-sheet-help { font-size: 12px; color: #47644a; padding: 8px 12px; background: #f3f8f0; border-bottom: 1px solid #dce6d6; line-height: 1.5; }
#app_view #view_office .office-sheet-error { color: #a33022 !important; background: #fff1ed !important; }
#app_view #view_office .office-sheet-history { display: flex; gap: 6px; align-items: center; }
#app_view #view_office .office-sheet-modern { display: flex !important; flex-direction: column !important; min-width: 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important; }
#app_view #view_office .office-sheet-modern > :is(.office-sheet-history,.office-sheet-help,.office-ribbon-tabs,.office-ribbon-panel,.office-formula-bar,.office-formula-panel,.office-statusbar,.office-sheet-toolbox) { flex: 0 0 auto !important; }
#app_view #view_office .office-sheet-modern .office-ribbon-tabs { height: auto !important; min-height: 40px !important; overflow: visible !important; }
#app_view #view_office .office-sheet-modern .office-sheet-toolbox { height: auto; min-height: 0; border-bottom: 1px solid #d7e3d0; }
#app_view #view_office .office-sheet-toolbox > summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 11px 13px; background: #f2f7ef; color: #3a6522; }
#app_view #view_office .office-sheet-navigation { position: relative; flex: 0 0 auto; }
#app_view #view_office .office-sheet-navigation > summary { padding: 9px; cursor: pointer; border: 1px solid #d1decc; border-radius: 6px; color: #345722; font-size: 12px; }
#app_view #view_office .office-sheet-navigation[open] > div { position: absolute; z-index: 20; right: 0; display: flex; align-items: end; gap: 6px; padding: 10px; background: #fff; border: 1px solid #d1decc; border-radius: 7px; box-shadow: 0 4px 16px #17334e20; min-width: 200px; }
#app_view #view_office .office-sheet-navigation label { flex-direction: column; align-items: start !important; }
#app_view #view_office .office-sheet-history { flex-wrap: wrap; padding: 10px 12px; font-size: 12px; }
#app_view #view_office .office-sheet-history label { display: flex; align-items: center; gap: 7px; margin: 0; }
#app_view #view_office .office-sheet-history input { width: 72px; min-height: 36px; padding: 5px 8px; border: 1px solid #ccd8e4; border-radius: 6px; font-size: 14px; }
#app_view #view_office .office-sheet-modern > .office-sheet-help { display: block; width: 100%; box-sizing: border-box; }
#app_view #view_office .office-sheet-modern > .office-sheet-help { flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; margin: 0 !important; }
#app_view #view_office .office-sheet-history button { min-height: 36px; padding: 7px 12px; border: 1px solid #d1decc; border-radius: 6px; background: white; color: #345722; cursor: pointer; }
#app_view #view_office .office-sheet-history button:disabled { opacity: .4; cursor: default; }
#app_view #view_office .office-app-surface.is-excel .office-ribbon-tabs { display: flex !important; flex-wrap: wrap !important; padding: 6px 10px; }
#app_view #view_office .office-app-surface.is-excel .office-ribbon-tabs button { display: inline-flex !important; padding: 9px 13px; min-height: 38px; font-size: 13px; }
#app_view #view_office .office-app-surface.is-excel .office-sheet-ribbon { flex-wrap: wrap !important; overflow: visible !important; padding: 10px 12px; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon { display: flex !important; height: auto !important; min-height: 0 !important; align-items: stretch !important; gap: 12px; }
#app_view #view_office .office-app-surface.is-excel .office-ribbon-panel.hidden { display: none !important; }
#app_view #view_office .office-app-surface.is-excel .office-sheet-ribbon-group { flex-shrink: 1; min-width: 0; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group { display: flex !important; flex-direction: column !important; justify-content: flex-start !important; gap: 6px; padding: 0 10px 0 0 !important; min-height: 0 !important; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group > .office-toolbar-label { order: 0 !important; margin: 0; position: static !important; text-transform: none; font-size: 11px; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group > div { order: 1 !important; display: flex !important; align-items: center !important; gap: 4px; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group > div { height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group :is(button,select,input) { font-size: 13px !important; min-height: 36px !important; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group button { padding: 7px 10px !important; border: 1px solid #d1decc !important; border-radius: 5px !important; background: #fff !important; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group :is(.office-sheet-format-button,.office-sheet-select.is-size) { width: auto !important; flex: 0 0 auto !important; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group button.is-active { background: #e9f2e4 !important; border-color: #76a85b !important; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group .office-cell-color { display: inline-flex !important; align-items: center; gap: 3px; font-size: 12px; }
#app_view #view_office .office-sheet-modern .office-sheet-ribbon-group input[type="color"] { width: 32px !important; min-height: 30px !important; height: 30px !important; }
#app_view #view_office .office-app-surface.is-excel .office-sheet-ribbon-group > div { flex-wrap: wrap; }
#app_view #view_office :is(.office-word-modern,.office-library-more,.office-sheet-history) :is(button,select,input,summary):focus-visible { outline: 3px solid #76a2d0; outline-offset: 2px; }
#app_view #view_office .office-word-modern .office-statusbar > span { display: inline !important; }
@media (min-width: 701px) {
  #app_view #view_office .office-document-chrome .office-editor-head { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 18px !important; }
  #app_view #view_office .office-editor-head > .office-mobile-back { grid-column: 1; grid-row: 1; }
  #app_view #view_office .office-editor-head > .office-document-titlebar { grid-column: 2; grid-row: 1; }
  #app_view #view_office .office-editor-head > .office-document-metadata { grid-column: 2; grid-row: 2; }
  #app_view #view_office .office-editor-head > .office-library-actions { grid-column: 2; grid-row: 3; }
  #app_view #view_office .office-editor-head > .office-editor-info { grid-column: 1; grid-row: 2; }
  #app_view #view_office .office-editor-head > .office-editor-info[open] { grid-column: 1 / -1; grid-row: 4; }
  #app_view #view_office .office-editor-head > #office_library_conflict { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  #app_view #view_office .office-document-chrome .office-editor-head { padding: 12px !important; }
  #app_view #view_office .office-library-context > span { display: none; }
  #app_view #view_office .office-library-actions { display: flex !important; }
  #app_view #view_office .office-library-actions > button { flex: 1 1 auto !important; min-height: 40px !important; padding: 8px !important; font-size: 12px !important; }
  #app_view #view_office .office-library-more { margin-left: 0; }
  #app_view #view_office .office-editor-tabs { padding: 5px 7px 0; gap: 0; }
  #app_view #view_office .office-editor-tabs > button { padding: 9px 10px; font-size: 13px; }
  #app_view #view_office .office-editor-tab-end { margin-left: 0; }
  #app_view #view_office .office-word-modern .office-editor-tab-end { display: none; }
  #app_view #view_office .office-editor-tab-end button { padding: 7px; font-size: 12px; }
  #app_view #view_office .office-word-panel { padding: 10px; gap: 8px; }
  #app_view #view_office .office-word-field input:not([type="color"]),
  #app_view #view_office .office-word-field select { font-size: 16px; max-width: 160px; min-height: 40px; }
  #app_view #view_office .office-word-tool { min-height: 40px; }
  #app_view #view_office .office-word-guide { padding: 8px 12px; }
  #app_view #view_office .office-word-guide > span { display: none; }
  #app_view #view_office .office-word-modern .office-word-canvas { padding: 10px !important; min-height: 380px; }
  #app_view #view_office .office-word-modern .office-word-page { padding: 20px 16px !important; min-height: 520px !important; }
  #app_view #view_office .office-word-modern .office-statusbar { gap: 8px; padding: 8px 10px; }
  #app_view #view_office .office-word-search .office-word-field { flex: 1 1 160px; }
  #app_view #view_office .office-word-search .office-word-field input { max-width: 100%; }
  #app_view #view_office .office-app-surface.is-excel .office-ribbon-tabs button { min-height: 40px; padding: 8px; }
  #app_view #view_office .office-app-surface.is-excel .office-sheet-ribbon-group { display: flex !important; }
  #app_view #view_office .office-sheet-history > span { display: none; }
  #app_view #view_office .office-sheet-history { gap: 5px; padding: 8px; }
  #app_view #view_office .office-sheet-history button { padding: 7px; }
}
