:root {
  color: #111;
  background: #fff;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  color: #111;
}

button,
input {
  font: inherit;
}

button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  color: #111;
}

button:hover {
  border-color: #111;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.summary {
  color: #6b6b6b;
  font-size: 14px;
  white-space: nowrap;
}

.upload {
  display: grid;
  grid-template-columns: 1fr 132px auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.file-picker {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px dashed #cfcfcf;
  border-radius: 8px;
  cursor: pointer;
  color: #555;
}

.file-picker:hover {
  border-color: #111;
}

.file-picker input {
  display: none;
}

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

.password-input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  outline: none;
}

.password-input:focus {
  border-color: #111;
}

.primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.danger:hover {
  border-color: #b42318;
  color: #b42318;
}

.status {
  min-height: 22px;
  margin: 12px 0 22px;
  color: #555;
  font-size: 14px;
}

.tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.search {
  width: min(320px, 100%);
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  outline: none;
}

.search:focus {
  border-color: #111;
}

.file-list {
  border-top: 1px solid #e8e8e8;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #e8e8e8;
}

.file-title {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.file-meta {
  margin-top: 4px;
  color: #777;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.empty {
  padding: 44px 0;
  color: #777;
  text-align: center;
}

@media (max-width: 680px) {
  body {
    width: min(100% - 24px, 920px);
    padding: 24px 0;
  }

  .topbar,
  .tools,
  .file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .tools {
    display: flex;
  }

  .summary {
    white-space: normal;
  }

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

  .actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}
