.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;
  }
}

/* Job Status Badge styles */
.bjs-ats-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  border: 1px solid transparent;
  margin-bottom: 8px;
  max-width: 100%;
}

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

.bjs-ats-status-badge.in-screening {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

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

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

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

.bjs-ats-status-badge.hired {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

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

/* Detail page status area */
.bjs-ats-status-area {
  margin-bottom: 15px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-sizing: border-box;
}
.bjs-ats-status-area .status-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.bjs-ats-status-area .status-message {
  font-size: 14px;
  color: #1e293b;
  margin-top: 6px;
}

/* Modern Professional Candidate Table Styling */
.bjs-ats-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
  margin-top: 15px;
}

.bjs-ats-table {
  border-collapse: separate;
  border-spacing: 0;
}

.bjs-ats-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  padding: 12px 16px;
  text-align: left;
}

.bjs-ats-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.bjs-ats-table tbody tr:last-child td {
  border-bottom: none;
}

.bjs-ats-table tbody tr:hover td {
  background-color: #f8fafc !important;
}

/* Reset old messy full-row highlights to clean white */
.bjs-ats-table tr.bjs-ats-row-status-shortlisted td,
.bjs-ats-table tr.bjs-ats-row-status-rejected td,
.bjs-ats-table tr.bjs-ats-row-status-interview td,
.bjs-ats-table tr.bjs-ats-row-status-applied td {
  background-color: #fff;
}

/* Clean Badges & Chips */
.bjs-ats-status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: capitalize;
  white-space: nowrap;
}

.bjs-ats-badge-applied {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.bjs-ats-badge-shortlisted {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.bjs-ats-badge-interview-scheduled,
.bjs-ats-badge-interview-invited,
.bjs-ats-badge-interview-confirmed,
.bjs-ats-badge-reschedule-requested {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

.bjs-ats-badge-rejected {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fee2e2;
}

.bjs-ats-badge-withdrawn,
.bjs-ats-badge-declined {
  background-color: #f9fafb;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.bjs-ats-badge-closed {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Buttons */
.bjs-ats-table .button,
.bjs-ats-table button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.bjs-ats-table .button:hover,
.bjs-ats-table button:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.bjs-ats-table button.bjs-ats-withdraw-application {
  background-color: #fff7ed;
  color: #c2410c;
  border-color: #ffedd5;
}

.bjs-ats-table button.bjs-ats-withdraw-application:hover {
  background-color: #ffedd5;
  border-color: #fed7aa;
}

.bjs-ats-table .bjs-ats-open-modal {
  background-color: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

.bjs-ats-table .bjs-ats-open-modal:hover {
  background-color: #dcfce7 !important;
  border-color: #86efac !important;
}

/* Filters bar */
.bjs-ats-status-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #f8fafc;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px !important;
}

.bjs-ats-status-filters label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.bjs-ats-status-filters select.bjs-ats-job-filter {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #334155;
  outline: none;
  min-width: 200px;
  max-width: 100%;
}

.bjs-ats-status-filters select.bjs-ats-job-filter:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Notes display and history */
.bjs-ats-notes-last-note {
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  font-size: 12px;
}

.bjs-ats-view-history-btn {
  display: inline-block;
  margin-top: 5px;
  background: none !important;
  border: none !important;
  color: #2563eb !important;
  padding: 0 !important;
  font-size: 11px !important;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.bjs-ats-view-history-btn:hover {
  color: #1d4ed8 !important;
}

.bjs-ats-notes-modal-content {
  max-width: 480px !important;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.bjs-ats-notes-timeline {
  margin-top: 16px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}

.bjs-ats-timeline-item {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #e2e8f0;
  padding-bottom: 16px;
}

.bjs-ats-timeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.bjs-ats-timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #3b82f6;
}

.bjs-ats-timeline-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.bjs-ats-timeline-author {
  font-weight: 600;
  color: #334155;
}

.bjs-ats-timeline-text {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Recruiter Dashboard Wallet & Filters */
.bjs-ats-recruiter-dashboard .bjs-wallet-bar {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px 0;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

.bjs-ats-recruiter-dashboard .bjs-wallet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.bjs-ats-recruiter-dashboard .bjs-wallet-meta span:first-child {
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

.bjs-ats-recruiter-dashboard #bjs-ats-wallet-balance {
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.bjs-ats-recruiter-dashboard #bjs-ats-wallet-meta {
  font-size: 12px;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.bjs-ats-recruiter-dashboard .bjs-ats-recharge-button {
  background: #f59e0b !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.bjs-ats-recruiter-dashboard .bjs-ats-recharge-button:hover {
  background: #d97706 !important;
  transform: translateY(-1px);
}

.bjs-ats-recruiter-dashboard .bjs-ats-wallet-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 12px 16px;
  margin: 0 0 20px 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.bjs-ats-frontend-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 16px 0 24px 0 !important;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.bjs-ats-frontend-filters label {
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  margin: 0;
}

.bjs-ats-frontend-filters select {
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #334155;
  outline: none;
  min-width: 180px;
  height: 38px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.bjs-ats-frontend-filters select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.bjs-ats-frontend-filters .button,
.bjs-ats-frontend-filters button {
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.bjs-ats-frontend-filters button[type="submit"] {
  background-color: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.bjs-ats-frontend-filters button[type="submit"]:hover {
  background-color: #d97706;
  border-color: #d97706;
}

.bjs-ats-frontend-filters a.button {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
  text-decoration: none;
}

.bjs-ats-frontend-filters a.button:hover {
  background-color: #cbd5e1;
  border-color: #94a3b8;
}

/* Prevent squished and vertically wrapped table headers */
.bjs-ats-table th {
  white-space: nowrap !important;
}

.bjs-ats-table td[data-label="Job ID"],
.bjs-ats-table td[data-label="BJS ID"],
.bjs-ats-table td[data-label="Select"],
.bjs-ats-table td[data-label="Date"],
.bjs-ats-table td[data-label="Status"],
.bjs-ats-table td[data-label="Applicant Details"] {
  white-space: nowrap !important;
}



