:root {
  --files-bg: #f3f2ed;
  --files-bg-alt: #ecebe4;
  --files-surface: rgba(252, 251, 247, 0.94);
  --files-surface-strong: #ffffff;
  --files-surface-soft: #f4f3ee;
  --files-surface-muted: #efeee8;
  --files-border: rgba(40, 46, 62, 0.1);
  --files-border-strong: rgba(40, 46, 62, 0.16);
  --files-text: #171d2b;
  --files-text-soft: #6d7484;
  --files-text-muted: #8890a1;
  --files-accent: #2c55c7;
  --files-accent-strong: #203d92;
  --files-accent-soft: rgba(44, 85, 199, 0.08);
  --files-danger: #b64d46;
  --files-success: #2f7458;
  --files-warning: #b37a2a;
  --files-shadow-sm: 0 10px 24px rgba(18, 24, 38, 0.04);
  --files-shadow-md: 0 20px 48px rgba(18, 24, 38, 0.06);
  --files-radius-xl: 28px;
  --files-radius-lg: 24px;
  --files-radius-md: 18px;
  --files-radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "Karla", "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: var(--files-text);
  background: linear-gradient(180deg, #f7f6f1 0%, #f1f0ea 100%);
}

body.files-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(44, 85, 199, 0.08), transparent 26%),
    radial-gradient(circle at 86% 8%, rgba(32, 61, 146, 0.06), transparent 24%);
  opacity: 0.95;
}

button,
input,
a {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.files-shell {
  position: relative;
  width: min(1480px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.files-header,
.folder-sidebar,
.content-panel,
.modal-card,
.toast {
  position: relative;
  background: var(--files-surface);
  border: 1px solid var(--files-border);
  box-shadow: var(--files-shadow-md);
}

.files-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  border-radius: var(--files-radius-xl);
}

.header-copy {
  min-width: 0;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--files-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.files-header h1,
.modal-header h2,
.content-header h2 {
  margin: 0;
}

.files-header h1 {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.subtitle {
  margin: 12px 0 0;
  max-width: 620px;
  color: var(--files-text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.header-actions,
.panel-actions,
.player-toolbar,
.player-controls,
.file-card-actions,
.content-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: flex-start;
  padding: 5px;
  border-radius: 999px;
  background: rgba(244, 243, 238, 0.92);
  border: 1px solid rgba(40, 46, 62, 0.08);
}

.compact-button {
  min-height: 40px;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.folder-sidebar,
.content-panel {
  border-radius: var(--files-radius-xl);
}

.folder-sidebar {
  position: sticky;
  top: 22px;
  padding: 20px 16px 16px;
}

.content-panel {
  padding: 24px;
}

.search-field,
.field {
  display: grid;
  gap: 8px;
}

.search-field span,
.field span,
.existing-folders p,
.modal-note,
.content-path,
.sidebar-status,
.content-subtitle,
.file-card-meta,
.file-card-time,
.folder-nav-meta,
.player-status,
.player-empty {
  color: var(--files-text-soft);
}

.search-field span,
.field span,
.existing-folders p {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--files-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--files-text);
  font-size: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

input[type="text"]::placeholder,
input[type="file"]::placeholder {
  color: #9aa1af;
}

input[type="text"]:focus,
input[type="file"]:focus {
  outline: none;
  border-color: rgba(44, 85, 199, 0.3);
  box-shadow: 0 0 0 4px rgba(44, 85, 199, 0.08);
  background: #ffffff;
}

.primary-button,
.secondary-button,
.ghost-button,
.ghost-link,
.chip-button,
.action-button,
.icon-button,
.folder-nav-item,
.preview-button,
.empty-state-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.folder-nav-item,
.preview-button,
.empty-state-action,
.action-button {
  cursor: pointer;
}

.primary-button {
  padding: 10px 16px;
  background: #1e2432;
  color: #ffffff;
  border-color: #1e2432;
  box-shadow: 0 10px 22px rgba(18, 24, 38, 0.12);
}

.secondary-button,
.ghost-button,
.ghost-link,
.action-button,
.icon-button,
.chip-button,
.folder-nav-item,
.empty-state-action {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--files-border);
  color: var(--files-text);
}

.secondary-button {
  background: rgba(44, 85, 199, 0.06);
  border-color: rgba(44, 85, 199, 0.18);
  color: var(--files-accent-strong);
}

.ghost-link {
  display: inline-flex;
}

.chip-button.is-active {
  background: rgba(44, 85, 199, 0.08);
  border-color: rgba(44, 85, 199, 0.2);
  color: var(--files-accent-strong);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.ghost-link:hover,
.action-button:hover,
.icon-button:hover,
.chip-button:hover,
.folder-nav-item:hover,
.preview-button:hover,
.empty-state-action:hover {
  transform: translateY(-1px);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.ghost-link:hover,
.action-button:hover,
.icon-button:hover,
.chip-button:hover,
.empty-state-action:hover {
  box-shadow: var(--files-shadow-sm);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.icon-button:focus-visible,
.folder-nav-item:focus-visible,
.preview-button:focus-visible,
.action-button:focus-visible,
.empty-state-action:focus-visible,
.chip-button:focus-visible,
input[type="text"]:focus-visible,
input[type="file"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(44, 85, 199, 0.12);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sidebar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.stat-card {
  padding: 14px;
  border-radius: 20px;
  background: rgba(247, 241, 241, 0.9);
  border: 1px solid rgba(40, 46, 62, 0.08);
}

.stat-card strong {
  display: block;
  font-size: 22px;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--files-text-soft);
  font-size: 11px;
}

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

.folder-nav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 12px 12px calc(12px + var(--depth, 0) * 12px);
  border-radius: 18px;
  text-align: left;
}

.folder-nav-item.is-active {
  border-color: rgba(44, 85, 199, 0.18);
  background: rgba(244, 247, 255, 0.92);
  color: var(--files-accent-strong);
}

.folder-nav-item.is-active .folder-nav-count {
  background: rgba(44, 85, 199, 0.12);
  color: var(--files-accent-strong);
}

.folder-nav-main {
  min-width: 0;
}

.folder-nav-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-nav-meta {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.folder-nav-count {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(25, 31, 46, 0.05);
  color: var(--files-text-soft);
  font-size: 10px;
  font-weight: 700;
}

.folder-nav-empty {
  padding: 16px 14px;
  text-align: center;
  color: var(--files-text-soft);
  font-size: 12px;
  border: 1px dashed var(--files-border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.sidebar-status {
  margin: 18px 4px 0;
  font-size: 11px;
  line-height: 1.6;
}

.content-header {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(40, 46, 62, 0.08);
}

.content-path {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.content-header h2 {
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.content-subtitle {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.file-card,
.empty-state {
  border-radius: var(--files-radius-lg);
  border: 1px solid var(--files-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 246, 0.98));
  box-shadow: var(--files-shadow-sm);
}

.file-card {
  overflow: hidden;
  position: relative;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.file-card:hover {
  transform: translateY(-3px);
  border-color: rgba(44, 85, 199, 0.16);
  box-shadow: 0 18px 42px rgba(18, 24, 38, 0.08);
}

.preview-button {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: none;
  text-align: left;
}

.file-card-preview {
  --card-start: #f8f9fb;
  --card-end: #edf1f6;
  --card-glow: rgba(44, 85, 199, 0.12);
  position: relative;
  aspect-ratio: 1.42 / 1;
  padding: 4px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 16%, var(--card-glow), transparent 26%),
    linear-gradient(180deg, var(--card-start), var(--card-end));
  border-bottom: 1px solid rgba(40, 46, 62, 0.08);
}

.file-card-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(80, 92, 120, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 92, 120, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.42;
}

.file-card-preview::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(26, 33, 49, 0.04);
}

.preview-animation,
.preview-placeholder,
.preview-status {
  position: relative;
  z-index: 1;
}

.preview-animation {
  position: absolute;
  inset: 4px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 180ms ease,
    transform 220ms ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 250, 0.9)),
    linear-gradient(45deg, rgba(130, 142, 166, 0.05) 25%, transparent 25%, transparent 75%, rgba(130, 142, 166, 0.05) 75%, rgba(130, 142, 166, 0.05)),
    linear-gradient(45deg, rgba(130, 142, 166, 0.05) 25%, transparent 25%, transparent 75%, rgba(130, 142, 166, 0.05) 75%, rgba(130, 142, 166, 0.05));
  background-size: auto, 18px 18px, 18px 18px;
  background-position: center, 0 0, 9px 9px;
  box-shadow: inset 0 0 0 1px rgba(40, 46, 62, 0.08);
}

.preview-animation > * {
  width: 100%;
  height: 100%;
}

.preview-animation svg {
  width: 100% !important;
  height: 100% !important;
}

.preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    filter 180ms ease;
}

.preview-initials {
  display: inline-flex;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.88);
  color: #1d2536;
  box-shadow: 0 14px 34px rgba(22, 28, 40, 0.06);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.preview-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(252, 251, 247, 0.9);
  color: var(--files-text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(40, 46, 62, 0.08);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.file-card.has-preview .preview-animation {
  opacity: 1;
  transform: scale(1);
}

.file-card.has-preview .preview-placeholder {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}

.file-card.is-preview-loading .preview-status {
  color: var(--files-accent-strong);
  background: rgba(244, 247, 255, 0.96);
  border-color: rgba(44, 85, 199, 0.16);
}

.file-card.is-preview-loading .preview-placeholder {
  filter: saturate(0.86);
}

.file-card.is-preview-error .preview-status {
  color: var(--files-danger);
  background: rgba(255, 247, 246, 0.98);
  border-color: rgba(182, 77, 70, 0.18);
}

.file-card.is-preview-error .preview-placeholder {
  opacity: 1;
  transform: scale(1);
}

.file-card.is-preview-error .preview-animation {
  opacity: 0;
}

.file-card-body {
  padding: 16px;
}

.file-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-card-title {
  margin: 0;
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
  word-break: break-word;
}

.folder-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(25, 31, 46, 0.05);
  color: var(--files-text-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.file-card-time {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.file-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11px;
}

.meta-chip {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(25, 31, 46, 0.04);
  border: 1px solid rgba(40, 46, 62, 0.08);
  font-size: 10px;
}

.file-card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.action-button {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(25, 31, 46, 0.04);
  color: var(--files-text-soft);
  border-color: rgba(40, 46, 62, 0.08);
  font-size: 11px;
  font-weight: 600;
}

.action-button.edit {
  grid-column: 1 / -1;
  background: #1e2432;
  border-color: #1e2432;
  color: #ffffff;
}

.action-button.play {
  color: var(--files-accent);
  border-color: rgba(44, 85, 199, 0.14);
  background: rgba(44, 85, 199, 0.05);
}

.action-button.rename,
.action-button.move {
  color: var(--files-text-soft);
}

.action-button.delete {
  color: var(--files-danger);
  border-color: rgba(182, 77, 70, 0.16);
  background: rgba(182, 77, 70, 0.05);
}

.empty-state {
  padding: 34px 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.empty-state h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.empty-state p {
  margin: 14px auto 0;
  max-width: 420px;
  color: var(--files-text-soft);
  line-height: 1.72;
}

.empty-state-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 10px 16px;
  background: #1e2432;
  color: #ffffff;
  border-color: #1e2432;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-shell.hidden,
.player-empty.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 38, 0.36);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  padding: 24px;
  border-radius: 26px;
}

.modal-card-player {
  width: min(900px, calc(100vw - 28px));
}

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

.modal-note {
  margin: 14px 2px 0;
  font-size: 12px;
  line-height: 1.6;
}

.icon-button {
  min-height: 36px;
  padding: 9px 12px;
}

.existing-folders {
  margin-top: 18px;
}

.upload-dropzone {
  width: 100%;
  margin-top: 16px;
  padding: 22px 18px;
  border-radius: 22px;
  border: 1px dashed rgba(44, 85, 199, 0.18);
  background: linear-gradient(180deg, rgba(248, 249, 252, 0.96), rgba(242, 244, 248, 0.96));
  color: var(--files-text);
  text-align: left;
}

.upload-dropzone strong,
.upload-dropzone span {
  display: block;
}

.upload-dropzone strong {
  font-size: 14px;
}

.upload-dropzone span {
  margin-top: 6px;
  color: var(--files-text-soft);
  line-height: 1.6;
}

.upload-dropzone.is-dragover {
  border-color: rgba(44, 85, 199, 0.36);
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.98), rgba(236, 241, 253, 0.98));
  box-shadow: 0 0 0 5px rgba(44, 85, 199, 0.06);
}

.upload-task-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--files-border);
  background: rgba(247, 246, 241, 0.92);
}

.upload-task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.upload-task-header strong {
  display: block;
  font-size: 14px;
}

.upload-task-header p {
  margin: 8px 0 0;
  color: var(--files-text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.upload-task-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  margin-top: 16px;
  overflow: auto;
}

.upload-task-empty {
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px dashed var(--files-border-strong);
  color: var(--files-text-soft);
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.upload-task-item {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid var(--files-border);
  background: rgba(255, 255, 255, 0.9);
}

.upload-task-top,
.upload-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-task-name {
  min-width: 0;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.upload-task-meta {
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  color: var(--files-text-soft);
  font-size: 10px;
}

.upload-task-folder,
.upload-task-size,
.upload-task-message {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.upload-task-message {
  margin-top: 10px;
  color: var(--files-text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.upload-task-item.is-error .upload-task-message {
  color: var(--files-danger);
}

.upload-task-item.is-success .upload-task-message {
  color: var(--files-success);
}

.upload-task-status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid transparent;
}

.upload-task-status.pending {
  color: var(--files-text-soft);
  background: rgba(25, 31, 46, 0.05);
  border-color: rgba(40, 46, 62, 0.08);
}

.upload-task-status.uploading {
  color: var(--files-accent-strong);
  background: rgba(44, 85, 199, 0.08);
  border-color: rgba(44, 85, 199, 0.16);
}

.upload-task-status.success {
  color: var(--files-success);
  background: rgba(47, 116, 88, 0.08);
  border-color: rgba(47, 116, 88, 0.16);
}

.upload-task-status.error {
  color: var(--files-danger);
  background: rgba(182, 77, 70, 0.08);
  border-color: rgba(182, 77, 70, 0.16);
}

.player-toolbar {
  justify-content: space-between;
  margin-top: 18px;
}

.player-control-button {
  min-width: 90px;
}

.player-stage {
  margin-top: 16px;
  min-height: 420px;
  border-radius: 24px;
  border: 1px solid var(--files-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 246, 248, 0.98)),
    linear-gradient(45deg, rgba(130, 142, 166, 0.05) 25%, transparent 25%, transparent 75%, rgba(130, 142, 166, 0.05) 75%, rgba(130, 142, 166, 0.05)),
    linear-gradient(45deg, rgba(130, 142, 166, 0.05) 25%, transparent 25%, transparent 75%, rgba(130, 142, 166, 0.05) 75%, rgba(130, 142, 166, 0.05));
  background-size: auto, 32px 32px, 32px 32px;
  background-position: center, 0 0, 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-viewport {
  width: min(720px, calc(100vw - 110px));
  height: min(480px, calc(100vh - 250px));
}

.player-empty {
  padding: 0 24px;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(252, 251, 247, 0.96);
}

.toast.success {
  border-color: rgba(47, 116, 88, 0.2);
}

.toast.error {
  border-color: rgba(182, 77, 70, 0.2);
}

@media (max-width: 1160px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .folder-sidebar {
    position: static;
    order: 2;
  }

  .content-panel {
    order: 1;
  }
}

@media (max-width: 840px) {
  .files-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 16px;
  }

  .files-header,
  .content-panel,
  .folder-sidebar,
  .modal-card {
    padding: 18px;
    border-radius: 22px;
  }

  .files-header,
  .content-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    border-radius: 20px;
  }

  .upload-task-header,
  .upload-task-top,
  .player-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .action-button.delete {
    grid-column: 1 / -1;
  }

  .player-stage {
    min-height: 280px;
  }

  .player-viewport {
    width: calc(100vw - 78px);
    height: min(340px, calc(100vh - 250px));
  }
}
