/* ================================================================
   AI MBMS Jobline — Employer & Candidate Auth + Dashboard Styles
   Colors: #056CF2, #0B0940, #F27405
   Fonts: DM Serif Text (titles), Work Sans (body)
================================================================ */

/* ================================================================
   AUTH CARD
================================================================ */
.jbp-auth-wrap {
  max-width: 500px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 44px 44px 36px;
  box-shadow: 0 8px 32px rgba(11,9,64,.12);
  font-family: 'Work Sans', sans-serif;
  box-sizing: border-box;
}
@media (max-width: 560px) {
  .jbp-auth-wrap { padding: 28px 20px 24px; }
}

.jbp-already-in { text-align: center; }
.jbp-already-in p { margin-bottom: 20px; font-size: 16px; color: #0B0940; }
.jbp-already-in .jbp-btn { margin: 4px; }

/* ── Tabs ── */
.jbp-auth-tabs {
  display: flex;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 28px;
  gap: 0;
}
.jbp-auth-tab {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  color: #94A3B8;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.jbp-auth-tab.active,
.jbp-auth-tab:hover {
  color: #056CF2;
  border-bottom-color: #056CF2;
}

/* ── Panels ── */
.jbp-auth-panel { display: none; }
.jbp-auth-panel.active { display: block; }

/* ── Auth headings ── */
.jbp-auth-title {
  font-family: 'DM Serif Text', serif;
  font-size: 28px;
  font-weight: 400;
  color: #0B0940;
  margin: 0 0 6px;
  text-align: center;
}
.jbp-auth-sub {
  font-size: 14px;
  color: #64748B;
  margin: 0 0 24px;
  text-align: center;
  line-height: 1.5;
}

/* ── Form groups ── */
.jbp-auth-form .jbp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.jbp-auth-form .jbp-form-group:last-of-type { margin-bottom: 0; }

.jbp-auth-form .jbp-form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  font-family: 'Work Sans', sans-serif;
}

/* ── Two-column row inside auth forms ── */
.jbp-auth-form .jbp-form-row {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.jbp-auth-form .jbp-form-row-2 {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 480px) {
  .jbp-auth-form .jbp-form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Inputs ── */
.jbp-auth-form input[type="text"],
.jbp-auth-form input[type="email"],
.jbp-auth-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 15px;
  color: #020203;
  background: #ffffff;
  font-family: 'Work Sans', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.jbp-auth-form input:focus {
  outline: none;
  border-color: #056CF2;
  box-shadow: 0 0 0 3px rgba(5,108,242,.12);
}
.jbp-auth-form input::placeholder { color: #94A3B8; }

/* ── Password wrap ── */
.jbp-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.jbp-pw-wrap input {
  width: 100%;
  padding-right: 60px !important;
  box-sizing: border-box;
}
.jbp-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  color: #056CF2;
  padding: 4px 6px;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
}
.jbp-pw-toggle:hover { opacity: .75; }

/* ── Misc form elements ── */
.jbp-forgot-link {
  font-weight: 400;
  font-size: 13px;
  color: #056CF2;
  text-decoration: none;
}
.jbp-forgot-link:hover { text-decoration: underline; }

.jbp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #334155;
  cursor: pointer;
  margin-bottom: 20px;
  font-family: 'Work Sans', sans-serif;
}
.jbp-field-hint {
  font-size: 12px;
  color: #94A3B8;
  font-family: 'Work Sans', sans-serif;
}
.jbp-required { color: #ef4444; }
.jbp-auth-terms {
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}
.jbp-auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #64748B;
  font-family: 'Work Sans', sans-serif;
}
.jbp-auth-footer a {
  color: #056CF2;
  font-weight: 600;
  text-decoration: none;
}
.jbp-auth-footer a:hover { text-decoration: underline; }

/* ── Submit button ── */
.jbp-btn-full {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  border-radius: 999px !important;
  padding: 14px 20px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: 'Work Sans', sans-serif !important;
  margin-top: 8px;
  box-sizing: border-box;
}

/* ── Alerts ── */
.jbp-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
  font-family: 'Work Sans', sans-serif;
}
.jbp-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.jbp-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.jbp-alert-info    { background: #EFF6FF; color: #1e40af; border: 1px solid #bfdbfe; }

/* ================================================================
   ROLE SELECTOR (signup page)
================================================================ */
.jbp-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 24px;
}
.jbp-role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  background: #ffffff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: 'Work Sans', sans-serif;
}
.jbp-role-card:hover,
.jbp-role-card.selected {
  border-color: #056CF2;
  box-shadow: 0 0 0 3px rgba(5,108,242,.10);
  background: #EFF6FF;
}
.jbp-role-icon {
  width: 52px;
  height: 52px;
  background: #EFF6FF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #056CF2;
}
.jbp-role-label {
  font-size: 15px;
  font-weight: 600;
  color: #0B0940;
}

/* ================================================================
   BUTTONS (global)
================================================================ */
.jbp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s, transform .1s;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}
.jbp-btn:active { transform: scale(.97); }
.jbp-btn-primary {
  background: #056CF2;
  color: #ffffff;
  border-color: #056CF2;
}
.jbp-btn-primary:hover {
  background: #1A64E9;
  border-color: #1A64E9;
  color: #ffffff;
}
.jbp-btn-ghost {
  background: transparent;
  color: #475569;
  border-color: #E2E8F0;
}
.jbp-btn-ghost:hover {
  background: #F1F5F9;
  color: #0B0940;
}
.jbp-btn-sm  { padding: 7px 16px; font-size: 13px; }
.jbp-btn-lg  { padding: 15px 32px; font-size: 16px; }
.jbp-btn-danger { color: #ef4444 !important; }
.jbp-btn-danger:hover { background: #fee2e2 !important; border-color: #fca5a5 !important; }

/* ================================================================
   EMPLOYER DASHBOARD
================================================================ */
.jbp-dash-wrap { max-width: 100%; font-family: 'Work Sans', sans-serif; }

.jbp-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.jbp-dash-welcome { display: flex; align-items: center; gap: 16px; }
.jbp-dash-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: #056CF2; color: #fff;
  font-size: 22px; font-weight: 700;
  font-family: 'DM Serif Text', serif;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.jbp-dash-company {
  font-family: 'DM Serif Text', serif;
  font-size: 20px; font-weight: 400;
  margin: 0 0 2px; color: #0B0940;
}
.jbp-dash-username { font-size: 13px; color: #64748B; margin: 0; }
.jbp-dash-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Stats */
.jbp-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.jbp-stat-card {
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .2s;
}
.jbp-stat-card:hover { box-shadow: 0 4px 16px rgba(5,108,242,.10); }
.jbp-stat-green  { border-top: 3px solid #10b981; }
.jbp-stat-accent { border-top: 3px solid #F27405; }
.jbp-stat-number {
  font-family: 'DM Serif Text', serif;
  font-size: 38px; font-weight: 400;
  color: #0B0940; line-height: 1;
}
.jbp-stat-label { font-size: 13px; color: #64748B; font-weight: 500; }

.jbp-dash-section-title {
  font-family: 'DM Serif Text', serif;
  font-size: 20px; font-weight: 400;
  color: #0B0940; margin: 0 0 16px;
}

/* Job rows */
.jbp-dash-job-list {
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
}
.jbp-dash-job-row {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 22px;
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  transition: background .15s;
}
.jbp-dash-job-row:last-of-type { border-bottom: none; }
.jbp-dash-job-row:hover { background: #F8FAFC; }
.jbp-dash-job-info { flex: 1; min-width: 200px; }
.jbp-dash-job-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.jbp-dash-job-name { font-size: 16px; font-weight: 600; margin: 0; color: #0B0940; }
.jbp-dash-job-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #64748B; }
.jbp-status-active { background: #d1fae5; color: #065f46; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jbp-status-draft  { background: #F1F5F9; color: #64748B; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jbp-dash-app-count { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 80px; }
.jbp-app-total { font-family: 'DM Serif Text', serif; font-size: 28px; font-weight: 400; color: #056CF2; line-height: 1; }
.jbp-app-label { font-size: 12px; color: #64748B; font-weight: 500; }
.jbp-dash-job-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Applicants panel */
.jbp-applicants-panel,
.jbp-edit-panel {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 20px 24px;
}
.jbp-applicants-loading { color: #64748B; font-size: 14px; }
.jbp-no-applicants { color: #64748B; font-size: 14px; font-style: italic; }
.jbp-applicant-card {
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.jbp-applicant-card:last-child { margin-bottom: 0; }
.jbp-applicant-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.jbp-applicant-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: #EFF6FF; color: #056CF2;
  font-family: 'DM Serif Text', serif;
  font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.jbp-applicant-name  { display: block; font-size: 15px; font-weight: 600; color: #0B0940; }
.jbp-applicant-email { display: block; font-size: 13px; color: #056CF2; text-decoration: none; }
.jbp-applicant-email:hover { text-decoration: underline; }
.jbp-applicant-meta  { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.jbp-applicant-date  { font-size: 12px; color: #64748B; }
.jbp-applicant-cover { margin-bottom: 12px; }
.jbp-applicant-cover strong { font-size: 11px; display: block; margin-bottom: 6px; color: #64748B; text-transform: uppercase; letter-spacing: .08em; }
.jbp-applicant-cover p { font-size: 14px; color: #020203; background: #F1F5F9; border-radius: 8px; padding: 12px; margin: 0; line-height: 1.6; }
.jbp-applicant-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jbp-status-select { padding: 8px 12px; border: 1.5px solid #E2E8F0; border-radius: 8px; font-size: 13px; background: #fff; color: #020203; font-family: 'Work Sans', sans-serif; cursor: pointer; }

/* Status badges */
.jbp-status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jbp-status-pending     { background: #fef3c7; color: #92400e; }
.jbp-status-reviewing   { background: #dbeafe; color: #1e40af; }
.jbp-status-shortlisted { background: #ede9fe; color: #5b21b6; }
.jbp-status-rejected    { background: #fee2e2; color: #991b1b; }
.jbp-status-hired       { background: #d1fae5; color: #065f46; }

/* Edit form */
.jbp-edit-form .jbp-form-group { margin-bottom: 16px; }
.jbp-edit-form .jbp-form-group label { display: block; font-size: 13px; font-weight: 600; color: #0B0940; margin-bottom: 5px; font-family: 'Work Sans', sans-serif; }
.jbp-edit-form input,
.jbp-edit-form textarea,
.jbp-edit-form select { width: 100%; padding: 10px 14px; border: 1.5px solid #E2E8F0; border-radius: 8px; font-size: 14px; color: #020203; background: #ffffff; box-sizing: border-box; font-family: 'Work Sans', sans-serif; }
.jbp-edit-form input:focus,
.jbp-edit-form textarea:focus { outline: none; border-color: #056CF2; box-shadow: 0 0 0 3px rgba(5,108,242,.10); }
.jbp-edit-form textarea { resize: vertical; }
.jbp-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.jbp-save-msg { font-size: 13px; font-weight: 600; }
.jbp-save-msg.success { color: #10b981; }
.jbp-save-msg.error   { color: #ef4444; }

/* No jobs */
.jbp-no-jobs { text-align: center; padding: 48px 20px; color: #64748B; }
.jbp-no-jobs svg { display: block; margin: 0 auto 16px; opacity: .4; }
.jbp-no-jobs p { font-size: 16px; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
  .jbp-dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .jbp-dash-stats { grid-template-columns: repeat(2, 1fr); }
  .jbp-dash-header { flex-direction: column; align-items: flex-start; }
  .jbp-dash-job-row { flex-direction: column; align-items: flex-start; }
  .jbp-dash-app-count { flex-direction: row; align-items: baseline; gap: 6px; }
  .jbp-role-selector { grid-template-columns: 1fr; }
}
