/* Parthans Consultancy - reference-inspired premium form UI */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --primary-glow: rgba(15, 118, 110, 0.15);
  --secondary: #0369a1;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-light: #fef3c7;
  --text: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.86);
  --white: #ffffff;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.06), 0 4px 6px -4px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.07), 0 8px 10px -6px rgb(0 0 0 / 0.06);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.42;
  background-image:
    radial-gradient(#cbd5e1 1.5px, transparent 1.5px),
    radial-gradient(#cbd5e1 1.5px, var(--bg) 1.5px);
  background-position: 0 0, 20px 20px;
  background-size: 40px 40px;
}

.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -2;
  opacity: 0.42;
  pointer-events: none;
}

.bg-glow-1 {
  top: -190px;
  left: -210px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
}

.bg-glow-2 {
  right: -210px;
  bottom: -210px;
  background: radial-gradient(circle, #e0f2fe 0%, transparent 70%);
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-container {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.logo-text h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.logo-text span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 13px;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid rgba(15, 118, 110, 0.15);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.app-shell {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 30px 20px 40px;
}

.stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 34px;
  padding: 0 10px;
}

.step-progress {
  position: absolute;
  top: 18px;
  left: 42px;
  right: 42px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  z-index: 1;
}

.step-progress-bar,
.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: inherit;
  transition: var(--transition-smooth);
}

.step {
  width: 96px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.step-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 800;
  transition: var(--transition-fast);
}

.step-title {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.15;
}

.step.active .step-num {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-glow);
}

.step.active .step-title {
  color: var(--primary-dark);
}

.step.completed .step-num {
  color: var(--primary-dark);
  background: var(--primary-light);
  border-color: var(--primary);
}

.form-card,
.success-screen {
  padding: 35px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.form-brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.form-brand-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.06));
}

.form-brand-info h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.6rem;
  font-weight: 800;
}

.form-brand-info p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.progress-wrap {
  margin-bottom: 22px;
}

.progress-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-meta span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.progress-meta strong {
  color: var(--primary-dark);
  font-size: 0.98rem;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  background: var(--border);
  border-radius: 999px;
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

.step-panel {
  display: none;
  animation: slideIn var(--transition-smooth);
}

.step-panel.active {
  display: block;
}

.step-intro {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.step-intro h2 {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 1.55rem;
  font-weight: 800;
}

.step-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 18px;
}

label,
.label-text {
  display: block;
  margin: 0 0 8px 2px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 14px 16px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-fast);
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.invalid {
  border-color: var(--danger);
  background: #fffefb;
}

.error {
  display: block;
  min-height: 17px;
  margin: 5px 0 0 2px;
  color: var(--danger);
  font-size: 0.76rem;
  font-weight: 700;
}

.grid-2,
.marks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.marks-grid {
  grid-template-columns: repeat(3, 1fr);
}

.choice-row,
.chip-grid {
  display: grid;
  gap: 12px;
}

.choice-row {
  grid-template-columns: 1fr 1fr;
}

.stacked-mobile {
  grid-template-columns: repeat(3, 1fr);
}

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

.choice-row label,
.chip-grid label {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.choice-row label:hover,
.chip-grid label:hover {
  border-color: var(--primary);
  background: rgba(204, 251, 241, 0.45);
}

.choice-row input,
.chip-grid input,
.declaration input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.metric-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  margin: 2px 0 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-glow), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(15, 118, 110, 0.15);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
}

.metric-tile span {
  color: var(--muted);
  font-weight: 800;
}

.metric-tile strong {
  color: var(--primary-dark);
  font-size: 1.35rem;
  font-weight: 800;
}

.declaration {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 4px 0 0;
  padding: 16px;
  line-height: 1.45;
  background: var(--primary-glow);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.22);
}

.primary:hover {
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.34);
}

.secondary {
  color: var(--text);
  background: var(--border);
}

.submit {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.loading .spinner {
  display: inline-block;
}

.success-screen {
  min-height: 430px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.success-screen h2 {
  max-width: 420px;
  margin: 18px 0 8px;
  color: var(--primary-dark);
  font-size: 1.8rem;
}

.success-screen p {
  max-width: 360px;
  margin: 0 0 28px;
  color: var(--muted);
}

.checkmark svg {
  width: 88px;
  height: 88px;
}

.checkmark circle {
  fill: none;
  stroke: var(--primary-light);
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: draw 600ms ease forwards;
}

.checkmark path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw 420ms 420ms ease forwards;
}

.hidden {
  display: none !important;
}

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

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .app-shell {
    padding: 24px 16px 34px;
  }

  .form-card,
  .success-screen {
    padding: 22px;
    border-radius: var(--radius-md);
  }

  .grid-2,
  .marks-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stacked-mobile {
    grid-template-columns: 1fr;
  }

  .step {
    width: 72px;
  }

  .step-title {
    display: none;
  }

  .step-progress {
    left: 32px;
    right: 32px;
  }
}

@media (max-width: 520px) {
  .header-container {
    padding: 10px 14px;
  }

  .logo-img {
    height: 40px;
  }

  .logo-text h1 {
    font-size: 1.12rem;
  }

  .logo-text span {
    font-size: 0.62rem;
  }

  .header-badge {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .form-brand-header {
    justify-content: flex-start;
  }

  .form-brand-logo {
    height: 56px;
  }

  .form-brand-info h2 {
    font-size: 1.22rem;
  }

  .actions {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
  }

  .submit {
    grid-column: 1 / -1;
  }
}
