.hr-intake-page{
  display:grid;
  gap:18px;
}

.hri-header,
.hri-form,
.hri-flow-card,
.hri-link-card{
  padding:20px;
  border-radius:18px;
}

.hri-kicker{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#64748b;
  font-weight:700;
}

.hri-title{
  margin:4px 0 8px 0;
  line-height:1.1;
}

.hri-header{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.hri-header-copy{
  flex:1 1 520px;
  min-width:280px;
}

.hri-header-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.hri-header-actions .btn{
  min-height:44px;
  padding:0 18px;
  border-radius:999px;
}

.hri-flow-card{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.hri-flow-item{
  padding:14px 16px;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  font-weight:600;
  color:#0f172a;
  min-height:58px;
  display:flex;
  align-items:center;
}

.hri-banner,
.hri-status-banner,
.hri-linked-banner{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid #a7f3d0;
  background:#ecfdf5;
  color:#047857;
  font-weight:500;
}

.hri-form{
  display:grid;
  gap:22px;
}

.hri-section{
  display:grid;
  gap:14px;
  padding-top:4px;
}

.hri-section + .hri-section{
  border-top:1px solid #e5e7eb;
  padding-top:22px;
}

.hri-section-head h2{
  margin:0 0 4px 0;
  line-height:1.15;
}

.hri-section-head p,
.hri-section-head .muted{
  margin:0;
}

.hri-grid,
.hri-fields-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px 16px;
}

.hri-field,
.hri-form .field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.hri-form label,
.hri-field label,
.hri-form .label{
  font-size:13px;
  font-weight:700;
  color:#334155;
}

.hri-form input[type="text"],
.hri-form input[type="email"],
.hri-form input[type="tel"],
.hri-form input[type="date"],
.hri-form input[type="number"],
.hri-form select,
.hri-form textarea,
.hri-link-card select{
  width:100%;
  min-height:46px;
  border:1px solid #dbe1ea;
  border-radius:14px;
  background:#fff;
  padding:12px 14px;
  font:inherit;
  color:#0f172a;
  outline:none;
  box-sizing:border-box;
}

.hri-form textarea{
  min-height:110px;
  resize:vertical;
}

.hri-form input:focus,
.hri-form select:focus,
.hri-form textarea:focus,
.hri-link-card select:focus{
  border-color:#94a3b8;
  box-shadow:0 0 0 3px rgba(148,163,184,.12);
}

.hri-link-card{
  margin-bottom:18px;
  display:grid;
  gap:14px;
}

.hri-link-card .field,
.hri-link-card .hri-field{
  max-width:none;
}

.hri-link-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.hri-link-actions .btn{
  min-height:44px;
  padding:0 18px;
  border-radius:999px;
}

.hri-folder-preview{
  margin:2px 0 2px;
  padding:12px 14px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  font-size:14px;
  line-height:1.45;
  color:#334155;
}

.hri-platform-login-section{
  border-top:1px solid #e5e7eb;
  padding-top:22px;
}

.hri-platform-login-card,
.hri-confirmation-card{
  border:1px solid #bae6fd;
  border-radius:16px;
  background:#f0f9ff;
  padding:18px;
  display:grid;
  gap:16px;
}

.hri-platform-login-meta,
.hri-confirmation-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.hri-platform-login-meta > div,
.hri-confirmation-grid > div{
  display:grid;
  gap:4px;
  min-width:0;
}

.hri-platform-login-meta strong,
.hri-confirmation-grid strong{
  color:#0f172a;
  overflow-wrap:anywhere;
}

.hri-platform-login-note{
  margin:0;
}

.hri-field-help{
  margin:6px 0 0;
  line-height:1.35;
}

.hri-confirmation-card{
  border-color:#a7f3d0;
  background:#ecfdf5;
}

.hri-confirmation-card h2{
  margin:0;
}

.hri-confirmation-warnings{
  margin:0;
  padding-left:20px;
  color:#92400e;
}

.hri-inline-meta,
.hri-linked-user-meta{
  font-size:14px;
  color:#64748b;
}

.hri-form-summary,
.hri-side-card,
.hri-preview-card{
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
  padding:16px;
}

.hri-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  padding-top:8px;
}

.hri-actions .btn{
  min-height:46px;
  padding:0 18px;
  border-radius:999px;
}

.hri-actions .btn-primary{
  min-width:170px;
}

.hri-actions .btn.is-disabled,
.hri-actions .btn:disabled{
  opacity:.52;
  cursor:not-allowed;
  filter:grayscale(.2);
}

.hri-state-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e5e7eb;
}

.hri-state-note{
  color:#475569;
  font-weight:600;
}

.hri-note,
.hri-help,
.hri-small{
  font-size:13px;
  color:#64748b;
}

.hri-divider{
  height:1px;
  background:#e5e7eb;
  margin:4px 0;
}

.hri-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:#eef2ff;
  color:#4338ca;
}

.hri-pill.is-success{
  background:#dcfce7;
  color:#15803d;
}

.hri-pill.is-warning{
  background:#fef3c7;
  color:#b45309;
}

.hri-pill.is-danger{
  background:#fee2e2;
  color:#b91c1c;
}

.hri-form .checkbox,
.hri-form .check{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
}

.hri-form .checkbox input,
.hri-form .check input{
  width:16px;
  height:16px;
}

@media (max-width: 1180px){
  .hri-flow-card{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px){
  .hri-grid,
  .hri-fields-grid,
  .hri-platform-login-meta,
  .hri-confirmation-grid{
    grid-template-columns:1fr;
  }

  .hri-header{
    align-items:stretch;
  }

  .hri-header-actions{
    width:100%;
  }

  .hri-header-actions .btn{
    flex:1 1 180px;
  }
}

@media (max-width: 640px){
  .hr-intake-page{
    gap:14px;
  }

  .hri-header,
  .hri-form,
  .hri-flow-card,
  .hri-link-card{
    padding:16px;
    border-radius:16px;
  }

  .hri-flow-card{
    grid-template-columns:1fr;
  }

  .hri-link-actions,
  .hri-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .hri-link-actions .btn,
  .hri-actions .btn{
    width:100%;
  }
}

/* [2026-08-30] Linking an existing platform account moved below the form and
   collapsed. It is the exception, not how an intake starts — the page should
   open on the form itself. */
.hr-intake-page .hri-advanced {
  padding: 14px 18px;
  border-radius: 14px;
}

.hr-intake-page .hri-advanced > .hri-advanced-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hr-intake-page .hri-advanced > .hri-advanced-summary::-webkit-details-marker { display: none; }

.hr-intake-page .hri-advanced > .hri-advanced-summary::before {
  content: "▸";
  font-size: 12px;
  opacity: .6;
  transition: transform .12s ease;
}

.hr-intake-page .hri-advanced[open] > .hri-advanced-summary::before { transform: rotate(90deg); }

.hr-intake-page .hri-advanced .hri-link-card,
.hr-intake-page .hri-advanced #hriAlignmentPanel {
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

/* [2026-08-30] Shown when an intake was opened from a self-service submission,
   so it is never ambiguous which answers came from the person and which are
   HRs own. */

/* [2026-08-30] Shown when an intake was opened from a self-service submission,
   so it is never ambiguous which answers came from the person themselves and
   which are HR's own. */
.hr-intake-page .hri-prefilled {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 14px;
}

.hr-intake-page .hri-prefilled strong { color: #166534; }

/* [2026-08-30] Fields the future employee filled in themselves.
   The intake form now has two authors — the candidate and HR — and without a
   visual split it reads as one long form somebody abandoned halfway. The tint
   answers "what still needs me?" at a glance.
   The label carries a word as well as the colour, because a tint on its own says
   nothing to anyone who cannot separate these two blues. */
.hr-intake-page .hri-from-submission,
.hr-intake-page input.hri-from-submission,
.hr-intake-page select.hri-from-submission {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.hr-intake-page .hri-from-submission:focus {
  background: #ffffff;
  border-color: #1d4ed8;
}

.hr-intake-page .hri-field-answered > label::after,
.hr-intake-page .hri-field-answered > .muted::after {
  content: "· enviado";
  margin-left: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #1d4ed8;
  white-space: nowrap;
}

html[lang="en"] .hr-intake-page .hri-field-answered > label::after,
html[lang="en"] .hr-intake-page .hri-field-answered > .muted::after {
  content: "· submitted";
}

/* [2026-08-30] Required-field markers. The asterisk is added by JS from the
   `required` attribute itself, so it can never claim a field is mandatory when
   the save does not actually enforce it. */
.hr-intake-page .hri-req {
  color: #dc2626;
  font-weight: 800;
  margin-left: 2px;
}

.hr-intake-page .hri-required-legend {
  margin: 0 0 16px;
}

/* Shown after a failed save, so the reported names map to visible fields
   instead of making someone hunt. */
.hr-intake-page .input.is-missing {
  border-color: #dc2626;
  background: #fef2f2;
}

.hr-intake-page .input.is-missing:focus {
  outline-color: #dc2626;
}

/* [2026-08-30] The asterisk is drawn by CSS on the field WRAPPER, not injected
   into the label. applyTranslations() rewrites label.textContent from the
   dictionary, which erased an injected span and — worse — captured the starred
   text as that label's i18n fallback. Generated content cannot be overwritten
   that way, and it survives every language switch. */
.hr-intake-page .hri-has-required > label::after {
  content: " *";
  color: #dc2626;
  font-weight: 800;
}
