:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --text: #e8eef7;
  --muted: #9aa7bc;
  --accent: #38bdf8;
  --accent-dim: #0c4a6e;
  --ok: #22c55e;
  --err: #f87171;
  --radius: 12px;
  --font: system-ui, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: linear-gradient(160deg, var(--bg) 0%, #111827 100%);
  color: var(--text);
  line-height: 1.5;
}

.site-header,
.site-footer {
  padding: 1.25rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone:focus {
  border-color: var(--accent);
  outline: none;
  background: rgba(56, 189, 248, 0.06);
}

.progress {
  margin-top: 1rem;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.15s ease;
}

.preview-wrap {
  margin-top: 1rem;
}

.preview-wrap h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

#pdf-preview {
  width: 100%;
  min-height: 360px;
  border: none;
  border-radius: var(--radius);
  background: #fff;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field span {
  font-size: 0.85rem;
  color: var(--muted);
}

select,
input[type="text"] {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b1220;
  color: var(--text);
  font-size: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  color: #fff;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn.success {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
}

.status {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.status.ok {
  color: var(--ok);
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.history-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  #pdf-preview {
    min-height: 240px;
  }
}
