/* Qayd theme */
:root { --bg: #07130f; --bg-2: #0b1b16; --acc: #19c39c; --acc-2: #3b82f6; --muted: #93a8a0; }
.ar { font-family: var(--arabic); font-weight: 700; color: var(--acc); font-size: .95rem; }

/* Live invoice flow */
.flow__in { display: grid; gap: 14px; padding: 16px; }
.inv { position: relative; padding: 16px; border-radius: 16px; background: #f6fbf9; color: #0d1f19; box-shadow: 0 20px 40px -24px rgba(0,0,0,.7); transition: transform .5s var(--ease), opacity .4s; }
.inv.is-out { transform: translateX(30px) rotate(2deg); opacity: 0; }
.inv.is-in0 { transform: translateX(-30px) rotate(-2deg); opacity: 0; }
.inv__head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.inv__head b { display: block; font-size: .95rem; }
.inv__head span { font-size: .78rem; color: #4d6a60; }
.badge { padding: 4px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; background: #e2ebe7; color: #4d6a60; transition: background-color .3s, color .3s; }
.badge.is-busy { background: #fff3d6; color: #8a5a00; }
.badge.is-ok { background: #d5f6ea; color: #0b7a59; animation: pop .5s var(--spring); }
@keyframes pop { from { transform: scale(.6); } }
.inv__lines { display: grid; gap: 6px; margin: 12px 0; min-height: 84px; }
.inv__lines li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed #d4e2dc; font-size: .82rem; animation: lineIn .45s var(--ease) both; }
.inv__lines li span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
@keyframes lineIn { from { opacity: 0; transform: translateY(6px); } }
.inv__foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.inv__tot { display: grid; justify-items: end; font-size: .78rem; color: #4d6a60; }
.inv__tot b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.inv__qr { display: grid; justify-items: center; gap: 2px; opacity: 0; transform: scale(.6); transition: opacity .4s, transform .5s var(--spring); }
.inv__qr svg { width: 44px; height: 44px; }
.inv__qr rect { fill: #0d1f19; }
.inv__qr span { font-family: var(--arabic); font-size: .55rem; color: #4d6a60; }
.inv.has-qr .inv__qr { opacity: 1; transform: none; }
.pipe { display: grid; gap: 6px; }
.pipe li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--stroke); color: var(--muted); font-size: .86rem; transition: border-color .3s, background-color .3s, color .3s; }
.pipe li i { flex: none; position: relative; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); }
.pipe li.is-busy { color: var(--fg); border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
.pipe li.is-busy i { border-color: var(--acc); border-right-color: transparent; animation: spin .8s linear infinite; }
.pipe li.is-done { color: var(--fg); background: color-mix(in srgb, var(--acc) 8%, transparent); }
.pipe li.is-done i { border-color: var(--acc); background: var(--acc); }
.pipe li.is-done i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #04120d; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.flow__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 16px; border-top: 1px solid var(--stroke); font-size: .82rem; color: var(--muted); }
.flow__foot > b { color: var(--fg); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.flow__ok { margin-left: auto; }
.flow__ok b { color: var(--acc); }

/* Deadline checker */
.checker { max-width: 980px; margin: 0 auto; display: grid; gap: 26px; }
.checker__in { display: grid; gap: 18px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(0,0,0,.2); }
.seg2 button { min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; transition: background-color .3s, color .3s; }
.seg2 button[aria-pressed="true"] { background: var(--acc); color: #04120d; }
.rev { display: grid; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.rev span { display: flex; justify-content: space-between; }
.rev output { color: var(--fg); font-weight: 800; }
.rev input { --fill: 40%; width: 100%; height: 30px; margin: 0; background: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.rev input::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--acc) var(--fill), rgba(255,255,255,.12) var(--fill)); }
.rev input::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--acc) var(--fill), rgba(255,255,255,.12) var(--fill)); }
.rev input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 4px solid var(--acc); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.rev input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--acc); }
.verdict { padding: 18px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 18%, transparent), color-mix(in srgb, var(--acc-2) 12%, transparent)); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); }
.verdict__tag { display: inline-block; padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,.25); font-size: .76rem; font-weight: 800; color: var(--acc); }
.verdict__big { margin-top: 8px; font-size: clamp(2.6rem, 10vw, 4rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.verdict__big b { font-variant-numeric: tabular-nums; }
.verdict__txt { margin-top: 8px; color: var(--fg); }
.timeline { position: relative; display: grid; gap: 14px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--stroke); }
.timeline::after { content: ""; position: absolute; left: 8px; top: 6px; width: 2px; height: calc((100% - 12px) * var(--p, 0)); background: linear-gradient(var(--acc), var(--acc-2)); transition: height 1.2s var(--ease); }
.timeline li { position: relative; display: grid; gap: 2px; animation: lineIn .5s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--stroke); z-index: 1; }
.timeline li.is-past::before { background: var(--acc); border-color: var(--acc); }
.timeline li.is-you::before { border-color: var(--acc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 25%, transparent); }
.timeline b { font-size: .95rem; }
.timeline span { color: var(--muted); font-size: .88rem; }
.timeline li.is-you b { color: var(--acc); }
.checker__note { color: var(--muted); font-size: .8rem; }

/* Bento extras */
.caught { margin-top: 18px; }
.caught__bars { display: flex; align-items: end; gap: 4px; height: 90px; }
.caught__bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(var(--acc), color-mix(in srgb, var(--acc) 30%, transparent)); height: calc(var(--h) * 1%); transform: scaleY(0); transform-origin: bottom; transition: transform .8s var(--ease) calc(var(--i) * 25ms); }
.is-in .caught__bars i { transform: none; }
.caught p { margin-top: 10px; font-size: .86rem; }
.caught b { color: var(--fg); }
.bi { display: grid; gap: 6px; margin-top: 16px; }
.bi span { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); font-size: .88rem; }
.bi span[lang="ar"] { font-family: var(--arabic); text-align: right; direction: rtl; }

@media (min-width: 700px) {
  .flow__in { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .checker { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .checker__note { grid-column: 1 / -1; }
}
