
:root {
  --bg: #f7f4ee;
  --card: #ffffff;
  --text: #111111;
  --muted: #777;
  --line: #e5ded3;
  --brand: #111111;
  --blue: #0f4d9e;
  --good: #147a3a;
  --warn: #b15c00;
  --bad: #b42318;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; margin: 0 0 8px; }
p { line-height: 1.45; }
a { color: var(--blue); }

.topbar {
  min-height: 78px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark, .login-logo {
  width: 42px; height: 42px; border-radius: 10px; background: #111; color: #fff;
  display: grid; place-items: center; font-family: Georgia, serif; font-weight: 700; font-size: 18px;
}
.brand h1 { font-size: 25px; margin: 0; }
.brand p { margin: 2px 0 0; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: #777; }

.userbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.page { max-width: 1180px; margin: 42px auto; padding: 0 18px; }
.card, .login-card, .stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.05);
}
.card { padding: 22px; margin-bottom: 18px; }
.narrow, .login-card { max-width: 760px; margin: 0 auto; }
.login-card { padding: 32px; text-align: center; }
.login-logo { margin: 0 auto 16px; }

.btn {
  border: 1px solid var(--line); background: #fff; color: #111; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; font-weight: 700; text-decoration: none; display: inline-block;
}
.btn.primary { background: #111; color: #fff; border-color: #111; }
.btn.secondary { background: #fff; }
.btn.small { padding: 7px 10px; font-size: 12px; }
.btn.success { border-color: var(--good); color: var(--good); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.full { width: 100%; margin: 14px 0; }
.link-button { border: 0; background: transparent; color: var(--blue); cursor: pointer; padding: 0 0 10px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: #8a5a00; font-weight: 700; margin-bottom: 6px; }

.section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 18px; }
.stat-card span { display: block; text-transform: uppercase; letter-spacing: .08em; color: #777; font-size: 12px; }
.stat-card strong { font-size: 32px; font-family: Georgia, serif; }
.stat-card.highlight { border-color: #d59d44; }

.table-toolbar { display: flex; gap: 12px; margin-bottom: 14px; }
.input, select.input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: #777; border-bottom: 1px solid var(--line); padding: 10px; }
.data-table td { border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: middle; }

.pill { display: inline-block; border-radius: 7px; padding: 4px 8px; background: #eee; font-size: 12px; }
.pill.good { background: #e7f6ec; color: var(--good); }
.pill.warn { background: #fff3df; color: var(--warn); }
.pill.bad { background: #fdebea; color: var(--bad); }

.progress-line { display: flex; align-items: center; gap: 8px; }
.progress-bar { width: 110px; height: 7px; background: #eee8dd; border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--blue); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.details { display: grid; grid-template-columns: 140px 1fr; gap: 8px; }
.details dt { color: #777; }
.details dd { margin: 0; }
.file-list { display: grid; gap: 10px; }
.clean-list { margin: 0; padding-left: 20px; }
.notice { border-radius: 10px; padding: 12px; margin: 12px 0; }
.notice.info { background: #eaf1ff; color: #173f91; }
.notice.warning { background: #fff4df; color: #6c3d00; }

.completion-circle {
  width: 82px; height: 82px; border-radius: 50%; border: 5px solid var(--blue);
  display: grid; place-items: center; font-family: Georgia, serif; font-size: 25px; font-weight: 700; color: var(--blue);
}
.next-card { border-left: 4px solid var(--blue); }
.doc-section { margin-top: 18px; }
.doc-section h4 { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.doc-section h4 span { color: #777; font-weight: normal; margin-left: 8px; }
.doc-list { display: grid; gap: 10px; }
.doc-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fffdf9; }
.doc-main { display: flex; justify-content: space-between; gap: 12px; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-input { max-width: 260px; }

.debug-box {
  font-family: Consolas, monospace; font-size: 12px; background: #111; color: #b9ffb9;
  padding: 12px; border-radius: 8px; overflow: auto; text-align: left;
}

@media (max-width: 850px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .stats-grid, .grid-two, .form-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; }
}


.applicant-header {
  display: grid;
  grid-template-columns: 1fr 132px 92px;
  align-items: center;
}

.applicant-photo-card {
  justify-self: center;
  text-align: center;
  display: grid;
  gap: 6px;
}

.applicant-photo-card img,
.photo-placeholder {
  width: 112px;
  height: 112px;
  border: 3px solid #111;
  border-radius: 0;
  object-fit: cover;
  background: #f2eee7;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  color: #777;
  font-size: 13px;
  font-weight: 700;
}

.applicant-photo-card span {
  display: block;
  max-width: 132px;
  font-size: 11px;
  line-height: 1.2;
  color: #777;
}

@media (max-width: 850px) {
  .applicant-header {
    grid-template-columns: 1fr;
  }

  .applicant-photo-card {
    justify-self: start;
  }
}


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-card {
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  padding: 22px;
}

.modal-card.wide {
  width: min(980px, 96vw);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.screening-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.screening-grid h3 {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

.submitted-form-summary {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  font-size: 12px;
}

.submitted-form-summary summary {
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 760px) {
  .screening-grid {
    grid-template-columns: 1fr;
  }
}


.submitted-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 14px;
  margin: 10px 0 0;
}

.submitted-field {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.submitted-field dt {
  font-size: 11px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}

.submitted-field dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.field-hint {
  display: block;
  color: #777;
  font-size: 11px;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .submitted-form-grid {
    grid-template-columns: 1fr;
  }
}


/* MPCI logo branding */
.brand-logo {
  width: 74px;
  height: 54px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  display: block;
}

.login-logo-img {
  width: 170px;
  max-width: 80%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto 16px;
  background: #fff;
}

.brand-mark,
.login-logo {
  display: none !important;
}


.dashboard-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.photo-cell {
  width: 74px;
}

.dashboard-applicant-photo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 2px solid #111;
  background: #f2eee7;
  display: block;
}

.dashboard-applicant-photo.placeholder {
  display: grid;
  place-items: center;
  color: #777;
  font-size: 10px;
  font-weight: 700;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.archived-row {
  opacity: 0.78;
  background: #fbf8f3;
}

.detail-actions {
  margin-top: 10px;
  text-align: center;
}


.package-card {
  border-left: 4px solid var(--good);
}

.detail-actions .btn {
  margin-top: 6px;
}


.applicant-resource-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
}

.applicant-instructions-card {
  border-left: 5px solid #0f5fae;
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
}

.applicant-instructions-card h3 {
  margin-top: 4px;
}

.instruction-highlight {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid #b7791f;
  background: #fff3cd;
  border-radius: 8px;
}

.instruction-list {
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.pbso-button {
  display: inline-flex;
  margin-top: 12px;
  text-decoration: none;
}

@media (max-width: 760px) {
  .applicant-resource-grid {
    grid-template-columns: 1fr;
  }
}


.pbso-inline-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}


.applicant-language-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.language-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-form .input {
  flex: 1;
}

@media (max-width: 760px) {
  .applicant-language-card {
    grid-template-columns: 1fr;
  }

  .language-form {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Dashboard applicant table alignment fix */
.applicants-table,
table {
  width: 100%;
  border-collapse: collapse;
}

.applicants-table td,
.applicants-table th,
table td,
table th {
  vertical-align: middle;
}

td.row-actions,
.applicants-table td.row-actions {
  display: table-cell !important;
  white-space: nowrap;
  min-width: 128px;
  text-align: right;
}

td.row-actions .btn,
.applicants-table td.row-actions .btn {
  display: inline-flex;
  margin-left: 6px;
  margin-bottom: 0;
}

.applicants-table tr,
table tr {
  border-bottom: 1px solid var(--line);
}

.applicants-table td,
table td {
  border-bottom: none;
}


.language-checklist-item .doc-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.language-checklist-item .input {
  max-width: 420px;
}

@media (max-width: 760px) {
  .language-checklist-item .doc-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .language-checklist-item .input {
    max-width: none;
  }
}


/* Corrected applicant view resources and TAB F language item */
.applicant-language-card {
  display: none !important;
}

.applicant-resource-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
}

.applicant-instructions-card {
  border-left: 5px solid #0f5fae;
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
}

.applicant-instructions-card h3 {
  margin-top: 4px;
}

.instruction-highlight {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid #b7791f;
  background: #fff3cd;
  border-radius: 8px;
}

.instruction-list {
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.pbso-button,
.pbso-inline-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.language-checklist-item .doc-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.language-checklist-item .input {
  max-width: 420px;
}

@media (max-width: 760px) {
  .applicant-resource-grid {
    grid-template-columns: 1fr;
  }

  .language-checklist-item .doc-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .language-checklist-item .input {
    max-width: none;
  }
}


/* Merged applicant welcome/download section */
.merged-welcome-card {
  margin-bottom: 16px;
}

.merged-download-list a {
  color: #0f5fae;
  text-decoration: underline;
}

.merged-download-list a:hover {
  text-decoration-thickness: 2px;
}

.applicant-resource-grid {
  display: block;
}


/* Recovery: Languages spoken as a TAB F checklist text item */
.doc-item input#text-languages-spoken {
  max-width: 420px;
}

.applicant-language-card {
  display: none !important;
}


.training-link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}


/* =========================================================
   Modern MPCI Blue Theme Override
   Clean white / light blue / blue / navy blue
   ========================================================= */

:root {
  --bg: #f4f9ff;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --surface-blue: #e7f1ff;
  --line: #cfe0f5;
  --line-strong: #9bbde5;
  --text: #0b1f3a;
  --muted: #52677f;
  --navy: #0b1f3a;
  --blue: #1457a8;
  --blue-2: #0f6fcf;
  --light-blue: #dbeeff;
  --good: #0b7a53;
  --warn: #b7791f;
  --bad: #b42318;
  --shadow: 0 14px 40px rgba(11, 31, 58, 0.10);
  --radius: 16px;
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  background:
    radial-gradient(circle at top left, rgba(219, 238, 255, 0.9), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f4f9ff 44%, #eef6ff 100%) !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  letter-spacing: -0.01em;
}

body,
input,
select,
textarea,
button {
  font-family: var(--font) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-text strong {
  font-family: var(--font) !important;
  color: var(--navy);
  letter-spacing: -0.035em;
}

p,
li,
label,
td,
th,
small,
span,
div {
  font-family: var(--font) !important;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-2);
}

.topbar,
.app-header,
header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 4px 18px rgba(11, 31, 58, 0.05);
}

.brand-logo {
  background: #ffffff !important;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(11, 31, 58, 0.08);
}

.dashboard,
.container,
main {
  background: transparent !important;
}

.card,
.stat-card,
.next-card,
.doc-item,
.modal-card,
.login-card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}

.card:hover,
.doc-item:hover,
.stat-card:hover {
  border-color: var(--line-strong) !important;
}

.eyebrow {
  color: var(--blue) !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

.muted,
.small.muted {
  color: var(--muted) !important;
}

.section-header,
.applicant-header {
  background: transparent !important;
}

.next-card {
  border-left: 5px solid var(--blue) !important;
}

.applicant-instructions-card,
.merged-welcome-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
  border-left: 5px solid var(--blue) !important;
}

.instruction-highlight,
.notice.warning {
  background: #e8f3ff !important;
  border-color: var(--blue) !important;
  color: var(--navy) !important;
}

.btn,
button,
input[type="button"],
input[type="submit"] {
  border-radius: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

.btn.primary,
button.primary,
.pbso-button {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #ffffff !important;
}

.btn.primary:hover,
button.primary:hover,
.pbso-button:hover {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
}

.btn.secondary,
button.secondary,
.training-link-button,
.pbso-inline-button {
  background: #ffffff !important;
  border: 1px solid var(--line-strong) !important;
  color: var(--blue) !important;
}

.btn.secondary:hover,
button.secondary:hover,
.training-link-button:hover,
.pbso-inline-button:hover {
  background: var(--surface-blue) !important;
  border-color: var(--blue) !important;
  color: var(--navy) !important;
}

.btn.danger {
  background: #fff5f5 !important;
  border-color: #f0b4ae !important;
  color: var(--bad) !important;
}

.btn.success {
  background: #eefbf5 !important;
  border-color: #8fd6ba !important;
  color: var(--good) !important;
}

.input,
input,
select,
textarea {
  background: #ffffff !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  outline: none !important;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 4px rgba(15, 111, 207, 0.14) !important;
}

.progress-bar {
  background: #dbeeff !important;
}

.progress-bar span {
  background: linear-gradient(90deg, var(--blue), var(--blue-2)) !important;
}

.progress-line small {
  color: var(--navy) !important;
  font-weight: 700;
}

.completion-circle {
  border-color: var(--blue) !important;
  color: var(--blue) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 25px rgba(15, 111, 207, 0.14);
}

.pill {
  background: var(--surface-blue) !important;
  color: var(--navy) !important;
  border: 1px solid var(--line) !important;
}

.pill.good,
.pill.approved {
  background: #e9f8f1 !important;
  color: var(--good) !important;
  border-color: #a8e1c8 !important;
}

.pill.bad,
.pill.rejected {
  background: #fff1f1 !important;
  color: var(--bad) !important;
  border-color: #f2b8b5 !important;
}

.pill.warn,
.pill.submitted,
.pill.pending {
  background: #eaf4ff !important;
  color: var(--blue) !important;
  border-color: var(--line-strong) !important;
}

.doc-section h4,
.tab-section h4 {
  color: var(--navy) !important;
  border-bottom: 1px solid var(--line) !important;
}

.doc-section h4 span,
.tab-section h4 span {
  color: var(--muted) !important;
  font-weight: 500;
}

.applicants-table th,
table th {
  color: var(--muted) !important;
  background: #f8fbff !important;
  letter-spacing: 0.08em;
}

.applicants-table tr,
table tr {
  border-bottom: 1px solid var(--line) !important;
}

.dashboard-applicant-photo,
.applicant-photo-card img,
.photo-placeholder {
  border-color: var(--navy) !important;
  background: #eef6ff !important;
}

.file-list a,
.merged-download-list a {
  color: var(--blue) !important;
  font-weight: 700;
}

.file-list a:hover,
.merged-download-list a:hover {
  color: var(--navy) !important;
}

.submitted-form-summary {
  background: #f8fbff !important;
  border-color: var(--line) !important;
}

.modal-overlay {
  background: rgba(11, 31, 58, 0.62) !important;
}

.login-logo-img {
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
}

/* Remove leftover cream/beige backgrounds where they appeared inline/class-based */
[style*="#f"],
[style*="beige"] {
  font-family: var(--font) !important;
}



/* Final logo fix: keep MPCI logo square without extra white frame */
.brand-logo {
  width: 54px !important;
  height: 54px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.brand {
  gap: 14px !important;
  align-items: center !important;
}

.login-logo-img {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}


/* Audit log */
.audit-card {
  margin-top: 18px;
}

.audit-log {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.audit-entry {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8fbff;
}

.audit-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.audit-main strong {
  color: var(--navy);
}

.audit-main span,
.audit-meta {
  color: var(--muted);
  font-size: 12px;
}

.audit-details {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
}


/* Internal HR notes beside Audit log */
.bottom-review-grid {
  align-items: start;
  margin-top: 18px;
}

.internal-notes-card,
.audit-card {
  min-height: 280px;
}

.internal-notes-box {
  display: grid;
  gap: 12px;
}

.internal-notes-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  line-height: 1.45;
}

.internal-notes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 900px) {
  .bottom-review-grid {
    grid-template-columns: 1fr !important;
  }

  .internal-notes-footer {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Applicant missing-items-only checklist view */
.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.checklist-header h3 {
  margin-bottom: 4px;
}

.empty-checklist-message {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f8fbff;
  padding: 18px;
  text-align: center;
}

@media (max-width: 760px) {
  .checklist-header {
    flex-direction: column;
  }

  .checklist-header .btn {
    width: 100%;
    justify-content: center;
  }
}


/* HR dashboard: phone replaces Cognito login line */
.dashboard-phone-line {
  color: var(--muted);
  font-size: 12px;
}


/* HR Admin missing-items-only checklist view */
.hr-missing-note {
  color: var(--muted);
}


/* Modern notifications and message modals */
.notification-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
}

.toast {
  display: grid;
  grid-template-columns: 34px 1fr 28px;
  gap: 10px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(11, 31, 58, 0.18);
  padding: 12px 12px 12px 10px;
  animation: toastIn 0.18s ease-out;
}

.toast-success { border-left-color: var(--good); }
.toast-error { border-left-color: var(--bad); }

.toast-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--blue);
  font-weight: 900;
}

.toast-success .toast-icon { background: #e9f8f1; color: var(--good); }
.toast-error .toast-icon { background: #fff1f1; color: var(--bad); }

.toast-message {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}

.toast-close {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
}

.toast-close:hover {
  background: var(--surface-blue);
  color: var(--navy);
}

.toast-hide {
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.18s ease;
}

.message-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.58);
  display: grid;
  place-items: center;
  z-index: 10000;
  padding: 20px;
  animation: modalFadeIn 0.16s ease-out;
}

.message-modal-card {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(11, 31, 58, 0.28);
  padding: 22px;
}

.message-modal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--blue);
  font-weight: 900;
  font-size: 22px;
}

.message-modal-success .message-modal-icon { background: #e9f8f1; color: var(--good); }
.message-modal-error .message-modal-icon { background: #fff1f1; color: var(--bad); }

.message-modal-content h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.message-modal-content p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-line;
}

.message-modal-content pre {
  margin: 12px 0 0;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.message-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.message-modal-hide {
  opacity: 0;
  transition: opacity 0.16s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .message-modal-card { grid-template-columns: 1fr; }
}


/* Main HR dashboard landing page */
.main-hr-dashboard {
  width: min(980px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.main-dashboard-hero {
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.main-dashboard-hero h2 {
  font-size: 32px;
  margin: 4px 0 8px;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.module-card {
  width: 100%;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 22px 50px rgba(11, 31, 58, 0.16);
}

.module-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.module-card h3 {
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--navy);
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.module-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.module-meta span {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--blue);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.active-module {
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  border-color: var(--line-strong);
}

.active-module .module-icon {
  background: var(--navy);
  color: #ffffff;
}

.muted-module {
  opacity: 0.82;
}

.module-back-button {
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .main-hr-dashboard {
    width: min(100%, calc(100vw - 28px));
    padding-top: 18px;
  }

  .module-card {
    grid-template-columns: 1fr;
  }

  .module-card h3 {
    font-size: 24px;
  }
}


/* Interviewing section */
.interviewing-dashboard {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.interviewing-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  align-items: center;
  gap: 54px;
}

.interviewing-panel {
  text-align: center;
}

.interviewing-panel h2 {
  font-size: 32px;
  margin: 8px 0 34px;
}

.interviewing-actions {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}

.interview-action-button {
  width: 100%;
  min-height: 104px;
  border-radius: 24px !important;
  border: 3px solid #061b2f !important;
  background: #176a86 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 0 rgba(6, 27, 47, 0.18);
  font-size: 30px;
  font-weight: 900 !important;
  line-height: 1.22;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.interview-action-button:hover {
  transform: translateY(-2px);
  background: #0f5d78 !important;
  box-shadow: 0 12px 20px rgba(6, 27, 47, 0.18);
}

.interview-action-button span {
  font-size: 28px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .interviewing-layout {
    grid-template-columns: 1fr;
  }

  .interviewing-illustration-card {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .interview-action-button {
    font-size: 22px;
    min-height: 88px;
  }

  .interview-action-button span {
    font-size: 20px;
  }
}


.interviewing-illustration-card {
  background: #d9e4f6;
  padding: 24px;
  display: grid;
  place-items: center;
  min-height: 520px;
}

.interviewing-illustration-image {
  display: block;
  width: min(560px, 100%);
  height: auto;
  object-fit: contain;
  border: 0;
}



/* Submitted status purple override */
.pill.submitted,
span.pill.submitted,
.doc-status.submitted,
.status-submitted,
.submitted {
  background: #f3e8ff !important;
  border-color: #b56cff !important;
  color: #5b21b6 !important;
}

.pill.submitted.good,
.pill.submitted.warn,
.pill.submitted.pending {
  background: #f3e8ff !important;
  border-color: #b56cff !important;
  color: #5b21b6 !important;
}


/* Submitted status purple override v2 */
.pill.submitted,
.doc-item .pill.submitted,
.doc-main .pill.submitted,
span[class~="submitted"] {
  background: #f3e8ff !important;
  border: 1px solid #a855f7 !important;
  color: #581c87 !important;
}

.pill.submitted:hover,
.doc-item .pill.submitted:hover {
  background: #ead6ff !important;
  border-color: #9333ea !important;
  color: #4c1d95 !important;
}


/* Interviewing resume intake form */
.resume-intake-page {
  width: min(980px, calc(100vw - 48px));
}

.resume-intake-card {
  padding: 28px;
}

.resume-intake-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.resume-intake-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--navy);
}

.resume-intake-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.45;
}

.full-span {
  grid-column: 1 / -1;
}

.resume-upload-box {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 14px;
  background: #f8fbff;
}

.resume-upload-box input[type="file"] {
  width: 100%;
}

.resume-upload-status {
  margin-top: 8px;
  font-weight: 700;
}

.resume-form-actions {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .resume-intake-form {
    grid-template-columns: 1fr;
  }

  .resume-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}


/* Hiring Manager review queue and detail view */
.hm-review-page {
  width: min(1040px, calc(100vw - 48px));
}

.candidate-review-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.candidate-review-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 16px;
  padding: 14px 16px;
}

.hm-review-detail-page {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 54px;
}

.hm-review-grid {
  display: grid;
  grid-template-columns: 160px 1fr 360px;
  gap: 22px 28px;
  background: #dce7f8 !important;
}

.hm-resume-block h3 {
  margin-top: 0;
  color: var(--blue);
}

.resume-document-button {
  display: grid;
  gap: 10px;
  place-items: center;
  width: 120px;
  min-height: 130px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.resume-file-icon {
  width: 76px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 8px solid var(--blue);
  background: #ffffff;
  color: var(--blue);
  font-size: 28px;
}

.hm-meta-block {
  grid-column: span 2;
}

.hm-meta-block h2 {
  margin-top: 0;
}

.hm-meta-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.hm-meta-columns label,
.hm-textarea-card label,
.hm-ratings-card label,
.hm-comments-card label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 800;
}

.hm-meta-columns p {
  margin: 4px 0;
}

.hm-textarea-card {
  display: grid;
  gap: 14px;
}

.hm-textarea-card textarea {
  min-height: 132px;
}

.hm-ratings-card {
  display: grid;
  gap: 9px;
  align-content: start;
}

.hm-comments-card {
  display: grid;
  gap: 12px;
}

.hm-comments-card textarea {
  min-height: 86px;
}

.hm-review-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

@media (max-width: 1020px) {
  .hm-review-grid {
    grid-template-columns: 1fr;
  }

  .hm-meta-block {
    grid-column: auto;
  }

  .hm-meta-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .candidate-review-row,
  .hm-review-actions {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Hiring Manager account admin */
.interview-manager-admin-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -18px auto 24px;
}

.hiring-manager-table td,
.hiring-manager-table th {
  vertical-align: middle;
}

@media (max-width: 760px) {
  .interview-manager-admin-actions {
    flex-direction: column;
  }
}


/* Resume intake Hiring Manager dropdown */
.resume-intake-form select.input {
  min-height: 42px;
}

#resumeHiringManagerHelp {
  margin-top: -2px;
}


/* Modernized Hiring Manager review detail view */
.modern-hm-review-page {
  width: min(1320px, calc(100vw - 28px));
}

.hm-review-modern-shell {
  display: grid;
  gap: 18px;
}

.hm-review-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 26px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
  border-color: #d8e4f7;
}

.hm-review-hero h2 {
  font-size: 38px;
  line-height: 1.05;
  margin-bottom: 10px;
}

.hm-hero-subtitle {
  margin: 0;
  color: #50627b;
  font-size: 15px;
}

.hm-hero-meta {
  min-width: 290px;
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.hm-hero-meta .pill {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.hm-hero-meta-item {
  border: 1px solid #dbe6f7;
  background: rgba(255,255,255,.9);
  border-radius: 14px;
  padding: 11px 14px;
  display: grid;
  gap: 4px;
}

.hm-hero-meta-item span,
.hm-summary-item span {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  color: #7185a1;
  font-weight: 700;
}

.hm-hero-meta-item strong,
.hm-summary-item strong {
  color: var(--navy, #10243e);
  font-size: 14px;
}

.hm-review-modern-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.hm-review-sidebar,
.hm-review-main,
.hm-review-notes-rail {
  display: grid;
  gap: 18px;
}

.hm-review-main {
  min-width: 0;
}

.hm-panel {
  padding: 20px;
  border-radius: 18px;
  border-color: #dbe6f7;
  box-shadow: 0 16px 34px rgba(17, 42, 74, 0.08);
}

.hm-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.hm-panel-header.compact {
  margin-bottom: 12px;
}

.hm-panel-header h3 {
  margin-bottom: 4px;
  font-size: 24px;
}

.hm-panel-header p {
  margin: 0;
  max-width: 360px;
}

.resume-preview-card {
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, #f6f9fe 0%, #edf4ff 100%);
  border-radius: 16px;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 18px 14px 16px;
  cursor: pointer;
}

.resume-preview-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 77, 158, 0.12);
}

.resume-preview-illustration {
  width: 118px;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(16, 36, 62, 0.12);
}

.resume-preview-link {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
}

.hm-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hm-summary-item {
  border: 1px solid #e1e8f5;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f9fbff;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.hm-field-label {
  display: grid;
  gap: 7px;
  color: #12345a;
  font-weight: 800;
}

.hm-field-label .input {
  border-color: #bfd0ea;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}

.hm-field-label .input:focus {
  outline: none;
  border-color: #7ba1d8;
  box-shadow: 0 0 0 4px rgba(15, 77, 158, 0.10);
}

.hm-textarea {
  min-height: 108px;
  resize: vertical;
}

.hm-textarea.tall {
  min-height: 170px;
}

.hm-textarea.readonly {
  background: #f7faff;
}

.hm-review-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.hm-score-field {
  min-width: 0;
}

.hm-score-field:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.hm-comments-stack {
  display: grid;
  gap: 14px;
}

.hm-review-actions.modern {
  grid-column: auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 4px 0 0;
  border-top: 0;
}

.sr-only {
  position: static;
}

@media (max-width: 1180px) {
  .hm-review-modern-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .hm-review-notes-rail {
    grid-column: 1 / -1;
  }

  .hm-comments-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .hm-review-hero {
    flex-direction: column;
  }

  .hm-review-modern-layout,
  .hm-summary-grid,
  .hm-form-grid,
  .hm-review-score-grid,
  .hm-comments-stack {
    grid-template-columns: 1fr;
  }

  .hm-review-actions.modern {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Interview archive controls */
.archived-interview-row {
  background: #ffffff;
}

.archived-interview-row .row-actions,
.candidate-review-row .row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .archived-interview-row .row-actions,
  .candidate-review-row .row-actions {
    justify-content: stretch;
  }

  .archived-interview-row .row-actions .btn,
  .candidate-review-row .row-actions .btn {
    width: 100%;
    text-align: center;
  }
}


/* Core Competencies dropdown ratings */
.hm-score-field select.input {
  cursor: pointer;
  background-color: #ffffff;
}


/* Offer detail dropdowns */
.hm-offer-grid select.input {
  cursor: pointer;
  background-color: #ffffff;
}


/* Submitted to Supervisor row status emphasis */
.candidate-row-titleline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.candidate-review-row-hired {
  background: linear-gradient(135deg, #ecfdf5 0%, #f6fff9 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.12);
}

.candidate-review-row-not-hired {
  background: linear-gradient(135deg, #fff1f2 0%, #fff7f8 100%) !important;
  border-color: #f5b5bf !important;
  box-shadow: 0 10px 28px rgba(244, 63, 94, 0.10);
}

.hired-returned-pill {
  background: #d1fae5 !important;
  color: #047857 !important;
  border: 1px solid #34d399 !important;
  font-weight: 800;
}


/* Submitted to Supervisor compact decision status */
.candidate-row-titleline .pill {
  font-weight: 700;
  padding: 5px 10px;
}


/* Two-column Interviewing/Hiring Manager candidate list */
.candidate-review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.candidate-review-row {
  min-height: 138px;
  align-items: center;
}

.candidate-review-row .row-actions {
  align-self: center;
}

@media (max-width: 1050px) {
  .candidate-review-list {
    grid-template-columns: 1fr;
  }
}

/* candidate-review-list.two-column-ready */


/* Compact Hiring Manager Review top summary */
.hm-review-hero {
  min-height: unset !important;
  padding: 22px 26px !important;
  align-items: center !important;
}

.hm-review-hero.compact-top-override {
  min-height: unset !important;
}

.hm-review-hero h2 {
  font-size: 34px !important;
  margin-bottom: 8px !important;
}

.hm-hero-meta {
  min-width: 560px !important;
  max-width: 660px;
  grid-template-columns: auto 1fr 1fr 1fr !important;
  align-items: center !important;
  gap: 10px !important;
}

.hm-hero-meta .pill {
  align-self: stretch;
  display: grid;
  place-items: center;
  white-space: nowrap;
  min-height: 52px;
}

.hm-hero-meta-item {
  min-height: 52px;
  padding: 9px 12px !important;
}

.hm-hero-meta-item span {
  font-size: 10px !important;
}

.hm-hero-meta-item strong {
  font-size: 13px !important;
}

@media (max-width: 1180px) {
  .hm-review-hero {
    align-items: flex-start !important;
  }

  .hm-hero-meta {
    min-width: 100% !important;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hm-hero-meta .pill {
    justify-self: stretch;
  }
}

@media (max-width: 720px) {
  .hm-hero-meta {
    grid-template-columns: 1fr !important;
  }
}


/* Edit Interviewee Details */
.edit-interviewee-card {
  max-width: 980px;
}


/* Edit Interviewee Internal HR Notes */
.edit-interviewee-card textarea.input {
  min-height: 130px;
  resize: vertical;
}
