/* =====================================================================
   QdesignSkill — real-world objects: show a thing the way people recognise it
   Load after components.css. Markup builders in objects.js (window.QObj).
   Flags use flag-icons (MIT):
   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flag-icons@7.2.3/css/flag-icons.min.css">
   Payment-brand marks use Simple Icons (CC0 data; brand marks remain their owners' trademarks — use
   them only to identify the payment method), loaded as <img> from jsdelivr.
   For offline / intranet builds, download both into the project and point the URLs locally.
   ===================================================================== */
/* Wrapped in a cascade layer so Tailwind utilities and your own unlayered CSS win over the kit. */
@layer components {


/* ---------- Flags & nationality: flag + name (or ISO code), never a flag alone ---------- */
.nat { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.fi { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 14%, transparent); background-size: cover; background-position: center; }
.fi.fis { border-radius: 50%; width: 1.15em; line-height: 1.15em; }
.nat .code { font-family: var(--type-mono); font-size: 0.85em; color: var(--fg-faint); }
.nat.lg { gap: 9px; font-size: 15px; font-weight: 600; }
.nat.lg .fi { width: 28px; height: 21px; border-radius: 4px; }

/* ---------- Language: script glyph + native name (a flag is a country, not a language) ---------- */
.lang-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding-block: 0; padding-inline: 4px 12px; border-radius: var(--r-pill); background: var(--surface-3); font-size: 13px; font-weight: 500; white-space: nowrap; }
.lang-chip .glyph { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12px; font-weight: 700; color: var(--brand); }

/* ---------- Phone: flag + international format, LTR ---------- */
.phone { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-family: var(--type-mono); font-size: 0.95em; direction: ltr; unicode-bidi: isolate; }

/* ---------- Documents: passport data page (ID-3) and ID / residence card (ID-1) ---------- */
.doc {
  --doc-c: #0b2540; --doc-ink: #14202e;
  position: relative; overflow: hidden; isolation: isolate; width: 100%; max-width: 440px; border-radius: 14px; color: var(--doc-ink);
  background:
    repeating-radial-gradient(circle at 78% 40%, transparent 0 9px, color-mix(in srgb, var(--doc-c) 7%, transparent) 9px 10px),
    linear-gradient(135deg, #fbf8f0 0%, #f1ece0 55%, color-mix(in srgb, var(--doc-c) 12%, #f1ece0) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 0 0 1px rgba(20, 32, 46, 0.12), 0 18px 40px -18px rgba(11, 23, 40, 0.45);
  font-size: 11.5px; line-height: 1.25;
}
.doc-passport { aspect-ratio: 125 / 88; }
.doc-id { aspect-ratio: 85.6 / 54; }
.doc-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--doc-c); color: #f4ead2; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.doc-head .fi { width: 20px; height: 15px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3); }
.doc-head .doc-type { margin-inline-start: auto; opacity: 0.85; letter-spacing: 0.12em; }
html[lang="ar"] .doc-head, html[lang="ar"] .doc-head .doc-type { letter-spacing: 0; }
.doc-body { display: grid; grid-template-columns: 26% minmax(0, 1fr); gap: 12px; padding: 12px 14px 0; }
.doc-photo { aspect-ratio: 3 / 4; border-radius: 6px; display: grid; place-items: end center; overflow: hidden; background: linear-gradient(180deg, #dfe6ee, #c5d0dc); }
.doc-photo svg { width: 82%; color: #8d9bab; }
.doc-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; align-content: start; margin: 0; }
.doc-fields .wide { grid-column: 1 / -1; }
.doc-fields dt { font-size: 8.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--doc-ink) 58%, transparent); }
html[lang="ar"] .doc-fields dt { letter-spacing: 0; text-transform: none; font-size: 9.5px; }
.doc-fields dd { margin: 0; font-family: var(--type-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.doc-mrz { position: absolute; inset-inline: 0; bottom: 0; padding: 8px 14px 9px; background: rgba(255, 255, 255, 0.55); font: 600 10.5px/1.35 "OCR-B", ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.14em; white-space: pre; overflow: hidden; color: #1d2733; direction: ltr; text-align: left; } /* physical-ok: the MRZ is always LTR (ICAO 9303) */
.doc .chip-emv { position: absolute; inset-inline-end: 16px; top: 46px; width: 38px; }
[data-theme="dark"] .doc { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 50px -20px rgba(0, 0, 0, 0.8); }

/* Compact document chip for lists, tables and headers: icon tile + masked number + issuing flag */
.doc-chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.doc-ico { display: grid; place-items: center; width: 26px; height: 32px; border-radius: 5px; background: linear-gradient(160deg, #13365c, #0b2540); color: #e6d3a8; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 10px -4px rgba(11, 37, 64, 0.6); flex: none; }
.doc-ico.id { width: 36px; height: 24px; background: linear-gradient(135deg, #efe7d3, #cfd8e2); color: #0b2540; }
.doc-ico svg { width: 17px; height: 17px; }
.doc-chip .mask { font-size: 12.5px; }

/* ---------- Payment card (ISO ID-1) ---------- */
.pay-card {
  --pc-a: #1b2a6b; --pc-b: #3a33c4;
  position: relative; overflow: hidden; isolation: isolate; width: 100%; max-width: 360px; aspect-ratio: 85.6 / 54; padding: 18px 20px; border-radius: 16px; color: #fff;
  display: grid; grid-template-rows: auto 1fr auto auto; gap: 6px; container-type: inline-size;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(0, 0, 0, 0.35), transparent 60%),
    linear-gradient(135deg, var(--pc-a), var(--pc-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 24px 50px -22px color-mix(in srgb, var(--pc-b) 70%, black);
  font-family: var(--type-mono); direction: ltr; text-align: left; /* physical-ok: card faces read LTR */
}
.pay-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18; background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, 0.12) 22px 23px); }
.pay-card[data-brand="visa"], .pay-chip[data-brand="visa"] { --pc-a: #0d1b5e; --pc-b: #1a3fb0; }
.pay-card[data-brand="mastercard"], .pay-chip[data-brand="mastercard"] { --pc-a: #1c1c22; --pc-b: #4a2a20; }
.pay-card[data-brand="amex"], .pay-chip[data-brand="amex"] { --pc-a: #0b5f7d; --pc-b: #2aa3c9; }
.pay-card[data-brand="unionpay"], .pay-chip[data-brand="unionpay"] { --pc-a: #0e4a4a; --pc-b: #b3262d; }
.pay-card[data-brand="jcb"], .pay-chip[data-brand="jcb"] { --pc-a: #0c3d2a; --pc-b: #1f6f9a; }
.pay-card .pc-top { display: flex; align-items: center; justify-content: space-between; font: 600 11px var(--type-sans); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.pay-card .pc-chip { display: flex; align-items: center; gap: 10px; align-self: center; }
.pay-card .pc-chip svg:first-child { width: 40px; }
.pay-card .pc-chip svg:last-child { width: 22px; opacity: 0.85; }
.pay-card .pc-number { font-size: clamp(14px, 5.2cqi, 19px); letter-spacing: 0.12em; white-space: nowrap; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
.pay-card .pc-foot { display: flex; align-items: end; gap: 16px; font-size: 12px; }
.pay-card .pc-foot small { display: block; font: 600 8px var(--type-sans); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.pay-card .pc-brand { margin-inline-start: auto; height: 26px; filter: brightness(0) invert(1); opacity: 0.95; }

/* Compact payment method: brand mark tile + •••• 4242 + expiry */
.pay-chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--type-mono); font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }
.pay-chip .pc-mini { display: grid; place-items: center; width: 38px; height: 24px; border-radius: 4px; background: linear-gradient(135deg, var(--pc-a, #1b2a6b), var(--pc-b, #3a33c4)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.pay-chip .pc-mini img { height: 11px; filter: brightness(0) invert(1); }

/* ---------- Boarding pass ---------- */
.boarding-pass {
  --bp-c: var(--brand);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 112px; max-width: 520px; border-radius: 16px; overflow: hidden; container-type: inline-size;
  background: var(--surface-solid); box-shadow: 0 0 0 1px var(--line-2), var(--elev-lg);
  -webkit-mask: radial-gradient(circle 11px at calc(100% - 112px) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 11px at calc(100% - 112px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 11px at calc(100% - 112px) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 11px at calc(100% - 112px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  direction: ltr; /* physical-ok: a boarding pass is an LTR artefact; its labels may still be Arabic */
}
.boarding-pass .bp-main { padding: 16px 18px; display: grid; gap: 12px; border-inline-end: 2px dashed var(--line-2); }
.boarding-pass .bp-airline { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.boarding-pass .bp-route { display: flex; align-items: center; gap: 14px; }
.boarding-pass .bp-route b { font: 700 30px/1 var(--type-mono); letter-spacing: 0.02em; }
.boarding-pass .bp-route small { display: block; font-size: 11px; color: var(--fg-muted); font-weight: 500; }
.boarding-pass .bp-route .leg { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 10px); position: relative; }
.boarding-pass .bp-route .leg svg { position: absolute; inset-inline-start: 50%; top: 50%; translate: -50% -50%; width: 18px; height: 18px; color: var(--bp-c); background: var(--surface-solid); padding: 0 3px; }
.boarding-pass .bp-grid { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 16px; font-size: 11px; color: var(--fg-muted); }
.boarding-pass .bp-grid b { display: block; font: 700 14px var(--type-mono); color: var(--fg); }
.boarding-pass .bp-stub { padding: 16px 12px; display: grid; align-content: space-between; justify-items: center; gap: 10px; background: color-mix(in srgb, var(--bp-c) 8%, var(--surface-solid)); }
.boarding-pass .bp-stub > span:not(.barcode) { max-width: 100%; text-align: center; overflow-wrap: anywhere; font-size: 10.5px; line-height: 1.25; }
.boarding-pass.pending .barcode { opacity: 0.18; }
.boarding-pass.pending .bp-grid b, .boarding-pass.pending .bp-stub { color: var(--fg-muted); }
.boarding-pass .bp-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; rotate: -9deg; font: 800 clamp(18px, 3.4cqi, 28px) var(--type-mono); letter-spacing: 0.32em; text-transform: uppercase; color: color-mix(in srgb, var(--fg) 13%, transparent); }
html[lang="ar"] .boarding-pass .bp-watermark { letter-spacing: 0; font-family: var(--type-ar); }
.boarding-pass .barcode { width: 72px; height: 72px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--fg) 0 2px, transparent 2px 3px, var(--fg) 3px 4px, transparent 4px 7px, var(--fg) 7px 10px, transparent 10px 11px); opacity: 0.85; }

.boarding-pass .bp-main { min-width: 0; }
@media (max-width: 560px) {
  /* Phones: the stub moves under the ticket and the tear-line turns horizontal. */
  .boarding-pass { grid-template-columns: minmax(0, 1fr); -webkit-mask: none; mask: none; }
  .boarding-pass .bp-main { border-inline-end: 0; border-bottom: 2px dashed var(--line-2); }
  .boarding-pass .bp-stub { grid-auto-flow: column; align-items: center; justify-content: space-between; align-content: center; }
  .boarding-pass .barcode { width: 120px; height: 36px; }
  .boarding-pass .bp-route b { font-size: 24px; }
  .boarding-pass .bp-grid { grid-template-columns: repeat(2, auto); }
}

/* ---------- Airline / carrier code tile (use the airline colour; licensed logo if you have one) ---------- */
.iata { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 5px; font: 700 11px var(--type-mono); letter-spacing: 0.04em; color: #fff; background: var(--iata-c, #3a4a5e); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.airport { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.airport b { font: 700 1em var(--type-mono); letter-spacing: 0.03em; }
.airport small { color: var(--fg-muted); font-size: 0.85em; }

/* ---------- File type chip ---------- */
.file-chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.file-chip .ft { display: grid; place-items: end center; width: 26px; height: 32px; padding-bottom: 4px; border-radius: 4px; font: 700 7.5px var(--type-sans); letter-spacing: 0.04em; color: #fff; background: var(--ft, #64748b); clip-path: polygon(0 0, 70% 0, 100% 24%, 100% 100%, 0 100%); flex: none; }
.file-chip[data-type="pdf"] { --ft: #c8372d; }
.file-chip[data-type="doc"], .file-chip[data-type="docx"] { --ft: #2b5fb4; }
.file-chip[data-type="xls"], .file-chip[data-type="xlsx"], .file-chip[data-type="csv"] { --ft: #1d7a46; }
.file-chip[data-type="jpg"], .file-chip[data-type="jpeg"], .file-chip[data-type="png"], .file-chip[data-type="heic"] { --ft: #6a4bc4; }
.file-chip .meta { color: var(--fg-faint); font-size: 12px; }

/* ---------- Money: amount + currency code, tabular ---------- */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money .ccy { font-size: 0.78em; font-weight: 600; color: var(--fg-faint); margin-inline-start: 3px; }

/* ---------- Coded values decoded: the code in mono + its meaning ---------- */
.code-val { display: inline-flex; align-items: baseline; gap: 6px; }
.code-val b { font: 700 0.92em var(--type-mono); padding: 1px 5px; border-radius: 4px; background: var(--surface-3); }
.code-val span { color: var(--fg-muted); }

/* ---------- Missing data: collapsed, quiet, honest ---------- */
.not-recorded { color: var(--fg-faint); font-style: normal; }
.missing-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); font-size: 12.5px; color: var(--fg-muted); }
.missing-summary .chip { height: 24px; font-size: 11.5px; }

/* ---------- Route map (routemap.js): dotted land, great-circle arc, flagged endpoints ---------- */
.route-map { position: relative; overflow: hidden; --route-dot: color-mix(in srgb, var(--fg) 30%, transparent); }
.route-map .route-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-map .route-labels { position: absolute; inset: 0; pointer-events: none; direction: ltr; } /* physical-ok: map coordinates */
.route-label { position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-pill); background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: var(--elev-sm); font-size: 11.5px; white-space: nowrap; } /* physical-ok: placed in map pixels */
.route-label b { font: 700 12px var(--type-mono); letter-spacing: 0.04em; }
.route-label.small { padding: 2px 7px; font-size: 10.5px; opacity: 0.9; }
.route-label.small b { font-size: 10.5px; }
.route-caption { font: 600 11.5px var(--type-mono); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.route-label small { color: var(--fg-muted); }
.route-pulse { transform-box: fill-box; transform-origin: center; animation: route-pulse 2.4s var(--motion-ease) infinite; }
@keyframes route-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }

/* ---------- Passport stamps on a visa page ---------- */
.stamp-page {
  position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 0; padding: 22px 24px 30px; border-radius: 14px; overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(35, 83, 180, 0.06) 27px 28px),
    repeating-radial-gradient(circle at 20% 110%, transparent 0 11px, rgba(168, 130, 60, 0.07) 11px 12px),
    linear-gradient(160deg, #fbf8f0, #efe8d8);
  box-shadow: inset 0 0 0 1px rgba(20, 32, 46, 0.12), 0 18px 40px -22px rgba(0, 0, 0, 0.55);
  color: #14202e;
}
.stamp-page::after { content: "VISAS · التأشيرات"; position: absolute; inset-inline-end: 14px; bottom: 8px; font: 700 9px var(--type-mono); letter-spacing: 0.2em; color: rgba(20, 32, 46, 0.3); }
.stamp { margin: 0; display: grid; justify-items: center; gap: 2px; }
.stamp { translate: var(--dx, 0) var(--dy, 0); }
.stamp svg { width: 100%; max-width: 156px; rotate: var(--rot, 0deg); mix-blend-mode: multiply; margin-inline: -8px; }
.stamp figcaption { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: #4a5565; }
.stamp-page .empty-note { grid-column: 1 / -1; font-size: 12.5px; color: #4a5565; }

/* ---------- E-ticket coupon (perforated) ---------- */
.ticket-coupon { display: grid; grid-template-columns: minmax(0, 1fr) 128px; border-radius: 14px; overflow: hidden; background: var(--surface-solid); box-shadow: 0 0 0 1px var(--line-2), var(--elev-lg); }
.ticket-coupon .tc-main { padding: 14px 16px; display: grid; gap: 10px; min-width: 0; border-inline-end: 2px dotted var(--line-2); }
.ticket-coupon .tc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-coupon .tc-no { font: 700 15px var(--type-mono); letter-spacing: 0.06em; direction: ltr; }
.ticket-coupon .tc-endorse { margin: 0; font-size: 11px; letter-spacing: 0.06em; color: var(--warn); }
.tc-coupons { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-coupons li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; }
.tc-coupons .tc-i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); font: 700 10.5px var(--type-mono); }
.tc-coupons .tc-route { font: 700 13px var(--type-mono); direction: ltr; }
.tc-coupons .tc-route i { font-style: normal; color: var(--fg-faint); }
.ticket-coupon .tc-stub { padding: 14px 12px; display: grid; align-content: start; gap: 2px; background: color-mix(in srgb, var(--brand) 7%, var(--surface-solid)); font-size: 13px; }
.ticket-coupon .tc-stub small { margin-top: 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-faint); }
html[lang="ar"] .ticket-coupon .tc-stub small { letter-spacing: 0; text-transform: none; font-size: 11px; }

/* ---------- Bag tag ---------- */
.bag-tag {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; width: 100%; max-width: 150px; min-height: 230px; padding: 34px 12px 14px; border-radius: 12px 12px 16px 16px;
  background: linear-gradient(180deg, #fdfcf7, #f1ede2); color: #14202e; box-shadow: inset 0 0 0 1px rgba(20, 32, 46, 0.12), 0 16px 30px -18px rgba(0, 0, 0, 0.6);
  clip-path: polygon(22% 0, 78% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
}
.bag-tag .bt-hole { position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 18px; height: 10px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 2px rgba(20, 32, 46, 0.25); } /* physical-ok: centred */
.bag-tag .bt-to { font: 800 38px/1 var(--type-mono); letter-spacing: 0.02em; }
.bag-tag .bt-from { font: 600 11px var(--type-mono); color: #5d6878; }
.bag-tag .bt-code { width: 86%; height: 46px; margin-top: 6px; background: repeating-linear-gradient(90deg, #14202e 0 2px, transparent 2px 3px, #14202e 3px 4px, transparent 4px 6px, #14202e 6px 9px, transparent 9px 10px); }
.bag-tag .bt-no { font-size: 12px; letter-spacing: 0.08em; direction: ltr; }
.bag-tag.empty { background: transparent; box-shadow: none; outline: 1.5px dashed var(--line-2); outline-offset: -1.5px; color: var(--fg-muted); clip-path: none; justify-content: center; align-content: center; }
.bag-tag.empty .bt-hole { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.bag-tag.empty .bt-empty { font-size: 12.5px; font-weight: 600; text-align: center; }
.bag-tag.empty { gap: 8px; text-align: center; }
.bag-tag .bt-ico { width: 30px; height: 30px; fill: none; stroke: var(--fg-faint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact card ---------- */
.contact-card { display: grid; gap: 14px; padding: 18px; border-radius: 16px; background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 10%, var(--surface-solid)), var(--surface-solid) 60%); box-shadow: 0 0 0 1px var(--line), var(--elev-sm); }
.contact-card .cc-top { display: flex; align-items: center; gap: 12px; }
.contact-card .cc-top b { font-size: 15px; }
.contact-card .cc-rows { display: grid; gap: 10px; margin: 0; }
.contact-card .cc-rows > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; }
.contact-card dt { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: var(--brand); }
.contact-card dt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-card dd { margin: 0; min-width: 0; font-size: 13.5px; }

/* ---------- Special service requests ---------- */
.ssr-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ssr { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding-block: 0; padding-inline: 8px 12px; border-radius: var(--r-pill); background: var(--surface-3); font-size: 12.5px; white-space: nowrap; }
.ssr svg { width: 15px; height: 15px; color: var(--brand); }
.ssr b { font: 700 10.5px var(--type-mono); color: var(--fg-faint); }

/* ---------- Itinerary segments ---------- */
.itinerary { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.itinerary li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); font-size: 13px; }
.itinerary li.current { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.itinerary .it-route { display: inline-flex; align-items: center; gap: 6px; direction: ltr; }
.itinerary .it-route b { font: 700 13.5px var(--type-mono); }
.itinerary .it-route i { font-style: normal; color: var(--fg-faint); }

/* ---------- Journey lifecycle ---------- */
.lifecycle { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
.lifecycle li { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; padding-inline: 4px; font-size: 12.5px; }
.lifecycle li::before { content: ""; position: absolute; top: 17px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.lifecycle li:first-child::before { display: none; }
.lifecycle li[data-state="done"]::before, .lifecycle li[data-state="now"]::before { background: var(--grad); }
.lifecycle .lc-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-solid); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--fg-faint); }
.lifecycle .lc-dot svg { width: 16px; height: 16px; }
.lifecycle li[data-state="done"] .lc-dot { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.lifecycle li[data-state="now"] .lc-dot { background: var(--surface-solid); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 6px var(--brand-soft), 0 0 22px var(--brand-glow); }
.lifecycle li[data-state="pending"] .lc-dot { color: var(--warn); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 60%, transparent); }
.lifecycle b { font-size: 12.5px; font-weight: 600; }
.lifecycle li[data-state="future"] b { color: var(--fg-muted); font-weight: 500; }
.lifecycle .lc-when { font: 500 11px var(--type-mono); color: var(--fg-faint); }
html[lang="ar"] .lifecycle .lc-when { font-family: var(--type-ar); }
.lifecycle .lc-note { font-size: 11px; color: var(--warn); }
@media (max-width: 720px) {
  .lifecycle { grid-auto-flow: row; gap: 14px; }
  .lifecycle li { grid-template-columns: 36px minmax(0, 1fr); justify-items: start; text-align: start; column-gap: 12px; row-gap: 0; }
  .lifecycle li > :not(.lc-dot) { grid-column: 2; }
  .lifecycle .lc-dot { grid-row: span 3; }
  .lifecycle li::before { top: -14px; inset-inline-start: 17px; width: 2px; height: 14px; }
  .ticket-coupon { grid-template-columns: minmax(0, 1fr); }
  .ticket-coupon .tc-main { border-inline-end: 0; border-bottom: 2px dotted var(--line-2); }
}
@media (prefers-reduced-motion: reduce) { .route-pulse { animation: none; } }

/* ---------- Flight board: departures-board header (split-flap letters) ---------- */
.flight-board { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 28px; padding: 18px 22px; border-radius: var(--r-xl); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 92%, black), var(--surface-solid)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--elev-lg); }
.flight-board .fb-id { display: flex; align-items: center; gap: 12px; }
.flight-board .fb-id .iata { height: 34px; min-width: 42px; font-size: 13px; border-radius: 8px; }
.flight-board .fb-id small, .flight-board .fb-end small { display: block; font-size: 11.5px; color: var(--fg-muted); }
.flight-board .fb-route { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 18px; direction: ltr; } /* physical-ok: routes read origin → destination */
.flight-board .fb-end { display: grid; justify-items: start; gap: 2px; }
.flight-board .fb-end:last-child { justify-items: end; text-align: right; } /* physical-ok: LTR artefact */
.flight-board .fb-end b { display: inline-flex; align-items: center; gap: 8px; }
.flight-board .fb-end .fi { width: 24px; height: 18px; }
.flight-board .fb-end .mono { font-size: 15px; font-weight: 700; }
.flight-board .fb-leg { display: grid; justify-items: center; gap: 4px; }
.flight-board .fb-leg > :not(.fb-line), .flight-board .fb-end small { unicode-bidi: plaintext; } /* Arabic text inside the LTR route strip keeps its own order */
.flight-board .fb-line { position: relative; width: 100%; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 11px); }
.flight-board .fb-line svg { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 20px; height: 20px; fill: var(--brand); background: var(--surface-solid); padding: 0 3px; } /* physical-ok: centred */
.flight-board .fb-meta { display: grid; justify-items: end; gap: 8px; }
.flap { display: inline-flex; gap: 2px; direction: ltr; }
.flap i { position: relative; display: inline-grid; place-items: center; min-width: 0.95em; height: 1.35em; padding: 0 1px; border-radius: 3px; font: 700 1em var(--type-mono); font-style: normal; color: #f6e7b8; background: linear-gradient(180deg, #1b2533 0 49%, #121a25 51% 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 0 rgba(0, 0, 0, 0.4); }
.flap i::after { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.55); }
.flight-board .fb-id b .flap { font-size: 22px; }
.flight-board .fb-end b .flap { font-size: 26px; }
@media (max-width: 520px) {
  .flight-board { padding: 16px; gap: 14px; }
  .flight-board .fb-route { grid-template-columns: auto minmax(36px, 1fr) auto; gap: 10px; }
  .flight-board .fb-end b { gap: 6px; }
  .flight-board .fb-end b .flap { font-size: 19px; }
  .flight-board .fb-end .fi { width: 18px; height: 13.5px; }
  .flight-board .fb-id b .flap { font-size: 18px; }
  .flight-board .fb-leg small { font-size: 10.5px; }
}
@media (max-width: 960px) { .flight-board { grid-template-columns: minmax(0, 1fr); } .flight-board .fb-meta { justify-items: start; grid-auto-flow: column; justify-content: start; } }

/* ---------- Cabin seat map ---------- */
.seat-map { --seat: 26px; position: relative; display: grid; justify-content: center; gap: 4px; padding: 26px 20px 30px; border-radius: 120px 120px 36px 36px / 160px 160px 36px 36px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 70%, transparent), var(--surface-2)); box-shadow: inset 0 0 0 1.5px var(--line-2); direction: ltr; } /* physical-ok: aircraft seat letters read A→F */
.seat-map .sm-nose { height: 40px; margin: -6px auto 6px; width: 60%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: linear-gradient(180deg, var(--surface-3), transparent); }
.seat-map .sm-row { display: grid; grid-template-columns: 22px repeat(var(--cols, 7), var(--seat)) 22px; gap: 4px; align-items: center; position: relative; }
.seat-map .sm-row.exit::before, .seat-map .sm-row.exit::after { content: "EXIT"; position: absolute; top: 50%; translate: 0 -50%; font: 700 8px var(--type-mono); letter-spacing: 0.08em; color: var(--warn); }
.seat-map .sm-row.exit::before { left: -34px; } .seat-map .sm-row.exit::after { right: -34px; } /* physical-ok: aircraft sides */
html[lang="ar"] .seat-map .sm-row.exit::before, html[lang="ar"] .seat-map .sm-row.exit::after { content: "مخرج"; font-family: var(--type-ar); letter-spacing: 0; font-size: 9px; }
.seat-map .sm-row.wing { box-shadow: -40px 0 0 -12px color-mix(in srgb, var(--fg) 7%, transparent), 40px 0 0 -12px color-mix(in srgb, var(--fg) 7%, transparent); }
.seat-map .sm-letters span { font: 700 10px var(--type-mono); color: var(--fg-faint); text-align: center; }
.seat-map .sm-n { font: 500 10px var(--type-mono); color: var(--fg-faint); text-align: center; }
.seat-map .sm-aisle { width: var(--seat); }
.seat { position: relative; width: var(--seat); height: var(--seat); border-radius: 7px 7px 5px 5px; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; background: color-mix(in srgb, var(--fg) 7%, transparent); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--fg) 10%, transparent); transition: transform var(--dur-1), box-shadow var(--dur-1); }
.seat .fi { width: 12px; height: 9px; border-radius: 2px; box-shadow: none; }
.seat[data-state="assigned"] { background: color-mix(in srgb, var(--series-1) 30%, var(--surface-solid)); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--series-1) 60%, transparent); }
.seat[data-state="checkedin"] { background: color-mix(in srgb, var(--warn-fill) 40%, var(--surface-solid)); box-shadow: inset 0 -3px 0 var(--warn-fill); }
.seat[data-state="boarded"] { background: color-mix(in srgb, var(--good-fill) 40%, var(--surface-solid)); box-shadow: inset 0 -3px 0 var(--good-fill); }
.seat[data-state="crew"] { background: color-mix(in srgb, var(--series-7) 40%, var(--surface-solid)); box-shadow: inset 0 -3px 0 var(--series-7); }
.seat[data-state="blocked"] { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--surface-3) 4px 8px); cursor: not-allowed; }
.seat[data-risk]::after { content: ""; position: absolute; inset: -3px; border-radius: 9px; box-shadow: 0 0 0 2px var(--rk, var(--warn-fill)); }
.seat[data-risk="high"]::after, .seat[data-risk="critical"]::after { --rk: var(--bad-fill); animation: pulse 2s infinite; color: var(--bad-fill); }
.seat:hover { transform: translateY(-2px); }
.seat[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 3px; }
.seat-map.dim-unmatched .seat:not(.match) { opacity: 0.25; }
/* Landscape cabin (nose at the start, rows run across): a 27-row aircraft is ~260px tall instead of ~900px.
   Seats size themselves from the box width and the row count (--rows), 18–28px. */
.seat-map-box { container-type: inline-size; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; padding-block: 2px; }
.seat-map.landscape { --seat: clamp(18px, calc((100cqi - 110px) / (var(--rows, 30) + 2) - 4px), 28px); grid-auto-flow: column; justify-content: start; align-items: center; width: max-content; margin-inline: auto; padding: 18px 30px 18px 20px; border-radius: 140px 40px 40px 140px / 130px 40px 40px 130px; background: linear-gradient(90deg, color-mix(in srgb, var(--surface-3) 70%, transparent), var(--surface-2)); } /* physical-ok: aircraft artefact */
.seat-map.landscape .sm-nose { width: 34px; height: 62%; margin: 0 2px 0 -6px; border-radius: 100% 0 0 100% / 50% 0 0 50%; background: linear-gradient(90deg, var(--surface-3), transparent); } /* physical-ok */
.seat-map.landscape .sm-row { grid-template-columns: none; grid-template-rows: 18px repeat(var(--cols, 7), var(--seat)) 18px; }
.seat-map.landscape .sm-row.exit::before { left: 50%; top: -15px; translate: -50% 0; } /* physical-ok */
.seat-map.landscape .sm-row.exit::after { left: 50%; right: auto; top: auto; bottom: -15px; translate: -50% 0; } /* physical-ok */
.seat-map.landscape .sm-row.wing { box-shadow: 0 -34px 0 -6px color-mix(in srgb, var(--fg) 7%, transparent), 0 34px 0 -6px color-mix(in srgb, var(--fg) 7%, transparent); }
@container (min-width: 720px) {
  .seat-map.auto { --seat: clamp(18px, calc((100cqi - 110px) / (var(--rows, 30) + 2) - 4px), 28px); grid-auto-flow: column; justify-content: start; align-items: center; width: max-content; margin-inline: auto; padding: 18px 30px 18px 20px; border-radius: 140px 40px 40px 140px / 130px 40px 40px 130px; background: linear-gradient(90deg, color-mix(in srgb, var(--surface-3) 70%, transparent), var(--surface-2)); } /* physical-ok: aircraft artefact */
  .seat-map.auto .sm-nose { width: 34px; height: 62%; margin: 0 2px 0 -6px; border-radius: 100% 0 0 100% / 50% 0 0 50%; background: linear-gradient(90deg, var(--surface-3), transparent); } /* physical-ok */
  .seat-map.auto .sm-row { grid-template-columns: none; grid-template-rows: 18px repeat(var(--cols, 7), var(--seat)) 18px; }
  .seat-map.auto .sm-row.exit::before { left: 50%; top: -15px; translate: -50% 0; } /* physical-ok */
  .seat-map.auto .sm-row.exit::after { left: 50%; right: auto; top: auto; bottom: -15px; translate: -50% 0; } /* physical-ok */
  .seat-map.auto .sm-row.wing { box-shadow: 0 -34px 0 -6px color-mix(in srgb, var(--fg) 7%, transparent), 0 34px 0 -6px color-mix(in srgb, var(--fg) 7%, transparent); }
}
.seat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--fg-muted); }
.seat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.seat-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ---------- Flag bars ---------- */
.flag-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flag-bars li { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(0, 2fr) auto auto; align-items: center; gap: 12px; font-size: 13.5px; }
.flag-bars .fi { width: 22px; height: 16.5px; }
.flag-bars .fbar { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.flag-bars .fbar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.flag-bars b { font-size: 14px; }

/* ---------- Age × sex pyramid ---------- */
.pyramid { display: grid; gap: 6px; font-size: 12px; }
.pyramid .py-head, .pyramid .py-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 8px; }
.pyramid .py-head { color: var(--fg-muted); font-weight: 600; }
.pyramid .py-head span:first-child { text-align: end; }
.pyramid .py-band { text-align: center; font: 600 11px var(--type-mono); color: var(--fg-muted); }
.pyramid .py-bar { position: relative; display: flex; align-items: center; height: 18px; }
.pyramid .py-bar.f { justify-content: flex-end; }
.pyramid .py-bar span { height: 100%; border-radius: 5px; }
.pyramid .py-bar.f span { background: linear-gradient(270deg, var(--series-5), color-mix(in srgb, var(--series-5) 55%, transparent)); }
.pyramid .py-bar.m span { background: linear-gradient(90deg, var(--series-1), color-mix(in srgb, var(--series-1) 55%, transparent)); }
.pyramid .py-bar b { position: absolute; font: 600 10.5px var(--type-mono); color: var(--fg-muted); }
.pyramid .py-bar.f b { inset-inline-start: 4px; } .pyramid .py-bar.m b { inset-inline-end: 4px; }

/* ---------- Risk rule card: readable logic ---------- */
.rule-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--elev-sm); }
.rule-card .rc-who { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rule-card .rc-who b { font-size: 13.5px; }
.rule-card .rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rule-card .rc-head b { display: block; font-size: 14.5px; margin-top: 2px; }
.rc-logic { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-logic li { display: inline-flex; align-items: center; gap: 6px; }
.rc-and { font: 700 10px var(--type-mono); color: var(--fg-faint); }
.rc-cond { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 8px 10px; border-radius: 8px; font-size: 12.5px; background: var(--surface-3); border: 1px solid var(--line); }
.rc-cond i { font-style: normal; color: var(--fg-faint); font-family: var(--type-mono); font-size: 11px; }
.rc-logic li[data-matched="yes"] .rc-cond { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.rc-tick { font-weight: 800; color: var(--warn); }
.rule-card .rc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--fg-muted); padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Booking party ---------- */
.party { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--surface-solid); border: 1px solid var(--line); }
.party .pt-head { display: flex; align-items: center; gap: 8px; }
.party .pt-head .status { margin-inline-start: auto; }
.party .pt-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.party .pt-flags .fi { width: 18px; height: 13.5px; }

/* Short laptop screens: compact record headers */
@media (min-width: 1024px) and (max-height: 860px) {
  .flight-board { padding: 12px 18px; gap: 12px 24px; }
  .flight-board .fb-end b .flap { font-size: 22px; }
  .lifecycle .lc-dot { width: 30px; height: 30px; }
  .lifecycle li::before { top: 14px; }
  .lifecycle li { font-size: 12px; gap: 2px; }
}

} /* @layer components */
