/* DHN design-10 · inventory sign-in (login, OTP, sign-out). Same as «نسخة 10 - الداخل/inventory/login.html». */
:root {
    --dhn-navy: #293b85; --dhn-navy-dk: #253679; --dhn-blue: #0899e0; --dhn-teal: #33cac6;
    --dhn-navy-soft: #e9ecf7; --dhn-teal-soft: #e2f6f5; --dhn-text: #1a1a1a; --dhn-muted: #6b6b76; --dhn-border: #e3e4ea;
    --dhn-bad: #b02a2a; --dhn-bad-bg: #fdecec; --dhn-ok: #17703f; --dhn-ok-bg: #e6f6ec;
    --dhn-shadow-lg: 0 2px 4px rgba(41,59,133,.06), 0 18px 44px rgba(41,59,133,.12);
    --dhn-font: 'Tajawal', Tahoma, sans-serif; --acc: #33cac6;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body.auth { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 600px 1fr; font-family: var(--dhn-font); font-size: 17px; line-height: 1.5; background: #f3f4fb; color: var(--dhn-text); -webkit-font-smoothing: antialiased; }
.auth a { color: inherit; text-decoration: none; }
.auth button, .auth input { font-family: inherit; }
.auth :focus-visible { outline: 3px solid var(--dhn-blue); outline-offset: 2px; }
.lat { font-feature-settings: "tnum"; direction: ltr; unicode-bidi: isolate; }

/* brand panel: logo / the star as an emblem / this system only */
.side { position: relative; overflow: hidden; color: #fff; padding: 40px 52px 34px; display: grid; grid-template-rows: auto 1fr auto;
    background: radial-gradient(560px 460px at 0% 100%, rgba(51,202,198,.20), rgba(51,202,198,0) 70%), radial-gradient(520px 420px at 100% 0%, rgba(8,153,224,.30), rgba(8,153,224,0) 70%), linear-gradient(180deg, #24357d, #1e2c6a); }
.side > * { position: relative; z-index: 1; }
.side .logo { height: 54px; width: auto; justify-self: start; display: block; }
.emb { display: grid; place-items: center; min-height: 0; }
.emb .lstar { position: relative; width: min(340px, 100%); aspect-ratio: 1; }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 700; color: rgba(255,255,255,.72); }
.eyebrow::before { content: ""; width: 36px; height: 2px; background: var(--acc); }
.side h1 { margin: 8px 0; font-size: 58px; font-weight: 800; line-height: 1.08; }
.side p { margin: 0; max-width: 440px; color: rgba(255,255,255,.78); font-size: 17px; font-weight: 500; line-height: 1.65; text-wrap: balance; }
.feats { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.feats li { padding-inline-end: 16px; font-size: 15px; font-weight: 700; line-height: 1.45; color: rgba(255,255,255,.92); text-wrap: balance; }
.feats li + li { padding-inline-start: 16px; border-inline-start: 1px solid rgba(255,255,255,.16); }
.feats li i { display: block; font-style: normal; font-size: 13.5px; color: var(--acc); margin-bottom: 4px; }

/* fine-line star */
.lstar { pointer-events: none; }
.lstar svg { width: 100%; height: 100%; overflow: visible; display: block; }
.lstar .g { fill: none; stroke: rgba(255,255,255,.13); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lstar .g.dash { stroke-dasharray: 2 6; }
.lstar .p { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.15; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.lstar .p.in { stroke: rgba(255,255,255,.24); }
.lstar .p.t { stroke: var(--dhn-teal); }
.lstar .c { fill: none; stroke: rgba(255,255,255,.6); stroke-width: 1.15; vector-effect: non-scaling-stroke; }
.lstar .spin { transform-origin: 0 0; }
@media (prefers-reduced-motion: no-preference) {
    .lstar .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
    .lstar.go .draw { animation: ls-draw var(--len, 2.4s) cubic-bezier(.2,.8,.2,1) var(--d, 0s) forwards; }
    .lstar.go .spin { animation: ls-spin 200s linear 2.6s infinite; }
    .box { animation: dhn-up .7s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes ls-draw { to { stroke-dashoffset: 0; } }
@keyframes ls-spin { to { transform: rotate(360deg); } }
@keyframes dhn-up { from { opacity: 0; transform: translateY(16px); } }

/* form side */
.main { display: grid; grid-template-rows: 58px 1fr auto; justify-items: center; padding: 40px 48px 36px; background: radial-gradient(700px 520px at 50% 45%, #fff, rgba(255,255,255,0) 70%); }
.top, .box, .foot { width: 100%; max-width: 460px; }
.top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.lang { display: inline-flex; height: 36px; padding: 3px; border-radius: 10px; border: 1px solid var(--dhn-border); background: #fff; }
.lang a { display: inline-flex; align-items: center; color: var(--dhn-muted); font-size: 13.5px; font-weight: 700; padding: 0 12px; border-radius: 7px; }
.lang a[aria-current="true"] { background: var(--dhn-navy); color: #fff; }
.center { width: 100%; display: grid; place-items: center; padding-bottom: 20px; }
.box { background: #fff; border-radius: 28px; box-shadow: var(--dhn-shadow-lg); border: 1px solid rgba(41,59,133,.06); padding: 32px 34px 28px; }
.bh { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.bh .tile { width: 54px; height: 54px; border-radius: 16px; background: var(--dhn-teal-soft); color: var(--dhn-navy); display: grid; place-items: center; flex-shrink: 0; }
.bh .tile svg { width: 26px; height: 26px; }
.bh h2 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; }
.bh .lead { color: var(--dhn-muted); font-size: 15px; font-weight: 500; }
.box form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; font-size: 15px; }
.input-ic { position: relative; }
.input-ic svg { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: #9a9aa6; width: 20px; height: 20px; pointer-events: none; }
.input { height: 52px; width: 100%; border: 1.5px solid var(--dhn-border); border-radius: 14px; background: #fff; padding: 0 16px; padding-inline-start: 46px; font-size: 17px; color: var(--dhn-text); }
.input:focus { outline: none; border-color: var(--dhn-navy); box-shadow: 0 0 0 4px var(--dhn-navy-soft); }
.help { font-size: 14px; color: var(--dhn-muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--dhn-navy); background: var(--dhn-navy); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer; box-shadow: 0 6px 16px rgba(41,59,133,.22); }
.btn:hover { background: var(--dhn-navy-dk); }
.link-btn { border: 0; background: none; padding: 0; color: var(--dhn-navy); font: 700 14px var(--dhn-font); cursor: pointer; }
.link-btn[disabled] { color: var(--dhn-muted); cursor: default; font-weight: 500; }
.msg { padding: 10px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; margin: -8px 0 16px; }
.msg.err { background: var(--dhn-bad-bg); color: var(--dhn-bad); }
.msg.ok { background: var(--dhn-ok-bg); color: var(--dhn-ok); }
/* Cloudflare Turnstile: the widget itself sits in the middle of its row */
.ts { display: flex; justify-content: center; align-items: center; min-height: 65px; }
.foot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding-top: 21px; font-size: 14px; line-height: 22px; color: #383e5c; font-weight: 600; }
.foot .nw, .foot bdi { white-space: nowrap; }

/* step 2: the code */
.back2 { display: inline-flex; align-items: center; gap: 6px; color: var(--dhn-navy); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.back2 svg { width: 18px; height: 18px; }
:root[dir="rtl"] .back2 svg { transform: scaleX(-1); }
.sent { margin: -10px 0 18px; color: var(--dhn-muted); font-size: 15px; }
.mask { direction: ltr; unicode-bidi: isolate; font-weight: 700; color: var(--dhn-text); }
.code-input { height: 62px; width: 100%; border: 1.5px solid var(--dhn-border); border-radius: 14px; text-align: center; direction: ltr; font: 800 28px var(--dhn-font); letter-spacing: .5em; padding-inline-start: .5em; color: var(--dhn-text); }
.code-input:focus { outline: none; border-color: var(--dhn-navy); box-shadow: 0 0 0 4px var(--dhn-navy-soft); }
.row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.row2 form { display: contents; }

/* tablet (iPad portrait / landscape): the brand panel shares the width so the card is never cut */
@media (min-width: 701px) and (max-width: 1100px) {
    body.auth { grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); }
    .side { padding: 32px 32px 28px; }
    .side .logo { height: 46px; }
    .side h1 { font-size: 42px; }
    .side p { font-size: 16px; }
    .feats { grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
    .feats li, .feats li + li { padding: 0; border: 0; display: flex; align-items: baseline; gap: 10px; }
    .feats li i { display: inline; margin: 0; }
    .main { padding: 32px 28px 28px; }
    .box { padding: 28px 26px 24px; }
}
@media (max-width: 700px) {
    body.auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .side { display: block; padding: 16px 16px 40px; }
    .side .logo { height: 40px; }
    .side .emb { position: absolute; inset: -60px auto auto -70px; width: 220px; height: 220px; opacity: .5; z-index: 0; }
    :root[dir="ltr"] .side .emb { inset: -60px -70px auto auto; }
    .emb .lstar { width: 220px; }
    .mid { margin-top: 18px; }
    .eyebrow { font-size: 14px; }
    .side h1 { font-size: 34px; margin: 4px 0 0; }
    .side p, .feats { display: none; }
    .main { display: flex; flex-direction: column; padding: 0 16px 18px; background: none; }
    .top { order: 3; margin-top: 16px; justify-content: center; }
    .center { place-items: start center; }
    .box { margin-top: -22px; padding: 22px 18px 20px; border-radius: 24px; }
    .bh { margin-bottom: 18px; } .bh .tile { width: 46px; height: 46px; } .bh h2 { font-size: 22px; }
    .foot { order: 4; margin-top: 12px; padding-top: 0; flex-direction: column; align-items: center; gap: 0; }
}

/* brand motif lines (sign-in panel) */
.side > .dhn-motif { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.dhn-motif svg { position: absolute; inset: -6% -8%; width: 116%; height: 112%; fill: none; stroke-width: 1; }
.dhn-motif .w1 { stroke: rgba(255,255,255,.06); }
.dhn-motif .w2 { stroke: rgba(51,202,198,.09); }
.side > .emb { z-index: 1; }

/* «الدعم الفني» on the sign-in: a quiet button in the top bar that opens the one support page (same in Injaz, Imdad, Munawaba). */
a.sup{text-decoration:none;display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border-radius:10px;border:1px solid var(--dhn-border);background:#fff;color:var(--dhn-navy);font:700 13.5px/1 var(--dhn-font);cursor:pointer;white-space:nowrap}
a.sup svg{width:17px;height:17px;flex-shrink:0}
