/* =====================================================================
   WUSOOL 360 — membership card kit (same design as www.wusool360.com/membership.html)
   Use with wusool-card.js + qr.js. Fonts: Montserrat + IBM Plex Sans Arabic (Google Fonts).
   ===================================================================== */
.mcard { --display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif; --arabic: 'IBM Plex Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif; }
.wcard-stage { perspective: 1400px; display: flex; justify-content: center; }
.mcard * { box-sizing: border-box; margin: 0; }
.mcard ul { padding: 0; }
/* ---- the card (reference: bilingual premium face, one colour per division) ---- */
.mcard { --cw: 360px; width: var(--cw); max-width: 100%; aspect-ratio: 1.6447; font-size: calc(var(--cw) / 40); position: relative; transform-style: preserve-3d; direction: ltr; text-align: left;
  --g1: #f6e2a8; --g2: #d9b56a; --g3: #a47b36; --gold-t: #e3c27e; --gold-d: #c9a564;
  --foil: linear-gradient(180deg, #f8e7b4 0%, #dcb86c 45%, #b58a3e 70%, #e9cd8a 100%);
  --card-bg: radial-gradient(130% 150% at 78% 8%, #8a3346 0%, #5e1c2c 42%, #2c0a14 100%); }
.mcard[data-div="ad"] { --card-bg: radial-gradient(130% 150% at 78% 8%, #237256 0%, #0f4634 42%, #04201a 100%); }
.mcard[data-div="bn"] { --card-bg: radial-gradient(130% 150% at 78% 8%, #8a3346 0%, #5e1c2c 42%, #2c0a14 100%); }
.mcard[data-div="cn"] { --card-bg: radial-gradient(130% 150% at 78% 8%, #5b43a0 0%, #33226a 42%, #130a30 100%); }
.mcard[data-div="st"] { --card-bg: radial-gradient(130% 150% at 78% 8%, #3a3a42 0%, #1b1b20 42%, #050506 100%); }
.mc-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.mcard.flipped .mc-inner { transform: rotateY(180deg); }
.mc-face { position: absolute; inset: 0; border-radius: 1.6em; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; color: var(--gold-t);
  background: var(--card-bg); font-family: var(--display); line-height: 1.2;
  box-shadow: inset 0 0 0 .32em #b8913f, inset 0 0 0 .44em rgba(255,236,190,.55), inset 0 0 0 .56em rgba(60,30,5,.35), 0 1.4em 3em rgba(0,0,0,.5); }
.mc-back { transform: rotateY(180deg); }
.mc-face [lang="ar"] { font-family: var(--arabic); letter-spacing: 0; }
.mc-wave { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(172deg, transparent 0 25%, rgba(255,255,255,.07) 25.3% 37%, transparent 37.3%),
  linear-gradient(-8deg, transparent 0 71%, rgba(255,255,255,.06) 71.3% 80%, transparent 80.3%),
  radial-gradient(60% 50% at 10% 25%, rgba(255,220,170,.10), transparent 70%); }
.mc-rosette { position: absolute; width: 26em; height: auto; right: -4em; bottom: -7em; opacity: .1; filter: grayscale(.3) brightness(1.6); pointer-events: none; }
.mc-rosette.back { left: -6em; right: auto; top: -6em; bottom: auto; opacity: .08; }
.mc-sheen { position: absolute; inset: -20%; pointer-events: none; background: linear-gradient(115deg, transparent 34%, rgba(255,236,190,.22) 46%, rgba(255,255,255,.08) 50%, transparent 60%); transform: translateX(calc(var(--mx, 25%) - 50%)); mix-blend-mode: screen; transition: transform .3s; }
.mc-head { position: absolute; left: 8%; top: 8.5%; display: flex; flex-direction: column; gap: .25em; }
.mc-kicker { font-size: .78em; font-weight: 500; letter-spacing: .06em; color: var(--gold-d); white-space: nowrap; }
.mc-title { font-size: 1.32em; font-weight: 800; letter-spacing: .02em; white-space: nowrap; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.mc-title i { font-style: normal; padding: 0 .1em; }
.mc-title [lang="ar"] { font-weight: 700; }
.mc-title.sm { font-size: 1.05em; }
.mc-logo { position: absolute; right: 6%; top: 7%; display: flex; align-items: center; gap: .55em; }
.mc-logo img { width: 5.2em; height: 5.2em; filter: drop-shadow(0 .2em .3em rgba(0,0,0,.4)); }
.mc-logo span { display: flex; flex-direction: column; line-height: 1.05; }
.mc-logo b { font-size: 1.32em; font-weight: 800; letter-spacing: .03em; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mc-logo b[lang="ar"] { font-size: 1.3em; }
.mc-tag { position: absolute; right: 6%; top: 32%; font-size: .64em; letter-spacing: .03em; color: var(--gold-d); white-space: nowrap; }
.mc-chip { position: absolute; left: 10.5%; top: 38.5%; width: 4.4em; height: 3.3em; border-radius: .55em; background: linear-gradient(135deg, #f7e3a6, #d4ae62 45%, #f1d68f 60%, #b8913f); box-shadow: inset 0 0 0 .06em rgba(90,60,10,.6), 0 .15em .3em rgba(0,0,0,.35); overflow: hidden; }
.mc-chip i { position: absolute; border: .06em solid rgba(110,75,20,.6); border-radius: .25em; }
.mc-chip .c1 { left: -.1em; top: 30%; width: 34%; height: 40%; border-left: 0; } .mc-chip .c2 { right: -.1em; top: 30%; width: 34%; height: 40%; border-right: 0; }
.mc-chip .c3 { left: 36%; top: -.1em; width: 28%; height: 32%; border-top: 0; } .mc-chip .c4 { left: 36%; bottom: -.1em; width: 28%; height: 32%; border-bottom: 0; }
.mc-chip .c5 { left: 36%; top: 30%; width: 28%; height: 40%; }
.mc-avatar { position: absolute; left: 9%; top: 57%; width: 5.9em; height: 5.9em; border-radius: 50%; background: #1a0d10 center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 .3em #d4ae62, 0 0 0 .38em rgba(255,236,190,.6), 0 .5em 1em rgba(0,0,0,.45); font-weight: 700; font-size: 1em; color: var(--g1); }
.mc-avatar span { font-size: 1.6em; letter-spacing: .04em; }
.mc-avatar.has-photo span { display: none; }
.mc-person { position: absolute; left: 27.5%; top: 39%; right: 26%; display: flex; flex-direction: column; gap: .32em; }
.mc-name { font-size: 1.02em; font-weight: 800; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mc-name-ar { font-size: .98em; font-weight: 600; color: var(--gold-t); text-align: left; min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-row { font-size: .72em; font-weight: 500; letter-spacing: .04em; color: var(--gold-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-row b { color: var(--g1); font-weight: 800; }
.mc-row span:not([lang]) { color: var(--gold-t); }
.mc-row.mc-mid { margin-top: .6em; font-size: .78em; }
.mc-row.mc-mid b { font-size: 1.25em; letter-spacing: .03em; }
.mc-qr { position: absolute; right: 9%; top: 42%; width: 6.2em; height: 6.2em; padding: .35em; border-radius: .55em; background: linear-gradient(135deg, #f8e7b4, #dcb86c 55%, #f1d68f); box-shadow: inset 0 0 0 .08em rgba(110,75,20,.55), 0 .3em .7em rgba(0,0,0,.4); }
.mc-qr svg { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
.mc-support { position: absolute; left: 8.5%; bottom: 5.5%; display: flex; flex-direction: column; font-size: .74em; color: var(--gold-d); line-height: 1.25; }
.mc-eco { position: absolute; right: 6%; bottom: 5.5%; display: flex; flex-direction: column; align-items: flex-end; font-size: .74em; color: var(--gold-d); line-height: 1.2; letter-spacing: .03em; }
.mc-stripe { position: absolute; left: 0; right: 0; top: 9%; height: 13%; background: linear-gradient(180deg, #120709, #24120f 50%, #0b0405); box-shadow: inset 0 .1em 0 rgba(255,236,190,.15); }
.mc-bhead { position: absolute; left: 8%; top: 27%; display: flex; flex-direction: column; gap: .2em; }
.mc-perks { position: absolute; left: 8%; right: 34%; top: 44%; list-style: none; display: flex; flex-direction: column; gap: .5em; }
.mc-perks li { display: flex; flex-direction: column; padding-left: 1.1em; position: relative; }
.mc-perks li::before { content: ""; position: absolute; left: 0; top: .35em; width: .5em; height: .5em; border-radius: 50%; background: var(--foil); }
.mc-perks b { font-size: .74em; font-weight: 700; color: var(--g1); letter-spacing: .02em; }
.mc-perks span { font-size: .7em; color: var(--gold-d); text-align: left; direction: rtl; unicode-bidi: plaintext; }
.mc-eco4 { position: absolute; right: 7%; top: 28%; display: grid; grid-template-columns: repeat(2, 2.4em); gap: .5em; justify-items: center; }
.mc-eco4 .mc-dm { width: 2.4em; height: 2.4em; }
.mc-eco4 > span { grid-column: 1 / -1; font-size: .5em; letter-spacing: .1em; color: var(--gold-d); white-space: nowrap; }
.mc-sign { position: absolute; right: 7%; top: 60%; width: 25%; display: flex; flex-direction: column; gap: .2em; }
.mc-sign span { font-size: .46em; letter-spacing: .06em; color: var(--gold-d); white-space: nowrap; }
.mc-sign i { display: block; height: 2.2em; border-radius: .25em; background: repeating-linear-gradient(135deg, #f3ead6 0 .3em, #e9dcbc .3em .6em); color: #2a1d10; font: italic 600 .9em/2.4em 'Brush Script MT', 'Segoe Script', cursive; padding: 0 .5em; white-space: nowrap; overflow: hidden; }
.mc-legal { position: absolute; left: 8%; right: 7%; bottom: 14%; font-size: .5em; color: rgba(227,194,126,.75); line-height: 1.35; }
.mc-legal [lang="ar"] { display: block; }
.mc-bfoot { position: absolute; left: 8%; right: 7%; bottom: 5.5%; display: flex; justify-content: space-between; gap: 1em; font-size: .66em; color: var(--gold-d); padding-top: .5em; border-top: .06em solid rgba(217,181,106,.35); }
.mc-dm { flex: none; }

/* ---- added for the ERP: two more divisions, QR caption, specimen mark, validity line ---- */
.mcard[data-div="ai"] { --card-bg: radial-gradient(130% 150% at 78% 8%, #1d7f88 0%, #0c4c55 42%, #021c21 100%); }
.mcard[data-div="in"] { --card-bg: radial-gradient(130% 150% at 78% 8%, #3a54b8 0%, #1d2b72 42%, #080e30 100%); }
.mcard { cursor: default; }
.mcard.can-flip { cursor: pointer; }
.mc-qr-cap { position: absolute; right: 9%; top: calc(42% + 12.9em); width: 11.9em; font-size: .52em; line-height: 1.3; letter-spacing: .08em; color: var(--gold-t); white-space: nowrap; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mc-qr-cap span { letter-spacing: 0; font-family: var(--arabic); }
.mc-spec { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .6em; pointer-events: none; z-index: 5; transform: rotate(-18deg); }
.mc-spec[hidden] { display: none; }
.mc-spec span { font-size: 2.6em; font-weight: 800; letter-spacing: .14em; color: rgba(255,240,200,.32); border: .06em solid rgba(255,240,200,.32); padding: .05em .35em; border-radius: .2em; }
.mc-spec span[lang="ar"] { letter-spacing: 0; font-family: var(--arabic); }
.mc-valid { position: absolute; right: 7%; top: 73.5%; font-size: .56em; letter-spacing: .05em; color: var(--gold-t); white-space: nowrap; text-align: right; }
.mc-valid b { color: var(--g1); }
.mc-valid:empty { display: none; }

/* ---- card + details panel (ERP member page, card queue) ---- */
.wcard-panel { display: grid; grid-template-columns: minmax(0, auto) minmax(220px, 1fr); gap: 20px; align-items: start; }
.wcard-panel .wcard-side { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.wcard-panel .wcard-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wcard-btns button, .wcard-btns a { font: 600 .82rem/1 system-ui, sans-serif; border: 1px solid #d9cfb8; background: #fff; color: #08152c; border-radius: 999px; padding: 8px 14px; cursor: pointer; text-decoration: none; }
.wcard-btns button:hover, .wcard-btns a:hover { border-color: #d8b46a; }
.wcard-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font: 14px/1.35 system-ui, sans-serif; }
.wcard-facts div { background: #faf7ef; border: 1px solid #eadfc6; border-radius: 10px; padding: 9px 11px; min-width: 0; }
.wcard-facts small { display: block; color: #6b6352; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.wcard-facts b { display: block; color: #08152c; font-size: 15px; overflow-wrap: anywhere; }
.wcard-facts b[dir="rtl"] { font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif; }
.wcard-steps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 0; font: 600 12px/1 system-ui, sans-serif; }
.wcard-steps li { padding: 7px 10px; border-radius: 999px; background: #eef0f4; color: #5b6577; }
.wcard-steps li.done { background: #e3f4e8; color: #1d6b3a; }
.wcard-steps li.now { background: #08152c; color: #f2dba0; }
@media (max-width: 860px) { .wcard-panel { grid-template-columns: minmax(0, 1fr); } }

/* ---- printing: true CR80 size (85.6 x 54 mm) ---- */
.print-card { width: 85.6mm; height: 54mm; overflow: hidden; position: relative; break-inside: avoid; }
.print-card .mcard { --cw: 85.6mm; width: 85.6mm; height: 54mm; aspect-ratio: auto; max-width: none; transform: none !important; }
.print-card .mc-inner { transform: none !important; }
.print-card .mc-face { border-radius: 0; box-shadow: inset 0 0 0 .32em #b8913f, inset 0 0 0 .44em rgba(255,236,190,.55), inset 0 0 0 .56em rgba(60,30,5,.35); }
.print-card .mc-back { transform: none; }
.print-card.show-front .mc-back, .print-card.show-back .mc-front { display: none; }
.print-card .mc-sheen { display: none; }
.print-card .mc-title, .print-card .mc-name, .print-card .mc-logo b { background: none; color: #ecd08e; -webkit-text-fill-color: #ecd08e; }
.print-card .mc-perks li::before { background: #d9b56a; }
@media print { .mcard, .mcard * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
