/* Settings layout and right rail */

/* Settings tabs: content column + right rail (Settings Proposal design).
   Single column below lg, 2fr/1fr above. */
.settings-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (min-width: 1024px) {
  .settings-cols {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

/* Settings cards: exact spacing from the design (header 24/24/0, body 16/24/24,
   10px row rhythm). Plain CSS because pt-4 / space-y-2.5 / gap-2.5 are not in the
   precompiled Tailwind bundle. Used by both columns. */
.rail-header {
  padding: 24px 24px 0;
}

.rail-body {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.rail-body p {
  margin: 0;
}

.rail-body-roomy {
  gap: 20px;
}

/* the email notification category groups breathe more than text rows */
.rail-body-groups {
  gap: 24px;
}

.rail-bullet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rail-bullet svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* section label inside the branding Live Preview (text-[11px] / mb-2 not in bundle).
   Must out-specify ".rail-body p { margin: 0 }". */
.rail-body p.rail-caption {
  font-size: 11px;
  margin: 0 0 8px;
}

/* "New" pill on a settings tab */
.tab-new-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.webhook-url {
  max-width: 12rem;
}

.rail-body p.rail-never-title {
  font-weight: 600;
  color: hsl(var(--foreground));
}


/* HRIS: connect screen */

.hris-welcome {
  overflow: hidden;
}

.hris-welcome-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--primary) / 0.03));
  border-bottom: 1px solid hsl(var(--border));
}

.hris-welcome-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: hsl(var(--card));
  color: hsl(var(--primary));
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

.hris-welcome-node.is-sync {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.hris-welcome-line {
  flex: 0 1 64px;
  height: 2px;
  background: repeating-linear-gradient(90deg, hsl(var(--primary) / 0.5) 0 6px, transparent 6px 12px);
}

.hris-welcome-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.hris-welcome-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.hris-welcome-lead {
  margin-top: -8px;
  color: hsl(var(--muted-foreground));
}

.hris-welcome-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.hris-welcome-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hris-welcome-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.hris-welcome-points li span:last-child {
  padding-top: 7px;
}

.hris-welcome-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid hsl(var(--border));
}

.hris-welcome-action form {
  order: 2;
}

.hris-welcome-action button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hris-welcome-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.rail-never {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid hsl(var(--border));
}

@media (max-width: 639px) {
  .hris-welcome-action form, .hris-welcome-action button {
    width: 100%;
    justify-content: center;
  }
  .hris-welcome-action form {
    order: 0;
  }
}


/* HRIS: setup header and steps */

.hris-setup-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  padding: 8px 8px 8px 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
}

.hris-setup-title {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.hris-setup-crumb {
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.hris-setup-crumb:hover {
  color: hsl(var(--foreground));
  text-decoration: underline;
}

.hris-setup-exit {
  flex-shrink: 0;
  gap: 6px;
}

@media (max-width: 1279px) {
  .hris-setup-title {
    display: none;
  }
}

@media (max-width: 639px) {
  .hris-setup-bar {
    gap: 8px;
  }
  .hris-setup-exit-text {
    display: none;
  }
}

.hris-steps {
  flex: 1;
  min-width: 0;
}

.hris-steps ol {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hris-steps li {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-steps li:last-child {
  flex: 0 1 auto;
}

.hris-steps li:not(:last-child)::after {
  content: "";
  flex: 1 1 12px;
  min-width: 12px;
  height: 1px;
  margin-right: 8px;
  background: hsl(var(--border));
}

.hris-steps li.is-done:not(:last-child)::after {
  background: hsl(var(--primary) / 0.4);
}

.hris-steps-dot {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}

.hris-steps-dot svg {
  width: 14px;
  height: 14px;
}

.hris-steps-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hris-steps li.is-current {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.hris-steps li.is-current .hris-steps-dot {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.hris-steps li.is-done .hris-steps-dot {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

@media (max-width: 639px) {
  .hris-steps li {
    flex: 0 0 auto;
  }
  .hris-steps li.is-current {
    flex: 1 1 auto;
  }
  .hris-steps li:not(.is-current) .hris-steps-text {
    display: none;
  }
  .hris-steps li {
    gap: 4px;
  }
}

.hris-steps-count {
  display: none;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

@media (max-width: 479px) {
  .hris-steps li:not(.is-current) {
    display: none;
  }
  .hris-steps li.is-current::after {
    display: none;
  }
  .hris-steps-count {
    display: inline;
  }
}

@media (max-width: 639px) {
  .hris-steps li:not(:last-child)::after {
    flex: 0 0 6px;
    min-width: 6px;
    margin-right: 4px;
  }
  .hris-steps li.is-current:not(:last-child)::after {
    flex: 1 1 6px;
  }
}


/* HRIS: choose what syncs */

/* HRIS sync frequency: Daily / Manual only, radios drawn as pills
   (peer-checked and the pill padding are not in the Tailwind bundle). */
.hris-frequency {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
}

.hris-frequency-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-frequency-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hris-frequency input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hris-frequency label span {
  display: inline-flex;
  padding: 6px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.hris-frequency label input:checked + span {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.hris-frequency label input:focus-visible + span {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.hris-level:has(> [data-controller="ui--switch"] input[type="checkbox"]:not(:checked)) .hris-rules-link {
  display: none;
}

.hris-level {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hris-level-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.hris-level:has(> [data-controller="ui--switch"] input[type="checkbox"]:not(:checked)) .hris-level-icon {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.hris-next {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: hris-next;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hris-next li {
  position: relative;
  padding-left: 32px;
  counter-increment: hris-next;
}

.hris-next li::before {
  content: counter(hris-next);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hris-next strong {
  display: block;
  font-weight: 600;
  color: hsl(var(--foreground));
}


/* HRIS: HRIS page (banners and the What Syncs card) */

.hris-resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px;
  border: 1px solid hsl(var(--warning) / 0.4);
  border-radius: 12px;
  background: hsl(var(--warning) / 0.08);
}

.hris-waiting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid hsl(var(--primary) / 0.25);
  border-radius: 12px;
  background: hsl(var(--primary) / 0.05);
}

.hris-complete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px;
  border: 1px solid hsl(var(--success) / 0.4);
  border-radius: 12px;
  background: hsl(var(--success) / 0.08);
}

.hris-syncs-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hris-syncs-form {
  gap: 4px;
}

.hris-syncs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.hris-syncs-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-syncs-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.hris-syncs-next {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--card));
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-syncs-next span {
  flex: 1;
}

.hris-syncs-next:hover {
  border-color: hsl(var(--primary) / 0.5);
}

@media (max-width: 639px) {
  .hris-complete > a, .hris-resume > a {
    width: 100%;
    justify-content: center;
  }
}


/* HRIS: review import */

.hris-import-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 24px -25px -25px;
  padding: 14px 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 0 0 12px 12px;
  background: hsl(var(--card));
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.hris-review-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hris-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  overflow: hidden;
}

.hris-stats > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 16px;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.hris-stats > div:nth-child(-n+2) {
  border-top: 0;
}

.hris-stats > div:nth-child(even) {
  border-left: 1px solid hsl(var(--border));
}

.hris-stats strong {
  flex: none;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}

.hris-stats > div > span:last-child {
  min-width: 0;
}

@media (max-width: 479px) {
  .hris-stats > div {
    gap: 8px;
    padding: 8px 10px;
  }
}

.hris-stats-icon {
  flex: none;
  display: inline-flex;
  padding: 6px;
  border-radius: 8px;
}

@media (min-width: 1024px) {
  .hris-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hris-stats > div {
    border-top: 0;
  }
  .hris-stats > div + div {
    border-left: 1px solid hsl(var(--border));
  }
}

.hris-import-bar small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

.hris-review-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-review-who strong {
  font-weight: 500;
  color: hsl(var(--foreground));
}

.hris-review-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-review-note svg {
  margin-top: 3px;
}

.hris-import-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}


/* HRIS: groups from an HR field (hidden page; the detail cards reuse its box and icon) */

.hris-make {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hris-make-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.hris-make-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 760px;
}

.hris-make-intro h2 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hris-make-intro p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-make-imported {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: hsl(var(--success) / 0.15);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hris-make-imported > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: hsl(var(--success));
}

.hris-make-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.hris-make-fields {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
}

.hris-make-fields form {
  display: block;
}

.hris-make-fields-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
}

.hris-make-fields-head h3, .hris-make-groups-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.hris-make-fields-head span, .hris-make-limit, .hris-make-privacy, .hris-make-note {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.hris-make-privacy {
  margin-top: 4px;
  font-size: 0.75rem;
}

.hris-make-field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid hsl(var(--border));
  border-radius: 10px;
  text-align: left;
}

button.hris-make-field:not(:disabled):hover {
  border-color: hsl(var(--primary) / 0.5);
}

button.hris-make-field:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hris-make-field.is-on {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
}

.hris-make-field.is-off {
  border-style: dashed;
}

.hris-make-field:focus-visible, .hris-make-remove:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.hris-make-box {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid hsl(var(--input));
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary-foreground));
}

.hris-make-field.is-on .hris-make-box {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
}

.hris-make-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hris-make-field.is-off .hris-make-icon {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.hris-make-field-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-make-field-text small {
  font-size: 0.75rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

.hris-make-groups {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hris-make-groups-title span {
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-size: 0.8125rem;
}

.hris-make-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-make-empty strong {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.hris-make-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
}

.hris-make-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hris-make-section-head > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hris-make-section-head strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.hris-make-section-head strong span {
  margin-left: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.hris-make-section-head small {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.hris-make-remove {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.hris-make-remove:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.hris-make-warn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: hsl(var(--warning) / 0.14);
  font-size: 0.8125rem;
}

.hris-make-warn svg {
  margin-top: 2px;
  color: hsl(var(--warning));
}

.hris-make-warn button {
  display: inline;
  text-align: left;
}

.hris-make-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hris-make-value {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  cursor: pointer;
}

.hris-make-value[hidden] {
  display: none;
}

.hris-make-value:has(input:checked) {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.05);
}

.hris-make-value input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: hsl(var(--primary));
}

.hris-make-value-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-make-value-text > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hris-make-value:has(input:not(:checked)) .hris-make-value-text > span {
  color: hsl(var(--muted-foreground));
}

.hris-make-value-text small {
  font-size: 0.75rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

.hris-make-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: hsl(var(--muted));
  font-size: 0.8125rem;
}

.hris-make-more button {
  font-weight: 500;
  color: hsl(var(--primary));
}

.hris-make-smart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 2px dashed hsl(var(--input));
  border-radius: 12px;
}

.hris-make-smart > div {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-make-smart strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.hris-make-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hris-make-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hris-make-fold > summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}

.hris-make-fold > form, .hris-make-fold > .hris-make-field {
  margin-top: 8px;
}

@media (max-width: 480px) {
  .hris-make-value {
    flex: 1 1 calc(50% - 4px);
    padding: 8px 10px;
  }
}


/* HRIS: details we import */

.hris-imported-lede {
  margin: 16px 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-imported {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 1100px) {
  .hris-imported {
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: start;
  }
}

.hris-imported-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.hris-imported-groups h3, .hris-imported-sample h4 {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.hris-pick-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 12px;
}

@media (min-width: 768px) {
  .hris-pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hris-pick {
  position: relative;
  cursor: pointer;
}

.hris-pick input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hris-pick:hover {
  border-color: hsl(var(--primary) / 0.5);
}

.hris-pick:has(input:checked) {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
}

.hris-pick:has(input:checked) .hris-make-box {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
}

.hris-pick:not(:has(input:checked)) .hris-make-icon {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.hris-pick:has(input:disabled) {
  cursor: not-allowed;
}

.hris-pick:has(input:focus-visible) {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.hris-imported-sample {
  padding: 12px 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--muted) / 0.4);
}

.hris-imported-sample-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.hris-imported-sample-head button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--primary));
}

.hris-imported-sample-head button:hover {
  background: hsl(var(--primary) / 0.08);
}

.hris-imported-sample h4 {
  margin-top: 12px;
}

.hris-imported-sample dl {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.hris-imported-sample [hidden] {
  display: none;
}

.hris-imported-sample dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.8125rem;
}

.hris-imported-sample dt {
  color: hsl(var(--muted-foreground));
}

.hris-imported-sample dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.hris-imported-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}


/* HRIS: rule dialog (smart group and import rule) */

.hris-custom-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hris-custom-lede {
  margin-top: -4px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-custom-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hris-custom-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.hris-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 0.875rem;
}

.hris-match label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hris-match input {
  margin: 0;
  accent-color: hsl(var(--primary));
}

.hris-conds {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hris-conds:empty {
  display: none;
}

.hris-cond {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
}

.hris-cond.is-new {
  border-style: dashed;
}

.hris-cond-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hris-cond-select {
  appearance: none;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--background)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7181' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 0;
}

.hris-cond-field {
  flex: 1 1 auto;
}

.hris-cond-op {
  flex: 0 0 150px;
}

.hris-cond-remove {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: hsl(var(--destructive));
}

.hris-cond-remove:hover {
  background: hsl(var(--destructive) / 0.08);
}

.hris-cond-values {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hris-cond-values:empty {
  display: none;
}

.hris-cond-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}

.hris-cond-val {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  min-width: 0;
}

.hris-cond-val[hidden] {
  display: none;
}

.hris-cond-val:has(input:checked) {
  background: hsl(var(--primary) / 0.06);
}

.hris-cond-val input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  accent-color: hsl(var(--primary));
}

.hris-cond-val-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hris-cond-val-count {
  margin-left: auto;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

.hris-cond-more {
  align-self: flex-start;
  padding: 2px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--primary));
}

.hris-cond-note {
  padding: 0 10px;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.hris-cond-add {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
}

.hris-cond-add:hover {
  background: hsl(var(--muted));
}

.hris-cond-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.hris-cond-start[hidden] {
  display: none;
}

.hris-cond-start button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.hris-cond-start button:hover {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.04);
}

.hris-custom-hint {
  margin: -8px 0;
  text-align: right;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.hris-cond-add[hidden] {
  display: none;
}

.hris-who {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: hsl(var(--muted));
}

.hris-who-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.875rem;
}

.hris-who-head strong {
  font-size: 1.5rem;
  font-weight: 600;
  margin-right: 4px;
}

.hris-who-all {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--primary));
}

.hris-who-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hris-who-chip {
  padding: 2px 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--background));
  font-size: 0.8125rem;
}

.hris-who-chip[hidden] {
  display: none;
}

.hris-who-rest, .hris-who-note {
  margin: 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 480px) {
  .hris-cond-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hris-cond-row {
    flex-wrap: wrap;
  }
  .hris-cond-field {
    flex: 1 1 calc(100% - 52px);
  }
  .hris-cond-remove {
    order: 2;
  }
  .hris-cond-op {
    order: 3;
    flex: 1 1 100%;
  }
}

.hris-who-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: hsl(var(--warning) / 0.12);
  font-size: 0.8125rem;
}

.hris-who-warn svg {
  margin-top: 2px;
}

.hris-match-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: hsl(var(--muted));
}

.hris-match-seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hris-match-seg span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.hris-match-seg input:checked + span {
  background: hsl(var(--card));
  font-weight: 500;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.hris-match-seg input:focus-visible + span {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 1px;
}


/* User profile tab */

.profile-dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px 24px;
  margin: 0;
}

@media (min-width: 640px) {
  .profile-dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-dl div {
  min-width: 0;
}

.profile-dl dt {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.profile-dl dd {
  margin: 0;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  overflow-wrap: anywhere;
}

.profile-more {
  margin: 20px 0 14px;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.profile-synced {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.profile-groups {
  display: flex;
  flex-direction: column;
}

.profile-groups > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}

.profile-groups > div:last-child {
  padding-bottom: 0;
}

.profile-groups span {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}
