:root {
  --primary: #2f6bff;
  --accent: #22d3ee;
  --bg: #f6faff;
  --surface: #ffffff;
  --border: #e6f0ff;
  --text: #0f172a;
  --muted: #475569;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 16px 40px rgba(47, 107, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at 20% 10%, #d9ebff 0%, var(--bg) 35%),
    linear-gradient(160deg, #f8fbff 0%, #eef5ff 100%);
  min-height: 100%;
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  filter: blur(2px);
}

.orb-1 {
  width: 260px;
  height: 260px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.3), rgba(34, 211, 238, 0));
  animation: floatA 9s ease-in-out infinite;
}

.orb-2 {
  width: 220px;
  height: 220px;
  left: -80px;
  bottom: -60px;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.26), rgba(47, 107, 255, 0));
  animation: floatB 10s ease-in-out infinite;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 192px;
}

.topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: riseIn 0.35s ease;
}

.brand {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}

.title {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.progress-block {
  margin-top: 14px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dceaff;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  transition: width 0.24s ease;
}

.screen {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: 420px;
  animation: fadeIn 0.2s ease;
}

.section-tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(860px, 100%);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  z-index: 3;
}

.tab-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdff;
  color: #1e2d44;
  padding: 7px 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.tab-icon {
  font-size: 13px;
  line-height: 1;
}

.tab-label {
  font-size: 11px;
  line-height: 1.1;
}

.tab-btn.active {
  border-color: var(--primary);
  background: #edf3ff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.12);
}

.step-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.step-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(47, 107, 255, 0.2);
  background: #eef4ff;
  color: #22417a;
  font-size: 13px;
  font-weight: 700;
}

.step-tools {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cards,
.chips,
.radio-grid {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-option {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  font-weight: 600;
  background: #fbfdff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.card-option:hover {
  border-color: rgba(47, 107, 255, 0.35);
  transform: translateY(-1px);
}

.card-option.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14);
  background: #f3f7ff;
}

.chips {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fbfdff;
  font-weight: 600;
  color: #1e2d44;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active {
  border-color: var(--primary);
  background: #eaf1ff;
  color: #112a62;
}

.input,
.textarea,
.select {
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font: inherit;
  color: var(--text);
  background: #fcfeff;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(47, 107, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14);
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.textarea-sm {
  min-height: 92px;
}

.helper {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.radio-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.radio-option {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.radio-option.active {
  border-color: var(--primary);
  background: #f3f8ff;
}

.hidden {
  display: none !important;
}

.summary {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.summary-item {
  padding: 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid var(--border);
}

.summary-item h4 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.summary-item p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

.legal-note {
  margin-top: 6px;
  padding: 8px 9px;
}

.legal-note h4 {
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.2;
}

.legal-note p,
.legal-note .helper {
  margin: 0 !important;
  font-size: 11px;
  line-height: 1.28;
  white-space: normal;
}

.legal-note .helper + .helper {
  margin-top: 2px !important;
}

.legal-note-links {
  display: grid;
  gap: 1px;
}

.legal-note-links a {
  display: block;
}

.legal-note a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-box {
  margin-top: 12px;
  border: 1px dashed rgba(47, 107, 255, 0.4);
  border-radius: 14px;
  background: #f7fbff;
  padding: 12px;
}

.upload-box input[type="file"] {
  width: 100%;
}

.file-pill {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #edf4ff;
  font-size: 13px;
}

.metric-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
}

.metric-label {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.list-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.portfolio-card {
  display: grid;
  gap: 8px;
}

.portfolio-cover {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #eef4ff;
}

.portfolio-media-placeholder {
  height: 140px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: #f3f7ff;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.portfolio-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portfolio-tag {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f2f7ff;
  font-size: 12px;
  font-weight: 700;
  color: #1b3f83;
}

.referral-code-card.locked .referral-code-value {
  filter: blur(5px);
  user-select: none;
}

.referral-code-row {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #eef5ff;
}

.referral-lock {
  font-size: 14px;
  line-height: 1;
}

.referral-code-value {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.review-thumb-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
}

.review-thumb-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #eef4ff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.review-thumb-btn:hover {
  transform: translateY(-1px);
}

.review-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 10;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: #e8f0ff;
  color: #17376f;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.portfolio-modal-media {
  margin-top: 10px;
  position: relative;
  display: grid;
  gap: 8px;
}

.portfolio-media-view {
  width: 100%;
  max-height: 52vh;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: #f4f8ff;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #17376f;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-nav.prev {
  left: 8px;
}

.modal-nav.next {
  right: 8px;
}

.image-viewer-card {
  width: min(900px, 100%);
  padding: 10px;
  display: grid;
  justify-items: center;
}

.image-viewer-photo {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #101828;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #eaf2ff;
  color: #163268;
}

.status-pill.NEW {
  background: #ecf2ff;
}

.status-pill.IN_PROGRESS {
  background: #fff7db;
}

.status-pill.ON_HOLD {
  background: #f3f4f6;
}

.status-pill.DONE {
  background: #dcfce7;
  color: #065f46;
}

.status-pill.REJECTED {
  background: #fee2e2;
  color: #991b1b;
}

.empty-state {
  margin-top: 12px;
  color: var(--muted);
}

.success-card {
  text-align: center;
  max-width: 560px;
  margin: 26px auto;
}

.success-icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  margin: 0 auto 14px;
  background: linear-gradient(145deg, #ccfbf1, #dbeafe);
  color: #0f766e;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
}

.success-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.cta-bar {
  position: fixed;
  left: 50%;
  bottom: calc(60px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(860px, 100%);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(120deg, var(--primary), #4d8eff);
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  color: #163268;
  background: #eaf2ff;
}

.btn-link {
  background: #e8fdfd;
  color: #045f70;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.error-text {
  margin-top: 10px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  transition: all 0.2s ease;
  z-index: 3;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, 18px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, -16px);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px 12px 194px;
  }

  .screen {
    padding: 16px;
    min-height: 380px;
  }

  .title {
    font-size: 20px;
  }

  .step-title {
    font-size: 20px;
  }

  .cta-bar {
    padding-inline: 12px;
  }

  .section-tabs {
    gap: 5px;
    padding-inline: 8px;
  }

  .tab-label {
    font-size: 10px;
  }
}
