/* الكرت الإلكتروني وصفحة الحفظ — Pioneers International */
:root {
    --navy: #111C5E;
    --navy-2: #0B1442;
    --ink: #0F1430;
    --signal: #F5B700;
    --mist: #EEF1F8;
    --line: #DDE2EE;
    --muted: #5A6178;
    --font: 'Readex Pro', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* إخفاء النصوص حسب اللغة المختارة */
body[data-lang="ar"] [data-l]:not([data-l="ar"]),
body[data-lang="en"] [data-l]:not([data-l="en"]),
body[data-lang="zh"] [data-l]:not([data-l="zh"]) { display: none !important; }

/* مبدّل اللغة */
.langs { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px; }
.langs button { font: inherit; font-size: 13px; border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; }

/* ------------------------------------------------ صفحة الكرت (للموظف) */
.stage { min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 80% at 50% 0%, #1B2A7A 0%, var(--navy-2) 55%, #070C2A 100%);
         color: #fff; display: flex; flex-direction: column; align-items: center; padding: max(18px, env(safe-area-inset-top)) 16px 24px; }
.stage .top { width: 100%; max-width: 380px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stage .langs { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.stage .langs button { color: rgba(255,255,255,.75); }
.stage .langs button.on { background: #fff; color: var(--navy); font-weight: 500; }
.stage .close { color: rgba(255,255,255,.7); font-size: 13px; padding: 8px 4px; }

.card { position: relative; width: min(88vw, 360px); aspect-ratio: 54 / 86; border-radius: 22px; overflow: hidden;
        background: linear-gradient(160deg, #18257A 0%, var(--navy) 38%, #0C1446 100%);
        box-shadow: 0 30px 60px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.08) inset;
        display: flex; flex-direction: column; padding: 26px 24px 22px; }
.card::before { content: ''; position: absolute; width: 140%; aspect-ratio: 1; border-radius: 50%; top: -78%; inset-inline-end: -62%;
                background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,0) 62%); pointer-events: none; }
.card::after { content: ''; position: absolute; inset: 0; pointer-events: none;
               background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 1px, transparent 1px 14px); }
.card > * { position: relative; z-index: 1; }
.card .logo { height: 22px; width: auto; align-self: flex-start; }
.card .co { margin-top: 8px; font-size: 10.5px; letter-spacing: .02em; color: rgba(255,255,255,.62); line-height: 1.45; }
.card .accent { width: 38px; height: 3px; border-radius: 2px; background: var(--signal); margin: 22px 0 14px; }
.card .name { font-size: clamp(22px, 6.6vw, 27px); font-weight: 600; line-height: 1.25; margin: 0; text-wrap: balance; }
.card .title { font-size: 14px; color: var(--signal); margin-top: 6px; font-weight: 400; }
.card .rows { margin-top: 18px; display: grid; gap: 9px; font-size: 13px; }
.card .rows a { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.92); min-width: 0; }
.card .rows i { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
                background: rgba(255,255,255,.08); font-size: 13px; color: var(--signal); }
.card .rows span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .qr { margin-top: auto; display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.card .qr .code { width: 96px; height: 96px; flex: none; background: #fff; border-radius: 14px; padding: 9px; }
.card .qr .code svg { width: 100%; height: 100%; display: block; }
.card .qr .code > div { width: 100%; height: 100%; }
.card .qr p { margin: 0; font-size: 12px; line-height: 1.55; color: rgba(255,255,255,.75); }
.card .qr b { display: block; color: #fff; font-weight: 500; font-size: 13px; margin-bottom: 2px; }
.stage .hint { margin-top: 18px; font-size: 12px; color: rgba(255,255,255,.55); text-align: center; max-width: 320px; line-height: 1.6; }

/* ------------------------------------------------ قفل الكرت */
.lock { width: 100%; max-width: 360px; margin: auto 0; text-align: center; }
.lock .logo { height: 24px; margin-bottom: 34px; }
.lock .ico { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 18px; display: grid; place-items: center;
             background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 26px; color: var(--signal); }
.lock h1 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.lock p { font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.7; margin: 0 0 22px; }
.lock input { width: 100%; font: inherit; font-size: 18px; text-align: center; letter-spacing: .12em; padding: 14px; border-radius: 14px;
              border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; outline: none; }
.lock input:focus { border-color: var(--signal); background: rgba(255,255,255,.1); }
.lock .btn { display: block; width: 100%; margin-top: 12px; font: inherit; font-size: 16px; font-weight: 500; padding: 14px; border: 0;
             border-radius: 14px; background: var(--signal); color: var(--ink); cursor: pointer; }
.lock .err { background: rgba(220,53,69,.18); border: 1px solid rgba(220,53,69,.45); color: #ffd6da; border-radius: 12px; padding: 10px; font-size: 13px; margin-bottom: 14px; }
.lock .back { display: inline-block; margin-top: 22px; font-size: 13px; color: rgba(255,255,255,.6); }
.lock .qr-open { width: 150px; margin: 4px auto 0; background: #fff; border-radius: 16px; padding: 12px; }
.lock .qr-open svg { width: 100%; height: auto; display: block; }

/* ------------------------------------------------ صفحة الحفظ (العامة) */
.pub { background: var(--mist); color: var(--ink); min-height: 100vh; min-height: 100dvh; }
.pub .head { background: radial-gradient(120% 100% at 50% 0%, #1B2A7A 0%, var(--navy) 50%, var(--navy-2) 100%); color: #fff;
             padding: max(18px, env(safe-area-inset-top)) 20px 64px; position: relative; overflow: hidden; }
.pub .head::after { content: ''; position: absolute; inset: 0; pointer-events: none;
                    background: repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 1px, transparent 1px 14px); }
.pub .head > * { position: relative; z-index: 1; }
.pub .bar { max-width: 460px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.pub .bar img { height: 20px; }
.pub .langs { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.pub .langs button { color: rgba(255,255,255,.78); padding: 6px 12px; font-size: 12.5px; }
.pub .langs button.on { background: #fff; color: var(--navy); font-weight: 500; }
.pub .who { max-width: 460px; margin: 44px auto 0; text-align: center; }
.pub .mono { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center;
             background: linear-gradient(160deg, #1B2A7A 0%, var(--navy) 55%, var(--navy-2) 100%);
             border: 1px solid rgba(255,255,255,.18); box-shadow: 0 12px 30px -10px rgba(0,0,0,.55);}
.pub .mono img { width: 68px; height: auto; }
.pub .who h1 { font-size: 26px; font-weight: 600; margin: 0; line-height: 1.3; text-wrap: balance; }
.pub .who .title { color: var(--signal); font-size: 15px; margin-top: 6px; }
.pub .who .co { color: rgba(255,255,255,.65); font-size: 12.5px; margin-top: 8px; line-height: 1.5; }
.pub main { max-width: 460px; margin: -40px auto 0; padding: 0 16px 40px; position: relative; z-index: 2; }
.pub .save { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px; border-radius: 18px;
             background: var(--signal); color: var(--ink); font-size: 17px; font-weight: 600; border: 0;
             box-shadow: 0 14px 30px -12px rgba(245,183,0,.7); }
.pub .save i { font-size: 20px; }
.pub .tip { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 20px; }
.pub .list { background: #fff; border-radius: 20px; padding: 6px; box-shadow: 0 6px 24px -12px rgba(17,28,94,.25); }
.pub .list h2 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 10px 14px 4px; letter-spacing: .02em; }
.pub .item { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 14px; }
.pub .item:active { background: var(--mist); }
.pub .item + .item { border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.pub .item .ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--mist);
                 color: var(--navy); font-size: 18px; }
.pub .item .tx { min-width: 0; flex: 1; }
.pub .item small { display: block; font-size: 11.5px; color: var(--muted); }
.pub .item b { display: block; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub .item .go { color: #A5ACC2; font-size: 14px; }
.pub footer { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 26px; line-height: 1.7; }
body[dir="rtl"] .flip { transform: scaleX(-1); }
