:root {
  --paper: #f4f1ea;
  --surface: #fbfaf7;
  --surface-strong: #ffffff;
  --ink: #232725;
  --muted: #727872;
  --line: #d9d6cd;
  --line-strong: #b9b6ad;
  --green: #173f35;
  --green-soft: #e7ece8;
  --brass: #aa8352;
  --danger: #8b3b32;
  --shadow: 0 18px 50px rgba(35, 39, 37, 0.07);
  --radius-large: 28px;
  --radius-medium: 16px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgba(35, 39, 37, 0.022) 50%, transparent calc(50% + 1px)),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.app-header {
  display: flex;
  align-items: center;
  min-height: 64px;
  margin-bottom: 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 17px;
  color: inherit;
  text-decoration: none;
}

.brand:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 8px;
  border-radius: 4px;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: 17px 8px 17px;
  align-items: center;
  width: 42px;
  height: 44px;
}

.brand-mark__left,
.brand-mark__right {
  width: 17px;
  height: 42px;
  border: 1px solid rgba(35, 39, 37, 0.22);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(220,224,220,.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.62);
}

.brand-mark__left {
  transform: skewY(-14deg);
}

.brand-mark__right {
  transform: skewY(14deg);
}

.brand-mark__bridge {
  width: 8px;
  height: 34px;
  border-radius: 2px;
  background: linear-gradient(180deg, #24483f, #173f35);
  box-shadow: 0 0 0 1px rgba(23,63,53,.15);
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 11px;
}

.brand-name {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-product {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 450;
}

.deposit-section {
  position: relative;
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 490px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  pointer-events: none;
  transition: border-color var(--transition);
}

.drop-zone:hover {
  border-color: #c3c0b6;
  box-shadow: 0 22px 58px rgba(35, 39, 37, 0.085);
}

.drop-zone:focus-visible {
  outline: 3px solid rgba(170, 131, 82, 0.45);
  outline-offset: 5px;
}

.drop-zone.is-dragging {
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(23, 63, 53, 0.12);
}

.drop-zone.is-dragging::before {
  border-color: var(--green);
}

.drop-zone.is-busy {
  cursor: progress;
  pointer-events: none;
}

.drop-zone__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 490px;
  padding: 64px 28px;
  text-align: center;
  transition: opacity var(--transition), transform var(--transition);
}

.deposit-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid #d2cec4;
  border-radius: 50%;
  background: var(--surface-strong);
}

.deposit-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drop-zone__text h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.15rem);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.drop-zone__text p {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.5;
}

.primary-button {
  min-width: 218px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-weight: 620;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.primary-button:hover {
  background: #0f342b;
  box-shadow: 0 9px 22px rgba(23, 63, 53, 0.16);
  transform: translateY(-1px);
}

.primary-button:focus-visible {
  outline: 3px solid rgba(170, 131, 82, 0.55);
  outline-offset: 3px;
}

.drop-feedback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(231, 236, 232, 0.94);
  color: var(--green);
  font-size: clamp(1.5rem, 4vw, 3.2rem);
  font-weight: 540;
  letter-spacing: -0.035em;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.drop-zone.is-dragging .drop-zone__content {
  opacity: 0;
  transform: scale(0.985);
}

.drop-zone.is-dragging .drop-feedback {
  opacity: 1;
}

.upload-panel,
.confirmation {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: rgba(251, 250, 247, 0.88);
}

.upload-panel {
  padding: 22px 24px 24px;
}

.upload-panel__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.upload-status,
.upload-detail,
.confirmation__title,
.confirmation__detail {
  margin: 0;
}

.upload-status,
.confirmation__title {
  font-weight: 650;
}

.upload-detail,
.confirmation__detail {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
}

.upload-percent {
  color: var(--green);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dddcd6;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 120ms linear;
}

.confirmation {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 22px;
  border-color: rgba(23, 63, 53, 0.28);
  background: var(--green-soft);
}

.confirmation__icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
}

.confirmation__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.confirmation.is-error {
  border-color: rgba(139, 59, 50, 0.32);
  background: #f4e8e5;
}

.confirmation.is-error .confirmation__icon {
  background: var(--danger);
}

.history-section {
  margin-top: 66px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 540;
  letter-spacing: -0.025em;
}

.history-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.history-list {
  border-top: 1px solid var(--line-strong);
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 100px 92px;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.history-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.history-state {
  justify-self: end;
  color: var(--green);
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.history-state.is-error {
  color: var(--danger);
}

.empty-state {
  margin: 0;
  padding: 28px 4px;
  color: var(--muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.noscript-message {
  margin: 20px auto;
  padding: 14px 18px;
  width: min(680px, calc(100% - 40px));
  background: #f4e8e5;
  color: var(--danger);
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }

  .app-header {
    margin-bottom: 24px;
  }

  .drop-zone,
  .drop-zone__content {
    min-height: 420px;
  }

  .drop-zone::before {
    inset: 14px;
    border-radius: 18px;
  }

  .history-section {
    margin-top: 48px;
  }

  .history-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    padding: 17px 4px;
  }

  .history-name {
    grid-column: 1;
  }

  .history-date {
    grid-column: 1;
    grid-row: 2;
  }

  .history-size {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .history-state {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 480px) {
  .brand-copy {
    gap: 8px;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .brand-product {
    font-size: 0.94rem;
  }

  .drop-zone__content {
    gap: 24px;
    padding-inline: 24px;
  }

  .primary-button {
    width: 100%;
    min-width: 0;
  }

  .upload-panel__topline {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
