.bjs-ats-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: #006699;
  color: #fff;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.bjs-ats-button[disabled] {
  background: #9ca3af;
  cursor: not-allowed;
}

.bjs-ats-message {
  margin-top: 8px;
  font-size: 14px;
}

.bjs-ats-access-note {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #0f172a;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.bjs-ats-access-note a {
  color: #0b6ea8;
  font-weight: 600;
  text-decoration: underline;
}

.bjs-ats-notes {
  max-height: 64px;
  overflow-y: auto;
  line-height: 1.25;
  padding-right: 6px;
  scrollbar-width: thin;
}

.bjs-ats-notes::-webkit-scrollbar {
  width: 6px;
}

.bjs-ats-notes::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.bjs-ats-apply-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bjs-ats-apply-wrapper .bjs-ats-message {
  flex-basis: 100%;
  margin-top: 0;
}

.bjs-ats-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.bjs-ats-column {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  padding: 10px;
}

.bjs-ats-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
}

.bjs-ats-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.bjs-ats-metric-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
}

.bjs-ats-metric-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 3px;
}

.bjs-ats-metric-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.bjs-ats-metric-value-green {
  color: #166534;
}

.bjs-ats-status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.bjs-ats-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.bjs-ats-chip-applied {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.bjs-ats-chip-shortlisted {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.bjs-ats-chip-interview {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
}

.bjs-ats-chip-offer {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.bjs-ats-chip-rejected {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.bjs-ats-chip-withdrawn {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

.bjs-ats-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bjs-ats-table {
  width: 100%;
  border-collapse: collapse;
}

.bjs-ats-table-compact th,
.bjs-ats-table-compact td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: top;
}

.bjs-ats-table-compact .button {
  min-height: 28px;
  line-height: 1.1;
  padding: 4px 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bjs-ats-table tr.bjs-ats-row-status-shortlisted td {
  background-color: #dcfce7;
}

.bjs-ats-table tr.bjs-ats-row-status-rejected td {
  background-color: #fee2e2;
}

.bjs-ats-table tr.bjs-ats-row-status-interview td {
  background-color: #fef9c3;
}

.bjs-ats-table tr.bjs-ats-row-status-applied td {
  background-color: #e5e7eb;
}

.bjs-ats-application-status {
  position: relative;
}

.bjs-ats-status-loader {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid #d1d5db;
  border-top-color: #0b6ea8;
  border-radius: 50%;
  animation: bjsAtsSpin .8s linear infinite;
  margin: 10px auto;
}

.bjs-ats-status-loader.is-active {
  display: block;
}

@keyframes bjsAtsSpin {
  to {
    transform: rotate(360deg);
  }
}

.bjs-ats-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  padding: 40px 20px;
  overflow-y: auto;
}

.bjs-ats-modal-content {
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 8px;
  position: relative;
}

.bjs-ats-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: #efefef;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.bjs-ats-recruiter-dashboard {
  -webkit-text-size-adjust: 100%;
}

.bjs-ats-recruiter-dashboard .bjs-wallet-bar {
  width: 100%;
  box-sizing: border-box;
}

.bjs-ats-recruiter-dashboard .bjs-wallet-meta {
  min-width: 0;
}

.bjs-ats-recruiter-dashboard .button,
.bjs-ats-table .button {
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .bjs-ats-button,
  .bjs-ats-recruiter-dashboard .button,
  .bjs-ats-table .button {
    font-size: 12px;
    padding: 6px 10px;
    min-height: 28px;
  }

  .bjs-ats-recruiter-dashboard .bjs-wallet-bar {
    padding: 12px !important;
    align-items: flex-start !important;
  }

  .bjs-ats-recruiter-dashboard .bjs-wallet-meta {
    width: 100%;
    gap: 8px !important;
  }

  .bjs-ats-recruiter-dashboard #bjs-ats-wallet-balance {
    font-size: 20px !important;
    line-height: 1.2;
  }

  .bjs-ats-status-chip-row {
    gap: 6px;
  }

  .bjs-ats-status-chip {
    font-size: 11px;
    padding: 4px 8px;
  }

  .bjs-ats-table-compact thead {
    display: none;
  }

  .bjs-ats-table-compact,
  .bjs-ats-table-compact tbody,
  .bjs-ats-table-compact tr,
  .bjs-ats-table-compact td {
    display: block;
    width: 100%;
  }

  .bjs-ats-table-compact tr {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
  }

  .bjs-ats-table-compact td {
    border-bottom: 1px solid #f1f5f9;
    padding: 8px 10px;
  }

  .bjs-ats-table-compact td:last-child {
    border-bottom: 0;
  }

  .bjs-ats-table-compact td:before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 3px;
  }
}
