:is(#interface_person_view, #interface_estimate_view, #interface_chance_view, #interface_dossier_view) #interface_related_files.balter_documents_browser {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--balter-text-primary);

  [hidden] { display: none !important; }
  button, input, select, summary { font-family: 'Source Sans Pro', sans-serif; font-size: 14px; line-height: 20px; }
  button { cursor: pointer; }
  button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .onedrive_item:focus-visible {
    outline: 2px solid var(--balter-primary-color);
    outline-offset: 2px;
  }
  .onedrive_manager { margin: 0; }
  .onedrive_manager > .decoblock_inner_content { padding: 16px; }
  .onedrive_manager_header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
  .onedrive_toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
  .onedrive_add_menu { position: relative; }
  .onedrive_add_menu summary { list-style: none; cursor: pointer; }
  .onedrive_add_menu summary::-webkit-details-marker { display: none; }
  .onedrive_add_menu summary::after { content: ''; width: 5px; height: 5px; margin: -3px 0 0 4px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
  .onedrive_add_options { position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; display: grid; gap: 3px; min-width: 200px; padding: 5px; border: 1px solid var(--balter-gray-medium); border-radius: 5px; background: var(--balter-white); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
  .onedrive_add_options .onedrive_button { justify-content: flex-start; border-color: transparent; }
  .onedrive_sr_only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .onedrive_button, .onedrive_crumb, .onedrive_view_switch button {
    box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 36px; margin: 0; padding: 6px 10px;
    border: 1px solid var(--balter-gray-medium); border-radius: 5px;
    background: var(--balter-white); color: var(--balter-text-primary);
    text-decoration: none; white-space: nowrap;
  }
  .onedrive_button:hover, .onedrive_crumb:hover, .onedrive_view_switch button:hover { background: var(--balter-background-2); }
  .onedrive_button img, .onedrive_view_switch img { width: 18px; height: 18px; object-fit: contain; }
  .onedrive_button_primary { border-color: var(--balter-primary-color); background: var(--balter-primary-color); color: var(--balter-white); }
  .onedrive_button_primary:hover { background: var(--balter-color-primary-2); color: var(--balter-white); }
  .onedrive_button_danger { border-color: var(--balter-primary-color); color: var(--balter-primary-color); }
  .onedrive_icon_button { width: 36px; padding: 6px; }
  .onedrive_button:disabled { opacity: .55; cursor: wait; }
  .onedrive_breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; flex: 1; min-width: 0; gap: 5px; margin: 0; padding: 0; }
  .onedrive_crumb { min-height: 28px; padding: 3px 7px; border-color: transparent; background: transparent; }
  .onedrive_crumb:disabled { color: var(--balter-text-primary); font-weight: 700; cursor: default; opacity: 1; }
  .onedrive_separator { color: var(--balter-gray-1); }
  .onedrive_file_controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
  .onedrive_controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
  .onedrive_search { flex: 0 1 220px; min-width: 150px; }
  .onedrive_sort { display: flex; align-items: center; gap: 7px; flex: 0 1 195px; }
  .onedrive_sort label { font-size: 13px; color: var(--balter-text-secondary); }
  .onedrive_search input, .onedrive_sort select { box-sizing: border-box; width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--balter-gray-medium); border-radius: 5px; background: var(--balter-white); color: var(--balter-text-primary); }
  .onedrive_view_switch { display: flex; gap: 3px; }
  .onedrive_view_switch button { width: 36px; min-width: 36px; padding: 6px; }
  .onedrive_view_switch span { display: none; }
  .onedrive_view_switch button[aria-pressed="true"] { border-color: var(--balter-primary-color); color: var(--balter-primary-color); background: var(--balter-background-1); }
  .onedrive_notice { margin: 0 0 10px; color: var(--balter-color-secondary-2-3); }
  .onedrive_notice:empty { display: none; }
  .onedrive_notice.onedrive_error { color: var(--balter-primary-color); }
  .onedrive_dropzone { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px; border: 2px dashed var(--balter-primary-color); border-radius: 5px; background: var(--balter-background-1); text-align: center; pointer-events: none; }
  .onedrive_dropzone img { width: 30px; height: 30px; object-fit: contain; }
  .onedrive_dropzone span { font-weight: 600; }
  .onedrive_dragover, .onedrive_dropzone.onedrive_dragover { border-color: var(--balter-primary-color) !important; background: var(--balter-background-1) !important; }
  .onedrive_bulk_bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
  .onedrive_select_all { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; font-weight: 600; }
  .onedrive_select_all input, .onedrive_file_checkbox { width: 18px; height: 18px; margin: 0; accent-color: var(--balter-primary-color); cursor: pointer; }
  .onedrive_select_all input:disabled { cursor: default; }
  .onedrive_selected_count { color: var(--balter-text-secondary); font-size: 12px; }
  .onedrive_download_selected:disabled { cursor: not-allowed; }
  .onedrive_browser { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: max-content minmax(0, 1fr); column-gap: 12px; min-height: 120px; }
  .onedrive_browser.has_selection { grid-template-columns: minmax(0, 1fr) minmax(230px, 270px); }
  .onedrive_columns, .onedrive_item { display: grid; grid-template-columns: minmax(180px, 1fr) 80px 85px 140px; align-items: center; gap: 10px; }
  .onedrive_columns { grid-column: 1; padding: 8px 11px; border-bottom: 1px solid var(--balter-gray-medium); background: var(--balter-whitegray-2); color: var(--balter-text-primary); font-size: 14px; line-height: 20px; font-weight: 600; }
  .onedrive_columns > span:first-child { padding-left: 48px; }
  .onedrive_items { grid-column: 1; align-self: start; min-width: 0; }
  .onedrive_item { box-sizing: border-box; min-height: 54px; padding: 7px 11px; border: 1px solid transparent; border-bottom-color: var(--balter-gray-light); background: var(--balter-white); cursor: pointer; }
  .onedrive_item:hover { background: var(--balter-whitegray-1); }
  .onedrive_item.selected { border-color: var(--balter-blue-1); border-radius: 5px; background: var(--balter-background-1); }
  .onedrive_item.checked { background: var(--balter-background-1); }
  .onedrive_item_identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .onedrive_item_icon_wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; }
  .onedrive_item_icon { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }
  .onedrive_file_checkbox { position: absolute; right: -4px; bottom: -4px; z-index: 1; border: 1px solid var(--balter-white); border-radius: 3px; background: var(--balter-white); }
  .onedrive_item_names { display: flex; flex-direction: column; min-width: 0; }
  .onedrive_item_names strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 600; }
  .onedrive_item_names small { display: none; color: var(--balter-text-secondary); font-size: 12px; }
  .onedrive_item_type, .onedrive_item_size, .onedrive_item_modified { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--balter-text-secondary); font-size: 14px; line-height: 20px; }
  .onedrive_items.onedrive_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 11px; padding: 4px 0; }
  .onedrive_grid .onedrive_item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 155px; padding: 13px; border: 1px solid var(--balter-gray-medium); border-radius: 7px; text-align: center; }
  .onedrive_grid .onedrive_item_identity { flex-direction: column; width: 100%; gap: 8px; }
  .onedrive_grid .onedrive_item_icon_wrap { width: 66px; height: 66px; flex-basis: 66px; }
  .onedrive_grid .onedrive_item_icon { width: 60px; height: 60px; flex-basis: 60px; }
  .onedrive_grid .onedrive_item_names { width: 100%; }
  .onedrive_grid .onedrive_item_names strong { max-width: 100%; }
  .onedrive_grid .onedrive_item_type, .onedrive_grid .onedrive_item_modified { display: none; }
  .onedrive_empty { padding: 30px 12px; color: var(--balter-text-secondary); text-align: center; }
  .onedrive_empty .onedrive_button { margin-top: 12px; }
  .onedrive_details { grid-column: 2; grid-row: 1 / span 2; padding: 16px; border: 1px solid var(--balter-gray-medium); border-radius: 7px; background: var(--balter-whitegray-1); overflow-wrap: anywhere; }
  .onedrive_details_identity { display: flex; align-items: flex-start; gap: 9px; }
  .onedrive_details_identity h3 { flex: 1; min-width: 0; }
  .onedrive_details_close { flex: 0 0 28px; width: 28px; min-height: 28px; padding: 4px; margin-top: -4px; border-color: transparent; }
  .onedrive_details_identity h3 { margin: 0; font-size: 15px; line-height: 1.35; }
  .onedrive_details_data { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 7px; margin: 17px 0; font-size: 12px; }
  .onedrive_details_data dt { color: var(--balter-text-secondary); }
  .onedrive_system_note { margin: 10px 0 0; font-size: 13px; color: var(--balter-text-secondary); }
  .onedrive_details_data dd { margin: 0; font-weight: 600; }
  .onedrive_details_actions { display: flex; flex-wrap: wrap; gap: 7px; }
  .onedrive_count { margin: 12px 0 0; font-size: 12px; color: var(--balter-text-secondary); }
  .onedrive_queue { margin-top: 14px; padding: 13px 16px; border: 1px solid var(--balter-gray-medium); border-radius: 7px; background: var(--balter-white); }
  .onedrive_queue_header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
  .onedrive_queue_summary { color: var(--balter-text-secondary); font-size: 12px; }
  .onedrive_queue_header button { margin-left: auto; }
  .onedrive_queue_items { display: grid; gap: 7px; max-height: 250px; overflow-y: auto; margin-top: 10px; }
  .onedrive_queue_item { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(110px, 1fr) minmax(120px, 2fr) auto; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--balter-gray-light); border-radius: 5px; }
  .onedrive_queue_name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .onedrive_queue_state { color: var(--balter-text-secondary); font-size: 12px; overflow-wrap: anywhere; }
  .onedrive_queue_progress { width: 100%; height: 10px; accent-color: var(--balter-primary-color); }
  .onedrive_dialog_backdrop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.45); }
  .onedrive_dialog { box-sizing: border-box; width: min(100%, 470px); max-height: 85vh; overflow-y: auto; padding: 20px; border-radius: 8px; background: var(--balter-white); box-shadow: 0 12px 40px rgba(0,0,0,.24); }
  .onedrive_dialog h3 { margin: 0 0 13px; font-size: 18px; }
  .onedrive_dialog_body label { display: block; margin-bottom: 5px; font-weight: 600; }
  .onedrive_dialog_input { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px; border: 1px solid var(--balter-gray-medium); border-radius: 5px; }
  .onedrive_dialog_error { min-height: 18px; color: var(--balter-primary-color); }
  .onedrive_dialog_actions { display: flex; justify-content: flex-end; gap: 8px; }
  .onedrive_move_folders { display: grid; gap: 5px; max-height: 250px; overflow-y: auto; margin-top: 10px; }
  .onedrive_move_folders button { justify-content: flex-start; }
}

@media (max-width: 980px) {
  :is(#interface_person_view, #interface_estimate_view, #interface_chance_view, #interface_dossier_view) #interface_related_files.balter_documents_browser {
    .onedrive_browser.has_selection { grid-template-columns: 1fr; }
    .onedrive_details { grid-column: 1; grid-row: auto; }
  }
}

@media (max-width: 650px) {
  :is(#interface_person_view, #interface_estimate_view, #interface_chance_view, #interface_dossier_view) #interface_related_files.balter_documents_browser {
    .onedrive_manager > .decoblock_inner_content { padding: 12px; }
    .onedrive_toolbar { justify-content: flex-start; }
    .onedrive_controls { flex-basis: 100%; justify-content: flex-start; }
    .onedrive_search { flex: 1 1 100%; }
    .onedrive_sort { flex: 1; }
    .onedrive_columns { display: none; }
    .onedrive_item { grid-template-columns: minmax(0,1fr) auto; }
    .onedrive_item_names small { display: block; }
    .onedrive_item_type, .onedrive_item_modified { display: none; }
    .onedrive_view_switch button { min-width: 40px; }
    .onedrive_view_switch span { display: none; }
    .onedrive_queue_item { grid-template-columns: minmax(0,1fr) auto; }
    .onedrive_queue_progress { grid-column: 1 / -1; grid-row: 2; }
  }
}




#interface_chance_view {
  .onedrive_entity_tabs { grid-column: 1 / -1; min-width: 0; }
}


