button,
a,
.primary,
.secondary,
.review,
.approve,
.reject,
.view,
.move,
.edit,
.ghost,
.mini,
.tab,
.link {
  max-width: 100%;
}

button,
.primary,
.secondary,
.review,
.approve,
.reject,
.view,
.move,
.edit,
.ghost,
.mini,
.tab {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-align: center;
}

.actions,
.modal-actions,
.subscription-actions,
.saved-job-actions,
.social-account-actions,
.detail-actions,
.bar {
  min-width: 0;
  flex-wrap: wrap;
}

.actions > *,
.modal-actions > *,
.subscription-actions > *,
.saved-job-actions > *,
.social-account-actions > *,
.detail-actions > *,
.bar > * {
  min-width: 0;
}

.row,
.job,
.candidate,
.social-account,
.history-row {
  min-width: 0;
}

.row > *,
.job > *,
.candidate > *,
.social-account > *,
.history-row > * {
  min-width: 0;
}

.tabs {
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  border-radius: 999px;
  padding-left: 10px;
  padding-right: 10px;
}

.head,
.table-head,
.top,
.jobtop,
.bottom {
  min-width: 0;
}

@media (max-width: 1120px) {
  .table-card .row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .table-card .row > div:not(:first-child):not(.actions) {
    display: block;
  }

  .table-card .actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .jobs .job {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .jobs .job .hide-mobile {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .top,
  .head,
  .table-head,
  .jobtop,
  .bottom,
  .social-account {
    align-items: stretch;
    flex-direction: column;
  }

  .actions,
  .modal-actions,
  .social-account-actions,
  .detail-actions,
  .bottom {
    justify-content: flex-start;
  }

  .actions button,
  .actions a,
  .modal-actions button,
  .social-account-actions button,
  .detail-actions button,
  .bottom button,
  .bottom a {
    width: 100%;
  }

  .jobs .job,
  .row,
  .history-row {
    grid-template-columns: 1fr;
  }

  .row > .actions,
  .table-card .actions {
    grid-column: auto;
  }

  .candidate .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: stretch;
  }

  .candidate .actions button,
  .candidate .actions a {
    width: 100%;
  }
}


/* Stronger overlap protection for dense dashboard rows. */
.tab {
  min-height: 34px;
}

.head,
.table-head,
.top,
.jobtop,
.bottom,
.modal-actions {
  gap: 10px;
}

.table-card .row,
.jobs .job,
.applications .app,
.job,
.row {
  overflow: visible;
}

.table-card .actions,
.row .actions,
.jobs .actions {
  row-gap: 7px;
}

.table-card .actions button,
.table-card .actions a,
.row .actions button,
.row .actions a,
.jobs .job button,
.candidate .actions button,
.candidate .actions a {
  min-height: 34px;
}

.table-card .name,
.table-card .sub,
.job h3,
.job p,
.candidate h3,
.candidate p,
.saved-job h3,
.saved-job p,
.social-account strong,
.social-account span {
  overflow-wrap: anywhere;
}

.table-card .pill,
.badge,
.status,
.tag,
.level {
  white-space: normal;
  width: fit-content;
  max-width: 100%;
  line-height: 1.25;
}

.modal-actions {
  align-items: stretch;
}

.modal-actions button {
  min-width: 120px;
}

@media (max-width: 1120px) {
  .table-card .actions button,
  .table-card .actions a {
    flex: 1 1 112px;
  }
}

@media (max-width: 760px) {
  .table-card .actions button,
  .table-card .actions a,
  .jobs .job button {
    width: 100%;
  }
}


/* BERMISA panel polish: clean, premium action layout. */
:root {
  --bermisa-action-gap: 8px;
  --bermisa-action-radius: 10px;
  --bermisa-action-min: 36px;
}

.actions,
.modal-actions,
.detail-actions,
.saved-job-actions,
.social-account-actions,
.subscription-actions,
.candidate .actions,
.bottom,
.bar {
  display: flex;
  gap: var(--bermisa-action-gap);
  align-items: center;
}

.actions,
.modal-actions,
.detail-actions,
.saved-job-actions,
.social-account-actions,
.candidate .actions,
.bottom {
  flex-wrap: wrap;
}

.actions button,
.actions a,
.modal-actions button,
.modal-actions a,
.detail-actions button,
.detail-actions a,
.saved-job-actions button,
.saved-job-actions a,
.social-account-actions button,
.social-account-actions a,
.subscription-actions button,
.candidate .actions button,
.candidate .actions a,
.bottom button,
.bottom a,
.bar button,
.primary,
.secondary,
.review,
.approve,
.reject,
.view,
.move,
.edit,
.ghost,
.mini {
  min-height: var(--bermisa-action-min);
  border-radius: var(--bermisa-action-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  vertical-align: middle;
}

.actions button,
.actions a,
.table-card .actions button,
.table-card .actions a,
.row .actions button,
.row .actions a {
  flex: 0 1 auto;
}

.table-card .actions,
.row .actions {
  justify-content: flex-end;
}

.head,
.table-head,
.top {
  flex-wrap: wrap;
  align-items: flex-start;
}

.head > *,
.table-head > *,
.top > * {
  min-width: 0;
}

.head h2,
.table-head h2,
.top h1,
.card h2,
.panel h2 {
  text-wrap: balance;
}

p,
.sub,
.hint,
.card small,
.panel small,
.metric span,
.stat span {
  overflow-wrap: anywhere;
}

.table-card .row {
  grid-auto-rows: minmax(36px, auto);
}

.table-card .actions button,
.table-card .actions a {
  padding-inline: 10px;
}

.candidate .actions {
  justify-content: space-between;
  row-gap: 8px;
}

.candidate .view,
.candidate .move {
  padding: 8px 10px;
}

.tabs {
  row-gap: 8px;
}

.tab {
  background: #fff;
  border: 1px solid var(--line, #dce6f1);
}

.tab.active {
  background: #edf4ff;
}

@media (min-width: 761px) {
  .table-card .actions button,
  .table-card .actions a,
  .row .actions button,
  .row .actions a {
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .actions,
  .modal-actions,
  .detail-actions,
  .saved-job-actions,
  .social-account-actions,
  .subscription-actions,
  .candidate .actions,
  .bottom,
  .bar {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .head a,
  .table-head a,
  .top .actions,
  .top a,
  .top button {
    width: 100%;
  }

  .table-card .row,
  .jobs .job,
  .history-row {
    gap: 10px;
    padding-block: 18px;
  }

  .table-card .actions,
  .row .actions {
    justify-content: stretch;
  }
}


/* Candidate and team action cleanup. */
#candidateFallbackModal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 20, 38, .66);
}

#candidateFallbackModal .dialog {
  width: min(720px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--l, #dce6f1);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 28px 80px rgba(7, 20, 38, .24);
}

#candidateFallbackModal .dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--l, #dce6f1);
}

#candidateFallbackModal h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

#candidateFallbackModal p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

#candidateFallbackModal .stat {
  border: 1px solid var(--l, #dce6f1);
  border-radius: 12px;
  padding: 14px;
  background: #fbfdff;
}

#candidateFallbackModal .stat span,
#candidateFallbackModal .stat b {
  display: block;
}

#candidateFallbackModal .close {
  flex: 0 0 auto;
}

.team-action-cell,
.row .edit,
.candidate .actions .view,
.candidate .actions .move {
  flex-shrink: 0;
}

.row .edit {
  width: 100%;
  max-width: 150px;
  justify-self: end;
}

.permissions {
  min-width: 0;
  align-items: center;
}

.permission,
.skills {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

@media (max-width: 1020px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row .edit {
    max-width: none;
  }
}

@media (max-width: 640px) {
  #candidateFallbackModal .dialog {
    padding: 18px;
  }

  #candidateFallbackModal .dialog [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .board {
    grid-template-columns: 1fr;
  }
}


.admin-prompt,
.skill-inline-form,
.social-account-email-form {
  border: 1px solid var(--line, #dce6f1);
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

.admin-prompt label,
.social-account-email-form label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink, #10233f);
  margin-bottom: 8px;
}

.admin-prompt-field,
.skill-inline-form input,
.social-account-email-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line, #dce6f1);
  border-radius: 10px;
  background: #fff;
  color: var(--ink, #10233f);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.admin-prompt-field:focus,
.skill-inline-form input:focus,
.social-account-email-form input:focus {
  border-color: #2866ef;
  box-shadow: 0 0 0 3px rgba(40, 102, 239, .12);
}

.skill-inline-form,
.social-account-email-form div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.skill-inline-form button,
.social-account-email-form button {
  border: 1px solid var(--line, #dce6f1);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #10233f);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.skill-inline-form button:first-of-type,
.social-account-email-form button:first-of-type {
  border-color: #2866ef;
  background: #2866ef;
  color: #fff;
}

@media (max-width: 640px) {
  .skill-inline-form,
  .social-account-email-form div {
    align-items: stretch;
  }

  .skill-inline-form input,
  .skill-inline-form button,
  .social-account-email-form input,
  .social-account-email-form button {
    width: 100%;
  }
}


/* Calm UI layer: keeps BERMISA panels focused and less tiring. */
:root {
  --bermisa-calm-bg: #f7f9fc;
  --bermisa-calm-surface: #ffffff;
  --bermisa-calm-line: #dce6f1;
  --bermisa-calm-ink: #10233f;
  --bermisa-calm-muted: #65768f;
  --bermisa-calm-blue: #2866ef;
}

body {
  text-rendering: optimizeLegibility;
}

.card,
.panel,
.table-card,
.metric,
.stat,
.job,
.candidate,
.opening,
.application,
.saved-job,
.social-account,
.history-row,
.detail-card,
.box,
.dialog,
.modal,
.float {
  box-shadow: none !important;
  border-color: var(--bermisa-calm-line, #dce6f1) !important;
}

.card,
.panel,
.table-card,
.metric,
.stat,
.job,
.candidate,
.opening,
.application,
.saved-job,
.social-account,
.history-row,
.detail-card {
  border-radius: 10px !important;
}

.main,
.shell main {
  background: var(--bermisa-calm-bg, #f7f9fc);
}

.top h1,
.hero h1,
.table-head h2,
.head h2,
.card h2,
.panel h2 {
  letter-spacing: 0 !important;
  line-height: 1.15 !important;
}

.top p,
.card > p,
.panel p,
.table-head span,
.head span,
.sub,
small {
  color: var(--bermisa-calm-muted, #65768f) !important;
  line-height: 1.55 !important;
}

.actions,
.modal-actions,
.bar,
.bottom,
.demo-actions {
  gap: 8px !important;
}

.actions button,
.actions a,
.modal-actions button,
.bar button,
.bottom button,
.bottom a,
.demo-actions button {
  min-height: 38px;
  border-radius: 8px !important;
}

.tabs,
.pill-row,
.skill-list,
.permissions {
  gap: 7px !important;
}

.pill,
.tag,
.permission,
.skills,
.tab {
  border-radius: 999px !important;
}

.bermisa-guide {
  margin: 14px 0 16px !important;
  background: var(--bermisa-calm-surface, #fff) !important;
  color: var(--bermisa-calm-ink, #10233f) !important;
  border: 1px solid var(--bermisa-calm-line, #dce6f1) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  padding: 14px !important;
}

.bermisa-guide:after,
.bermisa-guide-grid {
  display: none !important;
}

.bermisa-guide-head {
  margin: 0 !important;
  align-items: center !important;
}

.bermisa-guide h2 {
  color: var(--bermisa-calm-ink, #10233f) !important;
  font-size: 16px !important;
  letter-spacing: 0 !important;
}

.bermisa-guide p {
  color: var(--bermisa-calm-muted, #65768f) !important;
  font-size: 12px !important;
  max-width: 76ch !important;
}

.bermisa-guide-badge {
  background: #edf3f9 !important;
  border: 1px solid var(--bermisa-calm-line, #dce6f1) !important;
  color: var(--bermisa-calm-ink, #10233f) !important;
  border-radius: 999px !important;
}

.bermisa-progress {
  margin: 0 0 16px !important;
  background: var(--bermisa-calm-surface, #fff) !important;
  border: 1px solid var(--bermisa-calm-line, #dce6f1) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  padding: 14px !important;
}

.bermisa-progress-list,
.bermisa-progress-bar,
.bermisa-progress-reset {
  display: none !important;
}

.bermisa-progress-top {
  margin: 0 !important;
  align-items: center !important;
}

.bermisa-progress h2 {
  font-size: 16px !important;
  letter-spacing: 0 !important;
}

.bermisa-progress p {
  font-size: 12px !important;
  max-width: 76ch !important;
}

.bermisa-progress-score b {
  font-size: 18px !important;
}

.bermisa-tool-toggle {
  box-shadow: none !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}

.bermisa-tool-menu {
  border-radius: 10px !important;
  box-shadow: 0 12px 28px rgba(16,35,63,.16) !important;
}

.bermisa-tool-note {
  display: none !important;
}

@media (max-width: 760px) {
  .bermisa-guide-head,
  .bermisa-progress-top {
    display: block !important;
  }

  .bermisa-guide-badge,
  .bermisa-progress-score {
    margin-top: 8px !important;
  }
}


/* Sidebar identity cards: prevents admin, employer and candidate account text from overlapping. */
.side {
  position: relative;
  padding-bottom: 132px !important;
}

.side .admin,
.side .company,
.side .user {
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 20px !important;
  margin: 0 !important;
  width: auto !important;
  max-width: calc(100% - 36px) !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 10px !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .06) !important;
}

.side .user {
  display: block !important;
}

.side .admin > div:last-child,
.side .company > div:last-child,
.side .user {
  min-width: 0 !important;
  max-width: 100% !important;
}

.side .admin .avatar,
.side .company .avatar,
.side .avatar {
  flex: 0 0 35px !important;
}

.side .admin b,
.side .company b,
.side .user b,
.side .admin small,
.side .company small,
.side .user small {
  display: block !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

.side .admin b,
.side .company b,
.side .user b {
  color: #fff !important;
  font-size: 13px !important;
}

.side .admin small,
.side .company small,
.side .user small {
  margin-top: 3px !important;
  color: #9fb0c8 !important;
  font-size: 11px !important;
}
