/* BitDogLab device files: compact Linux-inspired window, without animations. */
.device-files-trigger {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: none;
}

.device-files-trigger:hover,
.device-files-trigger:focus-visible,
.device-files-trigger[aria-expanded="true"] {
  color: var(--bitdoglab-accent);
  background: rgba(255, 140, 0, 0.1);
  box-shadow: inset 0 -2px 0 var(--bitdoglab-accent), 0 0 12px rgba(255, 140, 0, 0.28);
  outline: none;
  transform: none;
}

#content_files.device-files-overlay {
  display: none;
  position: fixed;
  inset: 4rem 0 0;
  z-index: 3200;
  width: auto;
  height: auto;
  padding: 1.25rem;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  background: rgba(12, 8, 28, 0.54);
  opacity: 1;
  overflow: auto;
  transition: none;
}

#content_files.device-files-overlay.is-open {
  display: grid;
}

.device-files-window {
  position: relative;
  display: grid;
  grid-template-rows: 2.8rem 2.9rem minmax(0, 1fr);
  width: min(58rem, 92vw);
  height: min(35rem, calc(100vh - 6.5rem));
  min-height: 28rem;
  box-sizing: border-box;
  color: #f8f5ff;
  background: #151124;
  border: 1px solid rgba(183, 165, 122, 0.22);
  border-radius: 0.65rem;
  box-shadow: 0 22px 55px rgba(8, 4, 20, 0.58), 0 0 18px rgba(75, 46, 131, 0.32);
  overflow: hidden;
  outline: none;
  font-family: var(--font-secondary);
  transition: none;
}

.device-files-window button,
.device-files-window input {
  font: inherit;
  transition: none;
}

.device-files-window button:hover,
.device-files-window button:active {
  transform: none;
}

.device-files-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 0.65rem 0 0.85rem;
  background: var(--bitdoglab-dark);
  box-shadow: inset 0 -1px 0 rgba(183, 165, 122, 0.12);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.device-files-window.is-moving .device-files-titlebar {
  cursor: grabbing;
}

.device-files-title,
.device-files-title-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.55rem;
}

.device-files-title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.device-files-title-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 5px rgba(255, 140, 0, 0.5));
}

.device-files-window-button {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  color: #ded5ec;
  background: transparent;
  border: 0;
  border-radius: 0.38rem;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.device-files-window-button:hover,
.device-files-window-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.device-files-window-button.is-maximize {
  font-size: 1rem;
}

.device-files-window.is-maximized {
  border-radius: 0;
}

.device-files-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 1.15rem;
  height: 1.15rem;
  cursor: nwse-resize;
  touch-action: none;
}

.device-files-resize-handle::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid rgba(255, 140, 0, 0.72);
  border-bottom: 2px solid rgba(255, 140, 0, 0.72);
  box-shadow: 2px 2px 5px rgba(255, 140, 0, 0.18);
}

.device-files-window.is-maximized .device-files-resize-handle {
  display: none;
}

.device-files-connection {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #d6cde4;
  font-size: 0.73rem;
}

.device-files-connection::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--bitdoglab-error);
  box-shadow: 0 0 7px rgba(244, 67, 54, 0.7);
}

.device-files-connection.is-online::before {
  background: var(--bitdoglab-success);
  box-shadow: 0 0 7px rgba(76, 175, 80, 0.75);
}

.device-files-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0 0.8rem;
  color: #cdc5d9;
  background: #1b162d;
  box-shadow: inset 0 -1px 0 rgba(183, 165, 122, 0.1);
}

.device-files-tool,
.device-files-connect,
.device-files-action,
.device-files-prompt-actions button {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  color: #eee9f5;
  background: transparent;
  border: 0;
  border-radius: 0.38rem;
  cursor: pointer;
}

.device-files-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.device-files-tool.is-compact {
  justify-content: center;
  width: 2rem;
  padding: 0.35rem;
  font-size: 1rem;
}

.device-files-tool:disabled,
.device-files-path:disabled {
  color: #615968;
  cursor: default;
  opacity: 0.62;
}

.device-files-tool:disabled:hover,
.device-files-path:disabled:hover {
  background: transparent;
  box-shadow: none;
}

.device-files-path {
  flex: 0 1 8rem;
  min-width: 2.5rem;
  max-width: 10rem;
  height: 2rem;
  padding: 0 0.55rem;
  overflow: hidden;
  color: #d7cee3;
  background: rgba(75, 46, 131, 0.25);
  border: 0;
  border-radius: 0.38rem;
  cursor: pointer;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.7rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-files-path:hover,
.device-files-path:focus-visible {
  color: #fff;
  background: rgba(75, 46, 131, 0.5);
  box-shadow: 0 0 8px rgba(75, 46, 131, 0.35);
  outline: none;
  transform: none;
}

.device-files-tool:hover,
.device-files-tool:focus-visible,
.device-files-action:hover,
.device-files-action:focus-visible,
.device-files-prompt-actions button:hover,
.device-files-prompt-actions button:focus-visible {
  color: #fff;
  background: rgba(75, 46, 131, 0.55);
  box-shadow: 0 0 9px rgba(75, 46, 131, 0.45);
  outline: none;
}

.device-files-status {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #a9a0b8;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-files-status.is-success {
  color: #8fd695;
}

.device-files-status.is-error {
  color: #ff9b95;
}

.device-files-connect {
  color: var(--bitdoglab-accent);
  background: rgba(255, 140, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 140, 0, 0.35);
}

.device-files-connect:hover,
.device-files-connect:focus-visible {
  background: rgba(255, 140, 0, 0.15);
  box-shadow: inset 0 0 0 1px var(--bitdoglab-accent), 0 0 10px rgba(255, 140, 0, 0.25);
  outline: none;
}

.device-files-connect[hidden] {
  display: none;
}

.device-files-body {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  min-height: 0;
}

.device-files-sidebar {
  min-width: 0;
  min-height: 0;
  padding: 0.8rem 0.55rem;
  background: #1d1830;
  box-shadow: inset -1px 0 0 rgba(183, 165, 122, 0.1);
  overflow: hidden;
}

.device-files-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 1.8rem;
  padding: 0 0.55rem;
  color: #948aa4;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.device-files-count {
  display: grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.2rem;
  box-sizing: border-box;
  color: #dcd3e8;
  background: rgba(75, 46, 131, 0.62);
  border-radius: 0.7rem;
  letter-spacing: 0;
}

.device-files-list {
  height: calc(100% - 1.8rem);
  padding: 0.2rem;
  box-sizing: border-box;
  overflow: auto;
  scrollbar-color: var(--bitdoglab-primary) transparent;
  scrollbar-width: thin;
}

#content_files .device-files-list-message {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 1.25rem 0.65rem;
  color: #80768f;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.device-file-item {
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.35rem;
  margin: 0.12rem 0;
  padding: 0.35rem 0.55rem;
  box-sizing: border-box;
  color: #ddd6e7;
  background: transparent;
  border: 0;
  border-radius: 0.4rem;
  cursor: pointer;
  text-align: left;
}

.device-file-item:hover,
.device-file-item:focus-visible {
  color: #fff;
  background: rgba(75, 46, 131, 0.36);
  outline: none;
}

.device-file-item[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(75, 46, 131, 0.9), rgba(75, 46, 131, 0.42));
  box-shadow: inset 2px 0 0 var(--bitdoglab-accent), 0 0 10px rgba(75, 46, 131, 0.32);
}

.device-file-item.is-directory {
  color: #b7adc5;
}

.device-file-item-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  color: var(--bitdoglab-accent);
  text-align: center;
}

.device-file-icon {
  width: 1.18rem;
  height: 1.4rem;
  box-sizing: border-box;
  color: #a99fb8;
  background: rgba(169, 159, 184, 0.08);
  border: 1px solid currentColor;
  border-radius: 0.16rem;
  box-shadow: 0 0 6px rgba(169, 159, 184, 0.16);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.4rem;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1;
  text-shadow: none;
  clip-path: polygon(0 0, 68% 0, 100% 24%, 100% 100%, 0 100%);
}

.device-file-icon::after {
  content: "";
  position: absolute;
  top: 0.03rem;
  right: 0.02rem;
  width: 0.31rem;
  height: 0.31rem;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.device-file-icon.is-python {
  color: #55b6ff;
  background: rgba(85, 182, 255, 0.1);
  box-shadow: inset 0 -0.19rem 0 #ffd34e, 0 0 7px rgba(85, 182, 255, 0.32);
}

.device-file-icon.is-csv {
  color: #52d39b;
  background: rgba(82, 211, 155, 0.1);
  box-shadow: 0 0 7px rgba(82, 211, 155, 0.28);
}

.device-file-icon.is-text {
  color: #c9c4d1;
  background: rgba(201, 196, 209, 0.08);
}

.device-file-icon.is-json {
  color: #e9c55f;
  background: rgba(233, 197, 95, 0.1);
  box-shadow: 0 0 7px rgba(233, 197, 95, 0.24);
}

.device-file-icon.is-markdown {
  color: #8bbcff;
  background: rgba(139, 188, 255, 0.1);
}

.device-file-icon.is-xml {
  color: var(--bitdoglab-accent);
  background: rgba(255, 140, 0, 0.1);
}

.device-file-icon.is-javascript {
  color: #f5df4d;
  background: rgba(245, 223, 77, 0.1);
}

.device-file-icon.is-bipes {
  color: #be8cff;
  background: rgba(190, 140, 255, 0.11);
}

.device-file-item-icon.is-folder {
  width: 1.22rem;
  height: 0.82rem;
  margin-top: 0.18rem;
  background: #dca83e;
  border-radius: 0.13rem;
  box-shadow: 0 0 7px rgba(220, 168, 62, 0.3);
}

.device-file-item-icon.is-folder::before {
  content: "";
  position: absolute;
  top: -0.24rem;
  left: 0.08rem;
  width: 0.55rem;
  height: 0.3rem;
  background: #dca83e;
  border-radius: 0.13rem 0.13rem 0 0;
}

.device-file-item-name {
  overflow: hidden;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-file-item-size {
  color: #81778e;
  font-size: 0.65rem;
}

.device-files-preview {
  position: relative;
  display: grid;
  grid-template-rows: 2.8rem minmax(0, 1fr) 3.25rem;
  min-width: 0;
  min-height: 0;
  background: #12101d;
}

.device-files-preview-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  background: #171323;
  box-shadow: inset 0 -1px 0 rgba(183, 165, 122, 0.08);
}

.device-files-preview-icon {
  color: var(--bitdoglab-accent);
  text-shadow: 0 0 7px rgba(255, 140, 0, 0.45);
}

.device-files-preview-icon.device-file-icon {
  flex: 0 0 auto;
  text-shadow: none;
}

#content_file_name {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #eee9f5;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.79rem;
  font-weight: 650;
}

.device-files-csv-toggle[hidden] {
  display: none;
}

.device-files-csv-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  padding: 0.3rem 0.5rem;
  color: #d8f8fc;
  background: rgba(69, 223, 245, 0.07);
  border-radius: 0.35rem;
  box-shadow: inset 0 0 0 1px rgba(69, 223, 245, 0.22);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.device-files-csv-toggle:hover,
.device-files-csv-toggle:focus-within {
  background: rgba(69, 223, 245, 0.12);
  box-shadow: inset 0 0 0 1px rgba(69, 223, 245, 0.42), 0 0 8px rgba(69, 223, 245, 0.11);
}

.device-files-csv-toggle input {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
  accent-color: var(--device-neon-cyan);
  cursor: pointer;
}

.device-files-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #7e748d;
  text-align: center;
}

.device-files-empty > span {
  color: var(--bitdoglab-primary);
  font-size: 3rem;
  line-height: 1;
  text-shadow: 0 0 14px rgba(75, 46, 131, 0.65);
}

.device-files-empty strong {
  color: #bdb4c9;
  font-size: 0.9rem;
}

.device-files-empty small {
  font-size: 0.74rem;
}

.device-files-editor {
  display: none;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.device-files-preview.has-file .device-files-empty {
  display: none;
}

.device-files-preview.has-file:not(.has-csv) .device-files-editor {
  display: block;
}

.device-files-csv {
  display: none;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #251e3b;
}

.device-files-preview.has-csv .device-files-csv {
  display: grid;
}

.device-files-csv-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.2rem;
  padding: 0.4rem 0.8rem;
  box-sizing: border-box;
  color: #aaa0ba;
  background: #292140;
  box-shadow: inset 0 -1px 0 rgba(69, 223, 245, 0.12);
  font-size: 0.68rem;
}

.device-files-csv-summary strong {
  color: #dcd4e8;
  font-size: 0.72rem;
  white-space: nowrap;
}

.device-files-csv-summary span {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-files-csv-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  outline: none;
  scrollbar-color: rgba(155, 108, 255, 0.72) rgba(31, 25, 50, 0.72);
  scrollbar-width: thin;
}

.device-files-csv-scroll:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(69, 223, 245, 0.4);
}

.device-files-csv-table {
  width: 100%;
  min-width: max-content;
  color: #e7e0ee;
  background: #251e3b;
  border-spacing: 0;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.35;
}

.device-files-csv-table th,
.device-files-csv-table td {
  min-width: 7rem;
  max-width: 24rem;
  padding: 0.52rem 0.7rem;
  overflow: hidden;
  border-right: 1px solid rgba(155, 108, 255, 0.12);
  border-bottom: 1px solid rgba(155, 108, 255, 0.11);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-files-csv-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: #d8f8fc;
  background: #49316f;
  box-shadow: inset 0 -2px 0 rgba(69, 223, 245, 0.52), 0 2px 8px rgba(8, 4, 20, 0.24);
  font-weight: 700;
}

.device-files-csv-table tbody tr:nth-child(even) td {
  background: rgba(155, 108, 255, 0.045);
}

.device-files-csv-table tbody tr:hover td {
  background: rgba(69, 223, 245, 0.07);
}

.device-files-csv-table .device-files-csv-index {
  position: sticky;
  z-index: 1;
  left: 0;
  min-width: 3.2rem;
  width: 3.2rem;
  color: #ffc16f;
  background: #352651;
  box-shadow: inset -2px 0 0 rgba(255, 157, 46, 0.42);
  text-align: center;
  font-weight: 700;
}

.device-files-csv-table thead .device-files-csv-index {
  z-index: 3;
  color: #fff2dd;
  background: #5b337f;
  box-shadow: inset -2px -2px 0 rgba(255, 157, 46, 0.68);
}

.device-files-csv-empty {
  height: 8rem;
  color: #aaa0ba;
  text-align: center !important;
}

.device-files-editor .CodeMirror {
  width: 100%;
  height: 100%;
  color: #e8e2f0;
  background: #12101d;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.device-files-editor .CodeMirror-gutters {
  background: #171323;
  border: 0;
}

.device-files-editor .CodeMirror-linenumber {
  color: #665d73;
}

.device-files-editor .CodeMirror-cursor {
  border-left-color: var(--bitdoglab-accent);
}

.device-files-editor .cm-keyword,
.device-files-editor .cm-builtin {
  color: #b995ff;
}

.device-files-editor .cm-string,
.device-files-editor .cm-number {
  color: #ffb454;
}

.device-files-editor .cm-comment {
  color: #746b81;
}

.device-files-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 0 0.75rem;
  background: #171323;
  box-shadow: inset 0 1px 0 rgba(183, 165, 122, 0.08);
}

.device-files-action:disabled {
  color: #615968;
  cursor: default;
  opacity: 0.65;
}

.device-files-action:disabled:hover {
  background: transparent;
  box-shadow: none;
}

.device-files-action.is-danger:not(:disabled),
.device-files-prompt-actions .is-danger {
  color: #ff8b85;
}

.device-files-action.is-danger:not(:disabled):hover,
.device-files-prompt-actions .is-danger:hover {
  background: rgba(244, 67, 54, 0.13);
  box-shadow: 0 0 9px rgba(244, 67, 54, 0.2);
}

.device-files-prompt[hidden] {
  display: none;
}

.device-files-prompt {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(9, 6, 18, 0.72);
}

.device-files-prompt-card {
  width: min(22rem, 88%);
  padding: 1.25rem;
  box-sizing: border-box;
  color: #eee9f5;
  background: #211a35;
  border: 0;
  border-radius: 0.6rem;
  box-shadow: 0 16px 35px rgba(5, 2, 12, 0.55), 0 0 14px rgba(75, 46, 131, 0.35);
}

.device-files-prompt-card h2 {
  margin: 0.55rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.device-files-prompt-card p {
  margin: 0 0 1rem;
  color: #aaa0b8;
  font-size: 0.78rem;
  line-height: 1.45;
}

.device-files-prompt-card label {
  display: block;
  margin-bottom: 0.35rem;
  color: #aaa0b8;
  font-size: 0.72rem;
  font-weight: 650;
}

.device-files-prompt-card input,
.device-files-prompt-card select {
  width: 100%;
  height: 2.35rem;
  padding: 0 0.7rem;
  box-sizing: border-box;
  color: #fff;
  background: #151124;
  border: 0;
  border-radius: 0.4rem;
  box-shadow: inset 0 0 0 1px rgba(183, 165, 122, 0.25);
  outline: none;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.device-files-prompt-card input:focus,
.device-files-prompt-card select:focus {
  box-shadow: inset 0 0 0 1px var(--bitdoglab-accent), 0 0 9px rgba(255, 140, 0, 0.22);
}

.device-files-prompt-card select:disabled {
  color: #736a7f;
  cursor: wait;
}

.device-files-prompt-card select option {
  color: #eee9f5;
  background: #211a35;
}

.device-files-prompt-actions button:disabled {
  color: #665e70;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.device-files-prompt-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--bitdoglab-accent);
  background: rgba(255, 140, 0, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.18);
}

.device-files-prompt-icon.is-danger {
  color: #ff8b85;
  background: rgba(244, 67, 54, 0.1);
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.2);
}

.device-files-prompt-icon.is-folder {
  color: #e5b44e;
  background: rgba(229, 180, 78, 0.1);
  box-shadow: 0 0 10px rgba(229, 180, 78, 0.2);
}

.device-files-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 1rem;
}

.device-files-prompt-actions .is-primary {
  color: var(--bitdoglab-accent);
  background: rgba(255, 140, 0, 0.1);
}

.device-files-window.is-busy .device-files-tool,
.device-files-window.is-busy .device-files-action,
.device-files-window.is-busy .device-file-item {
  pointer-events: none;
  opacity: 0.6;
}

/* Subtle neon accents: modern contrast without adding visual noise. */
.device-files-trigger,
#content_files {
  --device-neon-violet: #9b6cff;
  --device-neon-cyan: #45dff5;
  --device-neon-orange: #ff9d2e;
}

.device-files-trigger:hover,
.device-files-trigger:focus-visible,
.device-files-trigger[aria-expanded="true"] {
  box-shadow:
    inset 0 -2px 0 var(--device-neon-orange),
    0 0 10px rgba(255, 157, 46, 0.24),
    0 0 16px rgba(155, 108, 255, 0.16);
}

#content_files.device-files-overlay {
  background:
    radial-gradient(circle at 18% 12%, rgba(155, 108, 255, 0.08), transparent 34%),
    radial-gradient(circle at 84% 82%, rgba(69, 223, 245, 0.045), transparent 32%),
    rgba(12, 8, 28, 0.57);
}

.device-files-window {
  background:
    linear-gradient(145deg, rgba(155, 108, 255, 0.055), transparent 38%),
    #241c39;
  border-color: rgba(155, 108, 255, 0.25);
  box-shadow:
    0 22px 55px rgba(8, 4, 20, 0.6),
    0 0 22px rgba(155, 108, 255, 0.15),
    0 0 1px rgba(69, 223, 245, 0.34);
}

.device-files-titlebar {
  position: relative;
  background: linear-gradient(90deg, #29184a 0%, #321b58 46%, #24163f 100%);
  box-shadow: inset 0 -1px 0 rgba(69, 223, 245, 0.14);
}

.device-files-titlebar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(69, 223, 245, 0.48), rgba(155, 108, 255, 0.18) 52%, rgba(255, 157, 46, 0.4));
}

.device-files-title-icon {
  filter: drop-shadow(0 0 6px rgba(255, 157, 46, 0.62));
}

.device-files-toolbar {
  background: linear-gradient(90deg, #30264b, #2b2244 60%, #271f3e);
  box-shadow: inset 0 -1px 0 rgba(155, 108, 255, 0.15);
}

.device-files-path {
  color: #bceef6;
  background: rgba(69, 223, 245, 0.055);
  box-shadow: inset 0 0 0 1px rgba(69, 223, 245, 0.13);
}

.device-files-path:hover,
.device-files-path:focus-visible {
  background: rgba(69, 223, 245, 0.1);
  box-shadow: inset 0 0 0 1px rgba(69, 223, 245, 0.32), 0 0 9px rgba(69, 223, 245, 0.12);
}

.device-files-sidebar {
  background: linear-gradient(180deg, #342951, #2d2448 72%);
  box-shadow: inset -1px 0 0 rgba(69, 223, 245, 0.1);
}

.device-file-item:hover,
.device-file-item:focus-visible {
  background: rgba(155, 108, 255, 0.16);
  box-shadow: inset 2px 0 0 rgba(69, 223, 245, 0.35);
}

.device-file-item[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(91, 49, 158, 0.9), rgba(49, 31, 81, 0.72));
  box-shadow:
    inset 2px 0 0 var(--device-neon-orange),
    0 0 11px rgba(155, 108, 255, 0.24);
}

.device-files-preview {
  background:
    radial-gradient(circle at 78% 18%, rgba(69, 223, 245, 0.045), transparent 34%),
    #251e3b;
}

.device-files-preview-heading,
.device-files-footer {
  background: linear-gradient(90deg, #2d2446, #292140);
  box-shadow: inset 0 -1px 0 rgba(155, 108, 255, 0.11);
}

.device-files-footer {
  box-shadow: inset 0 1px 0 rgba(69, 223, 245, 0.09);
}

.device-files-empty > span {
  color: var(--device-neon-violet);
  text-shadow: 0 0 13px rgba(155, 108, 255, 0.42), 0 0 22px rgba(69, 223, 245, 0.1);
}

.device-files-editor .CodeMirror-cursor {
  border-left-color: var(--device-neon-cyan);
  box-shadow: 0 0 5px rgba(69, 223, 245, 0.32);
}

.device-files-editor .CodeMirror {
  background: #251e3b;
}

.device-files-editor .CodeMirror-gutters {
  background: #2d2446;
}

.device-files-prompt-card {
  border: 1px solid rgba(155, 108, 255, 0.2);
  box-shadow: 0 16px 35px rgba(5, 2, 12, 0.58), 0 0 18px rgba(155, 108, 255, 0.18);
}

.device-files-prompt-card input:focus,
.device-files-prompt-card select:focus {
  box-shadow: inset 0 0 0 1px var(--device-neon-cyan), 0 0 9px rgba(69, 223, 245, 0.16);
}

.device-files-resize-handle::after {
  border-color: rgba(255, 157, 46, 0.86);
  box-shadow: 2px 2px 6px rgba(255, 157, 46, 0.24), 0 0 8px rgba(155, 108, 255, 0.12);
}

@media (max-width: 760px) {
  #content_files.device-files-overlay {
    padding: 0.55rem;
  }

  .device-files-window {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .device-files-body {
    grid-template-columns: 11.5rem minmax(0, 1fr);
  }

  .device-files-status {
    display: none;
  }
}

@media (max-width: 520px) {
  .device-files-body {
    grid-template-columns: 8.75rem minmax(0, 1fr);
  }

  .device-file-item-size,
  .device-files-connection {
    display: none;
  }

  .device-files-tool:not(.is-compact) > span:last-child {
    display: none;
  }

  .device-files-path {
    max-width: 4.5rem;
  }
}
