@import url("portal.css");

/* App shell with top bar */
.rh-body { margin: 0; background: var(--kb-gray-50); }
.rh-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--kb-gray-50);
}

.rh-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: .65rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--kb-gray-200);
  box-shadow: 0 1px 0 rgba(0, 40, 80, 0.03);
}
.rh-topbar__left,
.rh-topbar__right {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}
.rh-topbar__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.rh-topbar__brand:hover { text-decoration: none; }
.rh-topbar__brand img {
  height: 36px;
  width: auto;
  display: block;
}
.rh-topbar__titles {
  display: flex;
  align-items: center;
  min-width: 0;
}
.rh-topbar__titles span {
  color: var(--kb-gray-500);
  font-size: .9rem;
  font-weight: 600;
}
.rh-topbar__link {
  color: var(--kb-gray-700);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  padding: .4rem .65rem;
  border-radius: 8px;
}
.rh-topbar__link:hover {
  background: var(--kb-gray-100);
  color: var(--kb-blue-dark);
  text-decoration: none;
}

.rh-profile { position: relative; }
.rh-profile__btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--kb-gray-200);
  background: #fff;
  border-radius: 999px;
  padding: .28rem .7rem .28rem .28rem;
  cursor: pointer;
  font: inherit;
  color: var(--kb-gray-900);
}
.rh-profile__btn:hover,
.rh-profile.is-open .rh-profile__btn {
  border-color: var(--kb-blue);
  background: var(--kb-blue-soft);
}
.rh-profile__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--kb-blue-dark);
  color: #fff;
  flex: 0 0 auto;
}
.rh-profile__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}
.rh-profile__name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--kb-blue-dark);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rh-profile__role {
  font-size: .75rem;
  color: var(--kb-gray-500);
}
.rh-profile__caret {
  color: var(--kb-gray-500);
  font-size: .75rem;
  margin-left: .1rem;
}
.rh-profile__menu {
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  width: min(260px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 30, 60, 0.12);
  padding: .45rem;
  z-index: 50;
}
.rh-profile__menu-head {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .65rem .7rem .75rem;
  border-bottom: 1px solid var(--kb-gray-100);
  margin-bottom: .35rem;
}
.rh-profile__menu-head strong {
  color: var(--kb-blue-dark);
  font-size: .92rem;
}
.rh-profile__menu-head span {
  color: var(--kb-gray-500);
  font-size: .8rem;
  word-break: break-all;
}
.rh-profile__menu a,
.rh-profile__menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--kb-gray-700);
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: .65rem .7rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.rh-profile__menu a:hover,
.rh-profile__menu button:hover {
  background: var(--kb-gray-100);
  color: var(--kb-blue-dark);
  text-decoration: none;
}
.rh-profile__menu form { margin: 0; }

/* Shell */
.rh-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  flex: 1;
  min-height: 0;
  background: var(--kb-gray-50);
}
.rh-nav {
  background: linear-gradient(180deg, var(--kb-blue-dark) 0%, #003964 100%);
  color: #fff;
  padding: 1rem .85rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
}
.rh-nav__section {
  margin: .75rem .4rem .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(219, 234, 254, .55);
  font-weight: 700;
}
.rh-nav a {
  color: #dbeafe;
  display: block;
  padding: .55rem .75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.rh-nav a:hover,
.rh-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.rh-main {
  padding: 1.35rem 1.5rem 2.5rem;
  min-width: 0;
}
.rh-page { max-width: 1100px; }

/* Page header */
.rh-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.rh-top h1 {
  margin: 0;
  color: var(--kb-blue-dark);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}
.rh-top__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.page-eyebrow {
  margin: 0 0 .25rem;
  font-size: .85rem;
  color: var(--kb-gray-500);
}
.page-eyebrow a {
  color: var(--kb-gray-500);
  text-decoration: none;
}
.page-eyebrow a:hover {
  color: var(--kb-blue-dark);
  text-decoration: underline;
}
.page-lead {
  margin: .35rem 0 0;
  color: var(--kb-gray-500);
  font-size: .95rem;
  max-width: 42rem;
}

/* Section cards (shared with job form) */
.rh-section,
.job-section {
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
}
.rh-section__head,
.job-section__head {
  padding: 1rem 1.15rem .75rem;
  border-bottom: 1px solid var(--kb-gray-100);
  background: linear-gradient(180deg, #f8fbfe 0%, #fff 100%);
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.rh-section__head h2,
.job-section__head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--kb-blue-dark);
}
.rh-section__head p,
.job-section__head p {
  margin: .3rem 0 0;
  color: var(--kb-gray-500);
  font-size: .9rem;
}
.rh-section__body,
.job-section__body {
  padding: 1rem 1.15rem 1.15rem;
}
.rh-section__body--grid,
.job-section__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}
.rh-section__body--stack,
.job-section__body--stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
}
.rh-section__body--flush { padding: 0; }

.job-form-page { max-width: 960px; }
.job-form-eyebrow { margin: 0 0 .25rem; font-size: .85rem; color: var(--kb-gray-500); }
.job-form-eyebrow a { color: var(--kb-gray-500); text-decoration: none; }
.job-form-eyebrow a:hover { color: var(--kb-blue-dark); text-decoration: underline; }
.job-form-header__actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.job-form-nav,
.rh-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1rem;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: .55rem 0;
  background: color-mix(in srgb, var(--kb-gray-50) 92%, white);
  backdrop-filter: blur(4px);
}
.job-form-nav a,
.rh-jump-nav a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--kb-blue-dark);
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 999px;
  padding: .35rem .7rem;
  text-decoration: none;
}
.job-form-nav a:hover,
.rh-jump-nav a:hover {
  border-color: var(--kb-blue);
  background: var(--kb-blue-soft);
}

.rh-section .field,
.job-section .field { margin: 0; gap: .35rem; }
.rh-section .field > span,
.job-section .field > span,
.rh-section .field > label,
.field-label {
  font-weight: 600;
  color: var(--kb-gray-700);
  font-size: .88rem;
}
.field--full { grid-column: 1 / -1; }
.field--wide { grid-column: span 1; }
.req-mark { color: var(--kb-danger); font-style: normal; font-weight: 700; }
.field-hint { display: block; margin-top: .25rem; font-size: .8rem; color: var(--kb-gray-500); font-weight: 400; }
.field-hint-inline { font-weight: 400; color: var(--kb-gray-500); }
.field-hint--warn { color: #9a3412; }
.field-link {
  display: inline-block;
  margin-top: .3rem;
  font-size: .82rem;
  color: var(--kb-blue);
  text-decoration: none;
  font-weight: 600;
}
.field-link:hover { text-decoration: underline; }

.field-advanced {
  grid-column: 1 / -1;
  border: 1px dashed var(--kb-gray-200);
  border-radius: 8px;
  padding: .55rem .75rem;
  background: var(--kb-gray-50);
}
.field-advanced summary {
  cursor: pointer;
  font-size: .85rem;
  color: var(--kb-gray-700);
  font-weight: 600;
}

.salary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.salary-row input { flex: 1 1 220px; }
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: var(--kb-gray-700);
  white-space: nowrap;
}
.job-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}
.job-section--actions .job-actions {
  padding: 0 1.15rem 0.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
}
.job-actions__primary,
.job-actions__secondary { display: flex; flex-wrap: wrap; gap: .5rem; }
.job-actions-note { padding: 0 1.15rem 1.1rem; margin: 0; }

/* Filters */
.rh-filters {
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
}
.rh-filters__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: .75rem;
}
.rh-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
}
.stat .muted { font-size: .85rem; }
.stat strong {
  display: block;
  margin-top: .25rem;
  font-size: 1.7rem;
  color: var(--kb-blue-dark);
  line-height: 1.1;
}

/* Dashboard */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.dash-kpi {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
  transition: border-color .15s ease, transform .15s ease;
}
.dash-kpi:hover {
  border-color: color-mix(in srgb, var(--kb-blue) 35%, white);
  transform: translateY(-1px);
}
.dash-kpi--alert {
  border-color: #fdba74;
  background: #fffbeb;
}
.dash-kpi__label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--kb-gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-kpi strong {
  font-size: 1.85rem;
  color: var(--kb-blue-dark);
  line-height: 1.1;
}
.dash-kpi__hint {
  font-size: .8rem;
  color: var(--kb-gray-500);
}
.dash-alert {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--kb-gray-200);
}
.dash-alert p { margin: .2rem 0 0; font-size: .9rem; }
.dash-alert--warn { background: #fffbeb; border-color: #fcd34d; }
.dash-alert--danger { background: #fef3f2; border-color: #fecaca; color: var(--kb-danger); }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: .9rem;
}
.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-list li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--kb-gray-100);
}
.dash-list li:last-child { border-bottom: none; }
.dash-list a {
  display: grid;
  gap: .15rem;
  min-width: 0;
  text-decoration: none !important;
  color: inherit;
}
.dash-list a strong {
  color: var(--kb-blue-dark);
  font-size: .95rem;
}
.dash-list a span {
  color: var(--kb-gray-500);
  font-size: .82rem;
}
.dash-list--compact li { padding: .55rem 0; border-bottom-color: var(--kb-gray-100); }
.dash-list--compact { padding: 0 .2rem; }
.dash-subblock {
  border-top: 1px solid var(--kb-gray-100);
  padding: .85rem 1.1rem 1rem;
}
.dash-subblock h3 {
  margin: 0 0 .55rem;
  font-size: .88rem;
  color: var(--kb-gray-700);
}
.dash-funnel { display: grid; gap: .65rem; }
.dash-funnel__row {
  display: grid;
  gap: .3rem;
  text-decoration: none !important;
  color: inherit;
}
.dash-funnel__meta {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--kb-gray-700);
}
.dash-funnel__track {
  height: .55rem;
  background: var(--kb-gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.dash-funnel__bar {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: 999px;
}
.dash-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .45rem;
  align-items: end;
  min-height: 140px;
  margin-bottom: 1.1rem;
}
.dash-bars__col {
  display: grid;
  gap: .25rem;
  justify-items: center;
  font-size: .72rem;
  color: var(--kb-gray-500);
}
.dash-bars__track {
  width: 100%;
  height: 100px;
  background: var(--kb-gray-50);
  border-radius: 8px 8px 4px 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.dash-bars__track span {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--kb-accent), var(--kb-blue));
  border-radius: 8px 8px 0 0;
  min-height: 4px;
}
.dash-bars__col strong {
  color: var(--kb-blue-dark);
  font-size: .85rem;
}
.dash-subtitle {
  margin: 0 0 .55rem;
  font-size: .92rem;
  color: var(--kb-blue-dark);
}
.dash-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .65rem;
}
.dash-shortcuts a {
  display: grid;
  gap: .2rem;
  padding: .9rem 1rem;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  background: var(--kb-gray-50);
  text-decoration: none !important;
  color: inherit;
}
.dash-shortcuts a:hover {
  background: var(--kb-blue-soft);
  border-color: color-mix(in srgb, var(--kb-blue) 25%, white);
}
.dash-shortcuts strong {
  color: var(--kb-blue-dark);
  font-size: .95rem;
}
.dash-shortcuts span {
  font-size: .82rem;
  color: var(--kb-gray-500);
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* Tables */
.table-wrap { overflow: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table th,
.table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--kb-gray-200);
  text-align: left;
  font-size: .95rem;
  vertical-align: middle;
}
.table th {
  background: var(--kb-gray-50);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--kb-gray-500);
  font-weight: 700;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fbfe; }
.table a { font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.table-actions .inline-delete { margin: 0; }
.btn-sm {
  padding: .35rem .65rem !important;
  font-size: .85rem !important;
}

.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--kb-gray-100);
  color: var(--kb-gray-700);
}
.badge-published { background: #ecfdf3; color: var(--kb-success); }
.badge-draft { background: #fff7ed; color: #c2410c; }
.badge-closed,
.badge-paused,
.badge-archived { background: var(--kb-gray-100); color: var(--kb-gray-700); }
.badge-received { background: var(--kb-blue-soft); color: var(--kb-blue-dark); }
.badge-screening,
.badge-interview,
.badge-evaluation { background: #eff6ff; color: #1d4ed8; }
.badge-approved { background: #ecfdf3; color: var(--kb-success); }
.badge-rejected,
.badge-withdrawn { background: #fef3f2; color: var(--kb-danger); }

.empty-block {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--kb-gray-500);
}
.empty-block h3 {
  margin: 0 0 .4rem;
  color: var(--kb-blue-dark);
}

/* Form builder — Google Forms style */
.fb-page {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 3rem;
}
.fb-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: .75rem 0;
  background: linear-gradient(180deg, var(--kb-gray-50) 70%, transparent);
}
.fb-topbar__left {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
  flex: 1;
}
.fb-back {
  font-size: .85rem;
  font-weight: 600;
  color: var(--kb-gray-500);
  width: fit-content;
}
.fb-back:hover { color: var(--kb-blue-dark); text-decoration: none; }
.fb-title-input {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--kb-blue-dark);
  padding: .15rem 0;
  width: min(100%, 34rem);
}
.fb-title-input:focus {
  outline: none;
  border-bottom: 2px solid var(--kb-blue);
}
.fb-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.fb-mode {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 999px;
  padding: .15rem;
}
.fb-mode__btn {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: .4rem .9rem;
  font: inherit;
  font-weight: 600;
  font-size: .88rem;
  color: var(--kb-gray-500);
  cursor: pointer;
}
.fb-mode__btn.is-active {
  background: var(--kb-blue-soft);
  color: var(--kb-blue-dark);
}

.fb-canvas-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1rem;
  align-items: start;
}
.fb-canvas {
  display: grid;
  gap: .35rem;
}
.fb-aside {
  display: grid;
  gap: .75rem;
  position: sticky;
  top: 4.5rem;
}
.fb-aside__card {
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 14px;
  padding: .95rem;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
}
.fb-aside__card h3 {
  margin: 0 0 .55rem;
  font-size: .9rem;
  color: var(--kb-blue-dark);
}
.fb-aside__card ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--kb-gray-700);
  font-size: .86rem;
  line-height: 1.45;
}
.fb-versions { list-style: none; padding-left: 0 !important; }
.fb-versions li { margin-bottom: .35rem; }

.fb-preview-banner {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
  border-radius: 12px;
  padding: .7rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.fb-section { display: grid; gap: .35rem; margin-bottom: .6rem; }
.fb-section__card,
.fb-q {
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 14px;
  padding: 1.05rem 1.15rem;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fb-section__card.is-selected,
.fb-q.is-selected {
  border-color: var(--kb-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 179, .12);
}
.fb-q.is-idle { cursor: pointer; }
.fb-q.is-idle:hover {
  border-color: color-mix(in srgb, var(--kb-blue) 35%, white);
}
.fb-section__title {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--kb-blue-dark);
  padding: 0;
}
.fb-section__title:focus { outline: none; }
.fb-section__card h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--kb-blue-dark);
}
.fb-section__actions { margin-top: .55rem; }

.fb-q__head {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: flex-start;
  margin-bottom: .65rem;
}
.fb-q__title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--kb-gray-900);
}
.fb-req { color: var(--kb-danger); }
.fb-pill {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--kb-blue-dark);
  background: var(--kb-blue-soft);
  border-radius: 999px;
  padding: .2rem .55rem;
}
.fb-q__edit-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: .65rem;
  margin-bottom: .75rem;
}
.fb-q__label {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--kb-gray-200);
  background: transparent;
  font-size: 1.05rem;
  font-weight: 600;
  padding: .35rem 0;
  color: var(--kb-gray-900);
}
.fb-q__label:focus {
  outline: none;
  border-bottom-color: var(--kb-blue);
}
.fb-type {
  border: 1px solid var(--kb-gray-200);
  border-radius: 10px;
  padding: .45rem .55rem;
  font: inherit;
  background: var(--kb-gray-50);
}

.fb-ghost,
.fb-q select.fb-ghost,
.fb-q textarea.fb-ghost,
.fb-q input.fb-ghost {
  width: 100%;
  border: none;
  border-bottom: 1px dashed var(--kb-gray-200);
  background: transparent;
  padding: .55rem 0;
  color: var(--kb-gray-500);
  border-radius: 0;
}
.fb-file-ghost {
  border: 1.5px dashed var(--kb-gray-200);
  border-radius: 10px;
  padding: .85rem;
  color: var(--kb-gray-500);
  font-size: .9rem;
  background: var(--kb-gray-50);
}
.fb-preview-text {
  margin: 0;
  color: var(--kb-gray-700);
  line-height: 1.45;
}
.fb-choices { display: grid; gap: .4rem; }
.fb-choice-line {
  display: flex;
  gap: .5rem;
  align-items: center;
  color: var(--kb-gray-700);
  font-weight: 500;
}

.fb-options { display: grid; gap: .4rem; margin-bottom: .75rem; }
.fb-opt-row {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  gap: .45rem;
  align-items: center;
}
.fb-opt-mark { color: var(--kb-gray-500); text-align: center; }
.fb-opt-row input {
  border: none;
  border-bottom: 1px solid var(--kb-gray-200);
  background: transparent;
  padding: .4rem 0;
  border-radius: 0;
}
.fb-opt-row input:focus {
  outline: none;
  border-bottom-color: var(--kb-blue);
}

.fb-more {
  margin-top: .85rem;
  border-top: 1px solid var(--kb-gray-100);
  padding-top: .65rem;
}
.fb-more summary {
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  color: var(--kb-blue);
  list-style: none;
}
.fb-more summary::-webkit-details-marker { display: none; }
.fb-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .65rem;
}
.fb-advanced-grid label {
  display: grid;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--kb-gray-700);
}
.fb-hint {
  margin: .55rem 0 0;
  font-size: .8rem;
  color: var(--kb-gray-500);
}
.fb-q__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--kb-gray-100);
}
.fb-switch {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--kb-gray-700);
  cursor: pointer;
}
.fb-q__tools { display: flex; gap: .25rem; }
.fb-icon-btn {
  border: 1px solid var(--kb-gray-200);
  background: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--kb-gray-700);
}
.fb-icon-btn:hover { background: var(--kb-gray-50); }
.fb-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.fb-icon-btn--danger:hover { background: #fef3f2; color: var(--kb-danger); }
.fb-link-btn {
  border: none;
  background: none;
  color: var(--kb-blue);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  width: fit-content;
}

.fb-insert {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 1.1rem;
}
.fb-insert__btn {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--kb-gray-200);
  background: #fff;
  color: var(--kb-blue-dark);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 2px 8px rgba(0, 40, 80, .08);
}
.fb-insert:hover .fb-insert__btn,
.fb-insert:focus-within .fb-insert__btn,
.fb-insert__btn[aria-expanded="true"] {
  opacity: 1;
  transform: none;
}
.fb-picker {
  position: absolute;
  top: 2.1rem;
  z-index: 15;
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 40, 80, .16);
  padding: .35rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .2rem;
  width: min(360px, 90vw);
}
.fb-picker button {
  border: none;
  background: transparent;
  text-align: left;
  padding: .55rem .7rem;
  border-radius: 8px;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--kb-gray-700);
  cursor: pointer;
}
.fb-picker button:hover {
  background: var(--kb-blue-soft);
  color: var(--kb-blue-dark);
}
.fb-bottom-actions {
  display: flex;
  justify-content: center;
  padding: .8rem 0 1.5rem;
}

@media (max-width: 960px) {
  .fb-canvas-wrap { grid-template-columns: 1fr; }
  .fb-aside { position: static; }
  .fb-q__edit-top { grid-template-columns: 1fr; }
  .fb-advanced-grid { grid-template-columns: 1fr; }
  .fb-insert__btn { opacity: 1; transform: none; }
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 163, 224, .18), transparent 40%),
    linear-gradient(160deg, var(--kb-blue-dark), var(--kb-blue));
}
.login-card {
  width: min(420px, calc(100% - 1rem));
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 24px 50px rgba(0, 20, 50, .25);
}
.login-card h1 {
  margin: 0 0 .35rem;
  color: var(--kb-blue-dark);
  font-size: 1.35rem;
}
.login-card .field { margin-top: .75rem; }
.login-card .field span,
.login-card .field { font-weight: 600; color: var(--kb-gray-700); font-size: .9rem; }

/* Application detail */
.app-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
}
.app-meta-item {
  background: var(--kb-gray-50);
  border: 1px solid var(--kb-gray-200);
  border-radius: 10px;
  padding: .8rem .9rem;
}
.app-meta-item .label {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--kb-gray-500);
  font-weight: 700;
  margin-bottom: .2rem;
}
.answer-list { display: grid; gap: .85rem; }
.answer-item {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--kb-gray-100);
}
.answer-item:last-child { border-bottom: none; padding-bottom: 0; }
.answer-item h3 {
  margin: 0 0 .25rem;
  font-size: .92rem;
  color: var(--kb-blue-dark);
}
.answer-item p {
  margin: 0;
  color: var(--kb-gray-700);
  white-space: pre-wrap;
}
.note-card {
  background: var(--kb-gray-50);
  border: 1px solid var(--kb-gray-200);
  border-radius: 10px;
  padding: .85rem 1rem;
  margin-bottom: .7rem;
}
.note-card h3 {
  margin: 0 0 .35rem;
  font-size: .88rem;
  color: var(--kb-gray-700);
}
.note-card pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--kb-gray-900);
}

/* Preview */
.preview-banner {
  margin-bottom: 1rem;
}

/* Triagem / pipeline */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .85rem;
  padding: 1rem 1.15rem 1.15rem;
}
.pipeline-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1rem;
  border: 1px solid var(--kb-gray-200);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pipeline-card:hover {
  border-color: var(--kb-blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}
.pipeline-card strong {
  color: var(--kb-blue-dark);
  font-size: 1rem;
}
.pipeline-total { color: var(--kb-gray-500); font-size: .9rem; }
.pipeline-chips { display: flex; flex-wrap: wrap; gap: .35rem; }

.stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}
.stage-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  color: var(--kb-gray-700);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
}
.stage-chip strong { color: var(--kb-blue-dark); }
.stage-chip.is-active,
.stage-chip:hover {
  border-color: var(--kb-blue);
  background: var(--kb-blue-soft);
  color: var(--kb-blue-dark);
  text-decoration: none;
}

.bulk-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  padding: .7rem 1rem;
  margin-bottom: .8rem;
  background: var(--kb-blue-dark);
  color: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.bulk-bar select {
  min-width: 180px;
}
.quick-stage {
  margin-top: .35rem;
}
.quick-stage select {
  font-size: .8rem;
  padding: .3rem .45rem;
  max-width: 160px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: .7rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.kanban-col {
  background: #eef3f8;
  border-radius: 12px;
  min-height: 320px;
  border: 1px solid var(--kb-gray-200);
  display: flex;
  flex-direction: column;
  min-width: 190px;
}
.kanban-col__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--kb-gray-200);
}
.kanban-col__head h2 {
  margin: 0;
  font-size: .88rem;
  color: var(--kb-blue-dark);
}
.kanban-col__body {
  padding: .55rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  overflow: auto;
  max-height: 70vh;
}
.kanban-card {
  background: #fff;
  border: 1px solid var(--kb-gray-200);
  border-radius: 10px;
  padding: .7rem;
  box-shadow: 0 1px 2px rgba(0, 40, 80, 0.04);
}
.kanban-card a {
  color: var(--kb-blue-dark);
  text-decoration: none;
}
.kanban-card a:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .rh-topbar { padding: .55rem .85rem; }
  .rh-topbar__titles { display: none; }
  .rh-topbar__link { display: none; }
  .rh-profile__meta { display: none; }
  .rh-profile__btn { padding: .28rem; }
  .rh-shell { grid-template-columns: 1fr; }
  .rh-nav {
    position: relative;
    top: 0;
    height: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: .25rem;
  }
  .rh-nav__section { grid-column: 1 / -1; }
  .fb-canvas-wrap { grid-template-columns: 1fr; }
  .rh-section__body--grid,
  .job-section__body,
  .job-two-cols { grid-template-columns: 1fr; }
  .field--wide { grid-column: 1; }
  .rh-main { padding: 1rem; }
  .kanban { grid-template-columns: repeat(7, minmax(170px, 1fr)); }
}
