/* Cloud file manager: final layout layer loaded after the shared desktop/mobile styles. */

body[data-app-view="cloud"] {
  --cloud-blue: #2563eb;
  --cloud-blue-soft: #eef5ff;
  --cloud-green: #059669;
  --cloud-green-soft: #ecfdf5;
  --cloud-amber: #b45309;
  --cloud-amber-soft: #fff7ed;
  --cloud-violet: #7c3aed;
  --cloud-violet-soft: #f5f3ff;
  --cloud-border: #dbe5ef;
  --cloud-border-strong: #cbd9e7;
  --cloud-muted: #66788b;
  --cloud-panel: rgba(255, 255, 255, 0.9);
}

body[data-app-view="cloud"] .files-section {
  min-width: 0;
  padding: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 8px !important;
  background: var(--cloud-panel) !important;
  box-shadow: 0 12px 30px rgba(42, 79, 110, 0.08), inset 0 1px 0 #fff !important;
  backdrop-filter: blur(20px) saturate(120%);
}

body[data-app-view="cloud"] .files-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px !important;
  padding: 0 !important;
}

body[data-app-view="cloud"] .cloud-files-title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

body[data-app-view="cloud"] .cloud-files-title h3 {
  margin: 0;
  color: #15263a;
  font-size: 19px !important;
  line-height: 1.25;
  letter-spacing: 0;
}

body[data-app-view="cloud"] .cloud-files-title span {
  color: var(--cloud-muted);
  font-size: 12px;
  white-space: nowrap;
}

body[data-app-view="cloud"] .cloud-file-toolbar,
body[data-app-view="cloud"] .cloud-view-switch {
  display: flex;
  align-items: center;
}

body[data-app-view="cloud"] .cloud-file-toolbar {
  gap: 8px;
}

body[data-app-view="cloud"] .cloud-view-switch {
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--cloud-border);
  border-radius: 7px;
  background: #f3f7fb;
}

body[data-app-view="cloud"] .cloud-view-button,
body[data-app-view="cloud"] .cloud-refresh-button {
  display: grid;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: #6a7d91;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body[data-app-view="cloud"] .cloud-view-button {
  width: 32px;
  padding: 0;
}

body[data-app-view="cloud"] .cloud-view-button:hover,
body[data-app-view="cloud"] .cloud-view-button.active,
body[data-app-view="cloud"] .cloud-refresh-button:hover {
  color: var(--cloud-blue);
  background: #fff;
  box-shadow: 0 2px 7px rgba(37, 99, 235, 0.12);
}

body[data-app-view="cloud"] .cloud-view-button:active,
body[data-app-view="cloud"] .cloud-refresh-button:active {
  transform: translateY(1px);
}

body[data-app-view="cloud"] .cloud-view-button svg,
body[data-app-view="cloud"] .cloud-refresh-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-app-view="cloud"] .cloud-refresh-button {
  width: 34px;
  padding: 0;
  border: 1px solid var(--cloud-border);
  background: rgba(255, 255, 255, 0.82);
}

body[data-app-view="cloud"] .cloud-refresh-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body[data-app-view="cloud"] .cloud-file-controls {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

body[data-app-view="cloud"] .cloud-file-search {
  display: grid;
  min-width: 0;
  height: 38px;
  grid-template-columns: 18px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--cloud-border);
  border-radius: 7px;
  background: rgba(248, 251, 254, 0.94);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

body[data-app-view="cloud"] .cloud-file-search:focus-within {
  border-color: #8bb6ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body[data-app-view="cloud"] .cloud-file-search svg {
  width: 17px;
  height: 17px;
  color: #8293a5;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

body[data-app-view="cloud"] .cloud-file-search input {
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #172a3d;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

body[data-app-view="cloud"] .cloud-file-search input::placeholder {
  color: #8b9aac;
}

body[data-app-view="cloud"] #cloudFileSearchClear {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #6b7d8f;
  background: #e9eff5;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

body[data-app-view="cloud"] #cloudFileSearchClear.hidden {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

body[data-app-view="cloud"] .cloud-file-filters::-webkit-scrollbar {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-filters button {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #607286;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

body[data-app-view="cloud"] .cloud-file-filters button:hover {
  color: #23496f;
  background: #f2f6fa;
}

body[data-app-view="cloud"] .cloud-file-filters button.active {
  border-color: #bfd5ff;
  color: var(--cloud-blue);
  background: var(--cloud-blue-soft);
}

body[data-app-view="cloud"] .cloud-file-sort,
body[data-app-view="cloud"] .cloud-folder-filter {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--cloud-border);
  border-radius: 7px;
  color: var(--cloud-muted);
  background: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  white-space: nowrap;
}

body[data-app-view="cloud"] .cloud-file-sort select,
body[data-app-view="cloud"] .cloud-folder-filter select {
  max-width: 104px;
  height: 100%;
  padding: 0 18px 0 0;
  border: 0;
  outline: 0;
  color: #2f4357;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

body[data-app-view="cloud"] .cloud-folder-filter select {
  max-width: 128px;
}

body[data-app-view="cloud"] .cloud-file-taxonomy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  overflow: hidden;
}

body[data-app-view="cloud"] .cloud-folder-chip,
body[data-app-view="cloud"] .cloud-tag-chip {
  max-width: 120px;
  overflow: hidden;
  padding: 2px 6px;
  border-radius: 4px;
  color: #46627d;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #edf3f8;
}

body[data-app-view="cloud"] .cloud-tag-chip {
  color: #1264cf;
  background: #edf5ff;
}

body[data-app-view="cloud"] .cloud-selection-bar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #bad3ff;
  border-radius: 7px;
  color: #20476f;
  background: #f0f6ff;
  animation: cloud-selection-in 180ms ease both;
}

body[data-app-view="cloud"] .cloud-selection-bar.hidden {
  display: none;
}

body[data-app-view="cloud"] .cloud-selection-bar strong {
  font-size: 12px;
}

body[data-app-view="cloud"] .cloud-selection-bar > div {
  display: flex;
  gap: 5px;
}

body[data-app-view="cloud"] .cloud-selection-bar button {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #c9d9ea;
  border-radius: 5px;
  color: #31516f;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

body[data-app-view="cloud"] .cloud-selection-bar button:hover {
  border-color: #8cb5ee;
  color: var(--cloud-blue);
}

body[data-app-view="cloud"] .cloud-selection-bar button.danger {
  border-color: #fecaca;
  color: #dc2626;
}

body[data-app-view="cloud"] .cloud-selection-bar button:disabled {
  opacity: 0.5;
  cursor: wait;
}

body[data-app-view="cloud"] .cloud-selection-bar svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-app-view="cloud"] .cloud-list-columns,
body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card {
  display: grid;
  grid-template-columns: 28px minmax(220px, 1fr) 86px 124px 154px 76px;
  align-items: center;
  column-gap: 10px;
}

body[data-app-view="cloud"] .cloud-list-columns {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--cloud-border);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  color: #718296;
  background: #f6f9fc;
  font-size: 11px;
  font-weight: 650;
}

body[data-app-view="cloud"] .files-section:has(.cloud-file-list[data-view="grid"]) .cloud-list-columns {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="list"] {
  display: block;
  overflow: hidden;
  border: 1px solid var(--cloud-border);
  border-radius: 0 0 7px 7px;
  background: #fff;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card {
  min-height: 68px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #e8eef4;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  transition: background 150ms ease, box-shadow 150ms ease;
  animation: cloud-file-in 210ms ease both;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card:last-child {
  border-bottom: 0;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card:hover,
body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card:focus-visible,
body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card.context-open {
  z-index: 1;
  outline: 0;
  background: #f7faff;
  box-shadow: inset 3px 0 0 var(--cloud-blue);
  transform: none;
}

body[data-app-view="cloud"] .cloud-file-list .cloud-file-card.selected {
  background: #eef5ff;
  box-shadow: inset 3px 0 0 var(--cloud-blue);
}

body[data-app-view="cloud"] .cloud-file-select {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  cursor: pointer;
}

body[data-app-view="cloud"] .cloud-file-select input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body[data-app-view="cloud"] .cloud-file-select span {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #b9c8d7;
  border-radius: 4px;
  background: #fff;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

body[data-app-view="cloud"] .cloud-file-select input:checked + span {
  border-color: var(--cloud-blue);
  background: var(--cloud-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.11);
}

body[data-app-view="cloud"] .cloud-file-select input:checked + span::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: '';
  transform: translateY(-1px) rotate(-45deg);
}

body[data-app-view="cloud"] .cloud-file-select input:focus-visible + span {
  outline: 2px solid rgba(37, 99, 235, 0.34);
  outline-offset: 2px;
}

body[data-app-view="cloud"] .file-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

body[data-app-view="cloud"] .cloud-file-cover {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfE8f1;
  border-radius: 7px;
  background: #f2f6fb;
}

body[data-app-view="cloud"] .cloud-file-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

body[data-app-view="cloud"] .cloud-file-preview + .file-type {
  visibility: hidden;
}

body[data-app-view="cloud"] .file-type {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 0;
  color: var(--cloud-blue);
  background: var(--cloud-blue-soft);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

body[data-app-view="cloud"] .cloud-file-card[data-file-kind="image"] .file-type {
  color: #047857;
  background: #e8faf2;
}

body[data-app-view="cloud"] .cloud-file-card[data-file-kind="media"] .file-type {
  color: var(--cloud-violet);
  background: var(--cloud-violet-soft);
}

body[data-app-view="cloud"] .cloud-file-card[data-file-kind="archive"] .file-type {
  color: var(--cloud-amber);
  background: var(--cloud-amber-soft);
}

body[data-app-view="cloud"] .cloud-file-card[data-file-kind="other"] .file-type {
  color: #526477;
  background: #f1f5f9;
}

body[data-app-view="cloud"] .cloud-file-copy {
  min-width: 0;
}

body[data-app-view="cloud"] .cloud-file-copy strong {
  display: block;
  overflow: hidden;
  color: #17283b;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

body[data-app-view="cloud"] .cloud-file-copy small,
body[data-app-view="cloud"] .cloud-file-expiry small {
  display: block;
  margin-top: 3px;
  color: #8291a2;
  font-size: 10.5px;
  line-height: 1.3;
}

body[data-app-view="cloud"] .cloud-file-grid-meta,
body[data-app-view="cloud"] .cloud-file-mobile-meta {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-size {
  overflow: hidden;
  color: #526579;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

body[data-app-view="cloud"] .cloud-file-expiry strong {
  display: block;
  color: #35495e;
  font-size: 11.5px;
  font-weight: 650;
}

body[data-app-view="cloud"] .cloud-share-badge {
  display: inline-grid;
  width: max-content;
  min-height: 26px;
  grid-template-columns: 7px auto;
  align-items: center;
  column-gap: 6px;
  padding: 3px 8px;
  border: 1px solid #b7ead2;
  border-radius: 6px;
  color: #047857;
  background: var(--cloud-green-soft);
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

body[data-app-view="cloud"] .cloud-share-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

body[data-app-view="cloud"] .cloud-share-badge small {
  grid-column: 2;
  color: #4e8a73;
  font-size: 9px;
  font-weight: 600;
}

body[data-app-view="cloud"] .cloud-share-idle {
  color: #8a99a9;
  font-size: 11px;
}

body[data-app-view="cloud"] .cloud-file-action-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

body[data-app-view="cloud"] .file-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

body[data-app-view="cloud"] .file-actions .icon-button,
body[data-app-view="cloud"] .cloud-file-more {
  display: grid;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #66798d;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

body[data-app-view="cloud"] .file-actions .icon-button:hover,
body[data-app-view="cloud"] .cloud-file-more:hover,
body[data-app-view="cloud"] .cloud-file-card.context-open .cloud-file-more {
  border-color: #cad9e8;
  color: var(--cloud-blue);
  background: #f0f6ff;
  transform: none;
}

body[data-app-view="cloud"] .file-actions .icon-button svg,
body[data-app-view="cloud"] .cloud-file-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-app-view="cloud"] .file-actions .icon-button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body[data-app-view="cloud"] .file-actions .context-only {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-card .file-actions [data-action="share"] {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-more {
  opacity: 0.62;
}

body[data-app-view="cloud"] .cloud-file-card:hover .cloud-file-more,
body[data-app-view="cloud"] .cloud-file-card:focus-within .cloud-file-more,
body[data-app-view="cloud"] .cloud-file-card.context-open .cloud-file-more {
  opacity: 1;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 180px));
  align-items: stretch;
  justify-content: start;
  gap: 9px;
  border: 0;
  background: transparent;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 164px;
  flex-direction: column;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--cloud-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(42, 71, 98, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  animation: cloud-file-in 210ms ease both;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card:hover,
body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card:focus-visible,
body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card.context-open {
  outline: 0;
  border-color: #9bbcf0;
  box-shadow: 0 8px 18px rgba(44, 84, 121, 0.1);
  transform: translateY(-2px);
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-select {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .file-main {
  display: block;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-cover {
  width: 100%;
  height: 68px;
  margin-bottom: 8px;
  border-radius: 6px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .file-type {
  font-size: 10px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-copy strong {
  display: -webkit-box;
  min-height: 34px;
  padding-right: 24px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-copy small {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-grid-meta {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #788a9c;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] > .cloud-file-card > .cloud-file-size,
body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] > .cloud-file-card > .cloud-file-expiry,
body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .file-actions {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] > .cloud-file-card > .cloud-file-share {
  display: block;
  margin-top: auto;
  padding-top: 7px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-share-badge {
  position: static;
  display: inline-flex;
  min-height: 21px;
  padding: 2px 6px;
  border: 0;
  border-radius: 5px;
  font-size: 9px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-share-badge small,
body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-share-idle {
  display: none;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-action-cell {
  position: absolute;
  z-index: 4;
  top: 9px;
  right: 9px;
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-more {
  display: grid;
  border-color: rgba(205, 218, 231, 0.88);
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card:has(.cloud-share-badge)::after {
  display: none;
}

body[data-app-view="cloud"] .empty-files {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  padding: 24px;
  border: 1px dashed var(--cloud-border-strong);
  border-radius: 7px;
  color: var(--cloud-muted);
  background: rgba(248, 251, 254, 0.78);
  text-align: center;
}

body[data-app-view="cloud"] .empty-files.hidden {
  display: none;
}

body[data-app-view="cloud"] .empty-files > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #5d83b0;
  background: #edf4fb;
}

body[data-app-view="cloud"] .empty-files svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-app-view="cloud"] .empty-files strong {
  margin-top: 10px;
  color: #2c4157;
  font-size: 13px;
}

body[data-app-view="cloud"] .empty-files p {
  margin: 4px 0 0;
  font-size: 11px;
}

.cloud-file-context-scrim {
  position: fixed;
  z-index: 1890;
  inset: 0;
  background: rgba(15, 28, 43, 0.36);
  backdrop-filter: blur(2px);
  animation: cloud-scrim-in 160ms ease both;
}

.cloud-file-context-menu {
  position: fixed;
  z-index: 1900;
  display: grid;
  width: 200px;
  gap: 2px;
  padding: 6px;
  border: 1px solid #d5e0eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(21, 42, 63, 0.2);
  animation: cloud-menu-in 150ms ease both;
}

.cloud-context-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: -1px -1px 5px;
  padding: 8px;
  border-bottom: 1px solid #e5ecf3;
}

.cloud-context-title .file-type {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: #2563eb;
  background: #eef5ff;
  font: 800 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.cloud-context-title div {
  min-width: 0;
}

.cloud-context-title strong,
.cloud-context-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-context-title strong {
  color: #1b2c3e;
  font-size: 12px;
}

.cloud-context-title small {
  margin-top: 2px;
  color: #7a8b9c;
  font-size: 10px;
}

.cloud-file-context-menu .icon-button {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 5px !important;
  color: #334a60 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 650 !important;
  transform: none !important;
}

.cloud-file-context-menu .icon-button:hover,
.cloud-file-context-menu .icon-button:focus-visible {
  outline: 0;
  color: #1d5fd1 !important;
  background: #eef5ff !important;
}

.cloud-file-context-menu .icon-button.danger {
  margin-top: 4px;
  color: #dc2626 !important;
  box-shadow: inset 0 1px 0 #edf1f5 !important;
}

.cloud-file-context-menu .icon-button.danger::before {
  display: none !important;
}

.cloud-file-context-menu .icon-button.danger:hover {
  background: #fff1f2 !important;
}

.cloud-file-context-menu .icon-button svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cloud-file-context-menu .icon-button span {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: nowrap !important;
}

@media (max-width: 1180px) and (min-width: 761px) {
  body[data-app-view="cloud"] .cloud-file-controls {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) auto;
  }

  body[data-app-view="cloud"] .cloud-file-sort {
    display: none;
  }

  body[data-app-view="cloud"] .cloud-list-columns,
  body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card {
    grid-template-columns: 28px minmax(210px, 1fr) 82px 120px 76px;
  }

  body[data-app-view="cloud"] .cloud-list-columns span:nth-child(5),
  body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-share {
    display: none;
  }
}

@media (max-width: 760px) {
  body.cloud-action-sheet-open {
    overflow: hidden !important;
    touch-action: none;
  }

  body[data-app-view="cloud"] .cloud-dashboard {
    gap: 10px !important;
  }

  body[data-app-view="cloud"] .quota-card,
  body[data-app-view="cloud"] .cloud-dropzone,
  body[data-app-view="cloud"] .files-section {
    border-radius: 8px !important;
    box-shadow: 0 5px 16px rgba(35, 61, 88, 0.06) !important;
  }

  body[data-app-view="cloud"] .quota-card {
    min-height: 0 !important;
    padding: 14px !important;
  }

  body[data-app-view="cloud"] .quota-row {
    margin-bottom: 9px !important;
  }

  body[data-app-view="cloud"] .quota-row strong {
    font-size: 15px !important;
  }

  body[data-app-view="cloud"] .quota-track {
    height: 6px !important;
    margin-top: 0 !important;
  }

  body[data-app-view="cloud"] .quota-card small {
    margin-top: 8px !important;
    font-size: 10px !important;
  }

  body[data-app-view="cloud"] .cloud-dropzone {
    min-height: 80px !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    gap: 9px !important;
    padding: 12px !important;
  }

  body[data-app-view="cloud"] .cloud-upload-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 7px !important;
    font-size: 19px !important;
  }

  body[data-app-view="cloud"] .cloud-dropzone span strong {
    font-size: 13px !important;
  }

  body[data-app-view="cloud"] .cloud-dropzone span small {
    font-size: 9px !important;
  }

  body[data-app-view="cloud"] .choose-button {
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
  }

  body[data-app-view="cloud"] .files-section {
    padding: 12px !important;
  }

  body[data-app-view="cloud"] .files-heading {
    margin-bottom: 9px !important;
  }

  body[data-app-view="cloud"] .cloud-files-title h3 {
    font-size: 16px !important;
  }

  body[data-app-view="cloud"] .cloud-files-title span {
    font-size: 10px;
  }

  body[data-app-view="cloud"] .cloud-view-switch {
    display: flex !important;
  }

  body[data-app-view="cloud"] .cloud-refresh-button {
    width: 32px;
    height: 30px;
  }

  body[data-app-view="cloud"] .cloud-file-controls {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
  }

  body[data-app-view="cloud"] .cloud-file-search {
    height: 36px;
  }

  body[data-app-view="cloud"] .cloud-file-sort {
    height: 36px;
    padding-left: 8px;
  }

  body[data-app-view="cloud"] .cloud-folder-filter {
    grid-column: 1 / -1;
    justify-self: start;
    height: 32px;
  }

  body[data-app-view="cloud"] .cloud-folder-filter > span {
    display: inline;
  }

  body[data-app-view="cloud"] .cloud-file-sort > span {
    display: none;
  }

  body[data-app-view="cloud"] .cloud-file-sort select {
    max-width: 86px;
    font-size: 11px;
  }

  body[data-app-view="cloud"] .cloud-file-filters {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0 0 2px;
  }

  body[data-app-view="cloud"] .cloud-file-filters button {
    min-height: 29px;
    padding: 0 9px;
    border-radius: 5px;
    font-size: 10.5px;
  }

  body[data-app-view="cloud"] .cloud-selection-bar,
  body[data-app-view="cloud"] .cloud-list-columns,
  body[data-app-view="cloud"] .cloud-file-select {
    display: none !important;
  }

  body[data-app-view="cloud"] .cloud-file-list,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"],
  body[data-app-view="cloud"] .cloud-file-list[data-view="list"] {
    display: block !important;
    overflow: hidden !important;
    border: 1px solid var(--cloud-border) !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-card,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card,
  body[data-app-view="cloud"] .cloud-file-list[data-view="list"] .cloud-file-card {
    position: relative !important;
    display: grid !important;
    min-width: 0 !important;
    min-height: 68px !important;
    grid-template-columns: minmax(0, 1fr) 34px !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 8px 8px 9px !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid #e8eef4 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-card:last-child {
    border-bottom: 0 !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-card:active {
    background: #f4f8fc !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .file-main,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .file-main {
    display: flex !important;
    min-width: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 9px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-cover,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-cover {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    margin: 0 !important;
    border-radius: 6px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-copy {
    min-width: 0 !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-copy strong,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-copy strong {
    display: block !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-copy small,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-copy small {
    display: none !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-mobile-meta,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-mobile-meta {
    display: block !important;
    margin-top: 5px !important;
    overflow: hidden !important;
    color: #788a9c !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 9.5px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list > .cloud-file-card > .cloud-file-size,
  body[data-app-view="cloud"] .cloud-file-list > .cloud-file-card > .cloud-file-expiry,
  body[data-app-view="cloud"] .cloud-file-list > .cloud-file-card > .cloud-file-share,
  body[data-app-view="cloud"] .cloud-file-list .file-actions {
    display: none !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-action-cell,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-action-cell {
    position: static !important;
    display: flex !important;
    grid-column: 2 !important;
    justify-content: flex-end !important;
  }

  body[data-app-view="cloud"] .cloud-file-list .cloud-file-more,
  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-more {
    position: static !important;
    display: grid !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 6px !important;
    opacity: 1 !important;
    color: #607489 !important;
    background: #f8fafc !important;
    backdrop-filter: none !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card::after {
    display: none !important;
  }

  body[data-app-view="cloud"] .empty-files {
    min-height: 126px;
    padding: 18px;
  }

  .cloud-file-context-menu.mobile-sheet {
    position: fixed !important;
    z-index: 1900 !important;
    right: 10px !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    left: 10px !important;
    top: auto !important;
    width: auto !important;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    padding: 8px !important;
    border-radius: 8px !important;
    animation: cloud-sheet-in 220ms cubic-bezier(.2,.8,.2,1) both;
  }

  .cloud-file-context-menu.mobile-sheet .cloud-context-title {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 9px;
  }

  .cloud-file-context-menu.mobile-sheet .cloud-context-title .file-type {
    width: 40px;
    height: 40px;
  }

  .cloud-file-context-menu.mobile-sheet .icon-button {
    height: 43px !important;
    min-height: 43px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-card {
    display: flex !important;
    min-height: 150px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 7px !important;
    overflow: hidden !important;
    border: 1px solid var(--cloud-border) !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .file-main {
    display: block !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-cover {
    width: 100% !important;
    height: 58px !important;
    margin: 0 0 7px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-copy strong {
    display: -webkit-box !important;
    min-height: 32px !important;
    padding-right: 23px !important;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-grid-meta {
    display: block !important;
    margin-top: 3px !important;
    font-size: 9px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-mobile-meta {
    display: none !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-file-action-cell {
    position: absolute !important;
    top: 7px !important;
    right: 7px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] > .cloud-file-card > .cloud-file-share {
    display: block !important;
    margin-top: auto !important;
    padding-top: 5px !important;
  }

  body[data-app-view="cloud"] .cloud-file-list[data-view="grid"] .cloud-share-badge {
    display: inline-flex !important;
  }
}

@media (max-width: 370px) {
  body[data-app-view="cloud"] .cloud-file-sort select {
    max-width: 72px;
  }

  body[data-app-view="cloud"] .cloud-file-filters button {
    padding: 0 8px;
  }

}

@media (prefers-reduced-motion: reduce) {
  body[data-app-view="cloud"] .cloud-file-card,
  body[data-app-view="cloud"] .cloud-selection-bar,
  .cloud-file-context-menu,
  .cloud-file-context-scrim {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes cloud-file-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cloud-selection-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cloud-menu-in {
  from { opacity: 0; transform: translateY(-3px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cloud-sheet-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cloud-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Share policy dialog */
.cloud-share-modal-scrim,
.cloud-organize-modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(13, 28, 48, 0.34);
  backdrop-filter: blur(8px);
}

.cloud-share-modal,
.cloud-organize-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 140;
  width: min(500px, calc(100vw - 28px));
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  color: #14283d;
  background: rgba(247, 252, 255, 0.92);
  box-shadow: 0 28px 80px rgba(16, 42, 70, 0.26), inset 0 1px 0 #fff;
  backdrop-filter: blur(28px) saturate(150%);
}

.cloud-share-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(99, 137, 173, 0.17);
}

.cloud-share-modal-head h2 {
  margin: 2px 0 3px;
  font-size: 22px;
  letter-spacing: 0;
}

.cloud-share-modal-head p {
  max-width: 390px;
  overflow: hidden;
  color: #6f8295;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-share-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px;
}

.cloud-share-modal-body label > span,
.cloud-share-modal-body label > small {
  display: block;
}

.cloud-share-modal-body label > span {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}

.cloud-share-modal-body label > small {
  margin-top: 6px;
  color: #71869b;
  font-size: 11px;
}

.cloud-share-modal-body input[type="text"],
.cloud-share-modal-body input[type="number"],
.cloud-share-modal-body input:not([type]) {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #c9d9e8;
  border-radius: 10px;
  color: #14283d;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 2px rgba(41, 72, 104, 0.04);
}

.cloud-share-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid #d4e1ec;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
}

.cloud-share-switch input {
  width: 18px;
  height: 18px;
  accent-color: #176ee8;
}

.cloud-share-switch span strong,
.cloud-share-switch span small {
  display: block;
}

.cloud-share-switch span small {
  margin-top: 3px;
  color: #71869b;
  font-size: 11px;
}

.cloud-share-note {
  color: #637a90;
  font-size: 11px;
  line-height: 1.55;
}

.cloud-share-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
}

@media (max-width: 640px) {
  .cloud-share-modal,
  .cloud-organize-modal {
    top: auto;
    bottom: max(76px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    transform: translateX(-50%);
    border-radius: 16px;
  }

  .cloud-share-modal-head,
  .cloud-share-modal-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .cloud-share-modal-actions {
    padding: 12px 16px 16px;
  }

  .cloud-share-modal-actions .button {
    flex: 1;
  }
}
