/* ===== CANDIDATE PORTAL STYLES ===== */
/* Extends /styles.css — both must be linked */

/* ---- Auth pages (login, register, forgot-password) ---- */
.auth-wrap {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray1);
  padding: 60px 24px;
  margin-top: 72px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--gray2);
  border-radius: 20px;
  padding: 48px 44px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 8px 40px rgba(0,0,0,.07);
}
.auth-card--wide { max-width: 640px; }

.auth-header { margin-bottom: 32px; }
.auth-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 8px 0 6px; }
.auth-header p  { font-size: 15px; color: var(--gray4); }

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--gray4);
  margin-top: 20px;
}
.auth-switch a { color: var(--blue); font-weight: 600; }

/* ---- Candidate forms ---- */
.c-form { display: flex; flex-direction: column; gap: 0; }
.c-form__group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.c-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media(max-width:580px) { .c-form__row { grid-template-columns: 1fr; } }

.c-form__group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.label-link { font-size: 12px; font-weight: 500; color: var(--blue); text-decoration: none; }
.label-link:hover { text-decoration: underline; }
.opt { font-size: 11px; font-weight: 400; color: var(--gray3); }

.c-form__group input,
.c-form__group select,
.c-form__group textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--gray2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  -webkit-appearance: none;
}
.c-form__group input:focus,
.c-form__group select:focus,
.c-form__group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.c-form__group textarea { resize: vertical; min-height: 90px; }

.c-form__actions { margin-top: 8px; display: flex; gap: 12px; }

.c-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
}
.c-checkbox input[type=checkbox] { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; cursor: pointer; }
.c-checkbox a { color: var(--blue); }

/* ---- Alerts ---- */
.c-alert {
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}
.c-alert p { margin: 0; }
.c-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.c-alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* ---- Portal hero ---- */
.portal-hero {
  background: var(--navy);
  padding: 120px 0 40px;
  margin-top: 72px;
}
.portal-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.portal-hero h1 { color: var(--white); font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.8px; margin-top: 8px; }

/* ---- Portal layout ---- */
.portal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 96px;
}
@media(max-width:768px) { .portal-layout { grid-template-columns: 1fr; } }

/* ---- Portal nav ---- */
.portal-nav {
  background: var(--white);
  border: 1px solid var(--gray2);
  border-radius: 16px;
  padding: 12px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media(max-width:768px) {
  .portal-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    gap: 6px;
  }
}

.pnav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray4);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.pnav-link:hover     { background: var(--gray1); color: var(--text); }
.pnav-link.active    { background: rgba(59,130,246,.1); color: var(--blue); font-weight: 600; }
.pnav-link--danger   { color: #ef4444; margin-top: 8px; }
.pnav-link--danger:hover { background: #fef2f2; }
.pnav-badge {
  margin-left: auto;
  background: var(--gray2);
  color: var(--gray4);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.pnav-link.active .pnav-badge { background: rgba(59,130,246,.2); color: var(--blue); }

/* ---- Portal panels ---- */
.portal-panel {
  display: none;
  background: var(--white);
  border: 1px solid var(--gray2);
  border-radius: 20px;
  padding: 40px;
}
.portal-panel.active { display: block; }
@media(max-width:500px) { .portal-panel { padding: 24px 20px; } }

.panel-header { margin-bottom: 32px; }
.panel-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 6px; }
.panel-header p  { font-size: 15px; color: var(--gray4); }
.panel-sub h3    { font-size: 16px; font-weight: 700; margin-bottom: 6px; }

/* ---- CV & file upload ---- */
.cv-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray1);
  border: 1px solid var(--gray2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
}
.cv-current a { color: var(--blue); font-weight: 600; text-decoration: none; }
.cv-current a:hover { text-decoration: underline; }

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 2px dashed var(--gray2);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray4);
  transition: border-color .2s, background .2s;
}
.file-drop:hover { border-color: var(--blue); background: rgba(59,130,246,.03); color: var(--blue); }
.file-drop input[type=file] { display: none; }
.file-chosen { font-size: 13px; color: var(--green); font-weight: 500; margin-top: 4px; }

/* ---- Skills ---- */
.skills-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 16px;
}
.skill-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(59,130,246,.1);
  color: var(--blue);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.muted-text { font-size: 14px; color: var(--gray4); }

/* ---- Applications timeline ---- */
.app-timeline { display: flex; flex-direction: column; gap: 12px; }
.app-timeline__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--gray1);
  border: 1px solid var(--gray2);
  border-radius: 12px;
  flex-wrap: wrap;
}
.app-job-title { font-size: 15px; font-weight: 700; color: var(--text); text-decoration: none; }
.app-job-title:hover { color: var(--blue); }
.app-job-meta { font-size: 13px; color: var(--gray4); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-timeline__date { font-size: 13px; color: var(--gray3); white-space: nowrap; }

/* ---- Job alerts ---- */
.alert-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--gray1);
  border: 1px solid var(--gray2);
  border-radius: 12px;
  flex-wrap: wrap;
}
.alert-item__info strong { font-size: 14px; font-weight: 700; }
.alert-item__criteria { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.btn-remove {
  background: none;
  border: 1.5px solid var(--gray2);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-remove:hover { background: #fef2f2; border-color: #fecaca; }

/* ---- Preferences toggle ---- */
.pref-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray2);
}
.pref-block:last-of-type { border-bottom: none; }
.pref-block__info strong { font-size: 15px; font-weight: 700; }
.pref-block__info p { font-size: 14px; color: var(--gray4); margin-top: 4px; }
.pref-since { font-size: 12px; color: var(--gray3); display: block; margin-top: 4px; }
.pref-always-on { font-size: 13px; font-weight: 600; color: var(--green); }

/* Toggle switch */
.toggle { position: relative; display: inline-block; flex-shrink: 0; }
.toggle input[type=checkbox] { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle__track {
  display: block;
  width: 46px; height: 26px;
  background: var(--gray2);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s;
  position: relative;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: var(--white);
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle__track { background: var(--blue); }
.toggle input:checked + .toggle__track::after { transform: translateX(20px); }

/* ---- Danger zone ---- */
.danger-zone {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 28px;
}
.danger-zone__info { margin-bottom: 20px; }
.danger-zone__info strong { font-size: 15px; font-weight: 700; color: #dc2626; }
.danger-zone__info ul { padding-left: 20px; margin: 10px 0; }
.danger-zone__info ul li { font-size: 14px; color: #7f1d1d; margin-bottom: 4px; }
.danger-zone__info p { font-size: 14px; color: #dc2626; margin-top: 8px; font-weight: 600; }

.danger-what {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.danger-what strong { font-size: 14px; color: #dc2626; font-weight: 700; }
.danger-what ul { padding-left: 20px; margin-top: 8px; }
.danger-what ul li { font-size: 14px; color: #7f1d1d; margin-bottom: 4px; }

.empty-panel { text-align: center; padding: 48px 24px; color: var(--gray4); }
.empty-panel p { margin-bottom: 16px; font-size: 15px; }

/* ---- Buttons ---- */
.btn--danger {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: #ef4444;
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s;
}
.btn--danger:hover { opacity: .88; }

.btn--secondary-light {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--gray2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s;
}
.btn--secondary-light:hover { border-color: var(--gray3); }
