:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6f8;
  color: #16202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 26px;
  margin-bottom: 0;
}

h2 {
  font-size: 19px;
  margin-bottom: 8px;
}

.review-shell {
  min-height: 100vh;
  padding: 20px;
}

.app-header,
.upload-band,
.review-layout {
  max-width: 1280px;
  margin: 0 auto;
}

.app-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

#refreshButton {
  background: #ffffff;
  border: 1px solid #c7d0dc;
  cursor: pointer;
  height: 38px;
  width: 38px;
}

.eyebrow {
  color: #5a6978;
  font-size: 13px;
  margin-bottom: 4px;
}

.upload-band {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr minmax(220px, 320px);
  margin-bottom: 16px;
}

.upload-form {
  display: grid;
  gap: 8px;
}

.drop-zone {
  align-items: center;
  background: #ffffff;
  border: 2px dashed #9fb3c8;
  cursor: pointer;
  display: grid;
  justify-items: center;
  min-height: 150px;
  padding: 22px;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.drop-zone span {
  font-size: 21px;
  font-weight: 700;
}

.drop-zone strong {
  color: #5a6978;
  font-size: 13px;
  margin-top: 6px;
}

.drop-zone.dragover,
.drop-zone.uploading {
  background: #eef6fc;
  border-color: #1f4e78;
  box-shadow: inset 0 0 0 1px #1f4e78;
}

.visually-hidden {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  background: #ffffff;
  border: 1px solid #d8dee7;
  padding: 12px;
}

.stat strong {
  display: block;
  font-size: 22px;
}

.stat span {
  color: #5a6978;
  font-size: 12px;
}

.review-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 360px) 1fr;
}

.file-panel,
.file-detail {
  display: grid;
  gap: 12px;
}

.file-panel,
.file-detail-head,
.comment-form,
.comment {
  background: #ffffff;
  border: 1px solid #d8dee7;
}

.file-panel {
  padding: 14px;
}

.file-list,
.comment-list {
  display: grid;
  gap: 8px;
}

.file-item {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #d8dee7;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
  width: 100%;
}

.file-item.empty {
  color: #5a6978;
  cursor: default;
}

.file-item.active {
  background: #eef6fc;
  border-color: #1f4e78;
}

.file-main {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.file-main strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.file-main small {
  color: #5a6978;
}

.file-delete {
  align-self: center;
  background: #ffffff;
  border: 1px solid #d09b9b;
  color: #8f1d1d;
  cursor: pointer;
  font-size: 12px;
  padding: 6px 8px;
  white-space: nowrap;
}

.file-detail-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px;
}

.file-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.download-link,
.action-button,
.danger-button {
  background: #1f4e78;
  border: 0;
  color: #ffffff;
  display: inline-block;
  cursor: pointer;
  padding: 9px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.action-button:disabled {
  background: #9fb3c8;
  cursor: wait;
}

.danger-button {
  background: #8f1d1d;
}

.danger-button:disabled,
.file-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

.comment-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.comment-form.disabled {
  opacity: 0.62;
}

label {
  color: #415161;
  display: grid;
  gap: 6px;
}

input,
textarea {
  background: #ffffff;
  border: 1px solid #c7d0dc;
  padding: 9px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.comment-form button {
  background: #1f4e78;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 10px 12px;
}

.form-status {
  color: #166534;
  font-size: 13px;
  margin: 0;
  min-height: 18px;
}

.comment {
  padding: 12px;
}

.comment-header {
  color: #5a6978;
  display: flex;
  font-size: 12px;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-header strong {
  color: #1f4e78;
  overflow-wrap: anywhere;
}

.comment p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .review-shell {
    padding: 14px;
  }

  .upload-band,
  .review-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-header,
  .file-detail-head {
    align-items: stretch;
    display: grid;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .file-item {
    grid-template-columns: 1fr;
  }

  .file-delete {
    justify-self: start;
  }
}
