/* ==========================================================================
   Biodata Card — dotsg_solutions theme
   Design reference: test01.png
   ========================================================================== */

/* ── Base card ─────────────────────────────────────────── */
.biodata-card {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  max-width: 960px;
  margin: 1.5rem auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .07), 0 6px 24px rgba(0, 0, 0, .06);
  overflow: hidden;
  color: #1f2937;
  line-height: 1.5;
}

/* ── Header ─────────────────────────────────────────────── */
.bdc-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: #fafaf8;
  border-bottom: 1px solid #e9e9e4;
}

/* Avatar */
.bdc-avatar-wrap {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: #8fbcb0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bdc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bdc-avatar-initials {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  user-select: none;
}

/* Header copy */
.bdc-header-body {
  flex: 1;
  min-width: 0;
}

.bdc-code-row {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: .72rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .35rem;
}

.bdc-code {
  font-weight: 700;
  color: #6b7280;
}

.bdc-dot {
  color: #d1d5db;
  padding: 0 .15rem;
}

.bdc-type {
  font-weight: 500;
}

.bdc-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 .35rem;
  line-height: 1.15;
}

.bdc-subtitle {
  font-size: .875rem;
  color: #6b7280;
  margin: 0 0 .8rem;
}

/* Badges */
.bdc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.bdc-badge {
  display: inline-flex;
  align-items: center;
  padding: .28rem .7rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.bdc-badge--available { background: #d1fae5; color: #065f46; }
.bdc-badge--other     { background: #f3f4f6; color: #374151; }
.bdc-badge--type      { background: #eff6ff; color: #1e40af; }
.bdc-badge--salary    { background: #ccfbf1; color: #0f766e; }
.bdc-badge--exp       { background: #dbeafe; color: #1e40af; }

/* ── Header action buttons (Edit / Download PDF) ────────── */
.bdc-header-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex-shrink: 0;
  align-self: flex-start;
}

.bdc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .1s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.bdc-action-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.bdc-action-btn:active { transform: translateY(0); }

.bdc-action-btn--edit {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.bdc-action-btn--edit:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.bdc-action-btn--pdf {
  background: #1e40af;
  color: #fff;
}
.bdc-action-btn--pdf:hover {
  background: #1e3a8a;
  transform: translateY(-1px);
}

/* ── PDF link (footer) ──────────────────────────────────── */
.bdc-pdf-footer-link {
  font-size: .72rem;
  font-weight: 700;
  color: #1e40af;
  text-decoration: none;
  padding: .2rem .5rem;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  background: #eff6ff;
  white-space: nowrap;
  transition: background .15s;
}
.bdc-pdf-footer-link:hover { background: #dbeafe; }

/* ── Stats row ──────────────────────────────────────────── */
.bdc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #e9e9e4;
}

.bdc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem .75rem;
  text-align: center;
  border-right: 1px solid #e9e9e4;
}
.bdc-stat:last-child { border-right: none; }

.bdc-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: .3rem;
}

.bdc-stat-label {
  font-size: .65rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── 3-column body ──────────────────────────────────────── */
.bdc-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  padding: 1.25rem 1.5rem;
  background: #f9f9f7;
  border-bottom: 1px solid #e9e9e4;
}

.bdc-col {
  background: #ffffff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 1rem;
}

/* Section headings */
.bdc-section-label {
  font-size: .62rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 .75rem;
}
.bdc-section-label--mt { margin-top: 1.25rem; }

/* ── Personal details DL ──────────────────────────────── */
.bdc-dl {
  margin: 0;
  padding: 0;
}
.bdc-dl dt {
  font-size: .65rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .7rem;
  margin-bottom: .1rem;
}
.bdc-dl dt:first-child { margin-top: 0; }
.bdc-dl dd {
  margin: 0;
  font-size: .82rem;
  font-weight: 500;
  color: #1f2937;
}

/* ── Health ───────────────────────────────────────────── */
.bdc-health-nil {
  font-size: .8rem;
  color: #6b7280;
  font-style: italic;
  margin: 0;
}

.bdc-tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.bdc-tag {
  padding: .2rem .55rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 500;
  background: #f3f4f6;
  color: #374151;
}
.bdc-tag--health { background: #fee2e2; color: #991b1b; }

.bdc-detail-note {
  font-size: .77rem;
  color: #6b7280;
  margin: .5rem 0 0;
}

/* ── Capability / skill bars ──────────────────────────── */
.bdc-cap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.bdc-cap-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr 3.5rem;
  align-items: center;
  gap: .5rem;
}

.bdc-cap-name {
  font-size: .8rem;
  color: #374151;
  white-space: nowrap;
}

.bdc-cap-bar-wrap {
  height: 5px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.bdc-cap-bar {
  display: block;
  height: 100%;
  border-radius: 9999px;
  transition: width .4s ease;
}
.bdc-bar--yes { background: #3b82f6; }
.bdc-bar--no  { background: #e5e7eb; }

.bdc-cap-level {
  font-size: .72rem;
  font-weight: 700;
  text-align: right;
}
.cap--yes { color: #2563eb; }
.cap--no  { color: #d1d5db; }

/* General small text */
.bdc-text-sm {
  font-size: .82rem;
  color: #374151;
  margin: 0;
}

/* ── Work history prose ───────────────────────────────── */
.bdc-prose {
  font-size: .82rem;
  color: #374151;
  line-height: 1.65;
}

.bdc-sg-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .85rem;
  padding: .28rem .7rem;
  border-radius: 9999px;
  font-size: .75rem;
}
.bdc-sg-badge--yes { background: #d1fae5; color: #065f46; }
.bdc-sg-badge--no  { background: #fee2e2; color: #991b1b; }

.bdc-empty {
  font-size: .8rem;
  color: #9ca3af;
  font-style: italic;
  margin: 0;
}

/* ── Bottom row ─────────────────────────────────────────── */
.bdc-bottom {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9e9e4;
}

/* Household preferences */
.bdc-pref-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}

.bdc-pref-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: .65rem .8rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-align: center;
  background: #fff;
}
.bdc-pref-item--wide { min-width: 110px; }

.bdc-pref-label {
  font-size: .62rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .3rem;
}

.bdc-pref-val {
  font-size: .82rem;
  font-weight: 700;
  color: #1f2937;
}
.bdc-pref-val--yes { color: #059669; }
.bdc-pref-val--no  { color: #ef4444; }

/* Self introduction */
.bdc-intro {}

.bdc-quote {
  position: relative;
  margin: .5rem 0 0;
  padding: .75rem 1rem .75rem 2rem;
  border-left: 3px solid #e5e7eb;
  background: #fafaf8;
  border-radius: 0 8px 8px 0;
}

.bdc-quote-mark {
  position: absolute;
  left: .3rem;
  top: .1rem;
  font-size: 2.5rem;
  color: #d1d5db;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
}

.bdc-quote p {
  margin: 0;
  font-size: .85rem;
  color: #374151;
  font-style: italic;
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────── */
.bdc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.5rem;
  background: #f9f9f7;
}

.bdc-footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.bdc-footer-code {
  font-size: .72rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: .1em;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .bdc-header { padding: 1.25rem 1rem; }

  .bdc-name { font-size: 0.825rem; }

  .bdc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .bdc-stat:nth-child(2) { border-right: none; }
  .bdc-stat:nth-child(3) { border-top: 1px solid #e9e9e4; }

  .bdc-body {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .bdc-bottom {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .bdc-header { flex-direction: column; align-items: center; text-align: center; }
  .bdc-badges { justify-content: center; }
}

/* ── View-as switcher (admin / management / ea preview) ─────────── */
.bdc-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.4rem 0.75rem;
  background: #f3f4f6;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 0.8rem;
}
.bdc-view-switcher-label {
  color: #64748b;
  font-weight: 600;
}
.bdc-view-switcher-btn {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  color: #334155;
  text-decoration: none;
  border: 1px solid transparent;
}
.bdc-view-switcher-btn:hover {
  border-color: #94a3b8;
}
.bdc-view-switcher-btn.is-active {
  background: #1e293b;
  color: #fff;
  font-weight: 600;
}

/* ── Staff layout v2: 5-col stats, prefs row, skills stars, full photo ── */
.bdc-stats--5 {
  grid-template-columns: repeat(5, 1fr);
}

.bdc-prefs-row {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9e9e4;
}

.bdc-skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bdc-skill-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name stars" "exp stars";
  align-items: center;
  gap: 0 .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid #ececec;
}
.bdc-skill-item:last-child { border-bottom: none; }
.bdc-skill-name {
  grid-area: name;
  font-weight: 600;
  font-size: .85rem;
  color: #1e293b;
}
.bdc-skill-exp {
  grid-area: exp;
  font-size: .78rem;
  color: #64748b;
}
.bdc-stars {
  grid-area: stars;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1;
}
.bdc-star { color: #d6d3d1; }
.bdc-star.is-on { color: #f59e0b; }

.bdc-fullphoto-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e9e9e4;
}

.bdc-history-row {
  padding: 1.25rem 1.5rem;
}

@media (max-width: 768px) {
  .bdc-stats--5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .bdc-prefs-row,
  .bdc-history-row {
    padding: 1rem;
  }
}

/* ── Work history timeline ─────────────────────────────────────── */
.bdc-history-lead {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: #475569;
}
.bdc-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.bdc-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
}
.bdc-timeline-item {
  position: relative;
  padding: 0 0 1rem 2rem;
}
.bdc-timeline-item:last-child { padding-bottom: 0; }
.bdc-timeline-item::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #94a3b8;
}
.bdc-timeline-item.is-current::before {
  border-color: #16a34a;
  background: #dcfce7;
}
.bdc-timeline-meta {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: .15rem;
}
.bdc-timeline-period {
  font-weight: 700;
  font-size: .85rem;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}
.bdc-timeline-duration {
  font-size: .75rem;
  color: #64748b;
  background: #f1f5f9;
  padding: .05rem .5rem;
  border-radius: 999px;
}
.bdc-timeline-item.is-current .bdc-timeline-duration {
  color: #166534;
  background: #dcfce7;
}
.bdc-timeline-employer {
  font-weight: 600;
  font-size: .9rem;
  color: #0f172a;
}
.bdc-timeline-location {
  font-size: .8rem;
  color: #64748b;
}
.bdc-timeline-location::before {
  content: "· ";
}
.bdc-timeline-duties {
  margin: .2rem 0 0;
  font-size: .85rem;
  color: #475569;
  line-height: 1.45;
}
.bdc-history-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 6px;
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #475569;
}

/* Work history: remarks pill + compact embedded tables in prose fallback */
.bdc-timeline-remarks {
  display: inline-block;
  margin-top: .25rem;
  font-size: .72rem;
  color: #92400e;
  background: #fef3c7;
  padding: .1rem .55rem;
  border-radius: 999px;
}
.bdc-history-note table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.bdc-history-note th,
.bdc-history-note td {
  font-size: .8rem;
  font-weight: 500;
  text-align: left;
  padding: .3rem .5rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}
.bdc-history-note th {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
}
