.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1fr);
  background: #fff;
}
.login-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 3rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 22rem),
    linear-gradient(90deg, rgba(16, 38, 75, 0.94), rgba(38, 63, 133, 0.82), rgba(13, 45, 57, 0.68));
  color: white;
}
.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 32px 32px;
}
.login-brand-content { position: relative; z-index: 1; max-width: 620px; }
.login-logo {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 8px;
  background: rgba(255,255,255,0.96);
  color: #36459c;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(0,0,0,0.16);
  margin-bottom: 2rem;
}
.login-brand-content .eyebrow { color: #8fc73e; }
.login-brand-content h1 { color: white; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; max-width: 720px; }
.login-brand-content p { color: rgba(255,255,255,0.84); line-height: 1.8; max-width: 620px; }
.login-feature { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; font-weight: 800; color: rgba(255,255,255,0.92); }
.login-feature span { width: 32px; height: 32px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); position: relative; }
.login-feature span::after { content: ""; position: absolute; inset: 10px; border-radius: 999px; background: #8fc73e; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-panel { width: min(440px, 100%); padding: 0; }
.register-panel { width: min(520px, 100%); }
.login-panel h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.login-subtitle { color: var(--muted); margin-bottom: 1rem; }
.auth-switch {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
}
.auth-switch a {
  border: 1px solid rgba(54, 69, 156, 0.18);
  border-radius: 999px;
  color: #36459c;
  padding: 0.45rem 0.7rem;
}
.auth-switch a:hover { background: rgba(143, 199, 62, 0.14); border-color: rgba(143, 199, 62, 0.45); }
.client-hero {
  align-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 20rem),
    linear-gradient(90deg, rgba(16, 38, 75, 0.94), rgba(38, 63, 133, 0.82), rgba(13, 45, 57, 0.68));
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 250px;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  position: relative;
}
.client-hero > * { position: relative; z-index: 1; }
.client-hero .eyebrow { color: var(--accent); }
.client-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.08;
  max-width: 760px;
  text-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}
.client-hero p {
  color: rgba(255,255,255,0.82);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 720px;
}
.form-grid { display: grid; gap: 0.85rem; margin-top: 1rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span { grid-column: 1 / -1; }
.geo-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.geo-tools .secondary-btn {
  width: auto;
}
.geo-tools small {
  color: var(--muted);
  font-weight: 750;
}
.geo-tools small[data-tone="success"] { color: #15803d; }
.geo-tools small[data-tone="error"] { color: var(--red); }
.geo-tools small[data-tone="pending"] { color: #2563eb; }
label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.88rem; font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid rgb(148 163 184 / 0.9);
  background: #fff;
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  outline-color: rgba(15, 118, 110, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(148, 163, 184, 0.22);
}
input:focus, select:focus, textarea:focus {
  border-color: rgb(8 145 178 / 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(8, 145, 178, 0.28),
    0 0 0 2px rgba(8, 145, 178, 0.12);
}
textarea { min-height: 86px; resize: vertical; }
.filters { display: grid; grid-template-columns: 1fr 240px; gap: 0.75rem; align-items: center; }
.progress { grid-column: 1 / -1; height: 10px; border-radius: 10px; background: rgba(17, 33, 43, 0.09); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.question-card { padding: 1rem; display: grid; gap: 0.85rem; }
.question-main { display: grid; gap: 0.2rem; }
.question-main h2 { margin: 0; font-size: 1.05rem; }
.question-main p { color: var(--muted); margin: 0; }
.question-code { color: var(--teal-dark); font-weight: 900; font-size: 0.82rem; }
.answer-group { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; }
.answer-group button {
  border: 1px solid #94a3b8;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.75rem 0.4rem;
  font-weight: 900;
  min-height: 44px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(15, 23, 42, 0.1),
    0 1px 2px rgba(15, 23, 42, 0.1);
}
.answer-group button.active { border-color: #0e7490; background: linear-gradient(180deg, #ecfeff 0%, #cffafe 100%); color: #083344; }
.answer-group button.active.yes { background: linear-gradient(180deg, #ecfeff 0%, #cffafe 100%); color: #083344; border-color: #0e7490; }
.answer-group button.active.partial { background: rgba(183, 121, 31, 0.17); color: var(--amber); border-color: rgba(183, 121, 31, 0.3); }
.answer-group button.active.no { background: rgba(180, 35, 24, 0.13); color: var(--red); border-color: rgba(180, 35, 24, 0.28); }
.checkbox-answer-group {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.checkbox-answer-group label {
  align-items: center;
  border: 1px solid #b8c7d6;
  color: #172033;
  display: flex;
  flex-direction: row;
  font-weight: 750;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
}
.checkbox-answer-group input {
  width: auto;
}
.question-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; }
.upload-button input { display: none; }
.upload-button span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.58rem 0.75rem;
  background: rgba(255,255,255,0.65);
  color: var(--teal-dark);
}
.upload-button small { margin-left: 0.5rem; color: var(--muted); }

.collector-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.07);
  padding: 1.25rem;
  position: relative;
}
.collector-hero::after {
  background: linear-gradient(90deg, var(--teal), var(--accent), var(--red));
  bottom: -1px;
  content: "";
  height: 4px;
  left: 1.25rem;
  position: absolute;
  width: min(22rem, 70vw);
}
.collector-hero h2 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.collector-hero p { color: var(--muted); margin-bottom: 0; max-width: 720px; }
.score-summary {
  display: grid;
  place-items: center;
  min-height: 116px;
  border-radius: 12px;
  background: rgba(54, 69, 156, 0.08);
  color: #36459c;
}
.score-summary span { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.score-summary small { font-weight: 800; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.collection-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-left: 4px solid var(--teal);
}
.collection-card h2 { margin: 0; }
.collection-card p { margin: 0; color: var(--muted); }
.mspp-form-panel {
  background: #fff;
  border: 1px solid #dbe4ed;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.mspp-form-header {
  border-bottom: 1px solid #e5edf4;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 1.2rem;
}
.mspp-form-header h1 { color: #07152d; font-size: clamp(1.7rem, 3vw, 2.25rem); font-weight: 900; }
.mspp-form-header p:not(.eyebrow) { color: #475569; margin: 0.55rem 0 0; max-width: 760px; }
.mspp-progress { margin: 0.9rem 0 1.55rem; }
.mspp-progress div { background: #dce6ef; height: 0.48rem; overflow: hidden; }
.mspp-progress span { background: #087d94; display: block; height: 100%; transition: width 160ms ease; }
.mspp-progress small { color: #506176; display: block; font-weight: 700; margin-top: 0.55rem; }
.form-workspace {
  display: grid;
  gap: 1.2rem;
}
.sheet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}
.sheet-nav .eyebrow { flex-basis: 100%; margin: 0; }
.sheet-nav button {
  border: 1px solid #d7e2ec;
  background: #fff;
  color: #506176;
  padding: 0.46rem 0.82rem;
  text-align: center;
  display: grid;
  gap: 0.05rem;
  min-width: min(14rem, 100%);
  box-shadow: none;
}
.sheet-nav button.active {
  border-color: #0794ad;
  background: #e9fbff;
  color: #075f73;
}
.sheet-nav span { font-weight: 900; color: inherit; }
.sheet-nav b, .sheet-nav small { display: none; }
.sheet-page { display: grid; gap: 1rem; min-width: 0; }
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.25rem 0 0;
}
.sheet-header h2 { color: #07152d; font-size: 1.32rem; margin: 0; }
.mspp-question-row {
  border: 1px solid #d7e2ec;
  background: #fff;
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
}
.mspp-question-row .question-main h2 {
  color: #07152d;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}
.mspp-question-row .question-main p { color: #64748b; }
.mspp-question-row textarea {
  min-height: 64px;
}
.mspp-question-row .answer-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
}
.mspp-question-row .answer-group button {
  background: #fff;
  border-color: #b8c7d6;
  box-shadow: none;
}
.mspp-question-row .answer-group button.active {
  background: #e9fbff;
  border-color: #087d94;
  color: #075f73;
}
.pager-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  position: static;
  bottom: 0;
  border-top: 1px solid #e5edf4;
  padding: 1rem 0 0;
  backdrop-filter: none;
}
.pager-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.review-score {
  border: 1px solid #e2e8f0;
  padding: 0.85rem;
  display: grid;
  gap: 0.4rem;
  background: #f8fafc;
}
.review-score span { font-weight: 900; }
.review-score small { color: var(--muted); font-weight: 800; }
.builder-stack {
  display: grid;
  gap: 1rem;
}
.builder-section {
  background: #fff;
  border: 1px solid #dbe4ed;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}
.builder-section-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) 90px auto;
  gap: 0.75rem;
  align-items: end;
  border-bottom: 1px solid #e5edf4;
  padding-bottom: 1rem;
}
.builder-question-list {
  display: grid;
  gap: 0.65rem;
  padding-top: 1rem;
}
.builder-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}
.builder-item summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.75rem;
}
.builder-item summary span,
.builder-item summary small {
  color: var(--muted);
  font-weight: 750;
}
.builder-item summary b {
  color: #172033;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.builder-form {
  border-top: 1px solid #e5e7eb;
  margin: 0;
  padding: 0.85rem;
}
.check-row {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  min-height: 42px;
}
.check-row input {
  width: auto;
}
.muted-note {
  color: var(--muted);
  font-weight: 750;
  margin: 0;
}

@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { padding: 1.5rem; min-height: auto; }
  .login-logo {
    height: 56px;
    margin-bottom: 1rem;
    width: 56px;
  }
  .login-brand-content h1 {
    font-size: 1.8rem;
    line-height: 1.12;
  }
  .login-brand-content p { line-height: 1.55; }
  .login-feature {
    font-size: 0.9rem;
    margin-top: 0.7rem;
  }
  .login-feature span {
    height: 24px;
    width: 24px;
  }
  .login-feature span::after { inset: 7px; }
  .login-form-panel {
    align-items: flex-start;
    padding: 1.25rem;
  }
  .client-hero { align-items: flex-start; flex-direction: column; }
  .form-grid.two, .filters { grid-template-columns: 1fr; }
  .geo-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .geo-tools .secondary-btn {
    width: 100%;
  }
  .answer-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mspp-question-row .answer-group {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .checkbox-answer-group {
    grid-template-columns: 1fr;
  }
  .collector-hero, .collection-grid, .form-workspace, .review-grid { grid-template-columns: 1fr; }
  .sheet-nav { position: static; }
  .sheet-header { align-items: flex-start; flex-direction: column; }
  .question-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .upload-button span,
  .action-indicator {
    justify-content: center;
    width: 100%;
  }
  .builder-section-head,
  .builder-item summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-switch {
    align-items: stretch;
    flex-direction: column;
  }
  .auth-switch a { text-align: center; }
  .client-hero {
    min-height: auto;
    padding: 1.25rem;
  }
  .client-hero h1 {
    font-size: 1.9rem;
    line-height: 1.12;
  }
  .client-hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }
  .collector-hero {
    padding: 1rem;
  }
  .collector-hero::after {
    left: 1rem;
    width: calc(100% - 2rem);
  }
  .score-summary {
    min-height: 90px;
  }
  .mspp-form-panel {
    border-left: 0;
    border-right: 0;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding: 1rem 0.75rem;
  }
  .mspp-form-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
  }
  .mspp-form-header h1 {
    font-size: 1.45rem;
    line-height: 1.2;
  }
  .mspp-form-header p:not(.eyebrow) {
    font-size: 0.92rem;
    line-height: 1.45;
  }
  .mspp-progress {
    margin: 0.75rem 0 1rem;
  }
  .sheet-nav {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
    overflow-x: visible;
    padding-bottom: 0;
  }
  .sheet-nav .eyebrow {
    display: none;
  }
  .sheet-nav button {
    min-width: 0;
    width: 100%;
  }
  .sheet-header {
    gap: 0.65rem;
  }
  .sheet-header h2 {
    font-size: 1.08rem;
  }
  .mspp-question-row {
    gap: 0.7rem;
    padding: 0.85rem;
  }
  .mspp-question-row .question-main h2 {
    font-size: 0.95rem;
    line-height: 1.42;
  }
  .mspp-question-row .answer-group {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .answer-group button {
    min-height: 42px;
    padding: 0.65rem 0.55rem;
  }
  input, select, textarea {
    font-size: 16px;
    padding: 0.72rem 0.78rem;
  }
  .pager-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .review-score {
    padding: 0.75rem;
  }
}
