* {
  box-sizing: border-box;
}

.dropit {
  min-height: 100vh;
  background: var(--dark-bg);
  color: var(--text-primary);
  padding: 1rem;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.dropit-intro,
.upload-box,
.files-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem;
}

.dropit-intro h3,
.upload-box h2,
.files-box h2 {
  margin: 0 0 0.75rem;
}

.dropit-intro ol {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-secondary);
  display: grid;
  gap: 0.25rem;
}

#uploadForm {
  display: grid;
  gap: 0.75rem;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  min-height: 132px;
  border: 1px dashed rgba(108, 77, 255, 0.7);
  border-radius: 12px;
  background: rgba(108, 77, 255, 0.1);
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--luma-cyan, #2de2e6);
  background: rgba(45, 226, 230, 0.12);
}

.drop-zone__title {
  font-weight: 700;
}

.drop-zone__sub {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.selected-file {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn--primary {
  background: linear-gradient(135deg, #6c4dff, #9b5cff);
  color: #fff;
}

.progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6c4dff, #2de2e6);
  transition: width 0.2s linear;
}

.upload-result {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.upload-result__line {
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.upload-result a {
  word-break: break-all;
  color: #4da3ff;
}

.files-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.stat-card {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.stat-card span {
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card strong {
  font-size: 1rem;
}

.files-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.bulk-select-all {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.selection-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-right: auto;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-radius: 9px;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost--danger {
  border-color: rgba(255, 77, 109, 0.6);
  color: #ff4d6d;
}

.files-toolbar input,
.files-toolbar select {
  width: 100%;
  min-width: 0;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.58rem 0.7rem;
}

.files-list {
  display: grid;
  gap: 0.6rem;
}

.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.file-item.expired {
  border-color: rgba(255, 176, 32, 0.5);
}

.file-item.deleted {
  border-color: rgba(255, 77, 109, 0.5);
  opacity: 0.85;
}

.file-main {
  min-width: 0;
}

.file-title-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.file-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip {
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.73rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.file-chip--active {
  color: #3ddc84;
  border-color: rgba(61, 220, 132, 0.5);
}

.file-chip--expired {
  color: #ffb020;
  border-color: rgba(255, 176, 32, 0.5);
}

.file-chip--deleted {
  color: #ff4d6d;
  border-color: rgba(255, 77, 109, 0.5);
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 0.45rem;
}

.file-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.file-actions button,
.file-actions .btn-link,
.upload-result .btn-copy {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-radius: 9px;
  padding: 0.42rem 0.65rem;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.82rem;
}

.file-actions .btn-link {
  display: inline-flex;
  align-items: center;
}

.file-actions .btn-copy,
.upload-result .btn-copy {
  border-color: rgba(77, 163, 255, 0.6);
  color: #4da3ff;
}

.file-actions .btn-delete {
  border-color: rgba(255, 77, 109, 0.6);
  color: #ff4d6d;
}

.file-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
}

.hidden {
  display: none !important;
}

@media (max-width: 880px) {
  .files-toolbar {
    grid-template-columns: 1fr;
  }

  .selection-info {
    margin-right: 0;
    width: 100%;
  }

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

  .file-actions {
    justify-content: flex-start;
  }
}
