/* INFOGRAPHICS WORLD — Order platform (public wizard + admin) */
:root {
  --bg: #0D0F10; --bg2: #141618; --bg3: #1B1E22; --card: #15181B; --card2: #1C2024;
  --line: #24282D; --line2: #323840;
  --tx: #FFFFFF; --tx2: #A6ADB5; --tx3: #6F7680;
  --or: #FF6B00; --or2: #E05E00; --or-soft: rgba(255, 107, 0, .12); --or-line: rgba(255, 107, 0, .45);
  --ok: #2BB673; --ok-soft: rgba(43, 182, 115, .14); --warn: #F2B01E; --bad: #FF5A5F; --bad-soft: rgba(255, 90, 95, .12);
  --wa: #25D366; --wa2: #1FB457;
  --r1: 8px; --r2: 12px; --r3: 18px;
  --font: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font-family: var(--font); line-height: 1.7; font-size: 16px; min-height: 100vh; }
body.public { background: radial-gradient(900px 500px at 85% -10%, rgba(255, 107, 0, .10), transparent 60%), var(--bg); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--tx2); }
.small { font-size: .85rem; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r2);
  padding: 11px 22px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, transform .2s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--or); color: #fff; }
.btn.primary:hover { background: var(--or2); }
.btn.ghost { background: transparent; border-color: var(--line2); color: var(--tx); }
.btn.ghost:hover { border-color: var(--tx3); background: var(--bg3); }
.btn.wa { background: var(--wa); color: #06210f; }
.btn.wa:hover { background: var(--wa2); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: rgba(255, 90, 95, .35); }
.btn.sm { padding: 7px 14px; font-size: .9rem; border-radius: var(--r1); }
.btn.big { padding: 15px 30px; font-size: 1.08rem; }
.bicon { width: 18px; height: 18px; display: inline-flex; flex: none; }
.bicon svg { width: 100%; height: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--or); cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--bad); }

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); background: rgba(13, 15, 16, .85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.brand img { height: 52px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.link-muted { color: var(--tx2); text-decoration: none; font-size: .92rem; }
.link-muted:hover { color: var(--tx); }
.lang { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; padding: 3px 12px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .82rem; color: var(--tx2); }
.lang button.on { background: var(--or); color: #fff; }

/* ---------- intro ---------- */
.intro { padding: 44px 0 26px; max-width: 700px; }
.eyebrow { color: var(--or); font-weight: 800; letter-spacing: .04em; margin: 0 0 8px; font-size: .9rem; }
.intro h1 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); font-weight: 800; margin-bottom: 12px; }
.lead { color: var(--tx2); font-size: 1.06rem; margin: 0; }
.notice { border: 1px solid var(--or-line); background: var(--or-soft); color: var(--tx); border-radius: var(--r2); padding: 12px 16px; margin-bottom: 18px; }
.notice.warn { border-color: rgba(255, 90, 95, .4); background: var(--bad-soft); }

/* ---------- wizard ---------- */
.wizard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r3); padding: 26px; margin-bottom: 40px; scroll-margin-top: 80px; }
.steps { --progress: 0%; list-style: none; margin: 0 0 26px; padding: 0 0 18px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; position: relative; border-bottom: 1px solid var(--line); }
.steps::after { content: ''; position: absolute; bottom: -1px; inset-inline-start: 0; height: 2px; width: var(--progress); background: var(--or); transition: width .4s var(--ease); }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--tx3); font-size: .86rem; font-weight: 700; min-width: 0; }
.steps li .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); font-size: .8rem; flex: none; }
.steps li .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps li.now { color: var(--tx); }
.steps li.now .n { background: var(--or); border-color: var(--or); color: #fff; }
.steps li.past { color: var(--tx2); cursor: pointer; }
.steps li.past .n { border-color: var(--or-line); color: var(--or); }
#stage h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 18px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile { display: flex; align-items: center; gap: 14px; text-align: start; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2);
  padding: 16px; cursor: pointer; transition: border-color .2s, background .2s, transform .25s var(--ease); min-height: 84px; }
.tiles.two .tile { padding: 22px; min-height: 120px; }
.tile:hover { border-color: var(--line2); background: var(--card2); transform: translateY(-2px); }
.tile.on { border-color: var(--or); background: var(--or-soft); }
.ticon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--bg3); color: var(--or); }
.ticon svg { width: 24px; height: 24px; }
.tiles.two .ticon { width: 56px; height: 56px; }
.ttext { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ttext strong { font-size: 1.04rem; }
.tiles.two .ttext strong { font-size: 1.2rem; }
.tsub { color: var(--tx2); font-size: .9rem; line-height: 1.5; }
.tprice { color: var(--or); font-weight: 700; font-size: .86rem; white-space: nowrap; align-self: flex-start; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.flabel { font-weight: 700; font-size: .95rem; }
.req { color: var(--or); }
.field input, .field textarea, .field select, .input { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r1);
  padding: 11px 13px; transition: border-color .2s, background .2s; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { outline: none; border-color: var(--or); background: var(--bg3); }
.field input::placeholder, .field textarea::placeholder { color: var(--tx3); }
.field.bad input, .field.bad textarea { border-color: var(--bad); }
.ferr { color: var(--bad); font-size: .85rem; min-height: 0; }
.ferr:empty { display: none; }
.ferr.big { font-size: .95rem; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line2); background: var(--bg2); border-radius: 999px; padding: 7px 15px; cursor: pointer; font-size: .92rem; transition: all .15s; }
.chip:hover { border-color: var(--tx3); }
.chip.on { background: var(--or-soft); border-color: var(--or); color: #fff; }
.field.bad .chips .chip { border-color: rgba(255, 90, 95, .5); }

.files { display: flex; flex-direction: column; gap: 8px; }
.files:empty { display: none; }
.file { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r1); padding: 8px 12px; }
.file .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field .btn.sm { align-self: flex-start; }

.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.est-pill { color: var(--tx2); font-size: .88rem; border: 1px dashed var(--line2); border-radius: 999px; padding: 4px 12px; text-align: center; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

.estimate { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--or-line); background: var(--or-soft); border-radius: var(--r2); padding: 14px 18px; margin-bottom: 18px; }
.estimate strong { font-size: 1.45rem; color: var(--tx); }
.summary { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.srow { display: grid; grid-template-columns: 190px 1fr auto; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: start; }
.srow:last-child { border-bottom: 0; }
.srow:nth-child(odd) { background: var(--bg2); }
.srow dt { color: var(--tx2); font-size: .9rem; }
.srow dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.srow .link { font-size: .82rem; }

.done { background: var(--card); border: 1px solid var(--line); border-radius: var(--r3); padding: 40px 24px; text-align: center; margin-bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; scroll-margin-top: 80px; }
.done h2 { font-size: 1.6rem; }
.done .lead { max-width: 520px; margin: 8px 0 14px; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.check svg { width: 32px; height: 32px; stroke-width: 2.6; }
.code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.code { font-size: 1.7rem; font-weight: 800; letter-spacing: .06em; color: var(--or); font-family: ui-monospace, Consolas, monospace; }
.done > .link { margin-top: 12px; }

.foot { display: flex; justify-content: space-between; color: var(--tx3); font-size: .85rem; padding-bottom: 30px; gap: 12px; }
.foot a { color: var(--tx3); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 30px); background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r2);
  padding: 11px 18px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 100; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .wizard { padding: 18px 16px; border-radius: var(--r2); }
  .steps { grid-template-columns: repeat(6, auto); justify-content: space-between; }
  .steps li .l { display: none; }
  .steps li.now .l { display: inline; }
  .grid { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 1fr auto; }
  .srow dt { grid-column: 1 / -1; }
  .srow dd { grid-column: 1; }
  .nav-row { flex-wrap: wrap; }
  .est-pill { order: -1; width: 100%; }
  .nav-row .btn { flex: 1; }
  .link-muted { display: none; }
  .intro { padding-top: 28px; }
  .tile .tprice { display: none; }
  .tile.has-price .tsub { display: block; }
}

/* ================================================================ ADMIN */
body.admin { background: var(--bg); }
.adm-top { position: sticky; top: 0; z-index: 30; background: rgba(13, 15, 16, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.adm-top-in { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px; max-width: 1500px; margin: 0 auto; }
.adm-top .brand img { height: 40px; }
.adm-title { font-weight: 800; }
.adm-tabs { display: flex; gap: 4px; margin-inline-start: 12px; }
.adm-tabs button { background: none; border: 0; padding: 8px 14px; border-radius: var(--r1); cursor: pointer; color: var(--tx2); font-weight: 700; position: relative; }
.adm-tabs button.on { color: var(--tx); background: var(--bg3); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--or); color: #fff; font-size: .75rem; font-weight: 800; margin-inline-start: 6px; }
.badge:empty { display: none; }
.adm-spacer { flex: 1; }
.adm-main { max-width: 1500px; margin: 0 auto; padding: 18px 16px 60px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 14px 16px; }
.stat .k { color: var(--tx2); font-size: .85rem; }
.stat .v { font-size: 1.6rem; font-weight: 800; line-height: 1.3; }
.stat .v small { font-size: .85rem; color: var(--tx2); font-weight: 500; }
.stat.hl { border-color: var(--or-line); background: linear-gradient(0deg, var(--or-soft), transparent); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; flex: 1 1 220px; max-width: 360px; }
.toolbar select.input { flex: 0 0 auto; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r1); overflow: hidden; }
.seg button { background: none; border: 0; padding: 7px 13px; cursor: pointer; color: var(--tx2); font-weight: 700; }
.seg button.on { background: var(--bg3); color: var(--tx); }

.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; padding-bottom: 10px; align-items: start; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2); display: flex; flex-direction: column; max-height: calc(100vh - 260px); min-height: 120px; min-width: 0; }
.col-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 10px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: .85rem; }
.col-h .st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.col-h .cnt { color: var(--tx2); font-weight: 700; }
.col-b { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.col.drop { border-color: var(--or); background: var(--or-soft); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r1); padding: 9px 10px; min-width: 0; cursor: pointer; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--line2); transform: translateY(-1px); }
.card.prio { border-inline-start: 3px solid var(--or); }
.card .c1 { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--tx2); }
.card .c1 .cc { font-family: ui-monospace, Consolas, monospace; color: var(--or); font-weight: 700; }
.card .c2 { font-weight: 700; margin: 2px 0; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.45; }
.card .c3 { font-size: .8rem; color: var(--tx2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--bg3); color: var(--tx2); }
.tag.web { background: rgba(80, 140, 255, .14); color: #8fb4ff; }
.tag.design { background: var(--or-soft); color: #ff9a4d; }
.tag.late { background: var(--bad-soft); color: var(--bad); }

.st { display: inline-block; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.st-new { background: var(--or-soft); color: #ff9a4d; }
.st-reviewing { background: rgba(242, 176, 30, .14); color: var(--warn); }
.st-quoted { background: rgba(160, 120, 255, .15); color: #b9a0ff; }
.st-in_progress { background: rgba(80, 140, 255, .14); color: #8fb4ff; }
.st-review { background: rgba(0, 200, 220, .13); color: #5fd9e8; }
.st-delivered { background: var(--ok-soft); color: var(--ok); }
.st-cancelled { background: var(--bg3); color: var(--tx3); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r2); }
table.list { width: 100%; border-collapse: collapse; min-width: 900px; }
table.list th, table.list td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
table.list th { color: var(--tx2); font-weight: 700; background: var(--bg2); position: sticky; top: 0; }
table.list tr { cursor: pointer; }
table.list tbody tr:hover { background: var(--bg2); }
.empty { text-align: center; color: var(--tx2); padding: 40px 10px; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(720px, 100%); background: var(--bg); border-inline-start: 1px solid var(--line); z-index: 51;
  display: flex; flex-direction: column; animation: slide .3s var(--ease); }
[dir="rtl"] .drawer { animation-name: slide-rtl; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes slide-rtl { from { transform: translateX(-40px); opacity: 0; } }
.dr-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dr-h .code { font-size: 1.15rem; letter-spacing: .03em; }
.dr-b { padding: 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 14px 16px; }
.box h3 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: .93rem; }
.kv dt { color: var(--tx2); }
.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.tight { gap: 6px; }
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.money label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--tx2); }
.money .rem { font-size: 1.2rem; font-weight: 800; color: var(--tx); padding-top: 6px; }
.timeline { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.tl { border-inline-start: 2px solid var(--line2); padding: 2px 12px 2px; font-size: .9rem; }
.tl.note { border-color: var(--or); }
.tl.whatsapp { border-color: var(--wa); }
.tl .meta { color: var(--tx3); font-size: .78rem; }
.tl .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumb { border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden; background: var(--bg2); text-decoration: none; display: flex; flex-direction: column; font-size: .78rem; }
.thumb img { width: 100%; height: 86px; object-fit: cover; background: #fff; }
.thumb .ph { height: 86px; display: grid; place-items: center; color: var(--tx2); }
.thumb .ph svg { width: 30px; height: 30px; }
.thumb span { padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx2); }

/* login + settings */
.auth { max-width: 400px; margin: 10vh auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r3); padding: 28px; }
.auth h1 { font-size: 1.35rem; margin: 14px 0 18px; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .brand img { height: 64px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.svc-table { width: 100%; border-collapse: collapse; }
.svc-table td, .svc-table th { padding: 6px; text-align: start; font-size: .88rem; }
.svc-table th { color: var(--tx2); }
.svc-table .input { padding: 7px 9px; }
.svc-table .num { width: 110px; }
.svc-table select.input { min-width: 84px; }
.tpl { border: 1px solid var(--line); border-radius: var(--r1); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl .input:first-child { grid-column: 1 / -1; }
.tpl textarea { min-height: 90px; resize: vertical; }
.check-line { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--or); }
.help { color: var(--tx2); font-size: .86rem; line-height: 1.7; }
.help code { background: var(--bg3); padding: 1px 6px; border-radius: 4px; direction: ltr; unicode-bidi: embed; }

@media (max-width: 760px) {
  .adm-top-in { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .adm-tabs { order: 3; width: 100%; margin: 0; }
  .adm-title { display: none; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dt { margin-top: 6px; }
  .money { grid-template-columns: 1fr 1fr; }
  .tpl { grid-template-columns: 1fr; }
  .col { max-height: none; }
}
.cc { font-family: ui-monospace, Consolas, monospace; color: var(--or); font-weight: 700; }
.paybox { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line2); border-inline-start: 3px solid var(--or); background: var(--bg2); border-radius: var(--r1); padding: 12px 14px; margin-bottom: 12px; font-size: .93rem; }
.paybox span { color: var(--tx2); }
.box.receipt-on { border-color: rgba(43, 182, 115, .45); }
.box > textarea.input { width: 100%; resize: vertical; }
.pays { margin-top: 12px; border-top: 1px solid var(--line); }
.pay-row { display: grid; grid-template-columns: 96px 90px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.pay-form { margin-top: 14px; padding: 12px; border: 1px dashed var(--or-line); border-radius: var(--r1); background: var(--or-soft); }
.money label.wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .pay-row { grid-template-columns: auto 1fr auto; } .pay-row > span:nth-child(3) { display: none; } }
.wide-note { grid-column: 1 / -1; margin: -6px 0 0; }
a.doc-row { text-decoration: none; color: inherit; border-radius: var(--r1); }
a.doc-row:hover { background: var(--bg2); }
.card .c1 > * { white-space: nowrap; }
.card .c1 > :last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.tag.ad { background: rgba(24, 119, 242, .15); color: #6ea8ff; }

/* ---------- v1.6: shorter wizard ---------- */
.grp { font-size: .95rem; color: var(--tx2); font-weight: 700; margin: 18px 0 10px; }
.grp:first-of-type { margin-top: 4px; }
.pkg-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--or-line); background: var(--or-soft); border-radius: var(--r2); padding: 12px 16px; margin-bottom: 16px; }
.pkg-banner strong { color: #fff; }
details.more { border: 1px dashed var(--line2); border-radius: var(--r2); margin-top: 16px; }
details.more > summary { cursor: pointer; list-style: none; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary strong::before { content: '+ '; color: var(--or); }
details.more[open] > summary strong::before { content: '− '; }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > .grid { padding: 16px; }
.sum-card { display: flex; flex-direction: column; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2); padding: 14px 16px; margin: 18px 0 6px; }
.sum-card .sum-price { color: var(--or); font-weight: 700; }

/* ---------- receipt ---------- */
.done { text-align: center; }
#receiptBox { width: 100%; max-width: 560px; margin: 18px auto 6px; }
.receipt { background: #fff; color: #14171A; border-radius: 16px; padding: 24px 22px 16px; text-align: start; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); font-family: var(--font); }
.r-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 2px solid #14171A; }
.r-logo { width: 64px; height: auto; background: #0D0F10; border-radius: 10px; padding: 6px; }
.r-head h3 { margin: 0 0 4px; font-size: 1.25rem; color: #14171A; }
.r-status { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #EEF1F4; color: #4A5560; }
.r-status.pay { background: #FFF1E6; color: #C24E00; }
.r-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.r-meta > div { background: #F4F6F8; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.r-meta span { font-size: .78rem; color: #5B6670; }
.r-meta strong { font-size: 1.05rem; letter-spacing: .3px; }
.r-rows { margin: 0 0 14px; }
.rrow { display: flex; justify-content: space-between; gap: 16px; padding: 8px 2px; border-bottom: 1px dashed #DDE2E7; }
.rrow dt { color: #5B6670; font-size: .9rem; }
.rrow dd { margin: 0; font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.r-amount { background: #F4F6F8; border-radius: 12px; padding: 14px; }
.r-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.r-total span { color: #5B6670; }
.r-total strong { font-size: 1.35rem; }
.r-note { font-size: .88rem; color: #4A5560; margin: 8px 0 0; line-height: 1.7; }
.r-label { font-size: .85rem; font-weight: 800; color: #14171A; margin: 14px 0 8px; }
.plans { display: grid; gap: 8px; }
.plan { display: flex; align-items: center; gap: 10px; text-align: start; background: #fff; border: 1.5px solid #D5DBE1; border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: #14171A; }
.plan .dot { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid #A9B3BC; }
.plan.on { border-color: var(--or); background: #FFF6EF; }
.plan.on .dot { border-color: var(--or); background: radial-gradient(var(--or) 45%, transparent 50%); }
.plan .ptext { display: flex; flex-direction: column; }
.plan small { color: #5B6670; font-size: .8rem; }
.r-due { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; background: #14171A; color: #fff; border-radius: 10px; padding: 12px 14px; }
.r-due strong { font-size: 1.3rem; color: #FF8A33; }
.r-pay { margin-top: 14px; border: 1.5px solid #FFD2B0; border-radius: 12px; padding: 14px; }
.r-pay h4 { margin: 0 0 10px; font-size: 1rem; }
.r-acc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.r-acc span { color: #5B6670; font-size: .85rem; min-width: 110px; }
.r-acc strong { font-size: 1.02rem; letter-spacing: .4px; }
.copy { margin-inline-start: auto; border: 1px solid #D5DBE1; background: #fff; color: #14171A; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.r-meta .copy { position: absolute; top: 8px; inset-inline-end: 8px; }
.r-how { margin: 10px 0 0; padding-inline-start: 20px; font-size: .88rem; color: #33404A; line-height: 1.9; }
.r-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid #E3E7EB; font-size: .75rem; color: #8A949D; text-align: center; letter-spacing: .3px; }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 6px; }
@media (max-width: 480px) {
  .receipt { padding: 18px 14px 12px; }
  .r-meta { grid-template-columns: 1fr; }
  .r-actions .btn { width: 100%; justify-content: center; }
}
.ttext .tprice { margin-top: 4px; align-self: auto; }
.r-confirm { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #E9F8F0; color: #146C43; font-weight: 800; font-size: .9rem; }
.r-actions { width: 100%; max-width: 560px; }
.r-actions .btn { white-space: normal; text-align: center; line-height: 1.4; max-width: 100%; }
/* receipt states (v1.7) */
.receipt { position: relative; overflow: hidden; }
.r-status.ok { background: #E3F6EC; color: #146C43; }
.r-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; }
.r-line span { color: #5B6670; }
.r-line strong { font-size: 1.1rem; }
.r-line.good strong { color: #198754; }
.r-line.due strong { color: #C24E00; }
.r-pays { margin-top: 8px; border-top: 1px dashed #D5DBE1; }
.r-payrow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .9rem; }
.r-payrow span:first-child { color: #5B6670; }
.r-stamp { position: absolute; top: 16px; inset-inline-end: 12px; transform: rotate(-12deg); border: 3px solid #198754; color: #198754; border-radius: 9px;
  padding: 2px 10px; font-weight: 900; font-size: 1.05rem; letter-spacing: 1px; opacity: .85; pointer-events: none; }
.plan[disabled] { cursor: default; opacity: .9; }
.receipt-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px;
  border: 1px solid rgba(37, 211, 102, .45); background: rgba(37, 211, 102, .08); border-radius: var(--r2); }
.receipt-send > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.receipt-send.flash { animation: rsflash 1.2s ease 2; }
@keyframes rsflash { 50% { box-shadow: 0 0 0 4px rgba(37, 211, 102, .35); } }
.receipt.is-paid .r-head { padding-inline-end: 84px; }
.r-status { white-space: nowrap; }
.plan.fixed { cursor: default; }

/* ---------- v1.9 simplified order drawer ---------- */
.drawer.still, .drawer-bg.still { animation: none; }
.who { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.who-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.who-t strong { font-size: 1.15rem; }
.who-t a { text-decoration: none; }
.who-s { grid-column: 1; }
.who-wa { grid-row: 1 / span 2; grid-column: 2; }
.prio-star { color: var(--or); }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stages li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r1); background: var(--bg2); border: 1px solid var(--line); color: var(--tx3); font-weight: 700; font-size: .86rem; min-width: 0; }
.stages li .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); font-size: .75rem; flex: none; }
.stages li .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stages li.past { color: var(--tx2); }
.stages li.past .n { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.stages li.now { color: var(--tx); border-color: var(--or); background: var(--or-soft); }
.stages li.now .n { background: var(--or); border-color: var(--or); color: #fff; }
.stages.off { opacity: .45; }
.act { background: var(--card); border: 1px solid var(--or-line); border-radius: var(--r2); padding: 16px; box-shadow: 0 0 0 4px rgba(255, 107, 0, .05); }
.act h3 { font-size: 1.02rem; margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.act .help { margin: 6px 0 12px; }
.act-btn { padding: 12px 22px; font-size: 1rem; }
.act .receipt-send { margin: 0 0 14px; }
.act .receipt-send:last-child { margin: 14px 0 0; }
.price-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; }
.price-l { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--tx2); }
.big-in { font-size: 1.35rem; font-weight: 800; width: 200px; padding: 8px 12px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; padding-bottom: 10px; }
.chk input { width: 18px; height: 18px; accent-color: var(--or); }
.due { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.due b { font-size: 1.7rem; font-weight: 800; color: var(--tx); }
.warn-line { color: var(--warn); font-weight: 700; margin: 0 0 10px; }
details.opt { margin-top: 12px; }
details.opt > summary { cursor: pointer; color: var(--tx2); font-size: .88rem; font-weight: 700; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.opt > summary::-webkit-details-marker { display: none; }
details.opt > summary::before { content: '▸'; transition: transform .15s; }
[dir="rtl"] details.opt > summary::before { content: '◂'; }
details.opt[open] > summary::before { transform: rotate(-90deg); }
details.opt > :not(summary) { margin-top: 10px; }
details.msgs { margin: 0; padding: 0 4px; }
.tabs-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.dr-tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.dr-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 11px 10px; color: var(--tx2); font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; font-size: .92rem; }
.dr-tabs button.on { color: var(--tx); border-bottom-color: var(--or); }
.tab-panel { padding: 14px 16px; }
.tab-panel h4 { font-size: .95rem; margin: 16px 0 8px; }
.tab-panel textarea.input { width: 100%; resize: vertical; }
.dr-menu { position: relative; }
.dr-menu > summary { list-style: none; font-size: 1.1rem; line-height: 1; }
.dr-menu > summary::-webkit-details-marker { display: none; }
.dr-menu-p { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 5; width: 240px; background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r2); padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.dr-menu-p label { display: flex; flex-direction: column; gap: 4px; }
.tag.hint { background: rgba(242, 176, 30, .14); color: var(--warn); }
@media (max-width: 760px) {
  .stages { gap: 4px; }
  .stages li { padding: 6px; gap: 5px; font-size: .78rem; justify-content: center; }
  .stages li .n { display: none; }
  .act-btn { width: 100%; }
  .big-in { width: 100%; }
  .price-l { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .dr-h { flex-wrap: nowrap; padding: 12px; }
  .dr-h > .muted.small { display: none; }
}
/* drawer body scrolls; its sections keep their full height */
.dr-b { min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dr-b > * { flex-shrink: 0; }

/* ---------- v1.9.2 orders & settings: simpler layout ---------- */
.stats { grid-template-columns: repeat(4, 1fr); }
.toolbar .input.search { flex: 1 1 260px; max-width: 420px; }
.btn.icon { padding: 7px 11px; font-size: 1.05rem; line-height: 1; }
.nowrap { white-space: nowrap; }
.stage-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: none; }
.stage-chips::-webkit-scrollbar { display: none; }
.schip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2); color: var(--tx2); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.schip .cnt { background: var(--bg3); border-radius: 999px; padding: 0 7px; font-size: .78rem; color: var(--tx2); }
.schip.on { background: var(--or); border-color: var(--or); color: #fff; }
.schip.on .cnt { background: rgba(0, 0, 0, .25); color: #fff; }
.phone-list { display: flex; flex-direction: column; gap: 8px; }
.phone-list .card { padding: 12px 14px; }
.phone-list .card .c2 { font-size: 1rem; }
.empty-line { text-align: center; padding: 30px 0; }
.settings { max-width: 980px; }
.set-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; scrollbar-width: none; }
.set-tabs::-webkit-scrollbar { display: none; }
.set-tabs button { flex: none; background: var(--bg2); border: 1px solid var(--line); color: var(--tx2); font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.set-tabs button.on { background: var(--bg3); border-color: var(--or); color: var(--tx); }
@media (max-width: 760px) {
  .only-desk { display: none !important; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
  .stat { padding: 10px 12px; }
  .stat .v { font-size: 1.3rem; }
  .toolbar { flex-wrap: nowrap; gap: 6px; }
  .toolbar .input.search { flex: 1 1 auto; min-width: 0; max-width: none; }
  .toolbar select.input { width: 74px; padding-inline: 8px; }
  .adm-main { padding: 12px 12px 50px; }
}

/* ---------- v2.0 tracking ---------- */
.r-track { border: 1px solid rgba(43, 182, 115, .45); background: rgba(43, 182, 115, .08); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.r-track > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.r-track > div:first-child strong { font-size: 1.35rem; letter-spacing: .08em; font-family: ui-monospace, Consolas, monospace; }
.r-stages { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.r-stages li { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: #8a8f96; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .04); }
.r-stages li .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; border: 1px solid currentColor; flex: none; }
.r-stages li.past { color: #2BB673; }
.r-stages li.now { color: #fff; background: #FF6B00; }
.r-stages li.now .n { border-color: #fff; }
.r-note.warn { color: #b7791f; font-weight: 700; }
.track-form { display: flex; gap: 8px; max-width: 420px; margin: 16px auto 4px; }
.track-in { flex: 1; font-size: 1.25rem; text-align: center; letter-spacing: .1em; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.topbar-actions .btn.sm { padding: 6px 12px; }
@media (max-width: 520px) { .only-wide { display: none; } }

/* ---------- v2.0 admin: payment-first ---------- */
.st-pending { background: rgba(242, 176, 30, .14); color: var(--warn); }
.st-confirmed { background: rgba(160, 120, 255, .15); color: #b9a0ff; }
.track-chip { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; color: var(--ok); }
/* fixed prices are always visible on the service tiles */
.tile .tprice { display: inline-block !important; font-size: .95rem; }

/* ---------- v2.1 price list = main site packages ---------- */
.pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.pkg { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: start; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2);
  padding: 18px 16px 14px; cursor: pointer; color: var(--tx); font: inherit; transition: border-color .2s, background .2s, transform .25s var(--ease); }
.pkg:hover { border-color: var(--line2); transform: translateY(-2px); }
.pkg.star { border-color: var(--or-line); }
.pkg.on { border-color: var(--or); background: var(--or-soft); }
.pkg-badge { position: absolute; top: -10px; inset-inline-start: 14px; background: var(--or); color: #fff; font-size: .74rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.pkg-name { font-weight: 800; font-size: 1.08rem; }
.pkg-for { color: var(--tx2); font-size: .86rem; line-height: 1.5; }
.pkg-price { color: var(--tx2); font-size: .9rem; margin: 2px 0 4px; }
.pkg-price b { color: var(--or); font-size: 1.55rem; font-weight: 800; }
.pkg-feats { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed var(--line2); display: flex; flex-direction: column; gap: 5px; flex: 1; }
.pkg-feats li { font-size: .88rem; color: var(--tx); padding-inline-start: 20px; position: relative; line-height: 1.5; }
.pkg-feats li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 800; }
.pkg-cta { margin-top: 10px; text-align: center; border: 1px solid var(--line2); border-radius: var(--r1); padding: 7px; font-weight: 800; font-size: .9rem; }
.pkg.on .pkg-cta, .pkg:hover .pkg-cta { background: var(--or); border-color: var(--or); color: #fff; }
.xlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 8px; }
.xrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r1); padding: 12px 14px; cursor: pointer; color: var(--tx); font: inherit; text-align: start; }
.xrow:hover { border-color: var(--line2); }
.xrow.on { border-color: var(--or); background: var(--or-soft); }
.xname { font-weight: 700; }
.xprice { color: var(--tx2); font-size: .85rem; white-space: nowrap; }
.xprice b { color: var(--or); font-size: 1.05rem; }
.pkg-banner-price { color: var(--or); margin-inline-start: auto; white-space: nowrap; }
.pkg-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gtabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; scrollbar-width: none; }
.gtabs::-webkit-scrollbar { display: none; }
.gtab { flex: none; background: var(--bg2); border: 1px solid var(--line2); color: var(--tx2); font: inherit; font-weight: 700; font-size: .92rem; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.gtab.on { background: var(--or); border-color: var(--or); color: #fff; }
.pkg.quote { text-decoration: none; border-style: dashed; }
.pkg-cta.wa { background: var(--wa); border-color: var(--wa); color: #06210f; }
.pkg.quote:hover .pkg-cta.wa { background: var(--wa2); border-color: var(--wa2); color: #06210f; }
.fixed-note { margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--or-line); background: var(--or-soft); border-radius: var(--r1); color: var(--tx); font-size: .88rem; line-height: 1.7; }
