@font-face { font-family: Vazirmatn; src: url(vazirmatn.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #f2f2f7; --card: #fff; --text: #000; --sub: #8a8a8e; --sep: rgba(60, 60, 67, .2);
  --tint: #007aff; --green: #34c759; --red: #ff3b30; --orange: #ff9500;
  --fill: rgba(118, 118, 128, .12); --bar: rgba(248, 248, 250, .86); --seg-on: #fff;
  color-scheme: light only;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--tint); text-decoration: none; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Vazirmatn, -apple-system, Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
input, select, textarea, button { font: inherit; color: inherit; }
button { cursor: pointer; }
.nav, .tabbar, .row.tap, .btn, .seg, .card.tap, .navbtn { -webkit-user-select: none; user-select: none; }
#app { max-width: 680px; margin: 0 auto; }
.ic { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.green { color: var(--green); } .red { color: var(--red); } .orange { color: var(--orange); } .tint { color: var(--tint); }

/* nav bar */
.nav {
  position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top);
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep);
}
.nav-in { height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 6px; }
.nav-title { font-weight: 600; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .end { justify-self: end; }
.navbtn { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; color: var(--tint); font-size: 17px; padding: 8px; }
.navbtn.bold { font-weight: 600; }
.navbtn .ic { width: 24px; height: 24px; }
.large { font-size: 32px; font-weight: 800; margin: 6px 16px 10px; }
.content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.hello { margin: -4px 16px 16px; color: var(--sub); }

/* tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: center;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; max-width: 130px; height: 50px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: none; border: 0; color: var(--sub); font-size: 10px; font-weight: 500;
}
.tab .ic { width: 25px; height: 25px; }
.tab.on { color: var(--tint); }
.badge {
  position: absolute; top: 3px; right: calc(50% + 3px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}

/* grouped lists */
.section { margin: 0 16px 24px; }
.section-h { font-size: 13px; color: var(--sub); margin: 0 16px 6px; }
.section-f { font-size: 13px; color: var(--sub); margin: 6px 16px 0; }
.list { background: var(--card); border-radius: 12px; overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 11px 16px;
  background: none; border: 0; text-align: start; position: relative; font-size: 16px;
}
.row + .row::before { content: ""; position: absolute; top: 0; right: 16px; left: 0; border-top: .5px solid var(--sep); }
.row.tap:active, .card.tap:active { background: var(--fill); }
.row .main { flex: 1; min-width: 0; }
.row .s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s { font-size: 13px; color: var(--sub); }
.v { color: var(--sub); font-size: 15px; white-space: nowrap; }
.chev { width: 16px; height: 16px; color: var(--sub); opacity: .6; }
.row .tint .ic, .row .red .ic { width: 18px; height: 18px; margin-left: 4px; }
.empty { padding: 28px 16px; text-align: center; color: var(--sub); font-size: 15px; }

/* cards */
.card { display: block; width: calc(100% - 32px); margin: 0 16px 14px; padding: 16px; border: 0; border-radius: 14px; background: var(--card); text-align: start; }
.hero { display: flex; gap: 14px; align-items: center; }
.hero .main { flex: 1; min-width: 0; }
.h { font-size: 18px; font-weight: 700; }
.stage { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; color: var(--tint); }
.stage .ic { width: 14px; height: 14px; }
.mini { display: flex; margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--sep); }
.mini > div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--sub); }
.mini b { font-size: 14px; color: var(--text); white-space: nowrap; }
small { font-size: .72em; font-weight: 500; opacity: .75; }
.mini b.green { color: var(--green); } .mini b.red { color: var(--red); }
.ring {
  --p: 0; width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--tint) calc(var(--p) * 1%), var(--fill) 0);
}
.ring span { width: 52px; height: 52px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #a6adba, #6e7480); color: #fff; font-weight: 600;
}
.card .avatar { width: 60px; height: 60px; font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 16px 24px; }
.stat { background: var(--card); border-radius: 12px; padding: 12px 14px; }
.stat .n { font-size: 18px; font-weight: 700; margin-top: 2px; }
.news-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tag { font-size: 12px; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent); padding: 2px 8px; border-radius: 8px; }
.card p { margin: 6px 0 0; white-space: pre-line; font-size: 15px; opacity: .85; }

/* phases */
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 8px 0 6px; }
.bar i { display: block; height: 100%; background: var(--tint); border-radius: 3px; }
.phase-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.phase-pay { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; color: var(--sub); }
.phase-pay .green { color: var(--green); } .phase-pay .red { color: var(--red); }
input[type=range] { width: 100%; margin: 10px 0 2px; accent-color: var(--tint); }

/* chips, segmented, buttons */
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; vertical-align: middle; }
.chip.pending { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.chip.approved, .chip.open { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.chip.rejected { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.chip.ready { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.chip.support { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
.chip.feature { background: color-mix(in srgb, #8e44ad 14%, transparent); color: #8e44ad; }
.chip.queued, .chip.building { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.chip.failed { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.chip.closed, .chip.todo, .chip.none { background: var(--fill); color: var(--sub); }
.chip.settled, .chip.done { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.chip.partial { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.chip.unpaid { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.chip.active { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
.seg { display: flex; margin: 0 16px 16px; padding: 2px; background: var(--fill); border-radius: 9px; }
.seg button { flex: 1; border: 0; background: none; padding: 6px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.section .seg { margin: 0; }
.seg label { flex: 1; text-align: center; padding: 6px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--seg-on); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.seg button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.pad { margin: 0 16px 24px; }
.two { display: flex; gap: 10px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 0; border-radius: 12px;
  padding: 14px; background: var(--tint); color: #fff; font-size: 17px; font-weight: 600;
}
.btn:active { opacity: .7; }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn .ic { width: 20px; height: 20px; }
.btn.plain { background: var(--card); color: var(--tint); }
.btn.plain.danger { color: var(--red); }

/* invoices */
.inv-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 2px; }
.items { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.items th { font-weight: 500; color: var(--sub); font-size: 12px; text-align: start; padding: 6px 0; border-bottom: .5px solid var(--sep); }
.items td { padding: 8px 0; border-bottom: .5px solid var(--sep); }
.items td:last-child, .items th:last-child { text-align: end; white-space: nowrap; padding-inline-start: 12px; }
.items tfoot td { border: 0; padding: 3px 0; font-weight: 600; }
.items tfoot tr:first-child td { padding-top: 10px; }
.items tr.green td { color: var(--green); } .items tr.red td { color: var(--red); }
.item input { border: 0; background: none; outline: none; font-size: 16px; min-width: 0; padding: 0; }
.item [name=desc] { flex: 1.5; } .item [name=amount] { flex: 1; text-align: end; }
.del { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--fill); color: var(--sub); font-size: 16px; line-height: 1; }
.inv-total { white-space: nowrap; }

/* forms */
.field .lbl { flex: none; min-width: 100px; }
.field input, .field select, .area {
  flex: 1; min-width: 0; width: 100%; border: 0; background: none; outline: none; padding: 0; font-size: 17px;
  -webkit-appearance: none; appearance: none;
}
.field select { color: var(--tint); }
.area { resize: none; min-height: 88px; }
.upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px;
  border: 1.5px dashed var(--sep); border-radius: 12px; background: var(--card) center / cover no-repeat; color: var(--tint); font-size: 15px;
}
.upload .ic { width: 32px; height: 32px; }
.upload.has { border-style: solid; min-height: 220px; }
.upload.has > :not(input) { display: none; }
.thumb { width: 44px; height: 56px; flex: none; border-radius: 6px; object-fit: cover; background: var(--fill); }
.receipt-img { display: block; max-width: calc(100% - 32px); max-height: 48vh; margin: 0 auto 20px; border-radius: 12px; box-shadow: 0 2px 14px rgba(0, 0, 0, .14); }

/* sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .35); animation: fade .25s; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-width: 680px; margin: 0 auto; max-height: 94vh; overflow-y: auto;
  background: var(--bg); border-radius: 14px 14px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom));
  animation: up .35s cubic-bezier(.2, .9, .3, 1);
}
.sheet-h { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 6px 12px; background: var(--bg); }
.sheet-h > :last-child { justify-self: end; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* tickets */
.ticket-meta { text-align: center; font-size: 13px; color: var(--sub); margin: 10px 16px; }
.chat { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 70px; }
.bubble { max-width: 80%; align-self: flex-start; background: var(--card); padding: 8px 12px; border-radius: 18px; font-size: 16px; white-space: pre-wrap; }
.bubble.mine { align-self: flex-end; background: var(--tint); color: #fff; }
.bubble time { display: block; font-size: 11px; opacity: .6; margin-top: 2px; }
.composer {
  position: fixed; z-index: 9; left: 0; right: 0; bottom: calc(50px + env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto;
  display: flex; gap: 8px; align-items: center; padding: 8px 12px;
  background: var(--bar); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: .5px solid var(--sep);
}
.composer input { flex: 1; min-width: 0; border: .5px solid var(--sep); background: var(--card); border-radius: 18px; padding: 7px 14px; outline: none; font-size: 16px; }
.send { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; background: var(--tint); color: #fff; display: grid; place-items: center; }
.send .ic { width: 18px; height: 18px; transform: scaleX(-1); }

/* toast */
#toast {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; z-index: 100; max-width: 90vw; transform: translate(-50%, -180%);
  background: var(--card); padding: 10px 18px; border-radius: 22px; font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18); transition: transform .35s cubic-bezier(.2, .9, .3, 1);
}
#toast.show { transform: translate(-50%, 0); }

/* login */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 20px 24px; }
.logo {
  display: block; width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 22px; box-shadow: 0 8px 24px rgba(16, 36, 118, .3);
}
.login h1 { text-align: center; margin: 0; font-size: 30px; }
.login > .s { text-align: center; margin: 2px 0 28px; font-size: 15px; }
.login .list { margin-bottom: 16px; }
.login .field input { padding: 2px 0; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(8px); } 50% { transform: translateX(-8px); } 75% { transform: translateX(4px); } }

/* settings, platform */
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }
input[type=color] { flex: none; width: 44px; height: 30px; padding: 0; border: 0; background: none; margin-inline-start: auto; }
.brand-preview { display: flex; justify-content: center; gap: 24px; margin: -8px 16px 16px; }
.brand-preview canvas { width: 80px; height: 80px; border-radius: 18px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.brand-preview canvas:last-child { border-radius: 50%; }
.card.warn { color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, var(--card)); font-size: 15px; }
.card.warn b { display: block; margin-top: 4px; color: var(--tint); }
.apk { margin-top: 18px; }
.apk .ic { width: 20px; height: 20px; }
.landing { max-width: 680px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top)) 20px 40px; text-align: center; }
.landing .logo { display: block; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 22px; box-shadow: 0 8px 24px rgba(16, 36, 118, .3); }
.landing h1 { margin: 0 0 4px; font-size: 30px; }
.landing .tagline { margin: 0 0 12px; font-weight: 600; color: var(--tint); }
.landing > .s { font-size: 15px; margin: 0 auto 24px; max-width: 460px; }
.landing .small { margin-top: 10px; font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 32px; text-align: start; }
.plans .card { width: auto; margin: 0; }
.price { font-size: 22px; font-weight: 800; color: var(--tint); margin: 6px 0 10px; }
.plans ul { margin: 0; padding-inline-start: 18px; font-size: 14px; color: var(--sub); line-height: 1.9; }
.why { width: auto; margin: 28px 0 0; text-align: start; }
.why .h { font-size: 17px; margin-bottom: 10px; }
.why ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px 12px; }
.why li { display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.6; color: var(--sub); }
.why li b { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.why li b .ic { width: 15px; height: 15px; padding: 4px; box-sizing: content-box; border-radius: 7px; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent); }
.why .chip { font-size: 10px; padding: 0 6px; }
.why + .plans { margin-top: 12px; }
.lock .pin { text-align: center; letter-spacing: 10px; font-size: 22px; }
.lock form .btn { margin-top: 0; }

/* invites */
.invite-message { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--card); font-size: 14px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.invite .card { width: auto; margin: 0 0 14px; text-align: start; }
.guide .h { font-size: 16px; margin-bottom: 4px; }
.guide p { margin: 6px 0 0; font-size: 14px; }
.guide .btn { margin: 10px 0 6px; }
.guide ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.guide li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.7; }
.guide li > b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: #fff; font-size: 13px; }
.guide li .ic { width: 18px; height: 18px; vertical-align: -4px; color: var(--tint); }

/* notifications */
.bell { position: relative; }
.bell .badge { top: 0; right: auto; left: 0; }
.note.unread .t { font-weight: 700; }
.note.unread .main::before { content: ""; float: left; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--tint); }
.note-hint { margin: 0 16px 14px; }
.build-choice { display: grid; gap: 10px; }

/* main-site pages */
.site-footer { margin-top: 28px; font-size: 14px; color: var(--sub); line-height: 2; }
.landing.page { text-align: start; }
.landing.page h1 { margin: 6px 0 16px; }
.landing.page .card { width: auto; margin: 0 0 14px; }
.landing.page .card p { line-height: 1.9; }
.landing.page .section { margin: 0 0 14px; }
.landing.page .site-footer { text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; }
.back-link .ic { width: 18px; height: 18px; }

.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.footer-links .btn { padding: 12px; font-size: 15px; }
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.enamad { margin-top: 8px; }
