:root {
  color-scheme: dark;
  --bg: #101316;
  --panel: #171c20;
  --panel-strong: #20272d;
  --text: #f4f7f8;
  --muted: #9cabb4;
  --line: #303941;
  --accent: #35c2a1;
  --accent-dark: #19977d;
  --danger: #e85f5f;
  --warn: #f2b84b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
}

button {
  min-height: 44px;
  padding: 0 18px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
}

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

button.primary {
  background: var(--accent);
  color: #06110e;
  border-color: var(--accent);
  font-weight: 700;
}

button.ghost {
  background: transparent;
}

button.danger {
  color: #fff;
  border-color: rgba(232, 95, 95, 0.55);
}

.shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 32px 18px;
}

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

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar p {
  color: var(--muted);
  margin-top: 8px;
}

.upload-panel,
.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.upload-panel.dragging {
  border-color: var(--accent);
  outline: 2px solid rgba(53, 194, 161, 0.25);
}

.drop-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

.drop-copy p {
  color: var(--muted);
}

.file-facts {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.file-facts div {
  min-width: 0;
  background: #12171a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

select,
input {
  width: 100%;
  min-height: 44px;
  background: #0f1316;
  color: var(--text);
  padding: 0 12px;
}

.progress-wrap {
  margin: 8px 0 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.subtle {
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 0;
}

.progress-bar {
  height: 18px;
  background: #0c1012;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.18s linear;
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status,
.message {
  min-height: 24px;
  color: var(--muted);
  margin-top: 16px;
}

.status.success {
  color: var(--accent);
}

.status.error,
.message {
  color: var(--danger);
}

.login-body {
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-panel {
  width: min(420px, 100%);
}

.login-panel h1 {
  margin-bottom: 24px;
}

.login-panel label {
  display: block;
  color: var(--muted);
  margin-bottom: 14px;
}

.login-panel input {
  margin-top: 6px;
}

.login-panel button {
  width: 100%;
}

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

  .topbar {
    align-items: flex-start;
  }

  .upload-panel {
    padding: 14px;
  }

  .drop-copy,
  .file-facts,
  .controls {
    grid-template-columns: 1fr;
  }

  .drop-copy {
    display: grid;
  }
}
