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

:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-50:  #eff6ff;
  --green-500: #22c55e;
  --green-50:  #f0fdf4;
  --red-500:  #ef4444;
  --red-50:   #fef2f2;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius:   12px;
  --shadow:   0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.6;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-600);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
  stroke: #fff;
}

.brand-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.2;
}

/* ─── Main ───────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 48px;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 16px;
  color: var(--gray-500);
}

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
}

/* ─── Form ───────────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.required { color: var(--red-500); }

.optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-400);
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  resize: vertical;
}

input::placeholder,
textarea::placeholder { color: var(--gray-400); }

input:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

input.invalid,
input[type="email"].invalid,
textarea.invalid {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

.field-hint {
  font-size: 12px;
  color: var(--gray-400);
}

.field-error {
  font-size: 12px;
  color: var(--red-500);
  min-height: 16px;
}

/* ─── Dropzone ───────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--gray-200);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  box-shadow: none;
}

.dropzone input[type="file"]:focus { box-shadow: none; }

.dropzone-icon svg {
  width: 36px;
  height: 36px;
  color: var(--blue-600);
  margin-bottom: 10px;
}

.dropzone-text {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.dropzone-link {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: underline;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--gray-400);
}

/* ─── File list ──────────────────────────────────────────────── */
.file-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--gray-100);
  border-radius: 8px;
  font-size: 13px;
}

.file-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--blue-50);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-item-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--blue-600);
}

.file-item-name {
  flex: 1;
  color: var(--gray-700);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  color: var(--gray-400);
  flex-shrink: 0;
}

.file-item-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--gray-400);
  line-height: 1;
  transition: color .1s;
}

.file-item-remove:hover { color: var(--red-500); }

.file-item-remove svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ─── Submit button ──────────────────────────────────────────── */
.form-footer {
  margin-top: 28px;
  display: flex;
  gap: 12px;
}

.btn-submit {
  flex: 1;
  padding: 14px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover:not(:disabled) { background: var(--blue-700); }
.btn-submit:active:not(:disabled) { transform: scale(.99); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; }

.btn-clear {
  flex: 1;
  padding: 14px;
  background: #fff;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.btn-clear:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

/* spinner animation */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; animation: spin .8s linear infinite; }

/* ─── Result boxes ───────────────────────────────────────────── */
.result-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  gap: 12px;
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.result-success .result-icon {
  background: var(--green-50);
  color: var(--green-500);
}

.result-error .result-icon {
  background: var(--red-50);
  color: var(--red-500);
}

.result-icon svg { width: 32px; height: 32px; }

.result-box h2 { font-size: 20px; font-weight: 700; }

.result-box p { font-size: 15px; color: var(--gray-500); max-width: 380px; }

.result-box p strong { color: var(--gray-900); }

.btn-new {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}

.btn-new:hover { background: var(--blue-700); }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 560px) {
  .card { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
