/* Khata Daftar — رجسٹر کے صفحے جیسا ڈیزائن */
:root {
    --ink: #14232C;
    --muted: #5E6E78;
    --line: #DDE4E8;
    --bg: #EDF1F3;
    --surface: #FFFFFF;
    --primary: #0F4C5C;
    --primary-dark: #0A3742;
    --primary-soft: #E2EEF1;
    --gold: #D9A21B;
    --get: #157F3D;
    --give: #B42318;
    --radius-lg: 18px;
    color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Noto Naskh Arabic', Tahoma, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.app-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.num, .num-input {
    direction: ltr; unicode-bidi: isolate;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
}
.num-input { text-align: right; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- ہیڈر: لکیروں والا کھاتہ اور حاشیے کی دوہری لکیر ---------- */
.ledger-head {
    position: relative;
    background-color: var(--primary);
    background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(255,255,255,.07) 31px 32px);
    color: #fff;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 22px;
    border-radius: 0 0 24px 24px;
}
.ledger-head::after {
    content: "";
    position: absolute; top: 0; bottom: 0;
    inset-inline-end: 18px; width: 6px;
    border-inline: 1.5px solid rgba(217,162,27,.75);
    pointer-events: none;
}
.head-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; padding-inline-end: 22px; }
.page-title { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.3rem; line-height: 2.3; margin: 0; }
.icon-btn {
    flex: none; width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.14); color: #fff; text-decoration: none; font-size: 1.2rem;
}
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.22); }
.biz-switch {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem;
}
.biz-switch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-switch:hover { color: #fff; }
.greet { margin: 4px 0 0; opacity: .85; font-size: .95rem; position: relative; z-index: 1; }

/* ---------- بیلنس کارڈ ---------- */
.ledger-head.with-card { padding-bottom: 0; }
.balance-card {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--surface); color: var(--ink);
    border-radius: var(--radius-lg);
    margin: 16px 0 -46px;
    box-shadow: 0 10px 24px -12px rgba(10,55,66,.45);
}
.bal-cell { display: flex; flex-direction: column; align-items: center; padding: 16px 8px 12px; }
.bal-cell + .bal-cell { border-inline-start: 1px solid var(--line); }
.amt { font-size: 1.35rem; font-weight: 700; line-height: 1.4; }
.amt.get { color: var(--get); }
.amt.give { color: var(--give); }
.bal-label { color: var(--muted); font-size: .9rem; }

/* ---------- مواد ---------- */
.content { padding: 16px; }
.with-card + .content { padding-top: 62px; }
.section-label { color: var(--muted); font-size: .95rem; font-weight: 600; margin: 18px 6px 8px; }
.section-label:first-of-type { margin-top: 4px; }

.tile-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    background: var(--surface); border-radius: var(--radius-lg); padding: 12px;
}
.tile {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 4px 10px; border-radius: 14px;
    color: var(--ink); text-decoration: none; font-weight: 600;
}
.tile i {
    width: 54px; height: 54px; display: grid; place-items: center;
    border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-size: 1.6rem;
}
a.tile:active { background: var(--bg); }
.tile.soon { color: var(--muted); }
.tile.soon i { opacity: .5; }
.soon-tag {
    position: absolute; top: 6px; inset-inline-start: 8px;
    font-size: .68rem; line-height: 1.7; padding: 0 7px;
    background: #FBF1D6; color: #7A5A06; border-radius: 999px;
}

/* ---------- فہرست ---------- */
.list-card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.list-row {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 13px 16px; background: none; border: 0; border-bottom: 1px solid var(--line);
    color: var(--ink); text-decoration: none; text-align: start; font: inherit;
}
.list-card > .list-row:last-child { border-bottom: 0; }
.list-row:hover { color: var(--ink); background: #F7F9FA; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: .85rem; }
.row-sub.num { text-align: right; }
.avatar {
    flex: none; width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 1.15rem;
}
.avatar.danger { background: #FCE8E6; color: var(--give); }

.biz-item { border-bottom: 1px solid var(--line); }
.biz-item:last-child { border-bottom: 0; }
.biz-item .list-row { border-bottom: 0; }
.biz-item.is-current { background: #F4F8F9; }
.cur-check { color: var(--primary); font-size: 1.4rem; }
.biz-edit summary {
    list-style: none; cursor: pointer;
    padding: 0 16px 10px; padding-inline-start: 72px;
    color: var(--primary); font-size: .85rem;
}
.biz-edit summary::-webkit-details-marker { display: none; }
.edit-form { padding: 0 16px 14px; }
.new-biz { margin-top: 14px; }
.new-biz > summary { list-style: none; display: flex; justify-content: center; gap: 6px; }
.new-biz > summary::-webkit-details-marker { display: none; }

/* ---------- لاگ ان / رجسٹر ---------- */
.auth-hero { text-align: center; padding-bottom: 64px; }
.brand-mark { width: 72px; height: 72px; border-radius: 20px; margin: 8px auto 6px; display: block; box-shadow: 0 6px 16px rgba(0,0,0,.25); position: relative; z-index: 1; }
.brand-name { font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif; font-size: 1.9rem; font-weight: 600; line-height: 2.4; margin: 0; position: relative; z-index: 1; }
.brand-en { display: block; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600; letter-spacing: .02em; opacity: .95; }
.brand-sub { margin: 0; opacity: .85; position: relative; z-index: 1; }
.form-card {
    position: relative;
    background: var(--surface); border-radius: var(--radius-lg);
    margin: -40px 16px 24px; padding: 22px 18px;
    box-shadow: 0 10px 24px -14px rgba(10,55,66,.5);
}
.form-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 14px; }
.form-label { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.form-control, .form-select { border-radius: 12px; padding: .7rem .9rem; border-color: var(--line); font-size: 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(15,76,92,.16); }
.pin-input { text-align: center; letter-spacing: .7em; font-size: 1.35rem; direction: ltr; padding-inline: 2.6rem; }
.pin-wrap { position: relative; }
.pin-eye {
    position: absolute; top: 50%; transform: translateY(-50%);
    inset-inline-start: 8px; border: 0; background: none; color: var(--muted); font-size: 1.2rem; padding: 6px;
}
.btn-main {
    display: block; width: 100%;
    background: var(--primary); color: #fff; border: 0; border-radius: 12px;
    padding: .8rem 1rem; font-weight: 700; font-size: 1.05rem;
}
.btn-main:hover, .btn-main:focus, .btn-main:active { background: var(--primary-dark) !important; color: #fff !important; }
.btn-sm-main { padding: .55rem 1rem; font-size: .95rem; }
.switch-auth { text-align: center; margin: 16px 0 0; color: var(--muted); }
.switch-auth a { color: var(--primary); font-weight: 700; }
.alert { border-radius: 12px; font-size: .95rem; }
.app-ver { text-align: center; color: var(--muted); font-size: .8rem; margin: 22px 0 8px; }

/* ---------- اپڈیٹ پاپ اپ ---------- */
.update-backdrop {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,30,38,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.update-box {
    width: 100%; max-width: 380px;
    background: var(--surface); border-radius: 22px;
    padding: 24px 20px 20px; text-align: center;
    border-top: 6px solid var(--gold);
    animation: upd-in .22s ease-out;
}
.update-icon {
    width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 18px;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary); font-size: 2rem;
}
.update-box h2 { font-size: 1.25rem; font-weight: 700; margin: 4px 0 0; }
.update-ver { color: var(--muted); margin: 0 0 12px; font-size: .9rem; }
.update-notes {
    text-align: start; margin: 0 0 18px; padding: 12px 14px;
    background: var(--bg); border-radius: 14px; list-style: none;
}
.update-notes li { position: relative; padding-inline-start: 22px; }
.update-notes li + li { margin-top: 4px; }
.update-notes li::before {
    content: ""; position: absolute; inset-inline-start: 4px; top: .75em;
    width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.update-ok:disabled { opacity: .75; }
@keyframes upd-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }


/* ================= v1.2.0 پارٹی کھاتہ ================= */
a.balance-card { text-decoration: none; }
a.balance-card:hover { color: var(--ink); }
.tabs { display: flex; gap: 6px; margin: 10px 0 0; position: relative; z-index: 1; padding-inline-end: 22px; }
.tabs a {
    flex: 1; text-align: center; padding: 6px 4px 8px;
    color: rgba(255,255,255,.72); text-decoration: none; font-weight: 600;
    border-bottom: 3px solid transparent;
}
.tabs a.active { color: #fff; border-bottom-color: var(--gold); }

.search-box { position: relative; margin-bottom: 12px; }
.search-box i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--muted); }
.search-box input {
    width: 100%; border: 1px solid var(--line); background: var(--surface);
    border-radius: 14px; padding: .7rem .9rem; padding-inline-start: 2.6rem; font: inherit;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(15,76,92,.16); }

.bal-side { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.amt-sm { font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
.amt-sm.give { color: var(--give); }
.amt-sm.get { color: var(--get); }
.amt-sm.muted { color: var(--muted); }
.bal-hint { color: var(--muted); font-size: .78rem; }
.type-tag { font-size: .7rem; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 0 7px; margin-inline-start: 4px; font-weight: 600; }
.list-card > .list-row.party-row:last-of-type { border-bottom: 0; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty-state i { font-size: 2.6rem; color: #A9BAC2; display: block; margin-bottom: 6px; }
.empty-filter { text-align: center; color: var(--muted); padding: 20px; }

.has-fab { padding-bottom: 96px; }
.fab {
    position: fixed; z-index: 50;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    left: max(16px, calc(50% - 264px));
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary); color: #fff; text-decoration: none; font-weight: 700;
    padding: 12px 20px; border-radius: 999px;
    box-shadow: 0 10px 22px -8px rgba(10,55,66,.6);
}
.fab:hover { color: #fff; background: var(--primary-dark); }
.fab i { font-size: 1.2rem; }

/* ایک پارٹی کا کھاتہ */
.head-title { min-width: 0; }
.party-name { font-size: 1.2rem; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.party-meta { font-size: .85rem; opacity: .85; }
.balance-card.single { grid-template-columns: 1fr; }
.balance-card.single .bal-cell { padding-bottom: 6px; }
.wa-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border-top: 1px solid var(--line); padding: 10px; color: #128C4A; font-weight: 600; text-decoration: none;
}
.wa-btn:hover { color: #0b6b37; background: #F3FAF5; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.has-actions { padding-bottom: 110px; }
.with-card + .content.has-actions { padding-top: 70px; }

.ledger { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.ledger-row {
    display: grid; grid-template-columns: 1fr 88px 88px; align-items: stretch;
    border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row > span { padding: 10px 12px; }
.ledger-row .col-gave, .ledger-row .col-got { display: flex; align-items: center; justify-content: center; font-weight: 700; text-align: center; }
.ledger-row .col-gave { background: #FDF3F2; color: var(--give); }
.ledger-row .col-got { color: var(--get); }
a.ledger-row:hover { background: #F7F9FA; color: var(--ink); }
.ledger-headrow { font-size: .8rem; color: var(--muted); background: #F7F9FA; }
.ledger-headrow > span:first-child { display: flex; align-items: center; }
.ledger-headrow .col-gave, .ledger-headrow .col-got { flex-direction: column; font-weight: 600; line-height: 1.5; }
.ledger-headrow b { font-size: .95rem; }
.entry-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.entry-date { font-size: .8rem; color: var(--muted); }
.entry-note { font-weight: 600; overflow-wrap: anywhere; }
.run-bal { align-self: flex-start; font-size: .75rem; background: var(--bg); color: var(--muted); border-radius: 6px; padding: 0 6px; }
.run-bal.neg { background: #FDECEA; color: #8F1D14; }
.run-bal.pos { background: #EAF5EE; color: #24603A; }

.action-bar {
    position: fixed; z-index: 50; bottom: 0;
    left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 560px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--bg) 70%, rgba(237,241,243,0));
}
.act-btn {
    display: block; text-align: center; color: #fff; text-decoration: none;
    font-weight: 700; font-size: 1.05rem; padding: 13px 8px; border-radius: 14px;
}
.act-gave { background: var(--give); }
.act-got { background: var(--get); }
.act-btn:hover { color: #fff; filter: brightness(.94); }

/* فارم: قسم کا انتخاب */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--bg); padding: 4px; border-radius: 14px; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 6px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(10,55,66,.15); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); }
.seg-kind .k-gave input:checked + span { background: var(--give); color: #fff; }
.seg-kind .k-got input:checked + span { background: var(--get); color: #fff; }
.amount-wrap { position: relative; }
.amount-wrap .cur { position: absolute; top: 50%; transform: translateY(-50%); left: 14px; color: var(--muted); font-weight: 700; direction: ltr; }
.amount-input {
    direction: ltr; text-align: left; padding-left: 3rem !important;
    font-size: 1.8rem !important; font-weight: 700;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.entry-form[data-kind="gave"] .amount-input { color: var(--give); }
.entry-form[data-kind="got"] .amount-input { color: var(--get); }
.entry-form[data-kind="gave"] .btn-kind { background: var(--give); }
.entry-form[data-kind="got"] .btn-kind { background: var(--get); }
.entry-form .btn-kind:hover, .entry-form .btn-kind:focus { filter: brightness(.94); }
.entry-form[data-kind="gave"] .btn-kind:hover { background: var(--give) !important; }
.entry-form[data-kind="got"] .btn-kind:hover { background: var(--get) !important; }
.btn-danger-soft {
    display: block; width: 100%; border: 0; border-radius: 12px; padding: .75rem;
    background: #FCE8E6; color: var(--give); font-weight: 700;
}
.btn-danger-soft:hover { background: #F9D6D2; color: var(--give); }

/* ================= v1.3.0 ایڈمن پینل ================= */
.avatar.admin { background: #FBF1D6; color: #7A5A06; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
    background: var(--surface); border-radius: 16px; padding: 12px 14px;
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
}
.stat i { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.15rem; }
.stat-num { font-size: 1.3rem; font-weight: 700; line-height: 1.3; text-align: right; }
.stat-label { color: var(--muted); font-size: .82rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chips a { padding: 4px 14px; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; border: 1px solid var(--line); }
.chips a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.badge-s { font-size: .68rem; border-radius: 999px; padding: 0 7px; margin-inline-start: 4px; font-weight: 700; }
.b-admin { background: #FBF1D6; color: #7A5A06; }
.b-pro { background: #E7E3FB; color: #4B3BA8; }
.b-block { background: #FCE8E6; color: var(--give); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.pager a { color: var(--primary); font-weight: 700; text-decoration: none; }
.info-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); }
.info-list b { font-weight: 600; text-align: left; }
.info-list .ok { color: var(--get); }
.info-list .bad { color: var(--give); }
.btn-outline-main { display: block; width: 100%; border: 1.5px solid var(--primary); color: var(--primary); background: none; border-radius: 12px; padding: .7rem; font-weight: 700; }
.btn-outline-main:hover { background: var(--primary-soft); color: var(--primary); }

/* ================= v1.3.1 اپڈیٹس ================= */
.b-new { background: #FBF1D6; color: #7A5A06; }
.app-ver a { color: inherit; text-decoration: none; }
.update-all { display: block; margin-top: 10px; color: var(--primary); font-weight: 600; text-decoration: none; font-size: .9rem; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 11px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding-inline-start: 34px; margin-bottom: 14px; }
.timeline > li::before {
    content: ""; position: absolute; inset-inline-start: 5px; top: 16px;
    width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid #A9BAC2;
}
.timeline > li.latest::before { border-color: var(--gold); background: var(--gold); }
.timeline > li > div, .timeline > li > ul { background: var(--surface); }
.tl-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px 4px; border-radius: 16px 16px 0 0; }
.tl-ver { font-weight: 700; color: var(--primary); }
.tl-date { margin-inline-start: auto; color: var(--muted); font-size: .82rem; }
.timeline > li > ul { margin: 0; padding: 4px 14px 12px; padding-inline-start: 32px; border-radius: 0 0 16px 16px; }
.timeline > li > ul li + li { margin-top: 2px; }

/* ================= v1.4.0 فیچر لاک، سیٹنگز، اختیارات ================= */
.tile.locked i:not(.bi-lock-fill) { opacity: .55; }
.tag-pro { background: #E7E3FB !important; color: #4B3BA8 !important; }
.tag-off { background: #FCE8E6 !important; color: var(--give) !important; }
.soon-tag .bi { width: auto; height: auto; background: none; font-size: .65rem; display: inline; color: inherit; }
.avatar.pro { background: #E7E3FB; color: #4B3BA8; }
.b-staff { background: var(--primary-soft); color: var(--primary); }
.announce {
    display: flex; gap: 10px; align-items: flex-start;
    background: #FBF1D6; color: #5E4505; border-radius: 14px; padding: 10px 14px; margin-bottom: 4px;
}
.announce i { color: #B7860F; margin-top: 4px; }
.help-text { color: var(--muted); font-size: .85rem; margin: -2px 6px 8px; line-height: 1.7; }
.feat-row { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.feat-row:last-child { border-bottom: 0; }
.feat-name { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.seg-sm span { padding: 6px 4px; font-size: .88rem; }
.seg .m-pro input:checked + span { background: #4B3BA8; color: #fff; }
.seg .m-off input:checked + span { background: var(--give); color: #fff; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0; cursor: pointer; }
.switch {
    appearance: none; -webkit-appearance: none; flex: none;
    width: 50px; height: 28px; border-radius: 999px; background: #C5D0D5; position: relative; cursor: pointer; transition: background .15s;
}
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: right .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch:checked { background: var(--get); }
.switch:checked::after { right: 25px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; margin: 0; cursor: pointer; border-bottom: 1px dashed var(--line); }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.lock-card { background: var(--surface); border-radius: var(--radius-lg); text-align: center; padding: 22px 18px; margin-bottom: 14px; }
.lock-card > i { font-size: 2.2rem; color: #4B3BA8; }
.lock-card h2 { font-size: 1.15rem; font-weight: 700; margin: 6px 0 4px; }
.lock-card p { color: var(--muted); margin: 0; }
.plan-card { background: var(--surface); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.plan-card .plan-now { color: var(--muted); }
.plan-card .plan-name { font-size: 1.2rem; margin-inline-start: auto; }
.plan-card.is-pro .plan-name { color: #4B3BA8; }
.plan-exp { color: var(--muted); font-size: .85rem; }
.pro-box .form-title i { color: #4B3BA8; }
.pro-list { margin: 0 0 14px; padding-inline-start: 22px; }
.pro-list li + li { margin-top: 2px; }
.wa-main { background: #128C4A !important; display: flex; align-items: center; justify-content: center; gap: 8px; }
.wa-main:hover { background: #0b6b37 !important; }
.wa-btn.locked { color: #4B3BA8; }

/* ================= v1.5.0 کیش بک ================= */
.icon-btn.disabled { opacity: .35; }
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; position: relative; z-index: 1; padding-inline-end: 22px; }
.day-pick { position: relative; flex: 1; text-align: center; margin: 0; }
.day-label { font-weight: 700; font-size: 1.1rem; color: #fff; display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: rgba(255,255,255,.12); margin: 0; }
.day-label::after { content: "\f214"; font-family: bootstrap-icons; font-size: .85rem; opacity: .8; }
.day-pick input[type=date] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.cash-card .cash-foot {
    grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px;
    border-top: 1px solid var(--line); padding: 9px 16px; font-size: .85rem; color: var(--muted);
}
.cash-foot b { color: var(--ink); }
.cash-foot b.neg { color: var(--give); }
.ledger-row.cash-cols .col-got { background: #F1F9F4; }
.ledger-row.cash-cols .col-gave { background: none; }
.ledger-headrow.cash-cols .col-got, .ledger-headrow.cash-cols .col-gave { flex-direction: row; }

/* جلد آ رہا ہے */
.roadmap { background: var(--surface); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 8px; border-inline-start: 5px solid var(--gold); }
.roadmap h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; color: #7A5A06; display: flex; align-items: center; gap: 8px; }
.roadmap ul { margin: 0; padding-inline-start: 22px; }
.roadmap li + li { margin-top: 2px; }
.soon-check { border-bottom: 0; padding: 0 0 4px; font-size: .88rem; color: var(--muted); }

/* ================= v1.6.0 خرچہ ================= */
.day-label.month::after { content: none; }
.cash-foot .up { color: var(--give); }
.cash-foot .down { color: var(--get); }
.cash-foot .up b, .cash-foot .down b { color: inherit; }
.balance-card.single .cash-foot { grid-column: auto; }
.avatar.exp { background: #FDF0E6; color: #9A4A0B; }
.b-exp { background: #FDF0E6; color: #9A4A0B; }
.fab-exp { background: var(--give); }
.fab-exp:hover { background: #8F1D14; }
.cat-bars { padding: 6px 0; }
.cat-bar { display: block; padding: 8px 16px; color: var(--ink); text-decoration: none; }
.cat-bar:hover { background: #F7F9FA; color: var(--ink); }
.cat-bar.active { background: #FDF3F2; }
.cb-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.cb-amt { font-weight: 700; }
.cb-track { display: block; height: 7px; border-radius: 999px; background: var(--bg); margin-top: 4px; overflow: hidden; }
.cb-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(to left, #E0794F, var(--give)); }
.filter-note { margin: 10px 4px 0; color: var(--muted); font-size: .9rem; }
.filter-note a { color: var(--primary); font-weight: 700; }
.date-head { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); font-weight: 600; margin: 16px 6px 6px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chips label { margin: 0; cursor: pointer; }
.cat-chips input { position: absolute; opacity: 0; pointer-events: none; }
.cat-chips span { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .92rem; }
.cat-chips input:checked + span { background: var(--give); border-color: var(--give); color: #fff; }
.cat-chips input:focus-visible + span { outline: 3px solid var(--gold); }
.form-control-sm-k { padding: .5rem .8rem !important; font-size: .92rem !important; border-style: dashed !important; }
.w-auto { width: auto !important; white-space: nowrap; }

/* ================= v1.7.0 اسٹاک ================= */
:root { --warn: #B45309; }
.avatar.stock { background: #EAF0FB; color: #2F4F8F; }
.amt-sm.warn, .amt.warn { color: var(--warn); }
.amt small { font-size: .9rem; font-weight: 600; }
.stock-card .amt { font-size: 1.25rem; }
.mini-stats { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 4px 12px; font-size: .9rem; color: var(--muted); }
.mini-stats b { color: var(--ink); }
.mini-stats b.neg { color: var(--give); }
.mini-stats a { color: var(--primary); font-weight: 700; text-decoration: none; white-space: nowrap; }
.b-adj { background: #EAF0FB; color: #2F4F8F; }
.ledger-headrow.two-line .col-got, .ledger-headrow.two-line .col-gave { flex-direction: column; }
.qty-input { padding-left: .9rem !important; text-align: center; }
.entry-form[data-kind="adjust"] .amount-input { color: #2F4F8F; }
.entry-form[data-kind="adjust"] .btn-kind { background: var(--primary); }
.cash-card .cash-foot span { white-space: nowrap; }

/* ================= v1.8.0 بل بک ================= */
.avatar.bill-no { width: auto; min-width: 48px; padding: 0 8px; font-size: .9rem; background: #EAF5EE; color: #24603A; }
.pay-tag { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 0 8px; margin-top: 2px; }
.pay-tag.paid { background: #EAF5EE; color: #24603A; }
.pay-tag.part { background: #FFF4E0; color: #8A5300; }
.pay-tag.credit { background: #FCE8E6; color: var(--give); }
.item-row { padding: 10px 8px; border-bottom: 1px dashed var(--line); }
.item-row:last-child { border-bottom: 0; }
.i-nums { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.i-nums .form-control { padding: .5rem .6rem; }
.i-qty { width: 76px; flex: none; text-align: center; }
.i-price { flex: 1; min-width: 0; }
.i-x { color: var(--muted); }
.i-amt { min-width: 70px; text-align: left; font-weight: 700; }
.i-del { border: 0; background: #FCE8E6; color: var(--give); width: 34px; height: 34px; border-radius: 10px; flex: none; }
.i-stock { display: block; color: var(--get); font-size: .78rem; margin-top: 3px; }
.i-stock.out { color: var(--give); }
.bill-sum .sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; }
.bill-sum .sum-row label { margin: 0; }
.bill-sum .sum-in { width: 150px; padding: .45rem .7rem; }
.bill-sum .grand { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0; padding: 8px 0; font-size: 1.1rem; }
.bill-sum .grand b { color: var(--primary); }
.bill-sum .due.has-due b { color: var(--give); }
.bill-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.ba { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 0; border-radius: 14px; background: var(--surface); color: var(--primary); font: inherit; font-size: .82rem; font-weight: 600; text-decoration: none; }
.ba i { font-size: 1.3rem; }
.ba.wa { color: #128C4A; }
.ba:hover { background: var(--primary-soft); color: var(--primary); }
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tpl-card { margin: 0; cursor: pointer; display: block; }
.tpl-card input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-card input:checked + .tpl-thumb { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,162,27,.35); }
.tpl-card input:focus-visible + .tpl-thumb { outline: 3px solid var(--gold); }
.tpl-card.locked .tpl-thumb { opacity: .72; }
.tpl-name { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; margin-top: 4px; padding: 0 2px; }
.b-free { background: #EAF5EE; color: #24603A; }
.logo-prev { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--bg); flex: none; }
fieldset[disabled] { opacity: .6; }

/* ================= v1.9.0 بار کوڈ اسکینر ================= */
.input-scan { display: flex; gap: 6px; }
.input-scan .form-control { flex: 1; min-width: 0; }
.scan-btn { flex: none; width: 46px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-size: 1.25rem; display: grid; place-items: center; }
.scan-btn:hover { background: var(--primary-dark); }
.search-box .scan-btn.in-search { position: absolute; top: 4px; bottom: 4px; inset-inline-end: 4px; width: 42px; border-radius: 10px; }
.search-box:has(.in-search) input { padding-inline-end: 3.2rem; }
.scan-note { font-size: .85rem; margin: -2px 4px 8px; }
.scan-note.ok { color: var(--get); } .scan-note.bad { color: var(--give); }
.scan-backdrop { position: fixed; inset: 0; z-index: 3000; background: rgba(5,15,20,.75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.scan-box { width: 100%; max-width: 440px; background: #000; border-radius: 18px; overflow: hidden; color: #fff; }
.scan-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--primary); }
.scan-close { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 36px; height: 36px; border-radius: 50%; }
.scan-view { width: 100%; min-height: 260px; }
.scan-view video { width: 100% !important; display: block; }
.scan-msg { text-align: center; padding: 10px 14px 14px; margin: 0; font-size: .9rem; }

/* ================= v1.9.0 ڈیسک ٹاپ / ٹیبلٹ ================= */
.side-nav { display: none; }
@media (min-width: 640px) and (max-width: 991.98px) {
    .app-shell { max-width: 760px; }
    .tile-grid { grid-template-columns: repeat(4, 1fr); }
    .tpl-grid { grid-template-columns: repeat(3, 1fr); }
    .fab { left: max(16px, calc(50% - 364px)); }
    .action-bar { max-width: 760px; }
}
@media (min-width: 992px) {
    body.has-side { --side: 252px; }
    .side-nav {
        display: flex; flex-direction: column; gap: 6px;
        position: fixed; top: 0; bottom: 0; right: 0; width: var(--side); z-index: 60;
        background: var(--primary-dark); color: #fff; padding: 18px 14px; overflow-y: auto;
        background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(255,255,255,.04) 31px 32px);
    }
    .sn-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px 6px 10px; }
    .sn-brand img { width: 40px; height: 40px; border-radius: 12px; }
    .sn-brand span { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.35rem; line-height: 2.2; }
    .sn-biz { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px 12px; font-weight: 700; margin-bottom: 8px; }
    .sn-biz span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sn-biz .bi-chevron-down { font-size: .75rem; opacity: .7; }
    .sn-links { display: flex; flex-direction: column; gap: 2px; }
    .sn-links a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; }
    .sn-links a i:first-child { font-size: 1.15rem; width: 22px; text-align: center; }
    .sn-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
    .sn-links a.active { background: #fff; color: var(--primary); box-shadow: inset -4px 0 0 var(--gold); }
    .sn-lock { margin-inline-start: auto; font-size: .75rem; color: var(--gold); }
    .sn-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 10px; }

    body.has-side .app-shell { max-width: none; margin: 0; margin-right: var(--side); padding: 22px 32px 40px; }
    body.has-side .app-shell > .ledger-head, body.has-side .app-shell > .content { max-width: 1140px; margin-left: auto; margin-right: auto; }
    body.has-side .ledger-head { border-radius: 22px; }
    .content { padding-left: 0; padding-right: 0; }
    .tile-grid { grid-template-columns: repeat(7, 1fr); }
    .range-form { max-width: 640px; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .tpl-grid { grid-template-columns: repeat(4, 1fr); }
    .balance-card { max-width: 720px; margin-left: auto; margin-right: auto; }
    .content > form.list-card, .content > form > .list-card, .content > .entry-form, .content > form:not(#billForm) { max-width: 760px; }
    #billForm { max-width: 920px; }
    .bill-actions { max-width: 560px; }
    .fab { left: 32px; bottom: 28px; }
    body.has-side .action-bar {
        position: sticky; transform: none; left: auto; bottom: 16px;
        width: auto; max-width: 560px; margin: 16px auto 0; padding: 0; background: none;
    }
    .has-actions { padding-bottom: 20px; }
    .has-fab { padding-bottom: 90px; }
    .ledger-head::after { inset-inline-end: 22px; }
}
@media print { .side-nav { display: none !important; } body.has-side .app-shell { margin: 0 !important; padding: 0 !important; } }

/* ================= v1.9.0 عملہ ================= */
.avatar.emp { background: #F1EAFB; color: #5B3A9A; }
.balance-card.att-card { grid-template-columns: 1fr; }
.att-card .att-sum, .att-sum { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.att-sum span { display: flex; flex-direction: column; padding: 10px 2px; font-size: .78rem; color: var(--muted); }
.att-sum b { font-size: 1.25rem; line-height: 1.3; }
.att-sum.flat { grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: 16px; margin-bottom: 10px; }
.as-p b { color: var(--get); } .as-a b { color: var(--give); } .as-h b { color: var(--warn); } .as-l b { color: #2F4F8F; } .as-n b { color: var(--muted); }
.emp-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.emp-row:last-child { border-bottom: 0; }
.emp-info { display: flex; align-items: center; gap: 10px; flex: 1 1 180px; min-width: 0; color: var(--ink); text-decoration: none; }
.emp-info:hover { color: var(--ink); }
.att-btns { display: flex; gap: 5px; margin: 0; flex: none; }
.ab { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; color: var(--muted); font-size: 1rem; }
.ab-P.on { background: var(--get); border-color: var(--get); color: #fff; }
.ab-A.on { background: var(--give); border-color: var(--give); color: #fff; }
.ab-H.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.ab-L.on { background: #2F4F8F; border-color: #2F4F8F; color: #fff; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 10px; }
.cal-h { text-align: center; font-size: .7rem; color: var(--muted); }
.cal-d { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; font-weight: 600; font-size: .9rem; text-decoration: none; background: var(--bg); color: var(--muted); max-height: 54px; }
.cal-d.s-P { background: #DDF2E5; color: #146C37; }
.cal-d.s-A { background: #FBDCD8; color: #9B1C12; }
.cal-d.s-H { background: #FCEBD3; color: #8A4B05; }
.cal-d.s-L { background: #E0E8F7; color: #2F4F8F; }
.cal-d.future { opacity: .35; }
.cash-card .amt { font-size: 1.2rem; }
.wa-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 10px; border-radius: 14px; background: var(--surface); color: #128C4A; font-weight: 600; text-decoration: none; }

/* ================= v1.9.0 رپورٹس ================= */
.range-form { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.range-form .form-control { padding: .45rem .6rem; min-width: 0; }
.report-grid { display: grid; gap: 12px; }
.rep { padding: 14px 16px; }
.rep h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; color: var(--primary); display: flex; gap: 8px; align-items: center; }
.rep h3 { font-size: .9rem; font-weight: 700; color: var(--muted); margin: 12px 0 4px; }
.rl { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.rl:last-child { border-bottom: 0; }
.rl.sub { font-size: .9rem; color: var(--muted); }
.rl.minus b { color: var(--give); }
.rl.total { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 700; }
.rl.grand { background: #EAF5EE; color: #146C37; border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-size: 1.1rem; border: 0; }
.rl.grand.loss { background: #FCE8E6; color: var(--give); }
.give-t { color: var(--give); } .get-t { color: var(--get); }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 12px 0 4px; padding-top: 4px; direction: ltr; }
.mb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 6px; }
.mb i { display: block; width: 100%; max-width: 22px; background: linear-gradient(to top, var(--primary), #3E8A9C); border-radius: 4px 4px 0 0; }
.mb small { font-size: .6rem; color: var(--muted); }
@media (min-width: 992px) { .report-grid { grid-template-columns: 1fr 1fr; } }

@media print {
    .no-print, .fab, .action-bar, .chips, .update-backdrop, .scan-backdrop { display: none !important; }
    body { background: #fff !important; }
    .ledger-head { background: #fff !important; color: #000 !important; border: 1px solid #ccc; }
    .ledger-head::after { display: none; }
    .ledger-head .party-meta, .ledger-head .party-name { color: #000 !important; }
    .list-card, .balance-card { box-shadow: none !important; border: 1px solid #ddd; break-inside: avoid; }
    .report-grid { grid-template-columns: 1fr 1fr; }
}

/* ================= v2.0.0 ================= */
.policy h2 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin: 16px 0 6px; }
.policy ul { padding-inline-start: 20px; margin: 0; }
.policy li + li { margin-top: 4px; }
.policy-link { text-align: center; margin: 14px 0 0; font-size: .85rem; }
.policy-link a { color: var(--muted); }

/* ================= v2.1.0 ================= */
.avatar.bill-no.t-purchase { background: #EAF0FB; color: #2F4F8F; }
.avatar.bill-no.t-quote { background: #FBF1D6; color: #7A5A06; }
.avatar.bill-no.t-sreturn { background: #FCE8E6; color: var(--give); }
.tabs a i { font-size: .75rem; }
.due-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 8px 12px; margin-bottom: 12px; border-inline-start: 4px solid #2F4F8F; }
.due-box > i { color: #2F4F8F; font-size: 1.2rem; }
.due-box.today { border-color: var(--warn); } .due-box.today > i { color: var(--warn); }
.due-box.over { border-color: var(--give); background: #FFF6F5; } .due-box.over > i { color: var(--give); }
.due-box input { width: 160px; padding: .4rem .6rem; }
.due-clear { border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 10px; color: var(--muted); }
.due-alert { display: flex; align-items: center; gap: 10px; background: #FFF6F5; border: 1px solid #F6C9C3; color: var(--give); border-radius: 14px; padding: 11px 14px; margin: 4px 0 12px; text-decoration: none; font-weight: 600; }
.due-alert:hover { color: var(--give); background: #FDECEA; }
.due-row { gap: 10px; }
.due-link { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; min-width: 0; }
.due-link:hover { color: var(--ink); }
.wa-mini { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #E8F7EE; color: #128C4A; font-size: 1.15rem; text-decoration: none; }
.due-h-over { color: var(--give) !important; } .due-h-today { color: var(--warn) !important; }
.avatar.acc-cash { background: #EAF5EE; color: #24603A; }
.avatar.acc-bank { background: #EAF0FB; color: #2F4F8F; }
.avatar.acc-jazzcash { background: #FDECEA; color: #B42318; }
.avatar.acc-easypaisa { background: #E6F6EC; color: #138A43; }
.avatar.acc-other { background: var(--bg); color: var(--muted); }
.stmt .st-open td { background: #F6F8F9; font-weight: 600; }
.stmt .b-items th, .stmt .b-items td { font-size: 12.5px; }
.stmt .b-totals small { color: var(--mut); font-size: 11px; }

/* ================= v2.2.0 ================= */
.greet-date { opacity: .8; font-size: .85rem; }
.b-hijri { font-size: 12px; color: var(--mut, #6B7280); }
.zk-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; }
.zk-row:last-child { border-bottom: 0; }
.zk-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.zk-row.sub { cursor: default; color: var(--muted); font-size: .9rem; }
.zk-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.zk-in:last-child { margin-bottom: 0; }
.zk-in label { margin: 0; font-size: .92rem; }
.zk-in .form-control { width: 150px; flex: none; padding: .45rem .7rem; }

/* ================= v2.3.0 ================= */
.staff-note { margin: 0; padding: 0 16px 10px; padding-inline-start: 72px; color: var(--muted); font-size: .85rem; }
.staff-badge { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0 0; padding: 2px 12px; border-radius: 999px; background: rgba(217,162,27,.2); color: #FBE7B0; font-size: .85rem; position: relative; z-index: 1; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-bottom: 10px; }
.perm-grid .check-row { font-size: .88rem; padding: 6px 0; }
.perm-grid input:disabled + span { opacity: .75; }
.role-seg { grid-auto-columns: auto; overflow-x: auto; }
.trash-row { gap: 8px; }
.tr-btn { border: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 1.05rem; }
.tr-btn.ok { background: #EAF5EE; color: var(--get); }
.export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
.ex-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 12px; background: var(--bg); color: var(--primary); text-decoration: none; font-size: .82rem; font-weight: 600; text-align: center; }
.ex-btn i { font-size: 1.3rem; }
.ex-btn:hover { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 380px) { .perm-grid { grid-template-columns: 1fr; } }

/* ================= v2.4.0 زبانیں اور بائیں سے دائیں (LTR) ================= */
.lang-switch { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 14px 0 0; font-size: .9rem; }
.lang-switch > i { color: var(--muted); margin-inline-end: 4px; }
.lang-switch a { padding: 3px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; border: 1px solid var(--line); background: var(--surface); }
.lang-switch a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lang-row .lang-switch { margin: 0; justify-content: flex-end; }
.sn-bottom .lang-switch { margin: 0 0 8px; justify-content: flex-start; }
.sn-bottom .lang-switch > i { color: rgba(255,255,255,.6); }
.sn-bottom .lang-switch a { background: rgba(255,255,255,.08); border-color: transparent; color: rgba(255,255,255,.85); padding: 2px 10px; }
.sn-bottom .lang-switch a.active { background: #fff; color: var(--primary); }
html[lang="en"] .brand-en { display: none; }
.sn-bottom .lang-switch a.active { box-shadow: none; }
.due-alert .grow { display: block; }
[lang="en"] { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
html[lang="en"] body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.55; }
html[lang="en"] .page-title, html[lang="en"] .brand-name, html[lang="en"] .sn-brand span { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-weight: 700; line-height: 1.5; }
html[lang="ar"] .page-title, html[lang="ar"] .brand-name { font-family: 'Noto Naskh Arabic', serif; font-weight: 700; line-height: 1.8; }
[dir="ltr"] .bi-arrow-right, [dir="ltr"] .bi-chevron-left, [dir="ltr"] .bi-chevron-right, [dir="ltr"] .bi-arrow-return-left { display: inline-block; transform: scaleX(-1); }
[dir="ltr"] .num-input { text-align: left; }
[dir="ltr"] .info-list b, [dir="ltr"] .i-amt, [dir="ltr"] .b-meta { text-align: right; }
[dir="ltr"] .fab { left: auto; right: 16px; }
[dir="ltr"] .bal-side { align-items: flex-start; }
@media (min-width: 992px) {
    [dir="ltr"] .side-nav { right: auto; left: 0; }
    [dir="ltr"] body.has-side .app-shell { margin-right: 0; margin-left: var(--side); }
    [dir="ltr"] .fab { right: 32px; left: auto; }
    [dir="ltr"] .sn-links a.active { box-shadow: inset 4px 0 0 var(--gold); }
}

/* ================= v2.8.0 Google Drive ================= */
.gd-status { margin: 8px 0 0; font-size: .88rem; color: var(--muted); }
.gd-status.ok { color: var(--get); font-weight: 600; }
.gd-status.bad { color: var(--give); }
.gd-box .bi-google, .backup-alert .bi-google { color: #4285F4; }
.backup-alert { display: flex; align-items: center; gap: 10px; background: #EEF4FE; border: 1px solid #C9DBFB; color: #1F4E9A; border-radius: 14px; padding: 11px 14px; margin: 4px 0 12px; text-decoration: none; font-weight: 600; }
.backup-alert:hover { color: #1F4E9A; background: #E3EDFD; }

/* ================= v2.9.0 کاؤنٹر سیل (POS) ================= */
.pos-wrap { display: grid; gap: 12px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.pos-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); text-align: start; font: inherit; }
.pos-item b { font-size: .9rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pos-item span { color: var(--primary); font-weight: 700; }
.pos-item small { color: var(--muted); font-size: .72rem; }
.pos-item:active { transform: scale(.97); background: var(--primary-soft); }
.pos-item.out { opacity: .55; }
.pos-item.out small { color: var(--give); }
.pos-right { padding: 12px; }
.pos-empty { text-align: center; color: var(--muted); padding: 20px 8px; margin: 0; }
.pos-line { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pl-name { font-weight: 600; font-size: .95rem; }
.pl-ctl { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.pl-btn { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 1.2rem; font-weight: 700; flex: none; }
.pl-qty { width: 54px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 5px; flex: none; }
.pl-price { width: 80px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 5px; flex: none; }
.pl-x { color: var(--muted); }
.pl-amt { margin-inline-start: auto; }
.pl-del { border: 0; background: none; color: var(--give); padding: 4px 6px; }
.pos-sum { margin-top: 8px; }
.pos-sum .sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; }
.pos-sum .sum-in { width: 140px; padding: .45rem .7rem; }
.pos-total { display: flex; justify-content: space-between; align-items: center; background: var(--primary); color: #fff; border-radius: 12px; padding: 10px 14px; margin: 6px 0; font-size: 1.15rem; font-weight: 700; }
.pos-total b { font-size: 1.4rem; }
.pos-change b { font-size: 1.15rem; }
.pos-more summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .9rem; padding: 6px 0; }
.pos-actions { display: flex; gap: 8px; margin-top: 10px; }
.pos-actions .btn-main { flex: 1; }
.pos-next { font-size: 1.1rem; }
.close-diff { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; font-weight: 700; background: var(--bg); }
@media (min-width: 992px) {
    .pos-wrap { grid-template-columns: 1fr 400px; align-items: start; }
    body.has-side .app-shell > .content.pos-wrap { max-width: 1300px; }
    .pos-grid { max-height: calc(100vh - 260px); }
    .pos-right { position: sticky; top: 16px; }
}

/* v2.9.1: لمبی اپڈیٹ فہرست میں بٹن ہمیشہ نظر آئے */
.update-backdrop { overflow-y: auto; }
.update-box { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.update-box > .update-icon, .update-box > h2, .update-box > .update-ver, .update-box > .update-ok, .update-box > .update-all { flex: none; }
.update-notes { flex: 1 1 auto; min-height: 60px; overflow-y: auto; }

/* v2.9.3: پاپ اپ چھوٹا اور اوپر بند کرنے کا بٹن */
.update-box { position: relative; padding-top: 18px; }
.update-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 1.05rem; display: grid; place-items: center; }
.update-x:hover { background: var(--primary-soft); color: var(--primary); }
.update-icon { width: 52px; height: 52px; font-size: 1.6rem; }
.update-notes { max-height: 32vh; }
.update-backdrop { align-items: center; padding: 12px; }

/* ================= v2.10.0 ================= */
.act-filter { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.act-filter .form-select, .act-filter .form-control { padding: .45rem .6rem; font-size: .88rem; }
.act-day { padding: 6px 16px; background: var(--bg); color: var(--muted); font-size: .82rem; font-weight: 700; }
.act-row { gap: 10px; }
.act-row .row-title { white-space: normal; font-size: .92rem; }
.avatar.act-create { background: #EAF5EE; color: var(--get); }
.avatar.act-update { background: #EAF0FB; color: #2F4F8F; }
.avatar.act-delete { background: #FCE8E6; color: var(--give); }
.avatar.act-restore, .avatar.act-close { background: #FBF1D6; color: #7A5A06; }
.act-tag-create { background: #EAF5EE; color: var(--get); } .act-tag-update { background: #EAF0FB; color: #2F4F8F; }
.act-tag-delete { background: #FCE8E6; color: var(--give); } .act-tag-restore, .act-tag-close, .act-tag-import, .act-tag-team { background: #FBF1D6; color: #7A5A06; }
.restore-box { border-inline-start: 4px solid var(--give); }
@media (max-width: 420px) { .act-filter { grid-template-columns: 1fr 1fr; } .act-filter input { grid-column: 1 / -1; } }

/* ================= v2.11.0 ================= */
.act-bill { flex: 0 0 auto !important; padding-inline: 18px; background: var(--primary); color: #fff; }
.act-bill:hover { color: #fff; filter: brightness(1.08); }
.items-hint { display: flex; align-items: center; gap: 12px; background: var(--primary-soft); border: 1px solid #CFE3E6; color: var(--primary); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; text-decoration: none; }
.items-hint > .bi:first-child { font-size: 1.5rem; }
.items-hint b { display: block; }
.items-hint small { color: var(--muted); display: block; line-height: 1.6; }
.items-hint:hover { color: var(--primary); filter: brightness(.98); }
.pick-drop { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(15,76,92,.16); margin: -2px 0 10px; overflow: hidden; }
.pick-list { max-height: 50vh; overflow-y: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; }
.pick-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.pick-row b { font-size: .95rem; }
.pick-row.out { opacity: .55; }
.pick-meta { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.pick-meta small { color: var(--muted); font-size: .72rem; }
.pick-none { padding: 14px; margin: 0; color: var(--muted); text-align: center; }
.pick-foot { display: flex; gap: 8px; padding: 10px; background: var(--bg); }
.pick-foot .btn-main { flex: 1; }
.name-sug { position: absolute; z-index: 1080; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12); overflow: hidden; }
.name-sug button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: start; font: inherit; }
.name-sug button:hover, .name-sug button:active { background: var(--primary-soft); }
.name-sug span { color: var(--primary); font-weight: 700; flex: none; }

/* ================= v2.12.0 کیش بک ماہانہ ================= */
.ledger-head .tabs + .day-nav { margin-top: 6px; }
.month-net { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; }
.month-net.up { background: #EAF5EE; color: var(--get); }
.month-net.down { background: #FDECEA; color: var(--give); }
.month-net > .bi { font-size: 1.4rem; }
.month-net b { font-size: 1.15rem; }
.month-net small { font-weight: 400; color: var(--muted); }
.m6-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 150px; }
.m6-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; text-decoration: none; color: var(--muted); border-radius: 10px; padding: 4px 0; }
.m6-col.cur { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.m6-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.m6-bars i { display: block; width: 34%; max-width: 16px; min-height: 2px; border-radius: 4px 4px 0 0; }
.m6-bars i.in, .m6-legend i.in { background: var(--get); }
.m6-bars i.out, .m6-legend i.out { background: var(--give); }
.m6-col small { font-size: .72rem; white-space: nowrap; }
.m6-legend { display: flex; gap: 16px; justify-content: center; margin-top: 10px; font-size: .82rem; color: var(--muted); }
.m6-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.mday { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .92rem; }
.mday:last-child { border-bottom: 0; }
.mday > span:not(:first-child) { text-align: end; }
.mday b { display: block; }
.mday small { color: var(--muted); font-size: .72rem; }
.mday-head { background: var(--bg); font-size: .8rem; color: var(--muted); font-weight: 700; }
a.mday:hover { background: var(--primary-soft); color: var(--ink); }
.wa-ask .bi-whatsapp { color: #128C4A; }

/* ================= v2.13.0 واٹس ایپ انتخاب اور یاد دہانی کی تصویر ================= */
.wa-sheet-back { position: fixed; inset: 0; z-index: 2100; background: rgba(10,30,36,.55); display: flex; align-items: flex-end; justify-content: center; }
.wa-sheet-back[hidden] { display: none; }
.wa-sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.wa-sheet h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; text-align: center; }
.wa-sheet [data-pkg] { display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; padding: 14px; font: inherit; font-weight: 700; font-size: 1.05rem; background: #25D366; color: #fff; }
.wa-sheet [data-pkg].biz { background: #128C7E; }
.wa-remember { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.wa-remember input { width: 18px; height: 18px; accent-color: var(--primary); }
.wa-cancel { border: 0; background: var(--bg); border-radius: 12px; padding: 10px; font: inherit; color: var(--muted); }
button.wa-btn { border: 0; width: 100%; font: inherit; cursor: pointer; }
.remind-sheet .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-link-plain { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; padding: 4px 0; }
.remind-prev { margin-top: 10px; }
.remind-prev img { width: 100%; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
button.list-row.wa-reset { width: 100%; border: 0; background: none; font: inherit; text-align: start; }

/* ================= v2.14.0 ڈیش بورڈ اور منافع ================= */
.dash-card { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; background: var(--surface); border-radius: 16px; padding: 12px 14px; margin: 4px 0 12px; text-decoration: none; color: var(--ink); box-shadow: 0 2px 10px rgba(15,76,92,.06); }
.dash-card:hover { color: var(--ink); }
.dc-cell small { display: block; color: var(--muted); font-size: .78rem; }
.dc-cell b { font-size: 1.15rem; }
.dc-go { display: flex; flex-direction: column; align-items: center; color: var(--primary); }
.dc-go .bi { font-size: 1.5rem; }
.dc-go small { font-size: .72rem; font-weight: 600; }
.chg { display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; font-style: normal; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.chg.good { background: #EAF5EE; color: var(--get); }
.chg.bad { background: #FDECEA; color: var(--give); }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 2px 10px rgba(15,76,92,.05); }
.kpi-l { color: var(--muted); font-size: .82rem; }
.kpi b { font-size: 1.25rem; }
.kpi .chg { align-self: flex-start; }
.kpi-s { color: var(--muted); font-size: .75rem; }
svg.chart { width: 100%; height: 220px; direction: ltr; display: block; }
.ch-axis { stroke: var(--line); stroke-width: 1.5; }
rect.b-sales, .ch-legend i.b-sales { fill: #16697A; background: #16697A; }
rect.b-exp, .ch-legend i.b-exp { fill: #E8A09A; background: #E8A09A; }
.ch-line { fill: none; stroke: #D9A21B; stroke-width: 3; stroke-linejoin: round; }
.ch-dot { fill: #fff; stroke: #1B7A3E; stroke-width: 3; }
.ch-dot.neg { stroke: var(--give); }
.ch-lbl { font-size: 15px; fill: #6B7280; text-anchor: middle; font-family: 'Noto Naskh Arabic', Tahoma, sans-serif; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.ch-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.ch-legend i.ch-line-key { height: 3px; background: #D9A21B; border-radius: 2px; }
.tot-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--muted); }
.tot-row b { color: var(--ink); }
.daily-bars { display: flex; align-items: flex-end; gap: 2px; height: 110px; direction: ltr; }
.daily-bars span { flex: 1; background: #A9CDD3; border-radius: 3px 3px 0 0; min-height: 2px; }
.daily-bars span.today { background: #D9A21B; }
.daily-lbl { display: flex; justify-content: space-between; direction: ltr; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.sort-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; font-size: .85rem; color: var(--muted); }
.sort-row a { padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.sort-row a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pf-row { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.pf-row:last-child { border-bottom: 0; }
.pf-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.pf-row .row-title a { color: inherit; text-decoration: none; }
.pf-bar { display: block; height: 5px; background: var(--bg); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: var(--get); border-radius: 3px; }
.pf-bar i.neg { background: var(--give); }
.pf-amt { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.pf-amt small { color: var(--muted); font-size: .75rem; }
.warn-t { color: #B54708; }
@media (min-width: 640px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }

/* ================= v2.15.0 ================= */
.photo-pick { display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--line); border-radius: 14px; padding: 12px 14px; color: var(--primary); cursor: pointer; font-weight: 600; }
.photo-pick input { display: none; }
.photo-pick .bi { font-size: 1.3rem; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.att-item { position: relative; }
.att-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.att-del { position: absolute; top: 4px; inset-inline-end: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; display: grid; place-items: center; }
.att-up label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.amount-wrap { position: relative; }
.calc-btn { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.2rem; display: grid; place-items: center; }
.calc-back { position: fixed; inset: 0; z-index: 2100; background: rgba(10,30,36,.5); display: flex; align-items: flex-end; justify-content: center; }
.calc-back[hidden] { display: none; }
.calc-box { width: 100%; max-width: 420px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
.calc-disp { background: var(--bg); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; display: flex; flex-direction: column; align-items: flex-end; direction: ltr; min-height: 76px; }
.calc-expr { color: var(--muted); font-size: .95rem; min-height: 1.3em; word-break: break-all; }
.calc-res { font-size: 1.9rem; color: var(--ink); }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; direction: ltr; }
.calc-keys button { border: 0; border-radius: 14px; padding: 14px 0; font-size: 1.35rem; font-weight: 600; background: var(--bg); color: var(--ink); }
.calc-keys button.op { background: var(--primary-soft); color: var(--primary); }
.calc-keys button.clr { background: #FDECEA; color: var(--give); }
.calc-keys button.eq { grid-column: span 3; background: var(--primary); color: #fff; font-size: 1.05rem; }
.rec-row.off { opacity: .55; }
.rec-row { gap: 8px; }
.chq { padding: 12px 14px; margin-bottom: 10px; border-inline-start: 4px solid var(--line); }
.chq.over { border-color: var(--give); }
.chq.today { border-color: var(--warn); }
.chq-top { display: flex; align-items: center; gap: 10px; }
.chq-top small { display: block; color: var(--muted); font-size: .8rem; }
.chq-dir { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.chq-dir.received { background: #EAF5EE; color: var(--get); }
.chq-dir.issued { background: #FDECEA; color: var(--give); }
.chq-amt { font-size: 1.1rem; }
.chq-meta { color: var(--muted); font-size: .85rem; margin: 6px 0 8px; }
.chq-act summary { display: inline-flex; width: auto; margin-bottom: 6px; }
.chq-btns { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.chq-btns .btn { width: auto; }
.chq-alert { background: #EEF4FE; border-color: #C9DBFB; color: #1F4E9A; }
.chq-alert:hover { color: #1F4E9A; background: #E3EDFD; }
.lab-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.lab-row small { display: block; color: var(--muted); font-size: .78rem; }
.lab-row.nocode { opacity: .6; }
.lab-q { display: flex; align-items: center; gap: 4px; flex: none; }
.lab-q button { width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.lab-q input { width: 48px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.lab-actions { display: flex; gap: 8px; }
.lab-actions .btn-main { flex: 1; }
.labels-sheet { display: grid; gap: 0; background: #fff; padding: 6px; border-radius: 12px; }
.labels-sheet.a4 { grid-template-columns: repeat(3, 1fr); }
.labels-sheet.a4s { grid-template-columns: repeat(4, 1fr); }
.labels-sheet.t50, .labels-sheet.t38 { grid-template-columns: 1fr; justify-items: center; }
.label { border: 1px dashed #cbd5e1; padding: 6px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; height: 33mm; break-inside: avoid; }
.labels-sheet.a4s .label { height: 26mm; }
.labels-sheet.t50 .label { width: 50mm; height: 25mm; }
.labels-sheet.t38 .label { width: 38mm; height: 25mm; }
.label .bc { width: 92%; height: 11mm; fill: #000; }
.labels-sheet.t38 .label .bc, .labels-sheet.a4s .label .bc { height: 8mm; }
.lb-name { font-size: 11px; line-height: 1.3; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-biz { font-size: 9px; color: #444; }
.lb-code { font-size: 9px; letter-spacing: 1px; direction: ltr; }
.lb-price { font-size: 12px; }
@media print {
    body.print-labels .side-nav, body.print-labels .no-print, body.print-labels .ledger-head { display: none !important; }
    body.print-labels .app-shell { margin: 0 !important; max-width: none !important; }
    body.print-labels .content { padding: 0 !important; max-width: none !important; }
    body.print-labels { background: #fff !important; }
    .labels-sheet { padding: 0; border-radius: 0; }
    .label { border-color: transparent; }
    .labels-sheet.t50 .label, .labels-sheet.t38 .label { page-break-after: always; }
}

/* ================= v2.16.0 وصولی ================= */
.b-pay { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--c, #0F4C5C); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.b-pay-qr { width: 92px; height: 92px; object-fit: contain; flex: none; background: #fff; }
.b-pay-txt { font-size: 12.5px; line-height: 1.7; }
.b-pay-txt b { display: block; color: var(--c, #0F4C5C); }
.qr-prev { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; }
.ra-next { font-size: 1.1rem; }
.ra-row { gap: 10px; }
.ra-check { font-size: 1.3rem; color: var(--line); flex: none; }
.ra-row.sent .ra-check { color: var(--get); }
.ra-row.sent .row-title { color: var(--muted); }
button.wa-mini { border: 0; }
.ag-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.ag-total b { font-size: 1.3rem; }
.ag-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--bg); }
.ag-bar.sm { height: 6px; margin-top: 6px; }
.ag-bar i, .ag-dot { display: block; height: 100%; }
.ag1 { background: #4CAF7A; } .ag2 { background: #E9B949; } .ag3 { background: #E8833A; } .ag4 { background: #C0392B; }
.ag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.ag-cell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.ag-cell small { color: var(--muted); font-size: .72rem; }
.ag-cell b { font-size: .9rem; }
.ag-dot { width: 10px; height: 10px; border-radius: 3px; }
.ag-row { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ag-row:hover { color: var(--ink); background: var(--primary-soft); }
.inst-prog { height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; margin: 4px 0 10px; }
.inst-prog.sm { display: block; height: 5px; margin: 6px 0 0; }
.inst-prog i { display: block; height: 100%; background: var(--get); border-radius: 5px; }
.inst-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.inst-row small { display: block; color: var(--muted); font-size: .8rem; }
.inst-row.paid { background: #F4FAF6; }
.inst-row.over { background: #FFF6F5; }
.inst-row.today { background: #FFF8EB; }
.inst-pay summary { width: auto; }
.inst-plan.off { opacity: .6; }
.inst-calc { color: var(--primary); font-weight: 600; margin: 0 0 8px; }
.text-white { color: #fff !important; }

/* ================= v2.17.0 پارٹیوں کا فلٹر، ترتیب، PDF ================= */
.search-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.search-tools .search-box { margin: 0; flex: 1; }
.tool-btn { flex: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--primary); font-size: 1.2rem; display: grid; place-items: center; position: relative; }
.tool-btn.on::after { content: ''; position: absolute; top: 8px; inset-inline-end: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--give); }
.tool-btn.pdf { color: #C0392B; }
.filter-note { font-size: .85rem; color: var(--muted); margin: -2px 0 10px; }
.sheet-back { position: fixed; inset: 0; z-index: 2000; background: rgba(10,30,36,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet-back[hidden] { display: none; }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet.small { padding-bottom: 24px; }
.sheet h3 { text-align: center; font-size: 1.1rem; font-weight: 700; margin: 4px 0 12px; }
.sheet .btn { margin-top: 12px; }
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.chip-grid.rate { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.chip { margin: 0; }
.chip input { display: none; }
.chip span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px; border-radius: 999px; background: var(--bg); border: 1.5px solid transparent; font-weight: 600; font-size: .92rem; cursor: pointer; text-align: center; }
.chip input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip.emo span { font-size: 1.5rem; }
.sort-list { background: var(--bg); border-radius: 16px; overflow: hidden; }
.sort-list label { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; }
.sort-list label:last-child { border-bottom: 0; }
.sort-list input { width: 22px; height: 22px; accent-color: var(--primary); }
.sort-list label:has(input:checked) span { color: var(--primary); font-weight: 700; }
.avatar { position: relative; }
.rate-badge { position: absolute; top: -6px; inset-inline-start: -6px; font-style: normal; font-size: .95rem; line-height: 1; }
.rate-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: .9rem; }
.rate-row button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; width: 42px; height: 38px; font-size: 1.2rem; opacity: .55; }
.rate-row button.on { opacity: 1; border-color: var(--primary); background: var(--primary-soft); }

/* ================= v2.18.0 اسٹاک: گودام، بیچ، قسمیں ================= */
.wh-qty { display: flex; gap: 6px; overflow-x: auto; }
.wh-qty .wq { flex: 1 0 auto; min-width: 84px; display: flex; flex-direction: column; align-items: center; padding: 6px 8px; border-radius: 12px; background: var(--bg); text-decoration: none; color: var(--ink); }
.wh-qty .wq small { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.wh-qty .wq.link { color: var(--primary); }
.var-row { text-decoration: none; color: var(--ink); }
.var-row:hover { color: var(--primary); }
.i-batch { display: flex; gap: 6px; margin-top: 6px; }
.i-batch input { flex: 1; font-size: .85rem; }
.exp-alert { background: #FFF4E5; border-color: #F9D8A8; color: #B54708; }
.exp-alert:hover { color: #B54708; background: #FFEDD2; }

/* ================= v2.19.0 حفاظت، ادائیگی، ریفرل، آف لائن ================= */
.rec-code { font-size: 1.6rem; font-weight: 800; letter-spacing: 3px; text-align: center; direction: ltr; background: var(--primary-soft); color: var(--primary); border-radius: 14px; padding: 14px; margin: 8px 0 12px; user-select: all; }
.lock-state { font-weight: 600; }
html.locked body > *:not(.lock-ov) { filter: blur(12px); pointer-events: none; }
.lock-ov { position: fixed; inset: 0; z-index: 3000; background: rgba(15,76,92,.92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock-ov[hidden] { display: none; }
.lock-box { background: var(--surface); border-radius: 22px; padding: 28px 22px; text-align: center; max-width: 340px; width: 100%; }
.lock-box > .bi { font-size: 3.5rem; color: var(--primary); }
.lock-box h2 { font-size: 1.25rem; font-weight: 700; margin: 8px 0 4px; }
.lock-box p { color: var(--muted); }
.lock-out { display: block; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.pay-steps { padding-inline-start: 20px; color: var(--muted); font-size: .9rem; }
.owner-pay { background: var(--primary-soft); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-weight: 700; color: var(--primary); }
.proof-img { max-width: 160px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--line); }
.net-bar { position: fixed; top: 0; inset-inline: 0; z-index: 2500; text-align: center; font-size: .85rem; font-weight: 600; padding: 6px 10px calc(6px); padding-top: calc(6px + env(safe-area-inset-top)); }
.net-bar.off { background: #B42318; color: #fff; }
.net-bar.sync { background: #D9A21B; color: #1F2933; }

/* ================= v2.20.0 گاہک کا پورٹل اور JazzCash ================= */
.portal-box { background: var(--surface); border-radius: 14px; padding: 10px 14px; }
.portal-box summary { cursor: pointer; color: var(--primary); font-weight: 700; }
.jc-plans { display: grid; gap: 8px; }
.jc-plans .btn { background: #B42318; border-color: #B42318; }

/* ================= v2.21.0 آرڈر، خرید تجویز، پوائنٹس، ٹیکس ================= */
.order-alert { background: #EAF5EE; border-color: #BFE3CB; color: #1B7A3E; }
.order-alert:hover { color: #1B7A3E; background: #DFF0E5; }
.order-items { margin: 8px 0; padding-inline-start: 18px; font-size: .9rem; }
.ro-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.ro-row small { display: block; color: var(--muted); font-size: .78rem; }
.ro-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.ro-q { width: 80px; flex: none; text-align: center; }
.pts-pill { display: inline-flex; align-items: center; gap: 6px; background: #FFF8E1; color: #8A6100; border-radius: 999px; padding: 4px 14px; margin-bottom: 10px; font-size: .9rem; }
.pts-pill .bi { color: #E0A800; }

/* ================= v2.22.0 آواز، آف لائن، بیک اپ، مشترکہ رپورٹ ================= */
.voice-fab { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-end: 18px; z-index: 900; width: 58px; height: 58px; border-radius: 50%; border: 0; background: #D9A21B; color: #fff; font-size: 1.6rem; box-shadow: 0 8px 20px rgba(217,162,27,.4); display: grid; place-items: center; }
.voice-fab[hidden] { display: none; }
.v-mic { display: grid; place-items: center; margin: 6px auto 10px; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 2.2rem; }
.v-mic.on { background: #B42318; animation: vpulse 1.2s infinite; }
@keyframes vpulse { 0% { box-shadow: 0 0 0 0 rgba(180,35,24,.5); } 70% { box-shadow: 0 0 0 18px rgba(180,35,24,0); } 100% { box-shadow: 0 0 0 0 rgba(180,35,24,0); } }
.v-text { text-align: center; font-size: 1.15rem; font-weight: 600; min-height: 1.6em; }
.net-bar.fail { background: #B54708; color: #fff; }
.net-bar.fail a, .net-bar.fail button { color: #fff; text-decoration: underline; background: none; border: 0; font: inherit; }
.snap-box { border-top: 1px dashed var(--line); padding-top: 10px; }
.snap-box .rl { text-decoration: none; color: var(--ink); }
.cons-card h3 { font-size: 1.05rem; font-weight: 700; }
.cons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.cons-grid span { background: var(--bg); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; }
.cons-grid small { color: var(--muted); font-size: .75rem; }
.cons-grid b { font-size: .92rem; }
.backup-alert.ok { background: #EAF5EE; }

/* ================= v2.23.0 ================= */
.kd-toast { position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); inset-inline: 16px; margin: 0 auto; max-width: 420px; background: #1B7A3E; color: #fff; border-radius: 14px; padding: 12px 16px; text-align: center; font-weight: 600; z-index: 2600; box-shadow: 0 8px 22px rgba(0,0,0,.18); }

.off-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.off-row:last-child { border-bottom: 0; }
.seg.seg-sm label span { padding: 6px 10px; font-size: .82rem; }

/* ================= v2.25.0 تین درجے ================= */
.tier-grid { display: grid; gap: 12px; }
.tier-card { background: var(--surface); border-radius: 18px; padding: 16px; border: 2px solid var(--line); }
.tier-card.current { border-color: var(--primary); }
.tier-card.t-pro { border-top: 6px solid #16697A; }
.tier-card.t-enterprise { border-top: 6px solid #D9A21B; }
.tier-head { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.tier-head .bi { color: var(--primary); }
.t-enterprise .tier-head .bi { color: #B8860B; }
.tier-now { margin-inline-start: auto; background: var(--primary); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .75rem; }
.tier-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin: 6px 0; }
.tier-price small { font-size: .8rem; color: var(--muted); font-weight: 400; }
.tier-inc { color: var(--muted); font-size: .85rem; margin: 0 0 4px; }
.tier-card .pro-list { margin-bottom: 10px; }
@media (min-width: 900px) { .tier-grid { grid-template-columns: repeat(3, 1fr); } }

/* v2.26.0: لمبی رقمیں اسکرین سے باہر نہ جائیں */
.mini-stats { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
.mini-stats > * { white-space: nowrap; }
.cash-card .cash-foot { flex-wrap: wrap; row-gap: 4px; }
.cash-foot > span { white-space: nowrap; }
.balance-card .amt { overflow-wrap: anywhere; }
.head-title, .party-meta { min-width: 0; overflow-wrap: anywhere; }
.ledger-head .head-row { flex-wrap: wrap; }

/* ================= v2.27.0 کاروبار کی قسم ================= */
.setup-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #FFF8E1, #FDEFC8); border: 1px solid #F3D88E; border-radius: 16px; padding: 14px; margin-bottom: 12px; color: #6B4E00; text-decoration: none; }
.setup-card > .bi:first-child { font-size: 1.8rem; color: #D9A21B; }
.setup-card b { display: block; }
.setup-card small { display: block; color: #8A6A10; }
.setup-card:hover { color: #6B4E00; }
.wiz-steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
.wiz-steps span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.15); color: #fff; font-weight: 700; }
.wiz-steps span.on { background: #D9A21B; }
.wiz-steps i { width: 30px; height: 2px; background: rgba(255,255,255,.3); }
.wiz-q { font-size: 1.15rem; font-weight: 700; margin: 4px 0 12px; }
.wiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wiz-grid.one { grid-template-columns: 1fr; }
.wiz-card { margin: 0; }
.wiz-card input { display: none; }
.wiz-card span { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); cursor: pointer; height: 100%; }
.wiz-card.wide span { flex-direction: row; text-align: start; gap: 12px; padding: 14px 16px; }
.wiz-card.wide span small { margin-inline-start: auto; }
.wiz-card .bi { font-size: 1.8rem; color: var(--primary); }
.wiz-card b { font-size: .95rem; }
.wiz-card small { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.wiz-card input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.wiz-mod { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; }
.wiz-mod:last-child { border-bottom: 0; }
.wiz-mod input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.wiz-mod .bi { color: var(--primary); font-size: 1.1rem; }
.tier-tag { background: #FFF4E5; color: #B54708; border-radius: 999px; padding: 1px 8px; font-size: .72rem; }
.wiz-nav { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); margin-top: 12px; }
.wiz-nav .btn-main { flex: 1; }
@media (min-width: 640px) { .wiz-grid { grid-template-columns: repeat(3, 1fr); } }

/* ================= v2.28.0 ادھار کی حد ================= */
.credit-hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.credit-hint.over { color: var(--give); font-weight: 600; }
.credit-warn { display: flex; gap: 8px; align-items: flex-start; }
.credit-ok { background: #FFF4E5; border-radius: 12px; padding: 10px 12px; }
.over-tag { background: #FDECEA; color: var(--give); border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 600; }
.credit-bar { background: var(--surface); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.cb-top { display: flex; justify-content: space-between; font-size: .88rem; }
.cb-track { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin: 6px 0 4px; }
.cb-track i { display: block; height: 100%; background: var(--get); border-radius: 4px; }
.credit-bar.near .cb-track i { background: #E9B949; }
.credit-bar.over .cb-track i { background: var(--give); }
.credit-bar small { color: var(--muted); font-size: .78rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ادائیگی کا خانہ: نمبر خانے کے اندر رہیں */
.b-pay-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.b-pay-txt .b-num, .b-pay-txt div { unicode-bidi: plaintext; }
[dir="rtl"] .b-pay-txt div { text-align: right; }
[dir="ltr"] .b-pay-txt div { text-align: left; }
