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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

body:not(.authenticated) .shell {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

button,
input,
select {
  font: inherit;
}

button {
  background: #ffb5a0;
  border: 0;
  border-radius: 8px;
  color: #512315;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 0 16px;
}

button.secondary,
.tabs button {
  background: #282a2c;
  color: #e2e2e5;
}

.tabs button.active {
  background: #ffb5a0;
  color: #512315;
}

input,
select {
  background: #0c0e10;
  border: 1px solid #52433f;
  border-radius: 8px;
  color: #e2e2e5;
  min-height: 48px;
  outline: none;
  padding: 0 16px;
  width: 100%;
}

input[type="checkbox"] {
  accent-color: #ffb5a0;
  min-height: auto;
  width: auto;
}

input[type="file"] {
  align-content: center;
}

input:focus,
select:focus {
  border-color: #ffb5a0;
  box-shadow: 0 0 0 3px rgba(255, 181, 160, 0.24);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 38px;
}

h2 {
  font-size: 24px;
  line-height: 32px;
}

.shell {
  margin: 0 auto;
  max-width: 1280px;
  padding: 32px;
}

.auth-gate {
  align-items: center;
  background: rgba(18, 20, 22, 0.9);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.auth-gate.hidden {
  display: none;
}

.auth-panel {
  background: #1e2022;
  border: 1px solid #52433f;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

.nav {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.micro {
  color: #ffb5a0;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 16px;
}

.panel,
.card {
  background: #1e2022;
  border: 1px solid #52433f;
  border-radius: 8px;
  padding: 24px;
}

.hero {
  display: grid;
  gap: 16px;
}

.heading,
.search-row,
.upload-row,
.settings-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-row {
  border-top: 1px solid #52433f;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto;
  margin-top: 18px;
  padding-top: 18px;
}

.settings-row label {
  color: #d7c2bc;
  display: grid;
  font-size: 14px;
  gap: 6px;
}

.options-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.options-row label {
  align-items: center;
  color: #d7c2bc;
  display: flex;
  font-size: 14px;
  gap: 8px;
}

.options-row select {
  min-height: 36px;
  min-width: 160px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.list {
  display: grid;
  gap: 10px;
}

.card {
  background: #282a2c;
  overflow-wrap: anywhere;
}

.card h3 {
  margin: 0 0 8px;
}

.meta {
  color: #d7c2bc;
  font-size: 14px;
}

.file-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.file-list li {
  align-items: center;
  border-top: 1px solid #3a3332;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  padding-top: 8px;
}

.file-list span {
  color: #d7c2bc;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.progress {
  background: #0c0e10;
  border-radius: 999px;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
}

.progress span {
  background: #ffb5a0;
  display: block;
  height: 100%;
}

@media (max-width: 720px) {
  .shell {
    padding: 20px;
  }

  .nav,
  .heading,
  .search-row,
  .upload-row,
  .settings-row,
  .file-list li {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .nav {
    display: grid;
  }
}
