.shared-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; min-height: 44px; }
.shared-heading h2 { font-size: 23px; }
.shared-back { width: 170px; white-space: nowrap; }
.folder-name, .file-name { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.folder-name:hover, .file-name:hover { text-decoration: underline; }
.actionable-row .file-pick { cursor: default; }
#panel-shared #folder-list td:first-child { width: 55%; }
#panel-shared #folder-list td:last-child { width: 172px; }
.tool { margin-top: 22px; }
.shared-detail-page .table-scroll { overflow-x: auto; }
.shared-detail-page th, .shared-detail-page td { overflow-wrap: anywhere; }
.shared-detail-page #files td:first-child { min-width: 0; max-width: none; width: 44px; }
.shared-detail-page #files td:nth-child(2) { min-width: 180px; white-space: normal; }
.shared-detail-page #files td:last-child { width: 104px; }
.shared-detail-page .empty-cell { width: auto; }
.shared-file-toolbar #refresh { margin-left: auto; }
.shared-file-actions { margin-top: 18px; }
.shared-detail-page #events td { white-space: normal; }
.shared-detail-page #events td:first-child { white-space: nowrap; min-width: 160px; max-width: none; }
.shared-detail-page #events td:nth-child(4) { min-width: 160px; }
.shared-detail-page #events details pre { max-width: 400px; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.shared-detail-page dialog, #settings-dialog { width: 720px; }
.shared-detail-page #upload-dialog { width: 560px; }
#guests-dialog { width: 1040px; }
#invite-dialog, #edit-guest-dialog { width: 720px; }
.shared-detail-page dialog .message, :is(#create-dialog, #settings-dialog, #guests-dialog, #invite-dialog, #edit-guest-dialog) .message { margin: 12px 0; }
.shared-detail-page .dialog-footer, :is(#create-dialog, #settings-dialog, #guests-dialog, #invite-dialog, #edit-guest-dialog) .dialog-footer { margin-top: 22px; }
.dialog-target { margin: 16px 0; font-weight: 600; overflow-wrap: anywhere; }
.shared-detail-page #upload-section { margin-top: 16px; }
.shared-detail-page .shared-select-all { display: none; }
.shared-detail-page input[type=checkbox], :is(#create-dialog, #settings-dialog, #guests-dialog, #invite-dialog, #edit-guest-dialog) input[type=checkbox] { width: 19px; min-height: 19px; height: 19px; padding: 0; flex-shrink: 0; }
:where(.shared-detail-page) .check-label, :is(#create-dialog, #settings-dialog, #guests-dialog, #invite-dialog, #edit-guest-dialog) .check-label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 12px; }
.permission-checks { display: flex; flex-wrap: wrap; gap: 20px; } .pending-card { border-top: 1px solid #d8dfdb; margin-top: 22px; padding-top: 16px; }
.guest-permissions { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 16px; }
#guest-table .guest-permissions .check-label { margin: 0; }
#guest-table td { white-space: normal; overflow-wrap: anywhere; }
#guest-table td:first-child { width: 22%; min-width: 150px; max-width: none; }
#guest-table td:nth-child(2) { width: 32%; }
#guest-table td:last-child { width: 132px; }
#guest-table .empty-cell { width: auto; }
.guest-state { margin: 6px 0 0; font-size: 12px; }
details summary { cursor: pointer; font-weight: 600; }
#selected { max-height: 200px; overflow: auto; }
@media(max-width:900px) {
  #panel-shared #folder-list td:first-child { width: auto; }
  #panel-shared #folder-list td:last-child { width: auto; }
  .shared-detail-page .table-scroll { overflow: visible; }
  .shared-detail-page #files td:nth-child(2), .shared-detail-page #events td:nth-child(4) { min-width: 0; }
  .shared-detail-page #files td:last-child { width: auto; }
  .shared-detail-page #files .file-pick { width: auto; }
  .shared-detail-page #events td:first-child { min-width: 0; white-space: normal; }
  .shared-detail-page .shared-select-all { display: flex; }
  #guest-table td:first-child, #guest-table td:nth-child(2), #guest-table td:last-child { width: auto; min-width: 0; }
}
@media(max-width:600px) {
  input { font-size: 16px; } th, td { padding: 10px; } .tool { padding: 18px; }
  .guest-permissions { grid-template-columns: minmax(0, 1fr); }
  .shared-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shared-tabs.single-tab { grid-template-columns: minmax(0, 1fr); }
}
