:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #162033;
  background: #f3f6fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

.app-shell { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 72px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #246bfd; }
h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); line-height: 1.08; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 20px; }
.subtle { margin: 14px 0 0; color: #61708a; line-height: 1.7; }

.status-pill, .state-badge { border-radius: 999px; padding: 7px 11px; background: #e9eef8; color: #52627c; font-size: 12px; white-space: nowrap; }
.status-pill.ok, .state-badge.success { background: #e5f7ed; color: #16834b; }
.status-pill.error, .state-badge.error { background: #ffebec; color: #bd2b36; }
.state-badge.uploading { background: #e8f0ff; color: #246bfd; }

.panel { margin-top: 18px; padding: 24px; border: 1px solid #dfe6f1; border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 18px 55px rgba(42,60,95,.08); }
.field { display: grid; gap: 8px; margin-bottom: 18px; color: #3e4b61; font-size: 14px; font-weight: 700; }
.field input { width: 100%; padding: 13px 15px; border: 1px solid #d7dfeb; border-radius: 12px; outline: none; background: #fff; }
.field input:focus { border-color: #246bfd; box-shadow: 0 0 0 3px rgba(36,107,253,.12); }

.dropzone { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 2px dashed #b8c5d9; border-radius: 18px; background: #f8faff; transition: .18s ease; outline: none; }
.dropzone strong { font-size: 19px; }
.dropzone span { color: #71809a; font-size: 14px; }
.dropzone:hover, .dropzone.dragging, .dropzone:focus-visible { border-color: #246bfd; background: #f1f6ff; transform: translateY(-1px); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 0; border-radius: 11px; text-decoration: none; font-weight: 750; }
.button.primary { background: #246bfd; color: #fff; }
.button.primary:hover { background: #1558de; }
.button.secondary { background: #eaf0fb; color: #28405f; }
.button.ghost { background: transparent; color: #52627c; border: 1px solid #d7dfeb; }

.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 16px; }
.section-heading span { color: #71809a; font-size: 13px; }
.queue { display: grid; gap: 14px; }
.empty-state { min-height: 90px; place-items: center; color: #8090aa; text-align: center; }
.upload-item { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 16px; padding: 14px; border: 1px solid #e0e7f0; border-radius: 16px; background: #fff; }
.preview { width: 108px; height: 108px; object-fit: cover; border-radius: 12px; background: #eef2f8; }
.item-main { min-width: 0; }
.item-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta, .message { margin-top: 8px; color: #71809a; font-size: 13px; }
.message.error { color: #bd2b36; }
.progress-track { height: 8px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #edf1f7; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: #246bfd; transition: width .15s linear; }
.result-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; margin-top: 12px; }
.result-url { min-width: 0; padding: 10px 12px; border: 1px solid #d7dfeb; border-radius: 10px; color: #35445b; background: #f8faff; }

@media (max-width: 660px) {
  .app-shell { width: min(100% - 20px, 980px); padding-top: 30px; }
  .hero { flex-direction: column; }
  .panel { padding: 17px; border-radius: 17px; }
  .upload-item { grid-template-columns: 76px minmax(0,1fr); gap: 12px; }
  .preview { width: 76px; height: 76px; }
  .result-row { grid-template-columns: 1fr 1fr; }
  .result-url { grid-column: 1 / -1; }
}
.status-pill.warn { background: #fff4d8; color: #9a6400; }
.item-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.retry-button { min-height: 32px; }
[hidden] { display: none !important; }
