:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f2efe8;
  color: #1d2633;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 0.86fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  padding: clamp(20px, 5vw, 72px);
  background:
    radial-gradient(circle at 12% 18%, rgba(151, 98, 44, 0.2), transparent 28rem),
    radial-gradient(circle at 92% 82%, rgba(38, 86, 110, 0.18), transparent 26rem),
    linear-gradient(135deg, #fbf8f0 0%, #e8edf0 100%);
}

.hero,
.panel {
  width: 100%;
}

.brand {
  width: fit-content;
  max-width: min(100%, 420px);
  margin-bottom: 28px;
  border: 1px solid rgba(29, 38, 51, 0.18);
  border-radius: 999px;
  padding: 7px 13px 7px 8px;
  background: rgba(255, 255, 255, 0.54);
  color: #344256;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 12px;
  color: #8a5424;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.7rem, 7vw, 6.6rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.intro {
  max-width: 620px;
  margin: 24px 0 0;
  color: #596677;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.6;
}

.panel {
  display: grid;
  gap: 18px;
  max-width: 620px;
  justify-self: end;
}

.form-card {
  border: 1px solid rgba(29, 38, 51, 0.1);
  border-radius: 30px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(35, 48, 67, 0.13);
  backdrop-filter: blur(14px);
}

.section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.section-heading span {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #1f3f55;
  color: #fff;
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 4px 0 0;
  color: #667386;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #253248;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid #d2d8df;
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  background: #fbfcfd;
}

input[type='file'] {
  padding: 12px;
}

button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #1f3f55, #152b3d);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(31, 63, 85, 0.24);
}

.success-button {
  background: linear-gradient(135deg, #15803d, #166534);
  box-shadow: 0 16px 30px rgba(21, 128, 61, 0.24);
}

.danger-button {
  background: linear-gradient(135deg, #b42318, #8f1d15);
  box-shadow: 0 16px 30px rgba(180, 35, 24, 0.22);
}

button::before {
  width: 18px;
  height: 18px;
  display: none;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  content: '';
  animation: spin 0.8s linear infinite;
}

button.is-loading::before {
  display: block;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.result {
  border: 1px solid #d8dde3;
  border-radius: 22px;
  padding: 18px;
  background: #f7f9fb;
}

.result strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.result p {
  margin: 8px 0 0;
  color: #657184;
  line-height: 1.5;
}

.result.loading {
  border-color: #b9c7d3;
  background: #eef5fb;
}

.result.loading strong::before {
  width: 16px;
  height: 16px;
  display: inline-block;
  margin-right: 9px;
  border: 3px solid rgba(31, 63, 85, 0.18);
  border-top-color: #1f3f55;
  border-radius: 50%;
  vertical-align: -3px;
  content: '';
  animation: spin 0.8s linear infinite;
}

.result.success {
  border-color: #9ed2b1;
  background: #effaf3;
}

.result.error {
  border-color: #e5a7a2;
  background: #fff1f0;
}

.result dl {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.result dl div {
  display: grid;
  gap: 3px;
}

.result dt,
.files-title {
  color: #647084;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result dd {
  margin: 0;
  color: #203044;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.files-title {
  display: block;
  margin-top: 18px;
}

.files-list,
.notes {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: #536175;
  line-height: 1.5;
}

.notes {
  margin-top: 18px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 29, 40, 0.58);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(100%, 620px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 36px);
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.status-modal-card {
  width: min(100%, 520px);
}

.modal-card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.modal-card p {
  margin: 0 0 14px;
  color: #556275;
  line-height: 1.6;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions.single {
  grid-template-columns: 1fr;
}

@media (max-width: 920px) {
  .page {
    grid-template-columns: 1fr;
    align-items: start;
  }

  h1 {
    font-size: clamp(2.5rem, 13vw, 4.8rem);
  }
}

@media (max-width: 560px) {
  .modal-actions {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
