/* ============================================
   Careers — Centered card · no scroll
   ============================================ */

html.careers-html,
.careers-page {
  height: 100%;
  overflow: hidden;
}

.careers-page {
  margin: 0;
  line-height: 1.4;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 30% 20%, rgba(200, 146, 42, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(200, 146, 42, 0.06) 0%, transparent 40%),
    var(--dark);
}

/* Center stage — modest side margin */
.cr-stage {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px clamp(18px, 2.5vw, 44px);
  overflow: hidden;
}

/* Main card — slightly wider to fit job text without scroll */
.cr-main-card {
  width: 100%;
  max-width: min(1260px, calc(100vw - 36px));
  height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Card top bar */
.cr-card-bar {
  flex-shrink: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--dark);
  border-bottom: 2px solid var(--primary);
}

.cr-logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.cr-logo img {
  height: 28px;
}

.cr-bar-title {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.03em;
}

.cr-bar-links {
  display: flex;
  gap: 0.75rem;
}

.cr-bar-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition);
}

.cr-bar-links a:hover {
  color: var(--primary-light);
}

/* Card body — 60 / 40 */
.cr-card-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 3fr 2fr;
  overflow: hidden;
}

/* ---- LEFT: Job (60%) ---- */
.cr-job {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.5rem 0.75rem;
  background: linear-gradient(165deg, var(--dark-soft) 0%, var(--dark) 100%);
  color: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.cr-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--primary-light);
  margin-bottom: 0.3rem;
}

.cr-job h1 {
  color: var(--white);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  margin: 0 0 0.15rem;
  line-height: 1.2;
}

.cr-company {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  margin: 0 0 0.45rem;
}

.cr-job-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
}

.cr-section {
  flex-shrink: 0;
}

.cr-section h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.cr-section p {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.cr-section p strong {
  color: var(--primary-light);
}

.cr-section-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1.25rem;
  flex-shrink: 0;
}

.cr-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.85);
}

/* Responsibilities — 2 columns to save vertical space */
.cr-list-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1rem;
  padding-left: 0;
  list-style: none;
}

.cr-list-roles li {
  position: relative;
  padding-left: 0.85rem;
  margin-bottom: 0;
}

.cr-list-roles li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-light);
}

.cr-list li {
  margin-bottom: 0.15rem;
}

.cr-list li:last-child {
  margin-bottom: 0;
}

.cr-list li strong {
  color: var(--primary-light);
  font-weight: 600;
}

.cr-list-compact {
  font-size: 0.82rem;
  line-height: 1.4;
}

.cr-list-compact li {
  margin-bottom: 0.12rem;
}

.cr-job-foot {
  flex-shrink: 0;
  display: flex;
  gap: 1.25rem;
  padding-top: 0.45rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.cr-job-foot i {
  color: var(--primary);
  margin-right: 0.3rem;
  font-size: 0.76rem;
}

/* ---- RIGHT: Form (40%) ---- */
.cr-form {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.15rem;
  background: #f3f5f8;
  overflow: hidden;
}

.cr-form-head {
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}

.cr-form-head h2 {
  font-size: 1.12rem;
  margin: 0;
  color: var(--dark);
}

.cr-form-head p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
}

#formPanel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#registerForm {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Floating toast — top-right, no layout shift */
.cr-toast {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: min(290px, calc(100% - 1.4rem));
  padding: 0.55rem 0.65rem;
  border-radius: 9px;
  font-size: 0.76rem;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.16);
  pointer-events: none;
  opacity: 0;
  transform: translateX(calc(100% + 16px));
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.cr-toast.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.cr-toast-warning {
  background: #fff9eb;
  border: 1px solid rgba(200, 146, 42, 0.5);
  color: #6b4e0f;
}

.cr-toast-danger {
  background: #fff5f5;
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #9b1c2e;
}

.cr-toast-icon {
  flex-shrink: 0;
  margin-top: 0.08rem;
  font-size: 0.88rem;
}

.cr-toast-warning .cr-toast-icon {
  color: var(--primary-dark);
}

.cr-toast-danger .cr-toast-icon {
  color: #dc3545;
}

.cr-toast-text {
  flex: 1;
}

.cr-toast-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  margin: -0.1rem 0 0;
  line-height: 1;
  font-size: 1.15rem;
  opacity: 0.5;
  cursor: pointer;
  color: inherit;
}

.cr-toast-close:hover {
  opacity: 1;
}

/* Form stack — fills card height */
.cr-form-stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: hidden;
}

/* Mini cards */
.cr-mini-card {
  flex: 1 1 0;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  box-shadow: 0 1px 3px rgba(15, 20, 25, 0.04);
  overflow: visible;
}

.cr-mini-card-exp {
  flex: 0 0 auto;
}

.cr-exp-row {
  display: grid;
  grid-template-columns: 1.1fr 0.85fr 0.85fr;
  gap: 0.4rem;
  align-items: end;
}

.cr-exp-row .cr-fld label {
  font-size: 0.76rem;
  line-height: 1.3;
  min-height: 2.4em;
  display: flex;
  align-items: flex-end;
}

.cr-mini-card-title {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #f0f2f5;
}

.cr-mini-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.5rem;
  align-content: start;
}

.cr-mini-grid-stack {
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.cr-fld {
  display: flex;
  flex-direction: column;
}

.cr-fld-full {
  grid-column: 1 / -1;
}

.cr-fld label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.cr-fld .form-control-sm,
.cr-fld .form-select-sm {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  border-radius: 7px;
  border-color: #dde3ea;
}

.cr-fld .form-control-sm:focus,
.cr-fld .form-select-sm:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(200, 146, 42, 0.1);
}

/* Language */
.cr-lang-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.35rem;
}

.cr-lang-row {
  display: grid;
  grid-template-columns: 72px repeat(3, 1fr);
  gap: 0.4rem;
  align-items: center;
}

.cr-lang-head span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  text-align: center;
}

.cr-lang-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
}

.cr-lang-row .form-select-sm {
  padding: 0.35rem 0.45rem;
  font-size: 0.85rem;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
}

/* Resume + submit row */
.cr-mini-card-action {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  margin-top: 0.45rem;
}

.cr-file {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px dashed #cdd4de;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-light);
  margin: 0;
  min-height: 42px;
  transition: all var(--transition);
  overflow: hidden;
}

.cr-file:hover,
.cr-file.dragover {
  border-color: var(--primary);
  background: rgba(200, 146, 42, 0.04);
}

.cr-file.is-invalid {
  border-color: #dc3545;
  border-style: solid;
  background: rgba(220, 53, 69, 0.07);
  color: #b02a37;
  animation: cr-file-shake 0.45s ease;
}

.cr-file.is-invalid i {
  color: #dc3545;
}

@keyframes cr-file-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.cr-file i {
  color: var(--primary);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.cr-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cr-file input[type="file"] {
  display: none;
}

.cr-submit {
  flex-shrink: 0;
  align-self: stretch;
  padding: 0 1.1rem;
  font-size: 0.88rem;
  border-radius: 7px;
  white-space: nowrap;
  min-height: 42px;
}

/* Success */
.cr-success {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.25rem;
}

.cr-success.show {
  display: flex;
}

.cr-success-card {
  width: 100%;
  max-width: 340px;
  background: var(--white);
  border: 1px solid rgba(15, 20, 25, 0.07);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(15, 20, 25, 0.08);
  padding: 1.75rem 1.5rem 1.4rem;
  text-align: center;
}

.cr-success-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  background: linear-gradient(145deg, rgba(200, 146, 42, 0.22), rgba(200, 146, 42, 0.08));
  border: 2px solid rgba(200, 146, 42, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--primary-dark);
}

.cr-success h3 {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.55rem;
  line-height: 1.25;
}

.cr-success p {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-light);
  margin: 0 auto 1.35rem;
  max-width: 26em;
}

.cr-success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cr-success-btn {
  width: 100%;
  justify-content: center;
  padding: 0.68rem 1.25rem;
  font-size: 0.88rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1.2;
}

.btn-outline-aies-form {
  background: transparent;
  color: var(--dark);
  border: 2px solid rgba(15, 20, 25, 0.14);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-outline-aies-form:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: rgba(200, 146, 42, 0.07);
}

/* Taller screens — slight bump */
@media (min-height: 860px) {
  .cr-section p {
    font-size: 0.94rem;
  }

  .cr-list {
    font-size: 0.9rem;
  }

  .cr-fld .form-control-sm,
  .cr-fld .form-select-sm {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    font-size: 0.9rem;
  }

  .cr-lang-row .form-select-sm {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }

  .cr-file,
  .cr-submit {
    min-height: 44px;
    font-size: 0.88rem;
  }
}

/* Wide screens — use a bit more width, keep modest margins */
@media (min-width: 1400px) {
  .cr-stage {
    padding-left: 48px;
    padding-right: 48px;
  }

  .cr-main-card {
    max-width: min(1280px, calc(100vw - 96px));
  }
}

/* Shorter screens — slightly compact */
@media (max-height: 720px) {
  .cr-job {
    padding: 0.85rem 1.25rem;
  }

  .cr-job h1 {
    font-size: 1.35rem;
  }

  .cr-section p {
    font-size: 0.85rem;
  }

  .cr-list {
    font-size: 0.82rem;
  }

  .cr-form {
    padding: 0.75rem 1rem;
  }

  .cr-fld .form-control-sm,
  .cr-fld .form-select-sm {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    font-size: 0.85rem;
  }

  .cr-lang-row .form-select-sm {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
  }

  .cr-file,
  .cr-submit {
    min-height: 40px;
    font-size: 0.82rem;
  }
}

/* Mobile — allow scroll outside card */
@media (max-width: 820px) {
  html.careers-html,
  .careers-page {
    height: auto;
    overflow: auto;
  }

  .cr-stage {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 0.75rem;
  }

  .cr-main-card {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
  }

  .cr-card-body {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .cr-job {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .cr-form,
  #formPanel,
  #registerForm {
    overflow: visible;
  }

  .cr-section-row {
    grid-template-columns: 1fr;
  }

  .cr-list-roles {
    grid-template-columns: 1fr;
  }

  .cr-form-stack {
    overflow: visible;
  }

  .cr-mini-card {
    flex: none;
  }

  .cr-exp-row {
    grid-template-columns: 1fr;
  }

  .cr-exp-row .cr-fld label {
    min-height: auto;
  }

  .cr-mini-card-action {
    flex-direction: column;
    align-items: stretch;
  }

  .cr-submit {
    width: 100%;
  }
}

/* ============================================
   Admin Panel
   ============================================ */

.admin-body {
  background: var(--off-white);
  min-height: 100vh;
}

.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
}

.admin-login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.admin-header {
  background: var(--dark);
  color: var(--white);
  padding: 0.55rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-inner {
  padding: 0 1rem;
}

.admin-header h1 {
  color: var(--white);
  font-size: 1.05rem;
  margin: 0;
}

.admin-main {
  padding: 0.65rem 1rem 1rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.admin-stat-card {
  background: var(--white);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  border: 1px solid #e8ebf0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.admin-stat-card h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin: 0;
  line-height: 1;
  font-weight: 700;
}

.admin-stat-card p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-light);
  white-space: nowrap;
}

.admin-toolbar {
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.admin-search {
  max-width: 280px;
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  height: auto;
}

.admin-table-wrap {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid #e8ebf0;
  overflow: auto;
  box-shadow: 0 2px 12px rgba(15, 20, 25, 0.05);
}

.admin-table {
  margin: 0;
  font-size: 0.78rem;
  table-layout: fixed;
  width: 100%;
}

.admin-table col.col-num { width: 2rem; }
.admin-table col.col-candidate { width: 11%; }
.admin-table col.col-phone { width: 8%; }
.admin-table col.col-email { width: 14%; }
.admin-table col.col-exp { width: 4%; }
.admin-table col.col-yesno { width: 4.5rem; }
.admin-table col.col-registered { width: 6.5rem; }
.admin-table col.col-status { width: 6rem; }
.admin-table col.col-actions { width: 7.5rem; }

.admin-table thead {
  background: var(--dark-soft);
  color: var(--white);
}

.admin-table thead th {
  border: none;
  padding: 0.4rem 0.55rem;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 0.38rem 0.55rem;
  vertical-align: middle;
  border-color: #f0f2f5;
}

.admin-table tbody tr:hover {
  background: #f8fafc;
}

.admin-empty {
  padding: 2rem 0.5rem !important;
  font-size: 0.82rem;
}

.admin-table .col-num,
.admin-table td.col-num {
  text-align: center;
  color: var(--text-light);
  font-size: 0.72rem;
}

.admin-candidate-name {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--dark);
}

.admin-candidate-meta {
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 0.05rem;
}

.admin-phone-cell a,
.admin-email-cell a {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2563eb;
}

.admin-email-cell a {
  font-size: 0.7rem;
  color: #4b5563;
}

.admin-phone-cell a:hover,
.admin-email-cell a:hover {
  text-decoration: underline;
}

.admin-exp-cell {
  white-space: nowrap;
  font-size: 0.75rem;
}

.admin-table thead th:nth-child(6),
.admin-table thead th:nth-child(7),
.admin-table tbody td.admin-yesno-cell {
  text-align: center;
}

.admin-yesno-cell {
  text-align: center;
  white-space: nowrap;
}

.admin-yesno {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
}

.admin-yesno-y {
  color: #059669;
}

.admin-yesno-n {
  color: #64748b;
}

.admin-yesno-na {
  color: #cbd5e0;
  font-weight: 400;
}

.admin-date-cell {
  white-space: nowrap;
  line-height: 1.3;
}

.admin-date-day {
  display: block;
  font-size: 0.72rem;
  color: var(--dark);
}

.admin-date-time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-light);
}

.admin-status-cell {
  width: 1%;
}

.status-select {
  width: auto;
  min-width: 5.4rem;
  max-width: 6.5rem;
  padding: 0.12rem 1.4rem 0.12rem 0.35rem;
  font-size: 0.7rem;
  height: 26px;
  line-height: 1.2;
  border-radius: 5px;
  text-transform: capitalize;
  font-weight: 600;
}

.status-select-new { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.status-select-contacted { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.status-select-shortlisted { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.status-select-rejected { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.status-select-hired { background: #f5f3ff; border-color: #c4b5fd; color: #5b21b6; }

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-new { background: #dbeafe; color: #1e40af; }
.status-contacted { background: #fef3c7; color: #92400e; }
.status-shortlisted { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-hired { background: #ede9fe; color: #5b21b6; }

.btn-admin-sm {
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-admin-icon {
  padding: 0.18rem 0.38rem;
  font-size: 0.72rem;
  line-height: 1;
  border-radius: 5px;
}

.admin-icon-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.admin-actions-cell {
  width: 1%;
  white-space: nowrap;
}

.admin-no-resume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  color: #cbd5e0;
  font-size: 0.75rem;
}

@media (max-width: 991px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .admin-table-wrap {
    overflow-x: auto;
  }

  .admin-search {
    max-width: 100%;
    flex: 1;
  }
}

/* Candidate detail — single view modal */
.detail-modal-dialog {
  max-width: 880px;
  width: calc(100vw - 2rem);
  margin: 1rem auto;
}

.detail-modal-content {
  overflow: hidden;
  border-radius: 12px;
}

.detail-modal-header {
  padding: 0.65rem 1rem;
  background: var(--dark-soft);
  color: var(--white);
  border-bottom: 2px solid var(--primary);
}

.detail-modal-header .modal-title {
  color: var(--white);
  font-size: 0.95rem;
}

.detail-modal-header .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

.detail-modal-body {
  padding: 0;
  overflow: hidden;
}

.detail-sheet {
  padding: 0.75rem 1rem 0.85rem;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eef0f4;
}

.detail-head h4 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: var(--dark);
}

.detail-head-meta {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.35;
}

.detail-head-meta small {
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.detail-cell {
  background: #f8f9fb;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  min-width: 0;
}

.detail-cell label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.12rem;
}

.detail-cell span,
.detail-cell a {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--dark);
  word-break: break-word;
  line-height: 1.35;
}

.detail-cell a {
  color: var(--primary-dark);
  text-decoration: none;
}

.detail-cell a:hover {
  color: var(--primary);
}

.detail-cell-span-2 {
  grid-column: span 2;
}

.detail-lang-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.detail-lang-card {
  background: #f8f9fb;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}

.detail-lang-card label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.12rem;
}

.detail-lang-card span {
  font-size: 0.8rem;
  color: var(--dark);
  line-height: 1.35;
}

.detail-resume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding: 0.45rem 0.55rem;
  background: #f8f9fb;
  border: 1px solid #eef0f4;
  border-radius: 8px;
}

.detail-resume-row label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.1rem;
}

.detail-resume-row span {
  font-size: 0.8rem;
  color: var(--dark);
  word-break: break-all;
}

@media (max-width: 767px) {
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-cell-span-2 {
    grid-column: span 2;
  }

  .detail-lang-row {
    grid-template-columns: 1fr;
  }

  .detail-head {
    flex-direction: column;
  }

  .detail-head-meta {
    text-align: left;
  }

  .detail-resume-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Resume preview modal */
.admin-resume-preview-body {
  min-height: 70vh;
  max-height: 78vh;
  background: #f4f6f8;
  position: relative;
}

.admin-resume-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  color: var(--text-light);
}

.admin-resume-frame {
  width: 100%;
  height: 78vh;
  border: none;
  background: #525659;
}

.admin-resume-docx {
  padding: 1.5rem 2rem;
  max-height: 78vh;
  overflow-y: auto;
  background: var(--white);
  font-size: 0.95rem;
  line-height: 1.6;
}

.admin-resume-docx p {
  margin-bottom: 0.75rem;
}

.admin-resume-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem;
  text-align: center;
}
