/* Closet Factory brand variables */
:root {
  --regal-blue: #284B66;
  --deep-indigo: #112B3D;
  --tranquil-blue: #78A7CD;
  --serenity-blue: #C9E5F4;
  --champagne: #E9D8C3;
  --charcoal: #56626A;
  --silver-silk: #E4E6E9;
  --off-white: #F7F4F0;
  --white: #ffffff;
  --danger: #B0413E;
  --success: #2F855A;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(17, 43, 61, 0.06), 0 1px 3px rgba(17, 43, 61, 0.04);
  --shadow-md: 0 4px 12px rgba(17, 43, 61, 0.08), 0 2px 4px rgba(17, 43, 61, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: var(--deep-indigo);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top right, rgba(120, 167, 205, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(233, 216, 195, 0.15), transparent 50%);
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 18px 80px;
}

/* Top bar */
.topbar {
  background: var(--regal-blue);
  color: var(--champagne);
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.topbar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark {
  font-family: 'Poppins', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -1px;
  color: var(--champagne);
}
.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.brand-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Step container */
.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(17, 43, 61, 0.04);
}
.step.hidden { display: none; }
.hidden { display: none; }

.step-num {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--tranquil-blue);
  font-weight: 600;
  margin-bottom: 6px;
}
.step h2 {
  margin: 0 0 18px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--deep-indigo);
  letter-spacing: -0.3px;
}
.hint {
  font-size: 13px;
  color: var(--charcoal);
  margin: -6px 0 16px 0;
  line-height: 1.45;
}
.hint strong { color: var(--regal-blue); font-weight: 600; }
.optional { font-weight: 400; color: var(--charcoal); font-size: 12px; }

/* Mode tiles */
.mode-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 18px;
  background: var(--off-white);
  border: 1.5px solid var(--silver-silk);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 120ms ease;
}
.mode-tile:hover {
  border-color: var(--regal-blue);
  background: rgba(201, 229, 244, 0.2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.mode-tile-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.mode-tile div { display: flex; flex-direction: column; gap: 4px; }
.mode-tile strong {
  font-size: 17px;
  font-weight: 600;
  color: var(--deep-indigo);
}
.mode-tile span {
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.4;
}

/* Form fields */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--regal-blue);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
input[type="text"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 14px;
  border: 1.5px solid var(--silver-silk);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--deep-indigo);
  transition: border-color 120ms ease, box-shadow 120ms ease;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2356626A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--tranquil-blue);
  box-shadow: 0 0 0 3px rgba(120, 167, 205, 0.2);
}
textarea { resize: vertical; min-height: 60px; }

/* Radio tiles */
.field-group { border: none; padding: 0; margin: 0 0 18px 0; }
.field-group legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--regal-blue);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.radio-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border: 1.5px solid var(--silver-silk);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 120ms ease;
}
.radio-tile:hover { border-color: var(--tranquil-blue); }
.radio-tile input[type="radio"] {
  margin: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--regal-blue);
  flex-shrink: 0;
}
.radio-tile:has(input:checked) {
  border-color: var(--regal-blue);
  background: rgba(201, 229, 244, 0.25);
}
.radio-tile div { display: flex; flex-direction: column; gap: 2px; }
.radio-tile strong { font-size: 15px; font-weight: 600; }
.radio-tile span { font-size: 12px; color: var(--charcoal); }

/* Job list */
.job-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.job-card {
  background: var(--off-white);
  border: 1.5px solid var(--silver-silk);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 120ms ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.job-card:hover, .job-card:focus {
  border-color: var(--regal-blue);
  outline: none;
  box-shadow: var(--shadow-sm);
}
.job-card-client {
  font-size: 16px;
  font-weight: 600;
  color: var(--deep-indigo);
  margin-bottom: 4px;
}
.job-card-meta {
  font-size: 12px;
  color: var(--charcoal);
  line-height: 1.5;
}
.job-card-meta .pill {
  display: inline-block;
  background: var(--champagne);
  color: var(--deep-indigo);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-right: 6px;
}
.empty {
  text-align: center;
  color: var(--charcoal);
  padding: 24px 0;
  font-size: 14px;
}

/* Selected job pill */
.selected-job-pill {
  background: rgba(201, 229, 244, 0.35);
  border-left: 3px solid var(--regal-blue);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 18px;
  color: var(--deep-indigo);
}
.selected-job-pill strong { display: block; font-size: 14px; margin-bottom: 2px; }

/* Part cards */
.part-card {
  background: var(--off-white);
  border: 1.5px solid var(--silver-silk);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}
.part-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.part-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--regal-blue);
}
.part-remove {
  background: none;
  border: none;
  color: var(--charcoal);
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}
.part-remove:hover { background: rgba(176, 65, 62, 0.1); color: var(--danger); }

/* Photo row */
.photo-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.photo-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--silver-silk) center/cover no-repeat;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.photo-thumb .remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  background: rgba(17, 43, 61, 0.85);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.photo-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px dashed var(--tranquil-blue);
  border-radius: var(--radius-sm);
  color: var(--regal-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.photo-add-btn:hover { background: rgba(201, 229, 244, 0.3); }
.photo-uploading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--charcoal);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-add {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 120ms ease;
  border: none;
  width: 100%;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--regal-blue);
  color: var(--champagne);
}
.btn-primary:hover:not(:disabled) {
  background: var(--deep-indigo);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:disabled {
  background: var(--silver-silk);
  color: var(--charcoal);
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  color: var(--regal-blue);
  border: 1.5px solid var(--silver-silk);
}
.btn-secondary:hover { border-color: var(--regal-blue); background: rgba(120, 167, 205, 0.08); }
.btn-add {
  background: rgba(201, 229, 244, 0.4);
  color: var(--regal-blue);
  border: 1.5px dashed var(--tranquil-blue);
  margin-bottom: 16px;
}
.btn-add:hover { background: rgba(201, 229, 244, 0.7); }

.row { display: flex; gap: 10px; }
.row .btn-secondary { flex: 0 0 auto; width: auto; padding: 14px 18px; }
.row .btn-primary { flex: 1; }

/* Success / error */
.success-card, .error-card { text-align: center; padding: 16px 0; }
.success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
}
.success-card p, .error-card p {
  color: var(--charcoal);
  margin: 0 0 24px 0;
  line-height: 1.5;
}
.error-card h2 { color: var(--danger); }

@media (min-width: 600px) {
  main { padding: 32px 24px 80px; }
  .step { padding: 28px 28px; }
  .step h2 { font-size: 24px; }
}
