@font-face {
  font-family: "urdu";
  src: url("../fonts/JameelNooriNastaleeqRegular.ttf") format("truetype");
}

:root {
  --orange: #f84b13;
  --charcoal: #111111;
  --cream: #fcf8f4;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #e9e6e0;
  color: var(--charcoal);
}
.app {
  display: flex;
  height: 100svh;
  width: 100svw;
}
/* ---------- FORM PANEL ---------- */
.panel {
  width: 400px;
  flex: 0 0 400px;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
  max-height: 100vh;
  border-left: 1px solid #ddd;
  direction: ltr;
}
.panel h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 28px 0 10px;
}
.panel h2:first-child {
  margin-top: 0;
}
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #333;
  margin: 10px 0 4px;
}
input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-size: 13.5px;
  font-family: "Inter", sans-serif;
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--orange);
}
/* ---------- ICONS (inline SVG, Font Awesome path data) ---------- */
.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.genderRow {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}
.genderRow label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
}
.jobCard {
  border: 1px solid #e5e2db;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fcfbf9;
  position: relative;
}
.jobCard .removeJob {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.jobCard .removeJob .icon {
  width: 13px;
  height: 13px;
}
.jobCard .removeJob:hover {
  color: #e33;
}
.eligRow {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.eligRow input {
  flex: 1;
}
.smallBtn {
  background: var(--charcoal);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.smallBtn .icon {
  width: 11px;
  height: 11px;
}
.smallBtn:hover {
  background: #333;
}
.eligList {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.eligList li {
  font-size: 12.5px;
  padding: 4px 0;
  border-bottom: 1px dashed #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
  text-align: right;
}
.eligList li button {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.eligList li button .icon {
  width: 11px;
  height: 11px;
}
.eligList li button:hover {
  color: #e33;
}
.addJobBtn {
  width: 100%;
  padding: 12px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.addJobBtn .icon {
  width: 13px;
  height: 13px;
}
.addJobBtn:hover {
  background: #e65f00;
}
.addJobBtn.secondary {
  background: #333;
}
.addJobBtn.secondary:hover {
  background: #000;
}
.downloadBtn {
  width: 100%;
  padding: 14px;
  background: var(--charcoal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.downloadBtn .icon {
  width: 15px;
  height: 15px;
}
.downloadBtn:hover {
  background: #000;
}
.downloadBtn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- PREVIEW PANEL ---------- */
.previewWrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 50px;
  padding-right: 200px;
  overflow: auto;
}
#poster {
  width: 1122px;
  background: var(--cream);
  padding: 26px 30px 20px;
  background-image: radial-gradient(#e3ded4 1px, transparent 1px);
  background-size: 16px 16px;
  position: relative;
  overflow: hidden;
}

/* Diagonal watermark, bottom-left to top-right, sits behind all poster content */
.watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}
.watermark span {
  display: inline-block;
  white-space: nowrap;
  transform: rotate(-28deg);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 92px;
  letter-spacing: 4px;
  color: var(--charcoal);
  opacity: 0.06;
}

/* Everything else in the poster sits above the watermark */
#poster > *:not(.watermark) {
  position: relative;
  z-index: 1;
}

.headerRow {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}
.lastDateBox {
  direction: rtl;
  flex: 0 0 auto;
  background: var(--orange);
  border-radius: 24px;
  border: 10px double var(--cream);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lastDateBox .cal {
  display: flex;
  color: #fff;
}
.lastDateBox .cal .icon {
  width: 48px;
  height: 48px;
}
.lastDateBox .txtBox {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lastDateBox .txt {
  color: #fff;
  font-family: "urdu", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 26px;
}
.lastDateBox .lastDateLabel {
  font-size: 12px;
  line-height: 12px;
}
.headerSpacer {
  flex: 1;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
  opacity: 0.7;
}
.orgInfo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.orgName {
  font-size: 64px;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
}
.orgAdress {
  font-family: "urdu", serif;
  font-size: 22px;
  color: var(--charcoal);
  opacity: 0.7;
}
.divider {
  width: 2px;
  height: 70px;
  background: var(--charcoal);
}
.logoCircle {
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.logoCircle .logoImg {
  width: 144px;
  height: 144px;
  object-fit: cover;
  display: block;
}

/* job department */
.jobsDptInfo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  text-align: center;
  gap: 14px;
  background-color: var(--charcoal);
  color: #fff;
  height: 120px;
  padding: 0 22px;
  border-radius: 24px;
  width: 100%;
  border: 10px double var(--cream);
}
.jobsDptInfo .jobsDeptName {
  font-family: "urdu", serif;
  font-size: 48px;
  font-weight: 700;
  text-align: center;
}

.tableWrap {
  border: 2px solid var(--charcoal);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 16px;
}
.colHeaders {
  display: flex;
  border-bottom: 2px solid var(--charcoal);
}
.colHeaders div {
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.colHeaders .colJob {
  flex: 1.3;
}
.colHeaders .colElig {
  flex: 1;
}
.colHeaders div span {
  display: inline-block;
  width: 80%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  text-align: center;
  font-family: "urdu", serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: var(--charcoal);
}

.jobRow {
  display: flex;
  border-top: 2px solid var(--charcoal);
}
.jobRow:first-child {
  border-top: none;
}
.cellJob {
  flex: 1.3;
  padding: 18px 22px;
  border-left: 2px solid var(--charcoal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  gap: 16px;
}
.cellElig {
  flex: 1;
  padding: 18px 22px;
}
.jobTitleLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.jobTitleLine .name {
  font-size: 32px;
  font-weight: 700;
}
.genderIcons {
  display: flex;
  align-items: center;
  gap: -30px;
}
.genderIcons .icon {
  width: 50px;
  height: 50px;
  fill: var(--orange);
}
.metaLine {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  font-size: 20px;
  font-weight: 700;
}

.metaLine .pill {
  font-size: 17px;
  font-weight: 500;
  font-family: "urdu", serif;
  background: var(--charcoal);
  color: #fff;
  padding: 3px 14px;
  border-radius: 5px;
  min-width: 70px;
  text-align: center;
  display: inline-block;
}
.eligBullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.eligBullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "urdu", serif;
  font-size: 19px;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
  text-align: right;
}
.eligBullets li:last-child {
  border-bottom: none;
}
.eligBullets .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--orange);
  flex: 0 0 auto;
}
.eligBullets.empty li {
  color: #bbb;
}

.footerBar {
  margin-top: 14px;
  background: var(--charcoal);
  border-radius: 14px;
  padding: 14px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 16px;
  color: var(--cream);
  font-family: "urdu", serif;
}
.footerBar .footerAddress {
  font-size: 17px;
}
.footerBar .footerContact {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footerBar .footerContact .contactNum {
  direction: ltr;
}

.modalOverlay {
  position: fixed;
  overflow-y: scroll;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  direction: rtl;
}
.modalOverlay.hidden {
  display: none;
}
.modalDialog {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}
.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modalHeader h3 {
  margin: 0;
  font-size: 22px;
}
.closeModal {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #333;
  cursor: pointer;
}
.modalText {
  margin: 0 0 12px;
  color: #333;
  line-height: 1.5;
}
.modalExample {
  background: #f4f4f2;
  border: 1px solid #dedede;
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
}
.modalDialog textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid #d4d0cb;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  font-family: Consolas, Monaco, "Courier New", monospace;
}
.modalFooter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.modalBtn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  background: var(--orange);
  color: #fff;
}
.modalBtn.secondary {
  background: #666;
}
.errorMessage {
  color: #d10;
  flex: 1;
  text-align: left;
  font-size: 13px;
  min-height: 1.2em;
}
