
/* DARK THEME */
:root {
  --bg: #050814;
  --bg-alt: #090d1f;
  --accent: #5b8dff;
  --accent-2: #ff6fd8;
  --text-main: #f7f8ff;
  --text-soft: #a7b0d9;
  --card-bg: rgba(9, 13, 31, 0.96);
  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.75);
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* INPUTS */
  --input-bg: rgba(5, 8, 20, 0.9);
  --input-text: #f7f8ff;

  /* DROPDOWN */
  --dropdown-bg: rgba(5, 8, 20, 0.9);
  --dropdown-text: #f7f8ff;
}

/* LIGHT THEME */
:root.light {
  --bg: #f7f9fc;
  --bg-alt: #ffffff;
  --accent: #0066ff;
  --accent-2: #ff3e9e;
  --text-main: #0a0a14;
  --text-soft: #4a4a5a;
  --card-bg: rgba(255, 255, 255, 0.92);
  --border-soft: rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.15);

  --input-bg: #ffffff;
  --input-text: #0a0a14;

  --dropdown-bg: #ffffff;
  --dropdown-text: #0a0a14;
}

/* BODY */
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #111633 0, #050814 55%, #02030a 100%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* SHELL */
.intake-shell {
  width: 100%;
  max-width: 820px;
  background: var(--card-bg);
  padding: 28px 26px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  position: relative;
}

/* THEME TOGGLE */
.theme-toggle {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 999;
}

/* CONTEXT HEADER */
.intake-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.intake-context-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intake-context .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

#ctxCategory {
  color: var(--accent-2);
}

/* WIZARD STEPS */
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.form-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* UNIVERSAL INPUT STYLE */
input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 0.95rem;
  transition: all 0.25s ease;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-soft);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(91, 141, 255, 0.35);
}

select option {
  background: var(--input-bg);
  color: var(--input-text);
}

/* DYNAMIC FIELDS */
.dynamic-fields {
  margin: 20px 0;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dynamic-fields h3 {
  margin-top: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.df-group {
  margin-bottom: 14px;
}

.df-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* FORM FIELDS */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.form-group textarea {
  min-height: 110px;
}

/* ERROR */
.field-error {
  border-color: #ff4f6f !important;
  box-shadow: 0 0 0 1px rgba(255, 79, 111, 0.6);
}

/* BUTTONS */
.form-submit {
  margin-top: 10px;
  width: 100%;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.wizard-back {
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
}

/* CONFIRM PANEL */
.confirm-panel {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 720px) {
  .intake-shell {
    padding: 22px 18px 24px;
  }

  .intake-context {
    grid-template-columns: 1fr;
  }
}
