:root {
  --ajeer-primary: #1a2b56;
  --ajeer-teal: #187a68;
  --ajeer-red: #c93b3b;
  --ajeer-border: #dcdcdc;
  --ajeer-cell-border: #e2e2e2;
  --ajeer-section-bg: #ebebeb;
  --ajeer-label-bg: #f5f5f5;
  --ajeer-text: #212529;
  --ajeer-muted: #555555;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Cairo', 'NotoKufiArabic', Tahoma, Arial, sans-serif;
  background-color: #f9f9f9;
  color: var(--ajeer-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Top Site Header: 2 Small Logos (Right: Ajeer, Left: Ministry) */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 16px;
}

.header-container {
  max-width: 1140px;
  margin: 0 auto;
}

.header-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ajeer-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.ministry-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}

/* Verification Page Main */
.verification-page {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 12px auto 24px;
  padding: 0 10px;
}

#loading {
  background: #ffffff;
  border: 1px solid var(--ajeer-border);
  padding: 36px 24px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--ajeer-text);
}

#errorBox {
  display: none;
  background: #fdeaea;
  border: 1px solid #f5c2c2;
  padding: 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ajeer-red);
  margin-bottom: 16px;
}

.verification-document {
  display: none;
  background: #ffffff;
  border: 1px solid var(--ajeer-border);
  padding: 12px;
}

/* Verification Header Box: 2 Big Logos + Title + Status */
.verification-header {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--ajeer-cell-border);
  margin-bottom: 0;
}

.verification-header__box {
  border: 1px solid var(--ajeer-cell-border);
  padding: 18px 16px;
  vertical-align: middle;
  text-align: center;
}

.verification-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.verification-logo--ajeer {
  height: 58px;
  width: auto;
  object-fit: contain;
}

.verification-logo--hrsd {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.verification-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #222222;
}

.verification-result {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ajeer-teal);
  background: transparent;
}

.verification-result.status-expired,
.verification-result.status-inactive {
  color: var(--ajeer-red);
}

.verification-copy {
  text-align: center;
  padding: 18px 12px 16px;
}

.verification-copy p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #666666;
}

/* Verification Data Tables (Seamless Stacked Block) */
.verification-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border: 1px solid var(--ajeer-border);
  border-bottom: 0;
}

.verification-table:last-of-type {
  border-bottom: 1px solid var(--ajeer-border);
}

.verification-table__section th {
  background: var(--ajeer-section-bg);
  color: #222222;
  font-size: 16px;
  font-weight: 700;
  padding: 11px 14px;
  text-align: right;
  border: 1px solid var(--ajeer-border);
}

.verification-table__label {
  background: var(--ajeer-label-bg);
  color: var(--ajeer-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  width: 20%;
  border: 1px solid var(--ajeer-cell-border);
  text-align: right;
}

.verification-table__value {
  background: #ffffff;
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  width: 30%;
  border: 1px solid var(--ajeer-cell-border);
  text-align: right;
  word-break: break-word;
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 28px 20px 28px;
  margin-top: auto;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-navigation {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: right;
}

@media (min-width: 769px) {
  .footer-navigation {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: #222222;
  margin: 0 0 4px;
}

.footer-link {
  color: #666666;
  text-decoration: none;
  font-size: 13px;
}

.footer-link:hover {
  color: var(--ajeer-primary);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.footer-social {
  color: #1a2b56;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
}

/* Footer Partners: Right Side 3 Logos Stacked, Left Side 1 Logo (digital-govt-auth-logo.png) */
.footer-partners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  align-items: center;
  padding-top: 24px;
  margin-top: 20px;
  border-top: 1px solid #e2e5e9;
  width: 100%;
  box-sizing: border-box;
}

.footer-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  box-sizing: border-box;
  height: 100%;
  text-decoration: none;
}

.footer-partner:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  border-left: 1px solid #e2e5e9;
}

.footer-partner:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
  border-left: 1px solid #e2e5e9;
}

.footer-partner:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
  border-left: 1px solid #e2e5e9;
}

.footer-partner--digital {
  grid-column: 2;
  grid-row: 1 / 4;
  justify-content: center;
  align-self: center;
  padding: 16px 20px;
}

.footer-partner:nth-child(1) img {
  height: 54px;
  width: auto;
  max-width: 178px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.footer-partner:nth-child(2) img {
  height: 38px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.footer-partner:nth-child(3) img {
  height: 28px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.footer-partner--digital img {
  height: 60px;
  width: auto;
  max-width: 195px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Bot Launcher & Chat Widget */
.bot-image-container {
  position: fixed;
  bottom: 22px;
  left: 24px;
  margin-left: 10px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bot-image-container:hover {
  transform: scale(1.05);
}

.bot-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.chat-widget {
  position: fixed;
  bottom: 96px;
  left: 24px;
  margin-left: 10px;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 490px;
  max-height: calc(100vh - 140px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
  border: 1px solid #e2e8f0;
}

.chat-widget.open {
  display: flex;
}

.chat-header {
  background: var(--ajeer-primary);
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
}

.header-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-action {
  background: transparent;
  border: 0;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-action svg {
  width: 14px;
  height: 14px;
  fill: #ffffff;
}

.message-list {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bot-message {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px 12px 12px 2px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ajeer-text);
}

.message-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.services-area {
  margin-top: 6px;
}

.carousel-container {
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 12px;
  padding: 4px 2px;
}

.service-card-wrapper {
  flex: 0 0 190px;
}

.service-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 10px;
}

.service-image img {
  width: 100%;
  height: 95px;
  object-fit: cover;
}

.service-title {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  color: var(--ajeer-primary);
}

.service-button {
  background: var(--ajeer-teal);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  padding: 5px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.carousel-arrow {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
}

.dot.active {
  background: var(--ajeer-primary);
}

.composer {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-input-area {
  flex: 1;
}

.composer-input-area textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  resize: none;
  font-family: inherit;
  outline: none;
}

.composer-button {
  background: transparent;
  border: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.composer-button svg {
  width: 16px;
  height: 16px;
  fill: var(--ajeer-primary);
}

#fileInput {
  display: none;
}

/* Mobile Layout - Matches Full Screenshot */
@media (max-width: 768px) {
  .verification-header,
  .verification-header tbody,
  .verification-header tr,
  .verification-header__box {
    display: block;
    width: 100% !important;
  }

  .verification-header__box {
    border: 0;
    border-bottom: 1px solid var(--ajeer-cell-border);
  }

  .verification-header__box:last-child {
    border-bottom: 0;
  }

  .verification-table,
  .verification-table tbody,
  .verification-table tr {
    display: block;
    width: 100%;
  }

  .verification-table__section th {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ajeer-border);
  }

  .verification-table__label,
  .verification-table__value {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ajeer-cell-border);
  }

  /* Bot Launcher on Mobile - With Left Margin */
  .bot-image-container {
    bottom: 16px;
    left: 12px;
    margin-left: 4px;
    width: 66px;
    height: 66px;
  }

  .chat-widget {
    bottom: 84px;
    left: 18px;
    margin-left: 8px;
    width: calc(100vw - 36px);
  }

  /* Partner Logos on Mobile - Matches Screenshot */
  .footer-partners {
    padding-top: 18px;
    margin-top: 16px;
  }

  .footer-partner {
    padding: 8px 10px;
  }

  .footer-partner:nth-child(1) img {
    height: 48px;
    max-width: 165px;
  }

  .footer-partner:nth-child(2) img {
    height: 34px;
    max-width: 105px;
  }

  .footer-partner:nth-child(3) img {
    height: 26px;
    max-width: 160px;
  }

  .footer-partner--digital img {
    height: 54px;
    max-width: 185px;
  }
}
