/* ── PAGE ─────────────────────────────────────────────────────────────────── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.page-header   { margin-bottom: 32px; }
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  margin-bottom: 8px;
}
.page-sub { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* ── FORM CARD ────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 20px;
}
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── FORM LAYOUT ──────────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.full { grid-template-columns: 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ── FIELDS ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.field label .req   { color: var(--accent); margin-left: 2px; }
.field label .hint  { font-weight: 400; color: var(--text-muted); font-size: 0.76rem; margin-left: 4px; }

.field input:not([type="checkbox"]),
.field textarea,
.field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
}
.field input:not([type="checkbox"]):focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(232, 165, 152, 0.15);
}
.field input:not([type="checkbox"]).error,
.field textarea.error,
.field select.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.field .err-msg { display: none; font-size: 0.76rem; color: var(--red); margin-top: 4px; }
.field .err-msg.show { display: block; }

/* SELECT custom arrow */
.select-wrap { position: relative; }
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

/* ── CATEGORY CHIPS ───────────────────────────────────────────────────────── */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cat-chip {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  transition: all var(--transition);
  user-select: none;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── IMAGE UPLOAD ─────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface2);
  position: relative;
}
.upload-zone:hover,
.upload-zone.dragover { border-color: var(--accent); background: var(--hover); }
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon  { font-size: 2.2rem; margin-bottom: 10px; }
.upload-label { font-size: 0.88rem; color: var(--text-muted); }
.upload-label strong { color: var(--accent); }
.upload-hint  { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.preview-wrap {
  display: none;
  margin-top: 16px;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 220px;
}
.preview-wrap img     { width: 100%; object-fit: cover; display: block; }
.preview-remove {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(44, 40, 37, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── LINKS ────────────────────────────────────────────────────────────────── */
.links-list { display: flex; flex-direction: column; gap: 8px; }
.link-row   { display: flex; gap: 8px; }
.link-row input { flex: 1; }
.link-remove {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.link-remove:hover { border-color: var(--red); color: var(--red); }
.add-link-btn {
  margin-top: 8px;
  padding: 7px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}
.add-link-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── ONLINE TOGGLE ────────────────────────────────────────────────────────── */
.online-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.online-toggle:hover      { border-color: var(--accent); background: var(--hover); }
.online-toggle.active     { border-color: var(--accent); background: #fef2ef; }
.online-toggle-check {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.online-toggle.active .online-toggle-check {
  background: var(--accent);
  border-color: var(--accent);
}
.online-toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.online-toggle-hint {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

/* ── SUBMIT BAR ───────────────────────────────────────────────────────────── */
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.btn {
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
}
.btn-ghost {
  background: none;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: #e8673a;
  color: #fff;
  border-color: #e8673a;
  box-shadow: 0 4px 18px rgba(232, 103, 58, 0.45);
  letter-spacing: 0.01em;
}
.btn-primary:hover    { background: #d45a2e; border-color: #d45a2e; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(232,103,58,0.5); }
.btn-primary:active   { transform: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── SUCCESS SCREEN ───────────────────────────────────────────────────────── */
.success-screen { display: none; text-align: center; padding: 60px 20px; }
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent3), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  box-shadow: 0 8px 28px rgba(197, 217, 181, 0.4);
}
.success-title  { font-family: 'DM Serif Display', serif; font-size: 1.8rem; margin-bottom: 10px; }
.success-sub    { color: var(--text-muted); font-size: 0.9rem; max-width: 400px; margin: 0 auto 28px; line-height: 1.6; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── SPINNER ──────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.rainbow-letter { display: inline-block; }

/* Back link */
.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.back-link:hover { border-color: var(--accent); color: var(--accent); }
