/*! @author Trần Thành (Tran Thanh) — labcare.com.vn · TT-LBC-2026 */

.cfg-shell {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: calc(100vh - 72px);
}
@media (max-width: 1023px) {
  .cfg-shell { grid-template-columns: 1fr; min-height: auto; }
}

.cfg-pane {
  padding: clamp(40px, 5vw, 80px) clamp(24px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  gap: var(--s-9);
  border-right: 1px solid var(--line);
}

.cfg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.cfg-title {
  font-family: var(--ff-display);
  font-size: var(--fs-7);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.cfg-title em { font-style: italic; font-weight: 400; color: var(--text-mute); }

.cfg-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: var(--fs-3);
  letter-spacing: 0.04em;
  color: var(--text-mute);
}
.cfg-progress__dots { display: flex; gap: 4px; }
.cfg-progress__dot {
  width: 28px; height: 4px;
  background: var(--line-strong);
  border-radius: 2px;
  transition: background-color var(--t-fast) var(--ease);
}
.cfg-progress__dot.is-done { background: var(--text); }
.cfg-progress__dot.is-current { background: var(--brand-accent); }

.cfg-step { display: none; flex-direction: column; gap: var(--s-7); }
.cfg-step.is-active { display: flex; }

.cfg-step__num {
  font-family: var(--ff-mono);
  font-size: var(--fs-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.cfg-step__num::before {
  content: '';
  width: 24px; height: 1px;
  background: currentColor;
}
.cfg-step h2 {
  font-size: var(--fs-8);
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 22ch;
}
.cfg-step__lead {
  font-size: var(--fs-5);
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 56ch;
}

.cfg-options {
  display: grid;
  gap: var(--s-3);
}
.cfg-option {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: var(--s-5);
  padding: var(--s-6);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  align-items: center;
}
.cfg-option:hover { background: var(--bg-card); }
.cfg-option__radio {
  width: 22px; height: 22px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  position: relative;
}
.cfg-option__radio::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background-color var(--t-fast) var(--ease);
}
.cfg-option__body { display: grid; gap: 4px; }
.cfg-option__body strong {
  font-family: var(--ff-display);
  font-size: var(--fs-5);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cfg-option__body span {
  font-size: var(--fs-4);
  color: var(--text-soft);
  line-height: 1.5;
}
.cfg-option__hint {
  font-family: var(--ff-mono);
  font-size: var(--fs-3);
  color: var(--text-mute);
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
}
input[type=radio][name="cfg"]:checked + .cfg-option,
input[type=checkbox][name="cfg"]:checked + .cfg-option,
.cfg-option.is-selected {
  border-color: var(--text);
  background: var(--bg-card);
}
.cfg-option.is-selected .cfg-option__radio { border-color: var(--text); }
.cfg-option.is-selected .cfg-option__radio::after { background: var(--text); }

.cfg-slider-block {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  padding: var(--s-7);
  background: var(--bg-card);
}
.cfg-slider-read {
  font-family: var(--ff-display);
  font-size: var(--fs-9);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.cfg-slider-read small { font-family: var(--ff-mono); font-size: var(--fs-2); color: var(--text-mute); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.cfg-slider {
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line-strong);
  border-radius: 999px;
  margin-block: var(--s-7) var(--s-3);
  cursor: pointer;
}
.cfg-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text);
  cursor: grab;
}
.cfg-ticks { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: var(--fs-2); color: var(--text-mute); }

.cfg-nav {
  margin-top: auto;
  display: flex;
  gap: var(--s-3);
  justify-content: space-between;
  padding-top: var(--s-7);
  border-top: 1px solid var(--line);
}

.cfg-result {
  background: var(--bg-card);
  padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 48px);
  position: sticky;
  top: 72px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  height: calc(100vh - 72px);
  overflow-y: auto;
}
@media (max-width: 1023px) {
  .cfg-result { position: static; height: auto; }
}

.cfg-result__lbl {
  font-family: var(--ff-mono);
  font-size: var(--fs-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.cfg-result__title {
  font-family: var(--ff-display);
  font-size: var(--fs-7);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.cfg-flow {
  display: grid;
  gap: var(--s-3);
}
.cfg-flow-step {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--bg);
}
.cfg-flow-step__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--ff-mono);
  font-size: var(--fs-2);
  font-weight: 500;
}
.cfg-flow-step__body { display: grid; gap: 2px; }
.cfg-flow-step__name { font-family: var(--ff-display); font-size: var(--fs-4); font-weight: 600; }
.cfg-flow-step__brand { font-family: var(--ff-mono); font-size: var(--fs-2); color: var(--text-mute); letter-spacing: 0.08em; text-transform: uppercase; }
.cfg-flow-step__cap { font-family: var(--ff-mono); font-size: var(--fs-4); font-weight: 500; }

.cfg-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cfg-summary > div {
  padding: var(--s-4);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.cfg-summary dt {
  font-family: var(--ff-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.cfg-summary dd {
  margin: 0;
  font-family: var(--ff-mono);
  font-size: var(--fs-4);
  font-weight: 500;
}

.cfg-cta { display: grid; gap: var(--s-3); margin-top: auto; padding-top: var(--s-5); }
.cfg-cta__note { font-family: var(--ff-mono); font-size: var(--fs-2); color: var(--text-mute); text-align: center; }
