[data-bs-theme="light"] body {
  background-color: #f0f0f0 !important;
  color: #333;
}

[data-bs-theme="dark"] body {
  background-color: #08151d !important;
  color: #fff;
}

:root {
  --apply-grad: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.1),
    rgba(32, 201, 151, 0.06)
  );
  --apply-border: rgba(255, 255, 255, 0.1);
  --apply-soft: #0b1424;
  --apply-input-bg: #0b1424;
  --apply-input-border: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="light"] {
  --apply-grad: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.06),
    rgba(32, 201, 151, 0.04)
  );
  --apply-border: rgba(0, 0, 0, 0.1);
  --apply-soft: #f5f7fb;
  --apply-input-bg: #f5f7fb;
  --apply-input-border: rgba(0, 0, 0, 0.12);
}

.apply-shell {
  max-width: 980px;
}

.apply-header {
  padding: 18px 18px 0 18px;
}

.apply-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0.85;
}

.apply-title {
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 6px 0 6px 0;
  line-height: 1.15;
}

.apply-subtitle {
  opacity: 0.85;
  margin: 0;
}

.apply-card {
  border-radius: 24px;
  border: 1px solid var(--apply-border);
  box-shadow: 0 0.85rem 2rem rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.apply-card-body {
  padding: 25px;
}
.apply-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .apply-divider {
  border-top-color: rgba(0, 0, 0, 0.08);
}
/* Submit Application button (scoped) */
#applySubmitBtn,
.btn#applySubmitBtn,
.apply-card #applySubmitBtn {
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  background: linear-gradient(145deg, #00baff, #0077cc) !important;
  box-shadow: 0 0 10px rgba(0, 186, 255, 0.4) !important;
}

#applySubmitBtn:hover,
.btn#applySubmitBtn:hover,
.apply-card #applySubmitBtn:hover {
  transform: scale(1.05) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow:
    0 0 20px rgba(0, 186, 255, 0.6), 0 0 40px rgba(0, 186, 255, 0.3) !important;
}

.apply-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 10px 0;
  /* color: rgba(var(--bs-primary-rgb), 0.95); */
}

[data-bs-theme="dark"] .apply-section-title {
  color: #fff !important;
}
[data-bs-theme="light"] .apply-section-title {
  color: #333 !important;
}

.apply-form .form-label {
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 0.35rem;
}

/* Label colors per theme */
[data-bs-theme="light"] .apply-form .form-label,
[data-bs-theme="light"] .apply-card label:not(.crm-treatment-doc-card__upload) {
  color: #333;
}

[data-bs-theme="dark"] .apply-form .form-label,
[data-bs-theme="dark"] .apply-card label:not(.crm-treatment-doc-card__upload) {
  color: #fff !important;
}

.apply-form .form-control,
.apply-form .form-select {
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  background-color: var(--apply-input-bg);
  border: 1px solid var(--apply-input-border);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .apply-form .form-control,
[data-bs-theme="dark"] .apply-form .form-select {
    color: #fff !important;
}

[data-bs-theme="light"] .apply-form .form-control,
[data-bs-theme="light"] .apply-form .form-select {
  border-color: #c8c8c8;
  background-color: #f0f0f0;
}


[data-bs-theme="dark"] .apply-form .form-control,
[data-bs-theme="dark"] .apply-form .form-select {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: #172635;
}

.apply-form .form-control:focus,
.apply-form .form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.2);
  border-color: rgba(13, 110, 253, 0.55);
}

.apply-form input[type="file"].form-control {
  padding: 0.55rem 0.9rem;
}

.req {
  color: rgba(var(--bs-danger-rgb), 0.92);
  margin-left: 0.25rem;
  font-weight: 800;
}

.apply-help {
  font-size: 0.86rem;
  opacity: 0.75;
  margin-top: 0.35rem;
}

.position-search {
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  background-color: var(--apply-input-bg);
  border: 1px solid var(--apply-input-border);
  color: var(--bs-body-color);
  width: 100%;
}

.position-item {
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  margin-bottom: 0.6rem;
  padding: 0.9rem 1rem;
}

[data-bs-theme="light"] .position-item {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.position-item:hover {
  border-color: rgba(13, 110, 253, 0.55) !important;
  transform: translateY(-1px);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease;
}

.position-item .t {
  font-weight: 900;
  letter-spacing: -0.01em;
}

.position-item .s {
  font-size: 0.9rem;
  opacity: 0.78;
  margin-top: 0.2rem;
}

/* Country combobox (search is the field itself; no separate searchbar) */
.country-combobox {
  position: relative;
}
.country-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  background-color: var(--apply-input-bg);
  border: 1px solid var(--apply-input-border);
}

[data-bs-theme="light"] .country-field {
  background-color: #f0f0f0;
  border: 1px solid #c8c8c8;
}

[data-bs-theme="dark"] .country-field {
  background-color: #172635;
  border: 1px solid rgba(255, 255, 2555, 0.2);
}


.country-field:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.2);
  border-color: rgba(13, 110, 253, 0.55);
}
.country-input {
  border: 0 !important;
  box-shadow: none !important;
  padding: 4px !important;
  background: transparent !important;
  flex: 1;
  min-width: 0;
}
.country-flag {
  width: 20px;
  height: 14px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  flex: 0 0 auto;
  opacity: 0.35;
}
[data-bs-theme="light"] .country-flag {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.country-caret {
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.country-menu {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border-radius: 16px;
  background-color: var(--apply-input-bg);
  border: 1px solid var(--apply-input-border);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  max-height: 280px;
  overflow: auto;
  padding: 0.4rem;
}

[data-bs-theme="dark"] .country-menu {
    background-color: #172635 !important;
}

/* Theme-specific overrides for the apply card (appearance requested) */
[data-bs-theme="light"] .apply-card {
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow:
    0 0 16px 4px #023e9657,
    0 1px 8px 0 #023e9600 !important;
  background-color: #fbfbfb !important;
}

[data-bs-theme="dark"] .apply-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 16px 4px rgba(0, 186, 255, 0.13),
    0 1px 8px 0 rgba(0, 186, 255, 0.07) !important;
  background-color: #08151d !important;
}

[data-bs-theme="light"] .apply-card .apply-card-body {
  background-color: #fbfbfb !important;
}

[data-bs-theme="dark"] .apply-card .apply-card-body {
  background-color: #08151d !important;
}
.country-option {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.country-option:hover,
.country-option[aria-selected="true"] {
  background: rgba(13, 110, 253, 0.14);
}
.country-option .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Custom uploads */
.upload-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.upload-btn {
  border: 0;
  border-radius: 14px;
  padding: 0.65rem 1rem;
  /* background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.98),
    rgba(124, 58, 237, 0.92)
  ); */

  /* background:linear-gradient(135deg, rgb(100 156 238 / 98%), rgb(41 38 117 / 92%)); */
background: linear-gradient(135deg, rgb(167 167 167 / 98%), rgb(46 45 72 / 92%));

  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  
}
.upload-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

/* Upload label button inside bordered-box file-row */
.file-row .btn {
  color: white !important;
  border: none !important;
  border-radius: 5px !important;
  background: linear-gradient(145deg, #00baff, #0077cc) !important;
  box-shadow: 0 0 10px rgba(0, 186, 255, 0.4) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.file-row .btn:hover {
  transform: scale(1.05) !important;
  color: white !important;
  text-decoration: none !important;
  box-shadow: 0 0 20px rgba(0, 186, 255, 0.6), 0 0 40px rgba(0, 186, 255, 0.3) !important;
}
.upload-meta {
  font-size: 0.86rem;
  opacity: 0.78;
}
.upload-cards {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  min-width: 0;
}
.upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 0.9rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 64px;
}
[data-bs-theme="light"] .upload-card {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}
.upload-card .left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}
.upload-card .meta {
  min-width: 0;
  flex: 1 1 auto;
}
.upload-card .name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 46ch;
}
.upload-card .sub {
  font-size: 0.86rem;
  opacity: 0.75;
}
.upload-remove {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-bs-theme="light"] .upload-remove {
  color: rgba(0, 0, 0, 0.6);
}
.upload-remove:hover {
  background: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="light"] .upload-remove:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Back to Careers button (scoped to this page) */
.apply-shell a.btn[href$="careers.php"],
.apply-shell a.btn[href*="/careers.php"] {
  font-size: 0.9rem;
  white-space: nowrap;
  color: #00baff !important;
  background: rgba(0, 186, 255, 0.05) !important;
  box-shadow: 0 0 10px rgba(0, 186, 255, 0.25) !important;
  font-weight: 500 !important;
  border-color: #00baff !important;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    color 0.12s ease;
}

.apply-shell a.btn[href$="careers.php"]:hover,
.apply-shell a.btn[href*="/careers.php"]:hover {
  transform: scale(1.05) !important;
  color: #ffffff !important;
  background-color: #00baff !important;
  text-decoration: none !important;
  box-shadow:
    0 0 20px rgba(0, 186, 255, 0.6),
    0 0 40px rgba(0, 186, 255, 0.3) !important;
}


/* Flatpickr calendar chrome: HRModule/assets/css/hr_flatpickr.css */

/* ── Contract-style upload items (Documents section) ─────────────── */
[data-bs-theme="dark"] .contract-pdf-item {
  background-color: #172635 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 6px;
}

[data-bs-theme="light"] .contract-pdf-item {
  background-color: #fbfbfb !important;
  border: 1px solid #c8c8c8 !important;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 6px;
}

.contract-pdf-item {
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 6px;
}

[data-bs-theme="dark"] .contract-pdf-filename {
  color: #4db8ff !important;
}

[data-bs-theme="light"] .contract-pdf-filename {
  color: #0077cc !important;
}

.contract-pdf-item .contract-pdf-remove {
  flex-shrink: 0;
  border: 1px solid #dc3545 !important;
  color: #dc3545 !important;
  background: transparent !important;
  border-radius: 4px;
  padding: 4px 10px;
  line-height: 1;
}

.contract-pdf-item .contract-pdf-remove:hover {
  background-color: #dc3545 !important;
  color: #fff !important;
}

  [data-bs-theme="dark"] .contract-pdf-item[data-new] {
    /* background-color: #1e3f5c !important; */
    background-color: #172635 !important;
    /* border-color: rgba(0, 186, 255, 0.35) !important; */
    border-color: rgba(255, 255, 255, 0.2) !important;
  }
  
  

[data-bs-theme="light"] .contract-pdf-item[data-new] {
  background-color: #e8f4ff !important;
  border-color: #a8d4f5 !important;
}

@media (max-width: 767.98px) {
  .apply-shell {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .apply-form .form-control,
  .apply-form .form-select {
    width: 100%;
    max-width: 100%;
  }
}

/* Social media multi-link repeater */
.apply-form .apply-social-composer,
.apply-form .crm-employee-social-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.apply-form .employee-social-links-repeater {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.apply-form .employee-social-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.apply-form .employee-social-row .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.apply-form .crm-employee-social-add,
.apply-form .employee-social-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  height: 42px;
  min-height: 42px;
  padding: 0 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.apply-form .crm-employee-social-add {
  align-self: flex-start;
  height: 34px;
  min-height: 34px;
  padding: 0 0.75rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.45);
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: inherit;
}

.apply-form .crm-employee-social-add:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.75);
  background: rgba(var(--bs-primary-rgb), 0.2);
}

.apply-form .employee-social-remove-btn {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
}

.apply-form .employee-social-remove-btn:hover {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(220, 38, 38, 0.22);
  color: #fff;
}

[data-bs-theme="light"] .apply-form .crm-employee-social-add {
  border-color: rgba(13, 110, 253, 0.35);
  background: rgba(13, 110, 253, 0.08);
  color: #1d4ed8;
}

[data-bs-theme="light"] .apply-form .employee-social-remove-btn {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
}

.apply-form .employee-social-link-input.is-invalid {
  border-color: #dc3545;
}

/* Pointers on clickable controls only */
.apply-shell a,
.apply-shell .btn,
.apply-shell .position-item,
.apply-form .form-select,
.apply-form select,
.apply-form .country-field,
.apply-form .country-caret,
.apply-form .country-option,
.apply-form .crm-employee-social-add,
.apply-form .employee-social-remove-btn,
.apply-form .crm-treatment-doc-card__upload,
.apply-form .crm-treatment-doc-card__files-area[data-add-patient-file-drop],
.apply-form .edit-patient-doc-remove,
.apply-form .edit-patient-doc-thumb,
.apply-form .edit-patient-doc-file,
.apply-form .edit-patient-doc-file-link,
.apply-form .edit-patient-doc-thumb-link,
.apply-form input.flatpickr-input:not([disabled]),
.apply-form input.flatpickr-alt-input:not([disabled]),
.apply-form .flatpickr-wrapper,
#applySubmitBtn {
  cursor: pointer;
}

.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form textarea,
.apply-form .country-input {
  cursor: text;
}

.apply-form .country-field {
  cursor: pointer;
}

/* Compact HR receipt cards on the apply form */
.apply-form .apply-docs-row .crm-applicant-docs.crm-employee-docs {
  grid-template-columns: 1fr !important;
  min-width: 0;
}

.apply-form .crm-doc-card-ui .crm-treatment-doc-card {
  min-height: 10.25rem;
}

.apply-form .crm-doc-card-ui .crm-treatment-doc-card--editable .crm-treatment-doc-card__body--editable {
  min-height: 7.25rem;
}

.apply-form .crm-doc-card-ui .crm-treatment-doc-card--editable .crm-treatment-doc-card__files-area[data-add-patient-file-drop] {
  min-height: 6.25rem;
}

.apply-form .crm-doc-card-ui .crm-treatment-doc-card__grid {
  grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
  justify-content: start;
}

.apply-form .crm-doc-card-ui .crm-treatment-doc-card__name .req {
  margin-left: 0.15rem;
}

.apply-form .crm-doc-card-ui .crm-treatment-doc-card__upload-inner {
  pointer-events: none;
}

.apply-form .crm-doc-card-ui .edit-patient-doc-file {
  width: 100%;
}
