:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-focus: #5a67d8;
  --primary: #5a67d8;
  --primary-hover: #4c51bf;
  --primary-light: #ebf4ff;
  --text: #1a202c;
  --text-muted: #718096;
  --text-label: #4a5568;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

.container { max-width: 700px; margin: 0 auto; }

/* Header */
header { text-align: center; margin-bottom: 1.75rem; }
.logo { font-size: 2.25rem; margin-bottom: 0.6rem; }
header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4rem; }
header p { color: var(--text-muted); font-size: 0.875rem; }

/* Card */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

/* Drop zone */
.drop-zone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  box-shadow: var(--shadow);
}
.drop-zone.drag-over { border-color: var(--primary); background: var(--primary-light); }
.drop-icon { font-size: 2.75rem; margin-bottom: 0.9rem; }
.drop-text { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.9rem; }
.drop-hint { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.75rem; }

/* Progress */
.progress-bar {
  background: var(--border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  width: 0%;
  transition: width 0.5s ease;
}
.progress-text { color: var(--text-muted); font-size: 0.875rem; text-align: center; }

/* Review header */
.review-header { margin-bottom: 1.25rem; }
.badge-ok {
  display: inline-block;
  background: #f0fff4;
  color: #276749;
  border: 1px solid #9ae6b4;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
}
.review-header p { color: var(--text-muted); font-size: 0.875rem; }

/* Field section divider */
.field-section {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.25rem 0 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group.span2 { grid-column: span 2; }

label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-label);
}
.req { color: #e53e3e; }

input[type="text"],
input[type="number"],
input[type="date"],
select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-size: 0.875rem;
  color: var(--text);
  background: #fff;
  width: 100%;
  transition: border-color 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus { border-color: var(--border-focus); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; padding-right: 2rem; cursor: pointer; }

/* Form actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  gap: 0.75rem;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg); }

/* Done card */
.done-card { text-align: center; padding: 2.5rem 1.5rem; }
.done-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.done-card h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.25rem; }
.done-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

.btn-notion {
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-notion:hover { opacity: 0.82; }

/* Error card */
.error-card {
  background: #fff5f5;
  border: 1.5px solid #feb2b2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.75rem;
}
.error-icon { font-size: 1.5rem; }
#errorText { color: #c53030; font-size: 0.9rem; line-height: 1.5; }

/* Responsive */
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span2 { grid-column: span 1; }
  .form-actions { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
  body { padding: 1.25rem 0.75rem 3rem; }
}
