* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #0f172a;
}

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 14px 14px 36px;
}

.hero {
  background: linear-gradient(130deg, #1d4ed8, #172554 75%);
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.2);
}

h1, h2 {
  margin: 0 0 10px;
}

h2 {
  font-size: 19px;
}

.sub-title {
  margin-top: 14px;
}

.hint {
  margin: -2px 0 12px;
  color: #475569;
  font-size: 13px;
}

.hint-list {
  margin: -4px 0 12px;
  padding-right: 18px;
  color: #475569;
  font-size: 13px;
}

.hint-list li {
  margin-bottom: 4px;
}

.access-notice {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(254, 242, 242, 0.92);
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  font-size: 13px;
}

.access-notice a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: underline;
}

.progress-wrap {
  margin-top: 10px;
}

#progressText {
  font-size: 13px;
  margin-bottom: 6px;
  opacity: 0.92;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  display: block;
  height: 100%;
  width: 20%;
  background: #ffffff;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #dbe4f0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.hidden {
  display: none !important;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #c8d5e6;
  border-radius: 11px;
  font-size: 14px;
  background: #fbfdff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #2563eb;
  outline: 2px solid #bfdbfe;
}

input.invalid,
textarea.invalid,
select.invalid {
  border-color: #dc2626;
  outline: 2px solid #fecaca;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.row .btn {
  min-height: 42px;
}

.row-item {
  margin-bottom: 8px;
}

.rows-host .row-item {
  border: 1px dashed #d4deec;
  border-radius: 10px;
  padding: 8px;
}

.education-item,
.optional-box {
  padding: 11px;
  background: #f8fbff;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  margin-bottom: 8px;
  min-width: 0;
}

.education-item h3,
.optional-box h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #1e3a8a;
}

.field-guide {
  margin: -3px 0 10px;
  color: #475569;
  font-size: 12.8px;
}

.btn {
  border: none;
  padding: 11px 14px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.btn.primary {
  width: 100%;
  background: linear-gradient(130deg, #1d4ed8, #1e40af);
  color: #fff;
}

.btn.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn.ghost {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #d6e0ec;
}

.btn.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.wizard-actions .btn {
  flex: 1;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.advanced-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.chip-group {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 10px;
  background: #f8fbff;
}

.chip-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #1e3a8a;
}

#optionalSections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

#optionalSections .optional-box {
  margin-bottom: 0;
  height: 100%;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.chip {
  border: 1px dashed #7b8ea7;
  background: #f8fbff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  color: #1f2937;
}

.chip.active {
  background: #dbeafe;
  border-color: #2563eb;
}

.photo-upload-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.photo-input {
  display: none;
}

.photo-preview {
  width: 112px;
  height: 136px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  text-align: center;
  margin-bottom: 8px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-meta {
  font-size: 12px;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.photo-tips {
  margin: 0 0 10px;
  padding-right: 18px;
  color: #475569;
  font-size: 12.7px;
}

.photo-tips li {
  margin-bottom: 4px;
}

.templates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px;
}

.template-card {
  border: 1px solid #ccdae9;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(15, 23, 42, 0.08);
}

.template-card.active {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px #dbeafe;
}

.swatch {
  height: 8px;
  border-radius: 999px;
  margin-bottom: 7px;
}

.template-caption {
  color: #475569;
  font-size: 12px;
  margin-top: 4px;
}

.format-box {
  margin-top: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.format-row {
  display: flex;
  gap: 18px;
  font-weight: 600;
}

.status {
  text-align: center;
  font-weight: 700;
  margin-top: 10px;
}

.status.error {
  color: #b91c1c;
}

.status.success {
  color: #047857;
}

@media (max-width: 760px) {
  .advanced-groups,
  #optionalSections {
    grid-template-columns: 1fr;
  }
}
