.remote-desktop-controls {
  --remote-tool-size: clamp(42px, 5.5dvh, 50px);
  --remote-tool-color: rgba(241, 246, 255, 0.94);
  position: absolute;
  z-index: 34;
  inset: 0;
  pointer-events: none;
}

.remote-desktop-controls[hidden],
.remote-desktop-controls [hidden],
.remote-desktop-external-fullscreen[hidden] {
  display: none !important;
}

.remote-desktop-icon,
.remote-desktop-external-fullscreen {
  position: relative;
  display: inline-grid;
  width: var(--remote-tool-size, 46px);
  min-width: var(--remote-tool-size, 46px);
  height: var(--remote-tool-size, 46px);
  min-height: var(--remote-tool-size, 46px);
  place-items: center;
  padding: 0;
  border: 1px solid rgba(151, 175, 244, 0.18);
  border-radius: 13px;
  color: var(--remote-tool-color, rgba(241, 246, 255, 0.94));
  background: rgba(6, 12, 27, 0.34);
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.16);
  opacity: 0.66;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  touch-action: manipulation;
  pointer-events: auto;
  transition: opacity 120ms ease, background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.remote-desktop-icon svg,
.remote-desktop-external-fullscreen svg,
.remote-desktop-quick-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.remote-desktop-icon:hover,
.remote-desktop-icon:focus-visible,
.remote-desktop-icon:active,
.remote-desktop-external-fullscreen:hover,
.remote-desktop-external-fullscreen:focus-visible,
.remote-desktop-external-fullscreen:active {
  opacity: 1;
  border-color: rgba(120, 151, 255, 0.68);
  background: rgba(18, 31, 67, 0.82);
  outline: none;
}

.remote-desktop-icon:active,
.remote-desktop-external-fullscreen:active { transform: scale(0.94); }
.remote-desktop-icon:disabled { opacity: 0.24; pointer-events: none; }

.remote-desktop-rail {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(143, 165, 232, 0.12);
  border-radius: 16px;
  background: rgba(5, 10, 24, 0.17);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  transform: translateY(-50%);
}

.remote-desktop-rail--left { left: max(7px, env(safe-area-inset-left)); }
.remote-desktop-rail--right { right: max(7px, env(safe-area-inset-right)); flex-direction: row-reverse; }
.remote-desktop-rail-tools { display: flex; flex-direction: column; gap: 9px; }

.remote-desktop-rail-collapse {
  width: 24px;
  min-width: 24px;
  height: 34px;
  min-height: 34px;
  border-radius: 9px;
}
.remote-desktop-rail-drag {
  width: 28px;
  min-width: 28px;
  height: 42px;
  min-height: 42px;
  border-radius: 11px;
}
.remote-desktop-rail-collapse svg,
.remote-desktop-rail-drag svg { width: 18px; height: 18px; }
.remote-desktop-rail.is-collapsed { padding: 3px; background: rgba(5, 10, 24, 0.1); }
.remote-desktop-rail.is-collapsed .remote-desktop-rail-tools,
.remote-desktop-rail.is-collapsed .remote-desktop-volume { display: none; }
.remote-desktop-rail.is-collapsed .remote-desktop-rail-collapse {
  width: 30px;
  min-width: 30px;
  height: 34px;
  min-height: 34px;
}
.remote-desktop-rail--left.is-collapsed .remote-desktop-rail-collapse svg,
.remote-desktop-rail--right.is-collapsed .remote-desktop-rail-collapse svg { transform: rotate(180deg); }

.remote-desktop-position-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.remote-desktop-position-handle:active { cursor: grabbing; }
.remote-desktop-rail.is-user-positioned,
.remote-desktop-quickbar.is-user-positioned {
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}
.remote-desktop-rail.is-dragging,
.remote-desktop-quickbar.is-dragging {
  cursor: grabbing;
  transition: none;
  transform: translate3d(
    calc(-50% + var(--remote-control-drag-x, 0px)),
    calc(-50% + var(--remote-control-drag-y, 0px)),
    0
  );
  will-change: transform;
}

.remote-desktop-icon-value {
  position: absolute;
  right: 3px;
  bottom: 2px;
  min-width: 16px;
  padding: 1px 3px;
  border-radius: 6px;
  color: #fff;
  background: rgba(35, 71, 176, 0.88);
  font: 700 0.58rem/1.2 system-ui, sans-serif;
  text-align: center;
}
.remote-desktop-icon-value--wide { right: 1px; min-width: 23px; font-size: 0.5rem; }

.remote-desktop-loss {
  display: grid;
  width: var(--remote-tool-size);
  height: var(--remote-tool-size);
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--loss-color, #77839e) 48%, transparent);
  border-radius: 13px;
  color: var(--loss-color, #98a4bd);
  background: rgba(6, 12, 27, 0.34);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--loss-color, #77839e) 8%, transparent);
  font: 800 0.82rem/1 system-ui, sans-serif;
  opacity: 0.78;
  pointer-events: auto;
}

.remote-desktop-icon.is-active {
  opacity: 1;
  color: #d9d3ff;
  border-color: rgba(151, 113, 255, 0.72);
  background: rgba(87, 46, 171, 0.72);
  box-shadow: 0 0 24px rgba(113, 70, 225, 0.35);
}
.remote-desktop-icon--danger { color: rgba(255, 207, 216, 0.94); }
.remote-desktop-icon--danger:hover,
.remote-desktop-icon--danger:focus-visible { border-color: rgba(255, 91, 122, 0.72); background: rgba(115, 25, 45, 0.76); }

.remote-desktop-volume {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(246px, calc(100vw - 90px));
  padding: 8px;
  border: 1px solid rgba(143, 165, 232, 0.22);
  border-radius: 15px;
  background: rgba(6, 12, 27, 0.76);
  box-shadow: 0 15px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(-50%);
  pointer-events: auto;
}
.remote-desktop-volume input[type="range"] { min-width: 0; flex: 1; accent-color: #6b7cff; touch-action: none; }
.remote-desktop-volume output { width: 26px; color: rgba(239, 243, 255, 0.9); font: 700 0.7rem/1 system-ui, sans-serif; text-align: center; }

.remote-desktop-hide-all,
.remote-desktop-show-all {
  position: absolute;
  top: max(7px, env(safe-area-inset-top));
  right: max(7px, env(safe-area-inset-right));
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 50%;
}
.remote-desktop-show-all { position: fixed; z-index: 36; top: 50%; right: max(4px, env(safe-area-inset-right)); opacity: 0.38; transform: translateY(-50%); }
.remote-desktop-show-all:active { transform: translateY(-50%) scale(0.94); }
.remote-desktop-controls.is-tools-hidden .remote-desktop-rail,
.remote-desktop-controls.is-tools-hidden .remote-desktop-hide-all,
.remote-desktop-controls.is-tools-hidden .remote-desktop-quickbar { display: none; }

.remote-desktop-quickbar {
  --remote-quick-cell: clamp(44px, 11vw, 52px);
  position: absolute;
  z-index: 3;
  bottom: max(7px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, var(--remote-quick-cell));
  grid-auto-rows: minmax(46px, auto);
  width: max-content;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(143, 165, 232, 0.16);
  border-radius: 11px;
  background: rgba(5, 10, 24, 0.34);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  pointer-events: auto;
}
.remote-desktop-quickbar--left { left: max(7px, env(safe-area-inset-left)); }
.remote-desktop-quickbar--right { right: max(7px, env(safe-area-inset-right)); }
.remote-desktop-quickbar.is-collapsed {
  grid-template-columns: repeat(2, 36px);
  grid-auto-rows: 40px;
  padding: 3px;
}
.remote-desktop-quickbar.is-collapsed > .remote-desktop-quick-action:not(.remote-desktop-quickbar-utility) {
  display: none;
}
.remote-desktop-quickbar.is-collapsed .remote-desktop-quick-collapse svg { transform: rotate(180deg); }

.remote-desktop-quick-action {
  display: grid;
  width: var(--remote-quick-cell, 48px);
  min-width: 0;
  min-height: 46px;
  place-items: center;
  gap: 1px;
  padding: 5px 4px 4px;
  border: 1px solid rgba(151, 175, 244, 0.15);
  border-radius: 11px;
  color: rgba(245, 247, 255, 0.95);
  background: rgba(10, 18, 40, 0.43);
  font: 650 0.57rem/1.1 system-ui, sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.remote-desktop-quick-action svg { width: 20px; height: 20px; }
.remote-desktop-quick-action:hover,
.remote-desktop-quick-action:focus-visible,
.remote-desktop-quick-action:active {
  border-color: rgba(120, 151, 255, 0.7);
  color: #fff;
  background: rgba(31, 51, 104, 0.82);
  outline: none;
}
.remote-desktop-quick-action:active { transform: scale(0.95); }
.remote-desktop-quick-action:disabled { opacity: 0.28; pointer-events: none; }
.remote-desktop-quickbar-utility {
  width: var(--remote-quick-cell, 48px);
  min-width: 0;
  padding-inline: 2px;
}
.remote-desktop-quick-collapse {
  width: 30px;
  min-width: 30px;
  min-height: 36px;
  align-self: center;
  justify-self: center;
  padding: 0;
}
.remote-desktop-quickbar.is-collapsed .remote-desktop-quickbar-utility {
  width: 36px;
  min-height: 40px;
}
.remote-desktop-quickbar.is-collapsed .remote-desktop-quick-collapse {
  width: 28px;
  min-width: 28px;
  min-height: 34px;
}
.remote-desktop-quickbar.is-auto-scrolling {
  border-color: rgba(112, 221, 168, 0.55);
  box-shadow: 0 0 22px rgba(61, 203, 135, 0.2), 0 12px 34px rgba(0, 0, 0, 0.2);
}

.remote-desktop-keycap {
  display: grid;
  min-width: 26px;
  height: 20px;
  place-items: center;
  padding: 0 3px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font: 750 0.63rem/1 system-ui, sans-serif;
}

.remote-desktop-keyboard-input {
  position: fixed;
  z-index: -1;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 2px;
  padding: 0;
  border: 0;
  opacity: 0.01;
  font-size: 16px;
  pointer-events: none;
  transform: translateX(-50%);
}

.remote-desktop-toast {
  position: absolute;
  z-index: 4;
  right: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  max-width: min(520px, calc(100% - 30px));
  margin: 0;
  padding: 9px 13px;
  border: 1px solid rgba(142, 165, 232, 0.25);
  border-radius: 12px;
  color: #f4f6ff;
  background: rgba(6, 12, 28, 0.78);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.32);
  font: 600 0.76rem/1.35 system-ui, sans-serif;
  text-align: center;
  transform: translateX(50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}
.remote-desktop-toast[data-tone="error"] { border-color: rgba(255, 90, 120, 0.5); background: rgba(78, 14, 30, 0.86); }

.remote-file-manager {
  width: min(1180px, calc(100vw - 36px));
  max-width: none;
  height: min(760px, calc(100dvh - 36px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(119, 145, 228, 0.34);
  border-radius: 24px;
  color: #eef2ff;
  background: rgba(5, 10, 26, 0.96);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.62), inset 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: auto;
}
.remote-file-manager::backdrop {
  background: rgba(1, 4, 14, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.remote-file-manager__shell {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  height: 100%;
  padding: 22px;
  background:
    radial-gradient(circle at 76% -15%, rgba(93, 55, 220, 0.25), transparent 40%),
    linear-gradient(145deg, rgba(11, 22, 51, 0.98), rgba(4, 9, 23, 0.98));
}
.remote-file-manager__header,
.remote-file-pane__heading,
.remote-file-transfer-queue__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.remote-file-manager__header { padding: 0 2px 18px; }
.remote-file-manager__header h2 { margin: 2px 0 4px; color: #fff; font: 750 clamp(1.3rem, 2.5vw, 1.8rem)/1.15 system-ui, sans-serif; }
.remote-file-manager__eyebrow { margin: 0; color: #829bff; font: 800 0.63rem/1 system-ui, sans-serif; letter-spacing: 0.16em; }
.remote-file-manager__status { margin: 0; color: #aab5d0; font: 500 0.78rem/1.35 system-ui, sans-serif; }
.remote-file-manager__status[data-tone="error"] { color: #ff9eb0; }
.remote-file-manager__icon-button {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  padding: 0 11px;
  border: 1px solid rgba(137, 162, 238, 0.22);
  border-radius: 12px;
  color: #e8edff;
  background: rgba(24, 38, 77, 0.62);
  font: 750 1rem/1 system-ui, sans-serif;
  touch-action: manipulation;
}
.remote-file-manager__icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.remote-file-manager__icon-button:hover,
.remote-file-manager__icon-button:focus-visible { border-color: #667ffc; background: rgba(46, 68, 137, 0.75); outline: none; }
.remote-file-manager__mobile-tabs { display: none; }
.remote-file-manager__panes {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
  gap: 14px;
}
.remote-file-pane {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding: 15px;
  border: 1px solid rgba(118, 143, 218, 0.19);
  border-radius: 18px;
  background: rgba(6, 14, 34, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}
.remote-file-pane__heading { min-height: 45px; }
.remote-file-pane__heading > div:first-child { display: flex; align-items: center; min-width: 0; gap: 10px; }
.remote-file-pane__heading strong,
.remote-file-pane__heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-file-pane__heading strong { color: #f7f8ff; font: 730 0.9rem/1.25 system-ui, sans-serif; }
.remote-file-pane__heading small { margin-top: 3px; color: #8d9ab8; font: 500 0.68rem/1.2 system-ui, sans-serif; }
.remote-file-pane__device-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(115, 146, 255, 0.3); border-radius: 11px; color: #89a4ff; background: rgba(45, 72, 157, 0.28); }
.remote-file-breadcrumbs {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  margin: 10px 0;
  padding: 4px 6px;
  overflow-x: auto;
  border: 1px solid rgba(118, 143, 218, 0.13);
  border-radius: 10px;
  background: rgba(1, 7, 19, 0.44);
  scrollbar-width: thin;
}
.remote-file-breadcrumbs button { flex: 0 0 auto; padding: 5px 7px; border: 0; border-radius: 7px; color: #b8c5e8; background: transparent; font: 600 0.68rem/1 system-ui, sans-serif; }
.remote-file-breadcrumbs button:hover,
.remote-file-breadcrumbs button:focus-visible { color: #fff; background: rgba(82, 108, 199, 0.34); outline: none; }
.remote-file-breadcrumbs span { color: #586582; font-size: 0.7rem; }
.remote-file-commandbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 7px 0; }
.remote-file-commandbar label { min-width: 0; }
.remote-file-commandbar input { width: 100%; min-height: 35px; padding: 0 10px; border: 1px solid rgba(115, 146, 244, 0.24); border-radius: 9px; color: #edf1ff; background: rgba(16, 28, 60, 0.72); font: 550 0.68rem/1 system-ui, sans-serif; }
.remote-file-commandbar > div { display: flex; gap: 5px; }
.remote-file-commandbar button { display: grid; width: 35px; height: 35px; place-items: center; padding: 0; border: 1px solid rgba(115, 146, 244, 0.26); border-radius: 9px; color: #ced9f8; background: rgba(35, 53, 103, 0.66); font-size: 0.95rem; }
.remote-file-commandbar button.danger { color: #ffb0bd; border-color: rgba(255, 93, 123, 0.25); }
.remote-file-commandbar button:disabled { opacity: 0.28; }
.remote-file-list-header,
.remote-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
}
.remote-file-list-header { min-height: 28px; padding: 0 10px 0 43px; color: #677590; font: 650 0.62rem/1 system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.07em; }
.remote-file-list-header span:last-child { text-align: right; }
.remote-file-browser {
  display: grid;
  min-height: 0;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
}
.remote-file-browser__content { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
.remote-file-places {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 3px;
  overflow: auto;
  padding: 5px;
  border: 1px solid rgba(118, 143, 218, 0.1);
  border-radius: 12px;
  background: rgba(1, 6, 17, 0.34);
  scrollbar-width: thin;
}
.remote-file-place {
  display: grid;
  width: 100%;
  min-height: 39px;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 0;
  border-radius: 9px;
  color: #aebbd8;
  background: transparent;
  text-align: left;
}
.remote-file-place:hover,
.remote-file-place:focus-visible { color: #fff; background: rgba(48, 70, 135, 0.3); outline: none; }
.remote-file-place[aria-current="location"] { color: #fff; background: linear-gradient(90deg, rgba(54, 92, 217, 0.44), rgba(89, 51, 194, 0.28)); }
.remote-file-place__icon { color: #809cff; font-size: 0.95rem; text-align: center; }
.remote-file-place > span:last-child { min-width: 0; }
.remote-file-place strong,
.remote-file-place small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-file-place strong { font: 620 0.67rem/1.15 system-ui, sans-serif; }
.remote-file-place small { margin-top: 2px; color: #71809f; font: 500 0.56rem/1.1 system-ui, sans-serif; }
.remote-file-list {
  min-height: 130px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(118, 143, 218, 0.1);
  border-radius: 12px;
  background: rgba(1, 6, 17, 0.42);
  scrollbar-width: thin;
}
.remote-file-row {
  width: 100%;
  min-height: 43px;
  grid-template-columns: 27px minmax(0, 1fr) 92px;
  gap: 8px;
  padding: 5px 10px;
  border: 0;
  border-bottom: 1px solid rgba(116, 139, 204, 0.075);
  border-radius: 0;
  color: #dbe3fa;
  background: transparent;
  text-align: left;
  touch-action: manipulation;
}
.remote-file-row:hover,
.remote-file-row:focus-visible { background: rgba(48, 70, 135, 0.3); outline: none; }
.remote-file-row.is-selected { color: #fff; background: linear-gradient(90deg, rgba(54, 92, 217, 0.46), rgba(89, 51, 194, 0.32)); box-shadow: inset 2px 0 #6f8eff; }
.remote-file-row__icon { color: #7796ff; font-size: 1rem; text-align: center; }
.remote-file-row[data-kind="directory"] .remote-file-row__icon { color: #b287ff; }
.remote-file-row__name { overflow: hidden; font: 570 0.75rem/1.2 system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.remote-file-row__size { color: #7f8dab; font: 530 0.66rem/1.2 system-ui, sans-serif; text-align: right; }
.remote-file-empty { display: grid; min-height: 145px; place-content: center; gap: 7px; padding: 20px; color: #8593b1; text-align: center; }
.remote-file-empty strong { color: #bdc8e2; font: 680 0.8rem/1.2 system-ui, sans-serif; }
.remote-file-empty small { max-width: 320px; font: 500 0.68rem/1.45 system-ui, sans-serif; }
.remote-file-manager__transfer-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; }
.remote-file-manager__transfer-actions button { display: grid; min-height: 58px; place-items: center; gap: 2px; padding: 7px; border: 1px solid rgba(116, 146, 244, 0.3); border-radius: 14px; color: #e8edff; background: linear-gradient(145deg, rgba(40, 75, 191, 0.72), rgba(94, 50, 183, 0.66)); touch-action: manipulation; }
.remote-file-manager__transfer-actions button span { font: 750 1.2rem/1 system-ui, sans-serif; }
.remote-file-manager__transfer-actions button small { font: 650 0.58rem/1 system-ui, sans-serif; }
.remote-file-manager__transfer-actions button:disabled { opacity: 0.24; }
.remote-file-drop-zone { display: grid; min-height: 0; place-content: center; justify-items: center; gap: 7px; margin-top: 10px; padding: 22px; border: 1px dashed rgba(111, 143, 245, 0.38); border-radius: 13px; color: #8795b5; background: rgba(24, 39, 83, 0.18); text-align: center; }
.remote-file-drop-zone.is-dragging { border-color: #7895ff; background: rgba(47, 76, 166, 0.3); }
.remote-file-drop-zone > span { color: #829cff; font-size: 2rem; }
.remote-file-drop-zone strong { color: #dce4fb; font: 690 0.85rem/1.2 system-ui, sans-serif; }
.remote-file-drop-zone p { max-width: 300px; margin: 0 0 4px; font: 500 0.68rem/1.45 system-ui, sans-serif; }
.remote-file-manager__primary,
.remote-file-manager__secondary { min-height: 38px; padding: 8px 13px; border: 1px solid rgba(115, 146, 244, 0.32); border-radius: 10px; color: #f0f3ff; background: rgba(42, 70, 160, 0.72); font: 650 0.7rem/1 system-ui, sans-serif; touch-action: manipulation; }
.remote-file-manager__secondary { margin-top: 8px; background: rgba(30, 43, 84, 0.64); }
.remote-file-manager__secondary--danger { color: #ffc0ca; border-color: rgba(255, 93, 123, 0.24); }
.remote-file-manager__primary:disabled,
.remote-file-manager__secondary:disabled { opacity: 0.3; }
.remote-file-transfer-queue { margin-top: 14px; padding: 11px 13px; border: 1px solid rgba(118, 143, 218, 0.16); border-radius: 14px; background: rgba(4, 11, 28, 0.65); }
.remote-file-transfer-queue__heading > div { min-width: 0; }
.remote-file-transfer-queue__heading > div:last-child { display: flex; gap: 7px; }
.remote-file-transfer-queue__heading strong,
.remote-file-transfer-queue__heading small { display: block; }
.remote-file-transfer-queue__heading strong { color: #e8edfc; font: 680 0.75rem/1.2 system-ui, sans-serif; }
.remote-file-transfer-queue__heading small { margin-top: 3px; color: #8d9ab6; font: 500 0.66rem/1.2 system-ui, sans-serif; }
.remote-file-transfer-queue .remote-file-manager__secondary { min-height: 32px; margin: 0; padding: 6px 9px; }
.remote-file-progress { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 9px; background: rgba(75, 93, 137, 0.25); }
.remote-file-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3977ff, #9b58f2); transition: width 120ms linear; }
.remote-file-queued-items { display: grid; max-height: 240px; gap: 7px; margin-top: 8px; overflow: auto; scrollbar-color: rgba(111, 139, 226, 0.52) transparent; }
.remote-file-transfer-item { display: grid; gap: 5px; padding: 9px 10px; border: 1px solid rgba(112, 139, 218, 0.16); border-radius: 10px; background: rgba(25, 38, 77, 0.38); }
.remote-file-transfer-item__header,
.remote-file-transfer-item__header > div,
.remote-file-transfer-item__metadata { display: flex; align-items: center; }
.remote-file-transfer-item__header { justify-content: space-between; gap: 10px; }
.remote-file-transfer-item__header > div { min-width: 0; gap: 7px; }
.remote-file-transfer-item__icon { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #cbd7ff; background: rgba(55, 89, 198, 0.38); font: 750 0.85rem/1 system-ui, sans-serif; }
.remote-file-transfer-item__header strong { min-width: 0; color: #e9eeff; font: 650 0.68rem/1.3 system-ui, sans-serif; overflow-wrap: anywhere; }
.remote-file-transfer-item__badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #aebde4; background: rgba(81, 101, 160, 0.25); font: 650 0.57rem/1 system-ui, sans-serif; }
.remote-file-transfer-item__target { color: #7f90b7; font: 520 0.58rem/1.35 system-ui, sans-serif; overflow-wrap: anywhere; }
.remote-file-transfer-item__metadata { justify-content: space-between; gap: 12px; color: #91a0c2; font: 540 0.58rem/1.2 system-ui, sans-serif; }
.remote-file-transfer-item__metadata span:last-child { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.remote-file-transfer-item__progress { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(75, 93, 137, 0.28); }
.remote-file-transfer-item__progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3977ff, #9b58f2); transition: width 120ms linear; }
.remote-file-transfer-item--complete { border-color: rgba(59, 207, 137, 0.2); background: rgba(22, 74, 61, 0.24); }
.remote-file-transfer-item--complete .remote-file-transfer-item__badge { color: #73e6ad; background: rgba(40, 178, 109, 0.16); }
.remote-file-transfer-item--complete .remote-file-transfer-item__progress i { background: linear-gradient(90deg, #25ae70, #6de2ad); }
.remote-file-transfer-item--failed,
.remote-file-transfer-item--cancelled { border-color: rgba(255, 91, 116, 0.22); background: rgba(91, 27, 48, 0.24); }
.remote-file-transfer-item--failed .remote-file-transfer-item__badge,
.remote-file-transfer-item--cancelled .remote-file-transfer-item__badge { color: #ff9daf; background: rgba(217, 54, 83, 0.17); }
.remote-file-manager__privacy { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 11px 0 0; color: #71809e; font: 520 0.62rem/1.3 system-ui, sans-serif; text-align: center; }
.remote-file-manager__privacy span { color: #61d99d; }

.remote-desktop-external-fullscreen { --remote-tool-size: 40px; margin: 8px auto 0; }
.hub-session-workspace[data-session-kind="desktop"] .remote-desktop-external-fullscreen:not([hidden]) { display: grid; }
.video-frame:fullscreen + .remote-desktop-external-fullscreen,
.video-frame.viewport-fullscreen + .remote-desktop-external-fullscreen { display: none !important; }

@media (max-width: 760px), (any-pointer: coarse) {
  .remote-desktop-controls { --remote-tool-size: 46px; }
  .remote-desktop-rail { gap: 7px; padding: 4px; border-radius: 14px; }
  .remote-desktop-rail--left { left: max(3px, env(safe-area-inset-left)); }
  .remote-desktop-rail--right { right: max(3px, env(safe-area-inset-right)); }
  .remote-desktop-icon { border-radius: 12px; opacity: 0.55; }
  .remote-desktop-rail-collapse { width: 22px; min-width: 22px; }
  .remote-desktop-rail-drag { width: 27px; min-width: 27px; }
  .remote-desktop-rail-tools { gap: 8px; }
  .remote-desktop-hide-all { width: 32px; min-width: 32px; height: 32px; min-height: 32px; opacity: 0.42; }
  .remote-desktop-quickbar {
    --remote-quick-cell: clamp(42px, 11.5vw, 49px);
    gap: 7px;
    padding: 4px;
    opacity: 0.78;
  }
  .remote-desktop-quick-action { min-height: 46px; }
  .remote-file-manager {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .remote-file-manager__shell { padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .remote-file-manager__header { padding: 0 2px 10px; }
  .remote-file-manager__header h2 { font-size: 1.25rem; }
  .remote-file-manager__eyebrow { font-size: 0.56rem; }
  .remote-file-manager__status { max-width: calc(100vw - 76px); font-size: 0.66rem; }
  .remote-file-manager__mobile-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 9px; padding: 4px; border-radius: 11px; background: rgba(4, 10, 25, 0.7); }
  .remote-file-manager__mobile-tabs button { min-height: 40px; border: 0; border-radius: 8px; color: #8491ad; background: transparent; font: 680 0.72rem/1 system-ui, sans-serif; }
  .remote-file-manager__mobile-tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, rgba(50, 89, 211, 0.72), rgba(100, 55, 190, 0.64)); }
  .remote-file-manager__panes { position: relative; display: block; }
  .remote-file-manager__panes[data-active-file-pane="remote"] .remote-file-pane--local,
  .remote-file-manager__panes[data-active-file-pane="local"] .remote-file-pane--remote { display: none; }
  .remote-file-pane { height: 100%; box-sizing: border-box; padding: 10px; border-radius: 14px; }
  .remote-file-manager__transfer-actions { position: absolute; z-index: 2; right: 8px; bottom: 8px; flex-direction: row; }
  .remote-file-manager__transfer-actions button { width: 58px; min-height: 50px; padding: 5px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38); }
  .remote-file-manager__panes[data-active-file-pane="remote"] #remoteFileUpload,
  .remote-file-manager__panes[data-active-file-pane="local"] #remoteFileDownload { display: none; }
  .remote-file-row { min-height: 48px; }
  .remote-file-browser { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .remote-file-places { flex-direction: row; min-height: 49px; max-height: 58px; overflow-x: auto; overflow-y: hidden; }
  .remote-file-place { width: auto; min-width: 104px; flex: 0 0 auto; }
  .remote-file-transfer-queue { margin-top: 9px; padding: 8px 10px; }
  .remote-file-manager__privacy { margin-top: 7px; font-size: 0.56rem; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .remote-desktop-controls { --remote-tool-size: 40px; }
  .remote-desktop-rail-tools { gap: 6px; }
  .remote-desktop-rail { padding: 3px; }
  .remote-desktop-icon svg { width: 19px; height: 19px; }
  .remote-desktop-quickbar { bottom: max(3px, env(safe-area-inset-bottom)); }
  .remote-desktop-quickbar { --remote-quick-cell: clamp(40px, 9.5vw, 46px); gap: 6px; }
  .remote-desktop-quick-action { min-height: 43px; padding-block: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .remote-desktop-controls * { transition-duration: 0.01ms !important; }
}
