/**
 * HR ATS Plugin Stylesheet
 * Covers: admin dashboard, meta boxes, and frontend application form.
 *
 * Structure:
 *   1. CSS Custom Properties (design tokens)
 *   2. Dashboard Layout
 *   3. Stat Cards
 *   4. Vacancy Panels
 *   5. Applications Table
 *   6. Score & Status Badges
 *   7. Tag Components
 *   8. Pagination
 *   9. Notices
 *  10. Meta Box Styles
 *  11. Frontend Form
 *  12. Utility / Accessibility
 *
 * @package HR_ATS
 * @since   1.0.0
 */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
  --hr-blue: #2271b1;
  --hr-blue-light: #e8f0fb;
  --hr-teal: #00897b;
  --hr-teal-light: #e0f2f1;
  --hr-green: #54a258;
  --hr-green-light: #e8f5e9;
  --hr-red: #c62828;
  --hr-red-light: #ffebee;
  --hr-orange: #e65100;
  --hr-orange-light: #fff3e0;
  --hr-grey: #6b7280;
  --hr-grey-light: #f3f4f6;
  --hr-border: #e2e8f0;
  --hr-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --hr-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --hr-radius: 8px;
  --hr-radius-sm: 4px;
  --hr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   2. Dashboard Layout
   ========================================================================== */

.hr-ats-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 0 40px;
  font-family: var(--hr-font);
}

.hr-ats-page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 32px;
  font-weight: 800;
  color: #1d2327;
  margin-bottom: 8px;
}

.hr-ats-page-title .dashicons {
  font-size: 36px;
  width: 36px;
  height: 36px;
  color: #1e2d64;
}

.hr-ats-welcome {
  font-size: 15px;
  color: var(--hr-grey);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ==========================================================================
   3. Stat Cards - Enhanced Modern Design
   ========================================================================== */

.hr-ats-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.hr-ats-stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: var(--hr-radius);
  padding: 12px;
  box-shadow: var(--hr-shadow);
  border: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hr-ats-stat-card:hover {
  box-shadow: var(--hr-shadow-md);
  border-color: var(--stat-color);
  transform: translateY(-4px);
}

.hr-ats-stat-blue {
  --stat-color: #1e2d64;
  background: linear-gradient(135deg, #eef4ff 0%, #e0eaff 100%);
}

.hr-ats-stat-orange {
  --stat-color: #f47a38;
  background: linear-gradient(135deg, #fef3ec 0%, #fdd6c0 100%);
}

.hr-ats-stat-green {
  --stat-color: var(--hr-green);
  background: linear-gradient(135deg, var(--hr-green-light) 0%, #e8f5e9 100%);
}

.hr-ats-stat-teal {
  --stat-color: var(--hr-teal);
  background: linear-gradient(135deg, var(--hr-teal-light) 0%, #e0f2f1 100%);
}

.hr-ats-stat-red {
  --stat-color: var(--hr-red);
  background: linear-gradient(135deg, var(--hr-red-light) 0%, #ffebee 100%);
}

.hr-ats-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hr-ats-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.hr-ats-stat-card:hover .hr-ats-stat-icon {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.hr-ats-stat-blue .hr-ats-stat-icon {
  color: #1e2d64;
}
.hr-ats-stat-orange .hr-ats-stat-icon {
  color: #f47a38;
}
.hr-ats-stat-green .hr-ats-stat-icon {
  color: var(--hr-green);
}
.hr-ats-stat-teal .hr-ats-stat-icon {
  color: var(--hr-teal);
}
.hr-ats-stat-red .hr-ats-stat-icon {
  color: var(--hr-red);
}

.hr-ats-stat-count {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: #1d2327;
}

.hr-ats-stat-label {
  font-size: 11px;
  color: var(--hr-grey);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ==========================================================================
   4. Vacancy Panels - Enhanced Modern Design
   ========================================================================== */

.hr-ats-vacancy-panel {
  background: #fff;
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.hr-ats-vacancy-panel:hover {
  box-shadow: var(--hr-shadow-md);
  border-color: #cbd5e1;
}

.hr-ats-vacancy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--hr-border);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.hr-ats-vacancy-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.hr-ats-vacancy-title {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #1d2327;
}

.hr-ats-vacancy-title .dashicons {
  display: none;
}

.hr-ats-vacancy-subtitle {
  font-size: 12px;
  color: var(--hr-grey);
  font-weight: 500;
}

.hr-ats-app-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--hr-blue);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  transition: all 0.2s ease;
}

.hr-ats-vacancy-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--hr-grey);
}

.hr-ats-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.hr-ats-meta-item .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.hr-ats-toggle-arrow {
  font-size: 16px;
  color: var(--hr-grey);
  transition: transform 0.3s ease;
}

.hr-ats-vacancy-panel.is-open .hr-ats-toggle-arrow {
  transform: rotate(180deg);
}

.hr-ats-vacancy-body {
  padding: 0;
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.hr-ats-vacancy-panel.is-open .hr-ats-vacancy-body {
  display: block;
  padding: 12px;
  max-height: 2000px;
  border-top: 1px solid var(--hr-border);
}

.hr-ats-required-skills {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hr-ats-skill-tag {
  background-color: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #90caf9;
  border-radius: 16px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.hr-ats-no-apps {
  color: var(--hr-grey);
  font-style: italic;
  padding: 10px 0;
  font-size: 12px;
}

.hr-ats-vacancy-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hr-border);
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   5. Applications Table
   ========================================================================== */

.hr-ats-table-wrapper {
  overflow-x: auto;
  border-radius: var(--hr-radius-sm);
  border: 1px solid var(--hr-border);
}

.hr-ats-applications-table,
.hr-ats-vacancies-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.hr-ats-applications-table thead tr th {
  color: white;
}

.hr-ats-applications-table th,
.hr-ats-vacancies-table th {
  background: #1e2d64;
  color: #fff;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #d1d5db;
  white-space: nowrap;
}

.hr-ats-applications-table td,
.hr-ats-vacancies-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
  color: #374151;
}

.hr-ats-applications-table tr:last-child td,
.hr-ats-vacancies-table tr:last-child td {
  border-bottom: none;
}

.hr-ats-row-hidden td {
  opacity: 0.6;
  background: #fff8f8 !important;
}

.column-rank {
  width: 40px;
  text-align: center;
}

.column-score {
  width: 80px;
  text-align: center;
}

.hr-ats-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--hr-grey-light);
  color: var(--hr-grey);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

/* ==========================================================================
   6. Score & Status Badges
   ========================================================================== */

.hr-ats-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.hr-ats-score-high {
  background: var(--hr-green-light);
  color: var(--hr-green);
}
.hr-ats-score-medium {
  background: var(--hr-teal-light);
  color: var(--hr-teal);
}
.hr-ats-score-low {
  background: var(--hr-orange-light);
  color: var(--hr-orange);
}
.hr-ats-score-poor {
  background: var(--hr-red-light);
  color: var(--hr-red);
}

.hr-ats-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hr-ats-status-matched {
  background: var(--hr-green-light);
  color: var(--hr-green);
}
.hr-ats-status-hidden {
  background: var(--hr-red-light);
  color: var(--hr-red);
}

.hr-ats-status-badge .dashicons {
  font-size: 10px;
  width: 10px;
  height: 10px;
}

/* Score display in meta boxes */
.hr-ats-score-container {
  padding: 0;
}

.hr-ats-score-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--hr-border);
}

.hr-ats-score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hr-ats-score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 900;
  border: 4px solid;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  position: relative;
}

.hr-ats-score-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.hr-ats-score-badge.hr-ats-score-high {
  border-color: var(--hr-green);
  color: var(--hr-green);
  background: linear-gradient(135deg, var(--hr-green-light) 0%, #e1f5e1 100%);
}

.hr-ats-score-badge.hr-ats-score-medium {
  border-color: var(--hr-teal);
  color: var(--hr-teal);
  background: linear-gradient(135deg, var(--hr-teal-light) 0%, #d4f1ef 100%);
}

.hr-ats-score-badge.hr-ats-score-low {
  border-color: var(--hr-orange);
  color: var(--hr-orange);
  background: linear-gradient(135deg, var(--hr-orange-light) 0%, #ffe0c8 100%);
}

.hr-ats-score-badge.hr-ats-score-poor {
  border-color: var(--hr-red);
  color: var(--hr-red);
  background: linear-gradient(135deg, var(--hr-red-light) 0%, #f8d7da 100%);
}

.hr-ats-score-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.hr-ats-score-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hr-ats-match-status {
  font-size: 14px;
  font-weight: 700;
  color: #1d2327;
}

.hr-ats-match-description {
  font-size: 12px;
  color: var(--hr-grey);
  line-height: 1.5;
}

/* Breakdown Grid Layout */
.hr-ats-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 0;
}

.hr-ats-breakdown-card {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.hr-ats-breakdown-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color, var(--hr-blue));
}

.hr-ats-breakdown-card:hover {
  box-shadow: var(--hr-shadow-md);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.hr-ats-breakdown-card.skills {
  --card-color: #7c3aed;
}
.hr-ats-breakdown-card.experience {
  --card-color: #0891b2;
}
.hr-ats-breakdown-card.education {
  --card-color: #059669;
}
.hr-ats-breakdown-card.keywords {
  --card-color: #d4a574;
}

.hr-ats-breakdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hr-ats-breakdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.1);
  color: var(--card-color);
  flex-shrink: 0;
  font-size: 14px;
}

.hr-ats-breakdown-title {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: #1d2327;
  margin: 0;
}

.hr-ats-breakdown-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--card-color);
  text-align: right;
}

.hr-ats-breakdown-content {
  margin-top: 8px;
}

.hr-ats-progress-wrapper {
  margin-bottom: 8px;
}

.hr-ats-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 600;
}

.hr-ats-progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.hr-ats-progress-fill {
  display: block;
  height: 100%;
  transition: width 0.3s ease;
}

.hr-ats-progress-fill.skills {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}
.hr-ats-progress-fill.experience {
  background: linear-gradient(90deg, #0891b2, #06b6d4);
}
.hr-ats-progress-fill.education {
  background: linear-gradient(90deg, #059669, #10b981);
}
.hr-ats-progress-fill.keywords {
  background: linear-gradient(90deg, #d4a574, #ddb892);
}

.hr-ats-percentage-badge {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  min-width: 60px;
  text-align: center;
}

.hr-ats-percentage-badge.green {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.hr-ats-percentage-badge.yellow {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.hr-ats-percentage-badge.red {
  background-color: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fca5a5;
}

.hr-ats-breakdown-details {
  font-size: 11px;
  color: #374151;
  line-height: 1.5;
  margin-top: 8px;
}

.hr-ats-breakdown-table {
  display: none;
}

/* ==========================================================================
   7. Tag Components
   ========================================================================== */

.hr-ats-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  margin: 2px 4px 2px 0;
  white-space: normal;
  word-wrap: break-word;
  flex-shrink: 0;
}

.hr-ats-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.hr-ats-tag-matched {
  background: var(--hr-green-light);
  color: var(--hr-green);
  border: 1px solid #c8e6c9;
}

.hr-ats-tag-missed {
  background: var(--hr-red-light);
  color: var(--hr-red);
  border: 1px solid #ffcdd2;
  text-decoration: line-through;
  opacity: 0.75;
}

.hr-ats-tag-keyword {
  background: #ede7f6;
  color: #5e35b1;
  border: 1px solid #d1c4e9;
}

.hr-ats-no-data {
  color: #cbd5e1;
  font-size: 11px;
}

/* ==========================================================================
   8. Pagination
   ========================================================================== */

.hr-ats-pagination {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hr-border);
}

.hr-ats-pager {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.hr-ats-pager-info {
  font-size: 10px;
  color: var(--hr-grey);
  margin-right: 6px;
}

.hr-ats-page-btn {
  min-width: 34px;
  text-align: center;
}

/* ==========================================================================
   9. Notices
   ========================================================================== */

.hr-ats-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--hr-radius);
  margin-bottom: 12px;
  font-size: 12px;
  border: 1px solid transparent;
}

.hr-ats-notice .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hr-ats-notice-success {
  background: var(--hr-green-light);
  border-color: #a5d6a7;
  color: var(--hr-green);
}
.hr-ats-notice-error {
  background: var(--hr-red-light);
  border-color: #ef9a9a;
  color: var(--hr-red);
}
.hr-ats-notice-info {
  background: var(--hr-blue-light);
  border-color: #90caf9;
  color: var(--hr-blue);
}

/* ==========================================================================
   10. Meta Box Styles - Applicant Details
   ========================================================================== */

.hr-ats-details-container {
  padding: 0;
  font-family: var(--hr-font);
}

.hr-ats-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.hr-ats-detail-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow);
  transition: all 0.2s ease;
}

.hr-ats-detail-card:hover {
  box-shadow: var(--hr-shadow-md);
  border-color: #cbd5e1;
}

.hr-ats-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(34, 113, 177, 0.1);
  color: var(--icon-color, var(--hr-blue));
  flex-shrink: 0;
}

.hr-ats-detail-icon .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.hr-ats-detail-content {
  flex: 1;
}

.hr-ats-detail-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 4px;
}

.hr-ats-detail-value {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #1d2327;
  line-height: 1.4;
  word-break: break-word;
}

.hr-ats-detail-value a {
  color: var(--hr-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hr-ats-detail-value a:hover {
  color: #1a5c9a;
  text-decoration: underline;
}

.hr-ats-detail-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--hr-border);
}

.hr-ats-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
  padding: 0;
}

.hr-ats-section-title .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--hr-blue);
}

.hr-ats-cv-download-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hr-ats-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--hr-blue);
  color: #fff;
  border: none;
  border-radius: var(--hr-radius-sm);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--hr-shadow);
}

.hr-ats-btn-download:hover {
  background: #1a5c9a;
  box-shadow: var(--hr-shadow-md);
  text-decoration: none;
  color: #fff;
}

.hr-ats-btn-download:active {
  transform: translateY(1px);
}

.hr-ats-btn-download .dashicons {
  font-size: 12px;
  width: 12px;
  height: 12px;
}

.hr-ats-no-document {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--hr-grey-light);
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius-sm);
  font-size: 11px;
  color: var(--hr-grey);
  margin: 0;
}

.hr-ats-no-document .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.hr-ats-collapsible-section {
  margin-top: 14px;
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--hr-shadow);
  transition: all 0.2s ease;
}

.hr-ats-collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f9fafb;
  border-bottom: 1px solid var(--hr-border);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.hr-ats-collapsible-header:hover {
  background: #f3f4f6;
}

.hr-ats-collapsible-header:focus {
  outline: 2px solid var(--hr-blue);
  outline-offset: -2px;
}

.hr-ats-collapsible-title {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 0;
}

.hr-ats-collapsible-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--hr-blue);
  font-weight: bold;
  font-size: 22px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.hr-ats-collapsible-header[aria-expanded="true"] .hr-ats-collapsible-icon {
  transform: rotate(90deg);
}

.hr-ats-collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
}

.hr-ats-collapsible-header[aria-expanded="true"] ~ .hr-ats-collapsible-content {
  opacity: 1;
}

.hr-ats-cover-letter {
  background: #f0f6fc;
  border-top: 1px solid #b3d9ff;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #374151;
}

.hr-ats-meta-table th {
  width: 180px;
  font-weight: 600;
  color: #374151;
  padding-right: 12px;
  vertical-align: top;
  padding-top: 8px;
  font-size: 11px;
}

.hr-ats-meta-table td {
  padding: 8px 0;
  font-size: 12px;
}

.hr-ats-cv-text-box pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 12px;
  border-radius: var(--hr-radius-sm);
  font-size: 9px;
  line-height: 1.5;
  max-height: 250px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Courier New", Courier, monospace;
}

/* ==========================================================================
   11. Frontend Application Form
   ========================================================================== */

.hr-ats-form-wrap {
  max-width: 1400px;
  margin: 0 auto;
  font-family: var(--hr-font);
  padding: 0 20px;
}

.hr-ats-form-header {
  background: linear-gradient(135deg, #1e2d64 0%, #2a3f7f 100%);
  border-radius: 12px;
  padding: 32px 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(30, 45, 100, 0.15);
}

.hr-ats-form-title {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.hr-ats-form-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

.hr-ats-form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hr-ats-form-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.hr-ats-form-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.hr-ats-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1d2327;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.hr-ats-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #1e2d64 0%, #2a3f7f 100%);
  color: #f47a38;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.hr-ats-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.hr-ats-field-group {
  margin-bottom: 0;
}
.hr-ats-field-group:last-child {
  margin-bottom: 0;
}

.hr-ats-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.hr-ats-required {
  color: var(--hr-red);
  margin-left: 2px;
  text-decoration: none;
  border-bottom: none;
  font-style: normal;
}

.hr-ats-optional {
  font-weight: 400;
  color: var(--hr-grey);
  font-size: 12px;
}

.hr-ats-form-wrap .hr-ats-input,
.hr-ats-form-wrap .hr-ats-select,
.hr-ats-form-wrap .hr-ats-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--hr-font);
  color: #1d2327;
  background: #fff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  box-sizing: border-box;
}

.hr-ats-form-wrap .hr-ats-input::placeholder,
.hr-ats-form-wrap .hr-ats-select::placeholder,
.hr-ats-form-wrap .hr-ats-textarea::placeholder {
  color: #9ca3af;
}

.hr-ats-input:focus,
.hr-ats-select:focus,
.hr-ats-textarea:focus {
  outline: none;
  border-color: #1e2d64;
  background: #f5f1e8;
  box-shadow: 0 0 0 4px rgba(244, 122, 56, 0.1);
}

.hr-ats-textarea {
  resize: vertical;
  min-height: 120px;
  font-size: 14px;
}

.hr-ats-field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

/* File Drop Zone */
.hr-ats-file-drop-zone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.hr-ats-file-drop-zone:hover {
  border-color: #f47a38;
  box-shadow: 0 4px 12px rgba(244, 122, 56, 0.1);
}

.hr-ats-file-drop-zone.drag-over {
  border-color: #f47a38;
  background: linear-gradient(135deg, #fde8db 0%, #fdd6c0 100%);
  box-shadow: 0 6px 16px rgba(244, 122, 56, 0.15);
}

.hr-ats-file-drop-zone.has-file {
  border-color: var(--hr-green);
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.hr-ats-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.hr-ats-drop-label {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #475569;
}

.hr-ats-drop-label strong {
  color: #1d2327;
  font-weight: 600;
}

.hr-ats-upload-icon {
  font-size: 40px !important;
  width: 40px !important;
  height: 40px !important;
  color: #f47a38;
  margin-bottom: 4px;
  transition: transform 0.3s ease;
}

.hr-ats-file-drop-zone:hover .hr-ats-upload-icon {
  transform: scale(1.1);
}

.hr-ats-file-name {
  font-size: 13px;
  font-style: italic;
  color: #22c55e;
  font-weight: 500;
  margin-top: 4px;
}

.hr-ats-char-count {
  font-size: 12px;
  color: #9ca3af;
  text-align: right;
  margin: 10px 0 0;
  font-weight: 500;
}

.hr-ats-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 24px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f1f5f9 100%);
  border: 1px solid #d1fae5;
  border-radius: 8px;
  font-size: 13px;
  color: #047857;
  line-height: 1.6;
}

.hr-ats-privacy-notice .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #22c55e;
}

.hr-ats-submit-wrap {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.hr-ats-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #f47a38 0%, #f5905d 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--hr-font);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(244, 122, 56, 0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hr-ats-submit-btn:hover {
  background: linear-gradient(135deg, #e65e1b 0%, #f07043 100%);
  box-shadow: 0 8px 24px rgba(244, 122, 56, 0.4);
  transform: translateY(-2px);
}

.hr-ats-submit-btn:active {
  transform: translateY(0px);
  box-shadow: 0 4px 12px rgba(244, 122, 56, 0.3);
}

.hr-ats-submit-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hr-ats-submit-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Side-by-side Form and Vacancy Description Layout */
.hr-ats-form-and-vacancy-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 32px;
}

.hr-ats-vacancy-description-sidebar {
  position: sticky;
  top: 24px;
  min-width: 0;
  max-width: 100%;
}

.hr-ats-vacancy-description-sidebar .hr-ats-vacancy-panel {
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
}

.hr-ats-vacancy-description-sidebar .hr-ats-vacancy-panel:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hr-ats-vacancy-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  padding: 18px 20px;
  border-bottom: none;
  background: linear-gradient(135deg, #1e2d64 0%, #2a3f7f 100%);
  letter-spacing: -0.3px;
}

.hr-ats-vacancy-selector-info {
  padding: 20px;
  overflow: hidden;
}

.hr-ats-vacancy-placeholder {
  color: #9ca3af;
  font-size: 13px;
  margin: 0;
  text-align: center;
  padding: 28px 0;
  font-weight: 500;
}

.hr-ats-vacancy-title {
  font-size: 16px;
  font-weight: 700;
  color: #1d2327;
  margin: 0 0 14px;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.hr-ats-vacancy-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}

.hr-ats-vacancy-meta-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
}

.hr-ats-vacancy-meta-label {
  font-weight: 600;
  color: #6b7280;
  min-width: 70px;
  flex-shrink: 0;
}

.hr-ats-vacancy-meta-value {
  color: #1d2327;
  font-weight: 500;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
  min-width: 0;
}

.hr-ats-vacancy-description-text {
  font-size: 13px;
  line-height: 1.7;
  color: #374151;
  margin: 14px 0 0;
  max-height: 420px;
  overflow: hidden;
  overflow-y: auto;
  padding: 0;
  word-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden;
}

.hr-ats-vacancy-description-text ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-ats-vacancy-description-text ul li {
  display: inline-block;
  margin: 0;
}

.hr-ats-vacancy-description-text p:first-child {
  margin-top: 0;
}
.hr-ats-vacancy-description-text p:last-child {
  margin-bottom: 0;
}

/* Responsive: Stack form and vacancy on smaller screens */
@media (max-width: 900px) {
  .hr-ats-form-and-vacancy-wrapper {
    grid-template-columns: 1fr;
  }

  .hr-ats-vacancy-description-sidebar {
    position: static;
  }

  .hr-ats-vacancy-description-text {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .hr-ats-form-wrap {
    padding: 0 16px;
  }
  .hr-ats-form-header {
    padding: 24px 20px;
    margin-bottom: 20px;
  }
  .hr-ats-form-title {
    font-size: 26px;
  }
  .hr-ats-form-subtitle {
    font-size: 14px;
  }
  .hr-ats-form-section {
    padding: 18px;
  }
  .hr-ats-section-title {
    font-size: 15px;
    gap: 10px;
  }
  .hr-ats-section-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .hr-ats-field-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hr-ats-file-drop-zone {
    padding: 24px 16px;
  }
  .hr-ats-upload-icon {
    font-size: 32px !important;
    width: 32px !important;
    height: 32px !important;
  }
  .hr-ats-submit-btn {
    padding: 12px 28px;
    font-size: 14px;
  }
  .hr-ats-privacy-notice {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .hr-ats-form-wrap {
    padding: 0 12px;
  }
  .hr-ats-form-header {
    padding: 20px 16px;
    margin-bottom: 16px;
  }
  .hr-ats-form-title {
    font-size: 22px;
    margin-bottom: 6px;
  }
  .hr-ats-form-subtitle {
    font-size: 13px;
  }
  .hr-ats-form-section {
    padding: 14px;
    margin-bottom: 12px;
  }
  .hr-ats-form-grid {
    gap: 12px;
  }
  .hr-ats-section-title {
    font-size: 14px;
    margin-bottom: 12px;
  }
  .hr-ats-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .hr-ats-form-wrap .hr-ats-input,
  .hr-ats-form-wrap .hr-ats-select,
  .hr-ats-form-wrap .hr-ats-textarea {
    padding: 10px 12px;
    font-size: 13px;
  }

  .hr-ats-field-hint {
    font-size: 11px;
  }
  .hr-ats-submit-btn {
    padding: 11px 24px;
    font-size: 13px;
    width: 100%;
  }
}

/* ==========================================================================
   12. Utility / Accessibility
   ========================================================================== */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Meta Box Sizing - Job Vacancy/Application Forms
   ========================================================================== */

body.post-type-job_vacancy .postbox,
body.post-type-job_application .postbox {
  margin-bottom: 10px;
}

body.post-type-job_vacancy .postbox .inside,
body.post-type-job_application .postbox .inside {
  padding: 10px 12px;
}

body.post-type-job_vacancy .postbox h2,
body.post-type-job_application .postbox h2 {
  font-size: 13px;
  padding: 8px 12px;
}

body.post-type-job_vacancy .form-table,
body.post-type-job_application .form-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}

body.post-type-job_vacancy .form-table th,
body.post-type-job_application .form-table th {
  width: 180px;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eee;
}

body.post-type-job_vacancy .form-table td,
body.post-type-job_application .form-table td {
  font-size: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

body.post-type-job_vacancy .form-table tr:last-child th,
body.post-type-job_application .form-table tr:last-child th,
body.post-type-job_vacancy .form-table tr:last-child td,
body.post-type-job_application .form-table tr:last-child td {
  border-bottom: none;
}

body.post-type-job_vacancy input[type="text"],
body.post-type-job_vacancy input[type="number"],
body.post-type-job_vacancy input[type="email"],
body.post-type-job_vacancy input[type="password"],
body.post-type-job_vacancy select,
body.post-type-job_vacancy textarea,
body.post-type-job_application input[type="text"],
body.post-type-job_application input[type="number"],
body.post-type-job_application input[type="email"],
body.post-type-job_application input[type="password"],
body.post-type-job_application select,
body.post-type-job_application textarea {
  font-size: 12px;
  padding: 6px 8px;
  max-width: 100%;
}

body.post-type-job_vacancy input.small-text,
body.post-type-job_application input.small-text {
  width: 80px;
}

body.post-type-job_vacancy input.large-text,
body.post-type-job_application input.large-text {
  max-width: 100%;
}

body.post-type-job_vacancy .description,
body.post-type-job_application .description {
  font-size: 11px;
  color: #666;
  margin: 4px 0 0;
  display: block;
  font-style: italic;
}

body.post-type-job_vacancy label,
body.post-type-job_application label {
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

/* Publish/Submit box sizing */
body.post-type-job_vacancy #submitdiv,
body.post-type-job_application #submitdiv {
  padding: 10px 12px;
}

body.post-type-job_vacancy #submitdiv .inside,
body.post-type-job_application #submitdiv .inside {
  padding: 8px;
}

body.post-type-job_vacancy #submitdiv .button,
body.post-type-job_application #submitdiv .button {
  font-size: 12px;
  padding: 6px 12px;
  height: auto;
}

body.post-type-job_vacancy #major-publishing-actions,
body.post-type-job_application #major-publishing-actions {
  padding: 0;
}

body.post-type-job_vacancy #major-publishing-actions .button-primary,
body.post-type-job_application #major-publishing-actions .button-primary {
  font-size: 12px;
  padding: 6px 14px;
  height: auto;
}

/* Reduce title box */
body.post-type-job_vacancy #titlediv,
body.post-type-job_application #titlediv {
  margin-bottom: 8px;
}

body.post-type-job_vacancy #titlediv #title,
body.post-type-job_application #titlediv #title {
  font-size: 18px;
  padding: 8px 10px;
}

body.post-type-job_vacancy #titlediv .inside,
body.post-type-job_application #titlediv .inside {
  padding: 8px 12px;
}

/* Responsive */
@media (max-width: 600px) {
  .hr-ats-field-row {
    grid-template-columns: 1fr;
  }
  .hr-ats-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .hr-ats-vacancy-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hr-ats-submit-btn {
    width: 100%;
    justify-content: center;
  }
  .hr-ats-form-wrap {
    padding: 0 12px;
  }
  .hr-ats-form-header {
    margin-bottom: 12px;
  }
  .hr-ats-form-title {
    font-size: 16px;
  }
  .hr-ats-form-section {
    padding: 12px;
  }
  .hr-ats-section-title {
    font-size: 12px;
    gap: 6px;
  }
  .hr-ats-section-number {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
  .hr-ats-form-and-vacancy-wrapper {
    gap: 12px;
  }
  .hr-ats-vacancy-description-sidebar {
    margin-top: -6px;
  }
  .hr-ats-vacancy-description-sidebar .hr-ats-vacancy-panel {
    margin-bottom: 12px;
  }
  .hr-ats-details-grid {
    grid-template-columns: 1fr;
  }
  .hr-ats-detail-card {
    flex-direction: row;
  }
  .hr-ats-score-badge {
    width: 80px;
    height: 80px;
    font-size: 28px;
    margin-bottom: 10px;
  }
  .hr-ats-score-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hr-ats-breakdown-grid {
    grid-template-columns: 1fr;
  }
  .hr-ats-breakdown-card {
    padding: 10px;
  }
  .hr-ats-breakdown-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .hr-ats-breakdown-score {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hr-ats-score-badge {
    width: 70px;
    height: 70px;
    font-size: 22px;
  }
  .hr-ats-score-label {
    font-size: 9px;
  }
  .hr-ats-breakdown-card {
    padding: 8px;
  }
  .hr-ats-breakdown-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .hr-ats-match-description {
    font-size: 10px;
  }
  .hr-ats-stat-card {
    padding: 10px;
  }
  .hr-ats-stat-icon {
    font-size: 14px;
  }
  .hr-ats-vacancy-panel {
    margin-bottom: 8px;
  }
  .hr-ats-vacancy-header {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  .hr-ats-vacancy-title {
    width: 100%;
  }
  .hr-ats-vacancy-meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .hr-ats-meta-item {
    margin-right: 8px;
  }
}

/* ==========================================================================
   Job Vacancy/Application Admin Page - Professional Redesign
   ========================================================================== */

body.post-type-job_vacancy #wp-content-editor-container,
body.post-type-job_application #wp-content-editor-container {
  background: #f8fafb;
  border: none;
  padding: 0;
  margin: 0;
}

body.post-type-job_vacancy .wp-editor-wrap,
body.post-type-job_application .wp-editor-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

/* Page header styling */
body.post-type-job_vacancy h1,
body.post-type-job_application h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1d2327;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

/* Enhanced Meta Box Styling */
body.post-type-job_vacancy .postbox,
body.post-type-job_application .postbox {
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background: linear-gradient(to bottom, #fff 0%, #fafbfc 100%);
  overflow: hidden;
  transition: all 0.2s ease;
}

body.post-type-job_vacancy .postbox:hover,
body.post-type-job_application .postbox:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

body.post-type-job_vacancy .postbox .postbox-header,
body.post-type-job_application .postbox .postbox-header {
  background: linear-gradient(90deg, #f3f4f6 0%, #f9fafb 100%);
  border-bottom: 1px solid #e5e7eb;
}

body.post-type-job_vacancy .postbox h2,
body.post-type-job_application .postbox h2 {
  font-size: 14px;
  font-weight: 700;
  color: #1d2327;
  padding: 12px 14px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.post-type-job_vacancy .postbox h2::before,
body.post-type-job_application .postbox h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--hr-blue);
  border-radius: 2px;
}

/* Color-coded meta boxes */
#hr_ats_vacancy_requirements,
#hr_ats_job_requirements {
  --box-color: #0891b2;
}
#hr_ats_vacancy_requirements h2::before,
#hr_ats_job_requirements h2::before {
  background: var(--box-color);
}

#hr_ats_vacancy_screening,
#hr_ats_job_screening {
  --box-color: #7c3aed;
}
#hr_ats_vacancy_screening h2::before,
#hr_ats_job_screening h2::before {
  background: var(--box-color);
}

#hr_ats_vacancy_assignment,
#hr_ats_job_assignment {
  --box-color: #059669;
}
#hr_ats_vacancy_assignment h2::before,
#hr_ats_job_assignment h2::before {
  background: var(--box-color);
}

/* Meta box content area */
body.post-type-job_vacancy .postbox .inside,
body.post-type-job_application .postbox .inside {
  padding: 14px 16px;
  background: #fff;
}

/* Form table enhancements */
body.post-type-job_vacancy .form-table,
body.post-type-job_application .form-table {
  border-spacing: 0;
  border-collapse: separate;
}

body.post-type-job_vacancy .form-table tr,
body.post-type-job_application .form-table tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

body.post-type-job_vacancy .form-table tr:hover,
body.post-type-job_application .form-table tr:hover {
  background: #f9fafb;
}

body.post-type-job_vacancy .form-table tr:last-child,
body.post-type-job_application .form-table tr:last-child {
  border-bottom: none;
}

body.post-type-job_vacancy .form-table th,
body.post-type-job_application .form-table th {
  width: 160px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 12px;
  text-align: left;
  vertical-align: top;
  background: transparent;
}

body.post-type-job_vacancy .form-table td,
body.post-type-job_application .form-table td {
  padding: 12px;
  font-size: 13px;
  color: #374151;
}

/* Input field enhancements */
body.post-type-job_vacancy input[type="text"],
body.post-type-job_vacancy input[type="number"],
body.post-type-job_vacancy input[type="email"],
body.post-type-job_vacancy select,
body.post-type-job_vacancy textarea,
body.post-type-job_application input[type="text"],
body.post-type-job_application input[type="number"],
body.post-type-job_application input[type="email"],
body.post-type-job_application select,
body.post-type-job_application textarea {
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  transition: all 0.2s ease;
}

body.post-type-job_vacancy input[type="text"]:focus,
body.post-type-job_vacancy input[type="number"]:focus,
body.post-type-job_vacancy input[type="email"]:focus,
body.post-type-job_vacancy select:focus,
body.post-type-job_vacancy textarea:focus,
body.post-type-job_application input[type="text"]:focus,
body.post-type-job_application input[type="number"]:focus,
body.post-type-job_application input[type="email"]:focus,
body.post-type-job_application select:focus,
body.post-type-job_application textarea:focus {
  outline: none;
  border-color: var(--hr-blue);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
  background: #fafbfc;
}

body.post-type-job_vacancy input.small-text,
body.post-type-job_application input.small-text {
  width: 100px;
}

body.post-type-job_vacancy input.large-text,
body.post-type-job_application input.large-text {
  width: 100%;
  max-width: 100%;
}

body.post-type-job_vacancy textarea,
body.post-type-job_application textarea {
  resize: vertical;
  min-height: 100px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

body.post-type-job_vacancy select,
body.post-type-job_application select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 18px;
  padding-right: 32px;
}

/* Labels */
body.post-type-job_vacancy label,
body.post-type-job_application label {
  font-size: 12px;
  font-weight: 600;
  color: #1d2327;
  display: block;
  margin-bottom: 6px;
}

/* Description text */
body.post-type-job_vacancy .description,
body.post-type-job_application .description {
  font-size: 11px;
  color: #6b7280;
  margin: 6px 0 0;
  display: block;
  font-style: italic;
  line-height: 1.5;
}

/* Title box */
body.post-type-job_vacancy #titlediv,
body.post-type-job_application #titlediv {
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background: #fff;
  overflow: hidden;
}

body.post-type-job_vacancy #titlediv .inside,
body.post-type-job_application #titlediv .inside {
  padding: 16px;
  background: linear-gradient(to bottom, #fff 0%, #fafbfc 100%);
}

body.post-type-job_vacancy #title,
body.post-type-job_application #title {
  font-size: 18px;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #1d2327;
}

body.post-type-job_vacancy #title:focus,
body.post-type-job_application #title:focus {
  outline: none;
  border-color: var(--hr-blue);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Publish/Submit box */
body.post-type-job_vacancy #submitdiv,
body.post-type-job_application #submitdiv {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.post-type-job_vacancy #submitdiv .inside,
body.post-type-job_application #submitdiv .inside {
  padding: 14px;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

body.post-type-job_vacancy #submitdiv .button,
body.post-type-job_application #submitdiv .button {
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

body.post-type-job_vacancy #submitdiv .button:hover,
body.post-type-job_application #submitdiv .button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

body.post-type-job_vacancy #submitdiv .button-primary,
body.post-type-job_application #submitdiv .button-primary {
  background: linear-gradient(135deg, var(--hr-blue) 0%, #1a5c9a 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

body.post-type-job_vacancy #submitdiv .button-primary:hover,
body.post-type-job_application #submitdiv .button-primary:hover {
  background: linear-gradient(135deg, #1a5c9a 0%, #154080 100%);
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
  border: none;
}

body.post-type-job_vacancy #submitdiv .button-primary:active,
body.post-type-job_application #submitdiv .button-primary:active {
  transform: translateY(1px);
}

/* Delete button */
body.post-type-job_vacancy #delete-action a,
body.post-type-job_application #delete-action a {
  font-size: 12px;
  color: #dc2626;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.post-type-job_vacancy #delete-action a:hover,
body.post-type-job_application #delete-action a:hover {
  color: #b91c1c;
  text-decoration: underline;
}

/* Admin page background */
body.post-type-job_vacancy #wpbody-content,
body.post-type-job_application #wpbody-content {
  padding: 12px;
  background: #f8fafb;
}

body.post-type-job_vacancy,
body.post-type-job_application {
  background: #f8fafb;
}

body.post-type-job_vacancy #wpcontent,
body.post-type-job_application #wpcontent {
  background: #f8fafb;
}

body.post-type-job_vacancy #post-body-content,
body.post-type-job_application #post-body-content {
  background: transparent;
}

/* Form Field Styling - Modern Cards */
body.post-type-job_vacancy .hr-ats-form-field,
body.post-type-job_application .hr-ats-form-field {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.post-type-job_vacancy .hr-ats-form-field:last-child,
body.post-type-job_application .hr-ats-form-field:last-child {
  border-bottom: none;
}

body.post-type-job_vacancy .hr-ats-vacancy-requirements-form,
body.post-type-job_vacancy .hr-ats-vacancy-screening-form,
body.post-type-job_application .hr-ats-vacancy-requirements-form,
body.post-type-job_application .hr-ats-vacancy-screening-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.post-type-job_vacancy .hr-ats-form-field label,
body.post-type-job_application .hr-ats-form-field label {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1d2327;
  margin-bottom: 2px;
}

body.post-type-job_vacancy .hr-ats-form-field label .dashicons,
body.post-type-job_application .hr-ats-form-field label .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.post-type-job_vacancy .hr-ats-form-field input,
body.post-type-job_vacancy .hr-ats-form-field select,
body.post-type-job_application .hr-ats-form-field input,
body.post-type-job_application .hr-ats-form-field select {
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  transition: all 0.2s ease;
}

body.post-type-job_vacancy .hr-ats-form-field input:focus,
body.post-type-job_vacancy .hr-ats-form-field select:focus,
body.post-type-job_application .hr-ats-form-field input:focus,
body.post-type-job_application .hr-ats-form-field select:focus {
  outline: none;
  border-color: var(--hr-blue);
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
  background: #fafbfc;
}

@supports (display: grid) {
  body.post-type-job_vacancy #post-body .metabox-holder,
  body.post-type-job_application #post-body .metabox-holder {
    display: grid;
    gap: 16px;
  }
}
/* ==========================================================================
   15. Career Page Styles
   ========================================================================== */

.hr-ats-career-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  font-family: var(--hr-font);
}

.hr-ats-career-header {
  text-align: center;
  margin-bottom: 48px;
}

.hr-ats-career-title {
  font-size: 48px;
  font-weight: 800;
  color: #1d2327;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hr-ats-career-subtitle {
  font-size: 18px;
  color: var(--hr-grey);
  margin: 0;
  line-height: 1.6;
}

/* Vacancies List Grid */
.hr-ats-vacancies-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin: 0;
}

/* Vacancy Card */
.hr-ats-vacancy-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #121b3c;
  border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.hr-ats-vacancy-card:hover {
  box-shadow: var(--hr-shadow-md);
  border-color: var(--hr-blue);
  transform: translateY(-2px);
}

/* Vacancy Card Header */
.hr-ats-vacancy-card-header {
  padding: 20px;
  background: #121b3c;
  /* border-bottom: 2px solid var(--hr-blue); */
}

.hr-ats-vacancy-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

/* Vacancy Card Content */
.hr-ats-vacancy-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hr-ats-vacancy-card-description {
  font-size: 14px;
  color: var(--hr-grey);
  margin: 0;
  line-height: 1.6;
}

/* Vacancy Card Meta */
.hr-ats-vacancy-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.hr-ats-vacancy-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hr-blue);
  background: var(--hr-blue-light);
  padding: 6px 12px;
  border-radius: var(--hr-radius-sm);
}

.hr-ats-vacancy-meta-badge .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Vacancy Card Footer */
.hr-ats-vacancy-card-footer {
  padding: 16px 20px;
  background: #fafbfc;
  border-top: 1px solid var(--hr-border);
}

/* Apply Now Button */
.hr-ats-vacancy-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f47a38;
  color: #fff;
  text-decoration: none;
  border-radius: var(--hr-radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.hr-ats-vacancy-apply-btn:hover {
  background: #a95528;
  transform: translateX(2px);
  text-decoration: none;
  color: #fff;
}

.hr-ats-vacancy-apply-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.hr-ats-vacancy-apply-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* No Vacancies Notice */
.hr-ats-notice {
  padding: 16px 20px;
  border-radius: var(--hr-radius);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hr-ats-notice .dashicons {
  flex-shrink: 0;
  font-size: 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.hr-ats-notice-info {
  background: var(--hr-blue-light);
  color: #0c3d7a;
  border: 1px solid var(--hr-blue);
}

.hr-ats-notice-success {
  background: var(--hr-green-light);
  color: #1b5e20;
  border: 1px solid var(--hr-green);
}

.hr-ats-notice-error {
  background: var(--hr-red-light);
  color: #b71c1c;
  border: 1px solid var(--hr-red);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hr-ats-career-title {
    font-size: 36px;
  }

  .hr-ats-career-subtitle {
    font-size: 16px;
  }

  .hr-ats-vacancies-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
/* Delete Button Styling */
.button-link-delete {
  color: #c62828 !important;
  border-color: #c62828 !important;
  background: transparent !important;
}

.button-link-delete:hover {
  background: var(--hr-red-light) !important;
  color: #b71c1c !important;
  border-color: #b71c1c !important;
}
