/* =====================================================================
   App pages (services / apply) — loaded after style.css
   ===================================================================== */
.app-page {
  background: var(--page-bg);
  min-height: 100vh;
}

.app-page.modal-open {
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:disabled {
  cursor: not-allowed;
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-navy:hover:not(:disabled) {
  background: var(--navy-dark);
}

.btn-navy:disabled {
  background: #e5e8ef;
  color: #a3abbb;
}

.btn-outline {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-red {
  background: var(--red-bright);
  color: #fff;
  border-radius: 10px;
  height: 44px;
}

.btn-red:hover:not(:disabled) {
  background: #c70511;
}

.btn-red:disabled {
  background: #f3b7bb;
}

.btn-red span {
  display: flex;
}

.btn-light {
  background: #e8ebf0;
  color: #374151;
  border-radius: 10px;
  height: 44px;
}

.btn-light:hover {
  background: #dde1e8;
}

.btn.loading {
  opacity: 0.8;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 16px 0;
  background: var(--page-bg);
}

.site-header__inner {
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 10px 20px 8px;
  transition: box-shadow 0.2s;
}

.site-header.scrolled {
  padding-top: 0;
}

.site-header.scrolled .site-header__inner {
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7dc8a, #c9952b 60%, #9a6c15);
  box-shadow: inset 0 0 0 3px #b8892a, 0 2px 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  flex-shrink: 0;
}

.brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.brand__text small {
  font-size: 11px;
  font-weight: 600;
  color: var(--red-bright);
}

.brand__text strong {
  font-size: 15px;
  font-weight: 800;
  color: #3b3f5c;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  color: var(--navy);
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 6px;
  padding-right: 32px;
}

.main-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  color: var(--red-bright);
}

.nav-link.active {
  background: #fdecee;
  color: var(--red-bright);
}

.main-nav__tools {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dropdown {
  position: relative;
}

.lang-btn,
.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
}

.lang-btn > svg:last-child,
.user-btn > svg:last-child {
  color: #9ca3af;
}

.flag {
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.user-btn {
  padding: 3px 4px 3px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
}

.user-btn__avatar {
  display: flex;
  color: #6b7280;
  background: #eef0f4;
  border-radius: 50%;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 10;
}

.dropdown.open .dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.dropdown__item:hover,
.dropdown__item.active {
  background: #f3f4f6;
}

.dropdown__item--danger {
  color: var(--red-bright);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 1246px;
  min-height: 312px;
  margin: 12px auto 0;
  padding: 44px 40px 42px;
  border-radius: 22px;
  overflow: hidden;
  background: url("../images/bg.jpg") center 40% / cover no-repeat;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--red-bright);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hero__badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.hero__title {
  padding: 4px 18px;
  border-radius: 8px;
  background: rgba(55, 63, 81, 0.78);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.6;
}

.hero__desc {
  max-width: 614px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(55, 63, 81, 0.65);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.filter-panel {
  max-width: 920px;
  margin: 24px auto 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(25, 30, 50, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(2px);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 110px;
  margin-bottom: 12px;
}

.filter-tab {
  height: 30px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: #0b0d1c;
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-tab:hover {
  background: #23263d;
}

.filter-tab.active {
  background: var(--red-bright);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: none;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.search-box input:focus {
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.25);
}

.search-box__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: #9ca3af;
}

/* ---------- Services grid ---------- */
.services {
  max-width: 1260px;
  margin: 0 auto;
  padding: 56px 16px 60px;
}

.services__count {
  margin-bottom: 14px;
  font-size: 15px;
  color: #374151;
}

.services__count b {
  color: var(--red-bright);
  font-weight: 800;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.service-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.service-card__icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status--available {
  background: var(--teal-soft);
  color: var(--teal-text);
}

.status--soon {
  background: #fdecee;
  color: var(--red-bright);
}

.chip {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #eef0f5;
  color: #3b4058;
  font-size: 10.5px;
  font-weight: 700;
}

.service-card__title {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.6;
  color: #111827;
}

.service-card__desc {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.8;
  color: #6b7280;
}

.service-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.service-card__actions .btn {
  flex: 1;
  padding: 0 10px;
}

.service-card__actions.single .btn {
  width: 100%;
}

/* ---------- Empty state ---------- */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 60px 20px;
  text-align: center;
}

.empty-state--sm {
  padding: 30px 20px;
}

.empty-state__icon {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff4e0;
  color: var(--orange);
  box-shadow: 0 0 0 8px #fffaf0;
  margin-bottom: 10px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
}

.empty-state .btn {
  margin-top: 10px;
  padding: 0 28px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(226, 229, 235, 0.6);
  backdrop-filter: blur(1.5px);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 538px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s;
}

.modal.open .modal__dialog {
  transform: none;
}

.modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 8px;
  background: #313465;
  color: #fff;
}

.modal__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
}

.modal__heading {
  flex: 1;
  min-width: 0;
}

.modal__heading h3 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
}

.modal__heading small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

.modal__close {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.modal__body {
  padding: 20px 18px 10px;
  overflow-y: auto;
}

.req-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.req-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f5f6f8;
  transition: background 0.2s;
}

.req-list li:hover {
  background: #eef0f4;
}

.req-num {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--red-bright);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.req-text {
  flex: 1;
  font-size: 12.5px;
  color: #374151;
}

.req-check {
  display: flex;
  color: var(--green);
}

.req-total {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.req-total__icon {
  display: flex;
  color: var(--red-bright);
}

.req-total small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.req-total strong {
  font-size: 13px;
  font-weight: 800;
}

.modal__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding: 20px 18px;
  border-top: 1px solid var(--border);
}

/* ---------- Scroll to top ---------- */
.to-top {
  position: fixed;
  right: 32px;
  bottom: 28px;
  z-index: 40;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, color 0.2s;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  color: var(--navy);
}

/* ---------- Apply page ---------- */
.hero--apply {
  padding-top: 52px;
}

.apply-layout {
  position: relative;
  z-index: 2;
  max-width: 954px;
  margin: -20px auto 50px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 295px 1fr;
  gap: 20px;
  align-items: start;
}

.apply-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 2px;
}

.side-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.side-card--alert {
  background: var(--red-soft);
  border-color: #f6c3c8;
}

.side-card--docs::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fffaf0;
}

.side-card__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.side-card__head h4 {
  font-size: 13px;
  font-weight: 800;
  color: #1f2937;
}

.side-card--docs .side-card__head h4 {
  font-size: 15px;
}

.side-card__icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #fff;
}

.side-card__icon--red {
  background: var(--red-bright);
}

.side-card__icon--orange {
  background: var(--orange);
}

.side-card--alert p {
  font-size: 12.5px;
  line-height: 1.8;
  color: #b4121c;
}

.side-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--red-bright);
}

.side-card__link span {
  display: flex;
}

.side-card__link:hover {
  text-decoration: underline;
}

.docs-list {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.docs-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #4b5563;
}

.docs-list__check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
}

.muted {
  color: var(--muted);
}

.apply-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.applicant-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 18px 24px;
  border-radius: 10px;
  background: var(--red-bright);
  color: #fff;
  box-shadow: 0 10px 24px rgba(227, 6, 19, 0.2);
}

.applicant-card__icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.applicant-card small {
  display: block;
  font-size: 11px;
  opacity: 0.9;
}

.applicant-card strong {
  font-size: 20px;
  font-weight: 800;
}

.upload-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.upload-card--full {
  grid-column: 1 / -1;
}

.upload-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-card__title h3 {
  font-size: 17px;
  font-weight: 800;
  color: #1f2937;
}

.upload-card__title small {
  font-size: 12px;
  color: var(--muted);
}

.upload-progress {
  font-size: 13px;
  color: #4b5563;
}

.upload-progress b {
  color: var(--red-bright);
}

.upload-progress-bar {
  height: 6px;
  margin: 16px 0 20px;
  border-radius: 999px;
  background: #f1f2f5;
  overflow: hidden;
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.3s;
}

.upload-slots {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-slot {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
  transition: border-color 0.2s, background 0.2s;
}

.upload-slot.is-uploaded {
  border-color: #b7ebc9;
  background: #f3fcf6;
}

.upload-slot.has-error {
  border-color: #f6c3c8;
}

.upload-slot__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.upload-slot__name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}

.upload-slot__badge {
  padding: 0 8px;
  border-radius: 999px;
  background: #fdecee;
  color: var(--red-bright);
  font-size: 10.5px;
  font-weight: 700;
}

.upload-slot.is-uploaded .upload-slot__badge {
  background: #dcfce7;
  color: #16a34a;
  font-size: 0;
}

.upload-slot.is-uploaded .upload-slot__badge::after {
  content: "تم الرفع";
  font-size: 10.5px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px;
  border: 1.5px dashed #cfd4de;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--red-bright);
  background: #fff8f8;
}

.dropzone__icon {
  display: flex;
  color: var(--red-bright);
  margin-bottom: 2px;
}

.dropzone__text {
  font-size: 13px;
  color: #374151;
}

.dropzone__text b {
  color: var(--red-bright);
}

.dropzone small {
  font-size: 11px;
  color: #9ca3af;
}

.file-info {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d5f2df;
}

.upload-slot.is-uploaded .dropzone {
  display: none;
}

.upload-slot.is-uploaded .file-info {
  display: flex;
}

.file-info__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #dcfce7;
  color: #16a34a;
}

.file-info__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.file-info__name {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  unicode-bidi: plaintext;
  text-align: right;
}

.file-info__size {
  font-size: 11px;
  color: var(--muted);
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
}

.icon-btn--danger:hover {
  color: var(--red-bright);
  border-color: var(--red-bright);
}

.slot-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--red-bright);
}

.slot-error:empty {
  display: none;
}

.upload-card .form-alert {
  margin: 16px 0 0;
}

.upload-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 50px 24px;
  text-align: center;
}

.success-card__icon {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  box-shadow: 0 0 0 10px #f0fdf4;
  margin-bottom: 14px;
}

.success-card h3 {
  font-size: 21px;
  font-weight: 800;
}

.success-card p {
  font-size: 14px;
}

.success-card b {
  color: var(--red-bright);
}

.success-card .btn {
  margin-top: 14px;
  padding: 0 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header__top {
    padding: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 0 6px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav__links {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav__tools {
    justify-content: space-between;
  }

  .apply-layout {
    grid-template-columns: 1fr;
  }

  .apply-main {
    order: -1;
  }

  .filter-tabs {
    padding: 0;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 8px 8px 0;
  }

  .hero {
    margin: 10px 8px 0;
    padding: 28px 16px;
    border-radius: 16px;
  }

  .hero__title {
    font-size: 22px;
  }

  .hero__desc {
    font-size: 13px;
  }

  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-tab {
    flex-shrink: 0;
  }

  .services {
    padding-top: 30px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .apply-layout {
    padding: 0 8px;
  }

  .upload-card {
    padding: 16px;
  }

  .modal__footer,
  .upload-card__actions {
    grid-template-columns: 1fr;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
  }
}

/* =====================================================================
   Backend features: loading skeletons, AI verification, requests,
   profile and the IDA assistant
   ===================================================================== */
/* Numbers / emails inside RTL text: read left-to-right, still aligned like the Arabic text */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

/* ---------- Loading ---------- */
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton,
.skeleton-card,
.skeleton-slot {
  background: linear-gradient(90deg, #eef0f4 25%, #f7f8fa 50%, #eef0f4 75%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton {
  display: inline-block;
  border-radius: 8px;
}

.skeleton--text {
  width: 140px;
  height: 18px;
}

.skeleton--title {
  width: min(420px, 70vw);
  height: 40px;
  vertical-align: middle;
  opacity: 0.6;
}

.skeleton-card {
  min-height: 250px;
  border-color: transparent;
}

.request-card.skeleton-card {
  min-height: 96px;
}

.skeleton-slot {
  height: 150px;
  border-color: transparent;
}

.spinner {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---------- Sidebar additions ---------- */
.side-card__icon--navy {
  background: var(--navy);
}

.side-card--ai {
  background: #f5f6fb;
  border-color: #dfe2f0;
}

.side-card--ai p {
  font-size: 12.5px;
  line-height: 1.8;
  color: #3f4470;
}

/* ---------- Upload slot: AI verification states ---------- */
.upload-slot__part {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef0f7;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}

.upload-slot__meta {
  margin: -4px 0 10px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef0f7;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}

.ai-badge--manual {
  background: #f3f4f6;
  color: #4b5563;
}

.upload-slot.is-uploaded .upload-slot__badge {
  font-size: 10.5px;
}

.upload-slot.is-uploaded .upload-slot__badge::after {
  content: none;
}

.upload-slot__badge--ok {
  background: #dcfce7 !important;
  color: #15803d !important;
}

.upload-slot__badge--warn {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.upload-slot__badge--bad {
  background: #fdecee !important;
  color: #b4121c !important;
}

.upload-slot__badge--info {
  background: #e0f2fe !important;
  color: #075985 !important;
}

.upload-slot.is-busy .upload-slot__badge {
  background: #eef0f7;
  color: var(--navy);
}

.upload-slot.is-warn {
  border-color: #fcd98a;
  background: #fffcf2;
}

.upload-slot.is-bad {
  border-color: #f6c3c8;
  background: #fff7f8;
}

.upload-slot.is-info {
  border-color: #bae6fd;
  background: #f5fbff;
}

.upload-slot.is-bad .file-info__icon {
  background: #fdecee;
  color: var(--red-bright);
}

.upload-slot.is-busy .dropzone {
  display: none;
}

.slot-progress {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}

.slot-progress__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
}

.slot-progress__bar {
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
}

.slot-progress__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--navy);
  transition: width 0.2s;
}

.slot-progress.is-verifying .slot-progress__bar span {
  width: 40% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}

@keyframes indeterminate {
  from {
    transform: translateX(160%);
  }
  to {
    transform: translateX(-260%);
  }
}

.verify-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 12.5px;
}

.verify-result--ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.verify-result--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.verify-result--bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.verify-result--info {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #075985;
}

.verify-result__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.verify-result__head p {
  flex: 1;
  font-weight: 700;
  line-height: 1.7;
}

.verify-result__head p small {
  display: block;
  font-weight: 600;
}

.verify-result__icon {
  display: flex;
  margin-top: 2px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.verify-details {
  margin-top: 8px;
  color: #374151;
}

.verify-details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.verify-details summary::-webkit-details-marker {
  display: none;
}

.verify-details h5 {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 800;
}

.checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.7;
}

.check__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 1px;
}

.check--pass .check__icon {
  background: #dcfce7;
  color: #16a34a;
}

.check--warn .check__icon {
  background: #fef3c7;
  color: #b45309;
}

.check--fail .check__icon {
  background: #fee2e2;
  color: #dc2626;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.data-row {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
}

.data-row dt {
  font-size: 10.5px;
  color: var(--muted);
}

.data-row dd {
  font-size: 12.5px;
  font-weight: 700;
  color: #1f2937;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
  text-align: start;
}

/* ---------- Success card additions ---------- */
.verify-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px !important;
  font-weight: 700;
}

.verify-summary--ok {
  background: #dcfce7;
  color: #166534;
}

.verify-summary--warn {
  background: #fef3c7;
  color: #92400e;
}

.success-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---------- Requests / profile pages ---------- */
.page-body {
  position: relative;
  z-index: 2;
  max-width: 954px;
  margin: 24px auto 60px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-body--narrow {
  max-width: 720px;
}

.page-body .services__count {
  margin: 0;
}

.request-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

a.request-card:hover {
  border-color: #c9cde0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.request-card__main {
  flex: 1;
  min-width: 0;
}

.request-card__no {
  font-size: 12px;
  font-weight: 800;
  color: var(--red-bright);
  direction: ltr;
  unicode-bidi: isolate;
}

.request-card h3 {
  margin: 2px 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #1f2937;
}

.request-card small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.request-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.request-card__arrow {
  display: flex;
  color: #9ca3af;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.pill--navy {
  background: #eef0f7;
  color: var(--navy);
}

.pill--ok {
  background: #dcfce7;
  color: #15803d;
}

.pill--warn {
  background: #fef3c7;
  color: #92400e;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
}

.back-link:hover {
  text-decoration: underline;
}

.request-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.request-summary > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.request-summary small {
  font-size: 11.5px;
  color: var(--muted);
}

.request-summary strong {
  font-size: 14px;
  font-weight: 800;
}

.upload-slots--spaced {
  margin-top: 18px;
}

.profile-card {
  display: flex;
  flex-direction: column;
}

.profile-row {
  display: grid;
  grid-template-columns: 34px 150px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row__icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef0f7;
  color: var(--navy);
}

.profile-row small {
  font-size: 12.5px;
  color: var(--muted);
}

.profile-row strong {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: start;
}

.profile-card .upload-card__actions {
  border-top: none;
  margin-top: 8px;
}

/* ---------- IDA assistant ---------- */
.assistant {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 90;
}

.assistant__fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px 0 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy), #4a4d9a);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(46, 48, 98, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.assistant__fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(46, 48, 98, 0.4);
}

.assistant.is-open .assistant__fab {
  display: none;
}

.assistant__panel {
  width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.assistant__panel[hidden] {
  display: none;
}

.assistant__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 14px 10px;
  background: var(--navy);
  color: #fff;
}

.assistant__head div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.assistant__head strong {
  font-size: 14.5px;
  font-weight: 800;
}

.assistant__head small {
  font-size: 11px;
  opacity: 0.8;
}

.assistant__avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.assistant__icon-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.assistant__icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.assistant__messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  background: #f7f8fb;
}

.assistant__msg {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.assistant__msg p + p {
  margin-top: 4px;
}

.assistant__msg ul {
  padding-inline-start: 18px;
  margin: 4px 0;
}

.assistant__msg--user {
  align-self: flex-start;
  background: var(--navy);
  color: #fff;
  border-start-start-radius: 4px;
}

.assistant__msg--bot {
  align-self: flex-end;
  background: #fff;
  color: #1f2937;
  border: 1px solid var(--border);
  border-start-end-radius: 4px;
}

.assistant__msg--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.assistant__msg--typing {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
}

.assistant__msg--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typing 1s infinite ease-in-out;
}

.assistant__msg--typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.assistant__msg--typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.assistant__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px;
  background: #f7f8fb;
}

.assistant__suggestions:not(:empty) {
  padding-bottom: 12px;
}

.assistant__chip {
  padding: 5px 12px;
  border: 1px solid #d6d9ea;
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.assistant__chip:hover {
  border-color: var(--navy);
}

.assistant__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.assistant__form textarea {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.assistant__form textarea:focus {
  border-color: var(--navy);
  background: #fff;
}

.assistant__send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: var(--red-bright);
  color: #fff;
  cursor: pointer;
}

.assistant__send svg {
  transform: scaleX(-1);
}

.assistant__send:disabled {
  background: #f3b7bb;
  cursor: not-allowed;
}

.assistant__note {
  padding: 0 12px 10px;
  font-size: 10.5px;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 760px) {
  .request-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-card {
    flex-wrap: wrap;
  }

  .request-card__side {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .request-card__arrow {
    display: none;
  }
}

@media (max-width: 600px) {
  .page-body {
    padding: 0 8px;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .profile-row {
    grid-template-columns: 34px 1fr;
  }

  .profile-row strong {
    grid-column: 2;
  }

  .assistant {
    left: 12px;
    bottom: 12px;
  }

  .assistant__fab span {
    display: none;
  }

  .assistant__fab {
    width: 52px;
    padding: 0;
    justify-content: center;
  }

  .assistant.is-open {
    inset: 0;
  }

  .assistant__panel {
    width: 100vw;
    height: 100%;
    border-radius: 0;
  }
}
