:root {
  font-family: "Google Sans", "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f1f1f;
  background: #f8fafd;
  --blue: #0b57d0;
  --blue-soft: #c2e7ff;
  --blue-hover: #d3e3fd;
  --green: #188038;
  --red: #b3261e;
  --text: #1f1f1f;
  --muted: #5f6368;
  --line: #e0e3e7;
  --panel: #ffffff;
  --chrome: #edf2f8;
  --hover: #f1f3f4;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.18), 0 2px 6px rgba(60, 64, 67, 0.15);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  background: #f8fafd;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.appShell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  min-height: 100vh;
  padding: 18px 12px 18px 10px;
  background: #f8fafd;
}

.brand {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 18px;
}

.brand strong {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0;
}

.driveLogo {
  position: relative;
  width: 38px;
  height: 34px;
}

.driveLogo span {
  position: absolute;
  display: block;
  border-radius: 6px;
}

.driveLogo span:nth-child(1) {
  left: 14px;
  top: 1px;
  width: 13px;
  height: 33px;
  background: #34a853;
  transform: skew(-30deg);
}

.driveLogo span:nth-child(2) {
  left: 4px;
  bottom: 1px;
  width: 34px;
  height: 12px;
  background: #4285f4;
  transform: skew(-30deg);
}

.driveLogo span:nth-child(3) {
  right: 2px;
  bottom: 1px;
  width: 16px;
  height: 28px;
  background: #fbbc04;
  transform: skew(30deg);
}

.folderNode {
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px 0 20px;
  color: #3c4043;
  background: transparent;
  border: 0;
  border-radius: 0 22px 22px 0;
  text-align: left;
  font-size: 15px;
}

.folderIcon {
  color: #3c4043;
  font-size: 18px;
  text-align: center;
}

.folderNode:hover {
  background: #eef1f6;
}

.folderNode.active {
  color: #001d35;
  background: var(--blue-soft);
  font-weight: 600;
}

.folderSection {
  margin-top: 10px;
}

.folderSectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 8px 20px;
}

.folderSectionHeader strong,
.folderSectionHeader span {
  display: block;
}

.folderSectionHeader strong {
  font-size: 14px;
}

.folderSectionHeader span {
  color: var(--muted);
  font-size: 12px;
}

.folderSectionHeader button,
.topActions button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #3c4043;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.folderSectionHeader button:hover,
.topActions button:hover {
  background: #edf0f4;
}

.folderTree {
  display: grid;
  gap: 2px;
}

.folderNode {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  padding-left: calc(20px + var(--level) * 14px);
  min-height: 36px;
  font-size: 14px;
}

.folderNameWrap {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.folderName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folderMiniStatus {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folderMiniStatus.active {
  color: #188038;
}

.folderMiniStatus.paused,
.folderMiniStatus.kept {
  color: #b06000;
}

.folderMiniStatus.deleted {
  color: #b3261e;
}

.folderMiniStatus.web {
  color: #1967d2;
}

.folderCount {
  color: var(--muted);
  font-size: 12px;
}

.storageBox {
  margin: 22px 20px 0;
  color: #3c4043;
  font-size: 14px;
}

.storageLine {
  height: 4px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #dadce0;
  border-radius: 999px;
}

.storageLine::before {
  content: "";
  display: block;
  width: 36%;
  height: 100%;
  background: var(--blue);
}

.storageBox strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.storageBox p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.content {
  min-width: 0;
  padding: 18px 20px 28px 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(420px, 948px) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
}

.searchBox {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 948px;
  padding: 0 24px;
  color: #3c4043;
  background: #edf2f8;
  border: 1px solid transparent;
  border-radius: 999px;
}

.searchBox:focus-within {
  background: #ffffff;
  border-color: #dfe3ea;
  box-shadow: var(--shadow);
}

.searchBox span {
  font-size: 26px;
}

.searchBox input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #202124;
  background: transparent;
  font-size: 18px;
}

.topActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topActions .topTextButton {
  width: auto;
  padding: 0 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 13px;
}

.syncState {
  min-width: 128px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #137333;
  background: #e6f4ea;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.syncState.busy {
  color: #b06000;
  background: #fef7e0;
}

.syncState.error {
  color: var(--red);
  background: #fce8e6;
}

.drivePanel {
  min-height: 620px;
  padding: 24px 22px 26px;
  background: #ffffff;
  border-radius: 24px;
}

.panelHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 8px;
  color: #202124;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

#folderDescription {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.summaryPanel {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 160px)) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.syncOverview {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 14px;
  background: #f8fafd;
  border: 1px solid #edf0f4;
  border-radius: 18px;
}

.syncOverviewTitle {
  display: grid;
  align-content: center;
  gap: 6px;
}

.syncOverviewTitle strong {
  color: #202124;
  font-size: 15px;
}

.syncOverviewTitle span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.syncStatusCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 190px));
  gap: 8px;
  justify-content: start;
}

.syncStatusCard {
  min-height: 94px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  color: #202124;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 14px;
  text-align: left;
}

.syncStatusCard:hover,
.syncStatusCard.selected {
  border-color: #a8c7fa;
  background: #e8f0fe;
}

.syncStatusCard span {
  min-height: 28px;
  color: #3c4043;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.syncStatusCard strong {
  font-size: 24px;
  line-height: 1;
}

.syncStatusCard small {
  color: var(--muted);
  font-size: 11px;
}

.syncStatusCard em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.syncStatusCard.active.selected,
.syncStatusCard.active.selected:hover {
  background: #e6f4ea;
  border-color: #b7e1cd;
}

.syncStatusCard.kept.selected,
.syncStatusCard.paused.selected {
  background: #fef7e0;
  border-color: #fdd663;
}

.syncStatusCard.deleted.selected {
  background: #fce8e6;
  border-color: #f4c7c3;
}

.syncStatusCard.web.selected {
  background: #e8f0fe;
  border-color: #a8c7fa;
}

.summaryPanel > div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 16px;
  background: #f8fafd;
  border: 1px solid #edf0f4;
  border-radius: 14px;
}

.summaryPanel strong {
  color: #202124;
  font-size: 22px;
  line-height: 1;
}

.summaryPanel span {
  color: var(--muted);
  font-size: 14px;
}

.serverCard {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}

.serverCard > span {
  color: #fbbc04;
}

.serverCard div {
  min-width: 0;
}

.serverCard span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pathBar {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 10px;
  border-bottom: 1px solid #edf0f4;
}

.pathLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.breadcrumbs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.breadcrumbs button {
  min-height: 32px;
  max-width: 230px;
  padding: 0 12px;
  overflow: hidden;
  color: #1967d2;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs button:hover {
  background: #e8f0fe;
}

.crumbDivider {
  color: #9aa0a6;
}

.fileToolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.toolbarLeft,
.toolbarActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbarActions {
  justify-content: flex-end;
}

.selectedCount {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.softButton,
.blueButton,
.dangerButton {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.softButton {
  color: #3c4043;
  background: #ffffff;
  border: 1px solid #dadce0;
}

.softButton:hover {
  background: #f8fafd;
  border-color: #c7ccd4;
}

.blueButton {
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.blueButton:hover {
  background: #0842a0;
}

.dangerButton {
  color: #ffffff;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 8px;
}

.dangerButton:hover:not(:disabled) {
  background: #8c1d18;
}

.dangerTextButton {
  min-height: 38px;
  padding: 0 12px;
  color: var(--red);
  background: #ffffff;
  border: 1px solid #e2aaa6;
  border-radius: 8px;
  font-weight: 700;
}

.dangerTextButton:hover:not(:disabled) {
  background: #fce8e6;
}

.confirmDialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d5d9df;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(31, 31, 31, 0.24);
}

.confirmDialog::backdrop,
.trashDialog::backdrop {
  background: rgba(31, 31, 31, 0.48);
}

.confirmDialog form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.dialogHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialogHeader h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.dangerLabel {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.safeLabel {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.iconButton {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.iconButton:hover {
  background: var(--hover);
}

.dialogSummary,
.dangerNotice {
  margin: 0;
  line-height: 1.55;
}

.dangerNotice {
  padding: 12px 14px;
  color: #7a1b16;
  background: #fce8e6;
  border-left: 4px solid var(--red);
}

.confirmField {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.confirmField input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #9aa0a6;
  border-radius: 6px;
  outline: none;
}

.confirmField input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(11, 87, 208, 0.18);
}

.dialogActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.formError {
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.securityNote {
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trashDialog {
  width: min(780px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d5d9df;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(31, 31, 31, 0.24);
}

.trashDialog > section {
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto;
  gap: 18px;
  max-height: min(760px, calc(100vh - 32px));
  padding: 24px;
}

.trashDialog .dialogHeader p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.trashList {
  min-height: 160px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trashRow {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid #edf0f4;
}

.trashRow:last-child {
  border-bottom: 0;
}

.trashInfo {
  min-width: 0;
}

.trashInfo strong,
.trashInfo span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trashInfo strong {
  font-size: 14px;
}

.trashInfo span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.trashActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compactButton {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.trashEmpty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.errorText {
  color: var(--red);
}

.trashFooter {
  justify-content: space-between;
}

.fileTable {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 12px;
}

.fileTable.dragging {
  outline: 3px solid rgba(11, 87, 208, 0.28);
}

.tableHead,
.tableRow {
  min-width: 720px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px minmax(250px, 1fr) 100px 150px 120px 150px 84px;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}

.tableHead {
  color: var(--muted);
  background: #ffffff;
  border-bottom: 1px solid #edf0f4;
  font-size: 13px;
  font-weight: 700;
}

.tableRow {
  color: #202124;
  border-bottom: 1px solid #edf0f4;
  font-size: 14px;
}

.tableRow:last-child {
  border-bottom: 0;
}

.tableRow:hover {
  background: #f8fafd;
}

.rowCheck {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.fileName {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #202124;
  background: transparent;
  border: 0;
  text-align: left;
  font-weight: 600;
}

.fileName span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fileIcon {
  width: 22px;
  color: var(--blue);
  font-size: 17px;
  text-align: center;
}

.statusBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 146px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statusBadge.active {
  color: #137333;
  background: #e6f4ea;
}

.statusBadge.paused,
.statusBadge.kept {
  color: #b06000;
  background: #fef7e0;
}

.statusBadge.deleted {
  color: #b3261e;
  background: #fce8e6;
}

.statusBadge.web {
  color: #0b57d0;
  background: #e8f0fe;
}

.statusBadge.unknown {
  color: #5f6368;
  background: #f1f3f4;
}

.mutedCell {
  color: var(--muted);
}

.rowActions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.rowActions button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #3c4043;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.rowActions button:hover {
  background: #edf0f4;
}

.rowActions button[title="Xóa"]:hover {
  color: var(--red);
  background: #fce8e6;
}

.emptyState {
  min-height: 210px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 16px;
}

.activityPanel {
  margin-top: 14px;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 16px;
}

.activityHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.activityHeader h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
}

.activityHeader p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.activityList {
  max-height: 276px;
  overflow-y: auto;
  border-top: 1px solid #edf0f4;
}

.activityItem {
  display: grid;
  grid-template-columns: 10px minmax(170px, 220px) minmax(0, 1fr) 150px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 4px;
  border-bottom: 1px solid #edf0f4;
}

.activityItem:hover {
  background: #f8fafd;
}

.dot {
  width: 10px;
  height: 10px;
  background: #34a853;
  border-radius: 999px;
}

.dot.danger {
  background: #ea4335;
}

.activityItem strong,
.activityPath,
.activityTime {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activityItem strong {
  font-size: 13px;
}

.activityPath {
  color: #3c4043;
  font-size: 13px;
}

.activityTime,
.quiet {
  color: var(--muted);
  font-size: 12px;
}

.activityTime {
  text-align: right;
}

.activityList > .quiet {
  margin: 0;
  padding: 18px 4px 8px;
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .appShell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .summaryPanel,
  .syncOverview,
  .syncStatusCards {
    grid-template-columns: 1fr 1fr;
  }

  .serverCard {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .appShell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    padding: 10px 12px 2px;
    border-bottom: 1px solid #edf0f4;
  }

  .brand {
    height: 40px;
    margin: 0;
    padding: 0 4px;
  }

  .brand strong {
    font-size: 20px;
  }

  .driveLogo {
    transform: scale(0.82);
    transform-origin: left center;
  }

  .folderSection,
  .storageBox {
    display: none;
  }

  .content {
    padding: 10px;
  }

  .topbar,
  .syncOverview {
    grid-template-columns: 1fr;
  }

  .topActions {
    justify-content: space-between;
  }

  .drivePanel {
    padding: 18px 14px 20px;
  }

  .summaryPanel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .summaryPanel > div {
    min-height: 68px;
    padding: 10px;
  }

  .summaryPanel .serverCard {
    grid-column: 1 / -1;
  }

  .syncStatusCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drivePanel,
  .activityPanel {
    border-radius: 16px;
  }

  .activityPanel {
    padding: 16px 14px;
  }

  .activityHeader {
    align-items: flex-start;
  }

  .activityItem {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .activityPath {
    grid-column: 2 / -1;
  }

  .activityTime {
    grid-column: 3;
    grid-row: 1;
  }

  .fileToolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbarActions {
    justify-content: flex-start;
  }

  .confirmDialog form,
  .trashDialog > section {
    padding: 18px;
  }

  .trashRow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trashActions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .trashFooter {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .tableHead {
    display: none;
  }

  .tableRow {
    min-width: 0;
    grid-template-columns: 26px minmax(0, 1fr);
    padding: 12px;
  }

  .tableRow > span,
  .rowActions {
    grid-column: 2;
  }

  .tableRow > span:nth-child(3),
  .tableRow > span:nth-child(6) {
    display: none;
  }

  .rowActions {
    justify-content: flex-start;
  }
}

/* Version 19: search, preview, file management and diagnostics. */
.searchArea {
  min-width: 0;
  width: min(760px, 100%);
  position: relative;
}

.searchBox {
  width: 100%;
}

.searchBox #searchFilterButton {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 6px;
  color: #42526a;
}

.searchBox #searchFilterButton.active {
  color: #0b57d0;
  background: #dbe8fd;
}

.searchFilters {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 35, 70, 0.14);
}

.searchFilters[hidden] {
  display: none;
}

.searchFilters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #596780;
  font-size: 11px;
  font-weight: 700;
}

.searchFilters select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #172033;
  background: #fff;
}

.storageQuota {
  margin-top: 5px;
  color: #667085;
  font-size: 11px;
}

.previewDialog,
.previewDialog > section {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
}

.previewDialog > section {
  padding: 20px;
}

.previewHeader p {
  max-width: min(720px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.previewLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  min-height: 420px;
}

.previewCanvas {
  min-width: 0;
  min-height: 420px;
  max-height: min(680px, 68vh);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f4f7fb;
}

.previewCanvas img,
.previewCanvas video,
.previewCanvas iframe {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: 640px;
  object-fit: contain;
  border: 0;
}

.previewCanvas iframe {
  min-height: 560px;
  background: #fff;
}

.previewCanvas audio {
  width: min(520px, 100%);
}

.previewCanvas pre {
  width: 100%;
  min-height: 100%;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #172033;
  font: 13px/1.55 Consolas, monospace;
}

.previewEmpty {
  color: var(--muted);
  text-align: center;
}

.fileDetails {
  min-width: 0;
}

.fileDetails dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.fileDetails dl > div {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.fileDetails dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.fileDetails dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #172033;
}

.previewActions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.previewActions button {
  width: 100%;
}

.versionsDialog > section,
.diagnosticsDialog > section {
  width: min(760px, calc(100vw - 32px));
}

.versionsList,
.diagnosticsList {
  max-height: min(520px, 60vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.versionRow {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.versionRow:last-child {
  border-bottom: 0;
}

.versionRow > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.versionRow span {
  color: var(--muted);
  font-size: 12px;
}

.versionActions {
  display: flex;
  gap: 8px;
}

.diagnosticsList > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.diagnosticsList > div:last-child {
  border-bottom: 0;
}

.diagnosticsList span {
  overflow-wrap: anywhere;
  color: #4b5870;
}

@media (max-width: 900px) {
  .searchFilters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .previewLayout {
    grid-template-columns: minmax(0, 1fr);
  }

  .previewCanvas {
    min-height: 320px;
  }

  .previewCanvas iframe {
    min-height: 440px;
  }
}

@media (max-width: 560px) {
  .searchFilters {
    position: fixed;
    top: 70px;
    left: 10px;
    right: 10px;
    grid-template-columns: minmax(0, 1fr);
  }

  .versionRow,
  .versionActions {
    align-items: stretch;
    flex-direction: column;
  }

  .diagnosticsList > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* Dashboard refresh */
:root {
  --blue: #1769e0;
  --blue-strong: #0f55bd;
  --blue-soft: #e8f1ff;
  --green: #16834a;
  --amber: #a65d00;
  --red: #b42318;
  --navy: #142033;
  --text: #263247;
  --muted: #68758a;
  --line: #dfe5ee;
  --line-soft: #ebeff5;
  --panel: #ffffff;
  --chrome: #f4f7fb;
  --hover: #f7f9fc;
  --shadow: 0 8px 24px rgba(24, 39, 75, 0.08);
}

body {
  min-width: 0;
  color: var(--text);
  background: var(--chrome);
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.2);
  outline-offset: 1px;
}

.appShell {
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 100vh;
  min-height: 0;
  padding: 18px 12px;
  overflow-y: auto;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.brand {
  height: 52px;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0 10px;
}

.brandText {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brandText strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 19px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brandText span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.driveLogo {
  flex: 0 0 34px;
  transform: scale(0.84);
  transform-origin: center;
}

.folderSection {
  margin-top: 0;
}

.folderSectionHeader {
  padding: 0 6px 10px 10px;
}

.folderSectionHeader strong {
  color: var(--navy);
  font-size: 13px;
}

.folderSectionHeader button,
.topActions button {
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

.folderTree {
  gap: 3px;
}

.folderNode {
  min-height: 40px;
  padding-right: 10px;
  padding-left: calc(10px + var(--level) * 14px);
  border-radius: 6px;
  font-size: 13px;
}

.folderNode.active {
  color: #0c4da2;
  background: var(--blue-soft);
}

.folderCount {
  font-size: 11px;
}

.storageBox {
  margin: 22px 10px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}

.storageHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.storageHeading > span {
  color: var(--muted);
}

.storageHeading strong {
  margin: 0;
  color: var(--navy);
  font-size: 12px;
}

.storageLine {
  height: 5px;
  margin-bottom: 10px;
  background: #e7ebf1;
}

.storageLine::before {
  background: var(--blue);
}

.content {
  min-width: 0;
  padding: 0 24px 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  grid-template-columns: minmax(300px, 720px) minmax(max-content, 1fr);
  min-height: 72px;
  gap: 16px;
  margin: 0;
  background: rgba(244, 247, 251, 0.96);
}

.searchBox {
  height: 42px;
  max-width: 720px;
  gap: 10px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.searchBox:focus-within {
  border-color: #8bb6f2;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.1);
}

.searchBox span {
  color: var(--muted);
  font-size: 22px;
}

.searchBox input {
  color: var(--text);
  font-size: 14px;
}

.topActions {
  gap: 8px;
}

.topActions .topTextButton {
  height: 34px;
  padding: 0 12px;
  border-color: var(--line);
  border-radius: 6px;
}

.syncState {
  min-width: 118px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cce8d6;
  border-radius: 6px;
  font-size: 12px;
}

.syncState.busy {
  border-color: #f0d6a6;
}

.syncState.error {
  border-color: #efc2bd;
}

.drivePanel {
  min-height: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.panelHeader {
  margin: 12px 0 16px;
}

h1 {
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 24px;
  font-weight: 750;
}

#folderDescription {
  color: var(--muted);
  font-size: 13px;
}

.summaryPanel {
  grid-template-columns: repeat(3, minmax(104px, 150px)) minmax(230px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.summaryPanel > div {
  min-height: 66px;
  gap: 5px;
  padding: 11px 14px;
  background: #ffffff;
  border-color: var(--line);
  border-radius: 8px;
}

.summaryPanel strong {
  color: var(--navy);
  font-size: 21px;
}

.summaryPanel span {
  font-size: 12px;
}

.serverCard {
  border-left: 4px solid #f7b500 !important;
}

.serverCard > span {
  display: none;
}

.serverCard strong {
  font-size: 15px;
}

.syncOverview {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #ffffff;
  border-color: var(--line);
  border-radius: 8px;
}

.syncOverviewTitle {
  gap: 3px;
}

.syncOverviewTitle strong {
  color: var(--navy);
  font-size: 14px;
}

.syncOverviewTitle span {
  font-size: 12px;
}

.syncStatusCards {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.syncStatusCard {
  width: 152px;
  min-height: 60px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 3px 10px;
  align-items: center;
  padding: 8px 10px;
  border-color: var(--line);
  border-radius: 7px;
}

.syncStatusCard span {
  min-height: 0;
  color: var(--text);
  font-size: 11px;
}

.syncStatusCard strong {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--navy);
  font-size: 20px;
}

.syncStatusCard small {
  grid-column: 1;
  font-size: 10px;
}

.syncStatusCard em {
  display: none;
}

.syncStatusCard:hover,
.syncStatusCard.selected {
  border-color: #9fc1ee;
  background: var(--blue-soft);
}

.workspaceGrid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.fileWorkspace,
.activityPanel {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pathBar {
  min-height: 45px;
  gap: 10px;
  margin: 0;
  padding: 0 14px;
  background: #fbfcfe;
  border-bottom-color: var(--line-soft);
}

.pathLabel {
  font-size: 11px;
}

.breadcrumbs button {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 13px;
}

.fileToolbar {
  min-height: 58px;
  margin: 0;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.toolbarActions {
  gap: 6px;
}

.selectedCount {
  font-size: 12px;
}

.softButton,
.blueButton,
.dangerButton,
.dangerTextButton {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 12px;
}

.softButton {
  color: var(--text);
  border-color: var(--line);
}

.blueButton {
  background: var(--blue);
  border-color: var(--blue);
}

.blueButton:hover {
  background: var(--blue-strong);
}

.dangerButton {
  background: #ffffff;
  color: var(--red);
  border-color: #efb7b1;
}

.dangerButton:hover:not(:disabled) {
  color: #ffffff;
  background: var(--red);
}

.fileTable {
  overflow-x: auto;
  border: 0;
  border-radius: 0;
}

.tableHead,
.tableRow {
  min-width: 680px;
  min-height: 46px;
  grid-template-columns: 26px minmax(170px, 1fr) 74px 120px 92px 126px 74px;
  gap: 8px;
  padding: 0 14px;
}

.tableHead {
  color: var(--muted);
  background: #fbfcfe;
  border-color: var(--line-soft);
  font-size: 11px;
  text-transform: uppercase;
}

.tableRow {
  color: var(--text);
  border-color: var(--line-soft);
  font-size: 13px;
}

.tableRow:hover {
  background: var(--hover);
}

.fileName {
  gap: 9px;
  color: var(--text);
}

.fileIcon {
  width: 20px;
  font-size: 16px;
}

.statusBadge {
  min-height: 24px;
  max-width: 118px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 10px;
}

.rowActions button {
  width: 30px;
  height: 30px;
  border-radius: 5px;
}

.emptyState {
  min-height: 260px;
  font-size: 14px;
}

.activityPanel {
  position: sticky;
  top: 86px;
  margin: 0;
  padding: 0;
}

.activityHeader {
  min-height: 66px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.activityHeader h2 {
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 750;
}

.activityHeader p {
  font-size: 11px;
}

.activityHeader .compactButton {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.activityList {
  max-height: 456px;
  overflow-y: auto;
  border-top: 0;
}

.activityItem {
  min-height: 52px;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 7px 12px;
  border-color: var(--line-soft);
}

.activityItem .dot {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
  margin-top: 4px;
}

.activityItem strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 11px;
}

.activityPath {
  grid-column: 2 / -1;
  grid-row: 2;
  font-size: 11px;
}

.activityTime {
  grid-column: 3;
  grid-row: 1;
  font-size: 10px;
}

.dot {
  width: 8px;
  height: 8px;
}

.activityList > .quiet {
  padding: 18px 14px;
}

.confirmDialog,
.trashDialog {
  border-color: var(--line);
  box-shadow: 0 18px 48px rgba(20, 32, 51, 0.24);
}

@media (max-width: 1180px) {
  .appShell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .summaryPanel {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }

  .serverCard {
    grid-column: 1 / -1;
  }

  .syncOverview {
    grid-template-columns: 1fr;
  }

  .workspaceGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .activityPanel {
    position: static;
  }

  .activityList {
    max-height: 260px;
  }
}

@media (max-width: 780px) {
  .appShell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    padding: 8px 10px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    height: 44px;
    margin: 0;
    padding: 0 4px;
  }

  .brandText strong {
    font-size: 17px;
  }

  .folderSection,
  .storageBox {
    display: none;
  }

  .content {
    padding: 0 10px 16px;
  }

  .topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 0 12px;
  }

  .topActions {
    justify-content: space-between;
  }

  .panelHeader {
    margin-top: 6px;
  }

  h1 {
    font-size: 22px;
  }

  .summaryPanel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .summaryPanel > div {
    min-height: 62px;
    padding: 9px;
  }

  .summaryPanel strong {
    font-size: 18px;
  }

  .summaryPanel span {
    font-size: 10px;
  }

  .summaryPanel .serverCard {
    grid-column: 1 / -1;
  }

  .syncOverview {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .syncStatusCards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .syncStatusCard {
    width: auto;
    min-width: 0;
  }

  .workspaceGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fileToolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbarActions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbarActions button {
    width: 100%;
  }

  .toolbarActions #uploadFileButton {
    grid-column: 1 / -1;
  }

  .tableHead {
    display: none;
  }

  .tableRow {
    min-width: 0;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 11px 10px;
  }

  .tableRow > .rowCheck {
    grid-column: 1;
    grid-row: 1;
  }

  .tableRow > .fileName {
    grid-column: 2;
    grid-row: 1;
  }

  .tableRow > span,
  .tableRow > .rowActions {
    grid-column: 2 / -1;
  }

  .tableRow > span:nth-child(3),
  .tableRow > span:nth-child(6) {
    display: none;
  }

  .rowActions {
    justify-content: flex-end;
  }

  .activityPanel {
    position: static;
  }

  .activityItem {
    min-height: 58px;
  }

  .confirmDialog form,
  .trashDialog > section {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .syncState {
    min-width: 108px;
  }

  .summaryPanel strong {
    font-size: 16px;
  }
}

/* Security, recovery and per-folder health additions. */
.topActions .topTextButton {
  width: auto;
  min-width: 76px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.versionBadge,
.roleBadge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #344054;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.roleBadge.admin {
  color: #137333;
  background: #e6f4ea;
  border-color: #cce8d6;
}

.roleBadge.device {
  color: #0c4da2;
  background: #e8f0fe;
  border-color: #c6dafc;
}

@media (max-width: 780px) {
  .topActions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .syncState {
    margin-left: auto;
  }
}

.folderMiniStatus.error,
.statusBadge.error {
  color: #a61b1b;
  background: #fde8e7;
}

.statusStack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.trashGroup {
  border-bottom: 1px solid var(--line);
}

.trashGroup:last-child {
  border-bottom: 0;
}

.trashGroupHeader {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 8px 14px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}

.trashGroup .trashRow {
  padding-left: 22px;
}

.devicesDialog > section {
  width: min(760px, calc(100vw - 32px));
}

.devicesList {
  max-height: min(520px, 62vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.deviceRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.deviceRow:last-child {
  border-bottom: 0;
}

.deviceInfo {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.deviceInfo strong,
.deviceInfo span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deviceInfo span {
  color: var(--muted);
  font-size: 13px;
}

.deviceState {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.deviceState.active {
  color: var(--green);
}

@media (max-width: 780px) {
  .trashGroupHeader,
  .deviceRow {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .trashGroupHeader .compactButton,
  .deviceRow .compactButton {
    width: 100%;
  }
}

.previewDialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 32, 51, 0.24);
}

.previewDialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.transferPanel {
  min-height: 104px;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #18864b;
  border-radius: 8px;
}

.transferPanel.idle {
  border-left-color: #98a2b3;
}

.transferTop {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.transferIdentity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.transferIdentity > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.transferIdentity strong,
.transferIdentity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transferIdentity strong {
  color: var(--navy);
  font-size: 14px;
}

.transferIdentity span {
  max-width: min(560px, 42vw);
  color: var(--muted);
  font-size: 12px;
}

.transferPulse {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #18864b;
  box-shadow: 0 0 0 4px rgba(24, 134, 75, 0.12);
}

.transferPanel.idle .transferPulse {
  background: #98a2b3;
  box-shadow: none;
}

.transferMetrics {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(116px, auto));
}

.transferMetrics > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 0 16px;
  border-left: 1px solid var(--line-soft);
}

.transferMetrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.transferMetrics strong {
  color: var(--navy);
  font-size: 16px;
  white-space: nowrap;
}

.transferProgressRow {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 48px 120px;
  align-items: center;
  gap: 10px;
}

.transferTrack {
  height: 9px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 5px;
}

.transferTrack > div {
  width: 0;
  height: 100%;
  background: #18864b;
  border-radius: inherit;
  transition: width 180ms ease;
}

.transferPanel.idle .transferTrack > div {
  background: #98a2b3;
}

.transferProgressRow > strong {
  color: var(--navy);
  font-size: 13px;
  text-align: right;
}

.transferProgressRow > span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .transferTop {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .transferIdentity span {
    max-width: calc(100vw - 80px);
  }

  .transferMetrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .transferMetrics > div:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .transferPanel {
    padding: 12px;
  }

  .transferMetrics > div {
    padding: 0 8px;
  }

  .transferMetrics strong {
    font-size: 13px;
  }

  .transferMetrics span {
    font-size: 9px;
  }

  .transferProgressRow {
    grid-template-columns: minmax(80px, 1fr) 42px;
  }

  .transferProgressRow > span {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Distinct, stable file-type marks for the Drive table, tree and trash. */
.fileIcon {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: #344054;
  background: #eef1f5;
  border: 1px solid #d6dce5;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.fileIcon.kind-folder {
  color: transparent;
  background: transparent;
  border-color: transparent;
}

.fileIcon.kind-folder::before,
.fileIcon.kind-folder::after {
  content: "";
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.fileIcon.kind-folder::before {
  left: 2px;
  top: 7px;
  width: 24px;
  height: 18px;
  background: #f7bf24;
  border: 1px solid #d99800;
  border-radius: 3px;
}

.fileIcon.kind-folder::after {
  left: 4px;
  top: 3px;
  width: 11px;
  height: 7px;
  background: #ffd45c;
  border: 1px solid #d99800;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.fileIcon.kind-image {
  color: #066a72;
  background: #dff5f2;
  border-color: #91d9d1;
}

.fileIcon.kind-pdf {
  color: #b42318;
  background: #fee4e2;
  border-color: #f5aaa4;
}

.fileIcon.kind-video {
  color: #6941c6;
  background: #eee9ff;
  border-color: #cbbcf8;
}

.fileIcon.kind-audio {
  color: #9c2a68;
  background: #fce7f3;
  border-color: #eda4ca;
}

.fileIcon.kind-spreadsheet {
  color: #087443;
  background: #e2f6ea;
  border-color: #93d8ac;
}

.fileIcon.kind-document {
  color: #175cd3;
  background: #e5efff;
  border-color: #9fc0f6;
}

.fileIcon.kind-presentation {
  color: #a33a11;
  background: #ffead5;
  border-color: #f6b980;
}

.fileIcon.kind-archive {
  color: #854a0e;
  background: #fff3d6;
  border-color: #e8c169;
}

.fileIcon.kind-code {
  color: #ffffff;
  background: #334155;
  border-color: #1e293b;
}

.fileIcon.kind-database {
  color: #713b9f;
  background: #f2e8fb;
  border-color: #c9a9e6;
}

.fileIcon.kind-executable {
  color: #344054;
  background: #e7e9ed;
  border-color: #aeb6c2;
}

.fileIcon.kind-session {
  color: #075985;
  background: #e0f2fe;
  border-color: #8ecded;
}

.fileIcon.kind-text {
  color: #475467;
  background: #f2f4f7;
  border-color: #cbd1da;
}

.fileIcon.kind-file {
  color: #475467;
  background: #f7f8fa;
  border-color: #cfd5de;
  font-size: 7px;
}

.treeHomeIcon {
  width: 28px;
  color: #475467;
  font-size: 18px;
  text-align: center;
}

.trashRow {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

@media (max-width: 720px) {
  .trashRow {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .trashActions {
    grid-column: 2;
  }
}
