:root {
  --bg-start: #06111f;
  --bg-mid: #0b1b2f;
  --bg-end: #13263b;
  --panel: rgba(9, 18, 31, 0.84);
  --panel-border: rgba(143, 174, 206, 0.14);
  --text-main: #edf4ff;
  --text-soft: #95a8bf;
  --accent: #61c0ff;
  --accent-dark: #9bd7ff;
  --success: #2fb980;
  --error: #ff7a7a;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(97, 192, 255, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(110, 231, 183, 0.08), transparent 24%),
    linear-gradient(160deg, var(--bg-start), var(--bg-mid) 45%, var(--bg-end));
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero-card {
  padding: 36px 0;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  color: var(--accent-dark);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.02;
  max-width: 100%;
  width: 100%;
}

.intro {
  max-width: 100%;
  margin: 18px 0 28px;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.report-form {
  display: grid;
  gap: 22px;
}

.meta-field {
  display: grid;
  gap: 8px;
}

.meta-field span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.meta-field input,
.meta-field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(143, 174, 206, 0.16);
  background: rgba(16, 30, 46, 0.92);
  color: var(--text-main);
  font: inherit;
}

.meta-field input::placeholder {
  color: rgba(149, 168, 191, 0.72);
}

.meta-field input:focus,
.meta-field select:focus {
  outline: none;
  border-color: rgba(97, 192, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(97, 192, 255, 0.12);
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 2px dashed rgba(97, 192, 255, 0.3);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(11, 23, 39, 0.88), rgba(14, 27, 43, 0.96)),
    radial-gradient(circle at top, rgba(97, 192, 255, 0.08), transparent 55%);
  cursor: pointer;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone span {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
}

.upload-zone small,
.list-header p,
.status,
.file-meta {
  color: var(--text-soft);
}

.list-card {
  padding: 22px;
  border-radius: 24px;
  background: rgba(10, 21, 35, 0.72);
  border: 1px solid rgba(143, 174, 206, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.list-header h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.list-header p {
  margin: 0 0 16px;
}

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

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(16, 30, 46, 0.92);
  border: 1px solid rgba(143, 174, 206, 0.12);
  cursor: grab;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.file-item.is-dragging {
  opacity: 0.5;
}

.file-item.drop-before {
  border-top: 2px solid var(--accent);
}

.file-item.drop-after {
  border-bottom: 2px solid var(--accent);
}

.sort-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.sort-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(143, 174, 206, 0.18);
  border-radius: 10px;
  background: rgba(143, 174, 206, 0.08);
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.sort-button:hover:not(:disabled) {
  background: rgba(97, 192, 255, 0.16);
  border-color: rgba(97, 192, 255, 0.4);
}

.sort-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.file-name,
.file-meta {
  display: block;
}

.file-content {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-template-field {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 174, 206, 0.1);
  border-radius: 14px;
  background: rgba(10, 21, 35, 0.72);
}

.file-template-field span {
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.file-template-field[hidden] {
  display: none;
}

.file-template-select {
  appearance: none;
  width: 100%;
  padding: 12px 42px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(143, 174, 206, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 33, 50, 0.98), rgba(13, 26, 41, 0.98));
  color: var(--text-main);
  font: inherit;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(237, 244, 255, 0.9) 50%),
    linear-gradient(135deg, rgba(237, 244, 255, 0.9) 50%, transparent 50%),
    linear-gradient(180deg, rgba(18, 33, 50, 0.98), rgba(13, 26, 41, 0.98));
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

.file-template-select:focus {
  outline: none;
  border-color: rgba(97, 192, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(97, 192, 255, 0.12);
}

.file-template-select:hover {
  border-color: rgba(97, 192, 255, 0.28);
}

.remove-button {
  margin-top: 24px;
}

.remove-button,
#submit-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
}

.remove-button {
  padding: 10px 14px;
  background: rgba(143, 174, 206, 0.12);
  color: var(--text-main);
  cursor: pointer;
}

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

#submit-button {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent), #2b83f6);
  color: #04111f;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

#submit-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.status.is-error {
  color: var(--error);
}

@media (max-width: 720px) {
  body {
    display: block;
  }

  .page-shell {
    width: min(100% - 20px, 100%);
    padding: 20px 0;
  }

  .hero-card {
    padding: 22px;
    border-radius: 22px;
  }

  .file-item,
  .actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
