/* Tesaheel customer upload. Self contained: the site's Content-Security-Policy allows only same-origin styles, no web fonts. */

:root {
  color-scheme: light;

  --brand: #0f3d6e;
  --brand-strong: #0a2c51;
  --accent: #1f7ae0;
  --accent-soft: #e8f1fc;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e7ee;
  --border-strong: #c9d2de;
  --text: #15202e;
  --text-muted: #5b6878;

  --success: #16805a;
  --success-soft: #e6f5ee;
  --warning: #b26b00;
  --warning-soft: #fdf3e2;
  --danger: #c2372f;
  --danger-soft: #fcebea;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .05), 0 6px 20px rgba(16, 32, 56, .06);
  --focus: 0 0 0 3px rgba(31, 122, 224, .35);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top bar: Blink | Boubyan, nothing else ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partners {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.partners__logo { display: block; width: auto; }
.partners__logo--blink { height: 34px; }
/* The Boubyan mark is stacked (arch, Arabic, English), so it needs a little more height to read at the same weight */
.partners__logo--boubyan { height: 42px; }

.partners__divider { width: 1px; height: 30px; background: var(--border-strong); }

@media (max-width: 600px) {
  .topbar__inner { padding: 12px 16px; }
  .partners { gap: 14px; }
  .partners__logo--blink { height: 29px; }
  .partners__logo--boubyan { height: 36px; }
  .partners__divider { height: 26px; }
}

.hero__product {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* ---------- Page ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 120px;
}

.footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 32px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Hero + steps ---------- */

.hero { margin-bottom: 20px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 { font-size: 28px; font-weight: 750; }

.lead { margin-top: 8px; color: var(--text-muted); font-size: 16px; max-width: 58ch; }

.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.steps__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 3px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s, color .2s;
}

.steps__dot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  font-size: 12px;
  flex: none;
}

.steps__item.is-active { border-color: var(--accent); color: var(--text); }
.steps__item.is-active .steps__dot { border-color: var(--accent); color: var(--accent); }

.steps__item.is-done { border-color: var(--success); color: var(--text); }
.steps__item.is-done .steps__dot { background: var(--success); border-color: var(--success); color: #fff; }

/* ---------- Alerts ---------- */

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
}

.alert ul { margin: 6px 0 0; padding-left: 20px; }

.alert--danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.alert--warning { background: var(--warning-soft); color: var(--warning); }

/* ---------- Cards ---------- */

.card {
  margin-bottom: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.card__head > div { flex: 1; min-width: 0; }
.card__head h2 { font-size: 18px; font-weight: 700; }
.card__head p { margin-top: 2px; color: var(--text-muted); font-size: 14px; }

.card__step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

.counter {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.counter.is-complete { background: var(--success-soft); border-color: transparent; color: var(--success); }

/* ---------- Questions ---------- */

.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }

.field__label {
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 650;
  font-size: 15px;
}

.field__hint {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.field.is-answered .field__hint { background: var(--success-soft); color: var(--success); }

.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice-grid--two { grid-template-columns: repeat(2, 1fr); }

.choice { position: relative; display: block; cursor: pointer; }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice__body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 46px 16px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 32, 56, .05);
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.choice:hover .choice__body { border-color: var(--accent); box-shadow: 0 4px 14px rgba(31, 122, 224, .14); }

/* A real radio circle, so it is obvious the card can be selected */
.choice__radio {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.choice:hover .choice__radio { border-color: var(--accent); }

.choice__icon { width: 28px; height: 28px; margin-bottom: 10px; color: var(--accent); }
.choice__title { font-weight: 650; font-size: 15px; color: var(--text); }
.choice__sub { color: var(--text-muted); font-size: 13px; }

.choice input:checked + .choice__body {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice input:checked + .choice__body .choice__radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.choice input:focus-visible + .choice__body { box-shadow: var(--focus); }

/* Yes / No: radio on the left, text next to it */
.choice--inline .choice__body { padding: 14px 16px 14px 48px; }
.choice--inline .choice__radio { top: 50%; left: 16px; right: auto; margin-top: -10px; }
/* ---------- Documents ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-align: center;
  font-size: 15px;
}

.empty svg { width: 30px; height: 30px; }

.docs { display: grid; gap: 12px; }

.doc {
  margin: 0;
  padding: 16px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color .2s, background .2s;
}

.doc.is-ready { border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.doc.has-error { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }

.doc__head { display: flex; align-items: flex-start; gap: 12px; }

.doc__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand);
  flex: none;
}

.doc__icon svg { width: 20px; height: 20px; }
.doc.is-ready .doc__icon { color: var(--success); }

.doc__text { flex: 1; min-width: 0; }
.doc__title { font-size: 15px; font-weight: 650; }
.doc__hint { margin-top: 2px; color: var(--text-muted); font-size: 13px; }

.badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.doc.is-ready .badge { background: var(--success-soft); color: var(--success); }

.drop {
  position: relative;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--border-strong));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.drop:hover,
.drop.is-dragover { border-color: var(--accent); background: var(--accent-soft); }

.drop__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(16, 32, 56, .12);
  flex: none;
}

.drop__icon svg { width: 22px; height: 22px; }

.drop__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drop__title { font-weight: 650; font-size: 15px; color: var(--text); }
.drop__rules { font-size: 13px; color: var(--text-muted); }

.drop__button {
  flex: none;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  transition: background .15s;
}

.drop:hover .drop__button { background: color-mix(in srgb, var(--accent) 86%, #000); }

/* Once the document has files, the area becomes a quieter "add more" */
.doc.is-ready .drop { padding: 12px 16px; border-color: var(--border-strong); background: var(--surface); }
.doc.is-ready .drop__icon { width: 36px; height: 36px; }
.doc.is-ready .drop__button { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }

.drop__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop:focus-within { box-shadow: var(--focus); border-color: var(--accent); }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }

.file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
}

.file__type {
  flex: none;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__size { flex: none; color: var(--text-muted); font-size: 13px; }

.file__remove {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.file__remove:hover { background: var(--danger-soft); color: var(--danger); }
.file__remove:focus-visible { outline: none; box-shadow: var(--focus); }
.file__remove svg { width: 16px; height: 16px; }

.doc__error { margin-top: 8px; color: var(--danger); font-size: 13px; font-weight: 600; }

/* ---------- Submit bar ---------- */

.submit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.submit-bar__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.submit-bar__note { color: var(--text-muted); font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 650;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s, opacity .15s, transform .05s;
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn--primary:active:not(:disabled) { transform: translateY(1px); }
.btn--primary:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Upload overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 20, 35, .55);
  backdrop-filter: blur(3px);
}

.overlay__card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.overlay__card h2 { margin-top: 14px; font-size: 18px; }
.overlay__percent { margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.overlay__muted { margin-top: 4px; color: var(--text-muted); font-size: 14px; }

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

.progress { margin-top: 16px; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress__bar { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Status pages ---------- */

.status {
  max-width: 520px;
  margin: 40px auto 0;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.status__icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
}

.status__icon svg { width: 32px; height: 32px; stroke-width: 2.2; }
.status h1 { font-size: 24px; font-weight: 750; }
.status p { margin-top: 10px; color: var(--text-muted); }
.status .status__muted { font-size: 14px; }

.status--success .status__icon { background: var(--success-soft); color: var(--success); }
.status--warning .status__icon { background: var(--warning-soft); color: var(--warning); }
.status--danger .status__icon { background: var(--danger-soft); color: var(--danger); }
.status--neutral .status__icon { background: var(--surface-2); color: var(--text-muted); }

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .page { padding-top: 18px; }
  .hero h1 { font-size: 24px; }
  .card { padding: 16px; }
  .choice-grid { grid-template-columns: 1fr; gap: 10px; }
  .choice-grid--two { grid-template-columns: 1fr 1fr; }
  .choice__body { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: center; padding: 14px 46px 14px 14px; }
  .choice__icon { grid-row: span 2; margin-bottom: 0; }
  .choice__radio { top: 50%; margin-top: -10px; }
  .choice--inline .choice__body { display: flex; align-items: flex-start; padding: 12px 12px 12px 44px; }
  .choice--inline .choice__radio { left: 14px; }
  .drop { padding: 14px; }
  .drop__button { display: none; }
  .steps__label { font-size: 12px; }
  .submit-bar__note { display: none; }
  .submit-bar .btn { width: 100%; }
  .status { margin-top: 16px; padding: 28px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
